@dsh-cc/tui 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +144 -0
  3. package/lib/bash-history.d.ts +31 -0
  4. package/lib/bash-history.d.ts.map +1 -0
  5. package/lib/bash-history.js +94 -0
  6. package/lib/bash-history.js.map +1 -0
  7. package/lib/compact-fold.d.ts +35 -0
  8. package/lib/compact-fold.d.ts.map +1 -0
  9. package/lib/compact-fold.js +60 -0
  10. package/lib/compact-fold.js.map +1 -0
  11. package/lib/components/arg-completers.d.ts +22 -0
  12. package/lib/components/arg-completers.d.ts.map +1 -0
  13. package/lib/components/arg-completers.js +75 -0
  14. package/lib/components/arg-completers.js.map +1 -0
  15. package/lib/components/code-theme.d.ts +25 -0
  16. package/lib/components/code-theme.d.ts.map +1 -0
  17. package/lib/components/code-theme.js +137 -0
  18. package/lib/components/code-theme.js.map +1 -0
  19. package/lib/components/completion.d.ts +50 -0
  20. package/lib/components/completion.d.ts.map +1 -0
  21. package/lib/components/completion.js +279 -0
  22. package/lib/components/completion.js.map +1 -0
  23. package/lib/components/diff-card.d.ts +29 -0
  24. package/lib/components/diff-card.d.ts.map +1 -0
  25. package/lib/components/diff-card.js +175 -0
  26. package/lib/components/diff-card.js.map +1 -0
  27. package/lib/components/diff-hunks.d.ts +44 -0
  28. package/lib/components/diff-hunks.d.ts.map +1 -0
  29. package/lib/components/diff-hunks.js +188 -0
  30. package/lib/components/diff-hunks.js.map +1 -0
  31. package/lib/components/editor-history.d.ts +23 -0
  32. package/lib/components/editor-history.d.ts.map +1 -0
  33. package/lib/components/editor-history.js +29 -0
  34. package/lib/components/editor-history.js.map +1 -0
  35. package/lib/components/markdown-theme.d.ts +11 -0
  36. package/lib/components/markdown-theme.d.ts.map +1 -0
  37. package/lib/components/markdown-theme.js +29 -0
  38. package/lib/components/markdown-theme.js.map +1 -0
  39. package/lib/components/masked-input.d.ts +24 -0
  40. package/lib/components/masked-input.d.ts.map +1 -0
  41. package/lib/components/masked-input.js +168 -0
  42. package/lib/components/masked-input.js.map +1 -0
  43. package/lib/components/overlay-host.d.ts +31 -0
  44. package/lib/components/overlay-host.d.ts.map +1 -0
  45. package/lib/components/overlay-host.js +128 -0
  46. package/lib/components/overlay-host.js.map +1 -0
  47. package/lib/components/overlays.d.ts +94 -0
  48. package/lib/components/overlays.d.ts.map +1 -0
  49. package/lib/components/overlays.js +450 -0
  50. package/lib/components/overlays.js.map +1 -0
  51. package/lib/components/provider-box.d.ts +23 -0
  52. package/lib/components/provider-box.d.ts.map +1 -0
  53. package/lib/components/provider-box.js +164 -0
  54. package/lib/components/provider-box.js.map +1 -0
  55. package/lib/components/read-group.d.ts +51 -0
  56. package/lib/components/read-group.d.ts.map +1 -0
  57. package/lib/components/read-group.js +105 -0
  58. package/lib/components/read-group.js.map +1 -0
  59. package/lib/components/root-bash.d.ts +36 -0
  60. package/lib/components/root-bash.d.ts.map +1 -0
  61. package/lib/components/root-bash.js +112 -0
  62. package/lib/components/root-bash.js.map +1 -0
  63. package/lib/components/root-types.d.ts +42 -0
  64. package/lib/components/root-types.d.ts.map +1 -0
  65. package/lib/components/root-types.js +8 -0
  66. package/lib/components/root-types.js.map +1 -0
  67. package/lib/components/root-utils.d.ts +22 -0
  68. package/lib/components/root-utils.d.ts.map +1 -0
  69. package/lib/components/root-utils.js +45 -0
  70. package/lib/components/root-utils.js.map +1 -0
  71. package/lib/components/root.d.ts +25 -0
  72. package/lib/components/root.d.ts.map +1 -0
  73. package/lib/components/root.js +357 -0
  74. package/lib/components/root.js.map +1 -0
  75. package/lib/components/theme.d.ts +61 -0
  76. package/lib/components/theme.d.ts.map +1 -0
  77. package/lib/components/theme.js +99 -0
  78. package/lib/components/theme.js.map +1 -0
  79. package/lib/components/transcript.d.ts +43 -0
  80. package/lib/components/transcript.d.ts.map +1 -0
  81. package/lib/components/transcript.js +203 -0
  82. package/lib/components/transcript.js.map +1 -0
  83. package/lib/components/working-line.d.ts +35 -0
  84. package/lib/components/working-line.d.ts.map +1 -0
  85. package/lib/components/working-line.js +66 -0
  86. package/lib/components/working-line.js.map +1 -0
  87. package/lib/effort-catalog.d.ts +27 -0
  88. package/lib/effort-catalog.d.ts.map +1 -0
  89. package/lib/effort-catalog.js +36 -0
  90. package/lib/effort-catalog.js.map +1 -0
  91. package/lib/export-markdown.d.ts +18 -0
  92. package/lib/export-markdown.d.ts.map +1 -0
  93. package/lib/export-markdown.js +124 -0
  94. package/lib/export-markdown.js.map +1 -0
  95. package/lib/harness/approval-preview.d.ts +33 -0
  96. package/lib/harness/approval-preview.d.ts.map +1 -0
  97. package/lib/harness/approval-preview.js +179 -0
  98. package/lib/harness/approval-preview.js.map +1 -0
  99. package/lib/harness/boot-banner.d.ts +14 -0
  100. package/lib/harness/boot-banner.d.ts.map +1 -0
  101. package/lib/harness/boot-banner.js +89 -0
  102. package/lib/harness/boot-banner.js.map +1 -0
  103. package/lib/harness/driver-agent.d.ts +78 -0
  104. package/lib/harness/driver-agent.d.ts.map +1 -0
  105. package/lib/harness/driver-agent.js +314 -0
  106. package/lib/harness/driver-agent.js.map +1 -0
  107. package/lib/harness/driver-agents.d.ts +20 -0
  108. package/lib/harness/driver-agents.d.ts.map +1 -0
  109. package/lib/harness/driver-agents.js +123 -0
  110. package/lib/harness/driver-agents.js.map +1 -0
  111. package/lib/harness/driver-approvals.d.ts +38 -0
  112. package/lib/harness/driver-approvals.d.ts.map +1 -0
  113. package/lib/harness/driver-approvals.js +277 -0
  114. package/lib/harness/driver-approvals.js.map +1 -0
  115. package/lib/harness/driver-bash.d.ts +15 -0
  116. package/lib/harness/driver-bash.d.ts.map +1 -0
  117. package/lib/harness/driver-bash.js +73 -0
  118. package/lib/harness/driver-bash.js.map +1 -0
  119. package/lib/harness/driver-catalog.d.ts +84 -0
  120. package/lib/harness/driver-catalog.d.ts.map +1 -0
  121. package/lib/harness/driver-catalog.js +256 -0
  122. package/lib/harness/driver-catalog.js.map +1 -0
  123. package/lib/harness/driver-ctx.d.ts +462 -0
  124. package/lib/harness/driver-ctx.d.ts.map +1 -0
  125. package/lib/harness/driver-ctx.js +11 -0
  126. package/lib/harness/driver-ctx.js.map +1 -0
  127. package/lib/harness/driver-hud.d.ts +31 -0
  128. package/lib/harness/driver-hud.d.ts.map +1 -0
  129. package/lib/harness/driver-hud.js +204 -0
  130. package/lib/harness/driver-hud.js.map +1 -0
  131. package/lib/harness/driver-live.d.ts +36 -0
  132. package/lib/harness/driver-live.d.ts.map +1 -0
  133. package/lib/harness/driver-live.js +44 -0
  134. package/lib/harness/driver-live.js.map +1 -0
  135. package/lib/harness/driver-modal.d.ts +52 -0
  136. package/lib/harness/driver-modal.d.ts.map +1 -0
  137. package/lib/harness/driver-modal.js +78 -0
  138. package/lib/harness/driver-modal.js.map +1 -0
  139. package/lib/harness/driver-mode.d.ts +35 -0
  140. package/lib/harness/driver-mode.d.ts.map +1 -0
  141. package/lib/harness/driver-mode.js +84 -0
  142. package/lib/harness/driver-mode.js.map +1 -0
  143. package/lib/harness/driver-pickers.d.ts +48 -0
  144. package/lib/harness/driver-pickers.d.ts.map +1 -0
  145. package/lib/harness/driver-pickers.js +249 -0
  146. package/lib/harness/driver-pickers.js.map +1 -0
  147. package/lib/harness/driver-promote.d.ts +29 -0
  148. package/lib/harness/driver-promote.d.ts.map +1 -0
  149. package/lib/harness/driver-promote.js +36 -0
  150. package/lib/harness/driver-promote.js.map +1 -0
  151. package/lib/harness/driver-queue.d.ts +19 -0
  152. package/lib/harness/driver-queue.d.ts.map +1 -0
  153. package/lib/harness/driver-queue.js +281 -0
  154. package/lib/harness/driver-queue.js.map +1 -0
  155. package/lib/harness/driver-run-local.d.ts +32 -0
  156. package/lib/harness/driver-run-local.d.ts.map +1 -0
  157. package/lib/harness/driver-run-local.js +366 -0
  158. package/lib/harness/driver-run-local.js.map +1 -0
  159. package/lib/harness/driver-sessions.d.ts +28 -0
  160. package/lib/harness/driver-sessions.d.ts.map +1 -0
  161. package/lib/harness/driver-sessions.js +386 -0
  162. package/lib/harness/driver-sessions.js.map +1 -0
  163. package/lib/harness/driver.d.ts +22 -0
  164. package/lib/harness/driver.d.ts.map +1 -0
  165. package/lib/harness/driver.js +459 -0
  166. package/lib/harness/driver.js.map +1 -0
  167. package/lib/harness/preset.d.ts +32 -0
  168. package/lib/harness/preset.d.ts.map +1 -0
  169. package/lib/harness/preset.js +34 -0
  170. package/lib/harness/preset.js.map +1 -0
  171. package/lib/harness/session-list.d.ts +65 -0
  172. package/lib/harness/session-list.d.ts.map +1 -0
  173. package/lib/harness/session-list.js +91 -0
  174. package/lib/harness/session-list.js.map +1 -0
  175. package/lib/harness/shell-output.d.ts +44 -0
  176. package/lib/harness/shell-output.d.ts.map +1 -0
  177. package/lib/harness/shell-output.js +90 -0
  178. package/lib/harness/shell-output.js.map +1 -0
  179. package/lib/harness/statusline-cc-transcript.d.ts +51 -0
  180. package/lib/harness/statusline-cc-transcript.d.ts.map +1 -0
  181. package/lib/harness/statusline-cc-transcript.js +191 -0
  182. package/lib/harness/statusline-cc-transcript.js.map +1 -0
  183. package/lib/harness/statusline-command.d.ts +54 -0
  184. package/lib/harness/statusline-command.d.ts.map +1 -0
  185. package/lib/harness/statusline-command.js +161 -0
  186. package/lib/harness/statusline-command.js.map +1 -0
  187. package/lib/harness/statusline-payload.d.ts +79 -0
  188. package/lib/harness/statusline-payload.d.ts.map +1 -0
  189. package/lib/harness/statusline-payload.js +93 -0
  190. package/lib/harness/statusline-payload.js.map +1 -0
  191. package/lib/harness/statusline-settings.d.ts +47 -0
  192. package/lib/harness/statusline-settings.d.ts.map +1 -0
  193. package/lib/harness/statusline-settings.js +57 -0
  194. package/lib/harness/statusline-settings.js.map +1 -0
  195. package/lib/harness/statusline-wiring.d.ts +45 -0
  196. package/lib/harness/statusline-wiring.d.ts.map +1 -0
  197. package/lib/harness/statusline-wiring.js +247 -0
  198. package/lib/harness/statusline-wiring.js.map +1 -0
  199. package/lib/harness/usage-view.d.ts +84 -0
  200. package/lib/harness/usage-view.d.ts.map +1 -0
  201. package/lib/harness/usage-view.js +199 -0
  202. package/lib/harness/usage-view.js.map +1 -0
  203. package/lib/harness/worktree-exit.d.ts +105 -0
  204. package/lib/harness/worktree-exit.d.ts.map +1 -0
  205. package/lib/harness/worktree-exit.js +168 -0
  206. package/lib/harness/worktree-exit.js.map +1 -0
  207. package/lib/history.d.ts +50 -0
  208. package/lib/history.d.ts.map +1 -0
  209. package/lib/history.js +139 -0
  210. package/lib/history.js.map +1 -0
  211. package/lib/index.d.ts +63 -0
  212. package/lib/index.d.ts.map +1 -0
  213. package/lib/index.js +54 -0
  214. package/lib/index.js.map +1 -0
  215. package/lib/input.d.ts +158 -0
  216. package/lib/input.d.ts.map +1 -0
  217. package/lib/input.js +400 -0
  218. package/lib/input.js.map +1 -0
  219. package/lib/invariant.d.ts +14 -0
  220. package/lib/invariant.d.ts.map +1 -0
  221. package/lib/invariant.js +20 -0
  222. package/lib/invariant.js.map +1 -0
  223. package/lib/mode-cycle.d.ts +22 -0
  224. package/lib/mode-cycle.d.ts.map +1 -0
  225. package/lib/mode-cycle.js +32 -0
  226. package/lib/mode-cycle.js.map +1 -0
  227. package/lib/model-catalog.d.ts +22 -0
  228. package/lib/model-catalog.d.ts.map +1 -0
  229. package/lib/model-catalog.js +45 -0
  230. package/lib/model-catalog.js.map +1 -0
  231. package/lib/packaged-preset.d.ts +32 -0
  232. package/lib/packaged-preset.d.ts.map +1 -0
  233. package/lib/packaged-preset.js +94 -0
  234. package/lib/packaged-preset.js.map +1 -0
  235. package/lib/plugin.d.ts +11 -0
  236. package/lib/plugin.d.ts.map +1 -0
  237. package/lib/plugin.js +88 -0
  238. package/lib/plugin.js.map +1 -0
  239. package/lib/profile.d.ts +4 -0
  240. package/lib/profile.d.ts.map +1 -0
  241. package/lib/profile.js +7 -0
  242. package/lib/profile.js.map +1 -0
  243. package/lib/project-sessions.d.ts +29 -0
  244. package/lib/project-sessions.d.ts.map +1 -0
  245. package/lib/project-sessions.js +60 -0
  246. package/lib/project-sessions.js.map +1 -0
  247. package/lib/project.d.ts +75 -0
  248. package/lib/project.d.ts.map +1 -0
  249. package/lib/project.js +196 -0
  250. package/lib/project.js.map +1 -0
  251. package/lib/provider-actions.d.ts +37 -0
  252. package/lib/provider-actions.d.ts.map +1 -0
  253. package/lib/provider-actions.js +417 -0
  254. package/lib/provider-actions.js.map +1 -0
  255. package/lib/provider-command.d.ts +109 -0
  256. package/lib/provider-command.d.ts.map +1 -0
  257. package/lib/provider-command.js +220 -0
  258. package/lib/provider-command.js.map +1 -0
  259. package/lib/provider-detail.d.ts +15 -0
  260. package/lib/provider-detail.d.ts.map +1 -0
  261. package/lib/provider-detail.js +201 -0
  262. package/lib/provider-detail.js.map +1 -0
  263. package/lib/provider-flow.d.ts +191 -0
  264. package/lib/provider-flow.d.ts.map +1 -0
  265. package/lib/provider-flow.js +192 -0
  266. package/lib/provider-flow.js.map +1 -0
  267. package/lib/provider-presets.d.ts +32 -0
  268. package/lib/provider-presets.d.ts.map +1 -0
  269. package/lib/provider-presets.js +105 -0
  270. package/lib/provider-presets.js.map +1 -0
  271. package/lib/provider-read.d.ts +63 -0
  272. package/lib/provider-read.d.ts.map +1 -0
  273. package/lib/provider-read.js +115 -0
  274. package/lib/provider-read.js.map +1 -0
  275. package/lib/provider-settings.d.ts +30 -0
  276. package/lib/provider-settings.d.ts.map +1 -0
  277. package/lib/provider-settings.js +65 -0
  278. package/lib/provider-settings.js.map +1 -0
  279. package/lib/resume-target.d.ts +59 -0
  280. package/lib/resume-target.d.ts.map +1 -0
  281. package/lib/resume-target.js +143 -0
  282. package/lib/resume-target.js.map +1 -0
  283. package/lib/slash.d.ts +44 -0
  284. package/lib/slash.d.ts.map +1 -0
  285. package/lib/slash.js +81 -0
  286. package/lib/slash.js.map +1 -0
  287. package/lib/state/driver-types.d.ts +505 -0
  288. package/lib/state/driver-types.d.ts.map +1 -0
  289. package/lib/state/driver-types.js +8 -0
  290. package/lib/state/driver-types.js.map +1 -0
  291. package/lib/state/driver-usage-types.d.ts +59 -0
  292. package/lib/state/driver-usage-types.d.ts.map +1 -0
  293. package/lib/state/driver-usage-types.js +8 -0
  294. package/lib/state/driver-usage-types.js.map +1 -0
  295. package/lib/statusline.d.ts +63 -0
  296. package/lib/statusline.d.ts.map +1 -0
  297. package/lib/statusline.js +97 -0
  298. package/lib/statusline.js.map +1 -0
  299. package/lib/store/pickers.d.ts +34 -0
  300. package/lib/store/pickers.d.ts.map +1 -0
  301. package/lib/store/pickers.js +111 -0
  302. package/lib/store/pickers.js.map +1 -0
  303. package/lib/store/provider-panel.d.ts +107 -0
  304. package/lib/store/provider-panel.d.ts.map +1 -0
  305. package/lib/store/provider-panel.js +151 -0
  306. package/lib/store/provider-panel.js.map +1 -0
  307. package/lib/store/question.d.ts +21 -0
  308. package/lib/store/question.d.ts.map +1 -0
  309. package/lib/store/question.js +59 -0
  310. package/lib/store/question.js.map +1 -0
  311. package/lib/store/queue.d.ts +27 -0
  312. package/lib/store/queue.d.ts.map +1 -0
  313. package/lib/store/queue.js +34 -0
  314. package/lib/store/queue.js.map +1 -0
  315. package/lib/store/session.d.ts +73 -0
  316. package/lib/store/session.d.ts.map +1 -0
  317. package/lib/store/session.js +172 -0
  318. package/lib/store/session.js.map +1 -0
  319. package/lib/store/subagents.d.ts +16 -0
  320. package/lib/store/subagents.d.ts.map +1 -0
  321. package/lib/store/subagents.js +44 -0
  322. package/lib/store/subagents.js.map +1 -0
  323. package/lib/store/todos.d.ts +35 -0
  324. package/lib/store/todos.d.ts.map +1 -0
  325. package/lib/store/todos.js +68 -0
  326. package/lib/store/todos.js.map +1 -0
  327. package/lib/store/usage.d.ts +15 -0
  328. package/lib/store/usage.d.ts.map +1 -0
  329. package/lib/store/usage.js +27 -0
  330. package/lib/store/usage.js.map +1 -0
  331. package/lib/store/views.d.ts +419 -0
  332. package/lib/store/views.d.ts.map +1 -0
  333. package/lib/store/views.js +3 -0
  334. package/lib/store/views.js.map +1 -0
  335. package/lib/store.d.ts +19 -0
  336. package/lib/store.d.ts.map +1 -0
  337. package/lib/store.js +10 -0
  338. package/lib/store.js.map +1 -0
  339. package/lib/terminal/lease.d.ts +33 -0
  340. package/lib/terminal/lease.d.ts.map +1 -0
  341. package/lib/terminal/lease.js +99 -0
  342. package/lib/terminal/lease.js.map +1 -0
  343. package/lib/tool-card.d.ts +75 -0
  344. package/lib/tool-card.d.ts.map +1 -0
  345. package/lib/tool-card.js +109 -0
  346. package/lib/tool-card.js.map +1 -0
  347. package/lib/tool-verbs.d.ts +12 -0
  348. package/lib/tool-verbs.d.ts.map +1 -0
  349. package/lib/tool-verbs.js +29 -0
  350. package/lib/tool-verbs.js.map +1 -0
  351. package/lib/transcript.d.ts +40 -0
  352. package/lib/transcript.d.ts.map +1 -0
  353. package/lib/transcript.js +413 -0
  354. package/lib/transcript.js.map +1 -0
  355. package/lib/working-line.d.ts +44 -0
  356. package/lib/working-line.d.ts.map +1 -0
  357. package/lib/working-line.js +56 -0
  358. package/lib/working-line.js.map +1 -0
  359. package/package.json +72 -0
  360. package/presets/cc/.dsh-cc-managed.json +5 -0
  361. package/presets/cc/agent.cordis.yml +524 -0
  362. package/presets/cc/preset.yml +3 -0
  363. package/scripts/stage-preset.mjs +26 -0
