The first real agent wiring: DeepSeek V4 + the bash tool suite + stdio chat + JSONL persistence, runnable via yarn demo:coding (reads the gitignored repo-root .env through process.loadEnvFile). - examples/coding-agent: cordis.yml wiring both real plugin families (llm-deepseek with !!js env secrets; bash-local + tool-bash), a bash-only coding system prompt, a max-steps-guard plugin (bounds runaway turns via the agent/turn-continuation waterfall — abort() from step-end is a no-op by then), and a stdio UI with dimmed reasoning and exit-on-idle for piped stdin. - e2e (yarn test:e2e, key-gated): full-loop.e2e.ts runs a real model against the real bash tool; coding-task.e2e.ts is the swebench-style smoke — the model fixes a buggy add.js in a temp dir and the test re-runs node add.test.js itself rather than trusting the agent. - docs/cookbook: adding-a-package (the verified checklist), adding-a-tool (execute() contract, background pattern, seams), adding-an-llm-adapter (protocol obligations, mock-server testing, e2e policy). AGENTS.md layout/commands/secrets sections updated; architecture.md points at both examples and the cookbook. - vitest.e2e.config.ts: serialize test files + retry twice — parallel e2e files trip the shared internal key's concurrency quota. - fix: the !js YAML tag spelling in docs/JSDoc is actually !!js (js-yaml resolves custom tags under tag:yaml.org,2002:js).
78 lines
2.2 KiB
YAML
78 lines
2.2 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'
|
|
|
|
# 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'
|