base.cordis.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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). Exports carry the harness home's anonymous user id ($DSH_HOME/.userid,
  93. # random UUID; delete the file to reset the identity) as the Resource's
  94. # user.id. The exporter/processor values bound the shutdown drain to ~1s
  95. # against an unreachable collector: exporter.timeoutMillis is both the
  96. # per-attempt socket timeout and the retry deadline (1s effectively
  97. # disables the SDK's 5-try backoff), maxExportBatchSize == maxQueueSize
  98. # (both explicit) makes the drain a single batch, and exportTimeoutMillis
  99. # is the processor's own cap on that one export cycle — the second bound
  100. # when the exporter's clock alone does not fire. Every surface's exit path
  101. # drains it: web/headless dispose on SIGINT/SIGTERM, and the TUI's normal
  102. # exit and /resume handoff both dispose the root.
  103. - id: telemetry-otel
  104. name: '@deepseek-ai/dsh-session-telemetry-otel'
  105. config:
  106. exporter:
  107. url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
  108. compression: gzip
  109. timeoutMillis: 1000
  110. processor:
  111. scheduledDelayMillis: 10000
  112. maxQueueSize: 2048
  113. maxExportBatchSize: 2048
  114. exportTimeoutMillis: 1500
  115. - id: subprocess
  116. name: '@deepseek-ai/dsh-subprocess-local'
  117. - id: bash-local
  118. name: '@deepseek-ai/dsh-bash-local'
  119. config:
  120. timeoutMs: 60000
  121. - id: tool-bash
  122. name: '@deepseek-ai/dsh-tool-bash'
  123. - id: tool-tasks
  124. name: '@deepseek-ai/dsh-tool-tasks'
  125. - id: fs-policy
  126. name: '@deepseek-ai/dsh-fs-policy'
  127. - id: tool-fs
  128. name: '@deepseek-ai/dsh-tool-fs'
  129. - id: tool-fs-search
  130. name: '@deepseek-ai/dsh-tool-fs-search'
  131. config:
  132. sampleOverCapGlobResults: false
  133. - id: workspace-context
  134. name: '@deepseek-ai/dsh-workspace-context'
  135. config:
  136. maxBytes: 65536
  137. - id: skill
  138. name: '@deepseek-ai/dsh-skill'
  139. - id: skill-local
  140. name: '@deepseek-ai/dsh-skill-local'
  141. - id: tool-skill
  142. name: '@deepseek-ai/dsh-tool-skill'
  143. - id: commands
  144. name: '@deepseek-ai/dsh-commands'
  145. - id: goal
  146. name: '@deepseek-ai/dsh-goal'
  147. - id: goal-session
  148. name: '@deepseek-ai/dsh-goal-session'
  149. - id: command-goal
  150. name: '@deepseek-ai/dsh-command-goal'
  151. - id: plan-mode
  152. name: '@deepseek-ai/dsh-plan-mode'
  153. config:
  154. section: |
  155. 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.
  156. 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.
  157. 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.
  158. 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.
  159. 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.
  160. 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.
  161. - id: token-meter
  162. name: '@deepseek-ai/dsh-token-meter'
  163. - id: compact-basic
  164. name: '@deepseek-ai/dsh-compact-basic'
  165. - id: subagent
  166. name: '@deepseek-ai/dsh-subagent'
  167. - id: subagent-spawn
  168. name: '@deepseek-ai/dsh-subagent-spawn'
  169. config:
  170. providerName: spawn
  171. - id: subagent-fork
  172. name: '@deepseek-ai/dsh-subagent-fork'
  173. config:
  174. providerName: fork
  175. - id: tool-subagent
  176. name: '@deepseek-ai/dsh-tool-subagent'
  177. config:
  178. provider: spawn
  179. toolName: subagent
  180. - id: tool-subagent-fork
  181. name: '@deepseek-ai/dsh-tool-subagent'
  182. config:
  183. provider: fork
  184. toolName: subagent_fork
  185. - id: workflow-workerthread
  186. name: '@deepseek-ai/dsh-workflow-workerthread'
  187. config:
  188. provider: spawn
  189. - id: tool-workflow
  190. name: '@deepseek-ai/dsh-tool-workflow'
  191. - id: timeout-policy
  192. name: '@deepseek-ai/dsh-timeout-policy'
  193. - id: spill-local
  194. name: '@deepseek-ai/dsh-spill-local'
  195. - id: spill-policy
  196. name: '@deepseek-ai/dsh-spill-policy'
  197. config:
  198. maxInlineBytes: 50000
  199. # ── rows every surface mounts, whose values each overlay states ──────────────
  200. # The tool registry. Presentation mode is a surface choice, so each overlay
  201. # states it; omitting it here keeps the schema default (native).
  202. - id: tools
  203. name: '@deepseek-ai/dsh-tools'
  204. # The deployment persona is a surface choice; plan-mode and tool plugins own
  205. # their own prompt sections.
  206. - id: system-prompt
  207. name: '@deepseek-ai/dsh-system-prompt'
  208. config:
  209. persona: ''
  210. # Agents created at startup. The TUI pre-creates `main`; the web surface creates
  211. # sessions on client request, so its overlay keeps this empty.
  212. - id: agent-loop
  213. name: '@deepseek-ai/dsh-agent-loop'
  214. config:
  215. agents: []
  216. # The filesystem provider. `cwd` defaults to the package's `process.cwd()`; the
  217. # TUI states it explicitly because that value is also the session workspace.
  218. - id: fs-local
  219. name: '@deepseek-ai/dsh-fs-local'
  220. # The native DeepSeek adapter. No key or endpoint is inlined: both resolve per
  221. # request from the `llm-deepseek:` settings section over this entry, with the
  222. # key coming from the credential store below. Thinking defaults are a surface
  223. # choice.
  224. - id: llm-deepseek
  225. name: '@deepseek-ai/dsh-llm-deepseek'