dsh-plugin-dev-kb 1.3.0 → 1.5.1

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 (631) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.en.md +6 -6
  3. package/README.md +13 -8
  4. package/kb/INDEX.md +25 -21
  5. package/kb/README.md +6 -4
  6. package/kb/extra/AGENTS.md +14 -12
  7. package/kb/extra/agent-lifecycle.md +91 -0
  8. package/kb/extra/agent-lifecycle.zh.md +93 -0
  9. package/kb/extra/api-gateway.md +172 -0
  10. package/kb/extra/api-gateway.zh.md +178 -0
  11. package/kb/extra/architecture.md +165 -0
  12. package/kb/extra/architecture.zh.md +169 -0
  13. package/kb/extra/capability-seams.md +714 -0
  14. package/kb/extra/capability-seams.zh.md +716 -0
  15. package/kb/extra/cli-help.md +203 -0
  16. package/kb/extra/cli-help.zh.md +205 -0
  17. package/kb/extra/config-catalog.md +4801 -0
  18. package/kb/extra/config-catalog.zh.md +4803 -0
  19. package/kb/extra/cookbook/adding-a-package.md +170 -0
  20. package/kb/extra/cookbook/adding-a-package.zh.md +170 -0
  21. package/kb/extra/cookbook/adding-a-plugin-preview.md +52 -0
  22. package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +52 -0
  23. package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
  24. package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
  25. package/kb/extra/cookbook/adding-a-session-format-version.md +51 -7
  26. package/kb/extra/cookbook/adding-a-session-format-version.zh.md +51 -7
  27. package/kb/extra/cookbook/adding-a-settings-card.md +72 -0
  28. package/kb/extra/cookbook/adding-a-settings-card.zh.md +72 -0
  29. package/kb/extra/cookbook/adding-a-tool.md +101 -0
  30. package/kb/extra/cookbook/adding-a-tool.zh.md +103 -0
  31. package/kb/extra/cookbook/adding-an-llm-adapter.md +43 -0
  32. package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +43 -0
  33. package/kb/extra/cookbook/extension-cookbook.md +132 -0
  34. package/kb/extra/cookbook/extension-cookbook.zh.md +136 -0
  35. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +122 -0
  36. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +122 -0
  37. package/kb/extra/cordis-api/context.md +364 -0
  38. package/kb/extra/cordis-api/context.zh.md +366 -0
  39. package/kb/extra/cordis-api/events.md +207 -0
  40. package/kb/extra/cordis-api/events.zh.md +209 -0
  41. package/kb/extra/cordis-api/fiber.md +375 -0
  42. package/kb/extra/cordis-api/fiber.zh.md +377 -0
  43. package/kb/extra/cordis-api/inherited.md +38 -0
  44. package/kb/extra/cordis-api/registry.md +152 -0
  45. package/kb/extra/cordis-api/registry.zh.md +154 -0
  46. package/kb/extra/cordis-api/service.md +102 -0
  47. package/kb/extra/cordis-api/service.zh.md +104 -0
  48. package/kb/extra/cordis-tutorial/01-first-plugin.md +95 -0
  49. package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +95 -0
  50. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
  51. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
  52. package/kb/extra/cordis-tutorial/03-services.md +98 -0
  53. package/kb/extra/cordis-tutorial/03-services.zh.md +98 -0
  54. package/kb/extra/cordis-tutorial/04-events.md +144 -0
  55. package/kb/extra/cordis-tutorial/04-events.zh.md +144 -0
  56. package/kb/extra/cordis-tutorial/05-config.md +111 -0
  57. package/kb/extra/cordis-tutorial/05-config.zh.md +111 -0
  58. package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +113 -0
  59. package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
  60. package/kb/extra/cordis-tutorial/07-into-the-harness.md +108 -0
  61. package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +108 -0
  62. package/kb/extra/cordis-tutorial/index.md +60 -0
  63. package/kb/extra/cordis-tutorial/index.zh.md +62 -0
  64. package/kb/extra/deepseek-llm-api-wire-extensions.md +22 -23
  65. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +21 -22
  66. package/kb/extra/defensive-patterns/README.md +25 -0
  67. package/kb/extra/defensive-patterns/README.zh.md +27 -0
  68. package/kb/extra/defensive-patterns/client-components.md +493 -0
  69. package/kb/extra/defensive-patterns/client-components.zh.md +495 -0
  70. package/kb/extra/defensive-patterns/conversation-and-session.md +316 -0
  71. package/kb/extra/defensive-patterns/conversation-and-session.zh.md +316 -0
  72. package/kb/extra/defensive-patterns/general.md +222 -0
  73. package/kb/extra/defensive-patterns/general.zh.md +252 -0
  74. package/kb/extra/defensive-patterns/package-surface.md +231 -0
  75. package/kb/extra/defensive-patterns/package-surface.zh.md +231 -0
  76. package/kb/extra/defensive-patterns/remote-and-api.md +115 -0
  77. package/kb/extra/defensive-patterns/remote-and-api.zh.md +115 -0
  78. package/kb/extra/development.md +55 -18
  79. package/kb/extra/development.zh.md +56 -18
  80. package/kb/extra/event-producer-consumer.md +90 -68
  81. package/kb/extra/event-producer-consumer.zh.md +91 -69
  82. package/kb/extra/experimental-persistence-catalog.md +17 -0
  83. package/kb/extra/experimental-persistence-catalog.zh.md +17 -0
  84. package/kb/extra/glossary.md +2 -1
  85. package/kb/extra/glossary.zh.md +2 -1
  86. package/kb/extra/i18n/README.md +15 -7
  87. package/kb/extra/i18n/README.zh.md +15 -7
  88. package/kb/extra/i18n/style-samples.md +2 -2
  89. package/kb/extra/i18n/terminology.md +5 -4
  90. package/kb/extra/i18n/translation-prompt.md +2 -2
  91. package/kb/extra/module-graph.md +759 -432
  92. package/kb/extra/module-graph.zh.md +759 -432
  93. package/kb/extra/persistence-catalog.md +9140 -0
  94. package/kb/extra/persistence-catalog.zh.md +9142 -0
  95. package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
  96. package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
  97. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
  98. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
  99. package/kb/extra/persistence-changes/2026-09-13-working-directory.md +48 -0
  100. package/kb/extra/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
  101. package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
  102. package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
  103. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
  104. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
  105. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
  106. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
  107. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
  108. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
  109. package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
  110. package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
  111. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
  112. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
  113. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
  114. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
  115. package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.md +52 -0
  116. package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.zh.md +52 -0
  117. package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
  118. package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
  119. package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
  120. package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
  121. package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
  122. package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
  123. package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.md +48 -0
  124. package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.zh.md +48 -0
  125. package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.md +60 -0
  126. package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.zh.md +60 -0
  127. package/kb/extra/persistence-changes/README.md +90 -0
  128. package/kb/extra/persistence-changes/README.zh.md +90 -0
  129. package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
  130. package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
  131. package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
  132. package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
  133. package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
  134. package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
  135. package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
  136. package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
  137. package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
  138. package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
  139. package/kb/extra/persistence-changes/releases/README.md +103 -0
  140. package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
  141. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
  142. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
  143. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
  144. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
  145. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
  146. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
  147. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
  148. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
  149. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
  150. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
  151. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
  152. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
  153. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
  154. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
  155. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
  156. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
  157. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
  158. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
  159. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
  160. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
  161. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
  162. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
  163. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
  164. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
  165. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
  166. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
  167. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
  168. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
  169. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
  170. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
  171. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
  172. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
  173. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
  174. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
  175. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
  176. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
  177. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
  178. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
  179. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
  180. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
  181. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
  182. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
  183. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
  184. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
  185. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
  186. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
  187. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
  188. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
  189. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
  190. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
  191. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
  192. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
  193. package/kb/extra/rescope.md +1 -1
  194. package/kb/extra/rescope.zh.md +1 -1
  195. package/kb/extra/session-format-status.md +24 -8
  196. package/kb/extra/session-format-status.zh.md +24 -8
  197. package/kb/extra/subsystems/README.md +76 -0
  198. package/kb/extra/subsystems/README.zh.md +76 -0
  199. package/kb/extra/subsystems/agent-team.md +61 -37
  200. package/kb/extra/subsystems/agent-team.zh.md +61 -37
  201. package/kb/extra/subsystems/approval.md +170 -0
  202. package/kb/extra/subsystems/approval.zh.md +170 -0
  203. package/kb/extra/subsystems/attachment.md +19 -9
  204. package/kb/extra/subsystems/attachment.zh.md +19 -9
  205. package/kb/extra/subsystems/boot.md +447 -0
  206. package/kb/extra/subsystems/boot.zh.md +447 -0
  207. package/kb/extra/subsystems/browser-use.md +67 -0
  208. package/kb/extra/subsystems/browser-use.zh.md +67 -0
  209. package/kb/extra/subsystems/claude-code-mods.md +146 -0
  210. package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
  211. package/kb/extra/subsystems/client-modules.md +198 -0
  212. package/kb/extra/subsystems/client-modules.zh.md +198 -0
  213. package/kb/extra/subsystems/client-resources.md +92 -0
  214. package/kb/extra/subsystems/client-resources.zh.md +92 -0
  215. package/kb/extra/subsystems/commands.md +223 -0
  216. package/kb/extra/subsystems/commands.zh.md +223 -0
  217. package/kb/extra/subsystems/compaction.md +284 -0
  218. package/kb/extra/subsystems/compaction.zh.md +284 -0
  219. package/kb/extra/subsystems/computer-use.md +59 -0
  220. package/kb/extra/subsystems/computer-use.zh.md +59 -0
  221. package/kb/extra/subsystems/conversation.md +301 -0
  222. package/kb/extra/subsystems/conversation.zh.md +303 -0
  223. package/kb/extra/subsystems/core.md +1113 -0
  224. package/kb/extra/subsystems/core.zh.md +1125 -0
  225. package/kb/extra/subsystems/credentials.md +493 -0
  226. package/kb/extra/subsystems/credentials.zh.md +493 -0
  227. package/kb/extra/subsystems/deliverables.md +178 -0
  228. package/kb/extra/subsystems/deliverables.zh.md +178 -0
  229. package/kb/extra/subsystems/extensions.md +6 -4
  230. package/kb/extra/subsystems/extensions.zh.md +6 -4
  231. package/kb/extra/subsystems/feedback.md +4 -4
  232. package/kb/extra/subsystems/feedback.zh.md +4 -4
  233. package/kb/extra/subsystems/filesystem.md +530 -0
  234. package/kb/extra/subsystems/filesystem.zh.md +530 -0
  235. package/kb/extra/subsystems/goal.md +313 -0
  236. package/kb/extra/subsystems/goal.zh.md +313 -0
  237. package/kb/extra/subsystems/jobs.md +554 -0
  238. package/kb/extra/subsystems/jobs.zh.md +554 -0
  239. package/kb/extra/subsystems/llm-streaming.md +1196 -0
  240. package/kb/extra/subsystems/llm-streaming.zh.md +1202 -0
  241. package/kb/extra/subsystems/lsp.md +202 -0
  242. package/kb/extra/subsystems/lsp.zh.md +202 -0
  243. package/kb/extra/subsystems/mcp.md +139 -0
  244. package/kb/extra/subsystems/mcp.zh.md +139 -0
  245. package/kb/extra/subsystems/office-to-pdf.md +87 -0
  246. package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
  247. package/kb/extra/subsystems/otel.md +44 -0
  248. package/kb/extra/subsystems/otel.zh.md +44 -0
  249. package/kb/extra/subsystems/permission-presets.md +167 -0
  250. package/kb/extra/subsystems/permission-presets.zh.md +167 -0
  251. package/kb/extra/subsystems/persistence.md +418 -0
  252. package/kb/extra/subsystems/persistence.zh.md +418 -0
  253. package/kb/extra/subsystems/plan.md +87 -0
  254. package/kb/extra/subsystems/plan.zh.md +87 -0
  255. package/kb/extra/subsystems/product-telemetry.md +81 -0
  256. package/kb/extra/subsystems/product-telemetry.zh.md +81 -0
  257. package/kb/extra/subsystems/ptc-runtime.md +250 -0
  258. package/kb/extra/subsystems/ptc-runtime.zh.md +250 -0
  259. package/kb/extra/subsystems/sandbox.md +221 -0
  260. package/kb/extra/subsystems/sandbox.zh.md +221 -0
  261. package/kb/extra/subsystems/schedule.md +550 -0
  262. package/kb/extra/subsystems/schedule.zh.md +550 -0
  263. package/kb/extra/subsystems/scope.md +59 -0
  264. package/kb/extra/subsystems/scope.zh.md +61 -0
  265. package/kb/extra/subsystems/session-projection.md +356 -0
  266. package/kb/extra/subsystems/session-projection.zh.md +356 -0
  267. package/kb/extra/subsystems/session-query.md +511 -0
  268. package/kb/extra/subsystems/session-query.zh.md +511 -0
  269. package/kb/extra/subsystems/session-reference.md +224 -0
  270. package/kb/extra/subsystems/session-reference.zh.md +224 -0
  271. package/kb/extra/subsystems/session-telemetry.md +212 -0
  272. package/kb/extra/subsystems/session-telemetry.zh.md +212 -0
  273. package/kb/extra/subsystems/session-title.md +213 -0
  274. package/kb/extra/subsystems/session-title.zh.md +213 -0
  275. package/kb/extra/subsystems/session.md +1339 -0
  276. package/kb/extra/subsystems/session.zh.md +1343 -0
  277. package/kb/extra/subsystems/settings.md +155 -0
  278. package/kb/extra/subsystems/settings.zh.md +155 -0
  279. package/kb/extra/subsystems/shell.md +314 -0
  280. package/kb/extra/subsystems/shell.zh.md +314 -0
  281. package/kb/extra/subsystems/sidebar-right.md +160 -0
  282. package/kb/extra/subsystems/sidebar-right.zh.md +160 -0
  283. package/kb/extra/subsystems/skills.md +352 -0
  284. package/kb/extra/subsystems/skills.zh.md +352 -0
  285. package/kb/extra/subsystems/slots.md +200 -0
  286. package/kb/extra/subsystems/slots.zh.md +204 -0
  287. package/kb/extra/subsystems/spill.md +124 -0
  288. package/kb/extra/subsystems/spill.zh.md +124 -0
  289. package/kb/extra/subsystems/ssh.md +146 -0
  290. package/kb/extra/subsystems/ssh.zh.md +146 -0
  291. package/kb/extra/subsystems/storage.md +259 -0
  292. package/kb/extra/subsystems/storage.zh.md +259 -0
  293. package/kb/extra/subsystems/subagent.md +686 -0
  294. package/kb/extra/subsystems/subagent.zh.md +688 -0
  295. package/kb/extra/subsystems/subprocess.md +321 -0
  296. package/kb/extra/subsystems/subprocess.zh.md +321 -0
  297. package/kb/extra/subsystems/system-prompt.md +254 -0
  298. package/kb/extra/subsystems/system-prompt.zh.md +254 -0
  299. package/kb/extra/subsystems/terminal.md +184 -0
  300. package/kb/extra/subsystems/terminal.zh.md +184 -0
  301. package/kb/extra/subsystems/todo.md +3 -3
  302. package/kb/extra/subsystems/todo.zh.md +3 -3
  303. package/kb/extra/subsystems/token-meter.md +106 -0
  304. package/kb/extra/subsystems/token-meter.zh.md +106 -0
  305. package/kb/extra/subsystems/tools.md +747 -0
  306. package/kb/extra/subsystems/tools.zh.md +747 -0
  307. package/kb/extra/subsystems/translation.md +103 -0
  308. package/kb/extra/subsystems/translation.zh.md +103 -0
  309. package/kb/extra/subsystems/typert.md +690 -0
  310. package/kb/extra/subsystems/typert.zh.md +690 -0
  311. package/kb/extra/subsystems/user-questions.md +307 -0
  312. package/kb/extra/subsystems/user-questions.zh.md +307 -0
  313. package/kb/extra/subsystems/voice-input.md +164 -0
  314. package/kb/extra/subsystems/voice-input.zh.md +164 -0
  315. package/kb/extra/subsystems/web-client.md +100 -0
  316. package/kb/extra/subsystems/web-client.zh.md +100 -0
  317. package/kb/extra/subsystems/web-server.md +302 -0
  318. package/kb/extra/subsystems/web-server.zh.md +302 -0
  319. package/kb/extra/subsystems/web.md +206 -0
  320. package/kb/extra/subsystems/web.zh.md +206 -0
  321. package/kb/extra/subsystems/webhook.md +4 -4
  322. package/kb/extra/subsystems/webhook.zh.md +2 -2
  323. package/kb/extra/subsystems/workflow.md +278 -0
  324. package/kb/extra/subsystems/workflow.zh.md +278 -0
  325. package/kb/extra/subsystems/working-directory.md +64 -0
  326. package/kb/extra/subsystems/working-directory.zh.md +64 -0
  327. package/kb/extra/subsystems/workspace.md +647 -0
  328. package/kb/extra/subsystems/workspace.zh.md +647 -0
  329. package/kb/extra/subsystems/worktrees.md +76 -0
  330. package/kb/extra/subsystems/worktrees.zh.md +76 -0
  331. package/kb/extra/testing.md +4 -4
  332. package/kb/extra/testing.zh.md +4 -4
  333. package/kb/extra/tool-catalog.md +2824 -0
  334. package/kb/extra/tool-catalog.zh.md +2832 -0
  335. package/kb/extra/tool-execution-pipeline.md +65 -0
  336. package/kb/extra/tool-execution-pipeline.zh.md +67 -0
  337. package/kb/extra/ui-radius.md +117 -0
  338. package/kb/extra/ui-radius.zh.md +117 -0
  339. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
  340. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
  341. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
  342. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
  343. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
  344. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
  345. package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
  346. package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
  347. package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.md +18 -0
  348. package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.zh.md +18 -0
  349. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
  350. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
  351. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
  352. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
  353. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
  354. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
  355. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
  356. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
  357. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
  358. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
  359. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
  360. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
  361. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
  362. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
  363. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.md +18 -0
  364. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.zh.md +18 -0
  365. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.md +18 -0
  366. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.zh.md +18 -0
  367. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
  368. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
  369. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
  370. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
  371. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
  372. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
  373. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
  374. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
  375. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
  376. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
  377. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
  378. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
  379. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
  380. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
  381. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
  382. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
  383. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
  384. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
  385. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
  386. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
  387. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md +21 -0
  388. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.zh.md +21 -0
  389. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
  390. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
  391. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
  392. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
  393. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
  394. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
  395. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
  396. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
  397. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
  398. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
  399. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.md +18 -0
  400. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.zh.md +18 -0
  401. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.md +27 -0
  402. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.zh.md +27 -0
  403. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.md +18 -0
  404. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.zh.md +18 -0
  405. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.md +20 -0
  406. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.zh.md +20 -0
  407. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.md +18 -0
  408. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.zh.md +18 -0
  409. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.md +19 -0
  410. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.zh.md +19 -0
  411. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.md +17 -0
  412. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.zh.md +17 -0
  413. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.md +20 -0
  414. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.zh.md +20 -0
  415. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.md +32 -0
  416. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.zh.md +32 -0
  417. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.md +25 -0
  418. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.zh.md +25 -0
  419. package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.md +21 -0
  420. package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.zh.md +21 -0
  421. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.md +18 -0
  422. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.zh.md +18 -0
  423. package/kb/extra/web-styling.md +12 -3
  424. package/kb/extra/web-styling.zh.md +12 -3
  425. package/kb/meta/search-index.json +2690 -404
  426. package/kb/meta/site-pages.txt +188 -188
  427. package/kb/meta/source.json +7 -6
  428. package/kb/meta/topics.md +10 -6
  429. package/kb/site/develop/basic/config.md +1 -0
  430. package/kb/site/develop/basic/index.md +1 -0
  431. package/kb/site/develop/basic/publish.md +12 -3
  432. package/kb/site/develop/basic/tool.md +1 -0
  433. package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
  434. package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  435. package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
  436. package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
  437. package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
  438. package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  439. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  440. package/kb/site/develop/cordis-tutorial/index.md +1 -0
  441. package/kb/site/develop/framework/events.md +1 -0
  442. package/kb/site/develop/framework/index.md +2 -1
  443. package/kb/site/develop/framework/service.md +1 -0
  444. package/kb/site/develop/practice/dynamic-cordis.md +9 -8
  445. package/kb/site/develop/practice/index.md +1 -0
  446. package/kb/site/develop/practice/llm-adapter.md +2 -1
  447. package/kb/site/en/develop/basic/config.md +1 -0
  448. package/kb/site/en/develop/basic/index.md +1 -0
  449. package/kb/site/en/develop/basic/publish.md +12 -3
  450. package/kb/site/en/develop/basic/tool.md +1 -0
  451. package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
  452. package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  453. package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
  454. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
  455. package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
  456. package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  457. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  458. package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
  459. package/kb/site/en/develop/framework/events.md +1 -0
  460. package/kb/site/en/develop/framework/index.md +2 -1
  461. package/kb/site/en/develop/framework/service.md +1 -0
  462. package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
  463. package/kb/site/en/develop/practice/index.md +1 -0
  464. package/kb/site/en/develop/practice/llm-adapter.md +2 -1
  465. package/kb/site/en/guide/github-review.md +8 -10
  466. package/kb/site/en/guide/mcp-memory.md +1 -0
  467. package/kb/site/en/guide/network-proxy.md +2 -1
  468. package/kb/site/en/guide/plugin-market.md +151 -0
  469. package/kb/site/en/guide/providers-custom-form.png +0 -0
  470. package/kb/site/en/guide/providers-models-page.png +0 -0
  471. package/kb/site/en/guide/providers.md +121 -83
  472. package/kb/site/en/guide/public-deployments.md +40 -0
  473. package/kb/site/en/guide/python-sdk.md +49 -29
  474. package/kb/site/en/guide/quickstart.md +2 -0
  475. package/kb/site/en/guide/schedule.md +70 -11
  476. package/kb/site/en/reference/agent-lifecycle.md +1 -0
  477. package/kb/site/en/reference/api-gateway.md +22 -13
  478. package/kb/site/en/reference/capability-seams.md +242 -77
  479. package/kb/site/en/reference/config-catalog.md +2102 -904
  480. package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
  481. package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
  482. package/kb/site/en/reference/cookbook/adding-a-tool.md +4 -3
  483. package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
  484. package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -5
  485. package/kb/site/en/reference/cordis-api/context.md +1 -0
  486. package/kb/site/en/reference/cordis-api/events.md +1 -0
  487. package/kb/site/en/reference/cordis-api/fiber.md +4 -3
  488. package/kb/site/en/reference/cordis-api/inherited.md +16 -16
  489. package/kb/site/en/reference/cordis-api/registry.md +1 -0
  490. package/kb/site/en/reference/cordis-api/service.md +1 -0
  491. package/kb/site/en/reference/cordis-primer.md +1 -0
  492. package/kb/site/en/reference/experimental-persistence-catalog.md +20 -0
  493. package/kb/site/en/reference/index.md +27 -21
  494. package/kb/site/en/reference/persistence-catalog.md +8055 -62
  495. package/kb/site/en/reference/subsystems/approval.md +2 -1
  496. package/kb/site/en/reference/subsystems/client-modules.md +37 -15
  497. package/kb/site/en/reference/subsystems/client-resources.md +3 -1
  498. package/kb/site/en/reference/subsystems/commands.md +6 -1
  499. package/kb/site/en/reference/subsystems/compaction.md +50 -3
  500. package/kb/site/en/reference/subsystems/conversation.md +50 -6
  501. package/kb/site/en/reference/subsystems/core.md +100 -258
  502. package/kb/site/en/reference/subsystems/credentials.md +178 -13
  503. package/kb/site/en/reference/subsystems/filesystem.md +11 -0
  504. package/kb/site/en/reference/subsystems/goal.md +2 -1
  505. package/kb/site/en/reference/subsystems/index.md +20 -6
  506. package/kb/site/en/reference/subsystems/jobs.md +397 -132
  507. package/kb/site/en/reference/subsystems/llm-streaming.md +157 -50
  508. package/kb/site/en/reference/subsystems/lsp.md +1 -0
  509. package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
  510. package/kb/site/en/reference/subsystems/persistence.md +6 -3
  511. package/kb/site/en/reference/subsystems/plan.md +3 -2
  512. package/kb/site/en/reference/subsystems/ptc-runtime.md +254 -0
  513. package/kb/site/en/reference/subsystems/sandbox.md +7 -5
  514. package/kb/site/en/reference/subsystems/schedule.md +392 -33
  515. package/kb/site/en/reference/subsystems/scope.md +2 -1
  516. package/kb/site/en/reference/subsystems/session-projection.md +22 -19
  517. package/kb/site/en/reference/subsystems/session-query.md +3 -0
  518. package/kb/site/en/reference/subsystems/session-reference.md +8 -6
  519. package/kb/site/en/reference/subsystems/session-telemetry.md +7 -4
  520. package/kb/site/en/reference/subsystems/session-title.md +20 -10
  521. package/kb/site/en/reference/subsystems/session.md +254 -91
  522. package/kb/site/en/reference/subsystems/settings.md +43 -292
  523. package/kb/site/en/reference/subsystems/shell.md +37 -28
  524. package/kb/site/en/reference/subsystems/sidebar-right.md +25 -12
  525. package/kb/site/en/reference/subsystems/skills.md +5 -6
  526. package/kb/site/en/reference/subsystems/slots.md +88 -70
  527. package/kb/site/en/reference/subsystems/spill.md +4 -3
  528. package/kb/site/en/reference/subsystems/storage.md +2 -2
  529. package/kb/site/en/reference/subsystems/subagent.md +207 -293
  530. package/kb/site/en/reference/subsystems/subprocess.md +17 -18
  531. package/kb/site/en/reference/subsystems/system-prompt.md +36 -3
  532. package/kb/site/en/reference/subsystems/terminal.md +1 -0
  533. package/kb/site/en/reference/subsystems/token-meter.md +1 -0
  534. package/kb/site/en/reference/subsystems/tools.md +42 -14
  535. package/kb/site/en/reference/subsystems/typert.md +362 -14
  536. package/kb/site/en/reference/subsystems/user-questions.md +131 -1
  537. package/kb/site/en/reference/subsystems/web-client.md +15 -9
  538. package/kb/site/en/reference/subsystems/web-server.md +157 -8
  539. package/kb/site/en/reference/subsystems/web.md +3 -2
  540. package/kb/site/en/reference/subsystems/workflow.md +10 -9
  541. package/kb/site/en/reference/subsystems/workspace.md +290 -42
  542. package/kb/site/en/reference/tool-catalog.md +908 -352
  543. package/kb/site/en/reference/tool-execution-pipeline.md +7 -3
  544. package/kb/site/guide/github-review.md +8 -10
  545. package/kb/site/guide/mcp-memory.md +1 -0
  546. package/kb/site/guide/network-proxy.md +2 -1
  547. package/kb/site/guide/plugin-market.md +151 -0
  548. package/kb/site/guide/providers-custom-form.zh.png +0 -0
  549. package/kb/site/guide/providers-models-page.zh.png +0 -0
  550. package/kb/site/guide/providers.md +132 -94
  551. package/kb/site/guide/public-deployments.md +40 -0
  552. package/kb/site/guide/python-sdk.md +49 -29
  553. package/kb/site/guide/quickstart.md +2 -0
  554. package/kb/site/guide/schedule.md +70 -11
  555. package/kb/site/reference/agent-lifecycle.md +1 -0
  556. package/kb/site/reference/api-gateway.md +28 -13
  557. package/kb/site/reference/capability-seams.md +242 -77
  558. package/kb/site/reference/config-catalog.md +2105 -906
  559. package/kb/site/reference/cookbook/adding-a-package.md +55 -3
  560. package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
  561. package/kb/site/reference/cookbook/adding-a-tool.md +4 -3
  562. package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
  563. package/kb/site/reference/cookbook/extension-cookbook.md +6 -5
  564. package/kb/site/reference/cordis-api/context.md +1 -0
  565. package/kb/site/reference/cordis-api/events.md +1 -0
  566. package/kb/site/reference/cordis-api/fiber.md +4 -3
  567. package/kb/site/reference/cordis-api/inherited.md +16 -16
  568. package/kb/site/reference/cordis-api/registry.md +1 -0
  569. package/kb/site/reference/cordis-api/service.md +1 -0
  570. package/kb/site/reference/cordis-primer.md +1 -0
  571. package/kb/site/reference/experimental-persistence-catalog.md +20 -0
  572. package/kb/site/reference/index.md +27 -21
  573. package/kb/site/reference/persistence-catalog.md +8061 -68
  574. package/kb/site/reference/subsystems/approval.md +2 -1
  575. package/kb/site/reference/subsystems/client-modules.md +37 -15
  576. package/kb/site/reference/subsystems/client-resources.md +3 -1
  577. package/kb/site/reference/subsystems/commands.md +6 -1
  578. package/kb/site/reference/subsystems/compaction.md +50 -3
  579. package/kb/site/reference/subsystems/conversation.md +51 -5
  580. package/kb/site/reference/subsystems/core.md +102 -258
  581. package/kb/site/reference/subsystems/credentials.md +178 -13
  582. package/kb/site/reference/subsystems/filesystem.md +11 -0
  583. package/kb/site/reference/subsystems/goal.md +2 -1
  584. package/kb/site/reference/subsystems/index.md +20 -6
  585. package/kb/site/reference/subsystems/jobs.md +396 -131
  586. package/kb/site/reference/subsystems/llm-streaming.md +157 -50
  587. package/kb/site/reference/subsystems/lsp.md +1 -0
  588. package/kb/site/reference/subsystems/permission-presets.md +66 -29
  589. package/kb/site/reference/subsystems/persistence.md +6 -3
  590. package/kb/site/reference/subsystems/plan.md +3 -2
  591. package/kb/site/reference/subsystems/ptc-runtime.md +254 -0
  592. package/kb/site/reference/subsystems/sandbox.md +7 -5
  593. package/kb/site/reference/subsystems/schedule.md +392 -33
  594. package/kb/site/reference/subsystems/scope.md +4 -1
  595. package/kb/site/reference/subsystems/session-projection.md +22 -19
  596. package/kb/site/reference/subsystems/session-query.md +3 -0
  597. package/kb/site/reference/subsystems/session-reference.md +8 -6
  598. package/kb/site/reference/subsystems/session-telemetry.md +7 -4
  599. package/kb/site/reference/subsystems/session-title.md +20 -10
  600. package/kb/site/reference/subsystems/session.md +254 -91
  601. package/kb/site/reference/subsystems/settings.md +43 -292
  602. package/kb/site/reference/subsystems/shell.md +37 -28
  603. package/kb/site/reference/subsystems/sidebar-right.md +25 -12
  604. package/kb/site/reference/subsystems/skills.md +5 -6
  605. package/kb/site/reference/subsystems/slots.md +92 -70
  606. package/kb/site/reference/subsystems/spill.md +3 -2
  607. package/kb/site/reference/subsystems/storage.md +2 -2
  608. package/kb/site/reference/subsystems/subagent.md +208 -296
  609. package/kb/site/reference/subsystems/subprocess.md +17 -18
  610. package/kb/site/reference/subsystems/system-prompt.md +36 -3
  611. package/kb/site/reference/subsystems/terminal.md +1 -0
  612. package/kb/site/reference/subsystems/token-meter.md +1 -0
  613. package/kb/site/reference/subsystems/tools.md +42 -14
  614. package/kb/site/reference/subsystems/typert.md +362 -14
  615. package/kb/site/reference/subsystems/user-questions.md +132 -2
  616. package/kb/site/reference/subsystems/web-client.md +15 -9
  617. package/kb/site/reference/subsystems/web-server.md +157 -8
  618. package/kb/site/reference/subsystems/web.md +3 -2
  619. package/kb/site/reference/subsystems/workflow.md +10 -9
  620. package/kb/site/reference/subsystems/workspace.md +290 -42
  621. package/kb/site/reference/tool-catalog.md +862 -306
  622. package/kb/site/reference/tool-execution-pipeline.md +7 -3
  623. package/package.json +2 -2
  624. package/skills/dsh-dev-sandbox.md +67 -0
  625. package/skills/dsh-plugin-dev-kb.md +5 -4
  626. package/kb/extra/defensive-patterns.md +0 -33
  627. package/kb/extra/defensive-patterns.zh.md +0 -35
  628. package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
  629. package/kb/site/en/reference/subsystems/invariants.md +0 -91
  630. package/kb/site/reference/subsystems/code-runtime.md +0 -198
  631. package/kb/site/reference/subsystems/invariants.md +0 -91
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/session.md"
3
+ rawMarkdownPath: "en/reference/subsystems/session.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -14,8 +15,8 @@ Source: [`packages/core/session/src/types.ts`](https://github.com/deepseek-ai/de
14
15
  The append-only event types. Merge-extensible: a plugin declares extra event types via declaration merging — e.g. the [compaction seam](./compaction.md) adds `compaction/start` / `compaction/summary` / `compaction/end`, and `@deepseek-ai/dsh-hook-protocol` adds log-only `hook/invoked` / `hook/result` records for a hook bridge. Like `compaction/*`, these are NOT `SurfaceEventType`s (no `surfaceOp`). The generated [persistence log event catalog](../persistence-catalog.md) enumerates every member — core and merged — with its payload, surface badge, and declaration site.
