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
@@ -22,7 +22,7 @@ interface SessionRecord {
22
22
  header: SessionHeader
23
23
  /** Whether the id currently exists in `ctx.sessions`. */
24
24
  live: boolean
25
- /** Whether the active persistence backend currently materializes the id. */
25
+ /** Whether the active persistence backend currently lists the id, including a created-but-unmaterialized session it already observes. */
26
26
  persisted: boolean
27
27
  }
28
28
  ```
@@ -34,7 +34,9 @@ interface SessionRecord {
34
34
  interface SessionLogSnapshot {
35
35
  /** Cloned session header selected from the same observation as `events`. */
36
36
  session: SessionHeader
37
- /** Cloned contiguous raw events after persistence repair and replay validation. */
37
+ /** Exact number of fork-inherited events in the observed log. */
38
+ inheritedEventCount: SessionLogOffset
39
+ /** Cloned contiguous raw events after in-memory interrupted-turn balancing and replay validation. */
38
40
  events: SessionEvent[]
39
41
  }
40
42
  ```
@@ -44,8 +46,10 @@ interface SessionLogSnapshot {
44
46
  interface SessionSurfaceSnapshot {
45
47
  /** Cloned session header selected from the same corpus observation as `events`. */
46
48
  session: SessionHeader
49
+ /** Exact number of fork-inherited events in the observed log. */
50
+ inheritedEventCount: SessionLogOffset
47
51
  /** Highest raw-log seq included in the observation, or `null` for an empty log. */
48
- capturedThroughSeq: number | null
52
+ capturedThroughSeq: OptionalSessionSeq
49
53
  /** Cloned current surface events in model-history order. */
50
54
  events: SurfaceEvent[]
51
55
  }
@@ -90,7 +94,7 @@ interface SessionEventRecord {
90
94
  /** Session that owns the event. */
91
95
  sessionId: SessionId
92
96
  /** Monotonic event seq within the session. */
93
- seq: number
97
+ seq: SessionSeq
94
98
  /** Discriminant of the session event. */
95
99
  type: SessionEventType
96
100
  /** Event timestamp in Unix epoch milliseconds. */
@@ -138,7 +142,7 @@ interface SessionEventSearchDocument extends SessionEventRecord {
138
142
  }
139
143
  ```
140
144
 
141
- `ctx.sessionQuery.filterSessions(filters)` 会对完整的逻辑会话语料库应用 `SessionResultFilter`;`ctx.sessionQuery.filterEvents(sessionId, filters)` 按 seq 升序返回匹配的文档。消息、推理(reasoning)、工具调用和工具结果、被阻止的提示词、待办事项,以及失败和状态详情会纳入语义文本;结构事件和流分片则不会。
145
+ `ctx.sessionQuery.filterSessions(filters)` 会对完整的逻辑会话语料库应用 `SessionResultFilter`;`ctx.sessionQuery.filterEvents(sessionId, filters)` 按 seq 升序返回匹配的文档。消息、工具调用和工具结果、待办事项,以及失败和状态详情会纳入语义文本;推理(reasoning)块、被阻止的提示词、结构事件和流分片则不会。
142
146
 
143
147
  ## 全文搜索结果页
144
148
 
@@ -266,7 +270,7 @@ interface SessionEventReadRequest {
266
270
  /** Session that owns the target event. */
267
271
  sessionId: SessionId
268
272
  /** Target event seq. */
269
- seq: number
273
+ seq: SessionSeq
270
274
  /** Number of preceding raw events to include. */
271
275
  before?: number
272
276
  /** Number of following raw events to include. */
@@ -279,14 +283,16 @@ interface SessionEventReadRequest {
279
283
  interface SessionEventWindow {
280
284
  /** Cloned header for the live-preferred source read. */
281
285
  session: SessionHeader
286
+ /** Exact number of fork-inherited events in the observed log. */
287
+ inheritedEventCount: SessionLogOffset
282
288
  /** Full cloned target event. */
283
289
  target: SessionEvent
284
290
  /** Full cloned events from `startSeq` through `endSeq`. */
285
291
  events: SessionEvent[]
286
292
  /** First seq included in `events`. */
287
- startSeq: number
293
+ startSeq: SessionSeq
288
294
  /** Last seq included in `events`. */
289
- endSeq: number
295
+ endSeq: SessionSeq
290
296
  }
291
297
  ```
292
298
 
@@ -300,7 +306,7 @@ interface SessionEventTraceRequest {
300
306
  /** Session that owns the target event. */
301
307
  sessionId: SessionId
302
308
  /** Target event seq. */
303
- seq: number
309
+ seq: SessionSeq
304
310
  }
305
311
  ```
306
312
 
@@ -310,15 +316,15 @@ interface SessionEventTrace {
310
316
  /** Lightweight target record. */
311
317
  target: SessionEventRecord
312
318
  /** Immediate positional replacement event, when the target was shadowed. */
313
- replacedBy?: number
319
+ replacedBy?: SessionSeq
314
320
  /** Positional replacers from the immediate replacement to the final replacement. */
315
- replacementChain: number[]
321
+ replacementChain: SessionSeq[]
316
322
  /** Surface nodes directly removed when the target itself performed a replacement. */
317
- replacedEventSeqs: number[]
323
+ replacedEventSeqs: SessionSeq[]
318
324
  /** Earlier events cited directly as sources, in their recorded order. */
319
- sourceEventSeqs: number[]
325
+ sourceEventSeqs: SessionSeq[]
320
326
  /** Later events that directly cite the target as a source, in log order. */
321
- derivedEventSeqs: number[]
327
+ derivedEventSeqs: SessionSeq[]
322
328
  }
323
329
  ```
324
330
 
@@ -362,7 +368,7 @@ type SessionQueryErrorCode =
362
368
 
363
369
  ## Cordis API
364
370
 
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).
371
+ 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
372
 
367
373
  <a id="ctxsessionquery--sessionqueryengine-abstract-seam"></a>
368
374
 
@@ -373,6 +379,14 @@ Unified live-preferred session query service.
373
379
  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
380
 
375
381
  ```ts cordis-catalog
382
+ /**
383
+ * Observe one exact live or prepared Session without a persistence listing preflight.
384
+ * @param sessionId - logical Session identity.
385
+ * @param options - cancellation and projection selection for this read.
386
+ * @returns a caller-owned observation lease.
387
+ */
388
+ observeSession( sessionId: SessionId, options: SessionObservationOptions = {}, ): Promise<SessionObservation>
389
+
376
390
  /**
377
391
  * Search the live-preferred logical corpus and group by session.
378
392
  * @param request - query text, metadata filters, page size, and cursor.
@@ -489,7 +503,7 @@ async traceEvent(request: SessionEventTraceRequest, signal?: AbortSignal): Promi
489
503
  async readEvent(request: SessionEventReadRequest, signal?: AbortSignal): Promise<SessionEventWindow>
490
504
  ```
491
505
 
492
- Types: [SessionId](core.md) · [SessionTitleSnapshot](session-title.md)
506
+ Types: [SessionId](core.zh.md) · [SessionTitleSnapshot](session-title.zh.md)
493
507
 
494
- Source: [`packages/session-query/session-query/src/index.ts:81`](../../packages/session-query/session-query/src/index.ts)
508
+ Source: [`packages/session-query/session-query/src/index.ts`](../../packages/session-query/session-query/src/index.ts)
495
509
  <!-- 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 -->
@@ -2,9 +2,23 @@
2
2
 
3
3
  [English](session-reference.md) | 中文
4
4
 
5
- 结构化的跨会话引用请求与准备后的消息上下文。[包约定](../../packages/context/session-reference) 定义规范 URI、当前表层投影、标签安全的 JSON 与字节保留、稳定错误和不可信的模型提示词。宿主适配器使用这些类型,而不会把各自 UI 的提及语法传入 agent(智能体)核心。
5
+ 由 Host 支撑的文件发现,以及结构化的跨会话引用请求与准备后的消息上下文。[文件引用约定](../../packages/context/file-reference)负责仅含路径的补全记录与语法;[会话引用约定](../../packages/context/session-reference)定义规范 URI、当前表层投影、标签安全的 JSON 与字节保留、稳定错误和不可信的模型提示词。宿主适配器使用这些类型,而不会把各自 UI 的提及语法传入 agent(智能体)核心。
6
6
 
7
- 来源:[`packages/context/session-reference/src/types.ts`](../../packages/context/session-reference/src/types.ts)
7
+ 来源:[`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
+ ## 文件候选项
10
+
11
+ `FileReferenceCandidate` 是仅含路径的发现结果。被寻址的 agent 提供工作目录范围;提供方负责排序和命名空间访问,但不会读取文件内容。
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
  ## 输入与候选项
10
24
 
@@ -20,7 +34,7 @@ interface SessionReferenceInput {
20
34
  }
21
35
  ```
22
36
 
23
- `SessionReferenceCandidate` 是面向宿主的发现输出。存在最新会话标题时,它的 label 使用该标题;筛选仍只搜索 session id 和 cwd,绝不搜索 transcript(文本记录)。
37
+ `SessionReferenceCandidate` 是面向宿主的发现输出。存在最新会话标题时,它的 label 使用该标题;筛选搜索该 label 以及 session id 和 cwd,绝不搜索 transcript(文本记录)。
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
+ `sessionReferenceResolver/candidates` Remote 方法向浏览器消费方提供同一发现能力,并为每个候选附上规范提示词 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
  ## 准备后的消息
40
70
 
41
71
  准备过程保留可读的当前消息内容,并最多返回一个聚合上下文。
@@ -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.zh.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.zh.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.zh.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,17 +168,28 @@ 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>
103
190
  ```
104
191
 
105
- Types: [Agent](core.md) · [ContentBlock](llm-streaming.md)
192
+ Types: [Agent](core.zh.md) · [ContentBlock](llm-streaming.zh.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 -->
@@ -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-telemetry.md
5
- session-telemetry.md: dd00e428c3ecb1e0158be09cce83d1a262ab0c62
6
- session-telemetry.zh.md: 835fc0ff2f2daa1f4ac90fe615a62aa36f7fe41d
5
+ session-telemetry.md: 718fe5dabfd1c059a6a02077407480e96bdd271a
6
+ session-telemetry.zh.md: d4081664a121877e36a2cba123e9c5840108b529
@@ -64,9 +64,8 @@ The seam's acknowledgement contract (owned by the [Service Definition README's s
64
64
  /**
65
65
  * Deployment-selected session-sharing policy disclosed by a mounted
66
66
  * {@link SessionTelemetryBackend} backend to human-facing acknowledgement surfaces (the
67
- * `/feedback` command's confirmation text). The seam owns the vocabulary so
68
- * any backend can disclose a policy without depending on the OTel package;
69
- * the values mirror the OTel backend's serialized `SessionTelemetryMode` choices.
67
+ * `/feedback` command's confirmation text). The Service Definition owns the
68
+ * vocabulary so consumers and backends do not depend on a specific provider.
70
69
  */
71
70
  type SessionTelemetrySharingStatus = 'full' | 'feedback-only' | 'disabled'
72
71
  ```
@@ -131,7 +130,7 @@ Every record passes the `session-telemetry/record` [waterfall](../cordis-primer.
131
130
 
132
131
  ## Cordis API
133
132
 
134
- 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).
133
+ 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).
135
134
 
136
135
  <a id="ctxsessiontelemetry--sessiontelemetrybackend-abstract-seam"></a>
137
136
 
@@ -156,7 +155,7 @@ flush?(): void
156
155
  abstract shutdown(): Promise<void>
157
156
  ```
158
157
 
159
- Source: [`packages/session/session-telemetry/src/index.ts:148`](../../packages/session/session-telemetry/src/index.ts)
158
+ Source: [`packages/session/session-telemetry/src/index.ts`](../../packages/session/session-telemetry/src/index.ts)
160
159
 
161
160
  <a id="session-telemetry-events"></a>
162
161
 
@@ -190,5 +189,5 @@ Transform one outbound record before it reaches the backend. This waterfall is t
190
189
  'session-telemetry/record'(record: SessionTelemetryRecord, next: () => SessionTelemetryRecord): SessionTelemetryRecord
191
190
  ```
192
191
 
193
- Source: [`packages/session/session-telemetry/src/index.ts:43`](../../packages/session/session-telemetry/src/index.ts)
192
+ Source: [`packages/session/session-telemetry/src/index.ts`](../../packages/session/session-telemetry/src/index.ts)
194
193
  <!-- END GENERATED cordis-surface -->
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](session-telemetry.md) | 中文
4
4
 
