Files
Bingxi Zhao (Frank) 7bdb10b700 feat(chat): Auto mode router + new chat tools (ask_user, web_fetch, etc.)
Auto capability (agents/auto/) gains a three-stage agent loop:
ANALYZING (one LLM call, streamed as thinking) -> DELEGATING (router
emits delegate_to_<cap> tool calls or atomic tool calls, with bounded
retries and a same-cap quota) -> SYNTHESIZING (final inline answer).
Sub-capability events flow through forward_events with call_id tagging
so conversation history keeps only Auto's own synthesis.

New chat-mountable tools:
- ask_user: pauses the turn for 1-3 structured questions, frontend
  renders a card the user navigates and submits in one batch
- web_fetch: HTTP + readable-content extraction with strict
  scheme/private-IP/size guards (pre-flight + post-redirect)
- write_note: replaces save_to_notebook; append (new record) and
  edit (existing record by id) modes
- list_notebook: read-only index / drill-down listing; only mounted
  when the user has notebooks
- github_query: read-only ``gh`` CLI wrapper (pr/issue/run/repo plus
  GET-only api); no mutation verbs reachable

Updates chat agentic_pipeline.py + agentic_chat.yaml (en/zh) to the
new tool surface and source-inventory contract, refits
tools/builtin/__init__.py as the single place to register
chat-mounted tools and their argument-augmentation wrappers, and
tightens core stream + tool_protocol around tool-result metadata.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:05:15 +08:00

7 lines
866 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

short_description: "通过 `gh` CLI 只读地查询 GitHub 上的 PR / issue / repo / CI 运行状态。"
when_to_use: "用户问到具体 GitHub 资源时使用:'看看这个 PR 的 CI 通过了吗'、'某 repo 最近有什么 issue'、'这个 release 的 changelog'。**普通代码概念解释不要调它**,用通识或 web_search。"
input_format: "{\"query_type\": \"pr|issue|run|repo|api\", \"target\": \"owner/repo[#number] 或完整 URL;api 类型时是 gh api 的相对路径\"}。"
guideline: "本工具**只能读**,不会代用户评论、关 issue、合 PR——需要修改 GitHub 状态时让用户自己操作。返回的是 JSON,自己提取关键字段汇报给用户即可。"
note: "服务端没装 `gh` CLI 时工具会返回一个明确错误,请如实告诉用户;不要凭空编造 GitHub 上的状态。"
phase: "exploration"