15
16
 
16
17
  ```ts type-equiv
17
- /** A user-role specialization of the one shared message representation. */
18
- interface UserMessage extends Message {
18
+ /** A user-role specialization of the shared message representation. */
19
+ interface UserMessage extends MessageBase {
19
20
  readonly role: 'user'
20
21
  }
21
22
  ```
@@ -56,6 +57,14 @@ interface SessionEventMap {
56
57
  * project their `content` verbatim; `source` tells them apart.
57
58
  */
58
59
  'user/message': UserMessage
60
+ /** An incremental agent session change admitted at the named turn and step. */
61
+ 'developer/message': {
62
+ turn: number
63
+ step: number
64
+ message: DeveloperMessage
65
+ /** Earlier request/header defining every tool addition; required exactly when additions are present. */
66
+ headerSeq?: SessionSeq
67
+ }
59
68
  /**
60
69
  * The rendered system prompt on the model-visible surface. The loop appends
61
70
  * the first one as surface node 0 before the step's first `user/message`.
@@ -102,7 +111,9 @@ interface SessionEventMap {
102
111
  'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string }
103
112
  /**
104
113
  * A completed tool call's model-facing result, optional internal failure
105
- * identity, and optional tool-private `meta` presentation payload. `meta` is
114
+ * identity and user-facing reason, and optional tool-private `meta`
115
+ * presentation payload. The reason remains outside the model-facing message.
116
+ * `meta` is
106
117
  * opaque to the core (the producing tool owns its shape and reads it back in
107
118
  * `presentResult`) but MUST be JSON-serializable: `Session.append`
108
119
  * runtime-validates all event data with `isJsonValue`, so a non-serializable
@@ -115,8 +126,11 @@ interface SessionEventMap {
115
126
  turn: number
116
127
  step: number
117
128
  message: ToolResultMessage
118
- /** Optional failure identity; allowed only when the tool-result block has `isError: true`. */
119
- error?: { name: string; code: string }
129
+ /**
130
+ * Optional failure identity and raw user-facing reason, outside model content;
131
+ * allowed only when the message has `isError: true`.
132
+ */
133
+ error?: { name: string; code: string; reason?: string }
120
134
  meta?: JsonValue
121
135
  }