5
- 对外的会话上报拆分为一项[能力 seam](../capability-seams.md):Service Definition 与捕获协调器([dsh-session-telemetry](../../packages/session/session-telemetry),`ctx.sessionTelemetry`)拥有捕获点、固定分片投影、`session-telemetry/record` 脱敏 waterfall(瀑布式事件)、handoff 游标与最小后端约定;部署方加载的 Service Provider([dsh-session-telemetry-otel](../../packages/session/session-telemetry-otel))则是原样配置的 OpenTelemetry JS SDK 日志流水线。它是一项可选能力,不属于 agent loop(智能体循环)主干,这里也没有任何内容会进入模型请求。边界公理(harness 的职责止于 `emit()`;批处理、重试、排队与丢失策略都属于上报 SDK)连同被否决的替代方案,均已在[复活 Agent Note](../../.agents/notes/implemented/feature/2026-07-23-session-telemetry-otel-revival.md)中定案;捕获点、游标与投影的约定见 [Service Definition README](../../packages/session/session-telemetry/README.md)。
5
+ 对外的会话上报拆分为一项[能力 seam](../capability-seams.zh.md):Service Definition 与捕获协调器([dsh-session-telemetry](../../packages/session/session-telemetry),`ctx.sessionTelemetry`)拥有捕获点、固定分片投影、`session-telemetry/record` 脱敏 waterfall(瀑布式事件)、handoff 游标与最小后端约定;部署方加载的 Service Provider([dsh-session-telemetry-otel](../../packages/session/session-telemetry-otel))则是原样配置的 OpenTelemetry JS SDK 日志流水线。它是一项可选能力,不属于 agent loop(智能体循环)主干,这里也没有任何内容会进入模型请求。边界公理(harness 的职责止于 `emit()`;批处理、重试、排队与丢失策略都属于上报 SDK)连同被否决的替代方案,均已在[复活 Agent Note](../../.agents/notes/implemented/feature/2026-07-23-session-telemetry-otel-revival.zh.md)中定案;捕获点、游标与投影的约定见 [Service Definition README](../../packages/session/session-telemetry/README.zh.md)。
6
6
 
