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,11 +1,12 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/llm-streaming.md"
3
+ rawMarkdownPath: "en/reference/subsystems/llm-streaming.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
6
7
  # LLM Streaming
7
8
 
8
- The conversation and streaming types from [`packages/llm`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/README.md): the `Message`/`ContentBlock` variants every request and durable history share, the fully assembled model request, the raw `StreamChunk` protocol, the adapter contract every adapter must implement, and the shared assembler. The [core packages](./core.md) hold and log these values on every turn; this page declares them.
9
+ The conversation and streaming types from [`packages/llm`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/README.md): durable `Message` values, request-only user inputs, shared `ContentBlock` variants, the fully assembled model request, the raw `StreamChunk` protocol, the adapter contract every adapter must implement, and the shared assembler. The [core packages](./core.md) hold and log these values on every turn; this page declares them.
9
10
 
10
11
  Source: [`packages/llm/llm/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/types.ts)
11
12
 
@@ -20,7 +21,8 @@ Source: [`packages/llm/llm/src/types.ts`](https://github.com/deepseek-ai/deepsee
20
21
  ```ts type-equiv
21
22
  /**
22
23
  * Merge-extensible content blocks keyed by `type`. New core blocks must land
23
- * with adapter, UI, and compaction support.
24
+ * with adapter, UI, and compaction support. Tool-change blocks belong to
25
+ * developer messages; `projectToolUpdates` selects what each route receives.
24
26
  */
25
27
  interface ContentBlockMap {
26
28
  'text': TextBlock
@@ -28,11 +30,12 @@ interface ContentBlockMap {
28
30
  'image': ImageBlock
29
31
  'file': FileBlock
30
32
  'tool-call': ToolCallBlock
31
- 'tool-result': ToolResultBlock
33
+ 'tool-addition': ToolAdditionBlock
34
+ 'tool-removal': ToolRemovalBlock
32
35
  }
33
36
  ```
34
37
 
35
- The block interfaces (full fields in source): `TextBlock` (`text`), `ReasoningBlock` (thinking, distinct from visible text), `ImageBlock` (a durable [image attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md)), `FileBlock` (a durable verbatim [file attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md) that request assembly projects to handle text for every route), `ToolCallBlock` (`id: ToolCallId`, `name`, raw-JSON `arguments`), and `ToolResultBlock` (`toolCallId`, nested `content: ContentBlock[]`, `isError?`). `ContentBlock = ContentBlockMap[ContentBlockType]`. A new modality belongs in the merge-extensible map only when its adapter, UI, compaction, and durable replay paths honor it.
38
+ The block interfaces (full fields in source): `TextBlock` (`text`), `ReasoningBlock` (thinking, distinct from visible text), `ImageBlock` (a durable [image attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md)), `FileBlock` (a durable verbatim [file attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md) that request assembly projects to handle text for every route), and `ToolCallBlock` (`id: ToolCallId`, `name`, raw-JSON `arguments`). Tool results are first-class `ToolResultMessage` values with `toolCallId`, result `content`, and optional `isError`; they are not content blocks. `ContentBlock = ContentBlockMap[ContentBlockType]`. A new modality belongs in the merge-extensible map only when its adapter, UI, compaction, and durable replay paths honor it. Developer tool-change blocks are projected according to the resolved route capability.
36
39
 
37
40
  Image access belongs to request serialization rather than the durable attachment or deterministic request-image version. `resolveImageAttachmentAccess()` combines the attachment provider's optional host object path with a mapping supplied by the consumer for the current tool execution filesystem. The result is available only for that request and does not participate in `variantId`.
38
41
 
@@ -52,7 +55,7 @@ A `Message` is one identified, immutable role/source/content value. Model-produc
52
55
 
53
56
  ```ts type-equiv
54
57
  /** Provider/model identity and adapter-private replay data for an assistant message. */
55
- interface AssistantProvenance {
58
+ interface AssistantProviderMetadata {
56
59
  /** Provider route that produced the message. */
57
60
  provider: string
58
61
  /** Provider model id that produced the message. */
@@ -67,31 +70,27 @@ interface AssistantProvenance {
67
70
  ```
68
71
 
69
72
  ```ts type-equiv
70
- /** One immutable message representation shared by delivery, durable history, and model requests. */
71
- interface Message {
72
- /** Stable identity preserved across every representation boundary. */
73
- readonly id: MessageId
74
- /** Provider-neutral conversation role. */
75
- readonly role: 'system' | 'user' | 'assistant'
76
- /** Exact model-facing blocks. */
77
- readonly content: ContentBlock[]
78
- /** Required source fields supplied by the producer. */
79
- readonly source: MessageSource
80
- }
73
+ /** Any persisted conversation message, discriminated by its `role`. */
74
+ type Message = MessageRoleMap[keyof MessageRoleMap]
81
75
  ```
82
76
 
77
+ `DeveloperMessage` records incremental agent session changes in conversation order with the `developer` role. `ToolAdditionBlock.toolName` activates the definition selected by the containing Session event's historical header reference; `ToolRemovalBlock.toolName` removes the active definition. Both blocks are rejected in other message roles. `deferLoading` independently requests deferred definition loading without requiring an addition record. See [Session](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/README.md) for header binding and the [LLM package](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/README.md#known-limitations-and-deferred-work) for provider support limits. `ToolUpdate` is `in-history` or `addition-only` on resolved and prepared model metadata. `GenerateOptions.toolHistory` carries `ToolHistory`: initial `tools` and ordered `updates`, each binding a developer `messageId` to its historically resolved `additions`. The runtime projects this state into provider declarations; it does not change the active tool list in logged headers.
78
+
83
79
  Where a message came from is itself a merge-extensible sum type:
84
80
 
85
81
  ```ts type-equiv
86
82
  /**
87
- * Where a message (or injected content) came from.
88
- * Merge-extensible sum type — plugins add their own `kind`s.
83
+ * Where a message (or injected content) came from, in the harness's own
84
+ * vocabulary. Merge-extensible sum type — each producer declares its own
85
+ * `kind` in its own module; there is no shared catch-all `plugin` kind.
86
+ * Model and tool sources answer their role messages; user messages carry any
87
+ * producer's kind, and consumers fall through unknown kinds.
89
88
  */
90
89
  interface MessageSourceMap {
91
90
  user: { kind: 'user' }
92
- plugin: { kind: 'plugin'; plugin: string } & ContextFormed
93
91
  model: ModelMessageSource
94
92
  tool: ToolMessageSource
93
+ 'system-prompt': SystemPromptMessageSource
95
94
  }
96
95
  ```
97
96
 
@@ -100,7 +99,7 @@ Producer identity and presentation form are independent. `kind` answers *who pro
100
99
  ```ts type-equiv
101
100
  /**
102
101
  * The kind of information in producer-supplied context, declared by the
103
- * producer beside its provenance.
102
+ * producer in the same `MessageSource`.
104
103
  *
105
104
  * `MessageSource.kind` answers *who produced this*; `form` answers *what kind
106
105
  * of thing it is*, and the two axes are deliberately independent — several
@@ -228,7 +227,7 @@ type StreamChunk =
228
227
 
229
228
  `snapshot()` returns a detached immutable stream. `expandAssistantStream()` strictly checks record keys, member counts, indexes, timestamps, tool-call identity, and lossless JSON before recreating the exact timed chunk sequence. The Session log embeds this stream in `assistant/message` for a surface result or `assistant/attempt` for an attempt with no surface message.
230
229
 
231
- Process-local `agent/assistant-stream` frames carry live presentation. Durable replay and restore validation still expand the embedded settlement; telemetry, token accounting, and Host folds read the compact records directly. Record-level readers (`assistantStreamFirstTokenTime`, `assistantStreamHasVisibleContent`, `assistantStreamHasVisibleText`, `lastAssistantStreamChunk`, `assistantStreamChunks`, `joinAssistantStreamText`, `assembleAssistantStream`, and the per-run `runFirstTokenTime` and `runFirstVisibleTime`) answer consumer questions in one pass over the records with early exit, so a large history costs O(records) per settlement instead of O(members) expansion ([fold decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-06-embedded-stream-record-readers.md)). `expandAssistantStream()` remains the validating path for records read at a durable boundary and for consumers that need every member.
230
+ Process-local `agent/assistant-stream` frames carry live presentation. Durable replay and restore validation still expand the embedded settlement; telemetry, token accounting, and Host folds read the compact records directly. Record-level readers (`assistantStreamFirstTokenTime`, `assistantStreamHasVisibleContent`, `assistantStreamHasVisibleText`, `lastAssistantStreamChunk`, `assistantStreamChunks`, `joinAssistantStreamText`, `assembleAssistantStream`, and the per-run `runFirstTokenTime` and `runFirstVisibleTime`) answer consumer questions in one pass over the records with early exit, so a large history costs O(records) per settlement instead of O(members) expansion ([fold reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/README.md)). `expandAssistantStream()` remains the validating path for records read at a durable boundary and for consumers that need every member.
232
231
 
233
232
  ## `LlmFailure`
234
233
 
@@ -247,12 +246,19 @@ interface LlmFailure {
247
246
  readonly providerRetryAfterMs?: number
248
247
  /** Opaque provider-issued request identifier for diagnostics. */
249
248
  readonly requestId?: ProviderRequestId
249
+ /**
250
+ * With code `IMAGE_OFFLOAD_REQUIRED`: how many more of the oldest retained
251
+ * image occurrences the route needs offloaded before the same request fits
252
+ * its exact byte accounting. `dsh-compaction-image-offload` records the
253
+ * selected occurrences in an `image/offload` event and retries the step.
254
+ */
255
+ readonly offloadImages?: number
250
256
  }
251
257
  ```
252
258
 
253
259
  ## Request-image pricing
254
260
 
255
- An adapter whose provider charges visual tokens for request images declares per-route pricing by overriding `LlmAdapter.imageRequestPricing`, and `ctx.llm.imageRequestPricing(provider, model)` resolves it synchronously for consumers. The token meter resolves the routed model's pricing on every measurement so compaction pressure, retention, and range selection price image history as the routed request actually sends it; the DeepSeek adapter reproduces its own request projection (per-model pixel budget, oldest-first offload) and prices retained images with the published v4 vision accounting, while provider usage remains the authoritative anchor for completed requests.
261
+ An adapter whose provider charges visual tokens for request images declares per-route pricing by overriding `LlmAdapter.imageRequestPricing`, and `ctx.llm.imageRequestPricing(provider, model)` resolves it synchronously for consumers. The token meter resolves the routed model's pricing on every measurement so compaction pressure, retention, and range selection price image history as the routed request actually sends it; the DeepSeek adapter prices each retained occurrence at its per-model request target with the published vision accounting and each occurrence selected by a logged image-offload decision as its placeholder text, while provider usage remains the authoritative anchor for completed requests.
256
262
 
257
263
  ```ts type-equiv
258
264
  /**
@@ -281,10 +287,11 @@ interface LlmImageRequestPrice {
281
287
  interface LlmImageRequestPricing {
282
288
  /**
283
289
  * Price every image occurrence of one request projection.
284
- * @param images - durable image references in request order, one entry per occurrence.
290
+ * @param images - surface image blocks in request order, one entry per occurrence; an `offloaded` block
291
+ * is priced as its placeholder text.
285
292
  * @returns one price per occurrence, aligned by index with `images`.
286
293
  */
287
- priceImages(images: readonly ImageAttachmentRef[]): readonly LlmImageRequestPrice[]
294
+ priceImages(images: readonly ImageBlock[]): readonly LlmImageRequestPrice[]
288
295
  }
289
296
  ```
290
297
 
@@ -308,7 +315,7 @@ Retry configuration resolves before route registration into an immutable discrim
308
315
 
309
316
  ## `AppIdentity` — app attribution
310
317
 
311
- The static public application identity every adapter sends to providers ([`packages/llm/llm/src/attribution.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/attribution.ts)). `attributionHeaders(identity?)` maps it to the standard `User-Agent` header only; OpenRouter-specific app attribution headers are intentionally not supported by this contract. The default `APP_IDENTITY` sources its version from the package manifest; every field is a public product fact - no secrets, paths, session ids, or per-user identifiers, and nothing per-request may influence the values. Rationale: [Mandatory `User-Agent` attribution](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-21-mandatory-app-attribution-headers.md).
318
+ The static public application identity every adapter sends to providers ([`packages/llm/llm/src/attribution.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/attribution.ts)). `attributionHeaders(identity?)` maps it to the standard `User-Agent` header only; OpenRouter-specific app attribution headers are intentionally not supported by this contract. The default `APP_IDENTITY` sources its version from the package manifest; every field is a public product fact - no secrets, paths, session ids, or per-user identifiers, and nothing per-request may influence the values.
312
319
 
313
320
  ```ts type-equiv
314
321
  /**
@@ -410,10 +417,10 @@ declare class BlockAssembler {
410
417
  get replayState(): ReplayEnvelope | undefined;
411
418
  /**
412
419
  * The assembled assistant message.
413
- * @param source - producer attribution for the assembled message.
420
+ * @param source - provider/model attribution (without the `kind` tag) for the assembled message.
414
421
  * @returns a frozen assistant-role message over `blocks()` (same open-block assembly rules).
415
422
  */
416
- message(source: MessageSource = { kind: 'plugin', plugin: 'dsh-llm/assembler' }): Message;
423
+ message(source: Omit<ModelMessageSource, 'kind'>): AssistantMessage;
417
424
  }
418
425
  ```
419
426
 
@@ -569,9 +576,28 @@ interface LlmResolvedModelInfo extends LlmModelInfo {
569
576
  reasoning?: LlmModelReasoningInfo
570
577
  /** Declared mid-conversation system prompt handling; absent means only a leading system message is read. */
571
578
  systemPromptUpdate?: SystemPromptUpdate
579
+ /** Declared mid-conversation tool declaration handling; absent means every request declares the complete tool list. */
580
+ toolUpdate?: ToolUpdate
572
581
  }
573
582
  ```
574
583
 
584
+ Auxiliary callers can provide user content without a durable identity or source. Existing `Message[]` histories remain valid request inputs. Session writes, Agent delivery, and recorded title requests continue to require durable messages.
585
+
586
+ ```ts type-equiv
587
+ /** User input for one LLM request; it has no durable Session identity or source. */
588
+ interface RequestUserInput {
589
+ readonly role: 'user'
590
+ readonly content: UserMessage['content']
591
+ readonly id?: never
592
+ readonly source?: never
593
+ }
594
+ ```
595
+
596
+ ```ts type-equiv
597
+ /** A durable conversation message or a user input used only for one request. */
598
+ type RequestMessage = Message | RequestUserInput
599
+ ```
600
+
575
601
  ```ts type-equiv
576
602
  /** A single model request, fully assembled. */
577
603
  interface GenerateOptions {
@@ -584,9 +610,9 @@ interface GenerateOptions {
584
610
  * Ordered conversation messages, exactly as the provider sees them. A
585
611
  * loop-built request passes the derived history (dsh-agent-loop), whose
586
612
  * leading system-role message carries the system prompt; a hand-built
587
- * one-shot passes any list.
613
+ * one-shot may include identity-free user inputs.
588
614
  */
589
- messages: Message[]
615
+ messages: RequestMessage[]
590
616
  /**
591
617
  * System prompt text for one-shot callers; adapters map it to the provider's
592
618
  * system slot ahead of `messages`. Loop-built requests leave it undefined.
@@ -594,6 +620,8 @@ interface GenerateOptions {
594
620
  system?: string
595
621
  /** Tool schemas (adapters map to the provider's `tools` field). */
596
622
  tools?: ToolSchema[]
623
+ /** Session-folded tool history used for route projection; omission sends complete declarations without tool updates. */
624
+ toolHistory?: ToolHistory
597
625
  temperature?: number
598
626
  maxTokens?: number
599
627
  /**
@@ -646,6 +674,12 @@ interface FinishReasonMap {
646
674
  * it from this package.
647
675
  */
648
676
  interface ToolSchema {
677
+ /**
678
+ * Requests deferred loading of the tool definition into model context,
679
+ * independently of whether a tool-addition block records the tool.
680
+ * Uses Anthropic's defer_loading terminology.
681
+ */
682
+ deferLoading?: true
649
683
  name: string
650
684
  description: string
651
685
  /** JSON Schema object for the arguments. */
@@ -699,6 +733,8 @@ interface LlmDiscoveredModel {
699
733
  contextWindow?: number
700
734
  /** Maximum output tokens, when disclosed. */
701
735
  maxTokens?: number
736
+ /** Accepted input types when disclosed by the catalog or endpoint; absent means unknown. */
737
+ inputModalities?: readonly ModelModality[]
702
738
  }
703
739
  ```
704
740
 
@@ -708,7 +744,7 @@ The loop builds each request from logged state. `EpochHeader` records call confi
708
744
 
709
745
  `agent/request` receives a frozen call-config seed and may return a replacement to switch provider, model, reasoning effort, or sampling. Before the waterfall, the loop removes values marked as adapter defaults so exact-model preparation materializes the selected route's current values; unmarked explicit settings remain in the proposal. After the waterfall, preparation rejects unsupported explicit effort ids without clamping and logs the effective config plus the fields supplied by adapter defaults under the turn signal. On step admission, this waterfall and preparation run after assembly and `step/start` but before the system prompt and accepted user batch are committed; cancellation during either commits neither. The prepared capability governs prompt reconciliation, and the call keeps one adapter registration through dispatch. Requests reaching `llm/stream` are deep-frozen, so mutation throws, and carry a process-local loop identity so observers do not confuse separately logged frozen auxiliary calls with conversation requests.
710
746
 
711
- On the wire, a loop-built request is the derived history alone: the rendered prompt travels as the leading `system`-role message (surface node 0, a `system/message` event) and, when the prepared call declares `systemPromptUpdate: 'in-history'`, a non-empty changed prompt may follow the cached history as a later `system`-role message that the model reads as the effective prompt; the request's `system` field is unset — `GenerateOptions.system` serves direct one-shot callers such as title providers. An empty rendering leaves no system messages in derived history, even when earlier requests retained several prompt versions. The logged request ends with the newest `user/message` on a turn's first step and the previous step's tool results on later steps. The dev invariant recomputes exactly this equation against every loop-built request and rejects a loop request carrying a `system` field.
747
+ On the wire, a loop-built request is the derived history alone: the rendered prompt travels as the leading `system`-role message (surface node 0, a `system/message` event) and, when the prepared call declares `systemPromptUpdate: 'in-history'`, a non-empty changed prompt may follow the cached history as a later `system`-role message that the model reads as the effective prompt; the request's `system` field is unset — `GenerateOptions.system` serves direct one-shot callers such as title providers. An empty rendering leaves no system messages in derived history, even when earlier requests retained several prompt versions. The logged request ends with the newest `user/message` on a turn's first step and the previous step's tool results on later steps.
712
748
 
713
749
  FIXME(call-config-shape): revisit which remaining fields are genuinely epoch-level for cache purposes (`model` and the model-owned reasoning effort are explicit; the sampling scalars sit here out of caution).
714
750
 
@@ -742,7 +778,7 @@ interface LlmCallConfigAdapterDefaults {
742
778
 
743
779
  ## Official DeepSeek request extensions
744
780
 
745
- `ctx.deepseekLlmApiExtensions` is the provider-specific registry for additive top-level fields on `deepseek-official` requests. Contributor plugins use `register(field, provider)` to claim one field; the adapter calls `prepare(request)` after serializing its base body and merges the returned fields before HTTP. The prepared `accept()` transaction runs after 2xx, so a contributor can commit delivery state without treating a transport or provider rejection as acceptance. Preparation, collision, and acceptance failures use `REQUEST_EXTENSION` and fail the model request.
781
+ `ctx.deepseekLlmApiExtensions` is the provider-specific registry for additive top-level fields on `deepseek-official` requests. Contributor plugins use `register(field, provider)` to claim one field; the adapter calls `prepare(request)` after serializing its base body and merges the returned fields before HTTP. The prepared `accept()` transaction runs after 2xx, so a contributor can commit delivery state without treating a transport or provider rejection as acceptance. Preparation, collision, and acceptance failures use `REQUEST_EXTENSION` and fail the model request. A merged body that fails to serialize is sent without extension fields; acceptance is skipped and the provider plugin logs the omitted field names.
746
782
 
747
783
  The [wire reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/deepseek-llm-api-wire-extensions.md) defines the exact request headers, extension transaction, field versions, and receiver obligations. The shipped composition registers [`dsh_session_log`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-log-deepseek/README.md) as a lossless incremental canonical-log suffix and [`dsh_plugin_packages`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/plugin-package-inventory-deepseek/README.md) as the complete active Loader-backed package set. These fields remain outside model messages and are absent from the pi-ai adapter path.
748
784
 
@@ -763,6 +799,8 @@ interface PreparedLlmCall {
763
799
  readonly inputModalities?: readonly ModelModality[]
764
800
  /** Exact model system prompt update mode captured with the adapter dispatch generation. */
765
801
  readonly systemPromptUpdate?: SystemPromptUpdate
802
+ /** Exact model tool update mode captured with the adapter dispatch generation. */
803
+ readonly toolUpdate?: ToolUpdate
766
804
  /** Config fields materialized by the captured adapter rather than proposed by the caller. */
767
805
  readonly adapterDefaults: LlmCallConfigAdapterDefaults
768
806
  /**
@@ -808,8 +846,9 @@ declare abstract class LlmAdapter {
808
846
  imageRequestPricing(_provider: string, _model: string): LlmImageRequestPricing | undefined;
809
847
  /**
810
848
  * List models this adapter can currently advertise for one owned provider.
811
- * The result is advisory: an adapter may accept unlisted model ids, and
812
- * consumers must not turn absence into request rejection.
849
+ * Core routing accepts unlisted model ids; catalog-driven entry points such
850
+ * as the GUI may require membership. Adapters used there must advertise
851
+ * their available models; the base empty catalog offers no GUI selection.
813
852
  * @param _provider - one provider route owned by this adapter.
814
853
  * @returns discoverable models in adapter-preferred order.
815
854
  */
@@ -985,7 +1024,8 @@ fileRequestText(ref: FileAttachmentRef): string
985
1024
 
986
1025
  /**
987
1026
  * Discover models advertised by one registered provider. Catalog membership
988
- * is advisory and never changes routing or request validation.
1027
+ * does not constrain core routing. Catalog-driven entry points may restrict
1028
+ * selection and submission to the advertised models.
989
1029
  * @param provider - registered provider route to inspect.
990
1030
  * @returns detached model metadata in adapter-preferred order.
991
1031
  */
@@ -1082,8 +1122,8 @@ Waterfall around every streaming model call (retry, replay, routing). Bound to t
1082
1122
  * process-local {@link markAgentLoopRequest} identity and arrives deep-frozen
1083
1123
  * (mutation throws): its content is a pure function of the session log (the
1084
1124
  * reconstructability Agent Note), so listeners read it, never rewrite it.
1085
- * Hand-built calls do not carry that marker; their messages already obey
1086
- * the immutable creation contract.
1125
+ * Hand-built calls do not carry that marker; callers own their request
1126
+ * inputs and must keep them unchanged until the stream settles.
1087
1127
  * @mode waterfall
1088
1128
  */
1089
1129
  'llm/stream'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable<StreamChunk>): AsyncIterable<StreamChunk>
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/lsp.md"
3
+ rawMarkdownPath: "en/reference/subsystems/lsp.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -1,17 +1,18 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/permission-presets.md"
3
+ rawMarkdownPath: "en/reference/subsystems/permission-presets.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
6
7
  # Permission Presets
7
8
 
8
- The permission-preset layer of [dsh-permission-presets](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/permission-presets) (`ctx.permissionPresets`, `PermissionPresetService`) bundles the two independent enforcement knobs — [sandbox mode](./sandbox.md) (`sandbox/mode`) and [approval policy](./approval.md) (`approval/policy`) — into named presets a client offers as one Permissions selector. It is one optional capability, not part of the agent-loop spine, and it owns no enforcement: execution, prompt narration, and replay keep reading their knob folds, and a preset switch only records intent and writes through each knob's canonical setter. The [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/README.md) owns composition status and limitations; the [sandbox switching design](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-07-06-sandbox.md) owns the rationale.
9
+ The permission-preset layer of [dsh-permission-presets](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/permission-presets) (`ctx.permissionPresets`, `PermissionPresetService`) bundles the two independent enforcement knobs — [sandbox mode](./sandbox.md) (`sandbox/mode`) and [approval policy](./approval.md) (`approval/policy`) — into named presets a client offers as one Permissions selector. The configured table owns future-session defaults, while the fixed `registerAuto(admit)` hook lets the [Auto review](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/auto-review/README.md) integration publish its current-session-only option for one effect lifetime. The layer is optional and owns no execution policy: prompt narration and replay keep reading their knob folds, while Auto review owns the additional enforcement. The [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/README.md) owns composition status and limitations; the [historical sandbox switching design](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/feature/2026-07-06-sandbox.md) records the original knob rationale.
9
10
 
10
11
  Source: [`packages/interaction/permission-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/index.ts)
11
12
 
12
13
  ## The preset table
13
14
 
14
- A preset is a table key mapping to one sandbox/approval bundle plus optional client presentation; the default table ships `workspace-write` (`workspace-write` + `ask`) and `danger-full-access` (`danger-full-access` + `never`).
15
+ A preset maps one stable key to a sandbox/approval bundle plus optional client presentation. The default configured table ships `workspace-write` (`workspace-write` + `ask`) and `danger-full-access` (`danger-full-access` + `never`); `custom` and `auto` are reserved and cannot be configured.
15
16
 
16
17
  ```ts type-equiv
17
18
  /** One preset's sandbox/approval bundle and optional client presentation. */
@@ -33,29 +34,36 @@ interface Config {
33
34
  /**
34
35
  * The preset table: name → knob bundle. Defaults to `workspace-write`
35
36
  * (workspace-write + ask) and `danger-full-access` (danger-full-access +
36
- * never). The name `custom` is reserved for the derived not-a-preset state.
37
+ * never). The names `custom` and `auto` are reserved for derived state and
38
+ * the Auto review integration respectively.
37
39
  */
38
- presets?: Record<string, PresetSpec>
40
+ presets: Record<string, PresetSpec>
39
41
  /**
40
42
  * Default for new sessions. When omitted, the preset matching the composed
41
43
  * sandbox and approval defaults is used.
42
44
  */
43
- defaultPreset?: string
45
+ defaultPreset: Volatile<string | undefined>
44
46
  }
45
47
  ```
46
48
 
47
- The service requires a confining `ctx.shell` executor and `ctx.approval`, and misconfiguration fails at plugin load: a table entry named `custom` throws (the name is reserved for the derived not-a-preset state), and composing over a bash executor that does not confine (no `sandboxMode` capability fact) throws, because presets bundle a sandbox mode.
49
+ The service requires a confining `ctx.shell` executor and `ctx.approval`, and misconfiguration fails at plugin load: configured entries named `custom` or `auto` throw, and composing over a bash executor that does not confine (no `sandboxMode` capability fact) throws because presets bundle a sandbox mode.
50
+
51
+ ## Fixed current-session Auto registration
52
+
53
+ The Auto integration calls `registerAuto(admit)` for its effect lifetime. This service fixes the `auto` identity and its `danger-full-access` plus `ask` bundle, and a recorded Auto selection also matches the `never` policy that delegated children pin; the shipped client locale dictionaries own Auto's label and description, while configured preset presentation remains Host-owned. Callers cannot publish another preset through a generic contribution API. Auto appears after configured presets, never enters the `permission.defaultPreset` settings schema, and disappears when the effect is disposed. The synchronous `admit` callback runs before Auto selection mutates the Session and before a stored Auto Session publishes, so a missing or closing integration does not rewrite the durable identity.
54
+
55
+ Registering or removing Auto emits the payload-free `permission-presets/catalog-changed` notification. Process consumers subscribe before calling `catalog()`, then re-read the complete selectable catalog after each notification. The `permissions` Session projection contains only `currentValue`, so catalog changes append no Session event, publish no Session projection frame, and leave the Session sequence unchanged.
48
56
 
49
57
  ## Current preset and the derived `custom`
50
58
 
51
- `current(session)` derives the effective preset from the optionally registered `permissions` projection. The unit folds the session's sandbox mode, approval policy, and recorded selection; values absent within that state fall back to the executor's configured mode and the approval service config, then `ask`. A missing registry or projection key fails explicitly. The service prefers a still-matching selection, then the first matching table entry in declaration order, and otherwise returns `CUSTOM_PRESET` (`'custom'`). `custom` is derived-only: clients may display it as the current value, but it is never a switch target or an event payload.
59
+ `current(session)` derives the effective preset from the required `permissions` projection. The unit folds the session's sandbox mode, approval policy, and recorded selection; values absent within that state fall back to the executor's configured mode and the approval service config, then `ask`. A missing projection key fails explicitly. The service prefers a still-matching selection, including a recorded Auto selection under the `never` approval policy, then the first matching configured entry, and otherwise returns `CUSTOM_PRESET` (`'custom'`). `custom` is derived-only: clients may display it as the current value, but it is never a switch target or an event payload.
52
60
 
53
- `names` lists the switchable presets in table declaration order; `optionOf(name)` builds the option a client renders for a table key (label falls back to the key) or for `custom`, and throws for any other name.
61
+ `names` lists configured presets in declaration order followed by Auto while its integration is live. `catalog()` returns those selectable entries as one process-level snapshot. `optionOf(name)` builds an available entry (its label falls back to the key) or the derived `custom` presentation, and throws for any other name. Clients join the catalog with the Session projection; `custom` may label the current value but never becomes a catalog entry.
54
62
 
55
63
  ```ts type-equiv
56
- /** The select-option shape a presentation layer advertises for one preset (or for the derived `custom` state). */
64
+ /** Presentation for an available preset or the derived `custom` current value. */
57
65
  interface PresetOption {
58
- /** Stable option value: the table key, or `custom`. */
66
+ /** Stable option value: a configured preset key, live `auto`, or derived `custom`. */
59
67
  value: string
60
68
  /** The display label. */
61
69
  name: string
@@ -66,9 +74,9 @@ interface PresetOption {
66
74
 
67
75
  ## Switching and the `permission/preset` event
68
76
 
69
- `set(session, name)` resolves the preset (unknown names throw), appends a log-only `permission/preset` event unless `name` is already the effective preset, then writes each knob through its own setter — `setSandboxMode` from [dsh-sandbox-policy](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/sandbox/sandbox-policy) and `setApprovalPolicy` from [dsh-user-approval](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/user-approval) — only when that knob's effective value changes. The selection event precedes the knob events in the same turn, and re-selecting the effective preset appends nothing.
77
+ `set(session, name)` resolves the preset (unknown names throw), runs Auto admission when applicable, appends a log-only `permission/preset` event unless `name` is already the effective preset, then writes each knob through its own setter — `setSandboxMode` from [dsh-sandbox-policy](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/sandbox/sandbox-policy) and `setApprovalPolicy` from [dsh-user-approval](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/user-approval) — only when that knob's effective value changes. The selection event precedes the knob events in the same turn, and re-selecting the effective preset appends nothing.
70
78
 
71
- `permission/preset` is durable, log-only user intent: it stays out of the model transcript (the knob events own the model-visible consequences through their consumers), and it exists so `current()` can preserve WHICH preset the user chose when two presets share a bundle. The `permissions` projection folds that selection with both knob events and retains the `session/end-seed` boundary used to distinguish a restored empty seed from a fresh session; replay needs no catch-up state or raw-log rescan. The complete event declaration is in the [persistence log event catalog](../persistence-catalog.md); the method signatures are in the generated [service catalog](#ctxpermissionpresets--permissionpresetservice).
79
+ `permission/preset` is durable, log-only user intent: it stays out of the model transcript (the knob events own the model-visible consequences through their consumers), and it exists so `current()` can preserve which preset the user chose when two presets share a bundle. The `permissions` projection folds that selection with both knob events and retains the `session/end-seed` boundary used to distinguish a restored empty seed from a fresh session; replay needs no catch-up state or raw-log rescan. A restored `auto` selection requires the live Auto registration before Agent publication. The complete event declaration is in the [persistence log event catalog](../persistence-catalog.md); the method signatures are in the generated [service catalog](#ctxpermissionpresets--permissionpresetservice).
72
80
 
73
81
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
74
82
 
@@ -82,40 +90,48 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
82
90
 
83
91
  ### `ctx.permissionPresets` — `PermissionPresetService`
84
92
 
85
- Owns the deployment's permission presets and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
93
+ Owns the deployment's configured permission presets, the fixed Auto integration hook, and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
86
94
 
87
95
  ```ts cordis-catalog
96
+ /**
97
+ * Read the complete process-level catalog exposed to current-session UI.
98
+ * @returns every currently selectable preset in contribution order.
99
+ */
100
+ @Remote('catalog') catalog(): PermissionCatalog
101
+
102
+ /**
103
+ * Publish the fixed current-session Auto preset for the calling
104
+ * integration's effect lifetime.
105
+ * @param admit - synchronous gate run before live Auto selection or restore.
106
+ * @returns the async effect disposer that removes Auto.
107
+ */
108
+ registerAuto(admit: () => void): () => Promise<void>
109
+
88
110
  /**
89
111
  * Resolve the preset matching the effective knob values. A still-matching
90
- * last selection wins shared-bundle ties; otherwise the first table match
91
- * wins, or {@link CUSTOM_PRESET} when no entry matches.
112
+ * last selection wins shared-bundle ties, and a still-selected Auto also
113
+ * matches the `never` approval policy; otherwise the first configured
114
+ * match wins. Returns
115
+ * {@link CUSTOM_PRESET} when no available preset matches.
92
116
  * @param session - the session whose knob state is read.
93
117
  * @returns the effective preset name, or `custom` when nothing matches.
94
118
  */
95
119
  current(session: Session): string
96
120
 
97
121
  /**
98
- * Build the whole select value for one folded knob state: every table
99
- * option in declaration order, `custom` appended exactly while derived.
100
- * @param state - the folded knob overrides.
101
- * @returns the `permissions` projection payload.
102
- */
103
- selectFor(state: KnobState): PermissionSelect
104
-
105
- /**
106
- * Resolve a preset's knob bundle.
122
+ * Resolve an available preset's knob bundle.
107
123
  * @param name - the preset name to resolve.
108
124
  * @returns the configured bundle.
109
- * @throws when `name` is not in the table.
125
+ * @throws when `name` is neither configured nor the currently live Auto preset.
110
126
  */
111
127
  resolve(name: string): PresetSpec
112
128
 
113
129
  /**
114
- * Build the client option for a table entry or {@link CUSTOM_PRESET}. A
115
- * missing label falls back to the table key.
116
- * @param name - a table key, or `custom`.
130
+ * Build the client option for an available preset or {@link CUSTOM_PRESET}.
131
+ * A missing label falls back to the preset key.
132
+ * @param name - a configured preset key, live `auto`, or `custom`.
117
133
  * @returns the option a client renders.
118
- * @throws when `name` is neither a table key nor `custom`.
134
+ * @throws when `name` is neither a configured preset, live `auto`, nor `custom`.
119
135
  */
120
136
  optionOf(name: string): PresetOption
121
137
 
@@ -131,4 +147,25 @@ set(session: Session, name: string): void
131
147
  Types: [Session](./session.md)
132
148
 
133
149
  Source: [`packages/interaction/permission-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/index.ts)
150
+
151
+ <a id="permission-presets-events"></a>
152
+
153
+ ### `permission-presets/*` events
154
+
155
+ <a id="permission-presetscatalog-changed--emit"></a>
156
+
157
+ #### `permission-presets/catalog-changed` — emit
158
+
159
+ The selectable process catalog changed. Payload-free by design: consumers subscribe first, then re-read the complete catalog.
160
+
161
+ ```ts cordis-catalog
162
+ /**
163
+ * The selectable process catalog changed. Payload-free by design:
164
+ * consumers subscribe first, then re-read the complete catalog.
165
+ * @mode emit
166
+ */
167
+ 'permission-presets/catalog-changed'(): void
168
+ ```
169
+
170
+ Source: [`packages/interaction/permission-presets/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/types.ts)
134
171
  <!-- END GENERATED cordis-surface -->
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/persistence.md"
3
+ rawMarkdownPath: "en/reference/subsystems/persistence.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -7,7 +8,7 @@ outline: [2,3]
7
8
 
8
9
  The **durability seam** for the event log. [session.md](./session.md) describes the in-memory `Session` — the append-only `SessionEvent` log that is the source of truth. This page describes how that log is made durable: the abstract `SessionPersistence` service, its provider model and shipped JSONL backend, the flush checkpoint, crash recovery, and the metadata header that travels alongside the log. The event vocabulary the log carries is enumerated, member by member, in the generated [persistence log event catalog](../persistence-catalog.md).
9
10
 
10
- The seam is a [capability seam](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-13-capability-seams.md): one abstract service ([dsh-session-persistence](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence), `ctx.sessionPersistence`) exposing `create`/`open`/`stat`/`list` over the existing `SessionEvent` — **no parallel persisted event type** — where `create` and `open` return a per-session `SessionHandle` (`read`/`append`/`flush`/`close`) that carries all log access and single-writer ownership. The repository ships [dsh-session-persistence-jsonl](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-jsonl) as its provider; out-of-tree providers may implement the same service contract. See the [handle-based persistence Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.md) and the [session-persistence Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-14-session-persistence.md).
11
+ The seam is a [capability seam](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-13-capability-seams.md): one abstract service ([dsh-session-persistence](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence), `ctx.sessionPersistence`) exposing `create`/`open`/`stat`/`list` over the existing `SessionEvent` — **no parallel persisted event type** — where `create` and `open` return a per-session `SessionHandle` (`read`/`append`/`flush`/`close`) that carries all log access and single-writer ownership. The repository ships [dsh-session-persistence-jsonl](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-jsonl) as its provider; out-of-tree providers may implement the same service contract. See the [handle-based persistence Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.md) and the [session-persistence reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-persistence/README.md).
11
12
 
12
13
  ## `SessionHandle` — one open channel onto a stored session
13
14
 
@@ -206,8 +207,8 @@ interface CreateSessionOptions {
206
207
  readonly seed?: readonly SessionEvent[]
207
208
  /**
208
209
  * Exact fork-inherited prefix length when `meta.isSeeded` is true. The
209
- * constructor seed is exactly this inherited prefix; the constructor
210
- * appends the child-owned tagged marker at the cut.
210
+ * constructor appends the child-owned tagged marker at the cut unless
211
+ * the seed already includes it followed by child-owned fork closers.
211
212
  */
212
213
  readonly inheritedEventCount?: SessionLogOffset
213
214
  /**
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/plan.md"
3
+ rawMarkdownPath: "en/reference/subsystems/plan.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
6
7
  # Plan Mode
7
8
 
8
- Plan mode is logged per-agent collaboration state owned by [dsh-plan-mode](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/plan/plan-mode) (`ctx.planMode`, `PlanModeController`): while active, a deployment-owned guidance section is included in each model request. Plan mode is **soft guidance**. [Sandbox mode](./sandbox.md) and [approval policy](./approval.md) enforce restrictions independently; neither reads or writes plan state, so deployments configure them separately. The package is optional, and the agent loop does not depend on it. It contributes the `plan:policy` prompt section and registers the `exit_plan_mode` tool and `/plan` command. The [design note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/simplification/2026-07-22-plan-specific-collaboration-state.md) owns the rationale; the [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/README.md) owns the model-experience and limitation detail.
9
+ Plan mode is logged per-agent collaboration state owned by [dsh-plan-mode](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/plan/plan-mode) (`ctx.planMode`, `PlanModeController`): while active, a deployment-owned guidance section is included in each model request. Plan mode is **soft guidance**. [Sandbox mode](./sandbox.md) and [approval policy](./approval.md) enforce restrictions independently; neither reads or writes plan state, so deployments configure them separately. The package is optional, and the agent loop does not depend on it. It contributes the `plan:policy` prompt section and registers the `exit_plan_mode` tool and `/plan` command. The [design reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/README.md) owns the rationale; the [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/README.md) owns the model-experience and limitation detail.
9
10
 
10
11
  Source: [`packages/plan/plan-mode/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/src/index.ts)
11
12