cordis.patch.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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. The `dsh web` launcher alias turns --host/--port/
  7. # --dev/--trusted-host into further patches over these rows
  8. # (`--dev` inserts the dsh-client-hmr row).
  9. # ── surface-specific values the base deliberately omits ─────────────────────
  10. - id: system-prompt
  11. config:
  12. persona: >-
  13. You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
  14. # TODO: Re-enable shared HMR for Web after its reload lifecycle is tested.
  15. - id: hmr
  16. disabled: true
  17. # Web content search runs on an ephemeral in-memory index. The service
  18. # activates at boot, while first-search defers the node:sqlite import and
  19. # in-memory handle so Node 22 startup stays quiet until content search
  20. # actually uses SQLite. That search then reconciles this boot's sources.
  21. - id: session-query-sqlite
  22. config:
  23. path: ':memory:'
  24. openAt: first-search
  25. - id: tools
  26. config:
  27. # TEMPORARY workaround: DSH_TOOLS_MODE (native|code|both) opts a whole dsh
  28. # process into Code Mode while per-session tool-mode selection is being
  29. # designed; unset keeps the schema default (native). Remove the env seam
  30. # once the web UI owns the choice per session.
  31. mode: !!js process.env.DSH_TOOLS_MODE
  32. # ── web-only host rows, the transport layer, and the browser roster ─────────
  33. # `dsh.client` rows are the browser roster the modules node half scans into
  34. # window.__DSH_BOOT__; the modules row is simultaneously a host row.
  35. - insert:
  36. - id: code-runtime
  37. name: '@deepseek-ai/dsh-code-runtime-worker'
  38. - id: storage
  39. name: '@deepseek-ai/dsh-storage'
  40. - id: storage-json
  41. name: '@deepseek-ai/dsh-storage-json'
  42. config:
  43. root: !!js dshHomePath('storages')
  44. - id: storage-domain
  45. name: '@deepseek-ai/dsh-storage-domain'
  46. config:
  47. backend: json
  48. - id: workspace
  49. name: '@deepseek-ai/dsh-workspace'
  50. - id: session-projection-cache
  51. name: '@deepseek-ai/dsh-session-projection-cache'
  52. config:
  53. writeEveryEvents: 200
  54. writeIntervalMs: 5000
  55. # Resolve bind host, SSH launch, and display once at boot, then mount the
  56. # matching dual-face directory picker. Mount -native or -browse directly in
  57. # an overlay to pin the interaction.
  58. - id: directory-picker
  59. name: '@deepseek-ai/dsh-host-directory-picker-auto'
  60. # The API gateway: the transport-agnostic dispatch face every client shape
  61. # shares. The base layer's agent-default-model service owns the default model.
  62. - id: api-gateway
  63. name: '@deepseek-ai/dsh-host-apiproxy'
  64. # ── layer 2: transport/service ──────────────────────────────────────────────
  65. # Plain route-registration carrier; host and port arrive as `dsh web`
  66. # flag patches over these defaults. The dist is served by the web-runtime
  67. # row below through the fallback seat.
  68. - id: webserver
  69. name: '@deepseek-ai/dsh-host-webserver'
  70. config:
  71. host: 127.0.0.1
  72. port: 3080
  73. # Web glue owned by this bundle: resolves the built frontend dist (an
  74. # assembly fact of dsh-web-app, never user config), mounts the
  75. # frontend-static fallback owner, registers the web-surface prompt
  76. # section and bash runtime variables, and prints the URL line. `dsh web`
  77. # patches mode/lanAddresses over these defaults. A complete agent-preset
  78. # persona suppresses the prompt section for that agent while retaining
  79. # these host-owned shell variables.
  80. - id: web-runtime
  81. name: '@deepseek-ai/dsh-web-app'
  82. config:
  83. mode: production
  84. printUrl: true
  85. surfaceContext: true
  86. # ── browser plugin roster (dsh.client rows; node halves are layer-2 hosts) ──
  87. # Dual-face: node half scans this very tree for dsh.client rows, composes
  88. # window.__DSH_BOOT__, serves /plugins/<id>/client.js; browser half is the
  89. # module table the shell kernel constructs before cordis exists (adopted
  90. # as a plugin entry by the kernel, never fetched).
  91. - id: modules
  92. name: '@deepseek-ai/dsh-client-modules'
  93. # Owns both ends of the web transport: node half binds the gateway to the
  94. # webserver under /api; browser half is the fetch/SSE client.
  95. - id: connection
  96. name: '@deepseek-ai/dsh-client-connection'
  97. - id: api-remotes
  98. name: '@deepseek-ai/dsh-api-remotes'
  99. - id: client-runtime
  100. name: '@deepseek-ai/dsh-client-runtime'
  101. - id: ui-theme
  102. name: '@deepseek-ai/dsh-client-ui-theme'
  103. - id: locale
  104. name: '@deepseek-ai/dsh-client-locale'
  105. - id: ui-layout
  106. name: '@deepseek-ai/dsh-client-ui-layout'
  107. - id: ui-sidebar
  108. name: '@deepseek-ai/dsh-client-ui-sidebar'
  109. - id: ui-settings
  110. name: '@deepseek-ai/dsh-client-ui-settings'
  111. - id: ui-settings-general
  112. name: '@deepseek-ai/dsh-client-ui-settings-general'
  113. - id: ui-models
  114. name: '@deepseek-ai/dsh-client-ui-models'
  115. - id: ui-conversation
  116. name: '@deepseek-ai/dsh-client-ui-conversation'
  117. # Tool call tree, generic fallback, and keyed business Tool views.
  118. - id: ui-tool
  119. name: '@deepseek-ai/dsh-client-ui-tool'
  120. # Turn tail: the produced-files row under each closing assistant message.
  121. # Remove this entry to turn the surface off; the tail hole renders empty.
  122. - id: ui-deliverables
  123. name: '@deepseek-ai/dsh-client-ui-deliverables'
  124. - id: ui-workspace
  125. name: '@deepseek-ai/dsh-client-ui-workspace'
  126. # Input triggers: the '/' | '@' pipeline (ui-slash), the command surface over
  127. # it (ui-command), and the two reference sources (ui-skill / ui-subagent).
  128. - id: ui-slash
  129. name: '@deepseek-ai/dsh-client-ui-slash'
  130. - id: ui-command
  131. name: '@deepseek-ai/dsh-client-ui-command'
  132. - id: ui-skill
  133. name: '@deepseek-ai/dsh-client-ui-skill'
  134. - id: ui-subagent
  135. name: '@deepseek-ai/dsh-client-ui-subagent'
  136. # Goal surface: GoalBar in the input dock over the goal session projection.
  137. - id: ui-goal
  138. name: '@deepseek-ai/dsh-client-ui-goal'
  139. # Model selection: the /model popupSelect + composer seat over session.models.
  140. - id: ui-model
  141. name: '@deepseek-ai/dsh-client-ui-model'
  142. - id: ui-permission
  143. name: '@deepseek-ai/dsh-client-ui-permission'
  144. # The agent-preset row in General settings: the default preset for
  145. # sessions created later. Absent a roster it renders nothing.
  146. - id: ui-agent-preset
  147. name: '@deepseek-ai/dsh-client-ui-agent-preset'
  148. # Plan control: the composer plan seat over the plan projection + /plan channel.
  149. - id: ui-plan
  150. name: '@deepseek-ai/dsh-client-ui-plan'
  151. - id: ui-question
  152. name: '@deepseek-ai/dsh-client-ui-question'
  153. - id: ui-trajectory
  154. name: '@deepseek-ai/dsh-client-ui-trajectory'
  155. # ── the agent plane moves behind agent presets ─────────────────────────────
  156. #
  157. # Every row below composes what ONE agent contributes to the host registries:
  158. # its tools, its prompt sections, its delegation backends. The base keeps them
  159. # for the TUI, which is single-session and composes its agent process-wide; the
  160. # Web surface disables them here and lets each session mount a preset instead.
  161. #
  162. # Disabling rather than deleting is deliberate: the base is shared, and a row
  163. # absent from a surface overlay would silently reappear the day someone reorders
  164. # the composition.
  165. # `bash-env` STAYS in the host plane: `apps/cli/src/web.ts` injects it to
  166. # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
  167. # the criterion for host-plane ownership — injection resolves before any session
  168. # exists, so there is no agent to key by. Behind a preset realm those variables
  169. # would never reach the model's shell at all.
  170. - id: tool-bash
  171. disabled: true
  172. # The background-task REGISTRY stays on the host plane; only the model-facing
  173. # `task_*` controls move. Its producers — `tool-bash` here, `tool-pty` and a
  174. # non-continuable `tool-subagent` elsewhere — are preset rows that resolve it
  175. # with `ctx.get`, and an entry-local realm around the registry is invisible to
  176. # every sibling row outside that realm, so `run_in_background` answered
  177. # "background tasks unavailable" while the controls sat in the catalog. That is
  178. # the `goals` criterion read from inside the preset: a Service a row outside its
  179. # realm READS belongs to the plane both can see. The registry is keyed by owning
  180. # agent, so one host instance serves every session exactly as before presets.
  181. - id: tool-tasks
  182. disabled: true
  183. - id: tool-fs
  184. disabled: true
  185. - id: tool-fs-search
  186. disabled: true
  187. - id: tool-str-replace-editor
  188. disabled: true
  189. # The `skill` REGISTRY stays in the host plane. It is host+per-scope layered
  190. # (the tools-registry shape): deployment-level providers — repository plugins,
  191. # a host skill-local row — register into its global layer, while a preset's
  192. # `skill-local` registers into that preset's layer, and each agent reads the
  193. # merged catalog its scope chain selects. Only the per-agent rows move behind
  194. # presets: the base host `skill-local` row is disabled here (presets own local
  195. # discovery), and `tool-skill` is what a preset mounts to give its agent the
  196. # catalog and loader at all.
  197. - id: skill-local
  198. disabled: true
  199. - id: tool-skill
  200. disabled: true
  201. # The goal SERVICE, its session driver, and the `/goal` command STAY on the
  202. # host plane; only the model-facing tool moves. The Gateway serves the goal
  203. # domain as Remote endpoints, and a Remote method picks its receiver Service
  204. # from a generated descriptor — it resolves `goals` on the host, so a
  205. # per-session realm would answer `service-unavailable` for every browser call.
  206. # That is the `bash-env` criterion read from the other side: injection is not
  207. # the only host relationship a Service can have. The registry is keyed by
  208. # session, so one host instance serves every session exactly as before presets.
  209. - id: tool-goal
  210. disabled: true
  211. - id: plan-mode
  212. disabled: true
  213. - id: token-meter
  214. disabled: true
  215. - id: compact-basic
  216. disabled: true
  217. - id: command-compact
  218. disabled: true
  219. - id: tool-result-prune
  220. disabled: true
  221. # The subagent registry and its backends STAY in the host plane. `subagents` is
  222. # a process singleton with a cross-session query surface (`listChildren`,
  223. # `followup`) that the host api-proxy serves to the browser, and a provider
  224. # registers under a globally unique name, so a per-session copy would both
  225. # starve that host row and collide on the second session. What a preset
  226. # chooses is which delegation TOOLS its agent sees, below.
  227. - id: tool-subagent-control
  228. disabled: true
  229. - id: tool-subagent-list-agents
  230. disabled: true
  231. - id: tool-subagent
  232. disabled: true
  233. - id: tool-subagent-fork
  234. disabled: true
  235. # `tool-subagent-report` is host-plane for the same reason as the registry, not
  236. # because a preset may not want it: it registers a CONTINUABLE SETUP on that
  237. # singleton rather than a tool this agent calls, and the setup list is not
  238. # scope-aware — one copy per mounted preset means every child gets `report`
  239. # registered once per live session, which throws on the second.
  240. - id: workflow-workerthread
  241. disabled: true
  242. - id: tool-workflow
  243. disabled: true
  244. - id: tool-ralph
  245. disabled: true
  246. - id: workspace-context
  247. disabled: true
  248. - id: tool-todo
  249. disabled: true
  250. - id: tool-web
  251. disabled: true
  252. # The preset roster. `config/agent-presets/` ships with the deployment and is
  253. # read-only (its entries carry `system` trust);
  254. # `$DSH_HOME/.agent-presets` is where a person — or an agent — authors their own, and
  255. # carries the same trust as shell access because a preset IS a composition.
  256. # `roots` is an assembly fact, not user config: the shipped preset directory
  257. # ships beside this file, so AppCLIEntry resolves it and patches it in — the
  258. # same treatment `distIndex` gets on the webserver row.
  259. - insert:
  260. - id: agent-presets
  261. name: '@deepseek-ai/dsh-agent-presets'
  262. config:
  263. default: standard