dsh-plugin-guide 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/README.es.md +1 -1
  2. package/README.hi.md +1 -1
  3. package/README.md +1 -1
  4. package/README.pt.md +1 -1
  5. package/README.zh.md +1 -1
  6. package/SKILL.md +1 -1
  7. package/dist/dsh-plugin-dev.js +5 -5
  8. package/guide/links.md +1 -1
  9. package/guide/plugin-dev-guide.md +1 -1
  10. package/guide/quick-reference.es.md +2 -2
  11. package/guide/quick-reference.hi.md +1 -1
  12. package/guide/quick-reference.md +2 -2
  13. package/guide/quick-reference.pt.md +2 -2
  14. package/guide/quick-reference.zh-CN.md +2 -2
  15. package/package.json +3 -3
  16. package/references/cordis-paper-and-community.md +1 -1
  17. package/references/official-docs/AGENTS.md +28 -23
  18. package/references/official-docs/README.i18n.yaml +2 -2
  19. package/references/official-docs/README.md +1 -1
  20. package/references/official-docs/README.zh.md +19 -9
  21. package/references/official-docs/SNAPSHOT.md +5 -5
  22. package/references/official-docs/THIRD_PARTY_NOTICES.md +36 -13
  23. package/references/official-docs/docs/AGENTS.md +4 -4
  24. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  25. package/references/official-docs/docs/agent-lifecycle.md +1 -1
  26. package/references/official-docs/docs/agent-lifecycle.zh.md +2 -2
  27. package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
  28. package/references/official-docs/docs/api-gateway.md +8 -8
  29. package/references/official-docs/docs/api-gateway.zh.md +8 -8
  30. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  31. package/references/official-docs/docs/architecture.md +25 -8
  32. package/references/official-docs/docs/architecture.zh.md +38 -21
  33. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  34. package/references/official-docs/docs/capability-seams.md +134 -67
  35. package/references/official-docs/docs/capability-seams.zh.md +134 -67
  36. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  37. package/references/official-docs/docs/config-catalog.md +731 -403
  38. package/references/official-docs/docs/config-catalog.zh.md +747 -419
  39. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
  40. package/references/official-docs/docs/cookbook/adding-a-package.md +3 -4
  41. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +9 -8
  42. package/references/official-docs/docs/cookbook/{adding-a-conversation-node.i18n.yaml → adding-a-remote-api.i18n.yaml} +3 -3
  43. package/references/official-docs/docs/cookbook/adding-a-remote-api.md +197 -0
  44. package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +197 -0
  45. package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +6 -0
  46. package/references/official-docs/docs/cookbook/adding-a-settings-card.md +102 -0
  47. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +102 -0
  48. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
  49. package/references/official-docs/docs/cookbook/adding-a-tool.md +11 -4
  50. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +16 -9
  51. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
  52. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +2 -2
  53. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +4 -4
  54. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +2 -2
  55. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +1 -1
  56. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +3 -3
  57. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  58. package/references/official-docs/docs/cookbook/extension-cookbook.md +9 -8
  59. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +17 -14
  60. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +1 -1
  61. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +1 -1
  62. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +1 -1
  63. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  64. package/references/official-docs/docs/cordis-api/context.i18n.yaml +1 -1
  65. package/references/official-docs/docs/cordis-api/context.zh.md +1 -1
  66. package/references/official-docs/docs/cordis-api/events.i18n.yaml +1 -1
  67. package/references/official-docs/docs/cordis-api/events.zh.md +1 -1
  68. package/references/official-docs/docs/cordis-api/inherited.md +1 -1
  69. package/references/official-docs/docs/cordis-primer.i18n.yaml +2 -2
  70. package/references/official-docs/docs/cordis-primer.md +2 -1
  71. package/references/official-docs/docs/cordis-primer.zh.md +3 -2
  72. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +1 -1
  73. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +4 -4
  74. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +1 -1
  75. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +4 -4
  76. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +1 -1
  77. package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +4 -4
  78. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +1 -1
  79. package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +4 -4
  80. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +1 -1
  81. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +2 -2
  82. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +1 -1
  83. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +3 -3
  84. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +2 -2
  85. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +5 -4
  86. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +11 -10
  87. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +1 -1
  88. package/references/official-docs/docs/cordis-tutorial/index.zh.md +10 -10
  89. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +6 -0
  90. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +159 -0
  91. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +159 -0
  92. package/references/official-docs/docs/defensive-patterns.i18n.yaml +1 -1
  93. package/references/official-docs/docs/defensive-patterns.zh.md +3 -1
  94. package/references/official-docs/docs/development.i18n.yaml +2 -2
  95. package/references/official-docs/docs/development.md +9 -13
  96. package/references/official-docs/docs/development.zh.md +23 -21
  97. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  98. package/references/official-docs/docs/event-producer-consumer.md +55 -46
  99. package/references/official-docs/docs/event-producer-consumer.zh.md +55 -46
  100. package/references/official-docs/docs/glossary.i18n.yaml +2 -2
  101. package/references/official-docs/docs/glossary.md +1 -1
  102. package/references/official-docs/docs/glossary.zh.md +1 -1
  103. package/references/official-docs/docs/graph-atlas.i18n.yaml +2 -2
  104. package/references/official-docs/docs/graph-atlas.md +0 -2
  105. package/references/official-docs/docs/graph-atlas.zh.md +7 -9
  106. package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
  107. package/references/official-docs/docs/i18n/README.md +7 -7
  108. package/references/official-docs/docs/i18n/README.zh.md +11 -9
  109. package/references/official-docs/docs/i18n/style-samples.md +3 -3
  110. package/references/official-docs/docs/i18n/translation-prompt.md +3 -3
  111. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +2 -2
  112. package/references/official-docs/docs/i18n/translation-rules.md +2 -2
  113. package/references/official-docs/docs/i18n/translation-rules.zh.md +3 -3
  114. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  115. package/references/official-docs/docs/module-graph.md +660 -909
  116. package/references/official-docs/docs/module-graph.zh.md +662 -911
  117. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  118. package/references/official-docs/docs/persistence-catalog.md +185 -53
  119. package/references/official-docs/docs/persistence-catalog.zh.md +193 -61
  120. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +2 -2
  121. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +2 -2
  122. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +3 -3
  123. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +2 -2
  124. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +2 -2
  125. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +2 -2
  126. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +2 -2
  127. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +2 -2
  128. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +2 -2
  129. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +2 -2
  130. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +1 -1
  131. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +2 -2
  132. package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
  133. package/references/official-docs/docs/postmortem/README.zh.md +5 -5
  134. package/references/official-docs/docs/rescope.i18n.yaml +2 -2
  135. package/references/official-docs/docs/rescope.md +2 -2
  136. package/references/official-docs/docs/rescope.zh.md +3 -3
  137. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  138. package/references/official-docs/docs/subsystems/README.md +8 -2
  139. package/references/official-docs/docs/subsystems/README.zh.md +53 -47
  140. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +6 -0
  141. package/references/official-docs/docs/subsystems/agent-team.md +207 -0
  142. package/references/official-docs/docs/subsystems/agent-team.zh.md +207 -0
  143. package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
  144. package/references/official-docs/docs/subsystems/approval.md +12 -12
  145. package/references/official-docs/docs/subsystems/approval.zh.md +13 -13
  146. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  147. package/references/official-docs/docs/subsystems/attachment.md +90 -7
  148. package/references/official-docs/docs/subsystems/attachment.zh.md +90 -7
  149. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
  150. package/references/official-docs/docs/subsystems/client-modules.md +69 -19
  151. package/references/official-docs/docs/subsystems/client-modules.zh.md +69 -19
  152. package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
  153. package/references/official-docs/docs/subsystems/code-runtime.md +12 -8
  154. package/references/official-docs/docs/subsystems/code-runtime.zh.md +13 -9
  155. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  156. package/references/official-docs/docs/subsystems/commands.md +30 -7
  157. package/references/official-docs/docs/subsystems/commands.zh.md +31 -8
  158. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  159. package/references/official-docs/docs/subsystems/compaction.md +14 -14
  160. package/references/official-docs/docs/subsystems/compaction.zh.md +19 -19
  161. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +6 -0
  162. package/references/official-docs/docs/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +49 -24
  163. package/references/official-docs/docs/{cookbook/adding-a-conversation-node.zh.md → subsystems/conversation.zh.md} +49 -24
  164. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  165. package/references/official-docs/docs/subsystems/core.md +114 -36
  166. package/references/official-docs/docs/subsystems/core.zh.md +145 -65
  167. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +2 -2
  168. package/references/official-docs/docs/subsystems/credentials.md +207 -11
  169. package/references/official-docs/docs/subsystems/credentials.zh.md +207 -11
  170. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +2 -2
  171. package/references/official-docs/docs/subsystems/extensions.md +27 -9
  172. package/references/official-docs/docs/subsystems/extensions.zh.md +30 -12
  173. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
  174. package/references/official-docs/docs/subsystems/feedback.md +6 -6
  175. package/references/official-docs/docs/subsystems/feedback.zh.md +6 -6
  176. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
  177. package/references/official-docs/docs/subsystems/filesystem.md +17 -7
  178. package/references/official-docs/docs/subsystems/filesystem.zh.md +19 -9
  179. package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
  180. package/references/official-docs/docs/subsystems/goal.md +4 -4
  181. package/references/official-docs/docs/subsystems/goal.zh.md +8 -8
  182. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
  183. package/references/official-docs/docs/subsystems/invariants.md +2 -2
  184. package/references/official-docs/docs/subsystems/invariants.zh.md +5 -5
  185. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
  186. package/references/official-docs/docs/subsystems/jobs.md +3 -3
  187. package/references/official-docs/docs/subsystems/jobs.zh.md +6 -6
  188. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  189. package/references/official-docs/docs/subsystems/llm-streaming.md +193 -22
  190. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +199 -28
  191. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
  192. package/references/official-docs/docs/subsystems/lsp.md +2 -2
  193. package/references/official-docs/docs/subsystems/lsp.zh.md +3 -3
  194. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
  195. package/references/official-docs/docs/subsystems/permission-presets.md +8 -8
  196. package/references/official-docs/docs/subsystems/permission-presets.zh.md +8 -8
  197. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  198. package/references/official-docs/docs/subsystems/persistence.md +183 -173
  199. package/references/official-docs/docs/subsystems/persistence.zh.md +182 -172
  200. package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
  201. package/references/official-docs/docs/subsystems/plan.md +4 -4
  202. package/references/official-docs/docs/subsystems/plan.zh.md +10 -10
  203. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
  204. package/references/official-docs/docs/subsystems/sandbox.md +5 -3
  205. package/references/official-docs/docs/subsystems/sandbox.zh.md +8 -6
  206. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
  207. package/references/official-docs/docs/subsystems/schedule.md +9 -3
  208. package/references/official-docs/docs/subsystems/schedule.zh.md +11 -5
  209. package/references/official-docs/docs/subsystems/scope.i18n.yaml +1 -1
  210. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  211. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  212. package/references/official-docs/docs/subsystems/session-projection.md +148 -75
  213. package/references/official-docs/docs/subsystems/session-projection.zh.md +148 -75
  214. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
  215. package/references/official-docs/docs/subsystems/session-query.md +30 -16
  216. package/references/official-docs/docs/subsystems/session-query.zh.md +31 -17
  217. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  218. package/references/official-docs/docs/subsystems/session-reference.md +94 -7
  219. package/references/official-docs/docs/subsystems/session-reference.zh.md +95 -8
  220. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  221. package/references/official-docs/docs/subsystems/session-telemetry.md +5 -6
  222. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +9 -10
  223. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
  224. package/references/official-docs/docs/subsystems/session-title.md +8 -8
  225. package/references/official-docs/docs/subsystems/session-title.zh.md +10 -10
  226. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  227. package/references/official-docs/docs/subsystems/session.md +376 -71
  228. package/references/official-docs/docs/subsystems/session.zh.md +392 -85
  229. package/references/official-docs/docs/subsystems/settings.i18n.yaml +2 -2
  230. package/references/official-docs/docs/subsystems/settings.md +105 -10
  231. package/references/official-docs/docs/subsystems/settings.zh.md +105 -10
  232. package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
  233. package/references/official-docs/docs/subsystems/shell.md +3 -3
  234. package/references/official-docs/docs/subsystems/shell.zh.md +11 -11
  235. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  236. package/references/official-docs/docs/subsystems/skills.md +26 -3
  237. package/references/official-docs/docs/subsystems/skills.zh.md +29 -6
  238. package/references/official-docs/docs/subsystems/slots.i18n.yaml +6 -0
  239. package/references/official-docs/docs/subsystems/slots.md +175 -0
  240. package/references/official-docs/docs/subsystems/slots.zh.md +175 -0
  241. package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
  242. package/references/official-docs/docs/subsystems/spill.md +4 -4
  243. package/references/official-docs/docs/subsystems/spill.zh.md +6 -6
  244. package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
  245. package/references/official-docs/docs/subsystems/storage.md +38 -7
  246. package/references/official-docs/docs/subsystems/storage.zh.md +41 -10
  247. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  248. package/references/official-docs/docs/subsystems/subagent.md +148 -116
  249. package/references/official-docs/docs/subsystems/subagent.zh.md +158 -124
  250. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
  251. package/references/official-docs/docs/subsystems/subprocess.md +3 -3
  252. package/references/official-docs/docs/subsystems/subprocess.zh.md +5 -5
  253. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  254. package/references/official-docs/docs/subsystems/system-prompt.md +21 -8
  255. package/references/official-docs/docs/subsystems/system-prompt.zh.md +23 -10
  256. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +2 -2
  257. package/references/official-docs/docs/subsystems/terminal.md +2 -2
  258. package/references/official-docs/docs/subsystems/terminal.zh.md +4 -4
  259. package/references/official-docs/docs/subsystems/todo.i18n.yaml +6 -0
  260. package/references/official-docs/docs/subsystems/todo.md +32 -0
  261. package/references/official-docs/docs/subsystems/todo.zh.md +32 -0
  262. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
  263. package/references/official-docs/docs/subsystems/token-meter.md +29 -14
  264. package/references/official-docs/docs/subsystems/token-meter.zh.md +30 -15
  265. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  266. package/references/official-docs/docs/subsystems/tools.md +46 -46
  267. package/references/official-docs/docs/subsystems/tools.zh.md +54 -54
  268. package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
  269. package/references/official-docs/docs/subsystems/typert.md +65 -58
  270. package/references/official-docs/docs/subsystems/typert.zh.md +67 -60
  271. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
  272. package/references/official-docs/docs/subsystems/user-questions.md +35 -35
  273. package/references/official-docs/docs/subsystems/user-questions.zh.md +35 -35
  274. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +6 -0
  275. package/references/official-docs/docs/subsystems/web-client.md +95 -0
  276. package/references/official-docs/docs/subsystems/web-client.zh.md +95 -0
  277. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
  278. package/references/official-docs/docs/subsystems/web-server.md +55 -9
  279. package/references/official-docs/docs/subsystems/web-server.zh.md +56 -10
  280. package/references/official-docs/docs/subsystems/web.i18n.yaml +2 -2
  281. package/references/official-docs/docs/subsystems/web.md +14 -7
  282. package/references/official-docs/docs/subsystems/web.zh.md +16 -9
  283. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +6 -0
  284. package/references/official-docs/docs/subsystems/webhook.md +70 -0
  285. package/references/official-docs/docs/subsystems/webhook.zh.md +70 -0
  286. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  287. package/references/official-docs/docs/subsystems/workflow.md +8 -8
  288. package/references/official-docs/docs/subsystems/workflow.zh.md +13 -13
  289. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  290. package/references/official-docs/docs/subsystems/workspace.md +98 -5
  291. package/references/official-docs/docs/subsystems/workspace.zh.md +102 -9
  292. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  293. package/references/official-docs/docs/testing.md +15 -10
  294. package/references/official-docs/docs/testing.zh.md +15 -10
  295. package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
  296. package/references/official-docs/docs/tool-catalog.md +413 -61
  297. package/references/official-docs/docs/tool-catalog.zh.md +418 -63
  298. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
  299. package/references/official-docs/docs/tool-execution-pipeline.md +1 -1
  300. package/references/official-docs/docs/tool-execution-pipeline.zh.md +1 -1
  301. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +2 -2
  302. package/references/official-docs/docs/user/develop/basic/config.md +1 -1
  303. package/references/official-docs/docs/user/develop/basic/config.zh.md +4 -4
  304. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +1 -1
  305. package/references/official-docs/docs/user/develop/basic/index.zh.md +5 -5
  306. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
  307. package/references/official-docs/docs/user/develop/basic/publish.md +3 -3
  308. package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -7
  309. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +2 -2
  310. package/references/official-docs/docs/user/develop/basic/tool.md +3 -3
  311. package/references/official-docs/docs/user/develop/basic/tool.zh.md +4 -4
  312. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +2 -2
  313. package/references/official-docs/docs/user/develop/framework/events.md +2 -2
  314. package/references/official-docs/docs/user/develop/framework/events.zh.md +3 -3
  315. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +1 -1
  316. package/references/official-docs/docs/user/develop/framework/index.zh.md +3 -3
  317. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +2 -2
  318. package/references/official-docs/docs/user/develop/framework/service.md +1 -1
  319. package/references/official-docs/docs/user/develop/framework/service.zh.md +3 -3
  320. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +6 -0
  321. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +15 -0
  322. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
  323. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +2 -2
  324. package/references/official-docs/docs/user/develop/practice/index.md +1 -1
  325. package/references/official-docs/docs/user/develop/practice/index.zh.md +3 -3
  326. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +2 -2
  327. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +4 -3
  328. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +4 -3
  329. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +6 -0
  330. package/references/official-docs/docs/user/guide/github-review.md +102 -0
  331. package/references/official-docs/docs/user/guide/github-review.zh.md +102 -0
  332. package/references/official-docs/docs/user/guide/index.i18n.yaml +2 -2
  333. package/references/official-docs/docs/user/guide/index.md +2 -2
  334. package/references/official-docs/docs/user/guide/index.zh.md +8 -8
  335. package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +6 -0
  336. package/references/official-docs/docs/user/guide/mcp-memory.md +101 -0
  337. package/references/official-docs/docs/user/guide/mcp-memory.zh.md +101 -0
  338. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  339. package/references/official-docs/docs/user/guide/providers.md +40 -1
  340. package/references/official-docs/docs/user/guide/providers.zh.md +41 -2
  341. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
  342. package/references/official-docs/docs/user/guide/python-sdk.md +80 -34
  343. package/references/official-docs/docs/user/guide/python-sdk.zh.md +87 -41
  344. package/references/official-docs/docs/user/guide/schedule.i18n.yaml +6 -0
  345. package/references/official-docs/docs/user/guide/schedule.md +21 -0
  346. package/references/official-docs/docs/user/guide/schedule.zh.md +21 -0
  347. package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
  348. package/references/official-docs/docs/web-styling.md +3 -0
  349. package/references/official-docs/docs/web-styling.zh.md +5 -2
  350. package/references/official-docs/packages/AGENTS.md +4 -3
  351. package/references/official-docs/packages/README.md +104 -59
  352. package/references/official-docs/vendor/README.md +1 -0
  353. package/references/official-docs/website-docs.ts +52 -11
  354. package/references/sources.md +2 -2
  355. package/references/website-pages.md +3 -3
  356. package/scripts/download-sources.ps1 +1 -1
  357. package/scripts/sync-official-docs.ps1 +19 -11
  358. package/scripts/verify-kit.ps1 +0 -4
  359. package/templates/js/README.es.md +1 -1
  360. package/templates/js/README.hi.md +1 -1
  361. package/templates/js/README.md +1 -1
  362. package/templates/js/README.pt.md +1 -1
  363. package/templates/js/README.zh.md +1 -1
  364. package/templates/js/package.json +4 -4
  365. package/templates/ts/README.es.md +1 -1
  366. package/templates/ts/README.hi.md +1 -1
  367. package/templates/ts/README.md +1 -1
  368. package/templates/ts/README.pt.md +1 -1
  369. package/templates/ts/README.zh.md +1 -1
  370. package/templates/ts/package.json +4 -4
  371. package/references/official-docs/examples/AGENTS.md +0 -20