7
7
  源码:[`packages/session/session-telemetry/src/index.ts`](../../packages/session/session-telemetry/src/index.ts)
8
8
 
@@ -54,19 +54,18 @@ interface SessionTelemetryRecord {
54
54
  }
55
55
  ```
56
56
 
57
- 每个 `(turn, step)` 只发出第一条 `assistant/chunk`,即「流已开始」的信号;其余分片在捕获时丢弃,因此传输中的 `seq` 缺口是常态,绝不是数据丢失的信号。其他所有[会话事件](session.md)类型都会完整透传,包括该 seam 从未听说过、由插件合并进来的事件类型。投递是尽力而为的:游标标记的是「已交接」而非「已送达」,记录可能丢失(崩溃、重载窗口)也可能重复(无游标的重新接管、SDK 重试),因此接收端对 ledger 记录基于 `(session.id, event.seq)` 去重;ops 记录刻意省略这类标识——它们是用于告警的信号,而非用于累加的条目,重复被容忍而非被去重。
57
+ 每个 `(turn, step)` 只发出第一条 `assistant/chunk`,即「流已开始」的信号;其余分片在捕获时丢弃,因此传输中的 `seq` 缺口是常态,绝不是数据丢失的信号。其他所有[会话事件](session.zh.md)类型都会完整透传,包括该 seam 从未听说过、由插件合并进来的事件类型。投递是尽力而为的:游标标记的是「已交接」而非「已送达」,记录可能丢失(崩溃、重载窗口)也可能重复(无游标的重新接管、SDK 重试),因此接收端对 ledger 记录基于 `(session.id, event.seq)` 去重;ops 记录刻意省略这类标识——它们是用于告警的信号,而非用于累加的条目,重复被容忍而非被去重。
58
58
 
59
59
  ## 共享披露
60
60
 
61
- 该 seam 的确认契约(归属 [Service Definition README 的共享披露段](../../packages/session/session-telemetry/README.md#the-sharing-disclosure)):每个后端都通过 `ctx.sessionTelemetry` 上必需的抽象 `sharing` 成员披露其部署级共享策略,消费方只有在未挂载任何遥测服务时才渲染「未配置」。披露只陈述当前策略,绝不承诺投递或留存——交接是非阻塞入队,批处理、重试与丢失策略仍归上报 SDK。
61
+ 该 seam 的确认契约(归属 [Service Definition README 的共享披露段](../../packages/session/session-telemetry/README.zh.md#the-sharing-disclosure)):每个后端都通过 `ctx.sessionTelemetry` 上必需的抽象 `sharing` 成员披露其部署级共享策略,消费方只有在未挂载任何遥测服务时才渲染「未配置」。披露只陈述当前策略,绝不承诺投递或留存——交接是非阻塞入队,批处理、重试与丢失策略仍归上报 SDK。
62
62
 
63
63
  ```ts type-equiv
