dsh-plugin-dev-kb 1.3.0 → 1.4.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 (364) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.en.md +4 -4
  3. package/README.md +5 -5
  4. package/kb/INDEX.md +18 -18
  5. package/kb/README.md +6 -4
  6. package/kb/extra/AGENTS.md +11 -10
  7. package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
  8. package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
  9. package/kb/extra/cookbook/adding-a-session-format-version.md +48 -6
  10. package/kb/extra/cookbook/adding-a-session-format-version.zh.md +48 -6
  11. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +120 -0
  12. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +120 -0
  13. package/kb/extra/deepseek-llm-api-wire-extensions.md +18 -19
  14. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +17 -18
  15. package/kb/extra/development.md +27 -10
  16. package/kb/extra/development.zh.md +27 -10
  17. package/kb/extra/event-producer-consumer.md +89 -68
  18. package/kb/extra/event-producer-consumer.zh.md +90 -69
  19. package/kb/extra/glossary.md +1 -1
  20. package/kb/extra/glossary.zh.md +1 -1
  21. package/kb/extra/i18n/README.md +15 -7
  22. package/kb/extra/i18n/README.zh.md +15 -7
  23. package/kb/extra/i18n/terminology.md +4 -4
  24. package/kb/extra/i18n/translation-prompt.md +2 -2
  25. package/kb/extra/module-graph.md +574 -326
  26. package/kb/extra/module-graph.zh.md +574 -326
  27. package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
  28. package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
  29. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
  30. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
  31. package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
  32. package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
  33. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
  34. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
  35. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
  36. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
  37. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
  38. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
  39. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
  40. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
  41. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
  42. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
  43. package/kb/extra/persistence-changes/README.md +88 -0
  44. package/kb/extra/persistence-changes/README.zh.md +88 -0
  45. package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
  46. package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
  47. package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
  48. package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
  49. package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
  50. package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
  51. package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
  52. package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
  53. package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
  54. package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
  55. package/kb/extra/persistence-changes/releases/README.md +103 -0
  56. package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
  57. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
  58. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
  59. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
  60. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
  61. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
  62. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
  63. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
  64. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
  65. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
  66. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
  67. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
  68. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
  69. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
  70. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
  71. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
  72. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
  73. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
  74. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
  75. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
  76. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
  77. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
  78. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
  79. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
  80. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
  81. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
  82. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
  83. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
  84. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
  85. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
  86. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
  87. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
  88. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
  89. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
  90. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
  91. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
  92. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
  93. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
  94. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
  95. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
  96. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
  97. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
  98. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
  99. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
  100. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
  101. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
  102. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
  103. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
  104. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
  105. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
  106. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
  107. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
  108. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
  109. package/kb/extra/rescope.md +1 -1
  110. package/kb/extra/rescope.zh.md +1 -1
  111. package/kb/extra/session-format-status.md +22 -6
  112. package/kb/extra/session-format-status.zh.md +22 -6
  113. package/kb/extra/subsystems/agent-team.md +52 -28
  114. package/kb/extra/subsystems/agent-team.zh.md +52 -28
  115. package/kb/extra/subsystems/attachment.md +19 -9
  116. package/kb/extra/subsystems/attachment.zh.md +19 -9
  117. package/kb/extra/subsystems/boot.md +323 -0
  118. package/kb/extra/subsystems/boot.zh.md +323 -0
  119. package/kb/extra/subsystems/browser-use.md +67 -0
  120. package/kb/extra/subsystems/browser-use.zh.md +67 -0
  121. package/kb/extra/subsystems/claude-code-mods.md +146 -0
  122. package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
  123. package/kb/extra/subsystems/computer-use.md +56 -0
  124. package/kb/extra/subsystems/computer-use.zh.md +56 -0
  125. package/kb/extra/subsystems/deliverables.md +178 -0
  126. package/kb/extra/subsystems/deliverables.zh.md +178 -0
  127. package/kb/extra/subsystems/extensions.md +6 -4
  128. package/kb/extra/subsystems/extensions.zh.md +6 -4
  129. package/kb/extra/subsystems/feedback.md +4 -4
  130. package/kb/extra/subsystems/feedback.zh.md +4 -4
  131. package/kb/extra/subsystems/mcp.md +139 -0
  132. package/kb/extra/subsystems/mcp.zh.md +139 -0
  133. package/kb/extra/subsystems/office-to-pdf.md +87 -0
  134. package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
  135. package/kb/extra/subsystems/otel.md +44 -0
  136. package/kb/extra/subsystems/otel.zh.md +44 -0
  137. package/kb/extra/subsystems/product-telemetry.md +79 -0
  138. package/kb/extra/subsystems/product-telemetry.zh.md +79 -0
  139. package/kb/extra/subsystems/ssh.md +135 -0
  140. package/kb/extra/subsystems/ssh.zh.md +135 -0
  141. package/kb/extra/subsystems/todo.md +3 -3
  142. package/kb/extra/subsystems/todo.zh.md +3 -3
  143. package/kb/extra/subsystems/voice-input.md +164 -0
  144. package/kb/extra/subsystems/voice-input.zh.md +164 -0
  145. package/kb/extra/subsystems/webhook.md +3 -3
  146. package/kb/extra/subsystems/webhook.zh.md +1 -1
  147. package/kb/extra/testing.md +3 -3
  148. package/kb/extra/testing.zh.md +3 -3
  149. package/kb/extra/ui-radius.md +115 -0
  150. package/kb/extra/ui-radius.zh.md +115 -0
  151. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
  152. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
  153. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
  154. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
  155. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
  156. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
  157. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
  158. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
  159. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
  160. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
  161. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
  162. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
  163. package/kb/extra/web-styling.md +12 -3
  164. package/kb/extra/web-styling.zh.md +12 -3
  165. package/kb/meta/search-index.json +976 -256
  166. package/kb/meta/site-pages.txt +188 -188
  167. package/kb/meta/source.json +6 -6
  168. package/kb/meta/topics.md +10 -6
  169. package/kb/site/develop/basic/config.md +1 -0
  170. package/kb/site/develop/basic/index.md +1 -0
  171. package/kb/site/develop/basic/publish.md +9 -2
  172. package/kb/site/develop/basic/tool.md +1 -0
  173. package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
  174. package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  175. package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
  176. package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
  177. package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
  178. package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  179. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  180. package/kb/site/develop/cordis-tutorial/index.md +1 -0
  181. package/kb/site/develop/framework/events.md +1 -0
  182. package/kb/site/develop/framework/index.md +2 -1
  183. package/kb/site/develop/framework/service.md +1 -0
  184. package/kb/site/develop/practice/dynamic-cordis.md +9 -8
  185. package/kb/site/develop/practice/index.md +1 -0
  186. package/kb/site/develop/practice/llm-adapter.md +2 -1
  187. package/kb/site/en/develop/basic/config.md +1 -0
  188. package/kb/site/en/develop/basic/index.md +1 -0
  189. package/kb/site/en/develop/basic/publish.md +9 -2
  190. package/kb/site/en/develop/basic/tool.md +1 -0
  191. package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
  192. package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  193. package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
  194. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
  195. package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
  196. package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  197. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  198. package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
  199. package/kb/site/en/develop/framework/events.md +1 -0
  200. package/kb/site/en/develop/framework/index.md +2 -1
  201. package/kb/site/en/develop/framework/service.md +1 -0
  202. package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
  203. package/kb/site/en/develop/practice/index.md +1 -0
  204. package/kb/site/en/develop/practice/llm-adapter.md +2 -1
  205. package/kb/site/en/guide/github-review.md +1 -0
  206. package/kb/site/en/guide/mcp-memory.md +1 -0
  207. package/kb/site/en/guide/network-proxy.md +2 -1
  208. package/kb/site/en/guide/providers-custom-form.png +0 -0
  209. package/kb/site/en/guide/providers-models-page.png +0 -0
  210. package/kb/site/en/guide/providers.md +97 -82
  211. package/kb/site/en/guide/public-deployments.md +36 -0
  212. package/kb/site/en/guide/python-sdk.md +42 -21
  213. package/kb/site/en/guide/quickstart.md +2 -0
  214. package/kb/site/en/guide/schedule.md +70 -11
  215. package/kb/site/en/reference/agent-lifecycle.md +1 -0
  216. package/kb/site/en/reference/api-gateway.md +13 -11
  217. package/kb/site/en/reference/capability-seams.md +177 -59
  218. package/kb/site/en/reference/config-catalog.md +1758 -821
  219. package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
  220. package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
  221. package/kb/site/en/reference/cookbook/adding-a-tool.md +4 -3
  222. package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
  223. package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -5
  224. package/kb/site/en/reference/cordis-api/context.md +1 -0
  225. package/kb/site/en/reference/cordis-api/events.md +1 -0
  226. package/kb/site/en/reference/cordis-api/fiber.md +4 -3
  227. package/kb/site/en/reference/cordis-api/inherited.md +16 -16
  228. package/kb/site/en/reference/cordis-api/registry.md +1 -0
  229. package/kb/site/en/reference/cordis-api/service.md +1 -0
  230. package/kb/site/en/reference/cordis-primer.md +1 -0
  231. package/kb/site/en/reference/index.md +18 -11
  232. package/kb/site/en/reference/persistence-catalog.md +7687 -54
  233. package/kb/site/en/reference/subsystems/approval.md +2 -1
  234. package/kb/site/en/reference/subsystems/client-modules.md +23 -15
  235. package/kb/site/en/reference/subsystems/client-resources.md +3 -1
  236. package/kb/site/en/reference/subsystems/commands.md +6 -1
  237. package/kb/site/en/reference/subsystems/compaction.md +50 -3
  238. package/kb/site/en/reference/subsystems/conversation.md +36 -6
  239. package/kb/site/en/reference/subsystems/core.md +97 -257
  240. package/kb/site/en/reference/subsystems/credentials.md +169 -5
  241. package/kb/site/en/reference/subsystems/filesystem.md +11 -0
  242. package/kb/site/en/reference/subsystems/goal.md +2 -1
  243. package/kb/site/en/reference/subsystems/index.md +16 -5
  244. package/kb/site/en/reference/subsystems/jobs.md +337 -127
  245. package/kb/site/en/reference/subsystems/llm-streaming.md +76 -36
  246. package/kb/site/en/reference/subsystems/lsp.md +1 -0
  247. package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
  248. package/kb/site/en/reference/subsystems/persistence.md +4 -3
  249. package/kb/site/en/reference/subsystems/plan.md +2 -1
  250. package/kb/site/en/reference/subsystems/ptc-runtime.md +236 -0
  251. package/kb/site/en/reference/subsystems/sandbox.md +7 -5
  252. package/kb/site/en/reference/subsystems/schedule.md +392 -33
  253. package/kb/site/en/reference/subsystems/scope.md +2 -1
  254. package/kb/site/en/reference/subsystems/session-projection.md +22 -19
  255. package/kb/site/en/reference/subsystems/session-query.md +1 -0
  256. package/kb/site/en/reference/subsystems/session-reference.md +8 -6
  257. package/kb/site/en/reference/subsystems/session-telemetry.md +7 -4
  258. package/kb/site/en/reference/subsystems/session-title.md +6 -5
  259. package/kb/site/en/reference/subsystems/session.md +199 -81
  260. package/kb/site/en/reference/subsystems/settings.md +43 -292
  261. package/kb/site/en/reference/subsystems/shell.md +37 -28
  262. package/kb/site/en/reference/subsystems/sidebar-right.md +23 -12
  263. package/kb/site/en/reference/subsystems/skills.md +5 -6
  264. package/kb/site/en/reference/subsystems/slots.md +34 -13
  265. package/kb/site/en/reference/subsystems/spill.md +4 -3
  266. package/kb/site/en/reference/subsystems/storage.md +2 -2
  267. package/kb/site/en/reference/subsystems/subagent.md +50 -64
  268. package/kb/site/en/reference/subsystems/subprocess.md +17 -18
  269. package/kb/site/en/reference/subsystems/system-prompt.md +4 -1
  270. package/kb/site/en/reference/subsystems/terminal.md +1 -0
  271. package/kb/site/en/reference/subsystems/token-meter.md +1 -0
  272. package/kb/site/en/reference/subsystems/tools.md +40 -12
  273. package/kb/site/en/reference/subsystems/typert.md +153 -10
  274. package/kb/site/en/reference/subsystems/user-questions.md +131 -1
  275. package/kb/site/en/reference/subsystems/web-client.md +15 -9
  276. package/kb/site/en/reference/subsystems/web-server.md +74 -1
  277. package/kb/site/en/reference/subsystems/web.md +1 -0
  278. package/kb/site/en/reference/subsystems/workflow.md +10 -9
  279. package/kb/site/en/reference/subsystems/workspace.md +294 -34
  280. package/kb/site/en/reference/tool-catalog.md +782 -331
  281. package/kb/site/en/reference/tool-execution-pipeline.md +7 -3
  282. package/kb/site/guide/github-review.md +1 -0
  283. package/kb/site/guide/mcp-memory.md +1 -0
  284. package/kb/site/guide/network-proxy.md +2 -1
  285. package/kb/site/guide/providers-custom-form.zh.png +0 -0
  286. package/kb/site/guide/providers-models-page.zh.png +0 -0
  287. package/kb/site/guide/providers.md +109 -94
  288. package/kb/site/guide/public-deployments.md +36 -0
  289. package/kb/site/guide/python-sdk.md +42 -21
  290. package/kb/site/guide/quickstart.md +2 -0
  291. package/kb/site/guide/schedule.md +70 -11
  292. package/kb/site/reference/agent-lifecycle.md +1 -0
  293. package/kb/site/reference/api-gateway.md +13 -11
  294. package/kb/site/reference/capability-seams.md +177 -59
  295. package/kb/site/reference/config-catalog.md +1760 -822
  296. package/kb/site/reference/cookbook/adding-a-package.md +55 -3
  297. package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
  298. package/kb/site/reference/cookbook/adding-a-tool.md +4 -3
  299. package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
  300. package/kb/site/reference/cookbook/extension-cookbook.md +6 -5
  301. package/kb/site/reference/cordis-api/context.md +1 -0
  302. package/kb/site/reference/cordis-api/events.md +1 -0
  303. package/kb/site/reference/cordis-api/fiber.md +4 -3
  304. package/kb/site/reference/cordis-api/inherited.md +16 -16
  305. package/kb/site/reference/cordis-api/registry.md +1 -0
  306. package/kb/site/reference/cordis-api/service.md +1 -0
  307. package/kb/site/reference/cordis-primer.md +1 -0
  308. package/kb/site/reference/index.md +18 -11
  309. package/kb/site/reference/persistence-catalog.md +7693 -60
  310. package/kb/site/reference/subsystems/approval.md +2 -1
  311. package/kb/site/reference/subsystems/client-modules.md +23 -15
  312. package/kb/site/reference/subsystems/client-resources.md +3 -1
  313. package/kb/site/reference/subsystems/commands.md +6 -1
  314. package/kb/site/reference/subsystems/compaction.md +50 -3
  315. package/kb/site/reference/subsystems/conversation.md +35 -5
  316. package/kb/site/reference/subsystems/core.md +97 -257
  317. package/kb/site/reference/subsystems/credentials.md +169 -5
  318. package/kb/site/reference/subsystems/filesystem.md +11 -0
  319. package/kb/site/reference/subsystems/goal.md +2 -1
  320. package/kb/site/reference/subsystems/index.md +16 -5
  321. package/kb/site/reference/subsystems/jobs.md +336 -126
  322. package/kb/site/reference/subsystems/llm-streaming.md +76 -36
  323. package/kb/site/reference/subsystems/lsp.md +1 -0
  324. package/kb/site/reference/subsystems/permission-presets.md +66 -29
  325. package/kb/site/reference/subsystems/persistence.md +4 -3
  326. package/kb/site/reference/subsystems/plan.md +2 -1
  327. package/kb/site/reference/subsystems/ptc-runtime.md +236 -0
  328. package/kb/site/reference/subsystems/sandbox.md +7 -5
  329. package/kb/site/reference/subsystems/schedule.md +392 -33
  330. package/kb/site/reference/subsystems/scope.md +2 -1
  331. package/kb/site/reference/subsystems/session-projection.md +22 -19
  332. package/kb/site/reference/subsystems/session-query.md +1 -0
  333. package/kb/site/reference/subsystems/session-reference.md +8 -6
  334. package/kb/site/reference/subsystems/session-telemetry.md +7 -4
  335. package/kb/site/reference/subsystems/session-title.md +6 -5
  336. package/kb/site/reference/subsystems/session.md +199 -81
  337. package/kb/site/reference/subsystems/settings.md +43 -292
  338. package/kb/site/reference/subsystems/shell.md +37 -28
  339. package/kb/site/reference/subsystems/sidebar-right.md +23 -12
  340. package/kb/site/reference/subsystems/skills.md +5 -6
  341. package/kb/site/reference/subsystems/slots.md +34 -13
  342. package/kb/site/reference/subsystems/spill.md +3 -2
  343. package/kb/site/reference/subsystems/storage.md +2 -2
  344. package/kb/site/reference/subsystems/subagent.md +49 -63
  345. package/kb/site/reference/subsystems/subprocess.md +17 -18
  346. package/kb/site/reference/subsystems/system-prompt.md +4 -1
  347. package/kb/site/reference/subsystems/terminal.md +1 -0
  348. package/kb/site/reference/subsystems/token-meter.md +1 -0
  349. package/kb/site/reference/subsystems/tools.md +40 -12
  350. package/kb/site/reference/subsystems/typert.md +153 -10
  351. package/kb/site/reference/subsystems/user-questions.md +132 -2
  352. package/kb/site/reference/subsystems/web-client.md +15 -9
  353. package/kb/site/reference/subsystems/web-server.md +74 -1
  354. package/kb/site/reference/subsystems/web.md +1 -0
  355. package/kb/site/reference/subsystems/workflow.md +10 -9
  356. package/kb/site/reference/subsystems/workspace.md +294 -34
  357. package/kb/site/reference/tool-catalog.md +784 -333
  358. package/kb/site/reference/tool-execution-pipeline.md +7 -3
  359. package/package.json +2 -2
  360. package/skills/dsh-plugin-dev-kb.md +5 -4
  361. package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
  362. package/kb/site/en/reference/subsystems/invariants.md +0 -91
  363. package/kb/site/reference/subsystems/code-runtime.md +0 -198
  364. package/kb/site/reference/subsystems/invariants.md +0 -91
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/workflow.md"
3
+ rawMarkdownPath: "en/reference/subsystems/workflow.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -7,7 +8,7 @@ outline: [2,3]
7
8
 
