cordis.patch.yml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. # The dsh-base bundle patch: the shared core of every dsh profile, applied as
  2. # ONE insert over the empty profile root. Later bundle patches and the user's
  3. # profile cordis.patch.yml address these rows by id, with the last write
  4. # winning per row.
  5. #
  6. # A patch replaces the targeted row's whole `config` rather than merging into
  7. # it, so a row whose value differs by mode does NOT live here: it belongs to
  8. # each mode bundle, keeping any single row down to one bundle layer plus the
  9. # user's. Mode-specific rows appear below only with shared plugin identity and
  10. # neutral defaults; each mode bundle restates its complete configuration.
  11. #
  12. # Row order carries no load semantics (activation is service-availability
  13. # driven); the grouping is for readers.
  14. - insert:
  15. - id: timer
  16. name: '@deepseek-ai/cordis-plugin-timer'
  17. - id: hmr
  18. name: '@deepseek-ai/cordis-plugin-hmr'
  19. config:
  20. root: ['.']
  21. - id: llm
  22. name: '@deepseek-ai/dsh-llm'
  23. - id: session
  24. name: '@deepseek-ai/dsh-session'
  25. - id: typert
  26. name: '@deepseek-ai/dsh-typert-registry'
  27. - id: typert-loader
  28. name: '@deepseek-ai/dsh-typert-loader'
  29. - id: typert-gateway
  30. name: '@deepseek-ai/dsh-api-gateway'
  31. - id: session-title
  32. name: '@deepseek-ai/dsh-session-title'
  33. config:
  34. fallbackMaxWords: 5
  35. fallbackMaxBytes: 40
  36. maxTitleBytes: 80
  37. - id: session-title-llm
  38. name: '@deepseek-ai/dsh-session-title-first-message-llm'
  39. config:
  40. targetWords: 5
  41. targetCjkCharacters: 10
  42. maxInputBytes: 4096
  43. maxOutputTokens: 64
  44. timeoutMs: 60000
  45. - id: user-interaction
  46. name: '@deepseek-ai/dsh-user-interaction'
  47. - id: agent
  48. name: '@deepseek-ai/dsh-agent'
  49. # The transport-independent default for Agents created by entry points.
  50. # Settings may supply a saved selection; consumers read it at creation time.
  51. - id: agent-default-model
  52. name: '@deepseek-ai/dsh-agent-default-model'
  53. config:
  54. provider: deepseek-official
  55. model: deepseek-v4-flash
  56. - id: tasks
  57. name: '@deepseek-ai/dsh-tasks-local'
  58. - id: llm-retry
  59. name: '@deepseek-ai/dsh-llm-retry'
  60. # User-settings document (`$DSH_HOME/settings.yaml`, hot-reloaded): a
  61. # `llm-deepseek:` or `llm-pi-ai:` section there overrides the adapter entries
  62. # below without a restart, and is what the web Models page writes.
  63. - id: settings
  64. name: '@deepseek-ai/dsh-settings-local'
  65. # Credential sources: inherited environment over the managed
  66. # `$DSH_HOME/.credentials.yaml`, with project and user `.env` fallbacks.
  67. # Adapters resolve references per request; the Models page writes only the
  68. # managed document, which is never materialized into the process environment.
  69. - id: credentials
  70. name: '@deepseek-ai/dsh-credentials-local'
  71. # The pi-ai multi-provider twin, mounted dormant: zero routes (and no extra
  72. # models in the picker) until a `llm-pi-ai:` settings section supplies provider
  73. # profiles — then those routes register live, keys resolving per request
  74. # through their apiKeyEnv references, and drop again when the section empties.
  75. # Supplying those profiles is exactly what the web Models page does. Which
  76. # adapters exist is composition; which providers run is the user's settings
  77. # document.
  78. - id: llm-pi-ai
  79. name: '@deepseek-ai/dsh-llm-pi-ai'
  80. - id: session-persistence-jsonl
  81. name: '@deepseek-ai/dsh-session-persistence-jsonl'
  82. config:
  83. root: !!js dshHomePath('sessions')
  84. # Durable image bytes live outside the append-only session log. Messages
  85. # keep content-addressed references that this shared backend resolves for
  86. # provider requests and authorized history reads.
  87. - id: attachment-local
  88. name: '@deepseek-ai/dsh-attachment-local'
  89. # Raw configs can supply a process-local path or disable this shared session
  90. # capability. The neutral default is process-local and opens only when used.
  91. - id: session-query-sqlite
  92. name: '@deepseek-ai/dsh-session-query-sqlite'
  93. config:
  94. path: ':memory:'
  95. openAt: first-search
  96. # Shared projection registry: subagent catalog identity (mode/label) folds
  97. # through its registered units, so the `list_agents` surface below fails
  98. # loud without it; web layers reuse this same mount for list rows.
  99. - id: session-projection
  100. name: '@deepseek-ai/dsh-session-projection'
  101. # Session telemetry, on for every dsh mode: mirrors every session-log
  102. # event (assistant/chunk projected to first-of-step) plus ops markers onto
  103. # OTLP/HTTP log records, streaming on the batch processor's cadence
  104. # (10s/batch here) — not at exit; a crash loses at most the last unexported
  105. # interval. No telemetry/record redaction rule is mounted yet, so exports
  106. # are the raw captured copy; the deployment stance, env seams, and
  107. # follow-ups are pinned in the web-telemetry-default-mount Agent Note.
  108. # DSH_TELEMETRY_OTLP_URL overrides the production endpoint, and a non-empty
  109. # DSH_TELEMETRY_DISABLED — any value, including '0'/'false' — opts the
  110. # process out (the launchers patch the row disabled; config cannot disable
  111. # a row). Exports carry the harness home's anonymous user id ($DSH_HOME/.userid,
  112. # random UUID; delete the file to reset the identity) as the Resource's
  113. # user.id. The exporter/processor values normally bound the shutdown drain
  114. # to ~1s against an unreachable collector: exporter.timeoutMillis is both
  115. # the per-attempt socket timeout and the retry deadline (1s effectively
  116. # disables the SDK's 5-try backoff), while maxExportBatchSize == maxQueueSize
  117. # (both explicit) makes the drain a single batch. The SDK awaits
  118. # exporter.forceFlush() outside exportTimeoutMillis, so the backend's 3s
  119. # shutdownTimeoutMillis is the load-bearing outer bound when a transport
  120. # promise never settles. Every CLI exit path drains it by disposing the root
  121. # on SIGINT/SIGTERM.
  122. - id: telemetry-otel
  123. name: '@deepseek-ai/dsh-session-telemetry-otel'
  124. config:
  125. shutdownTimeoutMillis: 3000
  126. exporter:
  127. url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
  128. compression: gzip
  129. timeoutMillis: 1000
  130. processor:
  131. scheduledDelayMillis: 10000
  132. maxQueueSize: 2048
  133. maxExportBatchSize: 2048
  134. exportTimeoutMillis: 1500
  135. - id: subprocess
  136. name: '@deepseek-ai/dsh-subprocess-local'
  137. # Every shipped CLI mode starts with the same file-effect boundary.
  138. # The environment remains an explicit deployment override; otherwise fresh
  139. # sessions pin workspace-write + ask through the permission service below.
  140. - id: sandbox
  141. name: '@deepseek-ai/dsh-sandbox-local'
  142. - id: sandbox-policy
  143. name: '@deepseek-ai/dsh-sandbox-policy'
  144. config:
  145. mode: !!js process.env.DSH_PERMISSION_MODE ?? 'workspace-write'
  146. workspaceRoot: !!js process.cwd()
  147. - id: bash-sandbox
  148. name: '@deepseek-ai/dsh-bash-sandbox'
  149. disabled: !!js process.platform === 'win32'
  150. config:
  151. timeoutMs: 60000
  152. - id: pwsh-sandbox
  153. name: '@deepseek-ai/dsh-pwsh-sandbox'
  154. disabled: !!js process.platform !== 'win32'
  155. - id: approval
  156. name: '@deepseek-ai/dsh-user-approval'
  157. config:
  158. policy: !!js "(process.env.DSH_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask'"
  159. - id: permission
  160. name: '@deepseek-ai/dsh-permission'
  161. config:
  162. presets:
  163. read-only:
  164. sandbox: read-only
  165. approval: ask
  166. workspace-write:
  167. sandbox: workspace-write
  168. approval: ask
  169. danger-full-access:
  170. sandbox: danger-full-access
  171. approval: never
  172. - id: bash-env
  173. name: '@deepseek-ai/dsh-bash-env'
  174. - id: tool-bash
  175. name: '@deepseek-ai/dsh-tool-bash'
  176. disabled: !!js process.platform === 'win32'
  177. - id: tool-pwsh
  178. name: '@deepseek-ai/dsh-tool-pwsh'
  179. disabled: !!js process.platform !== 'win32'
  180. - id: tool-tasks
  181. name: '@deepseek-ai/dsh-tool-tasks'
  182. - id: fs-policy
  183. name: '@deepseek-ai/dsh-fs-policy'
  184. - id: tool-fs
  185. name: '@deepseek-ai/dsh-tool-fs'
  186. - id: tool-fs-search
  187. name: '@deepseek-ai/dsh-tool-fs-search'
  188. config:
  189. sampleOverCapGlobResults: false
  190. - id: workspace-context
  191. name: '@deepseek-ai/dsh-workspace-context'
  192. config:
  193. maxBytes: 65536
  194. - id: skill
  195. name: '@deepseek-ai/dsh-skill'
  196. - id: skill-local
  197. name: '@deepseek-ai/dsh-skill-local'
  198. - id: skill-badge
  199. name: '@deepseek-ai/dsh-skill-badge'
  200. disabled: true
  201. - id: tool-skill
  202. name: '@deepseek-ai/dsh-tool-skill'
  203. - id: commands
  204. name: '@deepseek-ai/dsh-commands'
  205. - id: command-feedback
  206. name: '@deepseek-ai/dsh-command-feedback'
  207. - id: goal
  208. name: '@deepseek-ai/dsh-goal'
  209. - id: goal-session
  210. name: '@deepseek-ai/dsh-goal-session'
  211. - id: command-goal
  212. name: '@deepseek-ai/dsh-command-goal'
  213. - id: plan-mode
  214. name: '@deepseek-ai/dsh-plan-mode'
  215. config:
  216. section: |
  217. 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.
  218. 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.
  219. 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.
  220. 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.
  221. 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.
  222. 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.
  223. - id: token-meter
  224. name: '@deepseek-ai/dsh-token-meter'
  225. - id: compact-basic
  226. name: '@deepseek-ai/dsh-compact-basic'
  227. # Human `/compact`: one useful reduction below the automatic threshold. Backend
  228. # independent, so it follows whichever compaction service this leaf mounts.
  229. - id: command-compact
  230. name: '@deepseek-ai/dsh-command-compact'
  231. - id: subagent
  232. name: '@deepseek-ai/dsh-subagent'
  233. - id: subagent-spawn
  234. name: '@deepseek-ai/dsh-subagent-spawn'
  235. config:
  236. providerName: spawn
  237. - id: subagent-fork
  238. name: '@deepseek-ai/dsh-subagent-fork'
  239. config:
  240. providerName: fork
  241. # Product providers stay on the host plane because the registry is a
  242. # process singleton. Agent presets decide whether their own model sees the
  243. # matching delegation tools; loading either provider starts no product.
  244. - id: subagent-codex
  245. name: '@deepseek-ai/dsh-subagent-codex'
  246. - id: subagent-claude-code
  247. name: '@deepseek-ai/dsh-subagent-claude-code'
  248. # Continuable background children are selected per delegation tool. The
  249. # separately loaded follow-up tool registers the one global `send_message`.
  250. - id: tool-subagent-control
  251. name: '@deepseek-ai/dsh-tool-subagent-control'
  252. - id: tool-subagent-list-agents
  253. name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
  254. - id: tool-subagent
  255. name: '@deepseek-ai/dsh-tool-subagent'
  256. config:
  257. provider: spawn
  258. toolName: subagent
  259. backgroundMode: continuable
  260. # Fork stays one-shot: a continuable child's `report` tool and prompt
  261. # section precede the inherited history a fork exists to reuse; one-shot
  262. # fork children install neither, keeping the parent's request prefix.
  263. # See .agents/notes/implemented/architecture/2026-08-10-fork-children-stay-one-shot.md.
  264. - id: tool-subagent-fork
  265. name: '@deepseek-ai/dsh-tool-subagent'
  266. config:
  267. provider: fork
  268. toolName: subagent_fork
  269. backgroundMode: one-shot
  270. # Optional direct-child return channel; absent from roots and one-shot agents.
  271. - id: tool-subagent-report
  272. name: '@deepseek-ai/dsh-tool-subagent-report'
  273. - id: workflow-workerthread
  274. name: '@deepseek-ai/dsh-workflow-workerthread'
  275. config:
  276. provider: spawn
  277. - id: tool-workflow
  278. name: '@deepseek-ai/dsh-tool-workflow'
  279. - id: timeout-policy
  280. name: '@deepseek-ai/dsh-timeout-policy'
  281. - id: spill-local
  282. name: '@deepseek-ai/dsh-spill-local'
  283. - id: spill-policy
  284. name: '@deepseek-ai/dsh-spill-policy'
  285. config:
  286. maxInlineBytes: 50000
  287. # Durability checkpoints before each model request and top-level dispatch.
  288. - id: session-checkpoint-policy
  289. name: '@deepseek-ai/dsh-session-checkpoint-policy'
  290. # Compacts oversized tool results before the broader conversation compactor
  291. # runs, preserving the model-visible result within the configured budget.
  292. - id: tool-result-prune
  293. name: '@deepseek-ai/dsh-compact-tool-result-prune'
  294. config:
  295. thresholdChars: 8192
  296. headChars: 4096
  297. tailChars: 1024
  298. - id: tool-todo
  299. name: '@deepseek-ai/dsh-tool-todo'
  300. config:
  301. allowParallelInProgress: true
  302. # Persisted same-session goals reach the model and the slash menu here; the
  303. # domain, driver, and `/goal` command are above.
  304. - id: tool-goal
  305. name: '@deepseek-ai/dsh-tool-goal'
  306. # Fresh-agent Ralph iteration over a build-time-fixed script.
  307. - id: tool-ralph
  308. name: '@deepseek-ai/dsh-tool-ralph'
  309. config:
  310. subagentProvider: spawn
  311. maxRounds: 64
  312. - id: tool-str-replace-editor
  313. name: '@deepseek-ai/dsh-tool-str-replace-editor'
  314. config:
  315. maxOutputChars: 16000
  316. # Consecutive-repeat reminders on the tool chain.
  317. - id: repeat-tool-guard
  318. name: '@deepseek-ai/dsh-repeat-tool-guard'
  319. config:
  320. thresholds: [3, 5, 8]
  321. argumentsPreviewChars: 500
  322. # Every mode enables the stable model-facing web_search tool. DeepSeek search
  323. # resolves the same DEEPSEEK_API_KEY credential the Models page manages for
  324. # chat, at each search; its Messages endpoint is separate from the
  325. # chat-completions endpoint, so it takes its own base-URL override. Fetch stays
  326. # disabled and no fetch provider is mounted: that provider defers SSRF
  327. # protection and the model would choose the request target. Search is a full
  328. # auxiliary model request with server-side retrieval, so this shipped DeepSeek
  329. # route gets 60s while the provider-neutral tool default remains 30s.
  330. - id: web
  331. name: '@deepseek-ai/dsh-web'
  332. config:
  333. searchProvider: deepseek-official
  334. - id: web-search-deepseek
  335. name: '@deepseek-ai/dsh-web-search-deepseek'
  336. config:
  337. apiKeyEnv: DEEPSEEK_API_KEY
  338. - id: tool-web
  339. name: '@deepseek-ai/dsh-tool-web'
  340. config:
  341. fetch: false
  342. searchTimeoutMs: 60000
  343. # ── rows every mode mounts, whose values each overlay may state ──────────────
  344. # The tool registry. Presentation mode is a deployment choice; omitting it here
  345. # keeps the schema default (native).
  346. - id: tools
  347. name: '@deepseek-ai/dsh-tools'
  348. # The deployment persona is a deployment choice; plan-mode and tool plugins own
  349. # their own prompt sections.
  350. - id: system-prompt
  351. name: '@deepseek-ai/dsh-system-prompt'
  352. config:
  353. persona: ''
  354. # Agents created at startup. The base stays empty; raw overlays may create
  355. # agents, while Web creates sessions on client request.
  356. - id: agent-loop
  357. name: '@deepseek-ai/dsh-agent-loop'
  358. config:
  359. agents: []
  360. # The sandboxed filesystem provider. `cwd` defaults to `process.cwd()`; an
  361. # overlay can pin another workspace.
  362. - id: fs-sandbox
  363. name: '@deepseek-ai/dsh-fs-sandbox'
  364. # The native DeepSeek adapter. No key or endpoint is inlined: both resolve per
  365. # request from the `llm-deepseek:` settings section over this entry, with the
  366. # key coming from the credential store below. Thinking defaults are a deployment
  367. # choice.
  368. - id: llm-deepseek
  369. name: '@deepseek-ai/dsh-llm-deepseek'