2026-07-13 23:27:00 +08:00
|
|
|
# REPL agent with swappable DeepSeek and local-bash backends. `dsh-stdio-agent`
|
|
|
|
|
# supplies the agent-core spine, logging, JSONL persistence, readline UI, and `main` agent.
|
|
|
|
|
# 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
|
|
|
|
|
name: '@deepseek-ai/dsh-stdio-agent'
|
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-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'
|