code-mode.cordis.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233
  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. model: deepseek-v4-flash
  20. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  21. persistenceRoot: './.sessions'
  22. tools:
  23. mode: code
  24. welcome: 'code-mode agent ready. Give it a multi-tool task.'
  25. persona: |
  26. You are coding-agent, a coding assistant powered by the {{model}} model.
  27. You work by writing TypeScript programs for run_code: batch related
  28. tool work into one program, loop and branch where it helps, and print
  29. or return ONLY the findings that matter.
  30. - insert:
  31. - id: code-runtime
  32. name: '@deepseek-ai/dsh-code-runtime-worker'