cordis.yml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # The coding-agent plugin tree: the real coding agent. The two swappable
  2. # backends — the DeepSeek adapter and the local bash executor — plus `hmr` for
  3. # the dev/demo reload loop, then the stdio chat app (@deepseek-ai/dsh-stdio-
  4. # agent), which bundles the whole agent-core spine (timer, llm, sessions,
  5. # system-prompt, tools, agents, invariants, tool-bash, agent-loop), the console
  6. # logger, JSONL persistence, the readline UI, and a pre-created `main` agent.
  7. #
  8. # `hmr` is a leaf entry (not baked into dsh-stdio-agent): it is a Loader-only
  9. # dev plugin that needs `--expose-internals` — the `demo:coding` script passes
  10. # it. Requires DEEPSEEK_API_KEY (and optionally DEEPSEEK_BASE_URL) in the
  11. # environment — the dsh-stdio-agent bin loads the gitignored repo-root .env
  12. # first. cordis.yml reads them via the `!!js` tag.
  13. # Hot-module reload for the dev/demo loop (needs `node --expose-internals`).
  14. - id: hmr
  15. name: '@cordisjs/plugin-hmr'
  16. config:
  17. root: ['.']
  18. # The DeepSeek adapter. Swap to '@deepseek-ai/dsh-llm-pi-ai' for the pi-ai-backed
  19. # twin (same config shape; `reasoning: high` replaces thinking/reasoningEffort).
  20. - id: llm-deepseek
  21. name: '@deepseek-ai/dsh-llm-deepseek'
  22. config:
  23. apiKey: !!js process.env.DEEPSEEK_API_KEY
  24. baseURL: !!js process.env.DEEPSEEK_BASE_URL
  25. models:
  26. - deepseek-v4-flash
  27. - deepseek-v4-pro
  28. # Local bash executor (the model's only tool, via agent-core's tool-bash schema).
  29. - id: bash
  30. name: '@deepseek-ai/dsh-bash-local'
  31. config:
  32. timeoutMs: 60000
  33. # The stdio chat app: the whole spine + front-door cluster, configured for a
  34. # real coding agent driving a pre-created `main` agent.
  35. - id: stdio-agent
  36. name: '@deepseek-ai/dsh-stdio-agent'
  37. config:
  38. model: deepseek-v4-flash
  39. # Set RESUME_SESSION_ID to continue a prior persisted session (the ids live
  40. # under ./.sessions); unset starts a fresh session each run.
  41. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  42. persistenceRoot: './.sessions'
  43. welcome: 'coding-agent ready. Give it a coding task (its tools are bash and subagent).'
  44. systemPrompt: |
  45. You are coding-agent, a CLI coding assistant.
  46. Your tools are bash (plus bash_output/bash_kill for background
  47. tasks) and subagent. Do ALL file operations through bash: read with
  48. cat/sed/head, search with grep, write with heredocs (cat <<'EOF' >
  49. file), edit with sed or a rewrite. Each bash call runs in a fresh
  50. shell — pass workdir instead of cd, and never rely on shell state
  51. between calls.
  52. Use the subagent tool to delegate a focused, self-contained subtask
  53. to a fresh child agent (it works in its own context and returns only
  54. its final result) — give it a complete, standalone instruction. Use
  55. subagent_fork instead when the subtask needs THIS conversation's
  56. context: the child inherits the log so far.
  57. Check the [exit code: N] marker on every command; investigate
  58. failures before moving on. Verify your work by running the code or
  59. tests. Keep answers brief and factual.
  60. # The subagent seam + BOTH in-process backends + two model-facing tools, as leaf
  61. # entries after the app (which provides ctx.agents/ctx.tools). spawn (a fresh
  62. # child) and fork (a child seeded with the parent's completed-turn prefix) are
  63. # independent backends over the shared dsh-subagent-inprocess driver. Exposing
  64. # both transports is pure config: load each backend, then load dsh-tool-subagent
  65. # once per backend with a distinct toolName (the tool registry rejects a
  66. # duplicate name) — no code change.
  67. - id: subagent
  68. name: '@deepseek-ai/dsh-subagent'
  69. - id: subagent-spawn
  70. name: '@deepseek-ai/dsh-subagent-spawn'
  71. config:
  72. providerName: spawn
  73. - id: subagent-fork
  74. name: '@deepseek-ai/dsh-subagent-fork'
  75. config:
  76. providerName: fork
  77. - id: tool-subagent
  78. name: '@deepseek-ai/dsh-tool-subagent'
  79. config:
  80. provider: spawn
  81. toolName: subagent
  82. - id: tool-subagent-fork
  83. name: '@deepseek-ai/dsh-tool-subagent'
  84. config:
  85. provider: fork
  86. toolName: subagent_fork