Files
DeepTutor/deeptutor/tools/prompting/hints/en/web_fetch.yaml
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
882 B
YAML

short_description: "Fetch a specific URL and extract readable content as markdown."
when_to_use: "When the user's message contains a specific URL and reading that page is needed: shared blog / textbook / paper links with a question about them, or an explicit 'read this page' request. Use ``web_search`` for general topic searches."
input_format: "{\"url\": \"full http(s):// URL\", \"max_chars\": 50000}. ``max_chars`` is optional (default 50000) and content beyond it is truncated."
guideline: "Login-walled, anti-bot, or JS-only pages may return little useful content — say so honestly, don't fabricate around an empty result. The returned text already has scripts and sidebars stripped (first line is `# Title` when available)."
note: "Refuses file:// / localhost / private IP addresses. Fetches one URL per call; issue separate calls for multiple URLs."
phase: "exploration"