@@ -2,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/system-prompt.md
5
- system-prompt.md: 8a6006d0b96552b52d0b050c304a11a95add8d9e
6
- system-prompt.zh.md: 02be9eed795d3a6c8e43403048f135d493b6509d
5
+ system-prompt.md: 502daab50a908bfbf5dcae480771c0baa0827849
6
+ system-prompt.zh.md: 95e33eb6bbea7d271c4f70948388fe2deef420a9
@@ -39,7 +39,7 @@ interface ToolProviderResult {
39
39
 
40
40
  ## Prompt sections
41
41
 
42
- `PromptSection` is a readonly same-process registration contract. Its text may be static or resolved from the current assembly context. One effective `complete` section becomes the sole prompt section after cooperative assembly.
42
+ `PromptSection` is a readonly same-process registration contract. Its text may be static or resolved from the current assembly context. Sections sort by ascending order and then code-unit name; repository contributors resolve the service-owned named allocation through `getSectionOrder()`. Runtime-context contributors resolve their independent allocation through `getContextOrder()`. One effective `complete` section becomes the sole prompt section after cooperative assembly.
43
43
 
44
44
  ```ts type-equiv
45
45
  /** One contributed section of the system prompt (registry input). */
@@ -47,9 +47,8 @@ interface PromptSection {
47
47
  /** Unique name — a duplicate registration throws (see {@link SystemPrompt.section}). */
48
48
  readonly name: string
49
49
  /**
50
- * Sections are concatenated in ascending order. Convention: `-100` is the
51
- * harness identity, `0` the deployment persona, tool guidance uses 100–199;
52
- * other negative orders also render before the persona.
50
+ * Sections are concatenated in ascending order. Equal orders use code-unit
51
+ * name order.
53
52
  */
54
53
  readonly order: number
55
54
  /**
@@ -90,7 +89,7 @@ interface PromptContext {
90
89
 
91
90
  ## Cordis API
92
91
 
93
- 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).
92
+ 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).
94
93
 
95
94
  <a id="ctxsystemprompt--systemprompt"></a>
96
95
 
@@ -109,6 +108,20 @@ Registry service for the prompt inputs assembled before each model step.
109
108
  */
110
109
  section(section: PromptSection): () => void
111
110
 
111
+ /**
112
+ * Resolve the centrally owned placement of a repository prompt section.
113
+ * @param name - stable section placement name.
114
+ * @returns the section's numeric sort order.
115
+ */
116
+ getSectionOrder(name: PromptSectionOrderName): number
117
+
118
+ /**
119
+ * Resolve the centrally owned placement of a repository runtime context.
120
+ * @param name - stable context placement name.
121
+ * @returns the context's numeric sort order.
122
+ */
123
+ getContextOrder(name: PromptContextOrderName): number
124
+
112
125
  /**
113
126
  * Register ordered dynamic context in the calling context's scope. Scoped
114
127
  * entries shadow global entries with the same name.
@@ -156,7 +169,7 @@ variable(name: string, provider: (context: AssembleContext) => string | undefine
156
169
  async assemble(context: AssembleContext = {}): Promise<PromptAssembly>
157
170
  ```
158
171
 
159
- Source: [`packages/core/system-prompt/src/index.ts:338`](../../packages/core/system-prompt/src/index.ts)
172
+ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
160
173
 
161
174
  <a id="system-prompt-events"></a>
162
175
 
@@ -186,7 +199,7 @@ Expert waterfall over the assembled sections, contexts, tools, and variables. Sc
186
199
 
187
200
  Types: [Scoped](scope.md)
188
201
 
189
- Source: [`packages/core/system-prompt/src/index.ts:31`](../../packages/core/system-prompt/src/index.ts)
202
+ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
190
203
 
191
204
  <a id="system-promptchange--emit"></a>
192
205
 
@@ -203,5 +216,5 @@ Emitted when any prompt provider changes. This registry notification is unfilter
203
216
  'system-prompt/change'(): void
204
217
  ```
205
218
 
206
- Source: [`packages/core/system-prompt/src/index.ts:37`](../../packages/core/system-prompt/src/index.ts)
219
+ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
207
220
  <!-- END GENERATED cordis-surface -->
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](system-prompt.md) | 中文
4
4
 
5
- [system-prompt 包](../../packages/core/system-prompt)负责管理提示词贡献者与一次组装调用之间交换的数据。该包的 [README](../../packages/core/system-prompt/README.md) 记录注册、排序、作用域与渲染行为;本页记录各插件实现或传递的确切跨包类型。
5
+ [system-prompt 包](../../packages/core/system-prompt)负责管理提示词贡献者与一次组装调用之间交换的数据。该包的 [README](../../packages/core/system-prompt/README.zh.md) 记录注册、排序、作用域与渲染行为;本页记录各插件实现或传递的确切跨包类型。
6
6
 
7
7
  源码:[`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)。
