dsh-plugin-guide 0.3.1 โ†’ 0.3.3

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 (371) hide show
  1. package/README.es.md +1 -1
  2. package/README.hi.md +1 -1
  3. package/README.md +1 -1
  4. package/README.pt.md +1 -1
  5. package/README.zh.md +1 -1
  6. package/SKILL.md +1 -1
  7. package/dist/dsh-plugin-dev.js +5 -5
  8. package/guide/links.md +1 -1
  9. package/guide/plugin-dev-guide.md +1 -1
  10. package/guide/quick-reference.es.md +2 -2
  11. package/guide/quick-reference.hi.md +1 -1
  12. package/guide/quick-reference.md +2 -2
  13. package/guide/quick-reference.pt.md +2 -2
  14. package/guide/quick-reference.zh-CN.md +2 -2
  15. package/package.json +3 -3
  16. package/references/cordis-paper-and-community.md +1 -1
  17. package/references/official-docs/AGENTS.md +28 -23
  18. package/references/official-docs/README.i18n.yaml +2 -2
  19. package/references/official-docs/README.md +1 -1
  20. package/references/official-docs/README.zh.md +19 -9
  21. package/references/official-docs/SNAPSHOT.md +5 -5
  22. package/references/official-docs/THIRD_PARTY_NOTICES.md +36 -13
  23. package/references/official-docs/docs/AGENTS.md +4 -4
  24. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  25. package/references/official-docs/docs/agent-lifecycle.md +1 -1
  26. package/references/official-docs/docs/agent-lifecycle.zh.md +2 -2
  27. package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
  28. package/references/official-docs/docs/api-gateway.md +8 -8
  29. package/references/official-docs/docs/api-gateway.zh.md +8 -8
  30. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  31. package/references/official-docs/docs/architecture.md +25 -8
  32. package/references/official-docs/docs/architecture.zh.md +38 -21
  33. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  34. package/references/official-docs/docs/capability-seams.md +134 -67
  35. package/references/official-docs/docs/capability-seams.zh.md +134 -67
  36. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  37. package/references/official-docs/docs/config-catalog.md +731 -403
  38. package/references/official-docs/docs/config-catalog.zh.md +747 -419
  39. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
  40. package/references/official-docs/docs/cookbook/adding-a-package.md +3 -4
  41. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +9 -8
  42. package/references/official-docs/docs/cookbook/{adding-a-conversation-node.i18n.yaml โ†’ adding-a-remote-api.i18n.yaml} +3 -3
  43. package/references/official-docs/docs/cookbook/adding-a-remote-api.md +197 -0
  44. package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +197 -0
  45. package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +6 -0
  46. package/references/official-docs/docs/cookbook/adding-a-settings-card.md +102 -0
  47. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +102 -0
  48. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
  49. package/references/official-docs/docs/cookbook/adding-a-tool.md +11 -4
  50. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +16 -9
  51. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
  52. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +2 -2
  53. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +4 -4
  54. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +2 -2
  55. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +1 -1
  56. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +3 -3
  57. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  58. package/references/official-docs/docs/cookbook/extension-cookbook.md +9 -8
  59. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +17 -14
  60. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +1 -1
  61. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +1 -1
  62. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +1 -1
  63. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  64. package/references/official-docs/docs/cordis-api/context.i18n.yaml +1 -1
  65. package/references/official-docs/docs/cordis-api/context.zh.md +1 -1
  66. package/references/official-docs/docs/cordis-api/events.i18n.yaml +1 -1
  67. package/references/official-docs/docs/cordis-api/events.zh.md +1 -1
  68. package/references/official-docs/docs/cordis-api/inherited.md +1 -1
  69. package/references/official-docs/docs/cordis-primer.i18n.yaml +2 -2
  70. package/references/official-docs/docs/cordis-primer.md +2 -1
  71. package/references/official-docs/docs/cordis-primer.zh.md +3 -2
  72. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +1 -1
  73. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +4 -4
  74. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +1 -1
  75. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +4 -4
  76. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +1 -1
  77. package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +4 -4
  78. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +1 -1
  79. package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +4 -4
  80. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +1 -1
  81. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +2 -2
  82. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +1 -1
  83. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +3 -3
  84. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +2 -2
  85. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +5 -4
  86. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +11 -10
  87. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +1 -1
  88. package/references/official-docs/docs/cordis-tutorial/index.zh.md +10 -10
  89. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +6 -0
  90. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +159 -0
  91. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +159 -0
  92. package/references/official-docs/docs/defensive-patterns.i18n.yaml +1 -1
  93. package/references/official-docs/docs/defensive-patterns.zh.md +3 -1
  94. package/references/official-docs/docs/development.i18n.yaml +2 -2
  95. package/references/official-docs/docs/development.md +9 -13
  96. package/references/official-docs/docs/development.zh.md +23 -21
  97. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  98. package/references/official-docs/docs/event-producer-consumer.md +55 -46
  99. package/references/official-docs/docs/event-producer-consumer.zh.md +55 -46
  100. package/references/official-docs/docs/glossary.i18n.yaml +2 -2
  101. package/references/official-docs/docs/glossary.md +1 -1
  102. package/references/official-docs/docs/glossary.zh.md +1 -1
  103. package/references/official-docs/docs/graph-atlas.i18n.yaml +2 -2
  104. package/references/official-docs/docs/graph-atlas.md +0 -2
  105. package/references/official-docs/docs/graph-atlas.zh.md +7 -9
  106. package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
  107. package/references/official-docs/docs/i18n/README.md +7 -7
  108. package/references/official-docs/docs/i18n/README.zh.md +11 -9
  109. package/references/official-docs/docs/i18n/style-samples.md +3 -3
  110. package/references/official-docs/docs/i18n/translation-prompt.md +3 -3
  111. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +2 -2
  112. package/references/official-docs/docs/i18n/translation-rules.md +2 -2
  113. package/references/official-docs/docs/i18n/translation-rules.zh.md +3 -3
  114. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  115. package/references/official-docs/docs/module-graph.md +660 -909
  116. package/references/official-docs/docs/module-graph.zh.md +662 -911
  117. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  118. package/references/official-docs/docs/persistence-catalog.md +185 -53
  119. package/references/official-docs/docs/persistence-catalog.zh.md +193 -61
  120. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +2 -2
  121. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +2 -2
  122. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +3 -3
  123. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +2 -2
  124. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +2 -2
  125. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +2 -2
  126. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +2 -2
  127. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +2 -2
  128. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +2 -2
  129. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +2 -2
  130. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +1 -1
  131. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +2 -2
  132. package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
  133. package/references/official-docs/docs/postmortem/README.zh.md +5 -5
  134. package/references/official-docs/docs/rescope.i18n.yaml +2 -2
  135. package/references/official-docs/docs/rescope.md +2 -2
  136. package/references/official-docs/docs/rescope.zh.md +3 -3
  137. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  138. package/references/official-docs/docs/subsystems/README.md +8 -2
  139. package/references/official-docs/docs/subsystems/README.zh.md +53 -47
  140. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +6 -0
  141. package/references/official-docs/docs/subsystems/agent-team.md +207 -0
  142. package/references/official-docs/docs/subsystems/agent-team.zh.md +207 -0
  143. package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
  144. package/references/official-docs/docs/subsystems/approval.md +12 -12
  145. package/references/official-docs/docs/subsystems/approval.zh.md +13 -13
  146. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  147. package/references/official-docs/docs/subsystems/attachment.md +90 -7
  148. package/references/official-docs/docs/subsystems/attachment.zh.md +90 -7
  149. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
  150. package/references/official-docs/docs/subsystems/client-modules.md +69 -19
  151. package/references/official-docs/docs/subsystems/client-modules.zh.md +69 -19
  152. package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
  153. package/references/official-docs/docs/subsystems/code-runtime.md +12 -8
  154. package/references/official-docs/docs/subsystems/code-runtime.zh.md +13 -9
  155. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  156. package/references/official-docs/docs/subsystems/commands.md +30 -7
  157. package/references/official-docs/docs/subsystems/commands.zh.md +31 -8
  158. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  159. package/references/official-docs/docs/subsystems/compaction.md +14 -14
  160. package/references/official-docs/docs/subsystems/compaction.zh.md +19 -19
  161. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +6 -0
  162. package/references/official-docs/docs/{cookbook/adding-a-conversation-node.md โ†’ subsystems/conversation.md} +49 -24
  163. package/references/official-docs/docs/{cookbook/adding-a-conversation-node.zh.md โ†’ subsystems/conversation.zh.md} +49 -24
  164. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  165. package/references/official-docs/docs/subsystems/core.md +114 -36
  166. package/references/official-docs/docs/subsystems/core.zh.md +145 -65
  167. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +2 -2
  168. package/references/official-docs/docs/subsystems/credentials.md +207 -11
  169. package/references/official-docs/docs/subsystems/credentials.zh.md +207 -11
  170. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +2 -2
  171. package/references/official-docs/docs/subsystems/extensions.md +27 -9
  172. package/references/official-docs/docs/subsystems/extensions.zh.md +30 -12
  173. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
  174. package/references/official-docs/docs/subsystems/feedback.md +6 -6
  175. package/references/official-docs/docs/subsystems/feedback.zh.md +6 -6
  176. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
  177. package/references/official-docs/docs/subsystems/filesystem.md +17 -7
  178. package/references/official-docs/docs/subsystems/filesystem.zh.md +19 -9
  179. package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
  180. package/references/official-docs/docs/subsystems/goal.md +4 -4
  181. package/references/official-docs/docs/subsystems/goal.zh.md +8 -8
  182. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
  183. package/references/official-docs/docs/subsystems/invariants.md +2 -2
  184. package/references/official-docs/docs/subsystems/invariants.zh.md +5 -5
  185. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
  186. package/references/official-docs/docs/subsystems/jobs.md +3 -3
  187. package/references/official-docs/docs/subsystems/jobs.zh.md +6 -6
  188. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  189. package/references/official-docs/docs/subsystems/llm-streaming.md +193 -22
  190. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +199 -28
  191. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
  192. package/references/official-docs/docs/subsystems/lsp.md +2 -2
  193. package/references/official-docs/docs/subsystems/lsp.zh.md +3 -3
  194. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
  195. package/references/official-docs/docs/subsystems/permission-presets.md +8 -8
  196. package/references/official-docs/docs/subsystems/permission-presets.zh.md +8 -8
  197. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  198. package/references/official-docs/docs/subsystems/persistence.md +183 -173
  199. package/references/official-docs/docs/subsystems/persistence.zh.md +182 -172
  200. package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
  201. package/references/official-docs/docs/subsystems/plan.md +4 -4
  202. package/references/official-docs/docs/subsystems/plan.zh.md +10 -10
  203. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
  204. package/references/official-docs/docs/subsystems/sandbox.md +5 -3
  205. package/references/official-docs/docs/subsystems/sandbox.zh.md +8 -6
  206. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
  207. package/references/official-docs/docs/subsystems/schedule.md +9 -3
  208. package/references/official-docs/docs/subsystems/schedule.zh.md +11 -5
  209. package/references/official-docs/docs/subsystems/scope.i18n.yaml +1 -1
  210. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  211. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  212. package/references/official-docs/docs/subsystems/session-projection.md +148 -75
  213. package/references/official-docs/docs/subsystems/session-projection.zh.md +148 -75
  214. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
  215. package/references/official-docs/docs/subsystems/session-query.md +30 -16
  216. package/references/official-docs/docs/subsystems/session-query.zh.md +31 -17
  217. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  218. package/references/official-docs/docs/subsystems/session-reference.md +94 -7
  219. package/references/official-docs/docs/subsystems/session-reference.zh.md +95 -8
  220. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  221. package/references/official-docs/docs/subsystems/session-telemetry.md +5 -6
  222. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +9 -10
  223. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
  224. package/references/official-docs/docs/subsystems/session-title.md +8 -8
  225. package/references/official-docs/docs/subsystems/session-title.zh.md +10 -10
  226. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  227. package/references/official-docs/docs/subsystems/session.md +376 -71
  228. package/references/official-docs/docs/subsystems/session.zh.md +392 -85
  229. package/references/official-docs/docs/subsystems/settings.i18n.yaml +2 -2
  230. package/references/official-docs/docs/subsystems/settings.md +105 -10
  231. package/references/official-docs/docs/subsystems/settings.zh.md +105 -10
  232. package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
  233. package/references/official-docs/docs/subsystems/shell.md +3 -3
  234. package/references/official-docs/docs/subsystems/shell.zh.md +11 -11
  235. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  236. package/references/official-docs/docs/subsystems/skills.md +26 -3
  237. package/references/official-docs/docs/subsystems/skills.zh.md +29 -6
  238. package/references/official-docs/docs/subsystems/slots.i18n.yaml +6 -0
  239. package/references/official-docs/docs/subsystems/slots.md +175 -0
  240. package/references/official-docs/docs/subsystems/slots.zh.md +175 -0
  241. package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
  242. package/references/official-docs/docs/subsystems/spill.md +4 -4
  243. package/references/official-docs/docs/subsystems/spill.zh.md +6 -6
  244. package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
  245. package/references/official-docs/docs/subsystems/storage.md +38 -7
  246. package/references/official-docs/docs/subsystems/storage.zh.md +41 -10
  247. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  248. package/references/official-docs/docs/subsystems/subagent.md +148 -116
  249. package/references/official-docs/docs/subsystems/subagent.zh.md +158 -124
  250. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
  251. package/references/official-docs/docs/subsystems/subprocess.md +3 -3
  252. package/references/official-docs/docs/subsystems/subprocess.zh.md +5 -5
  253. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  254. package/references/official-docs/docs/subsystems/system-prompt.md +21 -8
  255. package/references/official-docs/docs/subsystems/system-prompt.zh.md +23 -10
  256. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +2 -2
  257. package/references/official-docs/docs/subsystems/terminal.md +2 -2
  258. package/references/official-docs/docs/subsystems/terminal.zh.md +4 -4
  259. package/references/official-docs/docs/subsystems/todo.i18n.yaml +6 -0
  260. package/references/official-docs/docs/subsystems/todo.md +32 -0
  261. package/references/official-docs/docs/subsystems/todo.zh.md +32 -0
  262. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
  263. package/references/official-docs/docs/subsystems/token-meter.md +29 -14
  264. package/references/official-docs/docs/subsystems/token-meter.zh.md +30 -15
  265. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  266. package/references/official-docs/docs/subsystems/tools.md +46 -46
  267. package/references/official-docs/docs/subsystems/tools.zh.md +54 -54
  268. package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
  269. package/references/official-docs/docs/subsystems/typert.md +65 -58
  270. package/references/official-docs/docs/subsystems/typert.zh.md +67 -60
  271. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
  272. package/references/official-docs/docs/subsystems/user-questions.md +35 -35
  273. package/references/official-docs/docs/subsystems/user-questions.zh.md +35 -35
  274. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +6 -0
  275. package/references/official-docs/docs/subsystems/web-client.md +95 -0
  276. package/references/official-docs/docs/subsystems/web-client.zh.md +95 -0
  277. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
  278. package/references/official-docs/docs/subsystems/web-server.md +55 -9
  279. package/references/official-docs/docs/subsystems/web-server.zh.md +56 -10
  280. package/references/official-docs/docs/subsystems/web.i18n.yaml +2 -2
  281. package/references/official-docs/docs/subsystems/web.md +14 -7
  282. package/references/official-docs/docs/subsystems/web.zh.md +16 -9
  283. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +6 -0
  284. package/references/official-docs/docs/subsystems/webhook.md +70 -0
  285. package/references/official-docs/docs/subsystems/webhook.zh.md +70 -0
  286. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  287. package/references/official-docs/docs/subsystems/workflow.md +8 -8
  288. package/references/official-docs/docs/subsystems/workflow.zh.md +13 -13
  289. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  290. package/references/official-docs/docs/subsystems/workspace.md +98 -5
  291. package/references/official-docs/docs/subsystems/workspace.zh.md +102 -9
  292. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  293. package/references/official-docs/docs/testing.md +15 -10
  294. package/references/official-docs/docs/testing.zh.md +15 -10
  295. package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
  296. package/references/official-docs/docs/tool-catalog.md +413 -61
  297. package/references/official-docs/docs/tool-catalog.zh.md +418 -63
  298. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
  299. package/references/official-docs/docs/tool-execution-pipeline.md +1 -1
  300. package/references/official-docs/docs/tool-execution-pipeline.zh.md +1 -1
  301. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +2 -2
  302. package/references/official-docs/docs/user/develop/basic/config.md +1 -1
  303. package/references/official-docs/docs/user/develop/basic/config.zh.md +4 -4
  304. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +1 -1
  305. package/references/official-docs/docs/user/develop/basic/index.zh.md +5 -5
  306. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
  307. package/references/official-docs/docs/user/develop/basic/publish.md +3 -3
  308. package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -7
  309. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +2 -2
  310. package/references/official-docs/docs/user/develop/basic/tool.md +3 -3
  311. package/references/official-docs/docs/user/develop/basic/tool.zh.md +4 -4
  312. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +2 -2
  313. package/references/official-docs/docs/user/develop/framework/events.md +2 -2
  314. package/references/official-docs/docs/user/develop/framework/events.zh.md +3 -3
  315. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +1 -1
  316. package/references/official-docs/docs/user/develop/framework/index.zh.md +3 -3
  317. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +2 -2
  318. package/references/official-docs/docs/user/develop/framework/service.md +1 -1
  319. package/references/official-docs/docs/user/develop/framework/service.zh.md +3 -3
  320. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +6 -0
  321. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +15 -0
  322. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
  323. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +2 -2
  324. package/references/official-docs/docs/user/develop/practice/index.md +1 -1
  325. package/references/official-docs/docs/user/develop/practice/index.zh.md +3 -3
  326. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +2 -2
  327. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +4 -3
  328. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +4 -3
  329. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +6 -0
  330. package/references/official-docs/docs/user/guide/github-review.md +102 -0
  331. package/references/official-docs/docs/user/guide/github-review.zh.md +102 -0
  332. package/references/official-docs/docs/user/guide/index.i18n.yaml +2 -2
  333. package/references/official-docs/docs/user/guide/index.md +2 -2
  334. package/references/official-docs/docs/user/guide/index.zh.md +8 -8
  335. package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +6 -0
  336. package/references/official-docs/docs/user/guide/mcp-memory.md +101 -0
  337. package/references/official-docs/docs/user/guide/mcp-memory.zh.md +101 -0
  338. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  339. package/references/official-docs/docs/user/guide/providers.md +40 -1
  340. package/references/official-docs/docs/user/guide/providers.zh.md +41 -2
  341. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
  342. package/references/official-docs/docs/user/guide/python-sdk.md +80 -34
  343. package/references/official-docs/docs/user/guide/python-sdk.zh.md +87 -41
  344. package/references/official-docs/docs/user/guide/schedule.i18n.yaml +6 -0
  345. package/references/official-docs/docs/user/guide/schedule.md +21 -0
  346. package/references/official-docs/docs/user/guide/schedule.zh.md +21 -0
  347. package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
  348. package/references/official-docs/docs/web-styling.md +3 -0
  349. package/references/official-docs/docs/web-styling.zh.md +5 -2
  350. package/references/official-docs/packages/AGENTS.md +4 -3
  351. package/references/official-docs/packages/README.md +104 -59
  352. package/references/official-docs/vendor/README.md +1 -0
  353. package/references/official-docs/website-docs.ts +52 -11
  354. package/references/sources.md +2 -2
  355. package/references/website-pages.md +3 -3
  356. package/scripts/download-sources.ps1 +1 -1
  357. package/scripts/sync-official-docs.ps1 +19 -11
  358. package/scripts/verify-kit.ps1 +0 -4
  359. package/templates/js/README.es.md +1 -1
  360. package/templates/js/README.hi.md +1 -1
  361. package/templates/js/README.md +1 -1
  362. package/templates/js/README.pt.md +1 -1
  363. package/templates/js/README.zh.md +1 -1
  364. package/templates/js/package.json +4 -4
  365. package/templates/ts/README.es.md +1 -1
  366. package/templates/ts/README.hi.md +1 -1
  367. package/templates/ts/README.md +1 -1
  368. package/templates/ts/README.pt.md +1 -1
  369. package/templates/ts/README.zh.md +1 -1
  370. package/templates/ts/package.json +4 -4
  371. package/references/official-docs/examples/AGENTS.md +0 -20
