base.cordis.yml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. # Rows with surface-specific values appear below only with shared plugin identity
  12. # and neutral defaults; each overlay restates the complete surface configuration.
  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: hmr
  19. name: '@cordisjs/plugin-hmr'
  20. config:
  21. root: ['.']
  22. - id: llm
  23. name: '@deepseek-ai/dsh-llm'
  24. - id: session
  25. name: '@deepseek-ai/dsh-session'
  26. - id: session-title
  27. name: '@deepseek-ai/dsh-session-title'
  28. config:
  29. fallbackMaxWords: 5
  30. fallbackMaxBytes: 40
  31. maxTitleBytes: 80
  32. - id: session-title-llm
  33. name: '@deepseek-ai/dsh-session-title-first-message-llm'
  34. config:
  35. targetWords: 5
  36. targetCjkCharacters: 10
  37. maxInputBytes: 4096
  38. maxOutputTokens: 64
  39. timeoutMs: 60000
  40. - id: user-interaction
  41. name: '@deepseek-ai/dsh-user-interaction'
  42. - id: agent
  43. name: '@deepseek-ai/dsh-agent'
  44. - id: tasks
  45. name: '@deepseek-ai/dsh-tasks-local'
  46. - id: llm-retry
  47. name: '@deepseek-ai/dsh-llm-retry'
  48. - id: llm-pi-ai
  49. name: '@deepseek-ai/dsh-llm-pi-ai'
  50. config:
  51. providers:
  52. - provider: openai
  53. apiKey: !!js process.env.OPENAI_API_KEY
  54. baseURL: !!js process.env.OPENAI_BASE_URL
  55. - provider: anthropic
  56. apiKey: !!js process.env.ANTHROPIC_API_KEY
  57. baseURL: !!js process.env.ANTHROPIC_BASE_URL
  58. # The session store root is the launcher's policy, not a plugin's: `dsh` shares
  59. # one store under the Harness home across every cwd, so `/resume` spans
  60. # workspaces. Without a launcher the project-local fallback keeps
  61. # an embedder's sessions beside its project.
  62. - id: session-persistence-jsonl
  63. name: '@deepseek-ai/dsh-session-persistence-jsonl'
  64. config:
  65. root: !!js launcherSessionsRoot ?? './.sessions'
  66. - id: subprocess
  67. name: '@deepseek-ai/dsh-subprocess-local'
  68. - id: bash-local
  69. name: '@deepseek-ai/dsh-bash-local'
  70. config:
  71. timeoutMs: 60000
  72. - id: tool-bash
  73. name: '@deepseek-ai/dsh-tool-bash'
  74. - id: tool-tasks
  75. name: '@deepseek-ai/dsh-tool-tasks'
  76. - id: fs-policy
  77. name: '@deepseek-ai/dsh-fs-policy'
  78. - id: tool-fs
  79. name: '@deepseek-ai/dsh-tool-fs'
  80. - id: tool-fs-search
  81. name: '@deepseek-ai/dsh-tool-fs-search'
  82. - id: workspace-context
  83. name: '@deepseek-ai/dsh-workspace-context'
  84. config:
  85. maxBytes: 65536
  86. - id: skill
  87. name: '@deepseek-ai/dsh-skill'
  88. - id: skill-local
  89. name: '@deepseek-ai/dsh-skill-local'
  90. - id: tool-skill
  91. name: '@deepseek-ai/dsh-tool-skill'
  92. - id: commands
  93. name: '@deepseek-ai/dsh-commands'
  94. - id: goal
  95. name: '@deepseek-ai/dsh-goal'
  96. - id: goal-session
  97. name: '@deepseek-ai/dsh-goal-session'
  98. - id: command-goal
  99. name: '@deepseek-ai/dsh-command-goal'
  100. - id: plan-mode
  101. name: '@deepseek-ai/dsh-plan-mode'
  102. config:
  103. section: |
  104. 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.
  105. 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.
  106. 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.
  107. 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.
  108. 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.
  109. 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.
  110. - id: token-meter
  111. name: '@deepseek-ai/dsh-token-meter'
  112. - id: compact-basic
  113. name: '@deepseek-ai/dsh-compact-basic'
  114. - id: subagent
  115. name: '@deepseek-ai/dsh-subagent'
  116. - id: subagent-spawn
  117. name: '@deepseek-ai/dsh-subagent-spawn'
  118. config:
  119. providerName: spawn
  120. - id: subagent-fork
  121. name: '@deepseek-ai/dsh-subagent-fork'
  122. config:
  123. providerName: fork
  124. - id: tool-subagent
  125. name: '@deepseek-ai/dsh-tool-subagent'
  126. config:
  127. provider: spawn
  128. toolName: subagent
  129. - id: tool-subagent-fork
  130. name: '@deepseek-ai/dsh-tool-subagent'
  131. config:
  132. provider: fork
  133. toolName: subagent_fork
  134. - id: workflow-workerthread
  135. name: '@deepseek-ai/dsh-workflow-workerthread'
  136. config:
  137. provider: spawn
  138. - id: tool-workflow
  139. name: '@deepseek-ai/dsh-tool-workflow'
  140. - id: timeout-policy
  141. name: '@deepseek-ai/dsh-timeout-policy'
  142. - id: spill-local
  143. name: '@deepseek-ai/dsh-spill-local'
  144. - id: spill-policy
  145. name: '@deepseek-ai/dsh-spill-policy'
  146. config:
  147. maxInlineBytes: 50000
  148. # ── rows every surface mounts, whose values each overlay states ──────────────
  149. # The tool registry. Presentation mode is a surface choice, so each overlay
  150. # states it; omitting it here keeps the schema default (native).
  151. - id: tools
  152. name: '@deepseek-ai/dsh-tools'
  153. # The deployment persona is a surface choice; plan-mode and tool plugins own
  154. # their own prompt sections.
  155. - id: system-prompt
  156. name: '@deepseek-ai/dsh-system-prompt'
  157. config:
  158. persona: ''
  159. # Agents created at startup. The TUI pre-creates `main`; the web surface creates
  160. # sessions on client request, so its overlay keeps this empty.
  161. - id: agent-loop
  162. name: '@deepseek-ai/dsh-agent-loop'
  163. config:
  164. agents: []
  165. # The filesystem provider. `cwd` defaults to the package's `process.cwd()`; the
  166. # TUI states it explicitly because that value is also the session workspace.
  167. - id: fs-local
  168. name: '@deepseek-ai/dsh-fs-local'
  169. # The native DeepSeek adapter; reads the key/base-url the boot's layered .env
  170. # loading left in the environment. Thinking defaults are a surface choice.
  171. - id: llm-deepseek
  172. name: '@deepseek-ai/dsh-llm-deepseek'
  173. config:
  174. apiKey: !!js process.env.DEEPSEEK_API_KEY
  175. baseURL: !!js process.env.DEEPSEEK_BASE_URL