8
8
 
@@ -39,7 +39,7 @@ interface ToolProviderResult {
39
39
 
40
40
  ## 提示词段落
41
41
 
42
- `PromptSection` 是一份只读的同进程注册约定。其文本可以是静态的,也可以从当前组装上下文动态解析。协作式组装完成后,一个有效的 `complete` 段会成为唯一的提示词段落。
42
+ `PromptSection` 是一份只读的同进程注册约定。其文本可以是静态的,也可以从当前组装上下文动态解析。各段先按 order 升序排列,再按名称的代码单元顺序排列;仓库贡献方通过 `getSectionOrder()` 解析服务持有的具名分配。Runtime-context 贡献方通过 `getContextOrder()` 解析独立分配。协作式组装完成后,一个有效的 `complete` 段会成为唯一的提示词段落。
43
43
 
44
44
  ```ts type-equiv
45
45
  /** One contributed section of the system prompt (registry input). */
@@ -47,9 +47,8 @@ interface PromptSection {
47
47
  /** Unique name — a duplicate registration throws (see {@link SystemPrompt.section}). */
48
48
  readonly name: string
49
49
  /**
50
- * Sections are concatenated in ascending order. Convention: `-100` is the
51
- * harness identity, `0` the deployment persona, tool guidance uses 100–199;
52
- * other negative orders also render before the persona.
50
+ * Sections are concatenated in ascending order. Equal orders use code-unit
51
+ * name order.
53
52
  */
54
53
  readonly order: number
55
54
  /**
@@ -90,7 +89,7 @@ interface PromptContext {
90
89
 
91
90
  ## Cordis API
92
91
 
93
- 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).
92
+ 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).
94
93
 
95
94
  <a id="ctxsystemprompt--systemprompt"></a>
96
95
 
@@ -109,6 +108,20 @@ Registry service for the prompt inputs assembled before each model step.
109
108
  */
110
109
  section(section: PromptSection): () => void
111
110
 
111
+ /**
112
+ * Resolve the centrally owned placement of a repository prompt section.
113
+ * @param name - stable section placement name.
114
+ * @returns the section's numeric sort order.
115
+ */
116
+ getSectionOrder(name: PromptSectionOrderName): number
117
+
118
+ /**
119
+ * Resolve the centrally owned placement of a repository runtime context.
120
+ * @param name - stable context placement name.
121
+ * @returns the context's numeric sort order.
122
+ */
123
+ getContextOrder(name: PromptContextOrderName): number
124
+
112
125
  /**
113
126
  * Register ordered dynamic context in the calling context's scope. Scoped
114
127
  * entries shadow global entries with the same name.
@@ -156,7 +169,7 @@ variable(name: string, provider: (context: AssembleContext) => string | undefine
156
169
  async assemble(context: AssembleContext = {}): Promise<PromptAssembly>
157
170
  ```
158
171
 
159
- Source: [`packages/core/system-prompt/src/index.ts:338`](../../packages/core/system-prompt/src/index.ts)
172
+ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
160
173
 
161
174
  <a id="system-prompt-events"></a>
162
175
 
@@ -184,9 +197,9 @@ Expert waterfall over the assembled sections, contexts, tools, and variables. Sc
184
197
  'system-prompt/assemble'(this: Scoped<SystemPrompt>, assembly: PromptAssembly, context: AssembleContext, next: () => Promise<PromptAssembly>): Promise<PromptAssembly>
185
198
  ```
186
199
 
187
- Types: [Scoped](scope.md)
200
+ Types: [Scoped](scope.zh.md)
188
201
 
189
- Source: [`packages/core/system-prompt/src/index.ts:31`](../../packages/core/system-prompt/src/index.ts)
202
+ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
190
203
 
191
204
  <a id="system-promptchange--emit"></a>
192
205
 
@@ -203,5 +216,5 @@ Emitted when any prompt provider changes. This registry notification is unfilter
203
216
  'system-prompt/change'(): void
204
217
  ```
205
218
 
206
- Source: [`packages/core/system-prompt/src/index.ts:37`](../../packages/core/system-prompt/src/index.ts)
219
+ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
207
220
  <!-- 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/terminal.md
5
- terminal.md: eedf6157b256e83d3b57e07bf738429773b87574
6
- terminal.zh.md: 3cc2c281e8c2090bb7e92808f932be689fd0b710
5
+ terminal.md: c1c78963e48f51014678e778bbdc5da530f453c6
6
+ terminal.zh.md: e97e5771f5681ce98024394752405dca012b0a5e
@@ -96,7 +96,7 @@ interface TerminalSendResult {
96
96
 
97
97
  ## Cordis API
98
98
 
99
- 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).
99
+ 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).
100
100
 