@@ -59,15 +59,19 @@ interface SessionEventMap {
59
59
  * Assembled assistant message for one step (derived history uses this).
60
60
  * Carries the step's `usage` when the adapter reported token accounting, so
61
61
  * the model output and its accounting travel together (there is no separate
62
- * usage record). `usage` is absent when the adapter reported none.
62
+ * usage record). `usage` is absent when the adapter reported none. A turn
63
+ * cancelled mid-stream finalizes its delivered text/reasoning prefix as this
64
+ * event with `interrupted: true`; undispatched tool calls are absent. The
65
+ * marker distinguishes that prefix without re-deriving interruption from turn
66
+ * boundaries. An aborted turn with no such event streamed no visible content.
63
67
  */
64
- 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage }
68
+ 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true }
65
69
  /**
66
70
  * The model requested one tool invocation: `name` with the raw `arguments`
67
71
  * JSON string exactly as the model produced it (unparsed). `callId` pairs the
68
72
  * call with its `tool/result`.
69
73
  */
70
- 'tool/call': { turn: number; step: number; callId: CallId; name: string; arguments: string }
74
+ 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string }
71
75
  /**
72
76
  * A completed tool call's model-facing result, optional internal failure
73
77
  * identity, and optional tool-private `meta` presentation payload. `meta` is
@@ -86,13 +90,16 @@ interface SessionEventMap {
86
90
  error?: { name: string; code: string }
87
91
  meta?: JsonValue
88
92
  }
89
- /** Whole-list snapshot; latest write wins on replay. Log-only UI state; never derived history. */
90
- 'todo/write': { todos: TodoItem[] }
91
93
  /**
92
94
  * Full header for the next request, appended inside its step before dispatch.
93
95
  * It is log-only; the latest snapshot reconstructs the request header.
94
96
  */
