dsh-plugin-guide 0.3.1 → 0.3.2

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 (370) 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 +27 -22
  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 +23 -7
  32. package/references/official-docs/docs/architecture.zh.md +36 -20
  33. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  34. package/references/official-docs/docs/capability-seams.md +132 -67
  35. package/references/official-docs/docs/capability-seams.zh.md +132 -67
  36. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  37. package/references/official-docs/docs/config-catalog.md +659 -373
  38. package/references/official-docs/docs/config-catalog.zh.md +677 -391
  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 +2 -3
  41. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +8 -7
  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 +666 -747
  116. package/references/official-docs/docs/module-graph.zh.md +668 -749
  117. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  118. package/references/official-docs/docs/persistence-catalog.md +172 -40
  119. package/references/official-docs/docs/persistence-catalog.zh.md +180 -48
  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 +206 -0
  142. package/references/official-docs/docs/subsystems/agent-team.zh.md +206 -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 +5 -5
  154. package/references/official-docs/docs/subsystems/code-runtime.zh.md +6 -6
  155. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  156. package/references/official-docs/docs/subsystems/commands.md +29 -6
  157. package/references/official-docs/docs/subsystems/commands.zh.md +30 -7
  158. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  159. package/references/official-docs/docs/subsystems/compaction.md +5 -5
  160. package/references/official-docs/docs/subsystems/compaction.zh.md +11 -11
  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 +110 -33
  166. package/references/official-docs/docs/subsystems/core.zh.md +141 -62
  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 +4 -4
  175. package/references/official-docs/docs/subsystems/feedback.zh.md +4 -4
  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 +35 -17
  199. package/references/official-docs/docs/subsystems/persistence.zh.md +38 -20
  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 +136 -67
  213. package/references/official-docs/docs/subsystems/session-projection.zh.md +136 -67
  214. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
  215. package/references/official-docs/docs/subsystems/session-query.md +11 -3
  216. package/references/official-docs/docs/subsystems/session-query.zh.md +12 -4
  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 +3 -3
  225. package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
  226. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  227. package/references/official-docs/docs/subsystems/session.md +284 -39
  228. package/references/official-docs/docs/subsystems/session.zh.md +301 -54
  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 +174 -0
  240. package/references/official-docs/docs/subsystems/slots.zh.md +174 -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 +13 -5
  246. package/references/official-docs/docs/subsystems/storage.zh.md +16 -8
  247. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  248. package/references/official-docs/docs/subsystems/subagent.md +120 -32
  249. package/references/official-docs/docs/subsystems/subagent.zh.md +131 -41
  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 +27 -12
  264. package/references/official-docs/docs/subsystems/token-meter.zh.md +28 -13
  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 +433 -27
  297. package/references/official-docs/docs/tool-catalog.zh.md +438 -29
  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 +1 -1
  348. package/references/official-docs/docs/web-styling.zh.md +2 -2
  349. package/references/official-docs/packages/AGENTS.md +3 -2
  350. package/references/official-docs/packages/README.md +104 -59
  351. package/references/official-docs/vendor/README.md +1 -0
  352. package/references/official-docs/website-docs.ts +52 -11
  353. package/references/sources.md +2 -2
  354. package/references/website-pages.md +3 -3
  355. package/scripts/download-sources.ps1 +1 -1
  356. package/scripts/sync-official-docs.ps1 +19 -11
  357. package/scripts/verify-kit.ps1 +0 -4
  358. package/templates/js/README.es.md +1 -1
  359. package/templates/js/README.hi.md +1 -1
  360. package/templates/js/README.md +1 -1
  361. package/templates/js/README.pt.md +1 -1
  362. package/templates/js/README.zh.md +1 -1
  363. package/templates/js/package.json +4 -4
  364. package/templates/ts/README.es.md +1 -1
  365. package/templates/ts/README.hi.md +1 -1
  366. package/templates/ts/README.md +1 -1
  367. package/templates/ts/README.pt.md +1 -1
  368. package/templates/ts/README.zh.md +1 -1
  369. package/templates/ts/package.json +4 -4
  370. package/references/official-docs/examples/AGENTS.md +0 -20
@@ -2,33 +2,37 @@
2
2
 
3
3
  [English](session-projection.md) | 中文
4
4
 
