mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
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.
149 lines
5.7 KiB
YAML
149 lines
5.7 KiB
YAML
# The coding-agent plugin tree: the REPL agent demo. The two swappable
|
|
# backends — the DeepSeek adapter and the local bash executor — plus `hmr` for
|
|
# the dev/demo reload loop, then the stdio chat app (@deepseek-ai/dsh-stdio-
|
|
# agent), which bundles the whole agent-core spine (timer, llm, sessions,
|
|
# system-prompt, tools, agents, invariants, tool-bash, agent-loop), the console
|
|
# logger, JSONL persistence, the readline UI, and a pre-created `main` agent.
|
|
#
|
|
# `hmr` is a leaf entry (not baked into dsh-stdio-agent): it is a Loader-only
|
|
# dev plugin that needs `--expose-internals` — the `demo:repl` script passes
|
|
# it. Requires DEEPSEEK_API_KEY (and optionally DEEPSEEK_BASE_URL) in the
|
|
# environment — the dsh-stdio-agent bin loads the gitignored repo-root .env
|
|
# first. cordis.yml reads them via the `!!js` tag.
|
|
|
|
# Hot-module reload for the dev/demo loop (needs `node --expose-internals`).
|
|
- id: hmr
|
|
name: '@cordisjs/plugin-hmr'
|
|
config:
|
|
root: ['.']
|
|
|
|
# The DeepSeek adapter. Swap to '@deepseek-ai/dsh-llm-pi-ai' for the pi-ai-backed
|
|
# twin (same config shape; `reasoning: high` replaces thinking/reasoningEffort).
|
|
- id: llm-deepseek
|
|
name: '@deepseek-ai/dsh-llm-deepseek'
|
|
config:
|
|
apiKey: !!js process.env.DEEPSEEK_API_KEY
|
|
baseURL: !!js process.env.DEEPSEEK_BASE_URL
|
|
models:
|
|
- deepseek-v4-pro
|
|
- deepseek-v4-flash
|
|
|
|
# Local bash executor for agent-core's tool-bash schema (one of several tool
|
|
# stacks in this tree: filesystem, subagent, and todo_write load below).
|
|
- id: bash
|
|
name: '@deepseek-ai/dsh-bash-local'
|
|
config:
|
|
timeoutMs: 60000
|
|
|
|
# The stdio chat app: the whole spine + front-door cluster, configured for a
|
|
# REPL agent demo driving a pre-created `main` agent.
|
|
- id: stdio-agent
|
|
name: '@deepseek-ai/dsh-stdio-agent'
|
|
config:
|
|
model: deepseek-v4-flash
|
|
# Set RESUME_SESSION_ID to continue a prior persisted session (the ids live
|
|
# under ./.sessions); unset starts a fresh session each run.
|
|
resumeSessionId: !!js process.env.RESUME_SESSION_ID
|
|
persistenceRoot: './.sessions'
|
|
welcome: 'agent REPL ready. Give it a coding task.'
|
|
# The persona: identity + behavior only, nothing about transports or
|
|
# tooling — tool guidance lives with each tool plugin (descriptions +
|
|
# prompt sections). {{model}} is the prompt variable the agent loop
|
|
# resolves from this agent's configured model.
|
|
persona: |
|
|
You are coding-agent, a coding assistant powered by the {{model}} model.
|
|
|
|
Verify your work by running the code or tests. Keep answers brief and
|
|
factual.
|
|
|
|
# Automatic context compaction: when the derived history approaches the model's
|
|
# context window, summarize an older range into a checkpoint so a long-running
|
|
# or tool-heavy session keeps fitting. A leaf entry (needs ctx.llm + the
|
|
# agent-loop's `agent/pre-step` seam from the app above).
|
|
- id: compact-basic
|
|
name: '@deepseek-ai/dsh-compact-basic'
|
|
config:
|
|
contextWindow: 128000
|
|
thresholdRatio: 0.8
|
|
retainTokens: 20480
|
|
summarizationModel: ''
|
|
maxTokens: 8192
|
|
compactionRetries: 1
|
|
|
|
# The subagent seam + BOTH in-process backends + two model-facing tools, as leaf
|
|
# entries after the app (which provides ctx.agents/ctx.tools). spawn (a fresh
|
|
# child) and fork (a child seeded with the parent's completed-turn prefix) are
|
|
# independent backends over the shared dsh-subagent-inprocess driver. Exposing
|
|
# both transports is pure config: load each backend, then load dsh-tool-subagent
|
|
# once per backend with a distinct toolName (the tool registry rejects a
|
|
# duplicate name) — no code change.
|
|
- id: subagent
|
|
name: '@deepseek-ai/dsh-subagent'
|
|
|
|
- id: subagent-spawn
|
|
name: '@deepseek-ai/dsh-subagent-spawn'
|
|
config:
|
|
providerName: spawn
|
|
|
|
- id: subagent-fork
|
|
name: '@deepseek-ai/dsh-subagent-fork'
|
|
config:
|
|
providerName: fork
|
|
|
|
- id: tool-subagent
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: spawn
|
|
toolName: subagent
|
|
|
|
- id: tool-subagent-fork
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: fork
|
|
toolName: subagent_fork
|
|
|
|
# The model-facing todo_write tool: whole-list task tracking written to the
|
|
# session log (todo/write), rendered as a stdio checklist / ACP plan.
|
|
- id: tool-todo
|
|
name: '@deepseek-ai/dsh-tool-todo'
|
|
|
|
# Filesystem capability stack: local provider, read-before-write/edit policy
|
|
# gate, then the model-facing read/write/edit tools. stdio-agent is a single
|
|
# session, so relative paths resolve from the process cwd (the workspace).
|
|
- id: fs-local
|
|
name: '@deepseek-ai/dsh-fs-local'
|
|
config:
|
|
cwd: !!js process.cwd()
|
|
|
|
- id: fs-policy
|
|
name: '@deepseek-ai/dsh-fs-policy'
|
|
|
|
- id: tool-fs
|
|
name: '@deepseek-ai/dsh-tool-fs'
|
|
|
|
# Bash-backed discovery tools (glob/grep): fixed ripgrep commands through the
|
|
# local bash executor above — not ctx.fs. Capped results save the complete
|
|
# formatted list through the spill backend below (ctx.spillFiles, optional).
|
|
- id: tool-fs-search
|
|
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
|
|
# The tool-call timeout enforcer: arms each declared ToolDefinition.timeoutMs
|
|
# (the search tools above declare 30s) as a deadline on exec.signal. Without
|
|
# it a declared budget is advisory and only the bash executor's own timeout
|
|
# backstop applies.
|
|
- id: timeout-policy
|
|
name: '@deepseek-ai/dsh-timeout-policy'
|
|
|
|
# Tool-output spill stack: a local backend that saves oversized tool text under
|
|
# a private session-scoped dir, and the tools/post-execute policy that replaces
|
|
# an over-budget plain-text result with a preview + the spill path (the model
|
|
# reads the full result later). A leaf pair after the app (needs ctx.tools). The
|
|
# policy is a no-op until a tool returns more than maxInlineBytes of plain text.
|
|
- id: spill-local
|
|
name: '@deepseek-ai/dsh-spill-local'
|
|
|
|
- id: spill-policy
|
|
name: '@deepseek-ai/dsh-spill-policy'
|
|
config:
|
|
maxInlineBytes: 50000
|