cordis.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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, 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:repl` 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-pro
  27. - deepseek-v4-flash
  28. # Local bash executor for agent-core's tool-bash schema (one of several tool
  29. # stacks in this tree: filesystem, subagent, and todo_write load below).
  30. - id: bash
  31. name: '@deepseek-ai/dsh-bash-local'
  32. config:
  33. timeoutMs: 60000
  34. # The stdio chat app: the whole spine + front-door cluster, configured for a
  35. # REPL agent demo driving a pre-created `main` agent.
  36. - id: stdio-agent
  37. name: '@deepseek-ai/dsh-stdio-agent'
  38. config:
  39. model: deepseek-v4-flash
  40. # Set RESUME_SESSION_ID to continue a prior persisted session (the ids live
  41. # under ./.sessions); unset starts a fresh session each run.
  42. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  43. persistenceRoot: './.sessions'
  44. workspaceContext:
  45. maxBytes: 65536
  46. welcome: 'agent REPL ready. Give it a coding task.'
  47. # The persona: identity + behavior only, nothing about transports or
  48. # tooling — tool guidance lives with each tool plugin (descriptions +
  49. # prompt sections). {{model}} is the prompt variable the agent loop
  50. # resolves from this agent's configured model.
  51. persona: |
  52. You are coding-agent, a coding assistant powered by the {{model}} model.
  53. Verify your work by running the code or tests. Keep answers brief and
  54. factual.
  55. # Automatic context compaction: when the derived history approaches the model's
  56. # context window, summarize an older range into a checkpoint so a long-running
  57. # or tool-heavy session keeps fitting. A leaf entry (needs ctx.llm + the
  58. # agent-loop's `agent/pre-step` seam from the app above).
  59. - id: compact-basic
  60. name: '@deepseek-ai/dsh-compact-basic'
  61. config:
  62. contextWindow: 128000
  63. thresholdRatio: 0.8
  64. retainTokens: 20480
  65. summarizationModel: ''
  66. maxTokens: 8192
  67. compactionRetries: 1
  68. # The subagent seam + BOTH in-process backends + two model-facing tools, as leaf
  69. # entries after the app (which provides ctx.agents/ctx.tools). spawn (a fresh
  70. # child) and fork (a child seeded with the parent's completed-turn prefix) are
  71. # independent backends over the shared dsh-subagent-inprocess driver. Exposing
  72. # both transports is pure config: load each backend, then load dsh-tool-subagent
  73. # once per backend with a distinct toolName (the tool registry rejects a
  74. # duplicate name) — no code change.
  75. - id: subagent
  76. name: '@deepseek-ai/dsh-subagent'
  77. - id: subagent-spawn
  78. name: '@deepseek-ai/dsh-subagent-spawn'
  79. config:
  80. providerName: spawn
  81. - id: subagent-fork
  82. name: '@deepseek-ai/dsh-subagent-fork'
  83. config:
  84. providerName: fork
  85. - id: tool-subagent
  86. name: '@deepseek-ai/dsh-tool-subagent'
  87. config:
  88. provider: spawn
  89. toolName: subagent
  90. - id: tool-subagent-fork
  91. name: '@deepseek-ai/dsh-tool-subagent'
  92. config:
  93. provider: fork
  94. toolName: subagent_fork
  95. # Dynamic workflows: the worker-thread engine (ctx.workflows) over the spawn
  96. # subagent backend above, plus the model-facing `workflow` tool. The model
  97. # writes a JavaScript orchestration script (meta + body); the engine runs it
  98. # in its own worker thread and fans agent() calls out as spawn children.
  99. - id: workflow-workerthread
  100. name: '@deepseek-ai/dsh-workflow-workerthread'
  101. config:
  102. provider: spawn
  103. - id: tool-workflow
  104. name: '@deepseek-ai/dsh-tool-workflow'
  105. # The model-facing todo_write tool: whole-list task tracking written to the
  106. # session log (todo/write), rendered as a stdio checklist / ACP plan.
  107. - id: tool-todo
  108. name: '@deepseek-ai/dsh-tool-todo'
  109. # Filesystem capability stack: local provider, read-before-write/edit policy
  110. # gate, then the model-facing read/write/edit tools. stdio-agent is a single
  111. # session, so relative paths resolve from the process cwd (the workspace).
  112. - id: fs-local
  113. name: '@deepseek-ai/dsh-fs-local'
  114. config:
  115. cwd: !!js process.cwd()
  116. - id: fs-policy
  117. name: '@deepseek-ai/dsh-fs-policy'
  118. - id: tool-fs
  119. name: '@deepseek-ai/dsh-tool-fs'