Two consequences of moving the agent plane behind presets, both invisible until the host plane stopped carrying model-facing rows. `sessions.fork` built its child with a bare `installTarget` and a `meta` without `agentPreset`. That was harmless while every tool sat in the host plane — the child inherited them for free. It now comes up with an EMPTY tool set. The child composes the parent's preset instead, for the same reason a resumed session keeps its own: the seeded history was produced under those tools. `bashEnv` lives in its own `dsh-bash-env` row rather than inside `tool-bash`, so a preset that isolates the realm must compose the provider beside its consumer; the host row is disabled here like every other model-facing one. Nothing outside the agent plane injects `bashEnv`, so it stays per-session.
247 lines
10 KiB
YAML
247 lines
10 KiB
YAML
# The `standard` agent preset: the full coding agent, mounted per session.
|
|
#
|
|
# This file is an AGENT-PLANE composition. It is mounted under one agent's
|
|
# scope context, so every tool and prompt section it registers belongs to that
|
|
# session alone. The host composition (`base.cordis.yml` + `web.cordis.yml`)
|
|
# keeps everything a preset must not own: the registries themselves, the
|
|
# sandbox and approval stack, persistence, and the model route.
|
|
#
|
|
# A service row here MUST sit inside a group carrying an `isolate` realm.
|
|
# Without one it publishes into the root realm, where it is process-global
|
|
# rather than per-session and the second session mounting this preset collides
|
|
# with the first; `dsh-agent-presets` rejects that at mount. `true` means an
|
|
# entry-local realm — one private instance per mounted session, which is the
|
|
# default this deployment wants. A shared label would instead pool one instance
|
|
# across every session naming it.
|
|
|
|
# ── identity ────────────────────────────────────────────────────────────────
|
|
|
|
# The preset's own persona, shadowing the deployment default for this agent.
|
|
# `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
|
|
- id: persona
|
|
name: '@deepseek-ai/dsh-persona'
|
|
config:
|
|
text: >-
|
|
You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
|
|
|
|
- id: workspace-context
|
|
name: '@deepseek-ai/dsh-workspace-context'
|
|
config:
|
|
maxBytes: 65536
|
|
|
|
# ── shell ───────────────────────────────────────────────────────────────────
|
|
|
|
# `tool-bash` reads as a tool but provides the `bashEnv` service, so it needs a
|
|
# realm like any other provider. The executor behind it (`bash-sandbox`) stays
|
|
# in the host composition, where the sandbox policy owns it.
|
|
- id: shell
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
bashEnv: true
|
|
config:
|
|
# The registry and its consumer share the realm: a consumer left outside
|
|
# would resolve the host's `bashEnv`, which this plane no longer provides.
|
|
- id: bash-env
|
|
name: '@deepseek-ai/dsh-bash-env'
|
|
|
|
- id: tool-bash
|
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
|
|
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
|
|
# All three register into the host `tools` registry and provide nothing, so
|
|
# they need no realm. The `fs` service and its policy stay in the host.
|
|
- id: tool-fs
|
|
name: '@deepseek-ai/dsh-tool-fs'
|
|
|
|
- id: tool-fs-search
|
|
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
config:
|
|
sampleOverCapGlobResults: false
|
|
|
|
- id: tool-str-replace-editor
|
|
name: '@deepseek-ai/dsh-tool-str-replace-editor'
|
|
config:
|
|
maxOutputChars: 16000
|
|
|
|
# ── background tasks ────────────────────────────────────────────────────────
|
|
|
|
- id: tasks
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
tasks: true
|
|
config:
|
|
- id: tasks-local
|
|
name: '@deepseek-ai/dsh-tasks-local'
|
|
|
|
- id: tool-tasks
|
|
name: '@deepseek-ai/dsh-tool-tasks'
|
|
|
|
# ── skills ──────────────────────────────────────────────────────────────────
|
|
|
|
- id: skills
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
skills: true
|
|
config:
|
|
- id: skill
|
|
name: '@deepseek-ai/dsh-skill'
|
|
|
|
- id: skill-local
|
|
name: '@deepseek-ai/dsh-skill-local'
|
|
|
|
- id: tool-skill
|
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
|
|
# ── goals ───────────────────────────────────────────────────────────────────
|
|
|
|
- id: goals
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
goals: true
|
|
config:
|
|
- id: goal
|
|
name: '@deepseek-ai/dsh-goal'
|
|
|
|
- id: goal-session
|
|
name: '@deepseek-ai/dsh-goal-session'
|
|
|
|
- id: command-goal
|
|
name: '@deepseek-ai/dsh-command-goal'
|
|
|
|
- id: tool-goal
|
|
name: '@deepseek-ai/dsh-tool-goal'
|
|
|
|
# ── plan mode ───────────────────────────────────────────────────────────────
|
|
|
|
# Plan state is per-agent by nature, so an entry-local realm is not a
|
|
# workaround here — it is the correct lifetime.
|
|
- id: planning
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
planMode: true
|
|
config:
|
|
- id: plan-mode
|
|
name: '@deepseek-ai/dsh-plan-mode'
|
|
config:
|
|
section: |
|
|
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
|
|
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
|
|
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed only to keep the request shape stable. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
|
|
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
|
|
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
|
|
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
|
|
# ── compaction ──────────────────────────────────────────────────────────────
|
|
|
|
# `compact-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
|
|
# share this realm rather than sit outside it.
|
|
- id: compaction
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
tokenMeter: true
|
|
compact: true
|
|
toolResultPrune: true
|
|
config:
|
|
- id: token-meter
|
|
name: '@deepseek-ai/dsh-token-meter'
|
|
|
|
- id: compact-basic
|
|
name: '@deepseek-ai/dsh-compact-basic'
|
|
|
|
- id: command-compact
|
|
name: '@deepseek-ai/dsh-command-compact'
|
|
|
|
- id: tool-result-prune
|
|
name: '@deepseek-ai/dsh-compact-tool-result-prune'
|
|
config:
|
|
thresholdChars: 8192
|
|
headChars: 4096
|
|
tailChars: 1024
|
|
|
|
# ── delegation and workflows ────────────────────────────────────────────────
|
|
|
|
# Every backend and every tool that reaches `subagents` or `workflows` shares
|
|
# one realm: a consumer left outside it would resolve the host's registry
|
|
# instead, which this preset does not populate.
|
|
- id: delegation
|
|
name: cordis:group
|
|
group: true
|
|
isolate:
|
|
subagents: true
|
|
workflows: true
|
|
config:
|
|
- 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-control
|
|
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
|
|
- id: tool-subagent-list-agents
|
|
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
|
|
- id: tool-subagent
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: spawn
|
|
toolName: subagent
|
|
backgroundMode: continuable
|
|
|
|
- id: tool-subagent-fork
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: fork
|
|
toolName: subagent_fork
|
|
backgroundMode: continuable
|
|
|
|
- id: tool-subagent-report
|
|
name: '@deepseek-ai/dsh-tool-subagent-report'
|
|
|
|
- id: workflow-workerthread
|
|
name: '@deepseek-ai/dsh-workflow-workerthread'
|
|
config:
|
|
provider: spawn
|
|
|
|
- id: tool-workflow
|
|
name: '@deepseek-ai/dsh-tool-workflow'
|
|
|
|
- id: tool-ralph
|
|
name: '@deepseek-ai/dsh-tool-ralph'
|
|
config:
|
|
subagentProvider: spawn
|
|
maxRounds: 64
|
|
|
|
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
|
|
- id: tool-todo
|
|
name: '@deepseek-ai/dsh-tool-todo'
|
|
|
|
# The `web` service and its search provider stay in the host composition; only
|
|
# the model-facing tool is per-session.
|
|
- id: tool-web
|
|
name: '@deepseek-ai/dsh-tool-web'
|
|
config:
|
|
fetch: false
|
|
searchTimeoutMs: 60000
|