2026-07-15 15:57:57 +08:00
|
|
|
# REPL agent with swappable DeepSeek and local-bash backends. `dsh-stdio-demo`
|
2026-07-15 22:27:02 +08:00
|
|
|
# supplies the agent spine, workspace instructions, generic task controls,
|
|
|
|
|
# logging, JSONL persistence, readline UI, and `main` agent.
|
2026-07-13 23:27:00 +08:00
|
|
|
# HMR remains a leaf because it requires Loader internals; `demo:repl` passes
|
|
|
|
|
# `--expose-internals`. The app bin loads the gitignored root `.env`; this file
|
|
|
|
|
# reads `DEEPSEEK_API_KEY` and optional `DEEPSEEK_BASE_URL` through `!!js`.
|
2026-06-13 00:47:32 +08:00
|
|
|
|
2026-06-21 12:03:44 +08:00
|
|
|
# Hot-module reload for the dev/demo loop (needs `node --expose-internals`).
|
2026-06-13 00:47:32 +08:00
|
|
|
- id: hmr
|
|
|
|
|
name: '@cordisjs/plugin-hmr'
|
|
|
|
|
config:
|
|
|
|
|
root: ['.']
|
|
|
|
|
|
2026-06-21 12:03:44 +08:00
|
|
|
# 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'
|
2026-06-13 00:47:32 +08:00
|
|
|
config:
|
2026-06-21 12:03:44 +08:00
|
|
|
apiKey: !!js process.env.DEEPSEEK_API_KEY
|
|
|
|
|
baseURL: !!js process.env.DEEPSEEK_BASE_URL
|
|
|
|
|
models:
|
|
|
|
|
- deepseek-v4-pro
|
2026-06-26 17:23:18 +08:00
|
|
|
- deepseek-v4-flash
|
2026-06-21 12:03:44 +08:00
|
|
|
|
2026-07-13 23:27:00 +08:00
|
|
|
# Local executor for the app bundle's bash tool.
|
2026-06-21 12:03:44 +08:00
|
|
|
- id: bash
|
|
|
|
|
name: '@deepseek-ai/dsh-bash-local'
|
2026-06-15 21:05:46 +08:00
|
|
|
config:
|
2026-06-21 12:03:44 +08:00
|
|
|
timeoutMs: 60000
|
2026-06-13 00:47:32 +08:00
|
|
|
|
2026-07-13 23:27:00 +08:00
|
|
|
# The app bundle pre-creates the REPL's `main` agent.
|
2026-06-21 12:03:44 +08:00
|
|
|
- id: stdio-agent
|
2026-07-15 15:57:57 +08:00
|
|
|
name: '@deepseek-ai/dsh-stdio-demo'
|
2026-06-19 12:42:28 +08:00
|
|
|
config:
|
2026-06-21 12:03:44 +08:00
|
|
|
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'
|
2026-07-12 12:09:35 +08:00
|
|
|
workspaceContext:
|
|
|
|
|
maxBytes: 65536
|
2026-07-05 01:54:46 +08:00
|
|
|
welcome: 'agent REPL ready. Give it a coding task.'
|
2026-07-13 23:27:00 +08:00
|
|
|
# Keep the persona to identity and behavior; tool plugins own tool guidance.
|
|
|
|
|
# The loop resolves {{model}} from this agent's configuration.
|
2026-07-05 23:23:46 +08:00
|
|
|
persona: |
|
|
|
|
|
You are coding-agent, a coding assistant powered by the {{model}} model.
|
2026-06-21 12:03:44 +08:00
|
|
|
|
2026-07-05 01:54:46 +08:00
|
|
|
Verify your work by running the code or tests. Keep answers brief and
|
|
|
|
|
factual.
|
2026-06-29 10:30:52 +08:00
|
|
|
|
2026-07-13 23:27:00 +08:00
|
|
|
# Summarize an older range when derived history approaches the context window.
|
|
|
|
|
# This leaf consumes `ctx.llm` and the app's `agent/pre-step` seam.
|
2026-06-26 08:59:33 +08:00
|
|
|
- id: compact-basic
|
|
|
|
|
name: '@deepseek-ai/dsh-compact-basic'
|
|
|
|
|
config:
|
|
|
|
|
contextWindow: 128000
|
2026-07-01 22:10:49 +08:00
|
|
|
thresholdRatio: 0.8
|
2026-06-26 08:59:33 +08:00
|
|
|
retainTokens: 20480
|
2026-07-01 22:10:49 +08:00
|
|
|
summarizationModel: ''
|
|
|
|
|
maxTokens: 8192
|
|
|
|
|
compactionRetries: 1
|
2026-06-26 08:59:33 +08:00
|
|
|
|
2026-07-13 23:27:00 +08:00
|
|
|
# Expose fresh-child `spawn` and completed-prefix `fork` through independent
|
|
|
|
|
# in-process backends. Each tool instance needs a distinct `toolName`; the registry
|
|
|
|
|
# rejects duplicates. These leaves follow the app because it provides `ctx.agents` and `ctx.tools`.
|
2026-06-22 05:58:40 +08:00
|
|
|
- id: subagent
|
|
|
|
|
name: '@deepseek-ai/dsh-subagent'
|
|
|
|
|
|
|
|
|
|
- id: subagent-spawn
|
|
|
|
|
name: '@deepseek-ai/dsh-subagent-spawn'
|
|
|
|
|
config:
|
|
|
|
|
providerName: spawn
|
|
|
|
|
|
2026-06-22 14:27:38 +08:00
|
|
|
- id: subagent-fork
|
|
|
|
|
name: '@deepseek-ai/dsh-subagent-fork'
|
|
|
|
|
config:
|
|
|
|
|
providerName: fork
|
|
|
|
|
|
2026-06-22 05:58:40 +08:00
|
|
|
- id: tool-subagent
|
|
|
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
|
|
|
config:
|
|
|
|
|
provider: spawn
|
2026-06-22 14:27:38 +08:00
|
|
|
toolName: subagent
|
|
|
|
|
|
|
|
|
|
- id: tool-subagent-fork
|
|
|
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
|
|
|
config:
|
|
|
|
|
provider: fork
|
|
|
|
|
toolName: subagent_fork
|
2026-06-29 10:30:52 +08:00
|
|
|
|
2026-07-05 13:29:35 +08:00
|
|
|
|
2026-07-13 23:27:00 +08:00
|
|
|
# The worker-thread workflow engine fans a model-written JavaScript script's
|
|
|
|
|
# `agent()` calls out through the spawn backend; the adjacent tool exposes it to the model.
|
2026-07-09 19:06:55 +08:00
|
|
|
- id: workflow-workerthread
|
|
|
|
|
name: '@deepseek-ai/dsh-workflow-workerthread'
|
2026-07-05 13:29:35 +08:00
|
|
|
config:
|
|
|
|
|
provider: spawn
|
|
|
|
|
|
|
|
|
|
- id: tool-workflow
|
|
|
|
|
name: '@deepseek-ai/dsh-tool-workflow'
|
2026-07-13 23:27:00 +08:00
|
|
|
# `todo_write` replaces the logged whole list and renders as a stdio checklist or ACP plan.
|
2026-06-29 10:30:52 +08:00
|
|
|
- id: tool-todo
|
|
|
|
|
name: '@deepseek-ai/dsh-tool-todo'
|
2026-07-02 19:46:59 +08:00
|
|
|
|
2026-07-13 23:27:00 +08:00
|
|
|
# Policy loads before the model-facing filesystem tools so writes and edits require
|
|
|
|
|
# an observed file. This single-session app resolves relative paths from the process cwd.
|
2026-07-02 19:46:59 +08:00
|
|
|
- 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'
|
2026-07-08 19:20:50 +08:00
|
|
|
|
2026-07-09 20:44:32 +08:00
|
|
|
# Bash-backed discovery tools (glob/grep): fixed ripgrep commands through the
|
|
|
|
|
# local bash executor above — not ctx.fs. Capped results save the complete
|
2026-07-13 11:07:27 +08:00
|
|
|
# formatted list through the spill backend below (ctx.spillStore, optional).
|
2026-07-09 20:44:32 +08:00
|
|
|
- id: tool-fs-search
|
|
|
|
|
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
|
|
|
|
2026-07-09 21:12:41 +08:00
|
|
|
# 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'
|
|
|
|
|
|
2026-07-08 19:20:50 +08:00
|
|
|
# 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
|
2026-07-13 11:07:27 +08:00
|
|
|
# an over-budget plain-text result with a preview + the spill locator/retrieval
|
|
|
|
|
# hint. 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.
|
2026-07-08 19:20:50 +08:00
|
|
|
- id: spill-local
|
|
|
|
|
name: '@deepseek-ai/dsh-spill-local'
|
|
|
|
|
|
|
|
|
|
- id: spill-policy
|
|
|
|
|
name: '@deepseek-ai/dsh-spill-policy'
|
|
|
|
|
config:
|
|
|
|
|
maxInlineBytes: 50000
|