cordis.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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, subagent, and todo_write).'
  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. For multi-step work, use the todo_write tool to track a task list:
  61. send the WHOLE list each call (it replaces the previous one), keep
  62. exactly one task in_progress, and mark a task completed as soon as it
  63. is done. Skip it for trivial single-step tasks.
  64. # The subagent seam + BOTH in-process backends + two model-facing tools, as leaf
  65. # entries after the app (which provides ctx.agents/ctx.tools). spawn (a fresh
  66. # child) and fork (a child seeded with the parent's completed-turn prefix) are
  67. # independent backends over the shared dsh-subagent-inprocess driver. Exposing
  68. # both transports is pure config: load each backend, then load dsh-tool-subagent
  69. # once per backend with a distinct toolName (the tool registry rejects a
  70. # duplicate name) — no code change.
  71. - id: subagent
  72. name: '@deepseek-ai/dsh-subagent'
  73. - id: subagent-spawn
  74. name: '@deepseek-ai/dsh-subagent-spawn'
  75. config:
  76. providerName: spawn
  77. - id: subagent-fork
  78. name: '@deepseek-ai/dsh-subagent-fork'
  79. config:
  80. providerName: fork
  81. - id: tool-subagent
  82. name: '@deepseek-ai/dsh-tool-subagent'
  83. config:
  84. provider: spawn
  85. toolName: subagent
  86. - id: tool-subagent-fork
  87. name: '@deepseek-ai/dsh-tool-subagent'
  88. config:
  89. provider: fork
  90. toolName: subagent_fork
  91. # The model-facing todo_write tool: whole-list task tracking written to the
  92. # session log (todo/write), rendered as a stdio checklist / ACP plan.
  93. - id: tool-todo
  94. name: '@deepseek-ai/dsh-tool-todo'