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
@@ -2,33 +2,38 @@
2
2
 
3
3
  English | [中文](session-projection.zh.md)
4
4
 
5
- The session-projection seam — a [capability seam](../capability-seams.md) through which domain host plugins serve whole current values of log-derived per-session state to client carriers: the Service Definition and registry ([dsh-session-projection](../../packages/session/session-projection), `ctx.sessionProjections`), domain contributors (each registering one pure unit), and carriers ([dsh-host-apiproxy](../../packages/host/apiproxy)'s history tail page and `session/projection` push frame). It is one optional capability, not part of the agent-loop spine. The framework drives, the domain computes: the registry subscribes to `session/event` once and folds every committed event through every unit; domains hold no subscriptions and clients never fold domain events — they receive finished values. Design authority: the [session-projection RFC](../../.agents/notes/proposed/architecture/2026-07-27-session-projection-and-command-log.md); drive/cache/feed contracts: the [package README](../../packages/session/session-projection/README.md).
5
+ The session-projection seam — a [capability seam](../capability-seams.md) through which domain host plugins serve whole current values of log-derived per-session state to client carriers: the Service Definition and registry ([dsh-session-projection](../../packages/session/session-projection), `ctx.sessionProjections`), domain contributors (each registering one pure unit), and carriers ([dsh-session-controller](../../packages/api/session-controller)'s history tail page and `session/projection` push frame). It is one optional capability, not part of the agent-loop spine. The framework drives, the domain computes: the registry subscribes to `session/event` once and folds every committed event through every unit; domains hold no subscriptions and clients never fold domain events — they receive finished values. Design authority: the [session-projection RFC](../../.agents/notes/proposed/architecture/2026-07-27-session-projection-and-command-log.md); drive/cache/feed contracts: the [package README](../../packages/session/session-projection/README.md).
6
6
 
7
7
  Source: [`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
8
8
 
9
9
  ## The unit
10
10
 
11
- `SessionProjectionMap` is the merge-extensible type table for the whole chain (host unit, wire block, client hook); values are wire-JSON whole values, and rendering belongs to the slot system, never this layer. A domain contributes one `ProjectionDefinition` per key:
11
+ `SessionProjectionStateMap` is the merge-extensible table of host fold states, while `SessionProjectionMap` retains the client-visible whole values. A domain contributes one `ProjectionDefinition` per state key; a `wire` block makes that key client-visible, and rendering belongs to the slot system, never this layer:
12
12
 
13
13
  ```ts type-equiv
14
14
  /**
15
- * One domain's state-driven computation unit: three pure synchronous
16
- * functions plus declarations — never an opaque getter. The framework drives
15
+ * One domain's state-driven computation unit: a pure synchronous fold plus
16
+ * declarations and an optional client view — never an opaque getter. The framework drives
17
17
  * `apply` on every committed session event; the domain holds no
18
- * subscriptions and owns only the mathematics. All three functions MUST be
19
- * synchronous (an async unit would tear the carriers' consistency cut) and
18
+ * subscriptions and owns only the computation. All functions MUST be
19
+ * synchronous (an async unit would tear the carriers' consistency cut), and
20
20
  * `state` MUST be plain JSON (the persisted-cache precondition).
21
21
  */
22
- interface ProjectionDefinition<K extends keyof SessionProjectionMap, S> {
23
- /** The projection key this unit owns (its `SessionProjectionMap` entry). */
22
+ interface ProjectionDefinition<
23
+ K extends keyof SessionProjectionStateMap,
24
+ S extends SessionProjectionStateMap[K] = SessionProjectionStateMap[K],
25
+ > {
26
+ /** The projection key this unit owns (its `SessionProjectionStateMap` entry). */
24
27
  key: K
25
- /** Validates the wire payload (`view` output) before it leaves the host. */
26
- schema: ZodType<SessionProjectionMap[K]>
28
+ /** Validates persisted state before it seeds a fold. */
29
+ stateSchema: ZodType<S>
27
30
  /**
28
- * State for the empty log.
31
+ * State for the empty log and its immutable Session metadata.
32
+ * @param header - immutable metadata for the Session being projected.
33
+ * @param inheritedEventCount - exact fork-inherited prefix length.
29
34
  * @returns the initial state.
30
35
  */
31
- init(): S
36
+ init(header: SessionHeader, inheritedEventCount: SessionLogOffset): NoInfer<S>
32
37
  /**
33
38
  * Pure transition: previous state + one committed event → next state. A
34
39
  * unit uninterested in an event MUST return the same state reference — an
@@ -37,13 +42,21 @@ interface ProjectionDefinition<K extends keyof SessionProjectionMap, S> {
37
42
  * @param event - the next committed session event.
38
43
  * @returns the next state (same reference when the event is not the unit's).
39
44
  */
40
- apply(state: S, event: SessionEvent): S
41
- /**
42
- * State wire payload (the read-side projection).
43
- * @param state - the current state.
44
- * @returns the whole current value for this unit's key.
45
- */
46
- view(state: S): SessionProjectionMap[K]
45
+ apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>
46
+ /** Client view. Omit for host-only units. */
47
+ wire?: K extends keyof SessionProjectionMap ? {
48
+ /** Validates the wire payload before it leaves the host. */
49
+ viewSchema: ZodType<SessionProjectionMap[K]>
50
+ /**
51
+ * State → wire payload (the read-side projection). The live drive keeps
52
+ * the two latest raw results and compares them with `Object.is`; an
53
+ * object-valued view must reuse its reference to suppress publication
54
+ * across internal-only state changes.
55
+ * @param state - the current state.
56
+ * @returns the whole current value for this unit's key.
57
+ */
58
+ view(state: NoInfer<S>): SessionProjectionMap[K]
59
+ } : never
47
60
  /**
48
61
  * Persisted-cache invalidation version: bump whenever the serialized state fields or the
49
62
  * fold semantics change, so persisted `(sessionId, key, ver, seq, val)`
@@ -60,37 +73,37 @@ The whole-value event rule is load-bearing: a state-carrying log event carries t
60
73
 
61
74
  ```ts type-equiv
62
75
  /**
63
- * One consistent read cut over every registered unit for one session.
76
+ * One consistent read cut over every registered client-visible unit for one session.
64
77
  * `asOfSeq` is the shared watermark — the seq of the last event every value
65
- * reflects (`-1` for an empty log, mirroring `session/subscribed.lastSeq`).
78
+ * reflects (`-1` for an empty log).
66
79
  */
67
80
  interface ProjectionSnapshot {
68
81
  /** Seq of the last event the values reflect; -1 for an empty log. */
69
- asOfSeq: number
70
- /** Whole current value per registered key. */
82
+ asOfSeq: SessionSeqCursor
83
+ /** Whole current client value per registered key. */
71
84
  values: Partial<SessionProjectionMap>
72
85
  }
73
86
  ```
74
87
 
75
88
  ```ts type-equiv
76
89
  /**
77
- * Change-feed listener: one unit's value changed for one session. `value` is
78
- * the schema-validated `view` output; `seq` is the unit's watermark at
79
- * emission (the seq of the event that caused the change).
90
+ * Change-feed listener: one unit's raw `view` result changed by `Object.is`
91
+ * for one session. `value` is the schema-validated output; `seq` is the
92
+ * unit's watermark at emission (the seq of the event that caused the change).
80
93
  */
81
94
  type ProjectionChangeListener = (
82
95
  session: Session,
83
96
  key: Extract<keyof SessionProjectionMap, string>,
84
97
  value: unknown,
85
- seq: number,
98
+ seq: SessionSeq,
86
99
  ) => void
87
100
  ```
88
101
 
89
- `snapshot(session)` is fully synchronous: a carrier reads it in the same tick as its page slice, so `asOfSeq` covers both reads at one sequence number. Every value passes its unit's schema before return; an accidentally async `view` returns a Promise, which schema validation rejects. The change feed fires once per unit whose state *reference* changed for each committed event; `apply` must return the same reference when its state did not change.
102
+ `snapshot(session)` is fully synchronous: a carrier reads it in the same tick as its page slice, so `asOfSeq` covers both reads at one sequence number. It returns only client views, and every value passes its unit's `viewSchema` before return. `stateOf(session, key)` reads one live host state without computing unrelated views; callers must not mutate the borrowed reference. A state-reference change computes one cached raw view, and the change feed fires only when that result changes by `Object.is`; an object-valued view must preserve its reference to suppress publication across internal-only state changes.
90
103
 
91
104
  ## The registry: `ctx.sessionProjections`
92
105
 
93
- `SessionProjectionRegistry` ([signatures](#ctxsessionprojections--sessionprojectionregistry)) owns the drive: one `session/event` subscription, eager `apply` over every registered unit, and per-session per-unit watermark cells. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect whose disposer rides the calling fiber: an unloaded domain plugin's key (with its cached cells) disappears from subsequent drives and snapshots, and clients read that as capability absence; duplicate keys throw. Domain plugins register under `ctx.inject(['sessionProjections'], …)` so headless assemblies without the registry stay unaffected.
106
+ `SessionProjectionRegistry` ([signatures](#ctxsessionprojections--sessionprojectionregistry)) owns the drive: one `session/event` subscription, eager `apply` over every registered unit, and per-session per-unit watermark cells. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect whose disposer rides the calling fiber: an unloaded domain plugin's key (with its cached cells) disappears from subsequent drives and snapshots, and clients read that as capability absence; a duplicate key with a different `stateVersion` throws, while same-version registrants share one unit and are counted. Domain plugins register under `ctx.inject(['sessionProjections'], …)` so headless assemblies without the registry stay unaffected.
94
107
 
95
108
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
96
109
 
@@ -98,63 +111,79 @@ type ProjectionChangeListener = (
98
111
 
99
112
  ## Cordis API
100
113
 
101
- 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).
114
+ 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).
102
115
 
103
116
  <a id="ctxsessionprojectioncache--sessionprojectioncache"></a>
104
117
 
105
118
  ### `ctx.sessionProjectionCache` — `SessionProjectionCache`
106
119
 
107
- The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus two mandatory points — `turn/end` and session disposal (the live-to-cold moment) — and serves the cold-read ladder: cached row, persistence `readFrom` tail, registry `restore`, durable write-back. Every durable write is fail-soft: failures log a warning and the cache self-heals on the next write or cold read.
120
+ The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus three mandatory points — session creation, `turn/end`, and session disposal (the live-to-cold moment) — and serves the cached rows for a session header. Every durable write is fail-soft: failures log a warning and the cache self-heals on the next write.
108
121
 
109
122
  ```ts cordis-catalog
110
123
  /**
111
124
  * The zero-I/O listing read: whole values viewed straight from the stored
112
- * rows (version-matching keys only), each cut carried with its watermark
113
- * so a client value store can seed under its higher-seq-wins rule — as
114
- * stale as the last durable checkpoint but never wrong, and never from an
125
+ * rows (version-matching keys only), each cut carried with its watermark so
126
+ * a client value store can seed under its higher-seq-wins rule — as stale
127
+ * as the last durable checkpoint but never wrong, and never from an
115
128
  * unrelated log (the caller's header is the identity witness). Fresher
116
- * paths (the history tail baseline, {@link coldSnapshot}) supersede these
117
- * values whenever a session is actually opened.
129
+ * paths (the history tail baseline) supersede these values whenever a
130
+ * session is actually opened.
118
131
  * @param meta - the listed session's header (identity witness; no log read).
132
+ * @param inheritedEventCount - exact inherited prefix length that completes
133
+ * the checkpoint identity.
134
+ * @param keys - optional projection keys required by the caller's audience.
119
135
  * @returns the cut (`asOfSeq` = lowest served-row watermark), or
120
136
  * `undefined` when no usable row exists for this lifecycle.
121
137
  */
122
- cachedSnapshot(meta: SessionHeader): ProjectionSnapshot | undefined
138
+ cachedSnapshot( meta: SessionHeader, inheritedEventCount: SessionLogOffset, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
139
+
140
+ /**
141
+ * Hydrate projection cells for an already-prepared Session without another
142
+ * persistence read. The cache seeds matching rows; the supplied exact log
143
+ * advances every unit to the observation cut. No checkpoint is written
144
+ * because the logical observation may contain recovery events not yet durable.
145
+ * @param session - exact unpublished Session retained by persistence.
146
+ * @param events - exact logical event prefix represented by the observation.
147
+ * @returns all projection values at the event cut.
148
+ */
149
+ hydratePrepared( session: Session, events: readonly SessionEvent[], ): ProjectionSnapshot
123
150
 
124
151
  /**
125
- * Durably checkpoint one live session NOW (both mandatory points call
152
+ * Durably checkpoint one live session NOW (all mandatory points call
126
153
  * this; tests and carriers may too). The registry cut is snapshotted at
127
- * this boundary (states are live references), then the whole record is
128
- * replaced. NOT fail-soft — callers on the fail-soft paths contain it.
154
+ * this boundary (states are live references), then the session's record is
155
+ * replaced on the domain's write chain. NOT fail-soft — callers on the
156
+ * fail-soft paths contain it.
129
157
  * @param session - the live session to checkpoint.
130
158
  * @returns resolution after durability and event emission.
131
159
  */
132
160
  async write(session: Session): Promise<void>
133
161
 
134
162
  /**
135
- * Cold-read one persisted session's projections with zero full-log load:
136
- * cached rows + a persistence `readFrom` tail from the registry's restore
137
- * floor, refolded by the registry and written back (fail-soft) so the next
138
- * cold read starts closer. A cache row invalidated by a shrunk log
139
- * (crash-repair truncation) triggers one full re-read from seq 0 the
140
- * ladder's slow rung, still no crash. Rejects when the session has no
141
- * persisted log (`not found` from the persistence seam).
142
- * @param id - the persisted session to read.
143
- * @param signal - optional cancellation for the persistence reads.
144
- * @returns the snapshot cut at the stored log end.
163
+ * Cold-read one session's projections from its complete log. Each unit is
164
+ * seeded from the identity-checked cached rows the registry skips `apply`
165
+ * for the already-folded prefix (events at or below the row's `seq`) and
166
+ * the refreshed checkpoint is written back (fail-soft, fire-and-forget), so
167
+ * the first cold read creates the cache row and later ones seed from it.
168
+ * The caller supplies the complete log in seq order: this service never
169
+ * consults the persistence layer.
170
+ * @param meta - the stored session header (identity witness).
171
+ * @param inheritedEventCount - exact inherited prefix length for projection initialization and identity.
172
+ * @param events - the session's complete log, in seq order.
173
+ * @returns the projection cut at the log end.
145
174
  */
146
- async coldSnapshot(id: SessionId, signal?: AbortSignal): Promise<ProjectionSnapshot>
175
+ coldSnapshot( meta: SessionHeader, inheritedEventCount: SessionLogOffset, events: readonly SessionEvent[], ): ProjectionSnapshot
147
176
  ```
148
177
 
149
- Types: [Session](session.md) · [SessionHeader](persistence.md) · [SessionId](core.md)
178
+ Types: [Session](session.md) · [SessionEvent](session.md) · [SessionHeader](persistence.md) · [SessionLogOffset](session.md)
150
179
 
151
- Source: [`packages/session/session-projection-cache/src/index.ts:71`](../../packages/session/session-projection-cache/src/index.ts)
180
+ Source: [`packages/session/session-projection-cache/src/index.ts`](../../packages/session/session-projection-cache/src/index.ts)
152
181
 
153
182
  <a id="ctxsessionprojections--sessionprojectionregistry"></a>
154
183
 
155
184
  ### `ctx.sessionProjections` — `SessionProjectionRegistry`
156
185
 
157
- `ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit's `apply` (eager drive), and a changed state reference notifies the change feed with the schema-validated view. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect (disposer rides the calling fiber): an unloaded domain plugin's key disappears from snapshots and clients read it as capability absence. Domain plugins register under `ctx.inject(['sessionProjections'], …)` so headless assemblies without the registry stay unaffected. Registrants sharing a key share one unit and are counted: the same tool package mounted in N agent presets registers N times, and the key survives until the last one unloads.
186
+ `ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit's `apply` (eager drive). A changed state reference computes the next client view; the change feed is notified only when its raw result changes by `Object.is`. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect (disposer rides the calling fiber): an unloaded domain plugin's key disappears from snapshots and clients read it as capability absence. A host reader either declares `sessionProjections` in its plugin `inject` or fails explicitly when the registry or required key is absent. Contributors may preserve optional registration through `ctx.inject(['sessionProjections'], ...)`. Registrants sharing a key share one unit and are counted: the same tool package mounted in N agent presets registers N times, and the key survives until the last one unloads.
158
187
 
159
188
  ```ts cordis-catalog
160
189
  /**
@@ -165,28 +194,57 @@ Source: [`packages/session/session-projection-cache/src/index.ts:71`](../../pack
165
194
  * @param definition - key, state schema, pure unit functions, and stateVersion.
166
195
  * @returns the exact disposer that unregisters this unit.
167
196
  */
168
- register<K extends keyof SessionProjectionMap, S>(definition: ProjectionDefinition<K, S>): () => void
197
+ register< K extends keyof SessionProjectionMap, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'> & { wire: NonNullable<ProjectionDefinition<K, S>['wire']> }, ): () => void
198
+
199
+ /**
200
+ * Register one host-only unit. Its state is omitted from client snapshots
201
+ * and always checkpointed like every other unit.
202
+ * @param definition - key, state schema, pure unit functions, and stateVersion.
203
+ * @returns the exact disposer that unregisters this unit.
204
+ */
205
+ register< K extends Exclude<keyof SessionProjectionStateMap, keyof SessionProjectionMap>, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'>, ): () => void
169
206
 
170
207
  /**
171
208
  * Subscribe to the change feed. The registration is an effect on the
172
209
  * calling context's fiber.
173
- * @param listener - called once per unit whose state reference changed, per committed event.
210
+ * @param listener - called once per client-visible unit whose raw view changed by `Object.is`, per committed event.
174
211
  * @returns the exact disposer that unsubscribes.
175
212
  */
176
213
  onChanged(listener: ProjectionChangeListener): () => void
177
214
 
178
215
  /**
179
- * One consistent cut over every registered unit for one session, read from
216
+ * Read one unit's current host state after materializing every registered
217
+ * unit at the Session cursor. Unrelated wire views are not produced.
218
+ * The returned value is live; callers must not mutate it.
219
+ * @param session - the session whose state is read.
220
+ * @param key - the registered unit key.
221
+ * @returns current state, or `undefined` when the key is not registered.
222
+ */
223
+ stateOf<K extends keyof SessionProjectionStateMap>( session: Session, key: K, ): SessionProjectionStateMap[K] | undefined
224
+
225
+ /**
226
+ * One consistent cut over every registered client-visible unit for one session, read from
180
227
  * the watermark cache (missing cells fold lazily over the in-memory log).
181
228
  * Fully synchronous — every value and `asOfSeq` reflect the same log
182
- * position. Each value passes its unit's schema before leaving.
229
+ * position. Each value passes its unit's `viewSchema` before leaving.
183
230
  * @param session - the session whose projection values are read.
184
- * @returns the snapshot; `values` is empty when no unit is registered.
231
+ * @param keys - optional client-visible outputs; state materialization remains complete.
232
+ * @returns the snapshot; `values` is empty when no selected client-visible unit is registered.
233
+ */
234
+ snapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot
235
+
236
+ /**
237
+ * Read only already-materialized client-visible cells without folding history.
238
+ * Values may trail the live Session and are therefore hints, not a complete
239
+ * baseline. Missing cells are omitted.
240
+ * @param session - attached Session whose cached cells are inspected.
241
+ * @param keys - optional wire keys to view.
242
+ * @returns the lowest common cached cut, or `undefined` when no wire cell exists.
185
243
  */
186
- snapshot(session: Session): ProjectionSnapshot
244
+ cachedSnapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
187
245
 
188
246
  /**
189
- * State-level checkpoint of every registered unit for one session, read
247
+ * State-level checkpoint of every persisted unit for one session, read
190
248
  * from the watermark cache (missing cells fold lazily over the in-memory
191
249
  * log). This is the write side of the persisted projection cache: the
192
250
  * returned rows are the `(key → {ver, seq, val})` part of the durable
@@ -197,7 +255,7 @@ snapshot(session: Session): ProjectionSnapshot
197
255
  * every subsequent snapshot and frame through it (plain JSON by the unit
198
256
  * contract, so the clone is total).
199
257
  * @param session - the session whose unit states are checkpointed.
200
- * @returns one row per registered key; empty when no unit is registered.
258
+ * @returns one row per registered key.
201
259
  */
202
260
  checkpoint(session: Session): ProjectionCheckpoint
203
261
 
@@ -213,30 +271,31 @@ checkpoint(session: Session): ProjectionCheckpoint
213
271
  * yields an end below every watermark and the restore rejects for a full
214
272
  * re-read.
215
273
  * @param checkpoint - persisted rows for one session (possibly stale or empty).
216
- * @returns the seq to hand the persistence `readFrom`, or `undefined`
217
- * when no unit is registered (no read needed — {@link restore} would
218
- * serve empty values regardless).
274
+ * @returns the offset for the stored-log suffix read (`SessionHandle.read`),
275
+ * or `undefined` when no unit is registered (no read needed —
276
+ * {@link restore} would serve empty values regardless).
219
277
  */
220
- restoreFloor(checkpoint: ProjectionCheckpoint): number | undefined
278
+ restoreFloor(checkpoint: ProjectionCheckpoint): SessionLogOffset | undefined
221
279
 
222
280
  /**
223
281
  * View a checkpoint's rows without any log read: for every registered
224
- * unit whose row's `ver` matches, serve the schema-validated
225
- * `view` of the stored state; mismatched or absent rows leave their key
282
+ * client-visible unit whose row's `ver` matches, serve the schema-validated
283
+ * `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key
226
284
  * absent (a cold or listing consumer treats it as not-yet-available and a
227
285
  * fuller read path refolds it). The zero-I/O rung of the read ladder —
228
286
  * values are as stale as their rows, never wrong.
229
287
  * @param checkpoint - persisted rows for one session (possibly stale or empty).
288
+ * @param keys - optional wire keys to view.
230
289
  * @returns whole values per key with a usable row; empty when none.
231
290
  */
232
- viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
291
+ viewCheckpoint( checkpoint: ProjectionCheckpoint, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): Partial<SessionProjectionMap>
233
292
 
234
293
  /**
235
- * Cold read: fold every registered unit over a stored log suffix, seeding
294
+ * Cold read: fold every persisted unit over a stored log suffix, seeding
236
295
  * each from its checkpoint row when usable — the one read recipe (cached
237
296
  * state + forward tail replay + `view`) applied without a live `Session`.
238
- * Call with the events returned by a persistence
239
- * `readFrom(id, restoreFloor(checkpoint))` and that same floor as
297
+ * Call with the stored events at or past `restoreFloor(checkpoint)` (a
298
+ * `SessionHandle.read` slice) and that same floor as
240
299
  * `baseSeq`; the floor's one-below anchor makes the supplied end honest,
241
300
  * so a shrunk log is detected here. A row is usable iff its
242
301
  * `ver` matches the live unit's `stateVersion`, it does not predate `baseSeq`
@@ -249,14 +308,28 @@ viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
249
308
  * @param checkpoint - persisted rows for one session (possibly stale or empty).
250
309
  * @param events - the stored events with `seq >= baseSeq`, in seq order.
251
310
  * @param baseSeq - the seq `events` starts at (its first event's seq when non-empty).
311
+ * @param header - immutable metadata for the Session being restored.
312
+ * @param inheritedEventCount - exact fork-inherited prefix length supplied to unit initialization.
252
313
  * @returns the snapshot cut at the supplied log end (`asOfSeq` is the last
253
314
  * supplied event's seq, `baseSeq - 1` for an empty tail) plus the
254
315
  * refreshed checkpoint rows at that cut, ready for a durable write-back.
255
316
  */
256
- restore(checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
317
+ restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, header: SessionHeader, inheritedEventCount: SessionLogOffset, ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
318
+
319
+ /**
320
+ * Restore an exact cut and install its states on the supplied prepared Session.
321
+ * A later publication reuses these cells; ordinary live reads and event drive
322
+ * advance any constructor-owned suffix exactly once.
323
+ * @param session - exact prepared Session that owns the restored log prefix.
324
+ * @param checkpoint - persisted rows for this Session lifecycle.
325
+ * @param events - exact events at the observation cut.
326
+ * @param baseSeq - first supplied event sequence.
327
+ * @returns all projection values at the supplied cut.
328
+ */
329
+ hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, ): ProjectionSnapshot
257
330
  ```
258
331
 
259
- Types: [Session](session.md) · [SessionEvent](session.md)
332
+ Types: [Session](session.md) · [SessionEvent](session.md) · [SessionHeader](persistence.md) · [SessionLogOffset](session.md)
260
333
 
261
- Source: [`packages/session/session-projection/src/index.ts:171`](../../packages/session/session-projection/src/index.ts)
334
+ Source: [`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
262
335
  <!-- END GENERATED cordis-surface -->