95
- 'request/header': { header: EpochHeader; reason: RequestHeaderReason }
97
+ 'request/header': {
98
+ header: EpochHeader
99
+ reason: RequestHeaderReason
100
+ /** A changed header also begins a distinct model-message series. */
101
+ startsSeries?: true
102
+ }
96
103
  /**
97
104
  * Route metadata for the next request, logged only when the route or capacity
98
105
  * changes. It does not participate in request reconstruction or header equality.
@@ -126,34 +133,11 @@ interface SessionEventMap {
126
133
 
127
134
  `UserMessage` is the identified, frozen user-role value shared by ordinary prompts, injected context, steering, and live inbox events. Event wrappers add only event-local position or outcome facts; the loop adds only driver-owned routing state while an item remains pending.
128
135
 
129
- ### `TodoItem` โ€” one todo-list entry
130
-
131
- The unit of the `todo/write` event's whole-list snapshot. Deliberately minimal โ€” a `content` line and a three-state `status` (no id, priority, or `activeForm`): the list is replaced wholesale on every write, so entries need no stable identity. See the [todo_write Agent Note](../../.agents/notes/implemented/feature/2026-06-29-todo-write-tool.md).
132
-
133
- ```ts type-equiv
134
- /**
135
- * One entry in an agent's todo list โ€” the unit of the `todo/write`
136
- * {@link SessionEventMap} event's whole-list snapshot.
137
- *
138
- * Deliberately minimal: a human-readable `content` line and a three-state
139
- * `status`. No id, priority, or `activeForm` โ€” the list is replaced wholesale
140
- * on every write (last-write-wins), so entries need no stable identity. The
141
- * three statuses describe the complete portable lifecycle needed by model and
142
- * UI consumers.
143
- */
144
- interface TodoItem {
145
- /** What this task is โ€” a short imperative line shown in the UI. */
146
- content: string
147
- /** Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several. */
148
- status: 'pending' | 'in_progress' | 'completed'
149
- }
150
- ```
151
-
152
136
  <a id="the-request-header-event-requestheader"></a>
153
137
 
154
138
  ### The request header event: `request/header`
155
139
 
156
- The request envelope โ€” the `EpochHeader` (call config + markers for adapter-supplied defaults + rendered system prompt + assembled tool schemas) โ€” is logged session state, so every conversation request is a pure function of the log (the reconstructability Agent Note). A full `request/header` snapshot with reason `'initial'` or `'resume'` records each loop-instance boundary; a later changed request records another full snapshot with reason `'change'`. `foldRequestHeader(events)` reconstructs the header by selecting the latest snapshot. The event is not a `SurfaceEventType`: it produces no LLM message.
140
+ The request envelope โ€” the `EpochHeader` (call config + markers for adapter-supplied defaults + rendered system prompt + assembled tool schemas) โ€” is logged session state, so every conversation request is a pure function of the log (the reconstructability Agent Note). 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.
157
141
 
158
142
  ```ts type-equiv