64
64
  /**
65
65
  * Deployment-selected session-sharing policy disclosed by a mounted
66
66
  * {@link SessionTelemetryBackend} backend to human-facing acknowledgement surfaces (the
67
- * `/feedback` command's confirmation text). The seam owns the vocabulary so
68
- * any backend can disclose a policy without depending on the OTel package;
69
- * the values mirror the OTel backend's serialized `SessionTelemetryMode` choices.
67
+ * `/feedback` command's confirmation text). The Service Definition owns the
68
+ * vocabulary so consumers and backends do not depend on a specific provider.
70
69
  */
71
70
  type SessionTelemetrySharingStatus = 'full' | 'feedback-only' | 'disabled'
72
71
  ```
@@ -123,7 +122,7 @@ interface SessionTelemetrySink {
123
122
 
124
123
  ## 脱敏 waterfall:`session-telemetry/record`
125
124
 
126
- 每条记录在投影与 `emit()` 之间都要经过 `session-telemetry/record` [waterfall](../cordis-primer.md#cordis-waterfall-semantics)([事件条目](#session-telemetryrecord--waterfall))。seam 自身不带任何规则:未挂载监听器时,记录以捕获时的原样到达后端;导出数据能干净到什么程度,恰恰取决于部署方挂载了什么规则。监听器通过变换 `next()` 的返回值来堆叠;不调用 `next()` 就返回,即替换其下方的全部逻辑;抛出异常的监听器会在协调器的隔离范围内以 fail-closed 方式扣下这一条记录。脱敏只作用于导出副本;权威会话日志永不改写。
125
+ 每条记录在投影与 `emit()` 之间都要经过 `session-telemetry/record` [waterfall](../cordis-primer.zh.md#cordis-waterfall-semantics)([事件条目](#session-telemetryrecord--waterfall))。seam 自身不带任何规则:未挂载监听器时,记录以捕获时的原样到达后端;导出数据能干净到什么程度,恰恰取决于部署方挂载了什么规则。监听器通过变换 `next()` 的返回值来堆叠;不调用 `next()` 就返回,即替换其下方的全部逻辑;抛出异常的监听器会在协调器的隔离范围内以 fail-closed 方式扣下这一条记录。脱敏只作用于导出副本;权威会话日志永不改写。
127
126
 
128
127
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
129
128
 
@@ -131,7 +130,7 @@ interface SessionTelemetrySink {
131
130
 
132
131
  ## Cordis API
133
132
 
134
- 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).
133
+ 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).
135
134
 
136
135
  <a id="ctxsessiontelemetry--sessiontelemetrybackend-abstract-seam"></a>
137
136
 
@@ -156,7 +155,7 @@ flush?(): void
156
155
  abstract shutdown(): Promise<void>
157
156
  ```