5
- 会话投影 seam 是一项[能力 seam](../capability-seams.md):领域 host 插件经由它向客户端载体供给按会话的日志派生状态的当前全量值;三方分别是 Service Definition 与注册表([dsh-session-projection](../../packages/session/session-projection),`ctx.sessionProjections`)、领域贡献方(每个领域注册一个纯单元)与载体([dsh-host-apiproxy](../../packages/host/apiproxy) 的历史尾页与 `session/projection` 推送帧)。它是一项可选能力,不属于 agent loop(智能体循环)主干。框架负责驱动,领域负责计算:注册表只订阅一次 `session/event`,并把每个已提交事件折叠进每个单元;领域不持有任何订阅,客户端也从不折叠领域事件——它们收到的是成品值。设计权威:[session-projection RFC](../../.agents/notes/proposed/architecture/2026-07-27-session-projection-and-command-log.md);驱动、缓存与变更流约定:[包 README](../../packages/session/session-projection/README.md)。
5
+ 会话投影 seam 是一项[能力 seam](../capability-seams.zh.md):领域 host 插件经由它向客户端载体供给按会话的日志派生状态的当前全量值;三方分别是 Service Definition 与注册表([dsh-session-projection](../../packages/session/session-projection),`ctx.sessionProjections`)、领域贡献方(每个领域注册一个纯单元)与载体([dsh-session-controller](../../packages/api/session-controller) 的历史尾页与 `session/projection` 推送帧)。它是一项可选能力,不属于 agent loop(智能体循环)主干。框架负责驱动,领域负责计算:注册表只订阅一次 `session/event`,并把每个已提交事件折叠进每个单元;领域不持有任何订阅,客户端也从不折叠领域事件——它们收到的是成品值。设计权威:[session-projection RFC](../../.agents/notes/proposed/architecture/2026-07-27-session-projection-and-command-log.zh.md);驱动、缓存与变更流约定:[包 README](../../packages/session/session-projection/README.zh.md)。
6
6
 