159
143
  /**
@@ -195,6 +179,28 @@ interface RequestContext {
195
179
 
196
180
  A proper discriminated union over `type` (not independent `type`/`data` unions), so `switch (event.type)` narrows `event.data` without casts. `seq` is the monotonic position in the log (`seq = log.length`); `time` is epoch ms.
197
181
 
182
+ ```ts type-equiv
183
+ /** Sequence number of one existing event in a Session log. */
184
+ type SessionSeq = BrandedNumber<'SessionSeq'>
185
+ ```
186
+
187
+ ```ts type-equiv
188
+ /** A Session log gap, prefix length, or read offset, which may equal the event count. */
189
+ type SessionLogOffset = BrandedNumber<'SessionLogOffset'>
190
+ ```
191
+
192
+ ```ts type-equiv
193
+ /** Inclusive Session event watermark, or `-1` before any event exists. */
194
+ type SessionSeqCursor = SessionSeq | -1
195
+ ```
196
+
197
+ ```ts type-equiv
198
+ /** One existing Session event position, or explicit absence. */
199
+ type OptionalSessionSeq = SessionSeq | null
200
+ ```
201
+
202
+ `SessionSeq(value)` and `SessionLogOffset(value)` admit only non-negative safe integers and reject negative zero. They add compile-time brands without changing the serialized number; arithmetic returns an ordinary `number` that callers must admit again through the constructor for its intended role.
203
+
198
204
  ```ts type-equiv
199
205
  /**
200
206
  * One immutable entry in the session log.
@@ -213,10 +219,21 @@ type SessionEvent<T extends SessionEventType = SessionEventType> = {
213
219
  [K in SessionEventType]: {
214
220
  type: K
215
221
  /** Monotonic sequence number within the session. */
216
- seq: number
222
+ seq: SessionSeq
217
223
  /** Unix epoch milliseconds. */
218
224
  time: number
219
225
  data: SessionEventMap[K]
226
+ /**
227
+ * Marks an event a reader may safely skip when it does not recognize
228
+ * `type`. Absent means required: a reader meeting an unrecognized type
229
+ * without this marker MUST refuse to reconstruct the session instead of
230
+ * silently dropping the event, because an unrecognized required event may
231
+ * change how the rest of the log is interpreted. A writer sets `true` only
232
+ * on purely informational records whose loss cannot affect reconstruction;
233
+ * defaulting to required means a forgotten marker over-refuses (an
234
+ * inconvenience) rather than silently resuming a gutted session.
235
+ */
236
+ ignorable?: true
220
237
  } & (K extends SurfaceEventType ? {
221
238
  /**
222
239
  * Seq numbers of earlier events that this event cites as sources
@@ -226,7 +243,7 @@ type SessionEvent<T extends SessionEventType = SessionEventType> = {
226
243
  * provider stream; when the field is absent, the event does not record which
227
244
  * earlier events produced the message.
228
245
  */
229
- sourceEventSeqs?: number[]
246
+ sourceEventSeqs?: SessionSeq[]
230
247
  /** How this event entered the surface; absent for non-surface events. */
231
248
  surfaceOp?: SurfaceOp
232
249
  } : object)
