cordis.patch.yml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. # The dsh-base bundle patch: the shared core of each base-backed 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. # Module reload is opt-in per profile. `patchReload: live` config watching
  18. # uses the launcher's watch-only fallback and does not require this row.
  19. - id: hmr
  20. name: '@deepseek-ai/cordis-plugin-hmr'
  21. disabled: true
  22. config:
  23. root: ['.']
  24. - id: llm
  25. name: '@deepseek-ai/dsh-llm'
  26. - id: deepseek-llm-api-extensions
  27. name: '@deepseek-ai/dsh-deepseek-llm-api-extensions'
  28. - id: session
  29. name: '@deepseek-ai/dsh-session'
  30. - id: session-log-deepseek
  31. name: '@deepseek-ai/dsh-session-log-deepseek'
  32. - id: typert
  33. name: '@deepseek-ai/dsh-typert-registry'
  34. - id: typert-loader
  35. name: '@deepseek-ai/dsh-typert-loader'
  36. - id: typert-gateway
  37. name: '@deepseek-ai/dsh-api-gateway'
  38. - id: session-title
  39. name: '@deepseek-ai/dsh-session-title'
  40. config:
  41. fallbackMaxWords: 5
  42. fallbackMaxBytes: 40
  43. maxTitleBytes: 80
  44. - id: session-title-llm
  45. name: '@deepseek-ai/dsh-session-title-first-prompt-llm'
  46. config:
  47. targetWords: 5
  48. targetCjkCharacters: 10
  49. maxInputBytes: 4096
  50. maxOutputTokens: 64
  51. timeoutMs: 60000
  52. - id: user-questions
  53. name: '@deepseek-ai/dsh-user-questions'
  54. - id: agent
  55. name: '@deepseek-ai/dsh-agent'
  56. - id: plugin-package-inventory-deepseek
  57. name: '@deepseek-ai/dsh-plugin-package-inventory-deepseek'
  58. # The transport-independent default for Agents created by entry points.
  59. # Settings may supply a saved selection; consumers read it at creation time.
  60. - id: agent-default-model
  61. name: '@deepseek-ai/dsh-agent-default-model'
  62. config:
  63. provider: deepseek-official
  64. model: deepseek-v4-flash
  65. - id: jobs
  66. name: '@deepseek-ai/dsh-jobs-local'
  67. - id: llm-retry
  68. name: '@deepseek-ai/dsh-llm-retry'
  69. # User-settings document (`$DSH_HOME/settings.yaml`, hot-reloaded): a
  70. # `llm-deepseek:` or `llm-pi-ai:` section there overrides the adapter entries
  71. # below without a restart, and is what the web Models page writes.
  72. - id: settings
  73. name: '@deepseek-ai/dsh-settings-file'
  74. # Credential sources: inherited environment over the managed
  75. # `$DSH_HOME/.credentials.yaml`, with project and user `.env` fallbacks.
  76. # Adapters resolve references per request; the Models page writes only the
  77. # managed document, which is never materialized into the process environment.
  78. - id: credentials
  79. name: '@deepseek-ai/dsh-credentials-local'
  80. # The pi-ai multi-provider twin, mounted dormant: zero routes (and no extra
  81. # models in the picker) until a `llm-pi-ai:` settings section supplies provider
  82. # profiles — then those routes register live, keys resolving per request
  83. # through their apiKeyEnv references, and drop again when the section empties.
  84. # Supplying those profiles is exactly what the web Models page does. Which
  85. # adapters exist is composition; which providers run is the user's settings
  86. # document.
  87. - id: llm-pi-ai
  88. name: '@deepseek-ai/dsh-llm-pi-ai'
  89. - id: session-persistence-jsonl
  90. name: '@deepseek-ai/dsh-session-persistence-jsonl'
  91. config:
  92. root: !!js dshHomePath('sessions')
  93. # Durable image bytes live outside the append-only session log. Messages
  94. # keep content-addressed references that this shared backend resolves for
  95. # provider requests and authorized history reads.
  96. - id: attachment-local
  97. name: '@deepseek-ai/dsh-attachment-local'
  98. # Full-text session search is opt-in. `openAt: never` keeps
  99. # ctx.sessionQuery mounted — exact reads, titles, and lineage traces
  100. # (session export, subagent-fork Workspace inheritance) stay available —
  101. # while search calls fail with SESSION_QUERY_SEARCH_DISABLED and SQLite is
  102. # never opened; the Web sidebar search matches titles and workspace names
  103. # only. Deployments enabling content search override `openAt` to
  104. # `first-search` or `startup` in a later patch layer (profile
  105. # cordis.patch.yml or a --patch overlay), typically with a durable `path`.
  106. - id: session-query-sqlite
  107. name: '@deepseek-ai/dsh-session-query-sqlite'
  108. config:
  109. path: ':memory:'
  110. openAt: never
  111. # Shared projection registry: subagent catalog identity (mode/label) folds
  112. # through its registered units, so the `list_agents` surface below fails
  113. # loud without it; web layers reuse this same mount for list rows.
  114. - id: session-projection
  115. name: '@deepseek-ai/dsh-session-projection'
  116. # Durable KV storage: the storage hub, the json backend, and the
  117. # schema-validated domain form over them. Session-layer persistence (the
  118. # projection cache below; workspace in web layers)
  119. # routes through this stack, so it belongs to the shared base.
  120. - id: storage
  121. name: '@deepseek-ai/dsh-storage'
  122. - id: storage-json
  123. name: '@deepseek-ai/dsh-storage-json'
  124. config:
  125. root: !!js dshHomePath('storages')
  126. - id: storage-domain
  127. name: '@deepseek-ai/dsh-storage-domain'
  128. config:
  129. backend: json
  130. # Persisted projection cache: throttled write-behind over the
  131. # session_projcache domain (per-record layout — one version-stamped
  132. # checkpoint document per session), serving the session listing's
  133. # projection column.
  134. - id: session-projection-cache
  135. name: '@deepseek-ai/dsh-session-projection-cache'
  136. config:
  137. writeEveryEvents: 200
  138. writeIntervalMs: 5000
  139. # OTel releases a Session-log prefix only after explicit user feedback,
  140. # regardless of model provider. Ordinary activity never triggers capture.
  141. # DSH_TELEMETRY_OTLP_URL overrides the production endpoint. A non-empty
  142. # DSH_TELEMETRY_DISABLED — any value, including '0'/'false' — opts the
  143. # process out (the launchers patch the row disabled; config cannot disable
  144. # a row). Exports carry the harness home's anonymous user id ($DSH_HOME/.anonymous-user-id,
  145. # random UUID; delete the file to reset the identity) as the Resource's
  146. # user.id. The exporter/processor values normally bound the shutdown drain
  147. # to ~1s against an unreachable collector: exporter.timeoutMillis is both
  148. # the per-attempt socket timeout and the retry deadline (1s effectively
  149. # disables the SDK's 5-try backoff), while maxExportBatchSize == maxQueueSize
  150. # (both explicit) makes the drain a single batch. The SDK awaits
  151. # exporter.forceFlush() outside exportTimeoutMillis, so the backend's 3s
  152. # shutdownTimeoutMillis is the load-bearing outer bound when a transport
  153. # promise never settles. Every CLI exit path drains it by disposing the root
  154. # on SIGINT/SIGTERM.
  155. - id: session-telemetry-otel
  156. name: '@deepseek-ai/dsh-session-telemetry-otel'
  157. config:
  158. mode: !!js process.env.DSH_TELEMETRY_MODE || 'FEEDBACK_ONLY'
  159. shutdownTimeoutMillis: 3000
  160. exporter:
  161. url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
  162. compression: gzip
  163. timeoutMillis: 1000
  164. processor:
  165. scheduledDelayMillis: 10000
  166. maxQueueSize: 2048
  167. maxExportBatchSize: 2048
  168. exportTimeoutMillis: 1500
  169. - id: subprocess
  170. name: '@deepseek-ai/dsh-subprocess-local'
  171. # Every shipped CLI mode starts with the same file-effect boundary.
  172. # The environment remains an explicit deployment override; otherwise fresh
  173. # sessions pin workspace-write + ask through the permission service below.
  174. - id: sandbox
  175. name: '@deepseek-ai/dsh-sandbox-local'
  176. - id: sandbox-policy
  177. name: '@deepseek-ai/dsh-sandbox-policy'
  178. config:
  179. mode: !!js process.env.DSH_PERMISSION_MODE ?? 'workspace-write'
  180. workspaceRoot: !!js process.cwd()
  181. - id: bash-sandbox
  182. name: '@deepseek-ai/dsh-bash-sandbox'
  183. disabled: !!js process.platform === 'win32'
  184. config:
  185. timeoutMs: 60000
  186. - id: pwsh-sandbox
  187. name: '@deepseek-ai/dsh-pwsh-sandbox'
  188. disabled: !!js process.platform !== 'win32'
  189. - id: approval
  190. name: '@deepseek-ai/dsh-user-approval'
  191. config:
  192. policy: !!js "(process.env.DSH_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask'"
  193. - id: permission
  194. name: '@deepseek-ai/dsh-permission-presets'
  195. config:
  196. presets:
  197. read-only:
  198. sandbox: read-only
  199. approval: ask
  200. workspace-write:
  201. sandbox: workspace-write
  202. approval: ask
  203. danger-full-access:
  204. sandbox: danger-full-access
  205. approval: never
  206. - id: shell-env
  207. name: '@deepseek-ai/dsh-shell-env'
  208. - id: tool-bash
  209. name: '@deepseek-ai/dsh-tool-bash'
  210. disabled: !!js process.platform === 'win32'
  211. - id: tool-pwsh
  212. name: '@deepseek-ai/dsh-tool-pwsh'
  213. disabled: !!js process.platform !== 'win32'
  214. - id: tool-jobs
  215. name: '@deepseek-ai/dsh-tool-jobs'
  216. - id: fs-observation-policy
  217. name: '@deepseek-ai/dsh-fs-observation-policy'
  218. - id: tool-fs
  219. name: '@deepseek-ai/dsh-tool-fs'
  220. - id: tool-fs-search
  221. name: '@deepseek-ai/dsh-tool-fs-search'
  222. config:
  223. sampleOverCapGlobResults: false
  224. - id: agent-instructions
  225. name: '@deepseek-ai/dsh-agent-instructions'
  226. config:
  227. maxBytes: 65536
  228. - id: skill
  229. name: '@deepseek-ai/dsh-skill'
  230. - id: skill-filesystem
  231. name: '@deepseek-ai/dsh-skill-filesystem'
  232. - id: skill-badge
  233. name: '@deepseek-ai/dsh-skill-badge'
  234. disabled: true
  235. - id: tool-skill
  236. name: '@deepseek-ai/dsh-tool-skill'
  237. - id: commands
  238. name: '@deepseek-ai/dsh-commands'
  239. - id: command-feedback
  240. name: '@deepseek-ai/dsh-command-feedback'
  241. - id: goal
  242. name: '@deepseek-ai/dsh-goal'
  243. - id: goal-round-driver
  244. name: '@deepseek-ai/dsh-goal-round-driver'
  245. - id: command-goal
  246. name: '@deepseek-ai/dsh-command-goal'
  247. - id: plan-mode
  248. name: '@deepseek-ai/dsh-plan-mode'
  249. config:
  250. section: |
  251. 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.
  252. 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.
  253. 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.
  254. 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.
  255. 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.
  256. 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.
  257. - id: token-meter
  258. name: '@deepseek-ai/dsh-token-meter'
  259. - id: compaction-basic
  260. name: '@deepseek-ai/dsh-compaction-basic'
  261. # Human `/compact`: one useful reduction below the automatic threshold. Backend
  262. # independent, so it follows whichever compaction service this leaf mounts.
  263. - id: command-compact
  264. name: '@deepseek-ai/dsh-command-compact'
  265. - id: subagent
  266. name: '@deepseek-ai/dsh-subagent'
  267. - id: subagent-spawn-in-process
  268. name: '@deepseek-ai/dsh-subagent-spawn-in-process'
  269. config:
  270. providerName: spawn
  271. - id: subagent-fork-in-process
  272. name: '@deepseek-ai/dsh-subagent-fork-in-process'
  273. config:
  274. providerName: fork
  275. # Continuable background children are selected per delegation tool. The
  276. # separately loaded follow-up tool registers the one global `send_message`.
  277. - id: tool-subagent-control
  278. name: '@deepseek-ai/dsh-tool-subagent-control'
  279. - id: tool-subagent-list-agents
  280. name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
  281. - id: tool-subagent
  282. name: '@deepseek-ai/dsh-tool-subagent'
  283. config:
  284. provider: spawn
  285. toolName: subagent
  286. backgroundMode: continuable
  287. # Fork omits model selection so provider/model stay equal to the parent and
  288. # the inherited history remains eligible for KV Cache reuse. This base row
  289. # stays one-shot; preset layers may select continuable mode without adding a
  290. # child-only system-prompt section or tool schema ahead of that history.
  291. # See .agents/notes/implemented/feature/2026-08-18-model-selected-subagent-routes.md
  292. # and .agents/notes/implemented/architecture/2026-08-10-fork-children-stay-one-shot.md.
  293. - id: tool-subagent-fork
  294. name: '@deepseek-ai/dsh-tool-subagent'
  295. config:
  296. provider: fork
  297. toolName: subagent_fork
  298. backgroundMode: one-shot
  299. - id: workflow-worker-thread
  300. name: '@deepseek-ai/dsh-workflow-worker-thread'
  301. config:
  302. provider: spawn
  303. - id: tool-workflow
  304. name: '@deepseek-ai/dsh-tool-workflow'
  305. - id: timeout-policy
  306. name: '@deepseek-ai/dsh-tool-call-timeout-policy'
  307. - id: spill-local
  308. name: '@deepseek-ai/dsh-spill-local'
  309. - id: spill-policy
  310. name: '@deepseek-ai/dsh-spill-policy'
  311. config:
  312. maxInlineBytes: 50000
  313. # Durability checkpoints before each model request and top-level dispatch.
  314. - id: session-checkpoint-policy
  315. name: '@deepseek-ai/dsh-session-checkpoint-policy'
  316. # Compacts oversized tool results before the broader conversation compactor
  317. # runs, preserving the model-visible result within the configured budget.
  318. - id: tool-result-pruner
  319. name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
  320. config:
  321. thresholdChars: 8192
  322. headChars: 4096
  323. tailChars: 1024
  324. - id: tool-todo
  325. name: '@deepseek-ai/dsh-tool-todo'
  326. config:
  327. allowParallelInProgress: true
  328. # Persisted same-session goals reach the model and the slash menu here; the
  329. # domain, driver, and `/goal` command are above.
  330. - id: tool-goal
  331. name: '@deepseek-ai/dsh-tool-goal'
  332. # Fresh-agent Ralph iteration over a build-time-fixed script.
  333. - id: tool-ralph
  334. name: '@deepseek-ai/dsh-tool-ralph'
  335. config:
  336. subagentProvider: spawn
  337. maxRounds: 64
  338. # Consecutive-repeat reminders on the tool chain.
  339. - id: repeat-tool-reminder
  340. name: '@deepseek-ai/dsh-repeat-tool-reminder'
  341. config:
  342. thresholds: [3, 5, 8]
  343. argumentsPreviewChars: 500
  344. # The shared base enables the stable model-facing web_search and web_fetch
  345. # tools. The Web app disables this host row and composes both tools per agent
  346. # preset; products with a stricter network policy override tool-web. DeepSeek
  347. # search resolves the same DEEPSEEK_API_KEY
  348. # credential the Models page manages for chat, at each search; its Messages
  349. # endpoint is separate from the chat-completions endpoint, so it takes its own
  350. # base-URL override. Anonymous fetch accepts only public HTTP(S) destinations,
  351. # resolves and validates every destination, and pins every actual connection.
  352. # Search is a full auxiliary model request with server-side retrieval, so this
  353. # shipped DeepSeek route gets 60s while the provider-neutral tool default
  354. # remains 30s.
  355. - id: web
  356. name: '@deepseek-ai/dsh-web'
  357. config:
  358. searchProvider: deepseek-official
  359. fetchProvider: http
  360. - id: web-search-deepseek
  361. name: '@deepseek-ai/dsh-web-search-deepseek'
  362. config:
  363. apiKeyEnv: DEEPSEEK_API_KEY
  364. - id: web-fetch-http
  365. name: '@deepseek-ai/dsh-web-fetch-http'
  366. - id: tool-web
  367. name: '@deepseek-ai/dsh-tool-web'
  368. config:
  369. fetch: true
  370. searchTimeoutMs: 60000
  371. # ── rows every mode mounts, whose values each overlay may state ──────────────
  372. # The tool registry. Presentation mode is a deployment choice; omitting it here
  373. # keeps the schema default (native).
  374. - id: tools
  375. name: '@deepseek-ai/dsh-tools'
  376. # The deployment persona is a deployment choice; plan-mode and tool plugins own
  377. # their own prompt sections.
  378. - id: system-prompt
  379. name: '@deepseek-ai/dsh-system-prompt'
  380. config:
  381. personaPrefix: ''
  382. # Agents created at startup. The base stays empty; raw overlays may create
  383. # agents, while Web creates sessions on client request.
  384. - id: agent-loop
  385. name: '@deepseek-ai/dsh-agent-loop'
  386. config:
  387. agents: []
  388. # The sandboxed filesystem provider. `cwd` defaults to `process.cwd()`; an
  389. # overlay can pin another workspace.
  390. - id: fs-sandbox
  391. name: '@deepseek-ai/dsh-fs-sandbox'
  392. # The native DeepSeek adapter. No key or endpoint is inlined: both resolve per
  393. # request from the `llm-deepseek:` settings section over this entry, with the
  394. # key coming from the credential store below. Thinking defaults are a deployment
  395. # choice.
  396. - id: llm-deepseek
  397. name: '@deepseek-ai/dsh-llm-deepseek'