@@ -0,0 +1,524 @@
1
+ # BEGIN dsh-cc header
2
+ # vendored from @deepseek-ai/dsh@0.1.1-rc.2 config/agent-presets/standard/agent.cordis.yml
3
+ # source: config/agent-presets/standard/agent.cordis.yml (deepseek-harness install)
4
+ #
5
+ # This file is the dsh "CC mode" agent preset composition. The baseline below
6
+ # is a verbatim copy of the standard preset; the `cc rows` section appended at
7
+ # the bottom carries the CC surface rows scoped to this preset (they previously
8
+ # lived in the cc-shell global patch, see
9
+ # $R/packages/bundle/cc-shell/cordis.patch.yml).
10
+ #
11
+ # After upgrading dsh upstream, re-diff this baseline against the new standard
12
+ # preset (the drift gate in tests/composition.spec.ts automates this) and fold
13
+ # in any upstream changes.
14
+ # END dsh-cc header
15
+ # The `standard` agent preset: the full coding agent, mounted once per process.
16
+ #
17
+ # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
18
+ # standing scope; every session naming it joins by scope parentage, so the
19
+ # tools and prompt sections registered here cover each joined agent while a
20
+ # session's own state stays keyed per Session/Agent inside the plugins. The
21
+ # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
22
+ # preset must not own: the registries themselves, the sandbox and approval
23
+ # stack, persistence, and the model route.
24
+ #
25
+ # A service row here MUST sit inside a group carrying an `isolate` realm.
26
+ # Without one it publishes into the root realm, where it is process-global —
27
+ # another preset publishing the same name collides, and a host reader would
28
+ # resolve one preset's instance for every session; `dsh-agent-presets` rejects
29
+ # that at mount. `true` means an entry-local realm: this standing mount's own
30
+ # private instance, apart from every other preset's. (A shared label does NOT
31
+ # pool instances — `provide()` throws on the second registration under the
32
+ # same realm symbol; labels join REALMS, and are not what this file needs.)
33
+
34
+ # ── identity ────────────────────────────────────────────────────────────────
35
+
36
+ # The preset's own persona, shadowing the deployment default for this agent.
37
+ # `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
38
+ - id: persona
39
+ name: '@deepseek-ai/dsh-persona'
40
+ config:
41
+ text: >-
42
+ You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
43
+
44
+ - id: agent-instructions
45
+ name: '@deepseek-ai/dsh-agent-instructions'
46
+ config:
47
+ maxBytes: 65536
48
+
49
+ # ── shell ───────────────────────────────────────────────────────────────────
50
+
51
+ # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
52
+ # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
53
+ # the criterion for host-plane ownership — injection resolves before any session
54
+ # exists, so there is no agent to key by. Behind a preset realm those variables
55
+ # never reached the model's shell at all. Both shell tools consume the host
56
+ # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
57
+ # host-plane too.
58
+ - id: tool-bash
59
+ name: '@deepseek-ai/dsh-tool-bash'
60
+ disabled: !!js process.platform === 'win32'
61
+
62
+ - id: tool-pwsh
63
+ name: '@deepseek-ai/dsh-tool-pwsh'
64
+ disabled: !!js process.platform !== 'win32'
65
+
66
+ # ── filesystem ──────────────────────────────────────────────────────────────
67
+
68
+ # Both register into the host `tools` registry and provide nothing, so
69
+ # they need no realm. The `fs` service and its policy stay in the host.
70
+ - id: tool-fs
71
+ name: '@deepseek-ai/dsh-tool-fs'
72
+
73
+ - id: tool-fs-search
74
+ name: '@deepseek-ai/dsh-tool-fs-search'
75
+ config:
76
+ sampleOverCapGlobResults: false
77
+
78
+ # ── background jobs ────────────────────────────────────────────────────────
79
+
80
+ # Only the model-facing controls. The task REGISTRY stays on the host plane:
81
+ # its producers sit outside any realm this file could put it in — `tool-bash`
82
+ # above resolves it with `ctx.get`, and an entry-local realm here is invisible
83
+ # to every sibling row, so `run_in_background` would answer "background jobs
84
+ # unavailable" while these controls sat in the catalog. The registry is keyed by
85
+ # owning agent anyway, so one host instance serves every session. What a preset
86
+ # chooses is whether its agent can collect and stop background work at all.
87
+ - id: tool-jobs
88
+ name: '@deepseek-ai/dsh-tool-jobs'
89
+
90
+ # ── skills ──────────────────────────────────────────────────────────────────
91
+
92
+ # The skill REGISTRY lives in the host composition and is layered per scope:
93
+ # these rows register into THIS preset's layer of it, so they need no realm.
94
+ # `skill-filesystem` contributes local-root discovery for agents on this preset, and
95
+ # `tool-skill` gives them the catalog and loader; the merged catalog also
96
+ # carries whatever the deployment registered globally (repository plugins).
97
+ - id: skill-filesystem
98
+ name: '@deepseek-ai/dsh-skill-filesystem'
99
+
100
+ - id: tool-skill
101
+ name: '@deepseek-ai/dsh-tool-skill'
102
+
103
+ # ── goals ───────────────────────────────────────────────────────────────────
104
+
105
+ # Only the model-facing tool. The goal SERVICE, its session driver, and the
106
+ # `/goal` command stay on the host plane: the Gateway serves the goal domain as
107
+ # Remote endpoints whose receiver comes from a generated descriptor, so it
108
+ # resolves `goals` on the host and an entry-local realm here would hide it. The
109
+ # registry is keyed by session anyway, so one host instance serves every
110
+ # session. What a preset chooses is whether its agent can call the goal tool.
111
+ - id: tool-goal
112
+ name: '@deepseek-ai/dsh-tool-goal'
113
+
114
+ # ── plan mode ───────────────────────────────────────────────────────────────
115
+
116
+ # Plan state is per-agent by nature, so an entry-local realm is not a
117
+ # workaround here — it is the correct lifetime.
118
+ - id: planning
119
+ name: cordis:group
120
+ group: true
121
+ isolate:
122
+ planMode: true
123
+ config:
124
+ - id: plan-mode
125
+ name: '@deepseek-ai/dsh-plan-mode'
126
+ config:
127
+ section: |
128
+ You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
129
+
130
+ Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
131
+
132
+ The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
133
+
134
+ Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
135
+
136
+ Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
137
+
138
+ When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
139
+
140
+ # ── compaction ──────────────────────────────────────────────────────────────
141
+
142
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
143
+ # share this realm rather than sit outside it.
144
+ #
145
+ # The engine and the command are CC replacements for the upstream rows: the
146
+ # engine subclass folds a per-agent `/compact [instructions]` hint into the
147
+ # summarizer input; the command forwards the free-text argument as that hint
148
+ # instead of rejecting arguments.
149
+ #
150
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
151
+ # plane, and the rows here resolve that one instance. It takes no configuration,
152
+ # keys every fold by Session, and owns the context-meter projection units the
153
+ # browser reads for every session — behind a realm those units would come and go
154
+ # with whichever presets happen to be mounted. What a preset chooses is whether
155
+ # its agent compacts at all, which is `compaction-basic` below.
156
+ - id: compaction
157
+ name: cordis:group
158
+ group: true
159
+ isolate:
160
+ compaction: true
161
+ toolResultPruner: true
162
+ config:
163
+ - id: compaction-basic
164
+ name: '@dsh-cc/compaction-basic'
165
+
166
+ - id: command-compact
167
+ name: '@dsh-cc/command-compact'
168
+
169
+ - id: tool-result-pruner
170
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
171
+ config:
172
+ thresholdChars: 8192
173
+ headChars: 4096
174
+ tailChars: 1024
175
+
176
+ # ── delegation and workflows ────────────────────────────────────────────────
177
+
178
+ # The `subagents` registry and its spawn/fork backends live in the HOST
179
+ # composition: the registry is a process singleton whose cross-session queries
180
+ # the api-proxy serves to the browser, and a provider name may only be
181
+ # registered once. This preset contributes the delegation TOOLS, which resolve
182
+ # that host registry.
183
+ #
184
+ # `workflows` is different — nothing outside an agent reads it — so every row
185
+ # that reaches it shares one entry-local realm here, and a consumer left
186
+ # outside would resolve a host registry this preset does not populate.
187
+ #
188
+ # `tool-subagent-report` is host-plane for the same reason as the registry,
189
+ # not because a preset may not want it: it registers a CONTINUABLE SETUP on
190
+ # that singleton rather than a tool this agent calls, and the setup list is
191
+ # not scope-aware — one copy per mounted preset means every child gets
192
+ # `report` registered once per live session, which throws on the second.
193
+ #
194
+ # `tool-subagent` and `tool-subagent-fork` (the harness spawn/fork Task tools)
195
+ # are DISABLED here — the CC Task tool is provided by the `tool-task` row in
196
+ # the cc-services group instead. That replacement Task now implements the
197
+ # continuable loop itself: `run_in_background: true` starts a durable
198
+ # background child on the spawn provider, and report / send_message /
199
+ # list_agents / interrupt_agent operate on its returned agentId. The harness
200
+ # rows stay disabled. Note for future readers: the disabled
201
+ # `tool-subagent-fork` row's `backgroundMode: continuable` config is inert
202
+ # while the row is disabled, and fork children remain foreground one-shot
203
+ # until upstream harness issue #2124 resolves.
204
+ - id: delegation
205
+ name: cordis:group
206
+ group: true
207
+ isolate:
208
+ workflowEngine: true
209
+ config:
210
+ - id: tool-subagent-control
211
+ name: '@deepseek-ai/dsh-tool-subagent-control'
212
+
213
+ - id: tool-subagent-list-agents
214
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
215
+
216
+ - id: tool-subagent
217
+ name: '@deepseek-ai/dsh-tool-subagent'
218
+ disabled: true
219
+ config:
220
+ provider: spawn
221
+ toolName: subagent
222
+ backgroundMode: continuable
223
+
224
+ - id: tool-subagent-fork
225
+ name: '@deepseek-ai/dsh-tool-subagent'
226
+ disabled: true
227
+ config:
228
+ provider: fork
229
+ toolName: subagent_fork
230
+ backgroundMode: continuable
231
+
232
+ # Production dsh does not install these optional providers. Install the
233
+ # matching Bundle in this Profile and restart the Host, then copy this
234
+ # preset and remove `disabled` from the matching tool row. Host availability
235
+ # alone grants no tool.
236
+ - id: tool-subagent-codex
237
+ name: '@deepseek-ai/dsh-tool-subagent'
238
+ disabled: true
239
+ config:
240
+ provider: codex
241
+ toolName: subagent_codex
242
+ backgroundMode: one-shot
243
+ maxDepth: provider-managed
244
+
245
+ - id: tool-subagent-claude-code
246
+ name: '@deepseek-ai/dsh-tool-subagent'
247
+ disabled: true
248
+ config:
249
+ provider: claude-code
250
+ toolName: subagent_claude_code
251
+ backgroundMode: one-shot
252
+ maxDepth: provider-managed
253
+
254
+ - id: workflow-worker-thread
255
+ name: '@deepseek-ai/dsh-workflow-worker-thread'
256
+ config:
257
+ provider: spawn
258
+
259
+ - id: tool-workflow
260
+ name: '@deepseek-ai/dsh-tool-workflow'
261
+
262
+ - id: tool-ralph
263
+ name: '@deepseek-ai/dsh-tool-ralph'
264
+ config:
265
+ subagentProvider: spawn
266
+ maxRounds: 64
267
+
268
+ # ── remaining model-facing rows ─────────────────────────────────────────────
269
+
270
+ - id: tool-ask-user
271
+ name: '@deepseek-ai/dsh-tool-ask-user'
272
+
273
+ - id: tool-todo
274
+ name: '@deepseek-ai/dsh-tool-todo'
275
+ config:
276
+ allowParallelInProgress: true
277
+
278
+ # The `web` service and its search provider stay in the host composition; only
279
+ # the model-facing tool is per-session.
280
+ #
281
+ # Moved in from the cc-shell global swap. fetch is still disabled here because
282
+ # `@dsh-cc/tool-web-fetch` inside cc-services owns the model-facing tool
283
+ # (adds the optional `prompt`). The HTTP executor is
284
+ # `@dsh-cc/web-fetch-http` mounted from cc-shell (literal SSRF gate).
285
+ # A prompt without the `haiku` route hard-fails.
286
+ - id: tool-web
287
+ name: '@deepseek-ai/dsh-tool-web'
288
+ config:
289
+ fetch: false
290
+ searchTimeoutMs: 60000
291
+
292
+ # ── cc rows ─────────────────────────────────────────────────────────────────
293
+
294
+ # The CC surface rows, scoped to this preset. They previously lived in the
295
+ # cc-shell global patch ($R/packages/bundle/cc-shell/cordis.patch.yml) and are
296
+ # moved here so they no longer leak into every agent preset that mounts the
297
+ # global host composition.
298
+
299
+ # Service rows MUST sit in a group with an `isolate` realm: mounting this preset
300
+ # rejects any row that publishes a cordis Service into the root realm
301
+ # (PresetMountError / leakedServices). The isolate keys below are all required —
302
+ # the glue dynamically attaches mcp-client as a sub-fiber, and `Context.extend`
303
+ # inherits the group's isolate map down the prototype chain, so without
304
+ # `mcpConnections` isolated here it would publish into the root realm and break
305
+ # the preset. The command rows and the `memory` / `hooks-claude-code` consumers
306
+ # must live INSIDE the group: they `ctx.get('ccModelRoutes')` (and
307
+ # `ctx.get('mcpConnections')`), which resolve to nothing outside the isolated
308
+ # realm. `ccPlugins` is deliberately NOT isolated: the glue publishes it into
309
+ # the ROOT realm from the root fiber (see CcPluginsService in
310
+ # @dsh-cc/bundle-shell) so host-plane siblings — the TUI driver and /help
311
+ # — can resolve it; isolating the name here would shadow that publication and
312
+ # break in-group resolution too.
313
+ - id: cc-services
314
+ name: cordis:group
315
+ group: true
316
+ isolate:
317
+ toolSearch: true
318
+ microcompactor: true
319
+ ccModelRoutes: true
320
+ resumePinStore: true
321
+ mcpConnections: true
322
+ hookBridgeStatus: true
323
+ config:
324
+ # ToolSearch: model-called search that activates deferred tools per scope.
325
+ - id: tool-search
326
+ name: '@dsh-cc/tool-search'
327
+
328
+ # Model-free staleness microcompaction (auto: false by default).
329
+ - id: compaction-micro
330
+ name: '@dsh-cc/compaction-micro'
331
+
332
+ # CC plugins on disk (agents/skills/commands/hooks/mcp servers) plus the
333
+ # base agent preset dirs and .mcp.json server wiring — see the glue plugin.
334
+ - id: cc-shell-glue
335
+ name: '@dsh-cc/bundle-shell'
336
+
337
+ - id: command-plugin
338
+ name: '@dsh-cc/command-plugin'
339
+
340
+ - id: command-mcp
341
+ name: '@dsh-cc/command-mcp'
342
+
343
+ # Serena-first prompt steering: while a serena MCP server is ready
344
+ # (registry-only, live detection over the isolated `mcpConnections`
345
+ # above), the registered `serena-first` section (order 105) renders the
346
+ # policy paragraph and the assemble waterfall rewrites the upstream
347
+ # `tool:read` / `tool:grep` texts (replace-not-mutate, `{ prepend: true }`).
348
+ # Publishes no Service, so it needs no isolate key of its own;
349
+ # `systemPrompt` resolves through the group via the prototype chain.
350
+ # `serverName` config (default 'serena') drives detection and every
351
+ # emitted `mcp__<serverName>__*` name.
352
+ - id: serena-first
353
+ name: '@dsh-cc/serena-first'
354
+
355
+ # /doctor reads ccModelRoutes, mcpConnections, and hookBridgeStatus, so it
356
+ # shares the group realm.
357
+ - id: command-doctor
358
+ name: '@dsh-cc/command-doctor'
359
+
360
+ # cc-model-routes owns the model-aliases settings namespace and resolver;
361
+ # tool-task provides the CC Task tool (subagent_type dispatch over
362
+ # per-workspace .claude/agents) and reserves the names 'subagent'/'workflow'.
363
+ - id: cc-model-routes
364
+ name: '@dsh-cc/model-aliases'
365
+
366
+ # Resume pins (plan docs/plans/2026-09-04-subagent-resume-pins.md §4.10):
367
+ # one PinStore + the resume gate/overlay/policy per mounted preset, exposed
368
+ # as the `resumePinStore` service (isolated above, like ccModelRoutes). The
369
+ # pins root COLOCATES with the session-persistence root: the harness base
370
+ # patch mounts the jsonl backend at `!!js dshHomePath('sessions')`, and this
371
+ # `!!js` expression resolves `dshHomePath` the same way at entry activation
372
+ # (app-boot provides it on the root ctx before the config tree mounts), so
373
+ # pins always sit next to the durable sessions they pin. Must mount BEFORE
374
+ # tool-task: the Task plugin's spawn capture prefers this service store.
375
+ - id: cc-resume-pins
376
+ name: '@dsh-cc/subagent-resume-pins'
377
+ config:
378
+ pinsRoot: !!js dshHomePath('sessions', 'resume-pins')
379
+
380
+ - id: tool-task
381
+ name: '@dsh-cc/subagent-task'
382
+
383
+ # /agents: query/control surface for continuable background children
384
+ # (plan docs/plans/2026-09-10-continuable-background-ux.md §3.2). Mounts
385
+ # INSIDE cc-services (F8): the read-only snapshot joins the realm-interior
386
+ # resumePinStore with the host-plane subagents/agents registries, then
387
+ # republishes the snapshot as the ROOT-realm `ccAgents` service (CcPlugins
388
+ # pattern) so the TUI local-slash path consumes the SAME snapshot. Must
389
+ # mount AFTER cc-resume-pins.
390
+ - id: command-agents
391
+ name: '@dsh-cc/command-agents'
392
+
393
+ # Memory and the hook bridge consume `ctx.get('ccModelRoutes')` at spawn
394
+ # time (recall small-fast lane / hook model resolution), so they share this
395
+ # realm. memory-consolidation stays OUTSIDE: its forks must keep inheriting
396
+ # the parent route. memory still publishes no cordis Service;
397
+ # hooks-claude-code now provides `hookBridgeStatus` (for /doctor), which is
398
+ # isolated on this group's isolate map — both stay mount-legal under the
399
+ # leakedServices gate only because they sit INSIDE the group.
400
+ - id: memory
401
+ name: '@dsh-cc/memory'
402
+
403
+ - id: hooks-claude-code
404
+ name: '@dsh-cc/hooks-claude-code'
405
+ # Tracked root-level hook config (serena code-intelligence plan Phase 0).
406
+ # Relative configPath resolves against the process launch cwd, so a
407
+ # worktree session started at the worktree root loads it by construction.
408
+ config:
409
+ configPath: hooks.json
410
+
411
+ # Replaces the stock dsh-tool-web web_fetch (fetch: false above): adds the
412
+ # optional `prompt`, summarized on the cheap lane when the haiku alias is
413
+ # configured; degrades to raw converted text + notice otherwise.
414
+ - id: tool-web-fetch
415
+ name: '@dsh-cc/tool-web-fetch'
416
+
417
+ # ── parallel rows ──────────────────────────────────────────────────────────
418
+
419
+ # Claude Code skills from user/project/additional roots.
420
+ - id: skill-claude-code
421
+ name: '@dsh-cc/skill-loader'
422
+
423
+ - id: memory-consolidation
424
+ name: '@dsh-cc/memory-consolidation'
425
+
426
+ # Render CLAUDE.md-style output styles to the system prompt.
427
+ - id: cc-output-styles
428
+ name: '@dsh-cc/output-styles'
429
+
430
+ # Coordinator mode: DSH_COORDINATOR_MODE=1 or config enabled.
431
+ - id: coordinator
432
+ name: '@dsh-cc/coordinator'
433
+
434
+ - id: schedule
435
+ name: '@deepseek-ai/dsh-schedule'
436
+
437
+ - id: session-cwd
438
+ name: '@dsh-cc/session-cwd'
439
+
440
+ - id: tool-git-worktree
441
+ name: '@dsh-cc/tool-git-worktree'
442
+
443
+ - id: tool-sleep
444
+ name: '@dsh-cc/tool-sleep'
445
+
446
+ # NotebookEdit: edits Jupyter notebook (.ipynb) cells over the ctx.fs seam
447
+ # with CC's replace/insert/delete, cell addressing, and read-before-write gate.
448
+ - id: tool-notebook-edit
449
+ name: '@dsh-cc/tool-notebook-edit'
450
+
451
+ # StructuredOutput: non-interactive structured-final-response channel, registered
452
+ # only when the deployment declares a schema (CC's SyntheticOutputTool).
453
+ - id: tool-structured-output
454
+ name: '@dsh-cc/tool-structured-output'
455
+
456
+ # ── CC parity slash commands ───────────────────────────────────────────────
457
+
458
+ - id: command-cost
459
+ name: '@dsh-cc/command-cost'
460
+ config:
461
+ # Composition decides pricing → the package schema stays strict; ship an
462
+ # empty price table by default (README "Known limits" /cost entry).
463
+ modelTable: []
464
+
465
+ - id: command-export
466
+ name: '@dsh-cc/command-export'
467
+
468
+ - id: command-stats
469
+ name: '@dsh-cc/command-stats'
470
+
471
+ - id: command-status
472
+ name: '@dsh-cc/command-status'
473
+
474
+ - id: command-memory
475
+ name: '@dsh-cc/command-memory'
476
+
477
+ - id: command-skills
478
+ name: '@dsh-cc/command-skills'
479
+
480
+ - id: command-help
481
+ name: '@dsh-cc/command-help'
482
+
483
+ - id: command-config
484
+ name: '@dsh-cc/command-config'
485
+
486
+ - id: command-permissions
487
+ name: '@dsh-cc/command-permissions'
488
+
489
+ - id: command-version
490
+ name: '@dsh-cc/command-version'
491
+
492
+ - id: command-release-notes
493
+ name: '@dsh-cc/command-release-notes'
494
+
495
+ - id: command-diff
496
+ name: '@dsh-cc/command-diff'
497
+
498
+ - id: command-init
499
+ name: '@dsh-cc/command-init'
500
+
501
+ - id: command-tasks
502
+ name: '@dsh-cc/command-tasks'
503
+
504
+ - id: command-resume
505
+ name: '@dsh-cc/command-resume'
506
+
507
+ - id: command-rename
508
+ name: '@dsh-cc/command-rename'
509
+
510
+ - id: command-branch
511
+ name: '@dsh-cc/command-branch'
512
+
513
+ # Cache-stable tool ordering: remembers each scope's last emitted tool-name
514
+ # sequence on the system-prompt/assemble waterfall and appends newly appeared
515
+ # tools (ToolSearch activations, MCP registrations) lexicographically at the
516
+ # tail, so an activation extends the request prefix instead of shifting every
517
+ # tool after the insertion point. cordis waterfall is outermost-first and the
518
+ # outermost listener has the final say, so the plugin registers its assemble
519
+ # listener with `prepend` to stay outermost regardless of row position; the
520
+ # row itself stays last because the composition drift gate expects cc rows at
521
+ # the bottom (the Item 6 L0 prefix-stability e2e is the sentinel).
522
+ # Publishes no Service, so it needs no isolate realm.
523
+ - id: tool-append-order
524
+ name: '@dsh-cc/tool-append-order'
@@ -0,0 +1,3 @@
1
+ name: CC mode
2
+ description: Full Standard-mode capability, plus the Claude Code surface — .claude plugin directories, Claude hooks, slash commands, persistent memory, output styles, and fetch-enabled Web tools.
3
+ order: 5
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Copy packages/preset/cc/{agent.cordis.yml,preset.yml} into this package's
4
+ * presets/cc so the published tarball can materialize the user-root preset.
5
+ */
6
+ import { cpSync, mkdirSync, existsSync, writeFileSync } from 'node:fs'
7
+ import { dirname, join } from 'node:path'
8
+ import { fileURLToPath } from 'node:url'
9
+
10
+ const here = dirname(fileURLToPath(import.meta.url))
11
+ const pkgRoot = join(here, '..')
12
+ const repoPreset = join(pkgRoot, '..', '..', 'preset', 'cc')
13
+ const dest = join(pkgRoot, 'presets', 'cc')
14
+
15
+ if (!existsSync(join(repoPreset, 'agent.cordis.yml'))) {
16
+ console.error(`stage-preset: missing ${join(repoPreset, 'agent.cordis.yml')}`)
17
+ process.exit(1)
18
+ }
19
+
20
+ mkdirSync(dest, { recursive: true })
21
+ cpSync(join(repoPreset, 'agent.cordis.yml'), join(dest, 'agent.cordis.yml'))
22
+ cpSync(join(repoPreset, 'preset.yml'), join(dest, 'preset.yml'))
23
+ writeFileSync(
24
+ join(dest, '.dsh-cc-managed.json'),
25
+ `${JSON.stringify({ owner: '@dsh-cc/tui', preset: 'cc', revision: '0.1.0' }, null, 2)}\n`,
26
+ )