101
101
  <a id="ctxterminals--terminalsessionservice"></a>
102
102
 
@@ -180,5 +180,5 @@ list(owner: Agent): TerminalSessionSnapshot[]
180
180
 
181
181
  Types: [Agent](core.md)
182
182
 
183
- Source: [`packages/terminal/terminal/src/index.ts:105`](../../packages/terminal/terminal/src/index.ts)
183
+ Source: [`packages/terminal/terminal/src/index.ts`](../../packages/terminal/terminal/src/index.ts)
184
184
  <!-- END GENERATED cordis-surface -->
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](terminal.md) | 中文
4
4
 
5
- PTY 后端、`ctx.terminals` 与面向模型的消费方共享的类型。[持久 PTY Agent Note](../../.agents/notes/implemented/feature/2026-07-16-persistent-pty-sessions.md) 负责记录决策依据;本页记录来自 [`packages/terminal/terminal/src/types.ts`](../../packages/terminal/terminal/src/types.ts) 的跨包词汇。
5
+ PTY 后端、`ctx.terminals` 与面向模型的消费方共享的类型。[持久 PTY Agent Note](../../.agents/notes/implemented/feature/2026-07-16-persistent-pty-sessions.zh.md) 负责记录决策依据;本页记录来自 [`packages/terminal/terminal/src/types.ts`](../../packages/terminal/terminal/src/types.ts) 的跨包词汇。
6
6
 