@@ -273,7 +290,7 @@ type SurfaceEventType =
273
290
  */
274
291
  type SurfaceOp =
275
292
  | 'append'
276
- | { op: 'replace'; start: number; end: number }
293
+ | { op: 'replace'; start: SessionSeq; end: SessionSeq }
277
294
  ```
278
295
 
279
296
  `'append'` is the normal tail-append path. `replace` shadows surface entries from `start` through `end` inclusive (both must be valid surface seqs; `start === end` replaces a single entry) and inserts the new event in their place.
@@ -293,7 +310,7 @@ interface SurfaceIntent {
293
310
  * absent, the event does not record which earlier events produced the message.
294
311
  * Other surface events require a non-empty set when this field is present.
295
312
  */
296
- sourceEventSeqs?: number[]
313
+ sourceEventSeqs?: SessionSeq[]
297
314
  }
298
315
  ```
299
316
 
@@ -311,7 +328,7 @@ Only `assistant/message` may carry a present empty `sourceEventSeqs`; when the f
311
328
  /** Readonly live projection of the message-producing session events. */
312
329
  interface SessionSurface {
313
330
  /** Current surface event sequences in model-visible order. */
314
- readonly nodes: readonly number[]
331
+ readonly nodes: readonly SessionSeq[]
315
332
  /** Monotonic count of committed positional replacements. */
316
333
  readonly replaceGeneration: number
317
334
  }
@@ -325,13 +342,13 @@ interface SessionSurface {
325
342
  /** One replacement operation observed while folding a session surface. */
326
343
  interface SurfaceFoldReplacement {
327
344
  /** Seq of the event that replaced the prior surface range. */
328
- seq: number
345
+ seq: SessionSeq
329
346
  /** Declared inclusive start seq of the replaced surface range. */
330
- start: number
347
+ start: SessionSeq
331
348
  /** Declared inclusive end seq of the replaced surface range. */
332
- end: number
349
+ end: SessionSeq
333
350
  /** Actual surface entries removed by the operation, in surface order. */
334
- shadowedSeqs: number[]
351
+ shadowedSeqs: SessionSeq[]
335
352
  }
336
353
  ```
337
354
 
@@ -339,7 +356,7 @@ interface SurfaceFoldReplacement {
339
356
  /** Complete result of replaying the surface operations in a session log. */
340
357
  interface SurfaceFoldResult {
341
358
  /** Current surface event sequences in model-visible order. */
342
- nodes: number[]
359
+ nodes: SessionSeq[]
343
360
  /** Replacement operations in event order. */
344
361
  replacements: SurfaceFoldReplacement[]
345
362
  }
@@ -363,13 +380,15 @@ declare class Session {
363
380
  get surface(): SessionSurface;
364
381
  /**
365
382
  * Detached, deep-frozen creation metadata (format version, cwd, lineage,
366
- * seed boundary). Supplied by the store via `ctx.sessions.create()`. When a
383
+ * and whether fork history exists). Supplied by the store via `ctx.sessions.create()`. When a
367
384
  * `Session` is created without a store-owned header, a minimal header is
368
385
  * synthesized (stamped with the current {@link SESSION_FORMAT_VERSION}) so
369
386
  * `session.header` is always present. Kept out of the event log โ€” it is a
370
387
  * storage concern, not replayable conversation state.
371
388
  */
372
389
  readonly header: SessionHeader;
390
+ /** Number of leading events inherited from this Session's fork parent. */
391
+ readonly inheritedEventCount: SessionLogOffset;
373
392
  /** The session identity, derived from its durable header's single copy. */
374
393
  get id(): SessionId;
375
394
  /**
@@ -378,9 +397,9 @@ declare class Session {
378
397
  * construction โ€” replay, fork, or resume โ€” and were never published on the
379
398
  * `session/event` firehose (constructor seeds do not emit), so consumers
380
399
  * that replay the log as a publication substitute (telemetry adoption)
381
- * start here. Distinct from `header.seedLength`, the DURABLE fork-lineage
382
- * boundary: a resumed session's constructor seed is its full stored log,
383
- * while its header keeps the original fork value โ€” this field is the
400
+ * start here. Distinct from {@link inheritedEventCount}, the DURABLE
401
+ * fork-lineage cut: a resumed session's constructor seed is its full stored
402
+ * log, while the inherited count keeps the original fork value โ€” this field is the
384
403
  * in-process construction fact.
385
404
  *
386
405
  * Not persisted itself: a seeded session projects it into the log as the
@@ -393,17 +412,23 @@ declare class Session {
393
412
  * When this lifecycle appends the marker, it occupies this seq before the
394
413
  * store attaches and therefore does not publish either. Otherwise this seq
395
414
  * holds an ordinary published write.
396
- */
397
- readonly firstLiveSeq: number;
415
+ */
416
+ readonly firstLiveSeq: SessionLogOffset;
398
417
  /**
399
418
  * Create a detached session by validating and snapshotting borrowed seed
400
419
  * events and storage metadata.
401
420
  * @param id - session identity.
402
421
  * @param seed - optional borrowed replay or fork events.
403
422
  * @param header - optional borrowed storage metadata.
423
+ * @param inheritedEventCount - exact fork-inherited prefix length for a seeded header.
404
424
  * @returns a detached session.
405
425
  */
406
- static create(id: SessionId, seed?: readonly SessionEvent[], header?: SessionHeader): Session;
426
+ static create(
427
+ id: SessionId,
428
+ seed?: readonly SessionEvent[],
429
+ header?: SessionHeader,
430
+ inheritedEventCount?: SessionLogOffset,
431
+ ): Session;
407
432
  /**
408
433
  * Restore a detached session by taking ownership of fresh persistence values.
409
434
  * The storage format, event envelopes, sequence continuity, surface transitions,
@@ -411,18 +436,46 @@ declare class Session {
411
436
  * @param id - restored session identity.
412
437
  * @param seed - fresh detached events whose ownership is transferred.
413
438
  * @param header - fresh detached metadata whose ownership is transferred.
439
+ * @param inheritedEventCount - exact fork-inherited prefix length decoded from storage.
414
440
  * @returns a restored detached session.
415
441
  */
416
- static fromRestore(id: SessionId, seed: readonly SessionEvent[], header: SessionHeader): Session;
442
+ static fromRestore(
443
+ id: SessionId,
444
+ seed: readonly SessionEvent[],
445
+ header: SessionHeader,
446
+ inheritedEventCount: SessionLogOffset,
447
+ ): Session;
448
+ /**
449
+ * Return the immutable event stored at one exact sequence number.
450
+ * @param seq - event sequence number.
451
+ * @returns the accepted event, or undefined when the log does not contain it.
452
+ */
453
+ eventAt(seq: SessionSeq): SessionEvent | undefined;
454
+ /**
455
+ * Materialize an immutable snapshot of a half-open event sequence range.
456
+ * A full current snapshot is reused until the next append; every previously
457
+ * returned snapshot remains stable after later appends.
458
+ * @param fromSeq - non-negative inclusive sequence number; defaults to the log start.
459
+ * @param toSeqExclusive - non-negative exclusive sequence number; defaults to the current end.
460
+ * @returns a frozen array of the selected deeply frozen events.
461
+ */
462
+ snapshotEvents(
463
+ fromSeq: SessionLogOffset = SessionLogOffset(0),
464
+ toSeqExclusive: SessionLogOffset = this.seq,
465
+ ): readonly SessionEvent[];
417
466
  /**
418
- * An immutable snapshot of the append-only event log. The snapshot is reused
419
- * until the next append; a previously returned array does not grow later.
420
- * Events and their nested data are deep-frozen at acceptance, so neither a
421
- * cast nor ordinary JavaScript can rewrite durable history.
467
+ * Return this Session's events after its fork-inherited prefix.
468
+ * @returns a fresh array containing child-owned events in log order.
422
469
  */
423
- get events(): readonly SessionEvent[];
470
+ ownEvents(): readonly SessionEvent[];
471
+ /**
472
+ * Whether one existing event position is outside the fork-inherited prefix.
473
+ * @param seq - event position in this Session.
474
+ * @returns true when the event belongs to this Session rather than its parent.
475
+ */
476
+ isOwnSeq(seq: SessionSeq): boolean;
424
477
  /** The next event's sequence number โ€” always the log length (the `seq = log.length` contiguity contract). */
425
- get seq(): number;
478
+ get seq(): SessionLogOffset;
426
479
  /**
427
480
  * Append one typed event to the log and synchronously notify observers via
428
481
  * the store-owned, module-private publication hooks. The hot path never blocks
@@ -450,7 +503,7 @@ declare class Session {
450
503
  * Map/Set/Date/class instance), or when the candidate violates the
451
504
  * canonical surface contract (marker shape and eligibility, unique
452
505
  * earlier source-event references, positional replacement validity, and complete
453
- * shadowed-node coverage). One recursive pass reads, validates, and
506
+ * shadowed-node coverage). One iterative pass reads, validates, and
454
507
  * copies each nested value once, so a stateful getter cannot supply one value
455
508
  * to validation and another to storage. The event log is the durable source
456
509
  * of truth, so a bad event fails at the append site rather than later during
@@ -467,7 +520,7 @@ declare class Session {
467
520
  * The {@link EpochHeader} in force after the log's last header event โ€” the
468
521
  * header the NEXT request will be compared against โ€” or undefined before
469
522
  * the first `request/header` snapshot. The live, incrementally-maintained
470
- * form of `foldRequestHeader(session.events)`: each header event is folded
523
+ * form of `foldRequestHeader(session.snapshotEvents())`: each header event is folded
471
524
  * once, when first seen, so a per-step read costs O(new events).
472
525
  * @returns the folded header, or undefined when no header event exists yet.
473
526
  */
@@ -522,7 +575,7 @@ Everything else (`turn/*`, `step/*`, plugin-owned `llm/retry`) is structural and
522
575
 
523
576
  `ctx.sessions.create(id, { seed, meta })` is the low-level replay/fork primitive. For ordinary live-session forks, `SessionStore` exposes one policy API:
524
577
 
525
- - `fork(source, boundary?, childSessionId?)` accepts a live `Session` object or live `SessionId`, selects source events through the inclusive `boundary` seq (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 plus child metadata (`parentSession`, `seedLength`, and inherited `cwd`).
578
+ - `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`.
526
579
 
527
580
  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.
528
581
 
@@ -554,8 +607,10 @@ interface TurnEndReasonMap {
554
607
  /** At least one step reached its output-token ceiling, even if a plugin continued the turn. */
555
608
  'max-tokens': { kind: 'max-tokens' }
556
609
  /**
557
- * A persistence backend closed a crash-orphaned turn on reload. The loop never
558
- * emits this marker, and the events recorded before the crash remain intact.
610
+ * A crash-orphaned turn was closed after the fact: agent-loop resume appends
611
+ * this closer for a stored log whose last turn never ended, and session-query
612
+ * synthesizes it on cold reads. The loop never emits this marker live, and
613
+ * the events recorded before the crash remain intact.
559
614
  */
560
615
  interrupted: { kind: 'interrupted' }
561
616
  }
