base.cordis.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. # User-settings document (`$DSH_HOME/settings.yaml`, hot-reloaded): a
  49. # `llm-deepseek:` or `llm-pi-ai:` section there overrides the adapter entries
  50. # below without a restart, and is what the web Models page writes.
  51. - id: settings
  52. name: '@deepseek-ai/dsh-settings-local'
  53. # Credential store: the live process environment over `$DSH_HOME/.env`
  54. # (owner-only file, hot-reloaded). Adapters resolve their key references
  55. # through it at each request, so no key is inlined in this file. The web
  56. # Models page's key inputs write it through `credentials.set`; nothing hoists
  57. # the document into the process environment, which would make every stored key
  58. # read as an unrotatable ambient override.
  59. - id: credentials
  60. name: '@deepseek-ai/dsh-credentials-local'
  61. # The pi-ai multi-provider twin, mounted dormant: zero routes (and no extra
  62. # models in the picker) until a `llm-pi-ai:` settings section supplies provider
  63. # profiles — then those routes register live, keys resolving per request
  64. # through their apiKeyEnv references, and drop again when the section empties.
  65. # Supplying those profiles is exactly what the web Models page does. Which
  66. # adapters exist is composition; which providers run is the user's settings
  67. # document.
  68. - id: llm-pi-ai
  69. name: '@deepseek-ai/dsh-llm-pi-ai'
  70. - id: session-persistence-jsonl
  71. name: '@deepseek-ai/dsh-session-persistence-jsonl'
  72. config:
  73. root: !!js >-
  74. (() => { const path = process.getBuiltinModule('node:path'); const home = process.getBuiltinModule('node:os').homedir(); const configured = process.env.DSH_HOME; const selected = configured !== undefined && configured.trim().length > 0 ? configured : path.join(home, '.dsh'); const expanded = selected === '~' ? home : selected.startsWith('~/') || selected.startsWith('~\\') ? path.join(home, selected.slice(2)) : selected; return path.join(path.resolve(expanded), 'sessions') })()
  75. # TUI consumes this shared session capability. Its launcher supplies a unique
  76. # process-local path; other surfaces repoint or disable the row in their
  77. # overlay (web patches it to an ephemeral in-memory index).
  78. - id: session-query-sqlite
  79. name: '@deepseek-ai/dsh-session-query-sqlite'
  80. config:
  81. path: !!js launcherSessionQueryPath ?? './.sessions/session-query.db'
  82. # Session telemetry, on for every dsh surface: mirrors every session-log
  83. # event (assistant/chunk projected to first-of-step) plus ops markers onto
  84. # OTLP/HTTP log records, streaming on the batch processor's cadence
  85. # (10s/batch here) — not at exit; a crash loses at most the last unexported
  86. # interval. No telemetry/record redaction rule is mounted yet, so exports
  87. # are the raw captured copy; the deployment stance, env seams, and
  88. # follow-ups are pinned in the web-telemetry-default-mount Agent Note.
  89. # DSH_TELEMETRY_OTLP_URL overrides the production endpoint, and a non-empty
  90. # DSH_TELEMETRY_DISABLED — any value, including '0'/'false' — opts the
  91. # process out (the launchers patch the row disabled; config cannot disable
  92. # a row). The exporter/processor values bound the shutdown drain to ~1s
  93. # against an unreachable collector: exporter.timeoutMillis is both the
  94. # per-attempt socket timeout and the retry deadline (1s effectively
  95. # disables the SDK's 5-try backoff), maxExportBatchSize == maxQueueSize
  96. # (both explicit) makes the drain a single batch, and exportTimeoutMillis
  97. # is the processor's own cap on that one export cycle — the second bound
  98. # when the exporter's clock alone does not fire. Every surface's exit path
  99. # drains it: web/headless dispose on SIGINT/SIGTERM, and the TUI's normal
  100. # exit and /resume handoff both dispose the root.
  101. - id: telemetry-otel
  102. name: '@deepseek-ai/dsh-session-telemetry-otel'
  103. config:
  104. exporter:
  105. url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
  106. compression: gzip
  107. timeoutMillis: 1000
  108. processor:
  109. scheduledDelayMillis: 10000
  110. maxQueueSize: 2048
  111. maxExportBatchSize: 2048
  112. exportTimeoutMillis: 1500
  113. - id: subprocess
  114. name: '@deepseek-ai/dsh-subprocess-local'
  115. - id: bash-local
  116. name: '@deepseek-ai/dsh-bash-local'
  117. config:
  118. timeoutMs: 60000
  119. - id: tool-bash
  120. name: '@deepseek-ai/dsh-tool-bash'
  121. - id: tool-tasks
  122. name: '@deepseek-ai/dsh-tool-tasks'
  123. - id: fs-policy
  124. name: '@deepseek-ai/dsh-fs-policy'
  125. - id: tool-fs
  126. name: '@deepseek-ai/dsh-tool-fs'
  127. - id: tool-fs-search
  128. name: '@deepseek-ai/dsh-tool-fs-search'
  129. config:
  130. sampleOverCapGlobResults: false
  131. - id: workspace-context
  132. name: '@deepseek-ai/dsh-workspace-context'
  133. config:
  134. maxBytes: 65536
  135. - id: skill
  136. name: '@deepseek-ai/dsh-skill'
  137. - id: skill-local
  138. name: '@deepseek-ai/dsh-skill-local'
  139. - id: tool-skill
  140. name: '@deepseek-ai/dsh-tool-skill'
  141. - id: commands
  142. name: '@deepseek-ai/dsh-commands'
  143. - id: goal
  144. name: '@deepseek-ai/dsh-goal'
  145. - id: goal-session
  146. name: '@deepseek-ai/dsh-goal-session'
  147. - id: command-goal
  148. name: '@deepseek-ai/dsh-command-goal'
  149. - id: plan-mode
  150. name: '@deepseek-ai/dsh-plan-mode'
  151. config:
  152. section: |
  153. 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.
  154. 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.
  155. 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.
  156. 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.
  157. 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.
  158. 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.
  159. - id: token-meter
  160. name: '@deepseek-ai/dsh-token-meter'
  161. - id: compact-basic
  162. name: '@deepseek-ai/dsh-compact-basic'
  163. - id: subagent
  164. name: '@deepseek-ai/dsh-subagent'
  165. - id: subagent-spawn
  166. name: '@deepseek-ai/dsh-subagent-spawn'
  167. config:
  168. providerName: spawn
  169. - id: subagent-fork
  170. name: '@deepseek-ai/dsh-subagent-fork'
  171. config:
  172. providerName: fork
  173. - id: tool-subagent
  174. name: '@deepseek-ai/dsh-tool-subagent'
  175. config:
  176. provider: spawn
  177. toolName: subagent
  178. - id: tool-subagent-fork
  179. name: '@deepseek-ai/dsh-tool-subagent'
  180. config:
  181. provider: fork
  182. toolName: subagent_fork
  183. - id: workflow-workerthread
  184. name: '@deepseek-ai/dsh-workflow-workerthread'
  185. config:
  186. provider: spawn
  187. - id: tool-workflow
  188. name: '@deepseek-ai/dsh-tool-workflow'
  189. - id: timeout-policy
  190. name: '@deepseek-ai/dsh-timeout-policy'
  191. - id: spill-local
  192. name: '@deepseek-ai/dsh-spill-local'
  193. - id: spill-policy
  194. name: '@deepseek-ai/dsh-spill-policy'
  195. config:
  196. maxInlineBytes: 50000
  197. # ── rows every surface mounts, whose values each overlay states ──────────────
  198. # The tool registry. Presentation mode is a surface choice, so each overlay
  199. # states it; omitting it here keeps the schema default (native).
  200. - id: tools
  201. name: '@deepseek-ai/dsh-tools'
  202. # The deployment persona is a surface choice; plan-mode and tool plugins own
  203. # their own prompt sections.
  204. - id: system-prompt
  205. name: '@deepseek-ai/dsh-system-prompt'
  206. config:
  207. persona: ''
  208. # Agents created at startup. The TUI pre-creates `main`; the web surface creates
  209. # sessions on client request, so its overlay keeps this empty.
  210. - id: agent-loop
  211. name: '@deepseek-ai/dsh-agent-loop'
  212. config:
  213. agents: []
  214. # The filesystem provider. `cwd` defaults to the package's `process.cwd()`; the
  215. # TUI states it explicitly because that value is also the session workspace.
  216. - id: fs-local
  217. name: '@deepseek-ai/dsh-fs-local'
  218. # The native DeepSeek adapter. No key or endpoint is inlined: both resolve per
  219. # request from the `llm-deepseek:` settings section over this entry, with the
  220. # key coming from the credential store below. Thinking defaults are a surface
  221. # choice.
  222. - id: llm-deepseek
  223. name: '@deepseek-ai/dsh-llm-deepseek'