cordis.patch.yml 19 KB

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