122
136
  /**
@@ -126,7 +140,7 @@ interface SessionEventMap {
126
140
  'request/header': {
127
141
  header: EpochHeader
128
142
  reason: RequestHeaderReason
129
- /** A changed header also begins a distinct model-message series. */
143
+ /** This request begins a distinct model-message series, independently of the header reason. */
130
144
  startsSeries?: true
131
145
  }
132
146
  /**
@@ -137,18 +151,20 @@ interface SessionEventMap {
137
151
  */
138
152
  'request/context': RequestContext
139
153
  /**
140
- * Marks the end of a constructor seed. Events before it have smaller seq
141
- * values and came from the seed (resume, fork, or replay); this lifecycle
142
- * produced none of them. This log-only event is the durable projection of
143
- * {@link Session.firstLiveSeq}.
154
+ * Separates inherited or restored history from later lifecycle-owned work.
155
+ * This log-only marker need not be at {@link Session.firstLiveSeq}: a fork
156
+ * seed can already contain its tagged marker and child-owned synthetic
157
+ * closers before construction.
144
158
  *
145
159
  * A fresh fork child owns one `{ inherited: true }` marker at its exact
146
160
  * inherited-prefix cut, even when that prefix ends in an ancestor marker.
147
- * The last tagged marker is the current Session's cut; untagged markers keep
148
- * ordinary restore and replay lifecycle boundaries.
161
+ * `buildForkSeed` appends that marker before any synthetic closers; the
162
+ * `Session` constructor supplies it when given only the inherited prefix.
163
+ * The last tagged marker is the current Session's cut; untagged markers
164
+ * keep ordinary restore and replay lifecycle boundaries.
149
165
  *
150
- * `Session`'s constructor is the only legitimate writer. The invariant
151
- * companion deliberately constrains nothing here, so a plugin appending one
166
+ * Only the `Session` constructor and `buildForkSeed` may create this marker.
167
+ * Session append does not reject other writers, so a plugin appending one
152
168
  * would silently classify every live bracket before it as seed history.
153
169
  *
154
170
  * An owner of a standalone open/close bracket (`compaction/start` …
@@ -168,7 +184,7 @@ interface SessionEventMap {
168
184
 
169
185
  ### The request header event: `request/header`
170
186
 
171
- The request envelope — the `EpochHeader` (call config + markers for adapter-supplied defaults + assembled tool schemas) — is logged session state, so every conversation request is a pure function of the log (the reconstructability Agent Note). The rendered system prompt is not part of the header: it is derived history, the `system/message` event at surface node 0 and any later in-history system node ([decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md)), so a prompt change replaces or appends a system node and leaves the header unchanged. A full `request/header` snapshot with reason `'initial'` or `'resume'` records each loop-instance boundary; a changed request appends a snapshot with reason `'change'`; and an unchanged envelope beginning an explicitly declared message series or following a surface replacement appends a snapshot with reason `'series'`. A changed snapshot carries `startsSeries: true` when that request also begins a series. Ordinary append-only later Turns, further Steps, and retries in the same model-message series inherit the latest snapshot. `foldRequestHeader(events)` reconstructs the header by selecting the latest snapshot. The event is not a `SurfaceEventType`: it produces no LLM message.
187
+ The request envelope — the `EpochHeader` (call config + markers for adapter-supplied defaults + assembled tool schemas) — is logged session state, so every conversation request is a pure function of the log (the reconstructability Agent Note). The rendered system prompt is not part of the header: it is derived history, the `system/message` event at surface node 0 and any later in-history system node ([decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md)), so a prompt change replaces or appends a system node and leaves the header unchanged. A full `request/header` snapshot with reason `'initial'` or `'resume'` records each loop-instance boundary; a changed request appends a snapshot with reason `'change'`; and an unchanged envelope beginning an explicitly declared message series or following a surface replacement appends a snapshot with reason `'series'`. An `'initial'`, `'resume'`, or `'change'` snapshot carries `startsSeries: true` when that request also begins a series; reason `'series'` already records that fact. Ordinary append-only later Turns, further Steps, and retries in the same model-message series inherit the latest snapshot. `foldRequestHeader(events)` reconstructs the header by selecting the latest snapshot. The event is not a `SurfaceEventType`: it produces no LLM message.
172
188
 
173
189
  ```ts type-equiv
174
190
  /**
@@ -184,6 +200,10 @@ interface EpochHeader {
184
200
  adapterDefaults?: LlmCallConfigAdapterDefaults
185
201
  /** Assembled tool schemas; absent for a tool-less request. */
