返回 CodeWhale
cordis.patch.yml
根目录 / scripts / fixtures / dsh-web-app / cordis.patch.yml
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
14 # ── surface-specific values the base deliberately omits ─────────────────────
15
16 - id: system-prompt
17 config:
18 personaSuffix: Your working directory is {{cwd}}.
19 personaPrefix: >-
20 You are a coding agent powered by the {{model}} model.
21
22 # Full-text session search is opt-in (the base row's `openAt: never`). This
23 # restatement keeps the Web values on one ephemeral in-memory index; a
24 # deployment enabling content search overrides `openAt` to `first-search` in a
25 # later patch layer, which defers the node:sqlite import and in-memory handle
26 # to the first search so Node 22 startup stays quiet.
27 - id: session-query-sqlite
28 config:
29 path: ':memory:'
30 openAt: never
31
32 - id: tools
33 config:
34 # TEMPORARY workaround: DSH_TOOLS_MODE (native|ptc|both) opts a whole dsh
35 # process into PTC mode while per-session tool-presentation selection is being
36 # designed; unset keeps the schema default (native). Remove the env seam
37 # once the web UI owns the choice per session.
38 mode: !!js process.env.DSH_TOOLS_MODE
39
40 # ── web-only host rows, the transport layer, and the browser roster ─────────
41
42 # `dsh.client` rows are the browser roster the modules node half scans into
43 # window.__DSH_BOOT__; the modules row is simultaneously a host row.
44 - insert:
45 # Host-owned opt-in sampled when a new Web session receives its preset
46 # delegation tools. The Plugins page edits this settings namespace.
47 - id: subagent-model-selection-settings
48 name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
49
50 - id: message-feedback
51 name: '@deepseek-ai/dsh-message-feedback'
52 config:
53 maxNoteBytes: 8192
54
55 # Browser Session export: `/export` command plus the shared download dialog.
56 - id: session-log-download
57 name: '@deepseek-ai/dsh-session-log-export'
58
59 # Session-header "Open In..." split button over the host application
60 # resolution (macOS/Windows/Linux; a host with no resolved application
61 # renders no button). Two halves: the host routes and the browser surface.
62 - id: open-in-app
63 name: '@deepseek-ai/dsh-host-open-in-app'
64 config:
65 probeTimeoutMs: 10000
66 iconTimeoutMs: 10000
67 launchWatchMs: 1000
68
69 - id: ui-open-in-app
70 name: '@deepseek-ai/dsh-client-ui-open-in-app'
71
72 - id: workspace
73 name: '@deepseek-ai/dsh-workspace'
74
75 - id: session-reference
76 name: '@deepseek-ai/dsh-session-reference'
77
78 - id: file-reference-local
79 name: '@deepseek-ai/dsh-file-reference-local'
80
81 # Whole-log turn/step counts for the chat stats strip (the sessionStats
82 # projection key); the projection registry itself is a base-layer row.
83 - id: session-stats
84 name: '@deepseek-ai/dsh-session-stats'
85
86 # Whole-log turn outline for the chat turn rail (the turnOutline
87 # projection key): every turn stays navigable before its events page in.
88 - id: session-turn-outline
89 name: '@deepseek-ai/dsh-session-turn-outline'
90
91 # Resolve bind host, SSH launch, and display once at boot, then mount the
92 # matching dual-face directory picker. Mount -native or -browse directly in
93 # an overlay to pin the interaction.
94 - id: directory-picker
95 name: '@deepseek-ai/dsh-host-directory-picker-auto'
96
97 # Read-only projection of current Loader entries for trusted client RPCs.
98 - id: plugin-inventory
99 name: '@deepseek-ai/dsh-host-plugin-inventory'
100
101 # Session commands, cold reads, and live control over Typert Remote.
102 - id: session-controller
103 name: '@deepseek-ai/dsh-api-session-controller'
104
105 # One background job's observation record streamed over Typert Remote;
106 # the roster rides the session control stream above.
107 - id: job-controller
108 name: '@deepseek-ai/dsh-api-job-controller'
109 # Workspace file service: bounded read, directory listing, and the
110 # agent-write change feed inside the session workspace root.
111 - id: terminal-controller
112 name: '@deepseek-ai/dsh-api-terminal-controller'
113 - id: workspace-files
114 name: '@deepseek-ai/dsh-api-workspace-files'
115
116 # Configuration-surface reads and writes over Typert Remote. Each method
117 # reports an actionable error when its settings-domain provider is absent.
118 - id: ui-settings-account
119 name: '@deepseek-ai/dsh-client-ui-settings-account'
120
121 - id: account-controller
122 name: '@deepseek-ai/dsh-api-account-controller'
123
124 - id: settings-controller
125 name: '@deepseek-ai/dsh-api-settings-controller'
126
127 # Workspace commands and reconnect-safe projection over Typert Remote.
128 - id: workspace-controller
129 name: '@deepseek-ai/dsh-api-workspace-controller'
130
131 - id: cordis-host-runner
132 name: '@deepseek-ai/dsh-cordis-host-runner'
133
134 # The Host inspect providers are process-global: the registry rejects a
135 # duplicate id, so they register here once and every preset's `tool-cordis`
136 # row reads them.
137 - id: cordis-inspect-providers
138 name: '@deepseek-ai/dsh-tool-cordis/host'
139
140 # Ordinary provider for the parsed Web flags. Its plugin-level injection
141 # waits for cmdlineArgs; no launcher metadata or special row kind is needed.
142 - id: web-startup
143 name: '@deepseek-ai/dsh-web-app/startup'
144
145 # ── layer 2: transport/service ──────────────────────────────────────────────
146
147 # Plain route-registration carrier; host and port come from the app's
148 # webStartup provider, with these deployment fallbacks. The dist is served by
149 # the web-runtime row below through the fallback seat.
150 - id: webserver
151 name: '@deepseek-ai/dsh-host-webserver'
152 inject: [webStartup]
153 config:
154 host: !!js ctx.webStartup.host ?? '127.0.0.1'
155 port: !!js ctx.webStartup.port ?? 3080
156 compression: gzip
157 compressionLevel: 1
158 compressionThresholdBytes: 1024
159
160 # Web glue owned by this bundle: resolves the built frontend dist (an
161 # assembly fact of dsh-web-app, never user config), mounts the
162 # frontend-static fallback owner, registers the web-surface prompt
163 # section and the bash runtime variable, prints the URL line, and opens the
164 # canonical local URL after the full Loader tree settles and the required-
165 # entry audit passes. The
166 # webStartup provider supplies invocation-only values; after the server binds, this row samples
167 # LAN trust once and provides `webRuntime`. A complete agent-preset persona
168 # suppresses the prompt section for that agent while retaining the host-owned
169 # shell variable.
170 - id: web-runtime
171 name: '@deepseek-ai/dsh-web-app'
172 inject: [webStartup]
173 config:
174 openBrowser: !!js ctx.webStartup.openBrowser
175 printUrl: true
176 surfaceContext: true
177 trustedHosts: !!js ctx.webStartup.trustedHosts
178
179 # The client-plugin reload chain, always mounted: it is idle until a
180 # rebuild watcher (pnpm run dev:web) actually rewrites client bundles. It
181 # is a row rather than a child of web-runtime because its node half is a
182 # client-side package, which a host-side bundle cannot import.
183 - id: client-hmr
184 name: '@deepseek-ai/dsh-client-hmr'
185
186 # ── browser plugin roster (dsh.client rows; node halves are layer-2 hosts) ──
187
188 # Dual-face: the node half scans this tree, composes window.__DSH_BOOT__,
189 # and serves /plugins/<id>/client.js; the browser half is the module table
190 # the shell kernel constructs before cordis exists (adopted as a plugin
191 # entry by the kernel, never fetched).
192 - id: modules
193 name: '@deepseek-ai/dsh-client-modules'
194
195 # Owns both ends of the web transport: node half binds the gateway to the
196 # webserver under /api; browser half is the fetch/SSE client.
197 - id: connection
198 name: '@deepseek-ai/dsh-client-connection'
199 inject: [webRuntime]
200 config:
201 # LAN literals derived from the active bind plus --trusted-host extras.
202 # A deployment adding authorities keeps this expression and concatenates
203 # its literals, for example: ['app.internal', ...ctx.webRuntime.trustedHosts].
204 trustedHosts: !!js ctx.webRuntime.trustedHosts
205
206 # Raw Blob and ReadableStream uploads run independently of Connection's
207 # RPC and generation service.
208 - id: file-upload
209 name: '@deepseek-ai/dsh-client-file-upload'
210
211 - id: api-remotes
212 name: '@deepseek-ai/dsh-api-remotes'
213
214 - id: cordis-client-runner
215 name: '@deepseek-ai/dsh-cordis-client-runner'
216
217 - id: ui-theme
218 name: '@deepseek-ai/dsh-client-ui-theme'
219
220 - id: locale
221 name: '@deepseek-ai/dsh-client-locale'
222
223 - id: ui-layout
224 name: '@deepseek-ai/dsh-client-ui-layout'
225
226 - id: ui-renderer
227 name: '@deepseek-ai/dsh-client-ui-renderer'
228
229 - id: ui-session
230 name: '@deepseek-ai/dsh-client-ui-session'
231
232 # Unified resource model: protocol providers behind the useResource hook.
233 - id: resources
234 name: '@deepseek-ai/dsh-client-resources'
235
236 - id: ui-sidebar
237 name: '@deepseek-ai/dsh-client-ui-sidebar'
238
239 # The right Sidebar: one docking surface per session over ui-dockkit.
240 - id: ui-sidebar-right
241 name: '@deepseek-ai/dsh-client-ui-sidebar-right'
242
243
244 - id: office-to-pdf
245 name: '@deepseek-ai/dsh-office-to-pdf'
246
247 # The right Sidebar's document tab: bounded file reads with selectable
248 # Markdown, code, HTML, PDF, Office, and plain-text renderers.
249 - id: ui-sidebar-documentpreview
250 name: '@deepseek-ai/dsh-client-ui-sidebar-documentpreview'
251
252 # Web profiles opt in; Desktop retains sandboxed HTTP(S) Browser tabs.
253 - id: ui-sidebar-browser
254 name: '@deepseek-ai/dsh-client-ui-sidebar-browser'
255 disabled: !!js "ctx.get('profileContext')?.name !== 'desktop'"
256
257 - id: ui-sidebar-terminal
258 name: '@deepseek-ai/dsh-client-ui-sidebar-terminal'
259 # The right Sidebar's workspace file tree tab type.
260 - id: ui-sidebar-files
261 name: '@deepseek-ai/dsh-client-ui-sidebar-files'
262
263 - id: ui-settings
264 name: '@deepseek-ai/dsh-client-ui-settings'
265
266 - id: ui-settings-general
267 name: '@deepseek-ai/dsh-client-ui-settings-general'
268
269 - id: ui-settings-models
270 name: '@deepseek-ai/dsh-client-ui-settings-models'
271
272 # Plugin management: the sidebar Plugins page installs, enables, disables,
273 # and removes the profile's bundles through the `pluginManager` Remote.
274 # Without a profile-backed Host it reports itself unavailable.
275 - id: ui-plugin-manager
276 name: '@deepseek-ai/dsh-client-ui-plugin-manager'
277
278 # Read-only Plugin list tab in the Settings Plugins section; the built-in
279 # bundles the sidebar page leaves out are inspected here.
280 - id: ui-settings-plugin-inventory
281 name: '@deepseek-ai/dsh-client-ui-settings-plugin-inventory'
282
283 - id: ui-conversation
284 name: '@deepseek-ai/dsh-client-ui-conversation'
285
286 - id: ui-approval
287 name: '@deepseek-ai/dsh-client-ui-approval'
288
289 - id: ui-chat
290 name: '@deepseek-ai/dsh-client-ui-chat'
291
292 # Official occupants for the generic sidebar and conversation brand slots.
293 - id: ui-brand-official
294 name: '@deepseek-ai/dsh-client-ui-brand-official'
295
296 - id: ui-attachment
297 name: '@deepseek-ai/dsh-client-ui-attachment'
298
299 # Tool call tree, generic fallback, and keyed business Tool views.
300 - id: ui-tool
301 name: '@deepseek-ai/dsh-client-ui-tool'
302
303 - id: ui-cordis
304 name: '@deepseek-ai/dsh-client-ui-cordis'
305
306 # Turn tail: the changed-files card and delivery cards under each closing
307 # assistant message. Remove this entry to turn the surface off; the tail
308 # hole renders empty.
309 - id: ui-deliverables
310 name: '@deepseek-ai/dsh-client-ui-deliverables'
311
312 # Records each top-level turn's changed files from git working-tree
313 # snapshots; the changed-files card above renders its events.
314 - id: workspace-changes
315 name: '@deepseek-ai/dsh-workspace-changes'
316
317
318 - id: ui-workspace
319 name: '@deepseek-ai/dsh-client-ui-workspace'
320
321 # Durable workflow lifecycle as an independent Chat node after the
322 # existing generic workflow tool row.
323 - id: ui-workflow-run
324 name: '@deepseek-ai/dsh-client-ui-workflow-run'
325
326 # Input triggers: the '/' | '@' pipeline (ui-input-trigger), the command surface over
327 # it (ui-commands), and the reference sources (ui-skill / ui-reference).
328 - id: ui-input-trigger
329 name: '@deepseek-ai/dsh-client-ui-input-trigger'
330
331 - id: ui-commands
332 name: '@deepseek-ai/dsh-client-ui-commands'
333
334 - id: ui-skill
335 name: '@deepseek-ai/dsh-client-ui-skill'
336
337 - id: ui-subagent
338 name: '@deepseek-ai/dsh-client-ui-subagent'
339
340 - id: ui-reference
341 name: '@deepseek-ai/dsh-client-ui-reference'
342
343
344 # Background jobs: the session-header roster with on-demand streaming
345 # record panels over the session job-output service.
346 - id: ui-jobs
347 name: '@deepseek-ai/dsh-client-ui-jobs'
348
349 # Read-only active Schedule catalog. The shipped Web graph resolves the
350 # client package but leaves it disabled; the explicit Schedule overlay
351 # enables this same row together with the host Schedule services.
352 - id: ui-schedule
353 name: '@deepseek-ai/dsh-client-ui-schedule'
354 disabled: true
355
356 # Goal surface: GoalBar in the input dock over the goal session projection.
357 - id: ui-goal
358 name: '@deepseek-ai/dsh-client-ui-goal'
359
360 # The feedback surface: Like/Dislike in the assistant-message action
361 # strip, the feedback dialog behind Dislike and /feedback with its
362 # acknowledgement toast, over the messageFeedback and sessionFeedback Remotes.
363 - id: ui-message-feedback
364 name: '@deepseek-ai/dsh-client-ui-message-feedback'
365
366 # Model selection: the /model popupSelect + composer seat over session.models.
367 - id: ui-model-selection
368 name: '@deepseek-ai/dsh-client-ui-model-selection'
369
370 - id: ui-permission
371 name: '@deepseek-ai/dsh-client-ui-permission-presets'
372
373 # The agent-preset row in General settings: the default preset for
374 # sessions created later. Absent a roster it renders nothing.
375 - id: ui-agent-preset
376 name: '@deepseek-ai/dsh-client-ui-agent-preset'
377
378 # The Built-in plugins settings section: the navigation entry and the tab
379 # row the inventory tab registers into. The official configuration pages
380 # are the companion rows below.
381 - id: ui-settings-plugins
382 name: '@deepseek-ai/dsh-client-ui-settings-plugins'
383
384 # The official settings pages: one companion package per host-plane
385 # namespace, each registering its page into the Plugins page while the
386 # Host serves the namespace.
387 - id: ui-settings-shell
388 name: '@deepseek-ai/dsh-client-ui-settings-shell'
389
390 - id: ui-settings-agent-loop
391 name: '@deepseek-ai/dsh-client-ui-settings-agent-loop'
392
393 - id: ui-settings-subagent
394 name: '@deepseek-ai/dsh-client-ui-settings-subagent'
395
396 - id: ui-settings-web-search
397 name: '@deepseek-ai/dsh-client-ui-settings-web-search'
398
399 # Plan control: the composer plan seat over the plan projection + /plan channel.
400 - id: ui-plan
401 name: '@deepseek-ai/dsh-client-ui-plan'
402
403 - id: ui-user-questions
404 name: '@deepseek-ai/dsh-client-ui-user-questions'
405
406 - id: ui-trajectory
407 name: '@deepseek-ai/dsh-client-ui-trajectory'
408
409 # ── the agent plane moves behind agent presets ─────────────────────────────
410 #
411 # Every row below composes what ONE agent contributes to the host registries:
412 # its tools, its prompt sections, its delegation backends. The base keeps them
413 # for the TUI, which is single-session and composes its agent process-wide; the
414 # Web surface disables them here and lets each session mount a preset instead.
415 #
416 # Disabling rather than deleting is deliberate: the base is shared, and a row
417 # absent from a surface overlay would silently reappear the day someone reorders
418 # the composition.
419
420 # `shell-env` STAYS in the host plane: `apps/cli/src/web.ts` injects it to
421 # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
422 # the criterion for host-plane ownership — injection resolves before any session
423 # exists, so there is no agent to key by. Behind a preset realm those variables
424 # would never reach the model's shell at all.
425
426 - id: tool-plugin-manager
427 disabled: true
428
429 - id: tool-bash
430 disabled: true
431
432 - id: tool-pwsh
433 disabled: true
434
435 # The background-job REGISTRY stays on the host plane; only the model-facing
436 # `job_*` controls move. Its producers — `tool-bash` here, `tool-terminal` and a
437 # non-continuable `tool-subagent` elsewhere — are preset rows that resolve it
438 # with `ctx.get`, and an entry-local realm around the registry is invisible to
439 # every sibling row outside that realm, so `run_in_background` answered
440 # "background jobs unavailable" while the controls sat in the catalog. That is
441 # the `goals` criterion read from inside the preset: a Service a row outside its
442 # realm READS belongs to the plane both can see. The registry is keyed by owning
443 # agent, so one host instance serves every session exactly as before presets.
444
445 - id: tool-jobs
446 disabled: true
447
448 - id: tool-fs
449 disabled: true
450
451 - id: tool-fs-search
452 disabled: true
453
454 # The `skill` REGISTRY stays in the host plane. It is host+per-scope layered
455 # (the tools-registry shape): deployment-level providers — repository plugins,
456 # a host skill-filesystem row — register into its global layer, while a preset's
457 # `skill-filesystem` registers into that preset's layer, and each agent reads the
458 # merged catalog its scope chain selects. Only the per-agent rows move behind
459 # presets: the base host `skill-filesystem` row is disabled here (presets own local
460 # discovery), and `tool-skill` is what a preset mounts to give its agent the
461 # catalog and loader at all.
462
463 - id: skill-filesystem
464 disabled: true
465
466 - id: tool-skill
467 disabled: true
468
469 # The goal service and session driver stay on the host plane, where Gateway
470 # remotes resolve them. Presets own the human command and model-facing tool.
471
472 - id: command-goal
473 disabled: true
474
475 - id: tool-goal
476 disabled: true
477
478 - id: plan-mode
479 disabled: true
480
481 # The token METER stays on the host plane; only the compaction backend that
482 # reads it moves. It owns the context-meter projection units, and that table is
483 # process-wide, so preset ownership would make the meter a function of which
484 # presets happen to be mounted rather than a per-session fact. Same criterion as
485 # `tasks` and `goals`; the reasoning has one home in
486 # `.agents/notes/implemented/architecture/2026-08-10-host-plane-ownership-after-presets.md`.
487
488 - id: compaction-basic
489 disabled: true
490
491 - id: command-compact
492 disabled: true
493
494 - id: tool-result-pruner
495 disabled: true
496
497 # The subagent registry and its backends STAY in the host plane. `subagents` is
498 # a process singleton with a cross-session query surface (`listChildren`,
499 # `followup`) that the host api-proxy serves to the browser, and a provider
500 # registers under a globally unique name, so a per-session copy would both
501 # starve that host row and collide on the second session. What a preset
502 # chooses is which delegation TOOLS its agent sees, below.
503
504 - id: tool-subagent-control
505 disabled: true
506
507 - id: tool-subagent-list-agents
508 disabled: true
509
510 - id: tool-subagent
511 disabled: true
512
513 - id: tool-subagent-fork
514 disabled: true
515
516 - id: workflow-ptc
517 disabled: true
518
519 - id: tool-workflow
520 disabled: true
521
522 # `base` ships this row disabled; the preset-plane gate reads declared row ids
523 # without regard to `disabled`, so this row must stay to keep `tool-ralph` off
524 # the host plane and out of collision with every preset's row.
525 - id: tool-ralph
526 disabled: true
527
528 - id: agent-instructions
529 disabled: true
530
531 - id: tool-todo
532 disabled: true
533
534 - id: tool-web
535 disabled: true
536
537 # The preset selection registry. The shipped preset declarations follow as
538 # separate patch files under `presets/`, listed after this file in
539 # `package.json` `dsh.bundle.patch`.
540 - insert:
541 - id: agent-preset-registry
542 name: '@deepseek-ai/dsh-agent-preset-registry'
543 config:
544 default: standard
545
545 lines YAML