cordis.patch.yml 17 KB

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