Commit Graph
4 Commits
Author SHA1 Message Date
Dudu-0223 e94305d99e fix: address codex review round 1
Two functional gaps in the search tools change:

- Enforce rawOutputMaxBytes on UNTRUNCATED inline stdout too. The cap was
  only checked on the truncated->raw-spill path, so an executor retaining
  more inline than the search cap (or a deployment lowering the cap below
  the bash retention) could smuggle an over-cap parse through, contradicting
  the documented SEARCH_RAW_OUTPUT_OVERFLOW contract. Covered by a new
  over-cap-inline test.

- Load @deepseek-ai/dsh-timeout-policy in the coding-agent tree. The search
  tools declare timeoutMs but nothing in the demo enforced it, so the
  advertised 30s budget silently degraded to the bash executor's 60s
  backstop. The keyless smoke boots the amended tree.
2026-07-09 21:12:41 +08:00
Dudu-0223 e0f20088d8 feat: bash-backed glob/grep discovery tools (dsh-tool-fs-search)
Implements docs/rfc/implemented/feature/2026-07-09-bash-backed-grep-glob-
discovery.md: model-facing glob/grep in a new @deepseek-ai/dsh-tool-fs-search
package, executing fixed ripgrep templates through ctx.bash.resolve/run —
not ctx.fs provider methods — so filesystem backends stay free of a search
contract and sandboxed/remote executors substitute cleanly. The tools never
call ctx.bash.start(); the tool layer owns quoting (one singleQuote safety
boundary), rg --json parsing, ItemRetainer/TextRetainer retention, and the
first tool-owned ctx.spillFiles.saveText() handoff (item-level retention the
generic post-execute spill policy cannot recover).

RFC amendments on the way to implemented/: a shared src/search-core.ts (the
SEARCH_* vocabulary + bash-run/raw-spill/spill plumbing was byte-identical
across both tools — the missed-extraction smell), and a snapshot-gap note:
wiring the acp-agent tree changes the assembled prompt, so goldens need a
keyed re-record; the spill notice text is pinned by unit tests instead and
only the coding-agent example ships the tools for now.
2026-07-09 21:04:08 +08:00
Dudu-0223 463b72ce96 feat(spill): add tool-output spill seam, local backend, and policy
Oversized plain-text tool results now spill to a session-scoped file and
return a bounded preview plus the spill path, so a verbose result stays
readable via `read` without consuming the next model request in full.

- dsh-spill: minimal SpillFiles seam (saveText → session-scoped SpillPath)
- dsh-spill-local: private 0700 session dirs, traversal-safe names, exclusive
  owner-only writes
- dsh-spill-policy: tools/post-execute transformer; no-op unless maxInlineBytes
  is set; skips read; best-effort on save failure (never turns a success into
  an isError)

web_fetch is the showcase — no tool-specific spill code. The coding-agent
example loads the stack so its keyless Loader smoke guards the namespace-plugin
export shape. Snapshot gap for a transcript-visible web_fetch spill is recorded
in the RFC's Consequences (ACP replay is keyless and cannot hit the web).
2026-07-08 20:41:55 +08:00
Tianyi Cui 54a3c8b2a4 docs: address graph review placement 2026-07-05 02:54:01 +08:00