cordis.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # The coding-agent plugin tree: the REPL agent demo. 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, tasks + the task_* control tools, invariants,
  6. # tool-bash, agent-loop), the console
  7. # logger, JSONL persistence, the readline UI, and a pre-created `main` agent.
  8. #
  9. # `hmr` is a leaf entry (not baked into dsh-stdio-agent): it is a Loader-only
  10. # dev plugin that needs `--expose-internals` — the `demo:repl` script passes
  11. # it. Requires DEEPSEEK_API_KEY (and optionally DEEPSEEK_BASE_URL) in the
  12. # environment — the dsh-stdio-agent bin loads the gitignored repo-root .env
  13. # first. cordis.yml reads them via the `!!js` tag.
  14. # Hot-module reload for the dev/demo loop (needs `node --expose-internals`).
  15. - id: hmr
  16. name: '@cordisjs/plugin-hmr'
  17. config:
  18. root: ['.']
  19. # The DeepSeek adapter. Swap to '@deepseek-ai/dsh-llm-pi-ai' for the pi-ai-backed
  20. # twin (same config shape; `reasoning: high` replaces thinking/reasoningEffort).
  21. - id: llm-deepseek
  22. name: '@deepseek-ai/dsh-llm-deepseek'
  23. config:
  24. apiKey: !!js process.env.DEEPSEEK_API_KEY
  25. baseURL: !!js process.env.DEEPSEEK_BASE_URL
  26. models:
  27. - deepseek-v4-pro
  28. - deepseek-v4-flash
  29. # Local bash executor for agent-core's tool-bash schema (one of several tool
  30. # stacks in this tree: filesystem, subagent, and todo_write load below).
  31. - id: bash
  32. name: '@deepseek-ai/dsh-bash-local'
  33. config:
  34. timeoutMs: 60000
  35. # The stdio chat app: the whole spine + front-door cluster, configured for a
  36. # REPL agent demo driving a pre-created `main` agent.
  37. - id: stdio-agent
  38. name: '@deepseek-ai/dsh-stdio-agent'
  39. config:
  40. model: deepseek-v4-flash
  41. # Set RESUME_SESSION_ID to continue a prior persisted session (the ids live
  42. # under ./.sessions); unset starts a fresh session each run.
  43. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  44. persistenceRoot: './.sessions'
  45. welcome: 'agent REPL ready. Give it a coding task.'
  46. # The persona: identity + behavior only, nothing about transports or
  47. # tooling — tool guidance lives with each tool plugin (descriptions +
  48. # prompt sections). {{model}} is the prompt variable the agent loop
  49. # resolves from this agent's configured model.
  50. persona: |
  51. You are coding-agent, a coding assistant powered by the {{model}} model.
  52. Verify your work by running the code or tests. Keep answers brief and
  53. factual.
  54. # Automatic context compaction: when the derived history approaches the model's
  55. # context window, summarize an older range into a checkpoint so a long-running
  56. # or tool-heavy session keeps fitting. A leaf entry (needs ctx.llm + the
  57. # agent-loop's `agent/pre-step` seam from the app above).
  58. - id: compact-basic
  59. name: '@deepseek-ai/dsh-compact-basic'
  60. config:
  61. contextWindow: 128000
  62. thresholdRatio: 0.8
  63. retainTokens: 20480
  64. summarizationModel: ''
  65. maxTokens: 8192
  66. compactionRetries: 1
  67. # The subagent seam + BOTH in-process backends + two model-facing tools, as leaf
  68. # entries after the app (which provides ctx.agents/ctx.tools). spawn (a fresh
  69. # child) and fork (a child seeded with the parent's completed-turn prefix) are
  70. # independent backends over the shared dsh-subagent-inprocess driver. Exposing
  71. # both transports is pure config: load each backend, then load dsh-tool-subagent
  72. # once per backend with a distinct toolName (the tool registry rejects a
  73. # duplicate name) — no code change.
  74. - id: subagent
  75. name: '@deepseek-ai/dsh-subagent'
  76. - id: subagent-spawn
  77. name: '@deepseek-ai/dsh-subagent-spawn'
  78. config:
  79. providerName: spawn
  80. - id: subagent-fork
  81. name: '@deepseek-ai/dsh-subagent-fork'
  82. config:
  83. providerName: fork
  84. - id: tool-subagent
  85. name: '@deepseek-ai/dsh-tool-subagent'
  86. config:
  87. provider: spawn
  88. toolName: subagent
  89. - id: tool-subagent-fork
  90. name: '@deepseek-ai/dsh-tool-subagent'
  91. config:
  92. provider: fork
  93. toolName: subagent_fork
  94. # The model-facing todo_write tool: whole-list task tracking written to the
  95. # session log (todo/write), rendered as a stdio checklist / ACP plan.
  96. - id: tool-todo
  97. name: '@deepseek-ai/dsh-tool-todo'
  98. # Filesystem capability stack: local provider, read-before-write/edit policy
  99. # gate, then the model-facing read/write/edit tools. stdio-agent is a single
  100. # session, so relative paths resolve from the process cwd (the workspace).
  101. - id: fs-local
  102. name: '@deepseek-ai/dsh-fs-local'
  103. config:
  104. cwd: !!js process.cwd()
  105. - id: fs-policy
  106. name: '@deepseek-ai/dsh-fs-policy'
  107. - id: tool-fs
  108. name: '@deepseek-ai/dsh-tool-fs'