Files
deepseek-harness/examples/base.yml
T
Tianyi Cui 679aaacfc4 refactor(examples): DRY the acp-agent configs via base-core.yml + acp-tail.yml
The snapshot replay config duplicated most of base.yml + the acp tail just to
swap llm-deepseek → llm-replay. Factor the shared pieces:

- examples/base-core.yml: the providerless provider/tool core (llm, sessions,
  system-prompt, tools, agents, invariants, bash-local, tool-bash). base.yml is
  now base-core + the llm-deepseek adapter; the snapshot replay config is
  base-core + llm-replay. The replay config no longer hand-copies the core.
- examples/acp-agent/acp-tail.yml: agent-loop (no pre-created agents) +
  persistence + the ACP bridge/system-prompt, shared by cordis.yml and the
  replay config so the three acp-agent configs can't drift. Its persistence root
  is `$DSH_SNAPSHOT_SESSIONS_ROOT ?? ./.sessions`.
- Deleted cordis.snapshot-record.yml: recording now reuses the normal cordis.yml
  (real adapter), with the harness redirecting the persistence root via env.
  start.ts maps DSH_SNAPSHOT=record → cordis.yml.

Verified: snapshot replay 8/8 keyless; record path works through cordis.yml;
ACP e2e no-key boot green through the doubly-nested include (cordis.yml →
base.yml → base-core.yml); coding-agent boots clean; all gates pass.
2026-06-19 09:41:10 +08:00

38 lines
1.7 KiB
YAML

# Shared provider/tool core for the example agents, loaded via a nested
# @cordisjs/plugin-include from each example's cordis.yml. This is
# base-core.yml (the providerless core: llm, sessions, system-prompt, tools,
# agents, invariants, bash-local, tool-bash) PLUS the real llm-deepseek adapter.
#
# The providerless core lives in base-core.yml so the keyless snapshot-replay
# config (acp-agent/cordis.snapshot.yml) can reuse it with llm-replay in place
# of the adapter — it can't reuse THIS file, because llm-deepseek's apply()
# throws without DEEPSEEK_API_KEY.
#
# Deliberately EXCLUDES:
# - the console logger: it writes to stdout, which the acp-agent reserves for
# the JSON-RPC protocol (see packages/acp). Each example loads logging itself.
# - agent-loop: AgentLoop pre-creates its configured `agents` in its
# constructor, and the examples disagree — coding-agent needs a pre-created
# `main` (its stdio-chat calls ctx.agents.get('main')), while acp-agent must
# pre-create NONE (ACP session/new creates agents on demand). So each example
# declares agent-loop with its own `agents` list.
#
# Requires DEEPSEEK_API_KEY (and optionally DEEPSEEK_BASE_URL) in the env.
# The providerless core (resolved relative to THIS file's directory).
- id: base-core
name: '@cordisjs/plugin-include'
config:
path: './base-core.yml'
# 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-flash
- deepseek-v4-pro