cordis.patch.yml 20 KB

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