Moving the agent plane behind presets left two readers on the wrong side of the host/agent line. `dsh-token-meter` was disabled on the host and mounted inside each preset's `compaction` realm, but its three projection units register into the process-wide `sessionProjections` table. A unit registered from one preset answers for every session, so whether a `minimal` session showed a context meter depended on whether some other session had mounted `standard` since boot, and a process that only ever ran `minimal` showed none. The meter takes no configuration, keys every fold by Session, and registers no tool or prompt section, so it returns to the host composition and leaves the presets' `isolate` map; the realm and `compact-basic` stay, because what a preset chooses is whether its agent compacts, not whether its tokens are counted. Nothing named an agent that joined no preset. The join is a scope-parent link, and without it the tools, prompt-section, and skill views resolve the empty global layer: the agent publishes, the turn runs, and the model receives nothing. `AgentPresets` now logs one warning per such agent while a roster is configured, and the invariant companion fails outright — at `system-prompt/assemble` rather than at publication, because an unjoined agent is legal until it addresses a model and `recompose` binds exactly such an agent. The warning stays advisory: a synchronous `agent/created` throw vetoes publication, and the ACP bridge, SDK server, and headless bundle all create an unjoined agent today. Three limits are recorded rather than fixed: projection key presence is not a per-session capability signal, a superseded standing generation is never reclaimed, and a `cordis_mount` temporary plugin belongs to the composition rather than the session that mounted it. Fixes #2203
42 lines
1.9 KiB
YAML
42 lines
1.9 KiB
YAML
# The `minimal` agent preset: the two-tool benchmark surface.
|
|
#
|
|
# The native model surface is exactly persistent `bash` plus
|
|
# `str_replace_editor`. Everything else a session could reach — skills, goals,
|
|
# plan mode, delegation, workflows, todo, web — is simply absent rather than
|
|
# disabled, because a preset composes what an agent has instead of subtracting
|
|
# from a shared default.
|
|
#
|
|
# The host composition is unchanged: this agent still runs inside the same
|
|
# sandbox, approval, persistence, and model routing as any other session — and
|
|
# the same token meter, so the browser's context meter reads this session like
|
|
# any other. What this preset drops is auto-compaction, not the accounting.
|
|
|
|
- id: persona
|
|
name: '@deepseek-ai/dsh-persona'
|
|
config:
|
|
text: >-
|
|
You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
|
|
|
|
# `bash-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
|
|
# publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
|
|
# the criterion for host-plane ownership — injection resolves before any session
|
|
# exists, so there is no agent to key by. Behind a preset realm those variables
|
|
# never reached the model's shell at all. `tool-bash` consumes the host registry
|
|
# from here; the executor behind it (`bash-sandbox`) is host-plane too, where the
|
|
# sandbox policy owns it.
|
|
#
|
|
# `run_in_background` is off because this preset mounts no `tool-tasks`. The
|
|
# host registry already refuses a start for an owner no attached control
|
|
# surface serves, so this is not the safety boundary — it is the model-facing
|
|
# one: an agent that could never collect a task should not be offered the
|
|
# parameter at all, and disabling it drops the parameter from the schema.
|
|
- id: tool-bash
|
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
config:
|
|
enableRunInBackground: false
|
|
|
|
- id: tool-str-replace-editor
|
|
name: '@deepseek-ai/dsh-tool-str-replace-editor'
|
|
config:
|
|
maxOutputChars: 16000
|