7
7
  源码:[`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
8
8
 
9
9
  ## 投影单元
10
10
 
11
- `SessionProjectionMap` 是整条链路(host 侧单元、协议块、客户端钩子)的 merge-extensible 类型表;值是协议层 JSON 全量值,渲染归 slot 体系管,永远不归本层。领域为每个 key 贡献一个 `ProjectionDefinition`:
11
+ `SessionProjectionStateMap` host 侧折叠状态的 merge-extensible 类型表,`SessionProjectionMap` 则继续表示客户端可见的全量值。领域为每个状态 key 贡献一个 `ProjectionDefinition`;`wire` 块使该 key 对客户端可见,渲染归 slot 体系管,永远不归本层:
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.
29
33
  * @returns the initial state.
30
34
  */
31
- init(): S
35
+ init(header: SessionHeader): NoInfer<S>
32
36
  /**
33
37
  * Pure transition: previous state + one committed event → next state. A
34
38
  * unit uninterested in an event MUST return the same state reference — an
@@ -37,13 +41,21 @@ interface ProjectionDefinition<K extends keyof SessionProjectionMap, S> {
37
41
  * @param event - the next committed session event.
38
42
  * @returns the next state (same reference when the event is not the unit's).
39
43
  */
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]
44
+ apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>
45
+ /** Client view. Omit for host-only units. */
46
+ wire?: K extends keyof SessionProjectionMap ? {
47
+ /** Validates the wire payload before it leaves the host. */
48
+ viewSchema: ZodType<SessionProjectionMap[K]>
49
+ /**
50
+ * State → wire payload (the read-side projection). The live drive keeps
51
+ * the two latest raw results and compares them with `Object.is`; an
52
+ * object-valued view must reuse its reference to suppress publication
53
+ * across internal-only state changes.
54
+ * @param state - the current state.
55
+ * @returns the whole current value for this unit's key.
56
+ */
57
+ view(state: NoInfer<S>): SessionProjectionMap[K]
58
+ } : never
47
59
  /**
48
60
  * Persisted-cache invalidation version: bump whenever the serialized state fields or the
49
61
  * fold semantics change, so persisted `(sessionId, key, ver, seq, val)`
@@ -60,23 +72,23 @@ interface ProjectionDefinition<K extends keyof SessionProjectionMap, S> {
60
72
 
61
73
  ```ts type-equiv
62
74
  /**
63
- * One consistent read cut over every registered unit for one session.
75
+ * One consistent read cut over every registered client-visible unit for one session.
64
76
  * `asOfSeq` is the shared watermark — the seq of the last event every value
65
- * reflects (`-1` for an empty log, mirroring `session/subscribed.lastSeq`).
77
+ * reflects (`-1` for an empty log).
66
78
  */
67
79
  interface ProjectionSnapshot {
68
80
  /** Seq of the last event the values reflect; -1 for an empty log. */
69
81
  asOfSeq: number
70
- /** Whole current value per registered key. */
82
+ /** Whole current client value per registered key. */
71
83
  values: Partial<SessionProjectionMap>
72
84
  }
73
85
  ```
74
86
 
75
87
  ```ts type-equiv
76
88
  /**
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).
89
+ * Change-feed listener: one unit's raw `view` result changed by `Object.is`
90
+ * for one session. `value` is the schema-validated output; `seq` is the
91
+ * unit's watermark at emission (the seq of the event that caused the change).
80
92
  */
81
93
  type ProjectionChangeListener = (
82
94
  session: Session,
@@ -86,11 +98,11 @@ type ProjectionChangeListener = (
86
98
  ) => void
87
99
  ```
88
100
 
89
- `snapshot(session)` 完全同步:载体在切出页面切片的同一 tick 内读取它,因此 `asOfSeq` 使两次读取使用同一个序号。每个值在返回前都会通过其单元的 schema 校验;如果 `view` 被误写为异步函数,它会返回 Promise,schema 校验将拒绝该值。对于每个已提交事件,变更流会为每个状态*引用*已变化的单元触发一次;状态未变时,`apply` 必须返回同一引用。
101
+ `snapshot(session)` 完全同步:载体在切出页面切片的同一 tick 内读取它,因此 `asOfSeq` 使两次读取使用同一个序号。它只返回客户端视图,并在返回前通过各单元的 `viewSchema` 校验。`stateOf(session, key)` 可在不计算无关视图的情况下读取一份实时 host 状态;调用方不得修改这一借用引用。state 引用变化时,注册表计算并缓存一次原始 view;只有该结果通过 `Object.is` 判定为变化时才触发变更流,对象 view 若要在仅内部 state 变化时抑制发布就必须保留引用。
90
102
 
91
103
  ## 注册表:`ctx.sessionProjections`
92
104
 
93
- `SessionProjectionRegistry`([签名](#ctxsessionprojections--sessionprojectionregistry))拥有驱动权:一份 `session/event` 订阅、对每个已注册单元即时调用 `apply`,以及每会话每单元的水位线(watermark)cell。cell 惰性构建:在事件流过之后才注册的单元,或比注册表更早的会话,都在首次触达(事件或读取)时从 `init` 出发在内存日志上折叠。注册是一个 effect,其 disposer 随调用方 fiber 走:领域插件卸载后,其 key(连同缓存的 cell)从后续驱动与快照中消失,客户端将其读作能力缺失;key 重复直接 throw。领域插件在 `ctx.inject(['sessionProjections'], …)` 下注册,因此不带注册表的 headless 组装完全不受影响。
105
+ `SessionProjectionRegistry`([签名](#ctxsessionprojections--sessionprojectionregistry))拥有驱动权:一份 `session/event` 订阅、对每个已注册单元即时调用 `apply`,以及每会话每单元的水位线(watermark)cell。cell 惰性构建:在事件流过之后才注册的单元,或比注册表更早的会话,都在首次触达(事件或读取)时从 `init` 出发在内存日志上折叠。注册是一个 effect,其 disposer 随调用方 fiber 走:领域插件卸载后,其 key(连同缓存的 cell)从后续驱动与快照中消失,客户端将其读作能力缺失;key 以不同 `stateVersion` 重复时直接 throw,同版本注册方则共享一个单元并被计数。领域插件在 `ctx.inject(['sessionProjections'], …)` 下注册,因此不带注册表的 headless 组装完全不受影响。
94
106
 
95
107
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
96
108
 
@@ -98,63 +110,77 @@ type ProjectionChangeListener = (
98
110
 
99
111
  ## Cordis API
100
112
 
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).
113
+ 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.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
102
114
 
103
115
  <a id="ctxsessionprojectioncache--sessionprojectioncache"></a>
104
116
 
105
117
  ### `ctx.sessionProjectionCache` — `SessionProjectionCache`
106
118
 
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.
119
+ 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
120
 
109
121
  ```ts cordis-catalog
110
122
  /**
111
123
  * 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
124
+ * rows (version-matching keys only), each cut carried with its watermark so
125
+ * a client value store can seed under its higher-seq-wins rule — as stale
126
+ * as the last durable checkpoint but never wrong, and never from an
115
127
  * 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.
128
+ * paths (the history tail baseline) supersede these values whenever a
129
+ * session is actually opened.
118
130
  * @param meta - the listed session's header (identity witness; no log read).
131
+ * @param keys - optional projection keys required by the caller's audience.
119
132
  * @returns the cut (`asOfSeq` = lowest served-row watermark), or
120
133
  * `undefined` when no usable row exists for this lifecycle.
121
134
  */
122
- cachedSnapshot(meta: SessionHeader): ProjectionSnapshot | undefined
135
+ cachedSnapshot( meta: SessionHeader, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
136
+
137
+ /**
138
+ * Hydrate projection cells for an already-prepared Session without another
139
+ * persistence read. The cache seeds matching rows; the supplied exact log
140
+ * advances every unit to the observation cut. No checkpoint is written
141
+ * because the logical observation may contain recovery events not yet durable.
142
+ * @param session - exact unpublished Session retained by persistence.
143
+ * @param meta - observed lifecycle header.
144
+ * @param events - exact logical event prefix represented by the observation.
145
+ * @returns all projection values at the event cut.
146
+ */
147
+ hydratePrepared( session: Session, meta: SessionHeader, events: readonly SessionEvent[], ): ProjectionSnapshot
123
148
 
124
149
  /**
125
- * Durably checkpoint one live session NOW (both mandatory points call
150
+ * Durably checkpoint one live session NOW (all mandatory points call
126
151
  * 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.
152
+ * this boundary (states are live references), then the session's record is
153
+ * replaced on the domain's write chain. NOT fail-soft — callers on the
154
+ * fail-soft paths contain it.
129
155
  * @param session - the live session to checkpoint.
130
156
  * @returns resolution after durability and event emission.
131
157
  */
132
158
  async write(session: Session): Promise<void>
133
159
 
134
160
  /**
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.
161
+ * Cold-read one session's projections from its complete log. Each unit is
162
+ * seeded from the identity-checked cached rows the registry skips `apply`
163
+ * for the already-folded prefix (events at or below the row's `seq`) and
164
+ * the refreshed checkpoint is written back (fail-soft, fire-and-forget), so
165
+ * the first cold read creates the cache row and later ones seed from it.
166
+ * The caller supplies the complete log in seq order: this service never
167
+ * consults the persistence layer.
168
+ * @param meta - the stored session header (identity witness).
169
+ * @param events - the session's complete log, in seq order.
170
+ * @returns the projection cut at the log end.
145
171
  */
146
- async coldSnapshot(id: SessionId, signal?: AbortSignal): Promise<ProjectionSnapshot>
172
+ coldSnapshot(meta: SessionHeader, events: readonly SessionEvent[]): ProjectionSnapshot
147
173
  ```
148
174
 
149
- Types: [Session](session.md) · [SessionHeader](persistence.md) · [SessionId](core.md)
175
+ Types: [Session](session.zh.md) · [SessionEvent](session.zh.md) · [SessionHeader](persistence.zh.md)
150
176
 
151
- Source: [`packages/session/session-projection-cache/src/index.ts:71`](../../packages/session/session-projection-cache/src/index.ts)
177
+ Source: [`packages/session/session-projection-cache/src/index.ts`](../../packages/session/session-projection-cache/src/index.ts)
152
178
 
153
179
  <a id="ctxsessionprojections--sessionprojectionregistry"></a>
154
180
 
155
181
  ### `ctx.sessionProjections` — `SessionProjectionRegistry`
156
182
 
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.
183
+ `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
184
 
159
185
  ```ts cordis-catalog
160
186
  /**
@@ -165,28 +191,57 @@ Source: [`packages/session/session-projection-cache/src/index.ts:71`](../../pack
165
191
  * @param definition - key, state schema, pure unit functions, and stateVersion.
166
192
  * @returns the exact disposer that unregisters this unit.
167
193
  */
168
- register<K extends keyof SessionProjectionMap, S>(definition: ProjectionDefinition<K, S>): () => void
194
+ register< K extends keyof SessionProjectionMap, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'> & { wire: NonNullable<ProjectionDefinition<K, S>['wire']> }, ): () => void
195
+
196
+ /**
197
+ * Register one host-only unit. Its state is omitted from client snapshots
198
+ * and always checkpointed like every other unit.
199
+ * @param definition - key, state schema, pure unit functions, and stateVersion.
200
+ * @returns the exact disposer that unregisters this unit.
201
+ */
202
+ register< K extends Exclude<keyof SessionProjectionStateMap, keyof SessionProjectionMap>, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'>, ): () => void
169
203
 
170
204
  /**
171
205
  * Subscribe to the change feed. The registration is an effect on the
172
206
  * calling context's fiber.
173
- * @param listener - called once per unit whose state reference changed, per committed event.
207
+ * @param listener - called once per client-visible unit whose raw view changed by `Object.is`, per committed event.
174
208
  * @returns the exact disposer that unsubscribes.
175
209
  */
176
210
  onChanged(listener: ProjectionChangeListener): () => void
177
211
 
178
212
  /**
179
- * One consistent cut over every registered unit for one session, read from
213
+ * Read one unit's current host state after materializing every registered
214
+ * unit at the Session cursor. Unrelated wire views are not produced.
215
+ * The returned value is live; callers must not mutate it.
216
+ * @param session - the session whose state is read.
217
+ * @param key - the registered unit key.
218
+ * @returns current state, or `undefined` when the key is not registered.
219
+ */
220
+ stateOf<K extends keyof SessionProjectionStateMap>( session: Session, key: K, ): SessionProjectionStateMap[K] | undefined
221
+
222
+ /**
223
+ * One consistent cut over every registered client-visible unit for one session, read from
180
224
  * the watermark cache (missing cells fold lazily over the in-memory log).
181
225
  * Fully synchronous — every value and `asOfSeq` reflect the same log
182
- * position. Each value passes its unit's schema before leaving.
226
+ * position. Each value passes its unit's `viewSchema` before leaving.
183
227
  * @param session - the session whose projection values are read.
184
- * @returns the snapshot; `values` is empty when no unit is registered.
228
+ * @param keys - optional client-visible outputs; state materialization remains complete.
229
+ * @returns the snapshot; `values` is empty when no selected client-visible unit is registered.
185
230
  */
186
- snapshot(session: Session): ProjectionSnapshot
231
+ snapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot
187
232
 
188
233
  /**
189
- * State-level checkpoint of every registered unit for one session, read
234
+ * Read only already-materialized client-visible cells without folding history.
235
+ * Values may trail the live Session and are therefore hints, not a complete
236
+ * baseline. Missing cells are omitted.
237
+ * @param session - attached Session whose cached cells are inspected.
238
+ * @param keys - optional wire keys to view.
239
+ * @returns the lowest common cached cut, or `undefined` when no wire cell exists.
240
+ */
241
+ cachedSnapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
242
+
243
+ /**
244
+ * State-level checkpoint of every persisted unit for one session, read
190
245
  * from the watermark cache (missing cells fold lazily over the in-memory
191
246
  * log). This is the write side of the persisted projection cache: the
192
247
  * returned rows are the `(key → {ver, seq, val})` part of the durable
@@ -197,7 +252,7 @@ snapshot(session: Session): ProjectionSnapshot
197
252
  * every subsequent snapshot and frame through it (plain JSON by the unit
198
253
  * contract, so the clone is total).
199
254
  * @param session - the session whose unit states are checkpointed.
200
- * @returns one row per registered key; empty when no unit is registered.
255
+ * @returns one row per registered key.
201
256
  */
202
257
  checkpoint(session: Session): ProjectionCheckpoint
203
258
 
@@ -221,18 +276,19 @@ restoreFloor(checkpoint: ProjectionCheckpoint): number | undefined
221
276
 
222
277
  /**
223
278
  * 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
279
+ * client-visible unit whose row's `ver` matches, serve the schema-validated
280
+ * `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key
226
281
  * absent (a cold or listing consumer treats it as not-yet-available and a
227
282
  * fuller read path refolds it). The zero-I/O rung of the read ladder —
228
283
  * values are as stale as their rows, never wrong.
229
284
  * @param checkpoint - persisted rows for one session (possibly stale or empty).
285
+ * @param keys - optional wire keys to view.
230
286
  * @returns whole values per key with a usable row; empty when none.
231
287
  */
232
- viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
288
+ viewCheckpoint( checkpoint: ProjectionCheckpoint, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): Partial<SessionProjectionMap>
233
289
 
234
290
  /**
235
- * Cold read: fold every registered unit over a stored log suffix, seeding
291
+ * Cold read: fold every persisted unit over a stored log suffix, seeding
236
292
  * each from its checkpoint row when usable — the one read recipe (cached
237
293
  * state + forward tail replay + `view`) applied without a live `Session`.
238
294
  * Call with the events returned by a persistence
@@ -249,14 +305,27 @@ viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
249
305
  * @param checkpoint - persisted rows for one session (possibly stale or empty).
250
306
  * @param events - the stored events with `seq >= baseSeq`, in seq order.
251
307
  * @param baseSeq - the seq `events` starts at (its first event's seq when non-empty).
308
+ * @param header - immutable metadata for the Session being restored.
252
309
  * @returns the snapshot cut at the supplied log end (`asOfSeq` is the last
253
310
  * supplied event's seq, `baseSeq - 1` for an empty tail) plus the
254
311
  * refreshed checkpoint rows at that cut, ready for a durable write-back.
255
312
  */
256
- restore(checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
313
+ restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number, header: SessionHeader, ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
314
+
315
+ /**
316
+ * Restore an exact cut and install its states on the supplied prepared Session.
317
+ * A later publication reuses these cells; ordinary live reads and event drive
318
+ * advance any constructor-owned suffix exactly once.
319
+ * @param session - exact prepared Session that owns the restored log prefix.
320
+ * @param checkpoint - persisted rows for this Session lifecycle.
321
+ * @param events - exact events at the observation cut.
322
+ * @param baseSeq - first supplied event sequence.
323
+ * @returns all projection values at the supplied cut.
324
+ */
325
+ hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number, ): ProjectionSnapshot
257
326
  ```
258
327
 
259
- Types: [Session](session.md) · [SessionEvent](session.md)
328
+ Types: [Session](session.zh.md) · [SessionEvent](session.zh.md) · [SessionHeader](persistence.zh.md)
260
329
 
261
- Source: [`packages/session/session-projection/src/index.ts:171`](../../packages/session/session-projection/src/index.ts)
330
+ Source: [`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
262
331
  <!-- END GENERATED cordis-surface -->
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/session-query.md
5
- session-query.md: 6ddde5b8a19ebc65952b5a24003c48f55ff5a244
6
- session-query.zh.md: b7d4ab4910c99c9f77c17f0279f2d4fd3c336659
5
+ session-query.md: 74fb3e15514afd32c594b083732153a1f03b21d5
6
+ session-query.zh.md: fee4c29f67bf850fa9ed07d869308844e84b2bb4
@@ -138,7 +138,7 @@ interface SessionEventSearchDocument extends SessionEventRecord {
138
138
  }
139
139
  ```
140
140
 
141
- `ctx.sessionQuery.filterSessions(filters)` applies `SessionResultFilter` to the complete logical corpus; `ctx.sessionQuery.filterEvents(sessionId, filters)` returns matching documents in ascending seq order. Messages, reasoning, tool calls/results, blocked prompts, todos, and failure/status detail contribute semantic text; structural events and stream chunks do not.
141
+ `ctx.sessionQuery.filterSessions(filters)` applies `SessionResultFilter` to the complete logical corpus; `ctx.sessionQuery.filterEvents(sessionId, filters)` returns matching documents in ascending seq order. Messages, tool calls/results, todos, and failure/status detail contribute semantic text; reasoning blocks, blocked prompts, structural events, and stream chunks do not.
142
142
 
143
143
  ## Full-text search pages
144
144
 
@@ -362,7 +362,7 @@ type SessionQueryErrorCode =
362
362
 
363
363
  ## Cordis API
364
364
 
365
- 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).
365
+ 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).
366
366
 
367
367
  <a id="ctxsessionquery--sessionqueryengine-abstract-seam"></a>
368
368
 
@@ -373,6 +373,14 @@ Unified live-preferred session query service.
373
373
  Exact reads, filters, and traces are backend-independent concrete behavior. A backend implements full-text observation, reconciliation, ranking, cursor generations, and query execution on the same `ctx.sessionQuery` service.
374
374
 
375
375
  ```ts cordis-catalog
376
+ /**
377
+ * Observe one exact live or prepared Session without a persistence listing preflight.
378
+ * @param sessionId - logical Session identity.
379
+ * @param options - cancellation and projection selection for this read.
380
+ * @returns a caller-owned observation lease.
381
+ */
382
+ observeSession( sessionId: SessionId, options: SessionObservationOptions = {}, ): Promise<SessionObservation>
383
+
376
384
  /**
377
385
  * Search the live-preferred logical corpus and group by session.
378
386
  * @param request - query text, metadata filters, page size, and cursor.
@@ -491,5 +499,5 @@ async readEvent(request: SessionEventReadRequest, signal?: AbortSignal): Promise
491
499
 
492
500
  Types: [SessionId](core.md) · [SessionTitleSnapshot](session-title.md)
493
501
 
494
- Source: [`packages/session-query/session-query/src/index.ts:81`](../../packages/session-query/session-query/src/index.ts)
502
+ Source: [`packages/session-query/session-query/src/index.ts`](../../packages/session-query/session-query/src/index.ts)
495
503
  <!-- END GENERATED cordis-surface -->
@@ -138,7 +138,7 @@ interface SessionEventSearchDocument extends SessionEventRecord {
138
138
  }
139
139
  ```
140
140
 
141
- `ctx.sessionQuery.filterSessions(filters)` 会对完整的逻辑会话语料库应用 `SessionResultFilter`;`ctx.sessionQuery.filterEvents(sessionId, filters)` 按 seq 升序返回匹配的文档。消息、推理(reasoning)、工具调用和工具结果、被阻止的提示词、待办事项,以及失败和状态详情会纳入语义文本;结构事件和流分片则不会。
141
+ `ctx.sessionQuery.filterSessions(filters)` 会对完整的逻辑会话语料库应用 `SessionResultFilter`;`ctx.sessionQuery.filterEvents(sessionId, filters)` 按 seq 升序返回匹配的文档。消息、工具调用和工具结果、待办事项,以及失败和状态详情会纳入语义文本;推理(reasoning)块、被阻止的提示词、结构事件和流分片则不会。
142
142
 
143
143
  ## 全文搜索结果页
144
144
 
@@ -362,7 +362,7 @@ type SessionQueryErrorCode =
362
362
 
363
363
  ## Cordis API
364
364
 
365
- 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).
365
+ 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.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
366
366
 
367
367
  <a id="ctxsessionquery--sessionqueryengine-abstract-seam"></a>
368
368
 
@@ -373,6 +373,14 @@ Unified live-preferred session query service.
373
373
  Exact reads, filters, and traces are backend-independent concrete behavior. A backend implements full-text observation, reconciliation, ranking, cursor generations, and query execution on the same `ctx.sessionQuery` service.
374
374
 
375
375
  ```ts cordis-catalog
376
+ /**
377
+ * Observe one exact live or prepared Session without a persistence listing preflight.
378
+ * @param sessionId - logical Session identity.
379
+ * @param options - cancellation and projection selection for this read.
380
+ * @returns a caller-owned observation lease.
381
+ */
382
+ observeSession( sessionId: SessionId, options: SessionObservationOptions = {}, ): Promise<SessionObservation>
383
+
376
384
  /**
377
385
  * Search the live-preferred logical corpus and group by session.
378
386
  * @param request - query text, metadata filters, page size, and cursor.
@@ -489,7 +497,7 @@ async traceEvent(request: SessionEventTraceRequest, signal?: AbortSignal): Promi
489
497
  async readEvent(request: SessionEventReadRequest, signal?: AbortSignal): Promise<SessionEventWindow>
490
498
  ```
491
499
 
492
- Types: [SessionId](core.md) · [SessionTitleSnapshot](session-title.md)
500
+ Types: [SessionId](core.zh.md) · [SessionTitleSnapshot](session-title.zh.md)
493
501
 
494
- Source: [`packages/session-query/session-query/src/index.ts:81`](../../packages/session-query/session-query/src/index.ts)
502
+ Source: [`packages/session-query/session-query/src/index.ts`](../../packages/session-query/session-query/src/index.ts)
495
503
  <!-- END GENERATED cordis-surface -->
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/session-reference.md
5
- session-reference.md: 4140eb2a27d79ee0975d97ae9e96a1b502d74187
6
- session-reference.zh.md: 9dcfdbd07d4df1c54c51dc06d36af2f052969783
5
+ session-reference.md: 1dd5cc1ee8c594b34015f9bf2d765f68621b86a1
6
+ session-reference.zh.md: 75b5018a6afbd1bbe21f303013e0e7fa0d1f89ab
@@ -2,9 +2,23 @@
2
2
 
3
3
  English | [中文](session-reference.zh.md)
4
4
 
5
- Structured cross-session reference requests and prepared message contexts. The [package contract](../../packages/context/session-reference) defines canonical URIs, current-surface projection, tag-safe JSON and byte retention, stable errors, and the untrusted model prompt. Host adapters use these types instead of passing their UI mention syntax into the agent core.
5
+ Host-backed file discovery plus structured cross-session reference requests and prepared message contexts. The [file-reference contract](../../packages/context/file-reference) owns path-only completion records and grammar; the [session-reference contract](../../packages/context/session-reference) defines canonical URIs, current-surface projection, tag-safe JSON and byte retention, stable errors, and the untrusted model prompt. Host adapters use these types instead of passing their UI mention syntax into the agent core.
6
6
 
7
- Source: [`packages/context/session-reference/src/types.ts`](../../packages/context/session-reference/src/types.ts)
7
+ Sources: [`packages/context/file-reference/src/types.ts`](../../packages/context/file-reference/src/types.ts) · [`packages/context/session-reference/src/types.ts`](../../packages/context/session-reference/src/types.ts)
8
+
9
+ ## File candidates
10
+
11
+ `FileReferenceCandidate` is the path-only discovery result. The addressed agent supplies the working-directory scope; providers decide ranking and namespace access without reading file contents.
12
+
13
+ ```ts type-equiv
14
+ /** One path-only completion candidate inside the target session cwd. */
15
+ interface FileReferenceCandidate {
16
+ /** User-facing path accepted by normal prompts and filesystem tools. */
17
+ path: string
18
+ /** Directories keep completion open; files finish the mention. */
19
+ kind: 'file' | 'directory'
20
+ }
21
+ ```
8
22
 
9
23
  ## Inputs and candidates
10
24
 
@@ -20,7 +34,7 @@ interface SessionReferenceInput {
20
34
  }
21
35
  ```
22
36
 
23
- `SessionReferenceCandidate` is host-facing discovery output. Its label uses the latest session title when present, while filtering still searches only session id and cwd and never transcript text.
37
+ `SessionReferenceCandidate` is host-facing discovery output. Its label uses the latest session title when present, and filtering searches that label alongside session id and cwd, never transcript text.
24
38
 
25
39
  ```ts type-equiv
26
40
  /** One host-facing candidate from exact session metadata. */
@@ -31,11 +45,27 @@ interface SessionReferenceCandidate {
31
45
  label: string
32
46
  /** Source session working directory, when recorded. */
33
47
  cwd?: string
48
+ /**
49
+ * True when {@link SessionReferenceCandidate.cwd} is recorded and equals the
50
+ * requesting agent's. Hosts that only surface a distinguishing location
51
+ * read this instead of comparing paths they never received.
52
+ */
53
+ sameWorkspace: boolean
34
54
  /** Source session creation time in Unix epoch milliseconds. */
35
55
  createdAt: number
36
56
  }
37
57
  ```
38
58
 
59
+ The `sessionReferenceResolver/candidates` Remote method serves the same discovery to browser consumers and attaches each candidate's canonical prompt mention.
60
+
61
+ ```ts type-equiv
62
+ /** One discovery candidate carrying its canonical prompt mention. */
63
+ interface SessionReferenceMentionCandidate extends SessionReferenceCandidate {
64
+ /** Canonical `@[label](dsh-session:…)` mention serialized into the prompt draft. */
65
+ mention: string
66
+ }
67
+ ```
68
+
39
69
  ## Prepared messages
40
70
 
41
71
  Preparation preserves readable current-message content and returns at most one aggregated context.
@@ -72,7 +102,49 @@ type SessionReferenceErrorCode =
72
102
 
73
103
  ## Cordis API
74
104
 
75
- 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).
105
+ 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).
106
+
107
+ <a id="ctxfilereferences--filereferenceservice-abstract-seam"></a>
108
+
109
+ ### `ctx.fileReferences` — `FileReferenceService` (abstract seam)
110
+
111
+ Host capability for cancellable file-reference discovery.
112
+
113
+ ```ts cordis-catalog
114
+ /**
115
+ * List file and directory candidates for one agent's working directory.
116
+ * @param agent - target agent whose session cwd bounds discovery.
117
+ * @param query - path text following `@` or `@"`.
118
+ * @param signal - caller cancellation.
119
+ * @returns deterministic path-only candidates.
120
+ */
121
+ abstract list( agent: Agent, query: string, signal: AbortSignal, ): Promise<FileReferenceCandidate[]>
122
+ ```
123
+
124
+ Types: [Agent](core.md)
125
+
126
+ Source: [`packages/context/file-reference/src/index.ts`](../../packages/context/file-reference/src/index.ts)
127
+
128
+ <a id="ctxsessionfilereferences--sessionfilereferences"></a>
129
+
130
+ ### `ctx.sessionFileReferences` — `SessionFileReferences`
131
+
132
+ Host Remote adapter over the composed file-reference provider.
133
+
134
+ ```ts cordis-catalog
135
+ /**
136
+ * List file and directory candidates for one Agent's working directory.
137
+ * @param agent - target Agent resolved from the Session identity on the wire.
138
+ * @param query - path text following `@` or `@"`.
139
+ * @param signal - caller cancellation.
140
+ * @returns deterministic path-only candidates from the composed provider.
141
+ */
142
+ @Remote list( agent: Agent, query: string, signal: AbortSignal, ): Promise<FileReferenceCandidate[]>
143
+ ```
144
+
145
+ Types: [Agent](core.md)
146
+
147
+ Source: [`packages/api/session-controller/src/file-references.ts`](../../packages/api/session-controller/src/file-references.ts)
76
148
 
77
149
  <a id="ctxsessionreferenceresolver--sessionreferenceresolver"></a>
78
150
 
@@ -83,6 +155,10 @@ Exact-read consumer that prepares immutable cross-session message context.
83
155
  ```ts cordis-catalog
84
156
  /**
85
157
  * List reference candidates, ranked by working-directory affinity.
158
+ *
159
+ * Discovery runs at keystroke rate, so a title only ever comes from a
160
+ * projection read: see {@link SessionReferenceResolver.projectedTitle} for
161
+ * which sessions can answer one and which fall back to their id.
86
162
  * @param agent - target agent; self is excluded and its cwd drives ranking.
87
163
  * @param query - optional case-insensitive session-id/cwd/title substring.
88
164
  * @param limit - optional positive result cap.
@@ -92,11 +168,22 @@ Exact-read consumer that prepares immutable cross-session message context.
92
168
  async listCandidates( agent: Agent, query: string = '', limit: number = this.config.candidateLimit, signal?: AbortSignal, ): Promise<SessionReferenceCandidate[]>
93
169
 
94
170
  /**
95
- * Snapshot all references before enqueue and return one aggregated durable context.
171
+ * Remote face of {@link listCandidates}: the configured candidate limit
172
+ * applies, and every candidate carries the canonical mention a host inserts
173
+ * into the prompt draft.
174
+ * @param agent - target agent; self is excluded and its cwd drives ranking.
175
+ * @param query - optional case-insensitive session-id/cwd/title substring.
176
+ * @param signal - caller cancellation.
177
+ * @returns mention-carrying candidates in rank order.
178
+ */
179
+ @Remote('candidates') async remoteExportCandidates( agent: Agent, query: string, signal: AbortSignal, ): Promise<SessionReferenceMentionCandidate[]>
180
+
181
+ /**
182
+ * Snapshot all references for one accepted direct message and return one aggregated durable context.
96
183
  * @param agent - target agent; references to it are rejected.
97
184
  * @param content - already host-normalized readable message content.
98
185
  * @param references - structured source sessions in mention order.
99
- * @param signal - optional cancellation boundary for host request teardown.
186
+ * @param signal - optional cancellation boundary for the active turn.
100
187
  * @returns detached content and optional referenced-session context.
101
188
  */
102
189
  async prepare( agent: Agent, content: ContentBlock[], references: SessionReferenceInput[], signal?: AbortSignal, ): Promise<PreparedReferencedMessage>
@@ -104,5 +191,5 @@ async prepare( agent: Agent, content: ContentBlock[], references: SessionReferen
104
191
 
105
192
  Types: [Agent](core.md) · [ContentBlock](llm-streaming.md)
106
193
 
107
- Source: [`packages/context/session-reference/src/index.ts:70`](../../packages/context/session-reference/src/index.ts)
194
+ Source: [`packages/context/session-reference/src/index.ts`](../../packages/context/session-reference/src/index.ts)
108
195
  <!-- END GENERATED cordis-surface -->