@@ -571,7 +626,7 @@ The optional `dsh-session/invariant` companion enforces the relations owned by c
571
626
 
572
627
  ## The end-seed boundary: `session/end-seed`
573
628
 
574
- A seeded session โ€” resume, fork, or replay โ€” appends this log-only event immediately after its constructor seed, as its first live write. Events before it have smaller seq values and came from the seed. It is the durable projection of `firstLiveSeq`: that field answers where this lifecycle's writes start for a consumer holding the object, while the event answers the same question for one holding only stored bytes. The payload is empty, so position and `time` carry the whole meaning, and it produces no message. `Session`'s constructor is the only legitimate writer.
629
+ A Session constructed with an explicit seed โ€” restore, fork, or replay โ€” appends this log-only event immediately after that constructor seed, as its first live write. Events before it have smaller seq values and came through construction. It is the durable projection of `firstLiveSeq`: that field answers where this lifecycle's writes start for a consumer holding the object, while the event answers the same question for one holding only stored bytes. It does not define fork ownership; `isSeeded` plus `inheritedEventCount` do. The payload is empty, so position and `time` carry the whole meaning, and it produces no message. `Session`'s constructor is the only legitimate writer.
575
630
 
576
631
  An explicitly supplied empty seed writes `session/end-seed` at seq 0, which distinguishes an empty resumed session from a fresh one. A seed already ending in `session/end-seed` is not re-marked, so reopening an untouched session does not grow its log per pickup. Locate the LAST `session/end-seed` in stored history rather than assuming one exists at `firstLiveSeq`: after a pickup with no work, the event has a smaller seq than the next lifecycle's `firstLiveSeq`.
577
632
 
@@ -581,25 +636,175 @@ Consumers that order Sessions by human activity exclude this boundary: picking a
581
636
 
582
637
  ## Plugin-contributed log-only events
583
638
 
584
- 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 with its payload, surface badge, and declaration site; the compaction seam's `compaction/*` semantics are discussed on [compaction.md](compaction.md).
639
+ 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).
585
640
 
586
- 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 Node cookbook](../cookbook/adding-a-conversation-node.md).
641
+ 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).
587
642
 
588
643
  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 (see [the hook-bridges Agent Note](../../.agents/notes/implemented/feature/2026-06-30-hook-bridges.md)).
589
644
 
590
645
  ## Durability contract
591
646
 