186
202
  tools?: ToolSchema[]
203
+ /** Retired request text; system prompts belong to system/message events.
204
+ * @persistenceReserved
205
+ */
206
+ system?: never
187
207
  }
188
208
  ```
189
209
 
@@ -191,7 +211,7 @@ Current event acceptance requires canonical `request/header.header`: any `system
191
211
 
192
212
  ### The route capacity event: `request/context`
193
213
 
194
- The context metadata of the route a request resolved to is separate logged state, appended beside `request/header` inside the same step and only when the provider, model, capacity, or `systemPromptUpdate` mode differs from the previous record. It stays outside `EpochHeader` because that type is the reconstruction contract compared field-wise by `headerEquals`: capacity and the update mode describe a route, not a request input, so folding them in would let a route change register as a request-envelope `change` and would pull adapter metadata into the loop's reconstruction invariant. Like `request/header`, it is not a `SurfaceEventType` and produces no LLM message. `session.requestContext()` folds the latest record incrementally; the agent loop reads that record's `systemPromptUpdate` when it decides whether a changed system prompt replaces the latest system node or is appended after the cached history ([decision rule](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent-loop/README.md#understand-the-implementation)). A route whose adapter advertises no capacity is recorded with `contextWindow` absent, so the new record clears an older route's capacity; a route without a declared update mode likewise clears an older route's `systemPromptUpdate`.
214
+ The context metadata of the route a request resolved to is separate logged state, appended beside `request/header` inside the same step and only when the provider, model, capacity, or `systemPromptUpdate` mode differs from the previous record. It stays outside `EpochHeader` because that type is the reconstruction contract compared field-wise by `headerEquals`: capacity and the update mode describe a route, not a request input, so folding them in would let a route change register as a request-envelope `change` and would pull adapter metadata into the loop's request reconstruction. Like `request/header`, it is not a `SurfaceEventType` and produces no LLM message. `session.requestContext()` folds the latest record incrementally; the agent loop reads that record's `systemPromptUpdate` when it decides whether a changed system prompt replaces the latest system node or is appended after the cached history ([decision rule](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent-loop/README.md#understand-the-implementation)). A route whose adapter advertises no capacity is recorded with `contextWindow` absent, so the new record clears an older route's capacity; a route without a declared update mode likewise clears an older route's `systemPromptUpdate`.
195
215
 
196
216
  ```ts type-equiv
197
217
  /** Registration-bound metadata for one resolved model route. */
@@ -275,11 +295,11 @@ type SessionEvent<T extends SessionEventType = SessionEventType> = {
275
295
 
276
296
  `SessionEventType = keyof SessionEventMap`. Because `SessionEventMap` is merge-extensible, switches over `SessionEvent` must NOT use `assertNever` — a plugin-added variant is a valid unknown value; handle the known cases and fall through `default`.
277
297
 
278
- Every surface event requires `surfaceOp`; known log-only events forbid both surface metadata fields. Native unknown or obsolete ignorable envelopes remain opaque. `assistant/message` embeds its provider stream and forbids `sourceEventSeqs`. System, user, and tool surface events may cite a complete non-empty set of unique earlier events when their provenance or replacement operation requires it. A `tool/result` may carry `data.error` only when its tool-result block has `isError: true`; failure identity remains optional for failed results.
298
+ Every surface event requires `surfaceOp`; known log-only events forbid both surface metadata fields. Native unknown or obsolete ignorable envelopes remain opaque. `assistant/message` embeds its provider stream and forbids `sourceEventSeqs`. System, user, and tool surface events may cite a complete non-empty set of unique earlier events when source attribution or replacement coverage requires it. A `tool/result` may carry `data.error` only when its message has `isError: true`; failure identity remains optional for failed results.
279
299
 
280
300
  ## Surface types
281
301
 
282
- The four message-producing types (`SurfaceEventType` — `system/message`, `user/message`, `assistant/message`, `tool/result`) carry surface metadata declaring how they join the ordered derived surface. `system/message` holds the rendered system prompt: the loop appends the first one as surface node 0 and, when the prompt changes, replaces exactly the latest system node or appends a new one on an in-history route; the surface fold rejects any other replacement covering a `system/message` at node 0, while a later system node is ordinary history that a compaction replacement may shadow. See the [session surface Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-18-session-surface.md).
302
+ The message-producing types (`SurfaceEventType` — `system/message`, `developer/message`, `user/message`, `assistant/message`, `tool/result`) carry surface metadata declaring how they join the ordered derived surface. `system/message` holds the rendered system prompt: the loop appends the first one as surface node 0 and, when the prompt changes, replaces exactly the latest system node or appends a new one on an in-history route; the surface fold rejects any other replacement covering a `system/message` at node 0, while a later system node is ordinary history that a compaction replacement may shadow. See the [session surface Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-18-session-surface.md).
283
303
 
284
304
  ### `SurfaceEventType` — the message-producing subset of event types
285
305
 
@@ -292,6 +312,7 @@ The four message-producing types (`SurfaceEventType` — `system/message`, `user
292
312
  */
293
313
  type SurfaceEventType =
294
314
  | 'system/message'
315
+ | 'developer/message'
295
316
  | 'user/message'
296
317
  | 'assistant/message'
297
318
  | 'tool/result'
@@ -342,11 +363,47 @@ Required for `SurfaceEventType` events — every message-producing event must de
342
363
 
343
364
  `assistant/message` cannot carry `sourceEventSeqs`; its `stream` owns exact provider evidence. Other surface events omit the field when they cite no earlier event and use a complete non-empty list when they do.
344
365
 
366
+ <a id="plugin-owned-message-projections"></a>
367
+ ### Plugin-owned message projections
368
+
369
+ Content-changing plugins mark their event declaration with `@messageProjection` and register a pure definition through `ctx.sessions.registerMessageProjection()`. Session validates the complete decision through that definition before commit, applies its immutable message updates, and advances `contentGeneration`. It rejects missing interpreters, including on restore and detached folding; unloading a used definition blocks cached reads. Detached readers pass explicit definitions to `foldSurface(events, projections)` and apply `projectedMessages` through `deriveEventMessage()`. The installed format catalog assembles first-party definitions for offline readers. The [image-offload plugin](./compaction.md#image-offload) owns its image-specific event and interpretation.
370
+
371
+ ```ts type-equiv
372
+ /** Readonly history immediately before a message-projection event. */
373
+ interface SessionMessageProjectionContext {
374
+ /** Current message-producing event sequences in model-visible order. */
375
+ nodes: readonly SessionSeq[]
376
+ /** Contiguous event window; entries at or beyond the candidate seq are not committed inputs. */
377
+ events: readonly SessionEvent[]
378
+ /** Absolute sequence of the window's first event. */
379
+ baseSeq: SessionLogOffset
380
+ /** Previously projected messages keyed by their original event sequences. */
381
+ messages: ReadonlyMap<SessionSeq, Message>
382
+ }
383
+ ```
384
+
385
+ ```ts type-equiv
386
+ /** Pure interpretation of one plugin-owned event that changes existing message content. */
387
+ interface SessionMessageProjection<T extends SessionEventType = SessionEventType> {
388
+ /** Event interpreted by this definition; declare it with `@messageProjection` in SessionEventMap. */
389
+ type: T
390
+ /**
391
+ * Validate the complete durable decision before returning any updates. Preserve
392
+ * message identities and publish immutable copies without mutating the input.
393
+ * @param event - candidate event, not yet applied to the supplied history.
394
+ * @param context - history preceding this decision.
395
+ * @returns changed current messages keyed by their original sequences.
396
+ * @throws when the durable decision cannot be applied to this history.
397
+ */
398
+ project(event: SessionEvent<T>, context: SessionMessageProjectionContext): ReadonlyMap<SessionSeq, Message>
399
+ }
400
+ ```
401
+
345
402
  ### `SessionSurface` — the live readonly surface projection
346
403
 
347
404
  `Session.surface` returns the session's stable `SessionSurface` view. The same incremental manager validates append candidates before commit and advances this projection from committed events; callers can observe membership and replacement generation but cannot invoke validation.
348
405
 
349
- `SurfaceManager(log, baseSeq?)` can instead fold a contiguous loaded window whose first event has the absolute sequence `baseSeq`. Every event remains contiguous in that absolute sequence space, and a replacement that crosses the window head fails because its declared range is absent.
406
+ `SurfaceManager(log, baseSeq?, projections?)` can instead fold a contiguous loaded window whose first event has the absolute sequence `baseSeq`. Every event remains contiguous in that absolute sequence space, and a replacement that crosses the window head fails because its declared range is absent.
350
407
 
351
408
  ```ts type-equiv
352
409
  /** Readonly live projection of the message-producing session events. */
@@ -355,12 +412,14 @@ interface SessionSurface {
355
412
  readonly nodes: readonly SessionSeq[]
356
413
  /** Monotonic count of committed positional replacements. */
357
414
  readonly replaceGeneration: number
415
+ /** Monotonic count of committed replacements and plugin-owned message changes. */
416
+ readonly contentGeneration: number
358
417
  }
359
418
  ```
360
419
 
361
420
  ### `SurfaceFoldReplacement` and `SurfaceFoldResult` — a complete surface replay
362
421
 
363
- `foldSurface(events)` returns detached current event sequences together with the actual sequences shadowed by each declared replacement range. The live manager uses the same transitions without retaining replacement history. Its `replaceGeneration` increments for each committed replacement so incremental consumers can distinguish pure tail growth from a rewrite.
422
+ `foldSurface(events, projections)` returns detached current event sequences together with the actual sequences shadowed by each declared replacement range. The live manager uses the same transitions without retaining replacement history. Its `replaceGeneration` increments for each committed replacement so incremental consumers can distinguish pure tail growth from a rewrite.
364
423
 
365
424
  ```ts type-equiv
366
425
  /** One replacement operation observed while folding a session surface. */
@@ -383,6 +442,8 @@ interface SurfaceFoldResult {
383
442
  nodes: SessionSeq[]
384
443
  /** Replacement operations in event order. */
385
444
  replacements: SurfaceFoldReplacement[]
445
+ /** Immutable projected messages, keyed by their original event sequences. */
446
+ projectedMessages: ReadonlyMap<SessionSeq, Message>
386
447
  }
387
448
  ```
388
449
 
@@ -416,29 +477,26 @@ declare class Session {
416
477
  /** The session identity, derived from its durable header's single copy. */
417
478
  get id(): SessionId;
418
479
  /**
419
- * The first seq appended IN THIS PROCESS: the length of the constructor
420
- * seed (0 without one). Events with smaller seq values entered through
421
- * construction — replay, fork, or resume — and were never published on the
422
- * `session/event` firehose (constructor seeds do not emit). This offset marks
423
- * the constructor-input boundary for lifecycle ownership and persistence
424
- * adoption; consumers that need complete canonical history still start at
425
- * seq 0. Distinct from {@link inheritedEventCount}, the DURABLE
426
- * fork-lineage cut: a resumed session's constructor seed is its full stored
427
- * log, while the inherited count keeps the original fork value — this field is the
428
- * in-process construction fact.
429
- *
430
- * Not persisted itself: a seeded session projects it into the log as the
431
- * `session/end-seed` event, which is what a consumer reading STORED history
432
- * reads. Locate the LAST such event, not necessarily one at this seq — a
433
- * seed already ending in one is not re-marked, so reopening an untouched
434
- * session leaves that event at a smaller seq than `firstLiveSeq`. Prefer
435
- * this field in-process: it is exact before the marker reaches storage.
480
+ * The constructor seed length (0 without one), before any marker appended
481
+ * during construction. Seed events never publish on `session/event`. A
482
+ * marker appended before the store attaches occupies this seq without
483
+ * publishing either; otherwise this seq is available for the next append.
436
484
  *
437
- * When this lifecycle appends the marker, it occupies this seq before the
438
- * store attaches and therefore does not publish either. Otherwise this seq
439
- * holds an ordinary published write.
440
- */
485
+ * This in-process offset is not persisted. A fork seed can already contain
486
+ * the child's inherited marker and synthetic closers, so its child-owned
487
+ * history starts at {@link inheritedEventCount}, before this offset. A
488
+ * resumed Session's seed contains its full stored log, while its inherited
489
+ * count keeps the durable fork cut. Consumers needing complete canonical
490
+ * history start at seq 0.
491
+ */
441
492
  readonly firstLiveSeq: SessionLogOffset;
493
+ /**
494
+ * First event produced for this object lifecycle. A new fork includes its
495
+ * child-owned seed marker and closers; a restored Session starts after its
496
+ * complete stored prefix. This in-process capture offset is not persisted.
497
+ */
498
+ readonly firstLifecycleSeq: SessionLogOffset;
499
+
442
500
  /**
443
501
  * Create a detached session by validating and snapshotting borrowed seed
444
502
  * events and storage metadata.
@@ -446,14 +504,17 @@ declare class Session {
446
504
  * @param seed - optional borrowed replay or fork events.
447
505
  * @param header - optional borrowed storage metadata.
448
506
  * @param inheritedEventCount - exact fork-inherited prefix length for a seeded header.
507
+ * @param projections - pure interpreters for plugin-owned message changes.
449
508
  * @returns a detached session.
509
+ * @throws when a seed event requires a missing message interpreter or fails validation.
450
510
  */
451
511
  static create(
452
512
  id: SessionId,
453
513
  seed?: readonly SessionEvent[],
454
514
  header?: SessionHeader,
455
515
  inheritedEventCount?: SessionLogOffset,
456
- ): Session;
516
+ projections?: readonly SessionMessageProjection[],
517
+ ): Session;
457
518
  /**
458
519
  * Restore a detached session by adopting an independently owned or deeply frozen seed.
459
520
  * Runtime-required event fields, event envelopes, sequence continuity, surface
@@ -465,7 +526,9 @@ declare class Session {
465
526
  * @param header - independently owned storage metadata.
466
527
  * @param inheritedEventCount - exact fork-inherited prefix length decoded from storage.
467
528
  * @param eventState - aliasing state carried from the operation that produced the seed.
529
+ * @param projections - pure interpreters for plugin-owned message changes.
468
530
  * @returns a restored detached session.
531
+ * @throws when a seed event requires a missing message interpreter or fails validation.
469
532
  */
470
533
  static fromRestore(
471
534
  id: SessionId,
@@ -473,9 +536,12 @@ declare class Session {
473
536
  header: SessionHeader,
474
537
  inheritedEventCount: SessionLogOffset,
475
538
  eventState: SessionSeedEventState,
476
- ): Session;
539
+ projections?: readonly SessionMessageProjection[],
540
+ ): Session;
477
541
  /**
478
542
  * Return the immutable event stored at one exact sequence number.
543
+ * @deprecated Existing logic may remain unmigrated for now, but new calls are prohibited.
544
+ * See the [Agent Note](../../../../.agents/notes/implemented/architecture/2026-09-09-deprecate-synchronous-session-event-reads.md).
479
545
  * @param seq - event sequence number.
480
546
  * @returns the accepted event, or undefined when the log does not contain it.
481
547
  */
@@ -484,6 +550,8 @@ declare class Session {
484
550
  * Materialize an immutable snapshot of a half-open event sequence range.
485
551
  * A full current snapshot is reused until the next append; every previously
486
552
  * returned snapshot remains stable after later appends.
553
+ * @deprecated Existing logic may remain unmigrated for now, but new calls are prohibited.
554
+ * See the [Agent Note](../../../../.agents/notes/implemented/architecture/2026-09-09-deprecate-synchronous-session-event-reads.md).
487
555
  * @param fromSeq - non-negative inclusive sequence number; defaults to the log start.
488
556
  * @param toSeqExclusive - non-negative exclusive sequence number; defaults to the current end.
489
557
  * @returns a frozen array of the selected deeply frozen events.
@@ -491,9 +559,11 @@ declare class Session {
491
559
  snapshotEvents(
492
560
  fromSeq: SessionLogOffset = SessionLogOffset(0),
493
561
  toSeqExclusive: SessionLogOffset = this.seq,
494
- ): readonly SessionEvent[];
562
+ ): readonly SessionEvent[];
495
563
  /**
496
564
  * Return this Session's events after its fork-inherited prefix.
565
+ * @deprecated Existing logic may remain unmigrated for now, but new calls are prohibited.
566
+ * See the [Agent Note](../../../../.agents/notes/implemented/architecture/2026-09-09-deprecate-synchronous-session-event-reads.md).
497
567
  * @returns a fresh array containing child-owned events in log order.
498
568
  */
499
569
  ownEvents(): readonly SessionEvent[];
@@ -546,7 +616,7 @@ declare class Session {
546
616
  type: T,
547
617
  data: SessionEventMap[T],
548
618
  ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []
549
- ): SessionEvent<T>;
619
+ ): SessionEvent<T>;
550
620
  /**
551
621
  * The {@link EpochHeader} in force after the log's last header event — the
552
622
  * header the NEXT request will be compared against — or undefined before
@@ -562,6 +632,12 @@ declare class Session {
562
632
  * @returns the latest immutable route metadata.
563
633
  */
564
634
  requestContext(): RequestContext | undefined;
635
+ /**
636
+ * Fold unseen committed events into capability-independent tool history.
637
+ * Initial access reconstructs inherited history; later reads consume only new events.
638
+ * @returns an immutable snapshot for LLM request projection, including historical addition definitions.
639
+ */
640
+ toolHistory(): ToolHistory;
565
641
  /**
566
642
  * Derive the LLM message history by walking the ordered sequences of
567
643
  * message-producing events maintained by `surfaceOp` markers. The
@@ -569,21 +645,21 @@ declare class Session {
569
645
  * append records its `surfaceOp`, so a raw event with no marker (a chunk, a
570
646
  * turn boundary) is correctly absent, and a compaction `replace` deletes the
571
647
  * shadowed nodes from the derivation. The projection rules are
572
- * {@link deriveEventMessage}, folded per node.
648
+ * {@link deriveEventMessage}, with logged message projections applied
649
+ * without changing node membership or message identity.
573
650
  *
574
- * CACHED: each surface node is projected exactly once, when first seen — a
575
- * call costs O(new nodes), and a surface rewrite (a `replace`;
576
- * {@link SessionSurface.replaceGeneration}) rebuilds. The returned array is
651
+ * CACHED: pure tail growth costs O(new nodes); a replacement or message projection
652
+ * ({@link SessionSurface.contentGeneration}) rebuilds. The returned array is
577
653
  * a fresh snapshot per call (later appends never grow an array a caller
578
654
  * already holds); the `Message` objects in it are SHARED and **deep-frozen**.
579
- * Their content reuses the already frozen durable event data, so the cache
580
- * needs no second deep clone and consumers still cannot mutate the log.
655
+ * Unchanged content reuses frozen event data; projected blocks are frozen
656
+ * derived copies. Consumers cannot mutate the log through either form.
581
657
  * @returns a fresh array of the shared, frozen derived history.
582
658
  */
583
659
  deriveMessages(): Message[];
584
660
  /**
585
- * Instance face of the pure per-node `deriveEventMessage` export from
586
- * `surface.ts`.
661
+ * Project one event with all committed message projections applied.
662
+ * The original durable event remains unchanged.
587
663
  * @param event - the event to project.
588
664
  * @returns the derived message, or null when the event produces none.
589
665
  */
@@ -593,11 +669,11 @@ declare class Session {
593
669
 
594
670
  ## Derived history: `deriveMessages()` and `deriveEventMessage()`
595
671
 
596
- `Session.deriveMessages()` projects the event log into the `Message[]` the model sees — cached (each surface node projected once, when first seen; a surface rewrite rebuilds) and frozen (a fresh array per call over shared, deep-frozen messages, so mutating logged history through a projection is unrepresentable). `deriveEventMessage(event)` is the per-node pure function the fold applies — public so external reconstructors and the dev invariant project a log prefix with exactly the same rules and cannot disagree with the cache. The projection rules:
672
+ `Session.deriveMessages()` projects the event log into the `Message[]` the model sees — cached (each surface node projected once, when first seen; a surface rewrite rebuilds) and frozen (a fresh array per call over shared, deep-frozen messages, so mutating logged history through a projection is unrepresentable). `deriveEventMessage(event)` is the per-node pure function the fold applies — public so external reconstructors project a log prefix with exactly the same rules and cannot disagree with the cache. The projection rules:
597
673
 
598
674
  - `user/message` → a user message carrying exact `content`; an optional envelope remains log-only display metadata.
599
675
  - `assistant/message` → an assistant message with the provider and model that produced it plus optional adapter-private replay state. Its embedded compact stream is replay, usage, and UI evidence rather than a second message. An **empty-content** `assistant/message` is also skipped — a max-tokens step cut off with no content still records an `assistant/message` to hold its stream, usage, provider, and model, but a content-less assistant turn must not enter the provider transcript.
600
- - `tool/result` → a user message carrying a `tool-result` block.
676
+ - `tool/result` → a first-class tool-role message carrying its result content and tool-call identity.
601
677
  - `user/message` (injected context, i.e. non-`user` source) → a user-role message carrying its `content` verbatim at its chronological position; its typed source names the producer and carries any producer-specific data.
602
678
 
603
679
  Everything else (`turn/*`, `step/*`, `assistant/attempt`, plugin-owned `llm/retry`) is structural and does not project into a message. Token accounting expands the embedded stream on each `assistant/message` or `assistant/attempt`, while the message's top-level `usage` remains the committed-message authority when present. A failed model-request attempt therefore retains its provider usage without fabricating an assistant message. Current logical validation rejects request headers and assistant messages that omit provider/model instead of guessing a route; supported historical representations are normalized and validated by their adjacent format edge before a current Session exists.
@@ -608,7 +684,7 @@ Everything else (`turn/*`, `step/*`, `assistant/attempt`, plugin-owned `llm/retr
608
684
 
609
685
  - `fork(source, boundary?, childSessionId?)` accepts a live `Session` object or live `SessionId`, selects source events through the inclusive `SessionSeq` boundary (default: current last event), requires the selected prefix to end outside an open turn, then creates a live child session with deep-cloned seed events, `parentSession`, `isSeeded: true`, the exact `inheritedEventCount`, and inherited `cwd`.
610
686
 
611
- An explicit `boundary` lets callers fork from any stable between-turn position, including a previous `turn/end` or a later standalone log-only event, even if the source has newer events or an open current turn. The API rejects a prefix that ends inside an open turn instead of clipping silently. Broader execution-relation sanity stays in the existing `dsh-invariants` plugin and persistence repair path rather than being duplicated in `fork()`. `dsh-subagent-fork-in-process` keeps its completed-prefix clipping because tool-time delegation usually starts while the parent turn is open; ordinary session branching should make the requested boundary explicit.
687
+ An explicit `boundary` lets callers fork from any stable between-turn position, including a previous `turn/end` or a later standalone log-only event, even if the source has newer events or an open current turn. The API rejects a prefix that ends inside an open turn instead of clipping silently. `dsh-subagent-fork-in-process` keeps its completed-prefix clipping because tool-time delegation usually starts while the parent turn is open; ordinary session branching should make the requested boundary explicit.
612
688
 
613
689
  ## Why a turn ended: `TurnEndReasonMap`
614
690
 
@@ -644,20 +720,27 @@ interface TurnEndReasonMap {
644
720
  * the events recorded before the crash remain intact.
645
721
  */
646
722
  interrupted: { kind: 'interrupted' }
723
+ /**
724
+ * Fork-seed construction closed a turn that was still open at the fork
725
+ * boundary in the source session. Only fork seeds carry this marker — the
726
+ * loop never emits it — and the source events before the boundary remain
727
+ * intact in the child.
728
+ */
729
+ forked: { kind: 'forked' }
647
730
  }
648
731
  ```
649
732
 
650
- `max-tokens` mirrors the model-call `FinishReason` of the same name: any `max-tokens` step in a turn makes the whole turn end `max-tokens` rather than `completed` (the cut-short fact wins over a later continuation), so a consumer can tell a clean stop from a truncated one. Cancellation and errors remain distinct outcomes. `interrupted` is the one reason no loop emits—it is synthesized by crash recovery (see [persistence.md](./persistence.md)). The map is merge-extensible.
733
+ `max-tokens` mirrors the model-call `FinishReason` of the same name: any `max-tokens` step in a turn makes the whole turn end `max-tokens` rather than `completed` (the cut-short fact wins over a later continuation), so a consumer can tell a clean stop from a truncated one. Cancellation and errors remain distinct outcomes. The loop emits neither `interrupted` nor `forked` live: crash recovery synthesizes `interrupted` (see [persistence.md](./persistence.md)), while fork-seed construction synthesizes `forked`. The map is merge-extensible.
651
734
 
652
735
  ## Execution enclosure and standalone events
653
736
 
654
737
  A turn encloses one model-loop execution, not the whole session log. AgentLoop records injected `user/message` events only from entering pre-step batches inside a turn; plugin-owned log-only events may still appear between `turn/end` and the next `turn/start`, consuming event seqs without incrementing turn numbers. Persistence admits every contiguous accepted event into a bounded durable batch, while crash repair closes only a genuinely open trailing turn. A producer that needs an immediate durability barrier explicitly awaits `ctx.sessions.flush(session)`.
655
738
 
656
- The optional `dsh-session/invariant` companion enforces the relations owned by core: turn and step numbering, execution-event enclosure, and same-step tool call/result pairing. Merge-extensible event relations belong to the plugin that declares them, so core does not reject an unknown event merely because no turn is open. See [the standalone-event decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/simplification/2026-07-28-remove-synthetic-log-only-turns.md).
739
+ Merge-extensible event relations belong to the plugin that declares them, so core does not reject an unknown event merely because no turn is open. See [the standalone-event decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/simplification/2026-07-28-remove-synthetic-log-only-turns.md).
657
740
 
658
741
  ## The end-seed boundary: `session/end-seed`
659
742
 
660
- A fresh fork constructor requires its seed to equal the inherited prefix and appends `session/end-seed { inherited: true }` at the exact durable cut. A restore retains that tagged marker and appends an ordinary `session/end-seed {}` only when its complete stored seed does not already end in a marker. Both forms are log-only and produce no message; `Session`'s constructor is the only legitimate writer.
743
+ `buildForkSeed` appends `session/end-seed { inherited: true }` at the exact inherited-prefix cut before adding synthetic fork closers. The `Session` constructor retains that prepared marker or appends one when given only the inherited prefix. A restore retains the tagged marker and appends an ordinary `session/end-seed {}` only when its complete stored seed does not already end in a marker. Both forms are log-only and produce no message; only the constructor and `buildForkSeed` may create them.
661
744
 
662
745
  For fork lineage, locate the LAST marker whose payload carries `inherited: true`; current-format decoding requires it exactly when `SessionHeader.isSeeded` is true and derives `inheritedEventCount` from its seq. For lifecycle ownership, locate the last `session/end-seed` of either form. Reopening a seed that already ends in any marker does not append another ordinary marker.
663
746
 
@@ -667,12 +750,55 @@ Consumers that order Sessions by human activity exclude this boundary: picking a
667
750
 
668
751
  ## Plugin-contributed log-only events
669
752
 
670
- A plugin may declaration-merge extra `SessionEventMap` types. These are **log-only**: NOT `SurfaceEventType`s (they carry no `surfaceOp` and contribute nothing to derived history). Their owner decides whether they belong to an open execution turn or may stand between turns, and enforces any relation in its own invariant companion. The generated [persistence log event catalog](../persistence-catalog.md) enumerates every core and plugin-contributed event; the compaction seam's `compaction/*` semantics are discussed on [compaction.md](./compaction.md).
753
+ A plugin may declaration-merge extra `SessionEventMap` types. These are **log-only**: NOT `SurfaceEventType`s (they carry no `surfaceOp` and contribute nothing to derived history). Their owner decides whether they belong to an open execution turn or may stand between turns. The generated [persistence log event catalog](../persistence-catalog.md) enumerates every core and plugin-contributed event; the compaction seam's `compaction/*` semantics are discussed on [compaction.md](./compaction.md).
671
754
 
672
755
  When several events in one plugin-owned family assemble into one Web Client Conversation Node, every start, update, result, resource, or interruption event in that family carries or independently derives the same stable business id. This requirement applies to correlated Node families, not to every Session event; it lets the client group each event without guessing from adjacency or scanning history. See the [Conversation subsystem](./conversation.md).
673
756
 
674
757
  The hook bridges' `hook/invoked` / `hook/result` pairs (from `@deepseek-ai/dsh-hook-protocol`) correlate by `handlerId`. `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, and `Stop` fire inside the loop's open turn, so their `hook/*` records are turn-enclosed by construction. `SessionStart` gets no `hook/*` record because it runs before turn 1; its context remains pending in the inbox until a waking delivery opens a turn.
675
758
 
759
+ ### Plugin records
760
+
761
+ Experimental packages declare plugin-owned state in `PluginRecordMap`: `appendPluginRecord()` uses each declaration to type its name and payload, and appends an event marked `ignorable: true` in the `plugin:` namespace. `pluginRecordOf()` reads stored records with unknown payloads regardless of current declarations. The [experimental persistence catalog](../experimental-persistence-catalog.md) lists current declarations. The [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/README.md#write-experimental-plugin-records) owns the caller restriction, retention, and read path.
762
+
763
+ ```ts type-equiv
764
+ /**
765
+ * Event type of an experimental plugin record: `plugin:` followed by
766
+ * slash-separated segments of lowercase letters, digits, `.`, `_`, and `-`,
767
+ * each starting with a letter or digit. A record type is never a
768
+ * {@link SessionEventMap} member.
769
+ */
770
+ type PluginRecordType = `plugin:${string}`
771
+ ```
772
+
773
+ ```ts type-equiv
774
+ /**
775
+ * Payloads written by experimental packages, keyed by their `plugin:` record
776
+ * names. Packages augment this map to type writes and enter the current plugin
777
+ * record catalog; these declarations do not enter {@link SessionEventMap} or
778
+ * released persistence schemas. Stored records still require owner validation.
779
+ */
780
+ interface PluginRecordMap {}
781
+ ```
782
+
783
+ ```ts type-equiv
784
+ /**
785
+ * One committed experimental plugin record, read from the log by
786
+ * `pluginRecordOf`. The record's owner validates `data` before use, because a
787
+ * restored record carries whatever JSON an earlier build of its owner wrote,
788
+ * or a V3 event that a format migration renamed into the `plugin:` namespace held.
789
+ */
790
+ interface PluginRecord {
791
+ /** The record type, chosen by the owning plugin. */
792
+ readonly type: PluginRecordType
793
+ /** The record's position in the Session log. */
794
+ readonly seq: SessionSeq
795
+ /** Unix epoch milliseconds at append. */
796
+ readonly time: number
797
+ /** The JSON payload as committed. */
798
+ readonly data: unknown
799
+ }
800
+ ```
801
+
676
802
  ## Durability contract
677
803
 
678
804
  What a persistence backend relies on: the durable log persists every event losslessly, and every Assistant attempt is one `assistant/message` or `assistant/attempt` whose embedded compact stream preserves the original timed chunks. `seq` stays contiguous across these settlements and all interleaved events. A backend may choose its own storage framing for an event batch as long as a handle's `read()` returns the exact appended events; current JSONL writes one row per event (see [persistence.md](./persistence.md)). All `event.data` must be JSON-serializable; `Session.append` enforces this at the source (throwing on non-serializable data), so a bad event never enters the log and `session.snapshotEvents()` always equals what a backend can persist. Adding an event type that carries non-serializable data, corrupts core execution nesting, or violates its owner's declared relation is a breaking change to the on-disk format.
@@ -685,6 +811,8 @@ The backends that consume this contract are on [persistence.md](./persistence.md
685
811
 
686
812
  `SessionOpenWorkspacePathRequest` carries an absolute or workspace-resolved `path`; optional `action: "reveal"` selects file-manager navigation instead of default-application opening. `SessionOpenWorkspacePathValue` confirms that the Host accepted the native handoff. A Session-aware Client resolves relative paths against its current Session cwd when known; the controller hands the path to the opener unchanged and reports invalid requests, cancellation, and opener failures through the Session Remote error vocabulary.
687
813
 
814
+ The optional `application` selects a registered file handler without changing the system default; `workspacePathApplications({ path })` returns current handlers, names, icons, and default selection after Host path verification.
815
+
688
816
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
689
817
 
690
818
  <a id="cordis-surface"></a>
@@ -718,33 +846,41 @@ inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspectio
718
846
  /**
719
847
  * Read all visible Session rows without resuming an Agent.
720
848
  * @param _request - reserved empty list request.
721
- * @param signal - cancellation for persistence reads.
849
+ * @param signal - cancellation for persistence reads and summary generation.
722
850
  * @returns visible Session summaries ordered by activity.
723
851
  */
724
852
  @Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>
725
853
 
726
854
  /**
727
- * Search visible Session content without resuming an Agent.
855
+ * Search visible Session content without resuming an Agent. A non-owner
856
+ * receives only the hits whose Session `allows()` admits; `hasMore`
857
+ * describes the bounded result before that filtering.
728
858
  * @param request - literal message-content query.
729
859
  * @param signal - cancellation for list and search reads.
730
860
  * @returns authorized bounded Session search results.
731
861
  */
732
- @Remote('search') search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>
862
+ @Remote('search') async search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>
733
863
 
734
864
  /**
735
- * Create or idempotently adopt one ordinary Session.
736
- * @param request - requested identity, location, and Agent preset.
737
- * @returns the Session identity and resolved preset when configured.
865
+ * Create one ordinary Session for a new conversation, reusing the named blank Session while it is reusable.
866
+ * @param request - optional blank Session to reuse, location, and Agent preset.
867
+ * @returns the created or reused Session identity and its preset when configured.
738
868
  */
739
869
  @Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>
740
870
 
741
871
  /**
742
- * Select one Session-local model after explicitly resuming the Session.
872
+ * Select one Session-local model after explicitly resuming the Session; save the default in the background.
743
873
  * @param request - Session identity and requested model selection.
744
- * @returns the normalized selection installed for the Session.
874
+ * @returns the normalized selection installed for the Session, without waiting for default persistence.
745
875
  */
746
876
  @Remote('selectModel') selectModel(request: SessionSelectModelRequest): Promise<SessionSelectModelValue>
747
877
 
878
+ /**
879
+ * Select the first available account model after login when no provider API key is configured.
880
+ * @returns after saving the first available model or retaining the existing default.
881
+ */
882
+ @Remote async initializeDefaultModel(): Promise<void>
883
+
748
884
  /**
749
885
  * Describe every currently routable model for Host-generation selectors.
750
886
  * @returns provider-grouped models, the deployment default, and isolated provider failures.
@@ -764,14 +900,23 @@ inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspectio
764
900
  workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' | 'explorer' | 'directory' | null }
765
901
 
766
902
  /**
767
- * Open one path prepared by a Session-aware caller on the Host desktop.
903
+ * Verify one path through the composed filesystem and open it on the Host desktop.
768
904
  * @param request - path after best-effort Session workspace resolution.
769
905
  * @param signal - caller lifetime; abort terminates the native command.
770
906
  * @returns confirmation after the native opener accepts the path.
771
- * @throws RemoteError when the request is invalid, cancelled, or the opener fails.
907
+ * @throws RemoteError when the request is invalid, has no verified Host mapping, is cancelled, or the opener fails.
772
908
  */
773
909
  @Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>
774
910
 
911
+ /**
912
+ * Query current file handlers on the serving desktop without activating an Agent.
913
+ * @param request - file path in Host filesystem syntax.
914
+ * @param signal - caller lifetime, propagated to filesystem and desktop queries.
915
+ * @returns OS application names, icons, and default selection; empty when desktop opening is unavailable.
916
+ * @throws RemoteError when the path is invalid, the query is cancelled, or native discovery fails.
917
+ */
918
+ @Remote('workspacePathApplications') async workspacePathApplications( request: { readonly path: string }, signal: AbortSignal, ): Promise<readonly SessionWorkspacePathApplication[]>
919
+
775
920
  /**
776
921
  * Rename one Session after explicitly resuming it.
777
922
  * @param request - Session identity and proposed title.
@@ -780,11 +925,13 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
780
925
  @Remote('rename') rename(request: SessionRenameRequest): Promise<SessionRenameValue>
781
926
 
782
927
  /**
783
- * Fork one cold-readable completed-turn prefix into a new Session.
784
- * @param request - source Session and optional event anchor.
928
+ * Fork one cold-readable exact event prefix into a new Session. An omitted
929
+ * boundary selects the latest completed-turn prefix; an open cut receives
930
+ * synthetic fork closers.
931
+ * @param request - source Session, optional exact inclusive event boundary, and migration preflight choice.
785
932
  * @returns the new Session identity.
786
933
  */
787
- @Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>
934
+ @Remote('fork') async fork(request: SessionForkRequest): Promise<SessionForkValue>
788
935
 
789
936
  /**
790
937
  * Admit one prompt after explicitly resuming its Session.
@@ -792,7 +939,7 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
792
939
  * @param signal - caller cancellation before prompt admission begins.
793
940
  * @returns acknowledgement that the Agent accepted the prompt.
794
941
  */
795
- @Remote('prompt') prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>
942
+ @Remote('prompt') async prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>
796
943
 
797
944
  /**
798
945
  * Read one image proven reachable from the addressed Session log.
@@ -802,11 +949,11 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
802
949
  @Remote('attachment') attachment(request: SessionAttachmentRequest): Promise<SessionAttachmentValue>
803
950
 
804
951
  /**
805
- * Mutate one still-pending queue occurrence on a live Agent.
952
+ * Mutate one still-pending queue occurrence, resuming a cold Agent first.
806
953
  * @param request - Session, queue item, and requested mutation.
807
954
  * @returns acknowledgement that the queue mutation was applied.
808
955
  */
809
- @Remote('updateQueue') updateQueue(request: SessionUpdateQueueRequest): SessionUpdateQueueValue
956
+ @Remote('updateQueue') updateQueue(request: SessionUpdateQueueRequest): Promise<SessionUpdateQueueValue>
810
957
 
811
958
  /**
812
959
  * Cancel one active Agent turn without dropping its pending inbox.
@@ -821,7 +968,7 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
821
968
  * @param signal - cancellation for persistence reads.
822
969
  * @returns one chronological page.
823
970
  */
824
- @Remote('page') page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>
971
+ @Remote({ name: 'page', resources: { session: addressedSession } }) page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>
825
972
 
826
973
  /**
827
974
  * Follow one Session log from its opening or resume cursor.
@@ -830,14 +977,22 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
830
977
  * @returns a complete opening snapshot followed by gap-free durable event
831
978
  * frames and optional cursorless assistant-stream frames.
832
979
  */
833
- @Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>
980
+ @Remote({ mode: 'stream', resources: { session: addressedSession } }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>
981
+
982
+ /**
983
+ * Read exact projections, returning cached hints only when migration is required.
984
+ * @param request - Session whose current values are required.
985
+ * @param signal - cancellation for the Session read.
986
+ * @returns a sequenced baseline, cached hints when migration is deferred, or null when absent.
987
+ */
988
+ @Remote('projections') async projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>
834
989
 
835
990
  /**
836
991
  * Stream a complete live-control baseline followed by replacement frames.
837
992
  * @param signal - cancellation owned by the Remote stream carrier.
838
993
  * @returns one complete baseline followed by live replacement frames.
839
994
  */
840
- @Remote({ mode: 'stream' }) control(signal: AbortSignal): AsyncIterable<SessionControlFrame>
995
+ @Remote({ mode: 'stream' }) async *control(signal: AbortSignal): AsyncIterable<SessionControlFrame>
841
996
  ```
842
997
 
843
998
  Types: [SessionId](./core.md) · [SessionInspection](./persistence.md) · [SessionSearchRequest](./session-query.md)
@@ -853,6 +1008,15 @@ In-memory session store (`ctx.sessions`).
853
1008
  Persistence is intentionally not implemented here — the agent lifecycle attaches a session-log writer to each published session's write handle; a session published outside that lifecycle persists nothing.
854
1009
 
855
1010
  ```ts cordis-catalog
1011
+ /**
1012
+ * Register one event interpreter for live creation, restore, and fork.
1013
+ * Disposing the contribution makes sessions that used it refuse further derivation.
1014
+ * @param projection - pure definition owned by the event's plugin.
1015
+ * @returns the fiber-owned disposer.
1016
+ * @throws when another definition already owns this event type.
1017
+ */
1018
+ registerMessageProjection(projection: SessionMessageProjection): () => Promise<void>
1019
+
856
1020
  /**
857
1021
  * Create a session owned by the calling fiber: disposing that fiber stops
858
1022
  * event notification and removes the session from the store. `options.seed`
@@ -936,8 +1100,8 @@ announce(session: Session): void
936
1100
  * store owns the carrier, so callers (the checkpoint policy's per-request
937
1101
  * barrier, goal-round-driver's idle checkpoint, teardown drains, and consumers
938
1102
  * that flush themselves before reading storage) must come through here
939
- * rather than dispatch a raw `ctx.parallel('session/flush', …)` — one owner,
940
- * one spelling, and the scoped-dispatch invariant can pin it.
1103
+ * rather than dispatch a raw `ctx.parallel('session/flush', …)` — one owner
1104
+ * and one spelling.
941
1105
  * @param session - the session whose buffered events must reach durable storage.
942
1106
  * @returns whether at least one durability listener participated, after every
943
1107
  * listener has settled successfully.
@@ -959,10 +1123,12 @@ get(id: SessionId): Session | undefined
959
1123
  list(): Session[]
960
1124
 
961
1125
  /**
962
- * Create a live child session from a stable prefix of a live source.
1126
+ * Create a live child session from an exact prefix of a live source.
963
1127
  * `boundary` is an inclusive source event seq; omitted means the source's
964
- * current last event. The selected slice may end with a between-turn event
965
- * but must not end inside an open turn.
1128
+ * current last event. An open tail receives synthetic tool results and
1129
+ * step/turn closers with the forked cause. Closed steps and turns remain
1130
+ * unchanged, including any failed tool calls already missing results.
1131
+ * `inheritedEventCount` counts only copied source events, excluding these closers.
966
1132
  *
967
1133
  * @param source - Live source session object or id.
968
1134
  * @param boundary - Inclusive source event seq to fork through; omitted means
@@ -1007,13 +1173,14 @@ Source: [`packages/api/session-controller/src/types.ts`](https://github.com/deep
1007
1173
 
1008
1174
  #### `api-session/added` — emit
1009
1175
 
1010
- A Session became visible to Session list consumers.
1176
+ A Session became visible or its Agent was created or disposed. Consumers upsert the summary and replace its current running and availability state.
1011
1177
 
1012
1178
  ```ts cordis-catalog
1013
1179
  /**
1014
- * A Session became visible to Session list consumers.
1180
+ * A Session became visible or its Agent was created or disposed.
1181
+ * Consumers upsert the summary and replace its current running and availability state.
1015
1182
  * @mode emit
1016
- * @param summary - initial list row for the Session.
1183
+ * @param summary - current list row for the Session.
1017
1184
  */
1018
1185
  'api-session/added'(summary: SessionSummary): void
1019
1186
  ```
@@ -1098,7 +1265,6 @@ Creation announcement during session publication. A synchronous throw vetoes and
1098
1265
  * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners
1099
1266
  * receive only sessions entered through that agent's context.
1100
1267
  * @param session - the session just entered and announced.
1101
- * @dshScopeScan unsupported
1102
1268
  * @mode emit
1103
1269
  */
1104
1270
  'session/created'(this: Scoped<Session>, session: Session): void
@@ -1121,7 +1287,6 @@ Emitted once when an announced session leaves the store, including publication r
1121
1287
  * did not begin. Listener failures are logged and contained.
1122
1288
  * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`) reuses the owner scope.
1123
1289
  * @param session - the session that is no longer live in the store.
1124
- * @dshScopeScan unsupported
1125
1290
  * @mode emit
1126
1291
  */
1127
1292
  'session/disposed'(this: Scoped<Session>, session: Session): void
@@ -1146,7 +1311,6 @@ Post-commit, fire-and-forget append feed. The listener snapshot resolves before
1146
1311
  * receive only events from sessions entered through that agent's context.
1147
1312
  * @param session - the session whose log grew.
1148
1313
  * @param event - the appended event, exactly as recorded.
1149
- * @dshScopeScan unsupported
1150
1314
  * @mode emit
1151
1315
  */
1152
1316
  'session/event'(this: Scoped<Session>, session: Session, event: SessionEvent): void
@@ -1168,7 +1332,6 @@ Awaited parallel durability checkpoint: every listener runs and the caller await
1168
1332
  * caller awaits all of them, with no waterfall veto. Scope-filtered dispatch
1169
1333
  * (`@deepseek-ai/dsh-scope`) reuses the session's owner scope.
1170
1334
  * @param session - the session whose buffered events must reach durable storage.
1171
- * @dshScopeScan unsupported
1172
1335
  * @mode parallel
1173
1336
  */
1174
1337
  'session/flush'(this: Scoped<Session>, session: Session): Promise<void> | void