158
157
 
159
- Source: [`packages/session/session-telemetry/src/index.ts:148`](../../packages/session/session-telemetry/src/index.ts)
158
+ Source: [`packages/session/session-telemetry/src/index.ts`](../../packages/session/session-telemetry/src/index.ts)
160
159
 
161
160
  <a id="session-telemetry-events"></a>
162
161
 
@@ -190,5 +189,5 @@ Transform one outbound record before it reaches the backend. This waterfall is t
190
189
  'session-telemetry/record'(record: SessionTelemetryRecord, next: () => SessionTelemetryRecord): SessionTelemetryRecord
191
190
  ```
192
191
 
193
- Source: [`packages/session/session-telemetry/src/index.ts:43`](../../packages/session/session-telemetry/src/index.ts)
192
+ Source: [`packages/session/session-telemetry/src/index.ts`](../../packages/session/session-telemetry/src/index.ts)
194
193
  <!-- 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-title.md
5
- session-title.md: 6952cd7289861e1f83e76ef7ae9a115a404ee671
6
- session-title.zh.md: 37442e258325e23fe6d3b288dd8c680efd2d0ca4
5
+ session-title.md: 20ed32b4a08127e7193433673d22f0dea3a90c46
6
+ session-title.zh.md: c01d5d4bf177169069bbe0a39ef533ada0f7c36a