592
- What a persistence backend relies on: the durable log persists every event losslessly, **including** `assistant/chunk` โ€” `seq` must stay contiguous, so chunks cannot be filtered out of the canonical log. A backend may choose its own storage encoding for an event batch as long as `load` returns the exact appended events (the JSONL backend's default packed chunk rows are such an encoding โ€” 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.events` 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.
647
+ What a persistence backend relies on: the durable log persists every event losslessly, **including** `assistant/chunk` โ€” `seq` must stay contiguous, so chunks cannot be filtered out of the canonical log. A backend may choose its own storage encoding for an event batch as long as a handle's `read()` returns the exact appended events (the JSONL backend's default packed chunk rows are such an encoding โ€” 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.
593
648
 
594
649
  The backends that consume this contract are on [persistence.md](persistence.md).
595
650
 
651
+ ## Remote catalog and workspace opening
652
+
653
+ `ModelCatalog` is the Host-generation model directory returned by `session/modelCatalog`: it carries the deployment default, routable provider ids, successful provider groups, and isolated provider failures. It is not derived from one Session and remains separate from Session projections.
654
+
655
+ `SessionOpenWorkspacePathRequest` carries an absolute or workspace-resolved `path`. `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.
656
+
596
657
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) โ€” do not edit between markers -->
597
658
 
598
659
  <a id="cordis-surface"></a>
599
660
 
600
661
  ## Cordis API
601
662
 
602
- Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) โ€” this section is byte-identical in both language sides of the page. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
663
+ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) โ€” the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
664
+
665
+ <a id="ctxsessioncontroller--sessioncontroller"></a>
666
+
667
+ ### `ctx.sessionController` โ€” `SessionController`
668
+
669
+ Host service backing the generated `ctx.remote.session` namespace.
670
+
671
+ ```ts cordis-catalog
672
+ /**
673
+ * Resolve or resume one ordinary Session for another Host API domain.
674
+ * @param sessionId - Session identity whose Agent owns the operation.
675
+ * @returns the live Agent or the stable Session-domain failure.
676
+ */
677
+ resolveAgent(sessionId: SessionId): Promise<ApiSessionAgentResult>
678
+
679
+ /**
680
+ * Inspect one attached or persisted Session without activating its Agent.
681
+ * @param sessionId - durable Session identity.
682
+ * @param signal - optional caller cancellation for persistence reads.
683
+ * @returns the current attached state or persisted header and event prefix.
684
+ */
685
+ inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspection>
686
+
687
+ /**
688
+ * Read all visible Session rows without resuming an Agent.
689
+ * @param _request - reserved empty list request.
690
+ * @param signal - cancellation for persistence reads.
691
+ * @returns visible Session summaries ordered by activity.
692
+ */
693
+ @Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>
694
+
695
+ /**
696
+ * Search visible Session content without resuming an Agent.
697
+ * @param request - literal message-content query.
698
+ * @param signal - cancellation for list and search reads.
699
+ * @returns authorized bounded Session search results.
700
+ */
701
+ @Remote('search') search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>
702
+
703
+ /**
704
+ * Create or idempotently adopt one ordinary Session.
705
+ * @param request - requested identity, location, and Agent preset.
706
+ * @returns the Session identity and resolved preset when configured.
707
+ */
708
+ @Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>
709
+
710
+ /**
711
+ * Select one Session-local model after explicitly resuming the Session.
712
+ * @param request - Session identity and requested model selection.
713
+ * @returns the normalized selection installed for the Session.
714
+ */
715
+ @Remote('selectModel') selectModel(request: SessionSelectModelRequest): Promise<SessionSelectModelValue>
716
+
717
+ /**
718
+ * Describe every currently routable model for Host-generation selectors.
719
+ * @returns provider-grouped models, the deployment default, and isolated provider failures.
720
+ */
721
+ @Remote('modelCatalog') modelCatalog(): Promise<ModelCatalog>
722
+
723
+ /**
724
+ * Report whether this deployment can hand a Session workspace path to a native desktop.
725
+ * @returns true when the matching open operation is available.
726
+ */
727
+ @Remote canOpenWorkspacePath(): boolean
728
+
729
+ /**
730
+ * Open one path prepared by a Session-aware caller on the Host desktop.
731
+ * @param request - path after best-effort Session workspace resolution.
732
+ * @param signal - caller lifetime; abort terminates the native command.
733
+ * @returns confirmation after the native opener accepts the path.
734
+ * @throws RemoteError when the request is invalid, cancelled, or the opener fails.
735
+ */
736
+ @Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>
737
+
738
+ /**
739
+ * Rename one Session after explicitly resuming it.
740
+ * @param request - Session identity and proposed title.
741
+ * @returns the accepted title and durable event sequence.
742
+ */
743
+ @Remote('rename') rename(request: SessionRenameRequest): Promise<SessionRenameValue>
744
+
745
+ /**
746
+ * Fork one cold-readable completed-turn prefix into a new Session.
747
+ * @param request - source Session and optional event anchor.
748
+ * @returns the new Session identity.
749
+ */
750
+ @Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>
751
+
752
+ /**
753
+ * Admit one prompt after explicitly resuming its Session.
754
+ * @param request - Session identity, prompt content, source metadata, and delivery mode.
755
+ * @param signal - caller cancellation before prompt admission begins.
756
+ * @returns acknowledgement that the Agent accepted the prompt.
757
+ */
758
+ @Remote('prompt') prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>
759
+
760
+ /**
761
+ * Read one image proven reachable from the addressed Session log.
762
+ * @param request - Session and attachment identities used for authorization.
763
+ * @returns the durable attachment reference and base64-encoded bytes.
764
+ */
765
+ @Remote('attachment') attachment(request: SessionAttachmentRequest): Promise<SessionAttachmentValue>
766
+
767
+ /**
768
+ * Mutate one still-pending queue occurrence on a live Agent.
769
+ * @param request - Session, queue item, and requested mutation.
770
+ * @returns acknowledgement that the queue mutation was applied.
771
+ */
772
+ @Remote('updateQueue') updateQueue(request: SessionUpdateQueueRequest): SessionUpdateQueueValue
773
+
774
+ /**
775
+ * Cancel one active Agent turn without dropping its pending inbox.
776
+ * @param request - Session whose active Agent turn is cancelled.
777
+ * @returns acknowledgement that cancellation was requested.
778
+ */
779
+ @Remote('cancel') cancel(request: SessionCancelRequest): SessionCancelValue
780
+
781
+ /**
782
+ * Read one cold-safe, message-aligned Session history page.
783
+ * @param request - durable address, backward cursor, and page budget.
784
+ * @param signal - cancellation for persistence reads.
785
+ * @returns one chronological page.
786
+ */
787
+ @Remote('page') page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>
788
+
789
+ /**
790
+ * Follow one Session log from its opening or resume cursor.
791
+ * @param request - durable address and last committed sequence already held by the caller.
792
+ * @param signal - cancellation owned by the Remote stream carrier.
793
+ * @returns a complete opening snapshot followed by gap-free event frames.
794
+ */
795
+ @Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>
796
+
797
+ /**
798
+ * Stream a complete live-control baseline followed by replacement frames.
799
+ * @param signal - cancellation owned by the Remote stream carrier.
800
+ * @returns one complete baseline followed by live replacement frames.
801
+ */
802
+ @Remote({ mode: 'stream' }) control(signal: AbortSignal): AsyncIterable<SessionControlFrame>
803
+ ```
804
+
805
+ Types: [SessionId](core.md) ยท [SessionInspection](persistence.md) ยท [SessionSearchRequest](session-query.md)
806
+
807
+ Source: [`packages/api/session-controller/src/index.ts`](../../packages/api/session-controller/src/index.ts)
603
808
 
604
809
  <a id="ctxsessions--sessionstore"></a>
605
810
 
@@ -607,7 +812,7 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
607
812
 
608
813
  In-memory session store (`ctx.sessions`).
609
814
 
610
- Persistence is intentionally not implemented here โ€” persistence plugins subscribe to `session/event` and flush on `session/flush` / dispose.
815
+ 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.
611
816
 
612
817
  ```ts cordis-catalog
613
818
  /**
@@ -730,12 +935,112 @@ list(): Session[]
730
935
  * `SessionStore`'s id policy.
731
936
  * @returns The created live child session.
732
937
  */
733
- fork(source: SessionForkSource, boundary?: number, childSessionId?: SessionId): Session
938
+ fork(source: SessionForkSource, boundary?: SessionSeq, childSessionId?: SessionId): Session
734
939
  ```
735
940
 
736
941
  Types: [CreateSessionOptions](persistence.md) ยท [PrepareSessionOptions](persistence.md) ยท [SessionId](core.md)
737
942
 
738
- Source: [`packages/core/session/src/index.ts:792`](../../packages/core/session/src/index.ts)
943
+ Source: [`packages/core/session/src/index.ts`](../../packages/core/session/src/index.ts)
944
+
945
+ <a id="api-session-events"></a>
946
+
947
+ ### `api-session/*` events
948
+
949
+ <a id="api-sessionactivity--emit"></a>
950
+
951
+ #### `api-session/activity` โ€” emit
952
+
953
+ One user-authored durable message advanced Session list activity.
954
+
955
+ ```ts cordis-catalog
956
+ /**
957
+ * One user-authored durable message advanced Session list activity.
958
+ * @mode emit
959
+ * @param sessionId - addressed Session identity.
960
+ * @param updatedAt - durable message time used for list ordering.
961
+ */
962
+ 'api-session/activity'(sessionId: SessionId, updatedAt: number): void
963
+ ```
964
+
965
+ Types: [SessionId](core.md)
966
+
967
+ Source: [`packages/api/session-controller/src/types.ts`](../../packages/api/session-controller/src/types.ts)
968
+
969
+ <a id="api-sessionadded--emit"></a>
970
+
971
+ #### `api-session/added` โ€” emit
972
+
973
+ A Session became visible to Session list consumers.
974
+
975
+ ```ts cordis-catalog
976
+ /**
977
+ * A Session became visible to Session list consumers.
978
+ * @mode emit
979
+ * @param summary - initial list row for the Session.
980
+ */
981
+ 'api-session/added'(summary: SessionSummary): void
982
+ ```
983
+
984
+ Source: [`packages/api/session-controller/src/types.ts`](../../packages/api/session-controller/src/types.ts)
985
+
986
+ <a id="api-sessionerror--emit"></a>
987
+
988
+ #### `api-session/error` โ€” emit
989
+
990
+ One Agent failed outside a durable turn position.
991
+
992
+ ```ts cordis-catalog
993
+ /**
994
+ * One Agent failed outside a durable turn position.
995
+ * @mode emit
996
+ * @param sessionId - Agent and Session identity.
997
+ * @param message - user-safe failure chain.
998
+ */
999
+ 'api-session/error'(sessionId: SessionId, message: string): void
1000
+ ```
1001
+
1002
+ Types: [SessionId](core.md)
1003
+
1004
+ Source: [`packages/api/session-controller/src/types.ts`](../../packages/api/session-controller/src/types.ts)
1005
+
1006
+ <a id="api-sessionremoved--emit"></a>
1007
+
1008
+ #### `api-session/removed` โ€” emit
1009
+
1010
+ A Session left the live Host registry.
1011
+
1012
+ ```ts cordis-catalog
1013
+ /**
1014
+ * A Session left the live Host registry.
1015
+ * @mode emit
1016
+ * @param sessionId - removed Session identity.
1017
+ */
1018
+ 'api-session/removed'(sessionId: SessionId): void
1019
+ ```
1020
+
1021
+ Types: [SessionId](core.md)
1022
+
1023
+ Source: [`packages/api/session-controller/src/types.ts`](../../packages/api/session-controller/src/types.ts)
1024
+
1025
+ <a id="api-sessionstatus--emit"></a>
1026
+
1027
+ #### `api-session/status` โ€” emit
1028
+
1029
+ One Agent changed running state.
1030
+
1031
+ ```ts cordis-catalog
1032
+ /**
1033
+ * One Agent changed running state.
1034
+ * @mode emit
1035
+ * @param sessionId - Agent and Session identity.
1036
+ * @param running - whether the Agent is running.
1037
+ */
1038
+ 'api-session/status'(sessionId: SessionId, running: boolean): void
1039
+ ```
1040
+
1041
+ Types: [SessionId](core.md)
1042
+
1043
+ Source: [`packages/api/session-controller/src/types.ts`](../../packages/api/session-controller/src/types.ts)
739
1044
 
740
1045
  <a id="session-events"></a>
741
1046
 
@@ -764,7 +1069,7 @@ Creation announcement during session publication. A synchronous throw vetoes and
764
1069
 
765
1070
  Types: [Scoped](scope.md)
766
1071
 
767
- Source: [`packages/core/session/src/index.ts:54`](../../packages/core/session/src/index.ts)
1072
+ Source: [`packages/core/session/src/index.ts`](../../packages/core/session/src/index.ts)
768
1073
 
769
1074
  <a id="sessiondisposed--emit"></a>
770
1075
 
@@ -787,7 +1092,7 @@ Emitted once when an announced session leaves the store, including publication r
787
1092
 
788
1093
  Types: [Scoped](scope.md)
789
1094
 
790
- Source: [`packages/core/session/src/index.ts:64`](../../packages/core/session/src/index.ts)
1095
+ Source: [`packages/core/session/src/index.ts`](../../packages/core/session/src/index.ts)
791
1096
 
792
1097
  <a id="sessionevent--emit"></a>
793
1098
 
@@ -812,7 +1117,7 @@ Post-commit, fire-and-forget append feed. The listener snapshot resolves before
812
1117
 
813
1118
  Types: [Scoped](scope.md)
814
1119
 
815
- Source: [`packages/core/session/src/index.ts:76`](../../packages/core/session/src/index.ts)
1120
+ Source: [`packages/core/session/src/index.ts`](../../packages/core/session/src/index.ts)
816
1121
 
817
1122
  <a id="sessionflush--parallel"></a>
818
1123
 
@@ -834,5 +1139,5 @@ Awaited parallel durability checkpoint: every listener runs and the caller await
834
1139
 
835
1140
  Types: [Scoped](scope.md)
836
1141
 
837
- Source: [`packages/core/session/src/index.ts:85`](../../packages/core/session/src/index.ts)
1142
+ Source: [`packages/core/session/src/index.ts`](../../packages/core/session/src/index.ts)
838
1143
  <!-- END GENERATED cordis-surface -->