7
7
  ## 标识与就绪
8
8
 
@@ -96,7 +96,7 @@ interface TerminalSendResult {
96
96
 
97
97
  ## Cordis API
98
98
 
99
- 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).
99
+ 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).
100
100
 
101
101
  <a id="ctxterminals--terminalsessionservice"></a>
102
102
 
@@ -178,7 +178,7 @@ async kill(owner: Agent, id: TerminalSessionId, reason: string = 'model request'
178
178
  list(owner: Agent): TerminalSessionSnapshot[]
179
179
  ```
180
180
 
181
- Types: [Agent](core.md)
181
+ Types: [Agent](core.zh.md)
182
182
 
183
- Source: [`packages/terminal/terminal/src/index.ts:105`](../../packages/terminal/terminal/src/index.ts)
183
+ Source: [`packages/terminal/terminal/src/index.ts`](../../packages/terminal/terminal/src/index.ts)
184
184
  <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write docs/subsystems/todo.md
5
+ todo.md: 70eca60ff484572b6c1a62737816504830623726
6
+ todo.zh.md: 74f76f59b6cd132bb1c3722c7fef7f554554b242
@@ -0,0 +1,32 @@
1
+ # Todo
2
+
3
+ English | [中文](todo.zh.md)
4
+
5
+ The durable todo vocabulary owned by [`@deepseek-ai/dsh-tool-todo`](../../packages/todo/tool-todo/README.md). The model-facing tool replaces one agent session's whole list; the package also owns the event declaration, replay projection, and invariant companion. Tool behavior and configuration are on the [package README](../../packages/todo/tool-todo/README.md).
6
+
7
+ Source: [`packages/todo/tool-todo/src/types.ts`](../../packages/todo/tool-todo/src/types.ts)
8
+
9
+ ## `TodoItem` — one list entry
10
+
11
+ ```ts type-equiv
12
+ /**
13
+ * One entry in an agent's todo list — the unit of the `todo/write`
14
+ * whole-list snapshot declared by this package.
15
+ *
16
+ * Deliberately minimal: a human-readable `content` line and a three-state
17
+ * `status`. No id, priority, or `activeForm` — the list is replaced wholesale
18
+ * on every write (last-write-wins), so entries need no stable identity. The
19
+ * three statuses describe the complete portable lifecycle needed by model and
20
+ * UI consumers.
21
+ */
22
+ interface TodoItem {
23
+ /** What this task is — a short imperative line shown in the UI. */
24
+ content: string
25
+ /** Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several. */
26
+ status: 'pending' | 'in_progress' | 'completed'
27
+ }
28
+ ```
29
+
30
+ ## Durable event and invariant
31
+
32
+ The package declaration-merges `todo/write: { todos: TodoItem[] }` into `SessionEventMap`. The event is log-only and carries the complete replacement list; the generated [persistence catalog](../persistence-catalog.md#todowrite--log-only) records its declaration site. The package's invariant companion validates existing and newly announced sessions in one pass, then tracks committed turn boundaries incrementally so every live `todo/write` is checked before append without rescanning the log.
@@ -0,0 +1,32 @@
1
+ # Todo
2
+
3
+ [English](todo.md) | 中文
4
+
5
+ 本页记录 [`@deepseek-ai/dsh-tool-todo`](../../packages/todo/tool-todo/README.zh.md) 拥有的持久 todo 词汇。面向模型的工具会整体替换一个 agent(智能体)会话的列表;该包还拥有事件声明、回放投影和不变量配套插件。工具行为与配置见[包 README](../../packages/todo/tool-todo/README.zh.md)。
6
+
7
+ 源码:[`packages/todo/tool-todo/src/types.ts`](../../packages/todo/tool-todo/src/types.ts)
8
+
9
+ ## `TodoItem`:一条列表项
10
+
11
+ ```ts type-equiv
12
+ /**
13
+ * One entry in an agent's todo list — the unit of the `todo/write`
14
+ * whole-list snapshot declared by this package.
15
+ *
16
+ * Deliberately minimal: a human-readable `content` line and a three-state
17
+ * `status`. No id, priority, or `activeForm` — the list is replaced wholesale
18
+ * on every write (last-write-wins), so entries need no stable identity. The
19
+ * three statuses describe the complete portable lifecycle needed by model and
20
+ * UI consumers.
21
+ */
22
+ interface TodoItem {
23
+ /** What this task is — a short imperative line shown in the UI. */
24
+ content: string
25
+ /** Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several. */
26
+ status: 'pending' | 'in_progress' | 'completed'
27
+ }
28
+ ```
29
+
30
+ ## 持久事件与不变量
31
+
32
+ 该包通过声明合并把 `todo/write: { todos: TodoItem[] }` 加入 `SessionEventMap`。此事件仅写入日志,并携带完整替换列表;生成的[持久化目录](../persistence-catalog.zh.md#todowrite--log-only)会记录其声明位置。该包的不变量配套插件会单次遍历校验现有会话和新发布的会话,随后增量追踪已提交的轮次边界,使每个实时 `todo/write` 都能在追加前得到校验,而无需重新扫描日志。
@@ -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/token-meter.md
5
- token-meter.md: a1a096b800d895cabe9e05b751e23f06cea67d67
6
- token-meter.zh.md: 16e13e3d168c3cd67bdf12903045dd9b4056402f
5
+ token-meter.md: 2265f5073efbd2953e4f399ad58a026772b60006
6
+ token-meter.zh.md: b1d9d66dc804fecace15489e61c1d080c096932d
@@ -12,21 +12,21 @@ Source: [`packages/llm/token-meter/src/types.ts`](../../packages/llm/token-meter
12
12
  /** Detached immutable request-pressure and surface snapshot at one consumed log revision. */
13
13
  interface TokenMeasurement {
14
14
  /** Number of durable events consumed; equal to the next unread event seq. */
15
- readonly logRevision: number
15
+ readonly logRevision: SessionLogOffset
16
16
  /** Provider or heuristic anchor used for this measurement. */
17
17
  readonly baseline: TokenMeasurementBaseline
18
18
  /** Signed repricing of current surface content relative to the baseline anchor. */
19
19
  readonly surfaceDeltaTokens: number
20
20
  /** Non-negative current request-and-response pressure. */
21
21
  readonly totalTokens: number
22
- /** Total heuristic tokens across the current surface. */
22
+ /** Total route-priced request tokens across the current surface; equals the sum of the node prices. */
23
23
  readonly surfaceTokens: number
24
24
  /** Current surface nodes in positional head-to-tail order. */
25
25
  readonly nodes: readonly TokenSurfaceNode[]
26
26
  }
27
27
  ```
28
28
 
29
- `baseline.kind === 'usage'` means the latest successful provider call has the same canonical request envelope and its total is no lower than that call's full heuristic anchor. `estimated` means no reusable conservative usage anchor exists, so the service priced the complete envelope and surface with its fixed heuristic. A later successful request replaces the earlier anchor; signed `surfaceDeltaTokens` preserves growth and shrinkage relative to a matching anchor. `totalTokens` remains request-and-response pressure, while `surfaceTokens` is the surface-only heuristic total and equals the sum of the node prices.
29
+ Every measurement resolves the effective envelope's routed provider/model to that route's declared request-image pricing through `ctx.llm`, so image occurrences are priced as the visual tokens plus model-visible text the request actually sends; routes and compositions without declared pricing keep the fixed heuristic. `baseline.kind === 'usage'` means the latest successful provider call has the same canonical request envelope and its total is no lower than that call's full route-priced anchor. `estimated` means no reusable conservative usage anchor exists, so the service priced the complete envelope and surface itself. A later successful request replaces the earlier anchor; signed `surfaceDeltaTokens` preserves growth and shrinkage relative to a matching anchor, repricing both sides under the same route. `totalTokens` remains request-and-response pressure, while `surfaceTokens` is the surface-only route-priced total and equals the sum of the node prices.
30
30
 
31
31
  ## `TokenSurfaceNode`
32
32
 
@@ -34,9 +34,20 @@ interface TokenMeasurement {
34
34
  /** One token-priced node in the current ordered session surface. */
35
35
  interface TokenSurfaceNode {
36
36
  /** Durable sequence number of the surface event. */
37
- readonly seq: number
38
- /** Heuristic tokens for the exact message projected by this node. */
37
+ readonly seq: SessionSeq
38
+ /**
39
+ * Request-pressure tokens for the exact message projected by this node under
40
+ * the measured route: image occurrences carry the route's declared visual
41
+ * price when the routed adapter declares one, and the fixed heuristic
42
+ * otherwise. Trigger, retention, and range selection all read this price.
43
+ */
39
44
  readonly tokens: number
45
+ /**
46
+ * Fixed-heuristic tokens for the same message, independent of any route.
47
+ * The shadow-price protocol prices replacements with this value so the O(1)
48
+ * projection fold stays in agreement with its own appends.
49
+ */
50
+ readonly heuristicTokens: number
40
51
  }
41
52
  ```
42
53
 
@@ -48,7 +59,7 @@ Surface order is authoritative; replacement nodes can have higher durable seqs t
48
59
 
49
60
  ## Cordis API
50
61
 
51
- 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).
62
+ 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).
52
63
 
53
64
  <a id="ctxtokenmeter--tokenmeter"></a>
54
65
 
@@ -60,14 +71,18 @@ Replay owner for one service-wide estimator and isolated per-session folds.
60
71
  /**
61
72
  * Measure current request pressure and surface through the durable tail.
62
73
  *
63
- * Provider usage is reused only when the latest successful call's canonical
64
- * request envelope matches `requestHeader` and its total is no lower than
65
- * that call's full heuristic anchor; otherwise the complete envelope and
66
- * surface are heuristically repriced.
74
+ * The effective envelope's routed provider/model selects the request-image
75
+ * pricing every node is priced under: a route whose adapter declares image
76
+ * pricing charges each retained image its visual tokens plus its
77
+ * model-visible text, while other routes keep the fixed heuristic. Provider
78
+ * usage is reused only when the latest successful call's canonical request
79
+ * envelope matches `requestHeader` and its total is no lower than that
80
+ * call's full route-priced anchor; otherwise the complete envelope and
81
+ * surface are repriced.
67
82
  *
68
- * `requestHeader` affects request pressure only; surface fields always
69
- * describe the current session surface. Every call clones those positional
70
- * nodes, so measurement is O(surface).
83
+ * `requestHeader` replaces the latest logged envelope for pressure and node
84
+ * pricing; the node set always describes the current session surface. Every
85
+ * call clones those positional nodes, so measurement is O(surface).
71
86
  *
72
87
  * @param session - session to replay through its current durable tail.
73
88
  * @param requestHeader - optional effective request envelope replacing the latest logged header.
@@ -86,5 +101,5 @@ estimateMessage(message: Message): number
86
101
 
87
102
  Types: [EpochHeader](session.md) · [Message](llm-streaming.md) · [Session](session.md)
88
103
 
89
- Source: [`packages/llm/token-meter/src/index.ts:74`](../../packages/llm/token-meter/src/index.ts)
104
+ Source: [`packages/llm/token-meter/src/index.ts`](../../packages/llm/token-meter/src/index.ts)
90
105
  <!-- END GENERATED cordis-surface -->
@@ -12,21 +12,21 @@
12
12
  /** Detached immutable request-pressure and surface snapshot at one consumed log revision. */
13
13
  interface TokenMeasurement {
14
14
  /** Number of durable events consumed; equal to the next unread event seq. */
15
- readonly logRevision: number
15
+ readonly logRevision: SessionLogOffset
16
16
  /** Provider or heuristic anchor used for this measurement. */
17
17
  readonly baseline: TokenMeasurementBaseline
18
18
  /** Signed repricing of current surface content relative to the baseline anchor. */
19
19
  readonly surfaceDeltaTokens: number
20
20
  /** Non-negative current request-and-response pressure. */
21
21
  readonly totalTokens: number
22
- /** Total heuristic tokens across the current surface. */
22
+ /** Total route-priced request tokens across the current surface; equals the sum of the node prices. */
23
23
  readonly surfaceTokens: number
24
24
  /** Current surface nodes in positional head-to-tail order. */
25
25
  readonly nodes: readonly TokenSurfaceNode[]
26
26
  }
27
27
  ```
28
28
 
29
- `baseline.kind === 'usage'` 表示最近一次成功的提供方调用具有相同的规范请求 envelope,且该调用的总量不低于其完整启发式锚点。`estimated` 表示不存在可复用的保守 usage 锚点,因此服务使用固定启发式规则对完整信封和表层定价。后续成功请求会替换早先的锚点;有符号的 `surfaceDeltaTokens` 会保留相对于匹配锚点的增长与缩减。`totalTokens` 仍表示请求与响应压力,`surfaceTokens` 则是仅针对表层的启发式总量,等于所有节点价格之和。
29
+ 每次计量都会通过 `ctx.llm` 把生效信封的路由 provider/model 解析为该路由声明的请求图片定价,因此图片出现处按请求实际发送的视觉 token 加模型可见文本计价;未声明定价的路由与组合保持固定启发式规则。`baseline.kind === 'usage'` 表示最近一次成功的提供方调用具有相同的规范请求 envelope,且该调用的总量不低于其完整路由定价锚点。`estimated` 表示不存在可复用的保守 usage 锚点,因此服务自行对完整信封和表层定价。后续成功请求会替换早先的锚点;有符号的 `surfaceDeltaTokens` 会保留相对于匹配锚点的增长与缩减,且两侧按同一路由重新定价。`totalTokens` 仍表示请求与响应压力,`surfaceTokens` 则是表层的路由定价总量,等于所有节点价格之和。
30
30
 
31
31
  ## `TokenSurfaceNode`
32
32
 
@@ -34,9 +34,20 @@ interface TokenMeasurement {
34
34
  /** One token-priced node in the current ordered session surface. */
35
35
  interface TokenSurfaceNode {
36
36
  /** Durable sequence number of the surface event. */
37
- readonly seq: number
38
- /** Heuristic tokens for the exact message projected by this node. */
37
+ readonly seq: SessionSeq
38
+ /**
39
+ * Request-pressure tokens for the exact message projected by this node under
40
+ * the measured route: image occurrences carry the route's declared visual
41
+ * price when the routed adapter declares one, and the fixed heuristic
42
+ * otherwise. Trigger, retention, and range selection all read this price.
43
+ */
39
44
  readonly tokens: number
45
+ /**
46
+ * Fixed-heuristic tokens for the same message, independent of any route.
47
+ * The shadow-price protocol prices replacements with this value so the O(1)
48
+ * projection fold stays in agreement with its own appends.
49
+ */
50
+ readonly heuristicTokens: number
40
51
  }
41
52
  ```
42
53
 
@@ -48,7 +59,7 @@ interface TokenSurfaceNode {
48
59
 
49
60
  ## Cordis API
50
61
 
51
- 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).
62
+ 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).
52
63
 
53
64
  <a id="ctxtokenmeter--tokenmeter"></a>
54
65
 
@@ -60,14 +71,18 @@ Replay owner for one service-wide estimator and isolated per-session folds.
60
71
  /**
61
72
  * Measure current request pressure and surface through the durable tail.
62
73
  *
63
- * Provider usage is reused only when the latest successful call's canonical
64
- * request envelope matches `requestHeader` and its total is no lower than
65
- * that call's full heuristic anchor; otherwise the complete envelope and
66
- * surface are heuristically repriced.
74
+ * The effective envelope's routed provider/model selects the request-image
75
+ * pricing every node is priced under: a route whose adapter declares image
76
+ * pricing charges each retained image its visual tokens plus its
77
+ * model-visible text, while other routes keep the fixed heuristic. Provider
78
+ * usage is reused only when the latest successful call's canonical request
79
+ * envelope matches `requestHeader` and its total is no lower than that
80
+ * call's full route-priced anchor; otherwise the complete envelope and
81
+ * surface are repriced.
67
82
  *
68
- * `requestHeader` affects request pressure only; surface fields always
69
- * describe the current session surface. Every call clones those positional
70
- * nodes, so measurement is O(surface).
83
+ * `requestHeader` replaces the latest logged envelope for pressure and node
84
+ * pricing; the node set always describes the current session surface. Every
85
+ * call clones those positional nodes, so measurement is O(surface).
71
86
  *
72
87
  * @param session - session to replay through its current durable tail.
73
88
  * @param requestHeader - optional effective request envelope replacing the latest logged header.
@@ -84,7 +99,7 @@ measure(session: Session, requestHeader?: EpochHeader): TokenMeasurement
84
99
  estimateMessage(message: Message): number
85
100
  ```
86
101
 
87
- Types: [EpochHeader](session.md) · [Message](llm-streaming.md) · [Session](session.md)
102
+ Types: [EpochHeader](session.zh.md) · [Message](llm-streaming.zh.md) · [Session](session.zh.md)
88
103
 
89
- Source: [`packages/llm/token-meter/src/index.ts:74`](../../packages/llm/token-meter/src/index.ts)
104
+ Source: [`packages/llm/token-meter/src/index.ts`](../../packages/llm/token-meter/src/index.ts)
90
105
  <!-- 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/tools.md
5
- tools.md: eb9c21f31e2929c7caea3ab905d1e9941b97ef6d
6
- tools.zh.md: 033cc0e8ca52dd52bb92df32de309293d2e14bd4
5
+ tools.md: 9939e8ab9fff9fa5bd23fd370e07f6296a608824
6
+ tools.zh.md: 52e812a35d6932a5ed00a86a3d3fe71460b26cd4