8
9
  The workflow seam lets an agent run a model-written orchestration SCRIPT that starts subagents. Like [subagent](./subagent.md) it is **one optional capability**, not part of the agent loop, so its types and operations live here rather than in [core.md](./core.md). Like bash, it permits ONE engine implementation per context to provide `ctx.workflowEngine`; there is no named-provider registry (a second engine replaces the first through plugin configuration rather than running beside it).
9
10
 
10
- Service Definition: [dsh-workflow](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/workflow) (`ctx.workflowEngine` + the vocabulary below). The Service Provider is [dsh-workflow-worker-thread](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/workflow-worker-thread) (a `node:worker_threads` engine — one worker per run, the script's vm context inside it); the model-facing Consumer is [dsh-tool-workflow](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/tool-workflow). The proposal and rationale: [the dynamic-workflows Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-07-05-dynamic-workflows.md).
11
+ Service Definition: [dsh-workflow](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/workflow) (`ctx.workflowEngine` and the vocabulary below). [dsh-workflow-ptc](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/workflow-ptc) executes the VM and helpers through the shared Node PTC process runtime under the calling Session's file policy. The consumers are [dsh-tool-workflow](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/tool-workflow) and the opt-in [dsh-tool-ralph](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/tool-ralph). [Workflow sandbox reuse](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-13-workflow-ptc-sandbox-reuse.md) owns execution choices; the [dynamic-workflows reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workflow/workflow/README.md) owns script semantics.
11
12
 
12
13
  Sources: browser-safe vocabulary in [`packages/workflow/workflow/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workflow/workflow/src/types.ts), Host request and live-run handles in [`runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workflow/workflow/src/runtime-types.ts).
13
14
 
@@ -85,8 +86,8 @@ interface WorkflowResult {
85
86
  /**
86
87
  * How many `agent()` calls the run accepted over its whole lifetime. On a
87
88
  * graceful settlement this is the script-side count (calls still queued for
88
- * a concurrency slot included); on a termination path (grace force-settle,
89
- * worker death) it degrades to the host-observed count — calls queued
89
+ * a concurrency slot included); on a termination path (cancellation or
90
+ * process failure) it degrades to the host-observed count — calls queued
90
91
  * inside a terminated script are unknowable then.
91
92
  */
92
93
  agentsStarted: number
@@ -95,7 +96,7 @@ interface WorkflowResult {
95
96
 
96
97
  ## A live run: `WorkflowRun`
97
98
 
98
- The handle the consumer holds while a script executes. The consumer awaits `result`, may `cancel` mid-flight, and MUST `dispose` on every path. `result` does NOT reject — a script failure resolves with `stopReason: 'error'` — and once the run is cancelled it SETTLES within the engine's bounded grace even if the script itself never settles (the engine force-settles `cancelled`; the worker-thread engine then terminates the script's worker), so a consumer awaiting `result` is never wedged past a cancellation. `dispose()` = cancel + that bounded settle + child quiescence; it never hangs on a stuck script.
99
+ The consumer awaits `result`, may `cancel` during execution, and must `dispose` on every path. `result` never rejects: script failure resolves with `stopReason: 'error'`, and cancellation with `'cancelled'`. The PTC engine has no overall elapsed deadline; it immediately aborts the managed process when cancelled. Disposal awaits process and child cleanup under their provider contracts, without an independent workflow cleanup deadline.
99
100
 
100
101
  ```ts type-equiv
101
102
  /**
@@ -109,7 +110,7 @@ interface WorkflowRun {
109
110
  readonly result: Promise<WorkflowResult>
110
111
  /** Cancel the run and its children. */
111
112
  cancel(reason?: string): void
112
- /** Cancel if needed and await bounded settlement and cleanup. */
113
+ /** Cancel if needed and await script and child cleanup. */
113
114
  dispose(): Promise<void>
114
115
  }
115
116
  ```
@@ -126,7 +127,7 @@ The `workflow/*` events (`workflow/start`, `workflow/phase`, `workflow/log`, `wo
126
127
 
127
128
  The top-level `dsh-tool-workflow` consumer projects display facts into its calling parent Session without changing execution ownership. It writes `tool-workflow/run-start` after a run is accepted, pairs member start and end by `runId + seq`, and writes `tool-workflow/run-end` only after the result is known and disposal reaches quiescence. Nested transport calls write no record. The first append failure disables later writes for that run, so the log remains empty or a legal continuous prefix and the tool result is unchanged.
128
129
 
129
- `dsh-tool-workflow/invariant` validates the same protocol before live commit and when a Session is loaded: one start per run, positive unique member sequences, paired member endings, no run ending with open members, and no updates after the run ending. A missing member ending or run ending at the log tail is valid interruption evidence rather than corruption.
130
+ The record protocol allows one start per run, positive unique member sequences, paired member endings, no run ending with open members, and no updates after the run ending. A missing member ending or run ending at the log tail is valid interruption evidence rather than corruption.
130
131
 
131
132
  `dsh-client-ui-workflow-run` folds the four events through the Conversation Node engine into one `workflow-run` Chat node anchored at the run-start sequence, after the original workflow tool node. Phase groups come only from actual member starts and preserve exact strings, including the distinction between an omitted phase and `''`. Closed Locations turn missing terminal facts into interrupted presentation. The [UI package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/ui-workflow-run/README.md) owns disclosure, status, and same-parent local navigation behavior.
132
133
 
@@ -142,7 +143,7 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
142
143
 
143
144
  ### `ctx.workflowEngine` — `WorkflowEngine` (abstract seam)
144
145
 
145
- Workflow Service Definition contract. Invalid requests throw before publication; a live run is holder-owned, its result never rejects, cancellation and disposal are bounded, and disposal waits for child cleanup within that bound. Lifecycle listener failures are contained, and `workflow/end` fires exactly once as the result settles.
146
+ Workflow Service Definition contract. Invalid requests throw before publication; a live run is holder-owned, its result never rejects, and disposal waits for script and child cleanup. Lifecycle listener failures are contained, and `workflow/end` fires exactly once as the result settles.
146
147
 
147
148
  ```ts cordis-catalog
148
149
  /**
@@ -164,14 +165,14 @@ Source: [`packages/workflow/workflow/src/index.ts`](https://github.com/deepseek-
164
165
 
165
166
  #### `workflow/agent-end` — emit
166
167
 
167
- One `agent()` call settled (clean result, child failure, or run cancellation). Paired with Events['workflow/agent-start'] by `agent.seq`, exactly once per started call on every stop path — on an engine termination path (a worker killed past its grace) the end is engine-synthesized with outcome `'cancelled'`.
168
+ One `agent()` call settled (clean result, child failure, or run cancellation). Paired with Events['workflow/agent-start'] by `agent.seq`, exactly once per started call on every stop path — on an engine termination path the end is engine-synthesized with outcome `'cancelled'`.
168
169
 
169
170
  ```ts cordis-catalog
170
171
  /**
171
172
  * One `agent()` call settled (clean result, child failure, or run
172
173
  * cancellation). Paired with {@link Events['workflow/agent-start']} by
173
174
  * `agent.seq`, exactly once per started call on every stop path — on an
174
- * engine termination path (a worker killed past its grace) the end is
175
+ * engine termination path the end is
175
176
  * engine-synthesized with outcome `'cancelled'`.
176
177
  * @param info - the run's identity snapshot.
177
178
  * @param agent - the call identity plus its outcome.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/workspace.md"
3
+ rawMarkdownPath: "en/reference/subsystems/workspace.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -120,10 +121,51 @@ Ownership truth is the record's ordered `sessionIds`, never derived from session
120
121
 
121
122
  ## The registry: `ctx.workspaceRegistry`
122
123
 
123
- `WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` requires a fully qualified path, canonicalizes it, rejects a nonexistent path (the original `ENOENT`) or a non-directory, returns the existing entity unchanged when the canonical path is already owned, and otherwise creates a record with `title ?? defaultWorkspaceTitle(path)` prepended to the durable registry order (different canonical paths may share a display title, and a path with no final segment uses its root spelling). `get(id)` and the ordered `list()` are synchronous cache reads; `resolveByPath(path)` applies the same fully qualified realpath canon without creating. `delete(id)` removes only the registration, order entry, and session account — the directory, user files, live sessions, and persisted logs are never touched, so those sessions become Ungrouped ([decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-07-27-workspace-registration-deletion.md)); unknown ids return `false`. Create and delete persist a pending-mutation marker before their two writes (record + order) can diverge; startup resolves exactly the marked mutation — by deleting the marked table row, which completes an interrupted delete and rolls back an interrupted create (the registration is re-creatable, so rollback is the safe direction) — and an unmarked order/table mismatch fails loud as corruption.
124
+ `WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` requires a fully qualified path, canonicalizes it, rejects a nonexistent path (the original `ENOENT`) or a non-directory, returns the existing entity unchanged when the canonical path is already owned, and otherwise creates a record with `title ?? defaultWorkspaceTitle(path)` prepended to the durable registry order (different canonical paths may share a display title, and a path with no final segment uses its root spelling). `get(id)` and the ordered `list()` are synchronous cache reads; `resolveByPath(path)` applies the same fully qualified realpath canon without creating. `delete(id)` removes only the registration, order entry, and session account — the directory, user files, live sessions, and persisted logs are never touched, so those sessions become Ungrouped ([reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workspace/workspace/README.md)); unknown ids return `false`. Create and delete persist a pending-mutation marker before their two writes (record + order) can diverge; startup resolves exactly the marked mutation — by deleting the marked table row, which completes an interrupted delete and rolls back an interrupted create (the registration is re-creatable, so rollback is the safe direction) — and an unmarked order/table mismatch fails loud as corruption.
124
125
 
125
126
  Sessions get their cwd at create time from whoever creates them, not from this registry — the API gateway resolves a new session's cwd from the chosen workspace's `path` (falling back to an explicit or default cwd), creates the session so the cwd lands in its immutable [`SessionHeader`](./persistence.md#sessionheader--metadata-beside-the-log), then calls `attachSession`, which re-validates that stored header cwd against the workspace path. On the first successful start, the registry bootstraps history from persisted headers alone (`id`, `cwd`, `createdAt` — never event bodies), grouping sessions with a valid canonical cwd into per-directory workspaces, newest first; the initialized marker is written last so an interrupted bootstrap resumes safely. The bootstrap is one-time: cwd-less legacy sessions stay Ungrouped, and sessions created afterwards join a workspace only through `attachSession`.
126
127
 
128
+ ## Default Workspace initialization
129
+
130
+ The controller's `initializeDefault` takes no request: it owns the fixed `default-workspace` directory name, resolves the Documents location, and asks the registry to initialize once. The registry accepts a directory resolver, derives the initial title from the requested directory's final segment rather than the canonical one, and commits the registration with its durable identity. No language reaches the Host — browser consumers label a Workspace still carrying that automatic title through the controller's `workspaceDisplayTitle`, so only the on-screen name follows the reader's language. [First-use behavior and configuration](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-controller/README.md#first-use-workspace) describe reuse and failure handling.
131
+
132
+ ## Session pinning
133
+
134
+ The controller's [transport types](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-controller/src/types.ts) define `WorkspacePinSessionRequest` and `WorkspaceUnpinSessionRequest`, each carrying one `sessionId`. Both operations return `WorkspacePinValue`: the complete `pinnedSessionIds` array of Session ids, most recently pinned first. Pinning requires a known, unarchived Session; unpinning an id that is not pinned succeeds without changing the set. Archiving removes the Session's pin in the same durable write, and unarchiving does not restore it.
135
+
136
+ ## Archive admission
137
+
138
+ Archiving is a registry-global durable set, and the registry refuses to hide running work behind it. The rule is a capability seam over two Host events the package declares and dispatches ([events](#workspace-events)): `workspace/session-activity` (waterfall) asks the composed providers what still runs for a Session, and `workspace/session-stop` (parallel) asks them to stop it. Each provider registers on the root like any listener, so the package knows no agent, job, or schedule vocabulary; the families are keys of a merge-extensible map.
139
+
140
+ ```ts type-equiv
141
+ /**
142
+ * Activity families a `workspace/session-activity` listener may report. This
143
+ * package declares none: each provider merges its own key from a module both
144
+ * its Host and Client faces import, so a consumer that renders the families
145
+ * sees exactly the keys its program compiled and falls through to a generic
146
+ * description for any other. The shipped providers merge `turn` (the Agent
147
+ * registry), `job` (the job registry seam), `subagent` (the Subagent
148
+ * runtime), and `schedule` (the Schedule plugin).
149
+ */
150
+ interface SessionActivityKindMap {}
151
+ ```
152
+
153
+ `SessionActivityKind` is `keyof SessionActivityKindMap`, so a program that compiled no provider sees no key at all. The shipped keys live in client-importable type modules: `turn` in the Agent registry's `types.ts`, `job` in the job registry seam's `view.ts`, `subagent` in the Subagent runtime's `control-types.ts`, `schedule` in the Schedule plugin's `types.ts`; a consumer that renders the families imports those modules for its cases and keeps a generic line for any other key. A provider answers the waterfall by prepending its `SessionActivity` entries to the result of `next()`; the registry's innermost callback returns an empty list, so a composition without providers archives freely.
154
+
155
+ ```ts type-equiv
156
+ /**
157
+ * One reason a session counts as active for archive admission. Families with
158
+ * per-item identity list their items so a caller can name what must stop.
159
+ */
160
+ interface SessionActivity {
161
+ readonly kind: SessionActivityKind
162
+ /** Active items of the family; absent for a family without per-item identity (`turn`). */
163
+ readonly items?: readonly SessionActivityItem[]
164
+ }
165
+ ```
166
+
167
+ `SessionActivityItem` carries the family-specific `id` (a session, job, or schedule id) and an optional display `label`. `archiveSession(sessionId)` asks the waterfall once, after the existence check, and rejects a non-empty answer with `WorkspaceActiveSessionError` (`sessionId`, `activity`) without writing; the controller maps it to the `workspace/session-active` error, whose details carry the same two fields. `archiveSession(sessionId, { stopActivity: true })` — the `ArchiveSessionOptions` field the transport request exposes as `stopActivity` — skips the check, writes the archive, then dispatches `workspace/session-stop`; a rejecting provider is logged and the archive stays, and the stopped work is never awaited to settlement. An already archived id neither asks nor stops. The shipped providers, what they stop, and the `agent/pre-step` gate that keeps an archived Session from running a model step are documented with the [registry package](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workspace/workspace/README.md#api-behavior); the decision record is the [archive-stops-running-work Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-09-21-archive-stops-running-session-work.md).
168
+
127
169
  ## Consumers
128
170
 
129
171
  [`dsh-workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-controller) serves workspace CRUD to GUI clients over `ctx.workspaceRegistry`, and [`dsh-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) performs the create-session-then-attach flow above. [dsh-agent-instructions](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/context/agent-instructions) is **not** a consumer despite the name: it discovers AGENTS.md-style instruction files under an agent's own cwd and never touches `ctx.workspaceRegistry` — the shared word refers to the user's working directory, not to this registry's entities.
@@ -186,6 +228,106 @@ Host service backing the generated `ctx.remote.directoryPicker` namespace. The s
186
228
 
187
229
  Source: [`packages/api/workspace-controller/src/directory-picker.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-controller/src/directory-picker.ts)
188
230
 
231
+ <a id="ctxterminalcontroller--terminalcontroller"></a>
232
+
233
+ ### `ctx.terminalController` — `TerminalController`
234
+
235
+ Typed Remote control of transient Session-owned terminal processes.
236
+
237
+ ```ts cordis-catalog
238
+ /**
239
+ * Read the Session working directory and terminal limits without resolving a shell.
240
+ * @param agent - Session owner supplied by the Gateway.
241
+ * @param signal - request cancellation.
242
+ * @returns the Session workspace directory and terminal limits.
243
+ */
244
+ @Remote environment(agent: Agent, signal: AbortSignal): TerminalEnvironment
245
+
246
+ /**
247
+ * Discover installed shells in the Session's execution environment.
248
+ * @param agent - Session owner supplied by the Gateway.
249
+ * @param signal - request cancellation.
250
+ * @returns verified profiles, with the configured or system default first.
251
+ */
252
+ @Remote shells(agent: Agent, signal: AbortSignal): Promise<TerminalShell[]>
253
+
254
+ /**
255
+ * List retained terminals without resolving or activating an Agent.
256
+ * @param sessionId - displayed Session identity, including offline history.
257
+ * @returns terminals retained for this Host lifetime.
258
+ */
259
+ @Remote list(sessionId: SessionId): WebTerminalInfo[]
260
+
261
+ /**
262
+ * Allocate a user shell once for a caller-generated identity, without Agent sandbox or approval restrictions.
263
+ * @param agent - Session owner supplied by the Gateway.
264
+ * @param request - initial dimensions and idempotency identity.
265
+ * @param signal - allocation cancellation; committed terminals survive disconnection.
266
+ * @returns the existing or newly committed terminal.
267
+ */
268
+ @Remote async create(agent: Agent, request: TerminalCreateRequest, signal: AbortSignal): Promise<WebTerminalInfo>
269
+
270
+ /**
271
+ * Retain an existing terminal for a window without activating its Agent or taking input control.
272
+ * @param sessionId - owning Session identity, including an inactive saved layout.
273
+ * @param id - retained Host terminal identity.
274
+ * @param signal - physical Remote stream cancellation.
275
+ * @returns a hold acknowledgement followed by an open lifetime stream.
276
+ */
277
+ @Remote({ mode: 'stream' }) retain(sessionId: SessionId, id: WebTerminalId, signal: AbortSignal): AsyncIterable<TerminalRetentionFrame>
278
+
279
+ /**
280
+ * Attach to a terminal without binding its process lifetime to the transport.
281
+ * @param agent - Session owner supplied by the Gateway.
282
+ * @param id - terminal identity.
283
+ * @param attachmentId - new exclusive input attachment.
284
+ * @param signal - physical stream cancellation.
285
+ * @returns screen recovery followed by output and metadata changes.
286
+ */
287
+ @Remote({ mode: 'stream' }) follow(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, signal: AbortSignal): AsyncIterable<TerminalFrame>
288
+
289
+ /**
290
+ * Deliver raw input, including Tab completion and control characters.
291
+ * @param agent - Session owner supplied by the Gateway.
292
+ * @param id - terminal identity.
293
+ * @param attachmentId - current writable attachment.
294
+ * @param data - input bytes represented as UTF-8 text.
295
+ * @returns after provider input acceptance.
296
+ */
297
+ @Remote async write(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, data: string): Promise<void>
298
+
299
+ /**
300
+ * Update the dimensions of the PTY and recovery screen.
301
+ * @param agent - Session owner supplied by the Gateway.
302
+ * @param id - terminal identity.
303
+ * @param attachmentId - current writable attachment.
304
+ * @param cols - column count.
305
+ * @param rows - row count.
306
+ * @returns after the resize completes.
307
+ */
308
+ @Remote async resize(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, cols: number, rows: number): Promise<void>
309
+
310
+ /**
311
+ * Rename a terminal without changing its shell.
312
+ * @param agent - Session owner supplied by the Gateway.
313
+ * @param id - terminal identity.
314
+ * @param title - nonempty display title, at most 120 characters.
315
+ */
316
+ @Remote rename(agent: Agent, id: WebTerminalId, title: string): void
317
+
318
+ /**
319
+ * Close an identity to future creation and kill its process range; repeated closes succeed.
320
+ * @param agent - Session owner supplied by the Gateway.
321
+ * @param id - terminal identity.
322
+ * @returns after provider cleanup succeeds. A failure retains the terminal for retry.
323
+ */
324
+ @Remote async close(agent: Agent, id: WebTerminalId): Promise<void>
325
+ ```
326
+
327
+ Types: [Agent](./core.md) · [SessionId](./core.md)
328
+
329
+ Source: [`packages/api/terminal-controller/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/terminal-controller/src/index.ts)
330
+
189
331
  <a id="ctxworkspacecontroller--workspacecontroller"></a>
190
332
 
191
333
  ### `ctx.workspaceController` — `WorkspaceController`
@@ -200,6 +342,16 @@ Host service backing the generated `ctx.remote.workspace` namespace.
200
342
  */
201
343
  @Remote('create') create(request: WorkspaceCreateRequest): Promise<WorkspaceCreateValue>
202
344
 
345
+ /**
346
+ * Initialize or reuse the default Workspace during first-use startup. The
347
+ * directory name is fixed, so the Host never renames or relocates an
348
+ * existing default; its initial title is that same name, which browser
349
+ * consumers label in the reader's language.
350
+ * @param signal - caller lifetime; cancels native directory lookup.
351
+ * @returns the durable Workspace, or undefined when first-use initialization is ineligible; creates no Session or message.
352
+ */
353
+ @Remote('initializeDefault') async initializeDefault(signal: AbortSignal): Promise<WorkspaceValue | undefined>
354
+
203
355
  /**
204
356
  * Rename one Workspace to a unique non-blank title.
205
357
  * @param request - Workspace identity and proposed title.
@@ -235,6 +387,27 @@ Host service backing the generated `ctx.remote.workspace` namespace.
235
387
  */
236
388
  @Remote('archiveSession') archiveSession(request: WorkspaceArchiveSessionRequest): Promise<WorkspaceArchiveValue>
237
389
 
390
+ /**
391
+ * Restore one archived Session to Workspace grouping surfaces.
392
+ * @param request - Session identity to unarchive.
393
+ * @returns the complete resulting archive set.
394
+ */
395
+ @Remote('unarchiveSession') unarchiveSession(request: WorkspaceUnarchiveSessionRequest): Promise<WorkspaceArchiveValue>
396
+
397
+ /**
398
+ * Surface one known unarchived Session ahead of unpinned Sessions.
399
+ * @param request - Session identity to pin.
400
+ * @returns the complete resulting pin set, most recently pinned first.
401
+ */
402
+ @Remote('pinSession') pinSession(request: WorkspacePinSessionRequest): Promise<WorkspacePinValue>
403
+
404
+ /**
405
+ * Remove one Session's pin without changing its saved Session order.
406
+ * @param request - Session identity to unpin.
407
+ * @returns the complete resulting pin set, most recently pinned first.
408
+ */
409
+ @Remote('unpinSession') unpinSession(request: WorkspaceUnpinSessionRequest): Promise<WorkspacePinValue>
410
+
238
411
  /**
239
412
  * Stream a complete Workspace baseline followed by ordered increments.
240
413
  * @param signal - generation cancellation.
@@ -263,34 +436,14 @@ Host Remote file reads and workspace directory observations over the composed fi
263
436
  @Remote async read( workspaceFileScope: WorkspaceFileScope, path: string, range: WorkspaceFileRange, signal: AbortSignal, ): Promise<WorkspaceFileText>
264
437
 
265
438
  /**
266
- * Read one byte window of a regular file readable by the filesystem backend: raw
267
- * bytes, no text decoding and no binary rejection.
439
+ * Read a complete regular file or one byte range without text decoding.
268
440
  * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
269
- * @param path - absolute path or path relative to the workspace root; files outside it are allowed.
270
- * @param range - the byte window; omitted fields take the window defaults.
441
+ * @param path - target path, absolute or workspace-relative; relative to the base file's directory when provided.
442
+ * @param options - optional base file and range; without a range the complete-file cap applies.
271
443
  * @param signal - caller cancellation.
272
- * @returns the window in base64, the file's version and size at the stat before it, and whether it reaches the last byte.
444
+ * @returns native bytes with the file's version and size at the preceding stat, byte offset, and EOF marker.
273
445
  */
274
- @Remote async readBytes( workspaceFileScope: WorkspaceFileScope, path: string, range: WorkspaceByteRange, signal: AbortSignal, ): Promise<WorkspaceFileBytes>
275
-
276
- /**
277
- * Read a complete regular file as bytes, subject to the configured full-file cap.
278
- * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
279
- * @param path - absolute or workspace-relative file path.
280
- * @param signal - caller cancellation.
281
- * @returns one complete base64 window with offset zero and eof true; oversized files fail with too-large.
282
- */
283
- @Remote async readAll(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceFileBytes>
284
-
285
- /**
286
- * Read a complete file relative to another file's directory, including outside the workspace.
287
- * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
288
- * @param path - base file, absolute or workspace-relative.
289
- * @param relativePath - relative filesystem path, not a URL or absolute path.
290
- * @param signal - caller cancellation.
291
- * @returns the complete related file using the ordinary file-size and access checks.
292
- */
293
- @Remote async readRelated( workspaceFileScope: WorkspaceFileScope, path: string, relativePath: string, signal: AbortSignal, ): Promise<WorkspaceFileBytes>
446
+ @Remote async readBytes( workspaceFileScope: WorkspaceFileScope, path: string, options: WorkspaceByteReadOptions, signal: AbortSignal, ): Promise<WorkspaceFileBytes>
294
447
 
295
448
  /**
296
449
  * Report one regular file's identity, version, and size without its content.
@@ -311,15 +464,15 @@ Host Remote file reads and workspace directory observations over the composed fi
311
464
  @Remote async list(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceDirectoryListing>
312
465
 
313
466
  /**
314
- * Stream every `fs/observed` observation of a file inside the Session's
315
- * workspace. Only instrumented filesystem operations report here; the OS is
316
- * not watched.
467
+ * Watch one file or a directory's direct entries in the Session's filesystem.
468
+ * Files use the backend's read authority; directories remain workspace-scoped.
317
469
  * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
470
+ * @param path - target path; the Host determines its type and confines directories to the workspace.
318
471
  * @param signal - generation cancellation.
319
- * @returns `ready` once the Host observation queue is active and the workspace
320
- * root is resolved, then queued and live observations in emission order.
472
+ * @returns `ready` once the target watch is active, then current metadata for queued and live invalidations.
473
+ * @throws RemoteError when watching is unavailable or a directory is outside the workspace.
321
474
  */
322
- @Remote({ mode: 'stream' }) changes(workspaceFileScope: WorkspaceFileScope, signal: AbortSignal): AsyncIterable<WorkspaceFileWatchFrame>
475
+ @Remote({ mode: 'stream' }) changes(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): AsyncIterable<WorkspaceFileWatchFrame>
323
476
  ```
324
477
 
325
478
  Source: [`packages/api/workspace-files/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-files/src/index.ts)
@@ -344,6 +497,20 @@ Durable workspace registry. Startup waits for `sessionPersistence`, builds one c
344
497
  */
345
498
  async create(path: string, title?: string): Promise<Workspace>
346
499
 
500
+ /**
501
+ * Initialize the default Workspace only while both the registry and Session
502
+ * history are empty. Repeated requests reuse its durable identity; deleting
503
+ * that registration permanently disables automatic creation.
504
+ * @param resolveDirectory - resolve the absolute directory; called only for
505
+ * eligible creation, inside the registry mutation queue. Missing directories
506
+ * are created recursively before registration, and the initial title is the
507
+ * requested directory's own final segment — not the canonical one, so a
508
+ * symlink at that path does not retitle the Workspace after its target.
509
+ * After resolution, caller cancellation does not roll back creation or registration.
510
+ * @returns the initialized Workspace, or undefined when automatic creation is ineligible.
511
+ */
512
+ initializeDefault(resolveDirectory: () => Promise<string>): Promise<Workspace | undefined>
513
+
347
514
  /**
348
515
  * Look up a workspace by id.
349
516
  * @param id - Workspace id.
@@ -381,11 +548,52 @@ insertBefore(id: WorkspaceId, beforeId?: WorkspaceId): Promise<readonly Workspac
381
548
  /**
382
549
  * Archive one session durably. The session must exist (live or in session
383
550
  * persistence); its workspace accounting — or lack of one — is irrelevant.
384
- * An already archived id resolves without writing.
551
+ * Without `stopActivity` the session must also be inactive: the
552
+ * `workspace/session-activity` waterfall is asked once, and any reported
553
+ * activity rejects with {@link WorkspaceActiveSessionError} before anything
554
+ * is written. With `stopActivity` the archive is written without an
555
+ * activity check, and the `workspace/session-stop` providers are then asked
556
+ * to stop the session's work: the durable archive set is what a provider's
557
+ * `agent/pre-step` gate reads, so every wake the stops induce is already
558
+ * blocked. Archiving drops the session's pin in the same durable write
559
+ * (pinning and archival are mutually exclusive). An already archived id
560
+ * resolves without writing, asking, or stopping.
385
561
  * @param sessionId - The session to archive.
562
+ * @param options - Whether running work is stopped instead of refusing.
563
+ * @returns resolution after durability and, with `stopActivity`, after every stop request was issued.
564
+ */
565
+ archiveSession(sessionId: SessionId, options: ArchiveSessionOptions = {}): Promise<void>
566
+
567
+ /**
568
+ * Unarchive one session durably by dropping it from the registry-global
569
+ * archive set; the accounting slot was never touched, so the session
570
+ * returns to its recorded position. Unarchiving runs no session-existence
571
+ * check because removing an id cannot introduce an unknown one, so an
572
+ * entry whose session is gone still resolves. An id that is not archived
573
+ * resolves without writing.
574
+ * @param sessionId - The session to unarchive.
575
+ * @returns resolution after durability.
576
+ */
577
+ unarchiveSession(sessionId: SessionId): Promise<void>
578
+
579
+ /**
580
+ * Pin one session durably, prepending it to the registry-global pin set.
581
+ * The session must exist (live or in session persistence) and must not be
582
+ * archived. An already pinned id resolves without writing or reordering.
583
+ * @param sessionId - The session to pin.
584
+ * @returns resolution after durability.
585
+ */
586
+ pinSession(sessionId: SessionId): Promise<void>
587
+
588
+ /**
589
+ * Unpin one session durably by dropping it from the registry-global pin
590
+ * set. Unpinning runs no session-existence check because removing an id
591
+ * cannot introduce an unknown one, so an entry whose session is gone still
592
+ * resolves. An id that is not pinned resolves without writing.
593
+ * @param sessionId - The session to unpin.
386
594
  * @returns resolution after durability.
387
595
  */
388
- archiveSession(sessionId: SessionId): Promise<void>
596
+ unpinSession(sessionId: SessionId): Promise<void>
389
597
 
390
598
  /**
391
599
  * Resolve by canonical directory path without creating or mutating a
@@ -399,5 +607,57 @@ async resolveByPath(path: string): Promise<Workspace | undefined>
399
607
 
400
608
  Types: [SessionId](./core.md)
401
609
 
610
+ Source: [`packages/workspace/workspace/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workspace/workspace/src/index.ts)
611
+
612
+ <a id="workspace-events"></a>
613
+
614
+ ### `workspace/*` events
615
+
616
+ <a id="workspacesession-activity--waterfall"></a>
617
+
618
+ #### `workspace/session-activity` — waterfall
619
+
620
+ Ask the composed providers what still runs for a session before it is archived. A listener prepends its own SessionActivity entries to the result of `next()`; the registry's innermost callback returns an empty list, so a composition without providers archives freely. Any non-empty result refuses the archive without a write.
621
+
622
+ ```ts cordis-catalog
623
+ /**
624
+ * Ask the composed providers what still runs for a session before it is
625
+ * archived. A listener prepends its own {@link SessionActivity} entries to
626
+ * the result of `next()`; the registry's innermost callback returns an
627
+ * empty list, so a composition without providers archives freely. Any
628
+ * non-empty result refuses the archive without a write.
629
+ * @param request - the session about to be archived.
630
+ * @param next - delegate to the remaining providers.
631
+ * @mode waterfall
632
+ */
633
+ 'workspace/session-activity'( request: SessionActivityRequest, next: () => Promise<readonly SessionActivity[]>, ): Promise<readonly SessionActivity[]>
634
+ ```
635
+
636
+ Source: [`packages/workspace/workspace/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workspace/workspace/src/index.ts)
637
+
638
+ <a id="workspacesession-stop--parallel"></a>
639
+
640
+ #### `workspace/session-stop` — parallel
641
+
642
+ Stop a session's running work because the caller archived it with `stopActivity`; the archive set is durable when this dispatches. Each provider stops its own families — cancelling a turn, its subagent descendants, owned jobs, or active schedules — through the same cancel paths the user's own stop actions use, so the session log ends every open turn regularly and a later unarchive can continue the conversation. Listeners issue their stop requests without waiting for running work to settle; a listener may await its own durability barrier. A rejection is logged by the registry and does not undo the archive.
643
+
644
+ ```ts cordis-catalog
645
+ /**
646
+ * Stop a session's running work because the caller archived it with
647
+ * `stopActivity`; the archive set is durable when this dispatches. Each
648
+ * provider stops its own families — cancelling a turn, its subagent
649
+ * descendants, owned jobs, or active schedules — through the same cancel
650
+ * paths the user's own stop actions use, so the session log ends every
651
+ * open turn regularly and a later unarchive can continue the
652
+ * conversation. Listeners issue their stop requests without waiting for
653
+ * running work to settle; a listener may await its own durability
654
+ * barrier. A rejection is logged by the registry and does not undo the
655
+ * archive.
656
+ * @param request - the session being archived.
657
+ * @mode parallel
658
+ */
659
+ 'workspace/session-stop'(request: SessionActivityRequest): Promise<void> | void
660
+ ```
661
+
402
662
  Source: [`packages/workspace/workspace/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workspace/workspace/src/index.ts)
403
663
  <!-- END GENERATED cordis-surface -->