cordis.patch.yml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. # The dsh-web-app bundle patch: the browser surface over the dsh-base layer.
  2. # Applied after dsh-base's insert; rows here override base rows by id, with
  3. # the profile's own cordis.patch.yml and any --patch overlays still to come.
  4. #
  5. # A patch replaces the targeted row's whole `config`, so each row below
  6. # restates every key it owns.
  7. #
  8. # The web-startup plugin injects `cmdlineArgs` and provides `webStartup` as an
  9. # ordinary Cordis service. Rows configured from flags inject that service, so
  10. # Loader resolves their expressions only after it exists. The web runtime then
  11. # provides bind-dependent `webRuntime` values to the trust fence.
  12. # `dsh --profile web --help` provides neither service, so no server binds.
  13. # ── surface-specific values the base deliberately omits ─────────────────────
  14. - id: system-prompt
  15. config:
  16. persona: >-
  17. You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
  18. # Full-text session search is opt-in (the base row's `openAt: never`). This
  19. # restatement keeps the Web values on one ephemeral in-memory index; a
  20. # deployment enabling content search overrides `openAt` to `first-search` in a
  21. # later patch layer, which defers the node:sqlite import and in-memory handle
  22. # to the first search so Node 22 startup stays quiet.
  23. - id: session-query-sqlite
  24. config:
  25. path: ':memory:'
  26. openAt: never
  27. - id: tools
  28. config:
  29. # TEMPORARY workaround: DSH_TOOLS_MODE (native|ptc|both) opts a whole dsh
  30. # process into PTC mode while per-session tool-presentation selection is being
  31. # designed; unset keeps the schema default (native). Remove the env seam
  32. # once the web UI owns the choice per session.
  33. mode: !!js process.env.DSH_TOOLS_MODE
  34. # ── web-only host rows, the transport layer, and the browser roster ─────────
  35. # `dsh.client` rows are the browser roster the modules node half scans into
  36. # window.__DSH_BOOT__; the modules row is simultaneously a host row.
  37. - insert:
  38. # Host-owned opt-in sampled when a new Web session receives its preset
  39. # delegation tools. The Plugins page edits this settings namespace.
  40. - id: subagent-model-selection-settings
  41. name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
  42. - id: code-runtime
  43. name: '@deepseek-ai/dsh-code-runtime-worker-thread'
  44. - id: message-feedback
  45. name: '@deepseek-ai/dsh-message-feedback'
  46. config:
  47. maxNoteBytes: 8192
  48. # Browser Session export: `/export` command plus the shared download dialog.
  49. - id: session-log-download
  50. name: '@deepseek-ai/dsh-session-log-export'
  51. - id: workspace
  52. name: '@deepseek-ai/dsh-workspace'
  53. - id: session-reference
  54. name: '@deepseek-ai/dsh-session-reference'
  55. - id: file-reference-local
  56. name: '@deepseek-ai/dsh-file-reference-local'
  57. # Whole-log turn/step counts for the chat stats strip (the sessionStats
  58. # projection key); the projection registry itself is a base-layer row.
  59. - id: session-stats
  60. name: '@deepseek-ai/dsh-session-stats'
  61. # Whole-log turn outline for the chat turn rail (the turnOutline
  62. # projection key): every turn stays navigable before its events page in.
  63. - id: session-turn-outline
  64. name: '@deepseek-ai/dsh-session-turn-outline'
  65. # Resolve bind host, SSH launch, and display once at boot, then mount the
  66. # matching dual-face directory picker. Mount -native or -browse directly in
  67. # an overlay to pin the interaction.
  68. - id: directory-picker
  69. name: '@deepseek-ai/dsh-host-directory-picker-auto'
  70. # Read-only projection of current Loader entries for trusted client RPCs.
  71. - id: plugin-inventory
  72. name: '@deepseek-ai/dsh-host-plugin-inventory'
  73. # Session commands, cold reads, and live control over Typert Remote.
  74. - id: session-controller
  75. name: '@deepseek-ai/dsh-api-session-controller'
  76. # Configuration-surface reads and writes over Typert Remote. Each method
  77. # reports an actionable error when its settings-domain provider is absent.
  78. - id: settings-controller
  79. name: '@deepseek-ai/dsh-api-settings-controller'
  80. # Workspace commands and reconnect-safe projection over Typert Remote.
  81. - id: workspace-controller
  82. name: '@deepseek-ai/dsh-api-workspace-controller'
  83. - id: cordis-host-runner
  84. name: '@deepseek-ai/dsh-cordis-host-runner'
  85. # Ordinary provider for the parsed Web flags. Its plugin-level injection
  86. # waits for cmdlineArgs; no launcher metadata or special row kind is needed.
  87. - id: web-startup
  88. name: '@deepseek-ai/dsh-web-app/startup'
  89. # ── layer 2: transport/service ──────────────────────────────────────────────
  90. # Plain route-registration carrier; host and port come from the app's
  91. # webStartup provider, with these deployment fallbacks. The dist is served by
  92. # the web-runtime row below through the fallback seat.
  93. - id: webserver
  94. name: '@deepseek-ai/dsh-host-webserver'
  95. inject: [webStartup]
  96. config:
  97. host: !!js ctx.webStartup.host ?? '127.0.0.1'
  98. port: !!js ctx.webStartup.port ?? 3080
  99. compression: gzip
  100. compressionLevel: 1
  101. compressionThresholdBytes: 1024
  102. # Web glue owned by this bundle: resolves the built frontend dist (an
  103. # assembly fact of dsh-web-app, never user config), mounts the
  104. # frontend-static fallback owner, registers the web-surface prompt
  105. # section and the bash runtime variable, prints the URL line, and opens the
  106. # canonical local URL after the full tree settles. The webStartup provider
  107. # supplies invocation-only values; after the server binds, this row samples
  108. # LAN trust once and provides `webRuntime`. A complete agent-preset persona
  109. # suppresses the prompt section for that agent while retaining the host-owned
  110. # shell variable.
  111. - id: web-runtime
  112. name: '@deepseek-ai/dsh-web-app'
  113. inject: [webStartup]
  114. config:
  115. openBrowser: !!js ctx.webStartup.openBrowser
  116. printUrl: true
  117. surfaceContext: true
  118. trustedHosts: !!js ctx.webStartup.trustedHosts
  119. # The client-plugin reload chain, always mounted: it is idle until a
  120. # rebuild watcher (pnpm run dev:web) actually rewrites client bundles. It
  121. # is a row rather than a child of web-runtime because its node half is a
  122. # client-side package, which a host-side bundle cannot import.
  123. - id: client-hmr
  124. name: '@deepseek-ai/dsh-client-hmr'
  125. # ── browser plugin roster (dsh.client rows; node halves are layer-2 hosts) ──
  126. # Dual-face: the node half scans this tree, composes window.__DSH_BOOT__,
  127. # and serves /plugins/<id>/client.js; the browser half is the module table
  128. # the shell kernel constructs before cordis exists (adopted as a plugin
  129. # entry by the kernel, never fetched).
  130. - id: modules
  131. name: '@deepseek-ai/dsh-client-modules'
  132. # Owns both ends of the web transport: node half binds the gateway to the
  133. # webserver under /api; browser half is the fetch/SSE client.
  134. - id: connection
  135. name: '@deepseek-ai/dsh-client-connection'
  136. inject: [webRuntime]
  137. config:
  138. # LAN literals derived from the active bind plus --trusted-host extras.
  139. # A deployment adding authorities keeps this expression and concatenates
  140. # its literals, for example: ['app.internal', ...ctx.webRuntime.trustedHosts].
  141. trustedHosts: !!js ctx.webRuntime.trustedHosts
  142. # Raw Blob and ReadableStream uploads run independently of Connection's
  143. # RPC and generation service.
  144. - id: file-upload
  145. name: '@deepseek-ai/dsh-client-file-upload'
  146. - id: api-remotes
  147. name: '@deepseek-ai/dsh-api-remotes'
  148. - id: cordis-client-runner
  149. name: '@deepseek-ai/dsh-cordis-client-runner'
  150. - id: ui-theme
  151. name: '@deepseek-ai/dsh-client-ui-theme'
  152. - id: locale
  153. name: '@deepseek-ai/dsh-client-locale'
  154. - id: ui-layout
  155. name: '@deepseek-ai/dsh-client-ui-layout'
  156. - id: ui-renderer
  157. name: '@deepseek-ai/dsh-client-ui-renderer'
  158. - id: ui-session
  159. name: '@deepseek-ai/dsh-client-ui-session'
  160. - id: ui-sidebar
  161. name: '@deepseek-ai/dsh-client-ui-sidebar'
  162. - id: ui-settings
  163. name: '@deepseek-ai/dsh-client-ui-settings'
  164. - id: ui-settings-general
  165. name: '@deepseek-ai/dsh-client-ui-settings-general'
  166. - id: ui-settings-models
  167. name: '@deepseek-ai/dsh-client-ui-settings-models'
  168. - id: ui-settings-plugin-inventory
  169. name: '@deepseek-ai/dsh-client-ui-settings-plugin-inventory'
  170. - id: ui-conversation
  171. name: '@deepseek-ai/dsh-client-ui-conversation'
  172. - id: ui-approval
  173. name: '@deepseek-ai/dsh-client-ui-approval'
  174. - id: ui-chat
  175. name: '@deepseek-ai/dsh-client-ui-chat'
  176. # Official occupants for the generic sidebar and conversation brand slots.
  177. - id: ui-brand-official
  178. name: '@deepseek-ai/dsh-client-ui-brand-official'
  179. - id: ui-attachment
  180. name: '@deepseek-ai/dsh-client-ui-attachment'
  181. # Tool call tree, generic fallback, and keyed business Tool views.
  182. - id: ui-tool
  183. name: '@deepseek-ai/dsh-client-ui-tool'
  184. - id: ui-cordis
  185. name: '@deepseek-ai/dsh-client-ui-cordis'
  186. # Durable workflow lifecycle as an independent Chat node after the
  187. # existing generic workflow tool row.
  188. - id: ui-workflow-run
  189. name: '@deepseek-ai/dsh-client-ui-workflow-run'
  190. # Turn tail: the produced-files row under each closing assistant message.
  191. # Remove this entry to turn the surface off; the tail hole renders empty.
  192. - id: ui-deliverables
  193. name: '@deepseek-ai/dsh-client-ui-deliverables'
  194. - id: ui-workspace
  195. name: '@deepseek-ai/dsh-client-ui-workspace'
  196. # Input triggers: the '/' | '@' pipeline (ui-input-trigger), the command surface over
  197. # it (ui-commands), and the reference sources (ui-skill / ui-reference).
  198. - id: ui-input-trigger
  199. name: '@deepseek-ai/dsh-client-ui-input-trigger'
  200. - id: ui-commands
  201. name: '@deepseek-ai/dsh-client-ui-commands'
  202. - id: ui-skill
  203. name: '@deepseek-ai/dsh-client-ui-skill'
  204. - id: ui-subagent
  205. name: '@deepseek-ai/dsh-client-ui-subagent'
  206. - id: ui-reference
  207. name: '@deepseek-ai/dsh-client-ui-reference'
  208. # Read-only active Schedule catalog. The shipped Web graph resolves the
  209. # client package but leaves it disabled; the explicit Schedule overlay
  210. # enables this same row together with the host Schedule services.
  211. - id: ui-schedule
  212. name: '@deepseek-ai/dsh-client-ui-schedule'
  213. disabled: true
  214. # Background jobs: the session-header list over the jobsBySession mirror.
  215. - id: ui-jobs
  216. name: '@deepseek-ai/dsh-client-ui-jobs'
  217. # Goal surface: GoalBar in the input dock over the goal session projection.
  218. - id: ui-goal
  219. name: '@deepseek-ai/dsh-client-ui-goal'
  220. # Per-message feedback: Like/Dislike plus an optional note in the
  221. # assistant-message action strip, over the messageFeedback Remote.
  222. - id: ui-message-feedback
  223. name: '@deepseek-ai/dsh-client-ui-message-feedback'
  224. # Model selection: the /model popupSelect + composer seat over session.models.
  225. - id: ui-model-selection
  226. name: '@deepseek-ai/dsh-client-ui-model-selection'
  227. - id: ui-permission
  228. name: '@deepseek-ai/dsh-client-ui-permission-presets'
  229. # The agent-preset row in General settings: the default preset for
  230. # sessions created later. Absent a roster it renders nothing.
  231. - id: ui-agent-preset
  232. name: '@deepseek-ai/dsh-client-ui-agent-preset'
  233. # Plugin configuration: the host-plane sections a user owns, as expandable
  234. # cards. A namespace this deployment does not expose renders nothing.
  235. - id: ui-settings-plugins
  236. name: '@deepseek-ai/dsh-client-ui-settings-plugins'
  237. # Plan control: the composer plan seat over the plan projection + /plan channel.
  238. - id: ui-plan
  239. name: '@deepseek-ai/dsh-client-ui-plan'
  240. - id: ui-user-questions
  241. name: '@deepseek-ai/dsh-client-ui-user-questions'
  242. - id: ui-trajectory
  243. name: '@deepseek-ai/dsh-client-ui-trajectory'
  244. # ── the agent plane moves behind agent presets ─────────────────────────────
  245. #
  246. # Every row below composes what ONE agent contributes to the host registries:
  247. # its tools, its prompt sections, its delegation backends. The base keeps them
  248. # for the TUI, which is single-session and composes its agent process-wide; the
  249. # Web surface disables them here and lets each session mount a preset instead.
  250. #
  251. # Disabling rather than deleting is deliberate: the base is shared, and a row
  252. # absent from a surface overlay would silently reappear the day someone reorders
  253. # the composition.
  254. # `shell-env` STAYS in the host plane: `apps/cli/src/web.ts` injects it to
  255. # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
  256. # the criterion for host-plane ownership — injection resolves before any session
  257. # exists, so there is no agent to key by. Behind a preset realm those variables
  258. # would never reach the model's shell at all.
  259. - id: tool-bash
  260. disabled: true
  261. - id: tool-pwsh
  262. disabled: true
  263. # The background-job REGISTRY stays on the host plane; only the model-facing
  264. # `job_*` controls move. Its producers — `tool-bash` here, `tool-terminal` and a
  265. # non-continuable `tool-subagent` elsewhere — are preset rows that resolve it
  266. # with `ctx.get`, and an entry-local realm around the registry is invisible to
  267. # every sibling row outside that realm, so `run_in_background` answered
  268. # "background jobs unavailable" while the controls sat in the catalog. That is
  269. # the `goals` criterion read from inside the preset: a Service a row outside its
  270. # realm READS belongs to the plane both can see. The registry is keyed by owning
  271. # agent, so one host instance serves every session exactly as before presets.
  272. - id: tool-jobs
  273. disabled: true
  274. - id: tool-fs
  275. disabled: true
  276. - id: tool-fs-search
  277. disabled: true
  278. - id: tool-str-replace-editor
  279. disabled: true
  280. # The `skill` REGISTRY stays in the host plane. It is host+per-scope layered
  281. # (the tools-registry shape): deployment-level providers — repository plugins,
  282. # a host skill-filesystem row — register into its global layer, while a preset's
  283. # `skill-filesystem` registers into that preset's layer, and each agent reads the
  284. # merged catalog its scope chain selects. Only the per-agent rows move behind
  285. # presets: the base host `skill-filesystem` row is disabled here (presets own local
  286. # discovery), and `tool-skill` is what a preset mounts to give its agent the
  287. # catalog and loader at all.
  288. - id: skill-filesystem
  289. disabled: true
  290. - id: tool-skill
  291. disabled: true
  292. # The goal service and session driver stay on the host plane, where Gateway
  293. # remotes resolve them. Presets own the human command and model-facing tool.
  294. - id: command-goal
  295. disabled: true
  296. - id: tool-goal
  297. disabled: true
  298. - id: plan-mode
  299. disabled: true
  300. # The token METER stays on the host plane; only the compaction backend that
  301. # reads it moves. It owns the context-meter projection units, and that table is
  302. # process-wide, so preset ownership would make the meter a function of which
  303. # presets happen to be mounted rather than a per-session fact. Same criterion as
  304. # `tasks` and `goals`; the reasoning has one home in
  305. # `.agents/notes/implemented/architecture/2026-08-10-host-plane-ownership-after-presets.md`.
  306. - id: compaction-basic
  307. disabled: true
  308. - id: command-compact
  309. disabled: true
  310. - id: tool-result-pruner
  311. disabled: true
  312. # The subagent registry and its backends STAY in the host plane. `subagents` is
  313. # a process singleton with a cross-session query surface (`listChildren`,
  314. # `followup`) that the host api-proxy serves to the browser, and a provider
  315. # registers under a globally unique name, so a per-session copy would both
  316. # starve that host row and collide on the second session. What a preset
  317. # chooses is which delegation TOOLS its agent sees, below.
  318. - id: tool-subagent-control
  319. disabled: true
  320. - id: tool-subagent-list-agents
  321. disabled: true
  322. - id: tool-subagent
  323. disabled: true
  324. - id: tool-subagent-fork
  325. disabled: true
  326. - id: workflow-worker-thread
  327. disabled: true
  328. - id: tool-workflow
  329. disabled: true
  330. - id: tool-ralph
  331. disabled: true
  332. - id: agent-instructions
  333. disabled: true
  334. - id: tool-todo
  335. disabled: true
  336. - id: tool-web
  337. disabled: true
  338. # The preset roster. The shipped presets are bundled inside
  339. # `dsh-agent-presets` itself and prepended as a read-only `system` root
  340. # (`includeShippedRoot`); `$DSH_HOME/.agent-presets` is where a person — or an
  341. # agent — authors their own, appended by the same package (`includeUserRoot`),
  342. # and carries the same trust as shell access because a preset IS a
  343. # composition. This row only names the default and any deployment-added
  344. # `roots`; no launcher patching is involved.
  345. - insert:
  346. - id: agent-presets
  347. name: '@deepseek-ai/dsh-agent-presets'
  348. config:
  349. default: standard