code-mode.cordis.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Code Mode overlay: the live coding-agent tree (./cordis.yml) with two
  2. # load-time patches — the app entry's config gains `tools: { mode: code }`
  3. # (the registry offers exactly one wire tool, run_code, plus the generated
  4. # TypeScript SDK prompt section declaring bash/read/write/edit/subagent/
  5. # todo_write) and the worker-thread code runtime joins the tree as
  6. # `ctx.codeRuntime`. The dsh-stdio-agent bin boots this file for
  7. # `pnpm run demo:code-mode` (the acp-agent example carries the same-shaped
  8. # overlay for the `acp` UI). A config patch REPLACES the entry's whole
  9. # config, so the base entry's fields are restated verbatim; only `tools`,
  10. # the welcome, and the persona's second paragraph are Code Mode deltas.
  11. - id: base
  12. name: '@cordisjs/plugin-include'
  13. config:
  14. path: ./cordis.yml
  15. patches:
  16. - id: stdio-agent
  17. name: '@deepseek-ai/dsh-stdio-agent'
  18. config:
  19. provider: deepseek
  20. model: deepseek-v4-flash
  21. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  22. persistenceRoot: './.sessions'
  23. tools:
  24. mode: code
  25. welcome: 'code-mode agent ready. Give it a multi-tool task.'
  26. persona: |
  27. You are coding-agent, a coding assistant powered by the {{model}} model.
  28. You work by writing TypeScript programs for run_code: batch related
  29. tool work into one program, loop and branch where it helps, and print
  30. or return ONLY the findings that matter.
  31. - insert:
  32. - id: code-runtime
  33. name: '@deepseek-ai/dsh-code-runtime-worker'