base.cordis.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. # The shared `dsh` core: every row both the TUI (`tui.cordis.yml`) and the web
  2. # surface (`web.cordis.yml`) mount identically. Neither surface includes the
  3. # other — each is a patch list applied over THIS file at one include level, so a
  4. # surface overlay, a `--config` overlay, and the personal `~/.dsh/config.yaml`
  5. # all address these rows by id. Patch lists stack in that order, last write
  6. # winning per row.
  7. #
  8. # A patch replaces the targeted row's whole `config` rather than merging into
  9. # it, so a row whose value differs per surface does NOT live here: it belongs to
  10. # each overlay, keeping any single row down to one overlay layer plus the user's.
  11. # That is why `agent-loop`, `system-prompt`, `tools`, `fs-local`, and
  12. # `llm-deepseek` thinking defaults are absent below.
  13. #
  14. # Row order carries no load semantics (activation is service-availability
  15. # driven); the grouping is for readers.
  16. - id: timer
  17. name: '@cordisjs/plugin-timer'
  18. - id: llm
  19. name: '@deepseek-ai/dsh-llm'
  20. - id: session
  21. name: '@deepseek-ai/dsh-session'
  22. - id: session-title
  23. name: '@deepseek-ai/dsh-session-title'
  24. config:
  25. fallbackMaxWords: 5
  26. fallbackMaxBytes: 40
  27. maxTitleBytes: 80
  28. - id: session-title-llm
  29. name: '@deepseek-ai/dsh-session-title-first-message-llm'
  30. config:
  31. targetWords: 5
  32. targetCjkCharacters: 10
  33. maxInputBytes: 4096
  34. maxOutputTokens: 64
  35. timeoutMs: 60000
  36. - id: user-interaction
  37. name: '@deepseek-ai/dsh-user-interaction'
  38. - id: agent
  39. name: '@deepseek-ai/dsh-agent'
  40. - id: tasks
  41. name: '@deepseek-ai/dsh-tasks-local'
  42. - id: llm-retry
  43. name: '@deepseek-ai/dsh-llm-retry'
  44. # The session store root is the launcher's policy, not a plugin's: `dsh` shares
  45. # one store under the Harness home across every cwd, so `/resume` and
  46. # `dsh ps` span workspaces. Without a launcher the project-local fallback keeps
  47. # an embedder's sessions beside its project.
  48. - id: session-persistence-jsonl
  49. name: '@deepseek-ai/dsh-session-persistence-jsonl'
  50. config:
  51. root: !!js launcherSessionsRoot ?? './.sessions'
  52. - id: subprocess
  53. name: '@deepseek-ai/dsh-subprocess-local'
  54. - id: bash-local
  55. name: '@deepseek-ai/dsh-bash-local'
  56. config:
  57. timeoutMs: 60000
  58. - id: tool-bash
  59. name: '@deepseek-ai/dsh-tool-bash'
  60. - id: tool-tasks
  61. name: '@deepseek-ai/dsh-tool-tasks'
  62. - id: fs-policy
  63. name: '@deepseek-ai/dsh-fs-policy'
  64. - id: tool-fs
  65. name: '@deepseek-ai/dsh-tool-fs'
  66. - id: tool-fs-search
  67. name: '@deepseek-ai/dsh-tool-fs-search'
  68. - id: workspace-context
  69. name: '@deepseek-ai/dsh-workspace-context'
  70. config:
  71. maxBytes: 65536
  72. - id: skill
  73. name: '@deepseek-ai/dsh-skill'
  74. - id: skill-local
  75. name: '@deepseek-ai/dsh-skill-local'
  76. - id: tool-skill
  77. name: '@deepseek-ai/dsh-tool-skill'
  78. - id: commands
  79. name: '@deepseek-ai/dsh-commands'
  80. - id: goal
  81. name: '@deepseek-ai/dsh-goal'
  82. - id: goal-session
  83. name: '@deepseek-ai/dsh-goal-session'
  84. - id: command-goal
  85. name: '@deepseek-ai/dsh-command-goal'
  86. - id: plan-mode
  87. name: '@deepseek-ai/dsh-plan-mode'
  88. config:
  89. section: |
  90. You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
  91. Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
  92. The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed only to keep the request shape stable. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
  93. Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
  94. Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
  95. When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
  96. - id: token-meter
  97. name: '@deepseek-ai/dsh-token-meter'
  98. - id: compact-basic
  99. name: '@deepseek-ai/dsh-compact-basic'
  100. - id: subagent
  101. name: '@deepseek-ai/dsh-subagent'
  102. - id: subagent-spawn
  103. name: '@deepseek-ai/dsh-subagent-spawn'
  104. config:
  105. providerName: spawn
  106. - id: subagent-fork
  107. name: '@deepseek-ai/dsh-subagent-fork'
  108. config:
  109. providerName: fork
  110. - id: tool-subagent
  111. name: '@deepseek-ai/dsh-tool-subagent'
  112. config:
  113. provider: spawn
  114. toolName: subagent
  115. - id: tool-subagent-fork
  116. name: '@deepseek-ai/dsh-tool-subagent'
  117. config:
  118. provider: fork
  119. toolName: subagent_fork
  120. - id: workflow-workerthread
  121. name: '@deepseek-ai/dsh-workflow-workerthread'
  122. config:
  123. provider: spawn
  124. - id: tool-workflow
  125. name: '@deepseek-ai/dsh-tool-workflow'
  126. - id: timeout-policy
  127. name: '@deepseek-ai/dsh-timeout-policy'
  128. - id: spill-local
  129. name: '@deepseek-ai/dsh-spill-local'
  130. - id: spill-policy
  131. name: '@deepseek-ai/dsh-spill-policy'
  132. config:
  133. maxInlineBytes: 50000
  134. # ── rows every surface mounts, whose values each overlay states ──────────────
  135. # The tool registry. Presentation mode is a surface choice, so each overlay
  136. # states it; omitting it here keeps the schema default (native).
  137. - id: tools
  138. name: '@deepseek-ai/dsh-tools'
  139. # The deployment persona is a surface choice; plan-mode and tool plugins own
  140. # their own prompt sections.
  141. - id: system-prompt
  142. name: '@deepseek-ai/dsh-system-prompt'
  143. config:
  144. persona: ''
  145. # Agents created at startup. The TUI pre-creates `main`; the web surface creates
  146. # sessions on client request, so its overlay keeps this empty.
  147. - id: agent-loop
  148. name: '@deepseek-ai/dsh-agent-loop'
  149. config:
  150. agents: []
  151. # The filesystem provider. `cwd` defaults to the package's `process.cwd()`; the
  152. # TUI states it explicitly because that value is also the session workspace.
  153. - id: fs-local
  154. name: '@deepseek-ai/dsh-fs-local'
  155. # The native DeepSeek adapter; reads the key/base-url the boot's layered .env
  156. # loading left in the environment. Thinking defaults are a surface choice.
  157. - id: llm-deepseek
  158. name: '@deepseek-ai/dsh-llm-deepseek'
  159. config:
  160. apiKey: !!js process.env.DEEPSEEK_API_KEY
  161. baseURL: !!js process.env.DEEPSEEK_BASE_URL