New @deepseek-ai/dsh-invariants plugin (pure listeners, off in prod) asserts the event taxonomy at runtime — seq monotonicity, turn/step nesting, a tool/result needs a prior tool/call (NOT the converse), legal agent/status transitions — and deep-freezes logged event data so mutating history throws. Seeded sessions are checked + frozen on session/created. The real RFC 008 fix is always-on: deriveMessages now structured-clones the content it emits, so the loop's sanctioned request/adapter mutation can no longer reach back and rewrite the append-only log. The pervasive DeepReadonly<T> type flip is rejected (compile-only, high-noise, castable) — recorded in ADR 0012, which folds in RFC 008. Wired into both demos.
82 lines
2.3 KiB
YAML
82 lines
2.3 KiB
YAML
# The coding-agent plugin tree, loaded via @cordisjs/plugin-include.
|
|
# Core services first, then the real adapters/tools, then the agent itself.
|
|
#
|
|
# Requires DEEPSEEK_API_KEY (and optionally DEEPSEEK_BASE_URL) in the
|
|
# environment — start.ts loads the gitignored repo-root .env first.
|
|
|
|
- id: logger
|
|
name: '@cordisjs/plugin-logger-console'
|
|
|
|
- id: timer
|
|
name: '@cordisjs/plugin-timer'
|
|
|
|
- id: hmr
|
|
name: '@cordisjs/plugin-hmr'
|
|
config:
|
|
root: ['.']
|
|
|
|
- id: llm
|
|
name: '@deepseek-ai/dsh-llm'
|
|
|
|
- id: sessions
|
|
name: '@deepseek-ai/dsh-session'
|
|
|
|
- id: system-prompt
|
|
name: '@deepseek-ai/dsh-system-prompt'
|
|
|
|
- id: tools
|
|
name: '@deepseek-ai/dsh-tools'
|
|
|
|
- id: agents
|
|
name: '@deepseek-ai/dsh-agent'
|
|
|
|
# Dev-mode event-contract assertions + session-log freeze (off in prod).
|
|
- id: invariants
|
|
name: '@deepseek-ai/dsh-invariants'
|
|
|
|
# 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
|
|
|
|
# Bash execution: the local executor implementation + the tool schemas.
|
|
- id: bash
|
|
name: '@deepseek-ai/dsh-bash-local'
|
|
config:
|
|
timeoutMs: 60000
|
|
|
|
- id: tool-bash
|
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
|
|
- id: agent-loop
|
|
name: '@deepseek-ai/dsh-agent-loop'
|
|
config:
|
|
agents:
|
|
- id: main
|
|
model: deepseek-v4-flash
|
|
systemPrompt: |
|
|
You are coding-agent, a CLI coding assistant.
|
|
|
|
Your only tools are bash (plus bash_output/bash_kill for background
|
|
tasks). Do ALL file operations through bash: read with cat/sed/head,
|
|
search with grep, write with heredocs (cat <<'EOF' > file), edit
|
|
with sed or a rewrite. Each bash call runs in a fresh shell — pass
|
|
workdir instead of cd, and never rely on shell state between calls.
|
|
|
|
Check the [exit code: N] marker on every command; investigate
|
|
failures before moving on. Verify your work by running the code or
|
|
tests. Keep answers brief and factual.
|
|
|
|
- id: session-jsonl
|
|
name: './src/session-jsonl.ts'
|
|
|
|
- id: stdio-chat
|
|
name: './src/stdio-chat.ts'
|