Repository navigation
feat(jm): 新增 jm_search 工具(info_agent 禁漫搜索 / 浏览 / 排行) - #107
Conversation
- 新增 `src/Undefined/jm/searcher.py`:按 `mode` 分派 jmcpy 的 `search` / `browse` / `ranking`,统一渲染车号列表(车号、标题、作者、分类、更新时间) 与模式感知表头;分类页与排行榜不返回总数时只提示「需要更多结果时翻页」。 - info_agent 新增 `jm_search`:`mode=search` 支持 `target` / `sort` / `time_range` / `genre` / `sub_genre`,`mode=browse` 按分类浏览(无需关键词), `mode=ranking` 取日/周/月榜;`sub_genre` 必须与 `genre` 同给且只有网页端支持, `ranking` 固定按观看数排序。只查列表,不下载、不发送消息。 - 域层通过 `skills/shared.py::jm_search_text` 桥接,handler 不越界导入 `Undefined.jm.*`,导入边界棘轮基线保持不变。
- CHANGELOG.md 新增 v3.18.2 条目:info_agent 的 jm_search 禁漫列表查询工具 (关键词检索 / 分类浏览 / 日周月排行); - 版本号同步到 3.18.2:pyproject.toml、src/Undefined/__init__.py、两个 App 的 package.json / package-lock.json / Cargo.toml / Cargo.lock / tauri.conf.json 与 uv.lock(lock 只改根包版本,无依赖漂移)。
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: 69gg/Undefined/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (25)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe ChangesJM listing search
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant InfoAgent
participant JmSearchHandler
participant SharedJmSearchText
participant JmSearcher
participant JmcpyClient
InfoAgent->>JmSearchHandler: Submit mode and search filters
JmSearchHandler->>SharedJmSearchText: Pass validated query and runtime configuration
SharedJmSearchText->>JmSearcher: Fetch and format listing
JmSearcher->>JmcpyClient: Call search, browse, or ranking
JmcpyClient-->>JmSearcher: Return listing page
JmSearcher-->>SharedJmSearchText: Return formatted listing
SharedJmSearchText-->>JmSearchHandler: Return result text
JmSearchHandler-->>InfoAgent: Return result or error text
Merge Risk: ⚪ Minimal · up to The JM listing flow is compatible with its dependency and has validation and error handling. The change is ready to merge after normal checks; live remote-service behavior was not verified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new capability retrieves catalog metadata without directly downloading files, sending messages, or accepting user-selected network destinations. Risk is low, but shared-session safety and access isolation are not fully established. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 30.77% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 52 functions across 6 files. (19 skipped: 19 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
变更内容
info_agent新增jm_search工具(src/Undefined/skills/agents/info_agent/tools/jm_search/)与领域层src/Undefined/jm/searcher.py:mode=search关键词检索、mode=browse分类浏览(不需要关键词)、mode=ranking日/周/月排行;筛选维度target(站内/作品/作者/标签/角色)、sort、time_range、genre、sub_genre,返回车号(JM<数字>)、标题、作者、分类与更新时间,n默认 5、上限 20,只查列表、不下载也不发送。mode=search必须给msg(≥2 字,纯数字车号直达该本子),browse/ranking带关键词会被拦下并提示改用search;ranking固定按观看数排序,显式传其它sort时提示改用browse;sub_genre必须与genre同给,且只有网页端接口支持,被反爬拦截时直接返回原因。🏆 禁漫日榜(同人 / CG));分类页与排行榜不返回总数,这类结果只提示「需要更多结果时可用 page=N+1 继续」,只有确实知道总页数时才说「还有更多」。skills/shared.py::jm_search_text桥接,handler 只依赖 skills 内模块与第三方jmcpy,tests/test_skills_import_boundary.py棘轮基线零改动;工具仅info_agent可见,不受[jm].auto_extract_enabled影响。docs/configuration.md、docs/usage.md、README.md、ARCHITECTURE.md、CLAUDE.md、docs/development.md与 info_agent 的prompt.md/intro.md/config.json。pyproject.toml、src/Undefined/__init__.py、两个 App 的 package/lock/Cargo/tauri.conf 与uv.lock,lock 只改根包版本、无依赖漂移)。验证
uv run pytest tests/test_jm_searcher.py tests/test_jm_search_tool.py tests/test_skills_import_boundary.py tests/test_jm_tool.py tests/test_skill_handler_loading.py tests/test_agent_tool_registry.py -q→ 82 passeduv run ruff check ./uv run ruff format --check .→ 通过;uv run mypy .→ Success(815 files)uv run python scripts/release_notes.py validate --tag v3.18.2→ 通过(tag / 各版本文件 / CHANGELOG 最新版本一致)关联 issue
无
Summary by CodeRabbit