From 6cf8902c57ae8ff423177df7cbe624d758bd88ed Mon Sep 17 00:00:00 2001 From: worldmozara Date: Fri, 24 Jul 2026 19:09:07 +0800 Subject: [PATCH] docs: document fetch network tool --- CLAUDE.md | 3 ++- README.md | 2 +- doc/architecture.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 830a2de..2041cd3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -87,7 +87,8 @@ Module-level `@tool` handlers. Call `set_workspace_root()` before use. - **`vcs`**: read-only VCS tools (`vcs_kind` / `vcs_status` / `vcs_diff` / `vcs_log` / `vcs_branch`) via `VcsBackend` protocol; **git** implemented; detectors are pluggable for other systems. - **`chat`**: human prompts as tools — `ask_user_line` / `ask_user_choice` / `ask_user_form` (shared `prompting` core). - **`todo`**: LIFO stack of **task groups** (not a queue of tasks) — `todo_push` creates one group of siblings; `todo_pop` removes the whole top group; `todo_update` by id; DFS breakdown push[T1,T2]→push[T1.1…]→pop→push[T2.1…]; stored on session row; open items = unfinished work (`[TODO OPEN WORK]`); all-terminal non-empty = hygiene (`[TODO HYGIENE]`); nag channel via `[agent] todo_nag_strategy` (`developer`/`user` = prose nag; `synthetic_tool` = forged `todo_list` call + **real** `stack.render()` result + ToolCall/Result events; `none`). -- **`DEFAULT_TOOLS`**: file + process + vcs + chat + todo tool list for a `ToolRegistry`. +- **`net` / `fetch`**: HTTP GET/POST/PUT/DELETE via niquests (isolated session, not the LLM client). Manual redirects with per-hop SSRF checks (`asyncio` `getaddrinfo`). Private/loopback hosts need instance policy grant (CLI timed confirm; **not** YOLO). Public cleartext HTTP and mutating methods soft-confirm (`YOLO`/`TRUSTABLE`). HTTPS→HTTP redirects blocked unless `allow_http_downgrade`. `user_agent` tool arg (or headers) is never replaced by the default when provided. Caps: body bytes/chars, request body size. +- **`DEFAULT_TOOLS` / catalog**: file + process + vcs + chat + todo + net (`fetch`) for local surface. ### Prompting (`prompting.py`) diff --git a/README.md b/README.md index b9fd261..936ff68 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,7 @@ User messages are saved immediately. On API error or Ctrl+C, partial assistant/t ## Tools (when enabled) -Default registry: file ops (including `tree` with default noise-dir skips), `run_command` / PTY (POSIX openpty; Windows ConPTY via pywinpty), read-only VCS (git), human prompts (`ask_user_line` / `ask_user_choice` / `ask_user_form`), and todo stack tools (`todo_list` / `todo_push` / `todo_pop` / `todo_update` / `todo_clear`). +Default registry: file ops (including `tree` with default noise-dir skips), `run_command` / PTY (POSIX openpty; Windows ConPTY via pywinpty), read-only VCS (git), HTTP `fetch` (GET/POST/PUT/DELETE via niquests; private/loopback hosts need a human policy grant, not YOLO), human prompts (`ask_user_line` / `ask_user_choice` / `ask_user_form`), and todo stack tools (`todo_list` / `todo_push` / `todo_pop` / `todo_update` / `todo_clear`). Safety defaults: diff --git a/doc/architecture.md b/doc/architecture.md index 58d9db7..ce410a0 100644 --- a/doc/architecture.md +++ b/doc/architecture.md @@ -21,7 +21,7 @@ - router: Multi-source capability routing (Phase H; not implemented). - config: Plyngent configuration center (TOML), including ``[plugins]``. - agent: Tool loop, streaming, usage, compact; `@tool` / tags / registry. - - tools: Workspace file/process/VCS/chat/todo tools; catalog; plugins; + - tools: Workspace file/process/VCS/chat/todo/net tools; catalog; plugins; instance/session context and views. - prompting: Shared ask/choose/form for CLI and tools. - cli: Click entry, slash registry, REPL, one-shot chat.