dsh-plugin-guide 0.3.21 → 0.3.23

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 (438) hide show
  1. package/README-es.md +15 -12
  2. package/README-hi.md +15 -12
  3. package/README-pt.md +15 -12
  4. package/README-zh.md +15 -12
  5. package/README.md +290 -280
  6. package/SKILL.md +36 -19
  7. package/dist/dsh-plugin-dev.js +113 -9
  8. package/guide/choosing-a-plugin.md +412 -0
  9. package/guide/choosing-a-plugin.zh-CN.md +414 -0
  10. package/guide/links.md +20 -2
  11. package/guide/migration-0.2.md +219 -0
  12. package/guide/plugin-dev-guide.md +99 -24
  13. package/guide/quick-reference.es.md +14 -8
  14. package/guide/quick-reference.hi.md +15 -9
  15. package/guide/quick-reference.md +18 -10
  16. package/guide/quick-reference.pt.md +15 -9
  17. package/guide/quick-reference.zh-CN.md +19 -11
  18. package/guide/release-engineering.md +2 -2
  19. package/guide/release-engineering.zh-CN.md +2 -2
  20. package/guide/unfixed-issues.md +117 -82
  21. package/guide/when-to-retire-a-plugin.md +127 -0
  22. package/guide/when-to-retire-a-plugin.zh-CN.md +127 -0
  23. package/icon.svg +5 -0
  24. package/locale/en.json +6 -0
  25. package/locale/zh.json +6 -0
  26. package/package.json +8 -4
  27. package/references/official-docs/AGENTS.md +8 -5
  28. package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -5
  29. package/references/official-docs/README.i18n.yaml +33 -5
  30. package/references/official-docs/README.zh.md +3 -3
  31. package/references/official-docs/SNAPSHOT.md +3 -3
  32. package/references/official-docs/THIRD_PARTY_NOTICES.md +34 -6
  33. package/references/official-docs/docs/AGENTS.md +4 -4
  34. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +9 -5
  35. package/references/official-docs/docs/api-gateway.i18n.yaml +27 -5
  36. package/references/official-docs/docs/api-gateway.md +10 -9
  37. package/references/official-docs/docs/api-gateway.zh.md +10 -9
  38. package/references/official-docs/docs/architecture.i18n.yaml +36 -5
  39. package/references/official-docs/docs/architecture.md +10 -8
  40. package/references/official-docs/docs/architecture.zh.md +10 -8
  41. package/references/official-docs/docs/capability-seams.i18n.yaml +9 -5
  42. package/references/official-docs/docs/capability-seams.md +76 -32
  43. package/references/official-docs/docs/capability-seams.zh.md +76 -32
  44. package/references/official-docs/docs/config-catalog.i18n.yaml +18 -5
  45. package/references/official-docs/docs/config-catalog.md +1360 -765
  46. package/references/official-docs/docs/config-catalog.zh.md +1363 -767
  47. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +27 -5
  48. package/references/official-docs/docs/cookbook/adding-a-package.md +56 -3
  49. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +54 -3
  50. package/references/official-docs/docs/cookbook/adding-a-remote-api.i18n.yaml +24 -5
  51. package/references/official-docs/docs/cookbook/adding-a-remote-api.md +2 -2
  52. package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +2 -2
  53. package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +39 -5
  54. package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +46 -6
  55. package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +46 -6
  56. package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +21 -5
  57. package/references/official-docs/docs/cookbook/adding-a-settings-card.md +34 -64
  58. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +34 -64
  59. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +30 -5
  60. package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
  61. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +2 -2
  62. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +18 -5
  63. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +18 -5
  64. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +24 -5
  65. package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
  66. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +3 -3
  67. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +21 -5
  68. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +15 -5
  69. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +30 -5
  70. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +13 -1
  71. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +13 -1
  72. package/references/official-docs/docs/cordis-api/context.i18n.yaml +72 -5
  73. package/references/official-docs/docs/cordis-api/events.i18n.yaml +36 -5
  74. package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +75 -5
  75. package/references/official-docs/docs/cordis-api/inherited.md +15 -13
  76. package/references/official-docs/docs/cordis-api/registry.i18n.yaml +21 -5
  77. package/references/official-docs/docs/cordis-api/service.i18n.yaml +36 -5
  78. package/references/official-docs/docs/cordis-primer.i18n.yaml +21 -5
  79. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +21 -5
  80. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +15 -5
  81. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +21 -5
  82. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +15 -5
  83. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +18 -5
  84. package/references/official-docs/docs/cordis-tutorial/05-config.md +27 -0
  85. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +27 -0
  86. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +15 -5
  87. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +18 -5
  88. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +15 -5
  89. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +33 -5
  90. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +7 -7
  91. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +7 -7
  92. package/references/official-docs/docs/defensive-patterns.i18n.yaml +27 -5
  93. package/references/official-docs/docs/dependency-catalog.json +2 -2
  94. package/references/official-docs/docs/development.i18n.yaml +48 -5
  95. package/references/official-docs/docs/development.md +27 -10
  96. package/references/official-docs/docs/development.zh.md +27 -10
  97. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +12 -5
  98. package/references/official-docs/docs/event-producer-consumer.md +78 -66
  99. package/references/official-docs/docs/event-producer-consumer.zh.md +78 -66
  100. package/references/official-docs/docs/glossary.i18n.yaml +24 -5
  101. package/references/official-docs/docs/graph-atlas.i18n.yaml +9 -5
  102. package/references/official-docs/docs/i18n/README.i18n.yaml +18 -5
  103. package/references/official-docs/docs/i18n/README.md +12 -8
  104. package/references/official-docs/docs/i18n/README.zh.md +12 -8
  105. package/references/official-docs/docs/i18n/terminology.md +4 -4
  106. package/references/official-docs/docs/i18n/translation-prompt.md +2 -2
  107. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +27 -5
  108. package/references/official-docs/docs/module-graph.i18n.yaml +9 -5
  109. package/references/official-docs/docs/module-graph.md +348 -245
  110. package/references/official-docs/docs/module-graph.zh.md +348 -245
  111. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2064 -5
  112. package/references/official-docs/docs/persistence-catalog.md +5275 -3205
  113. package/references/official-docs/docs/persistence-catalog.zh.md +5275 -3205
  114. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +27 -5
  115. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +27 -5
  116. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +27 -5
  117. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +27 -5
  118. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +28 -0
  119. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +120 -0
  120. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.schema.json +16212 -0
  121. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
  122. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.i18n.yaml +28 -0
  123. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
  124. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.schema.json +302 -0
  125. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
  126. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.i18n.yaml +28 -0
  127. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
  128. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.schema.json +250 -0
  129. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
  130. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.i18n.yaml +28 -0
  131. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.md +60 -0
  132. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.schema.json +11405 -0
  133. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
  134. package/references/official-docs/docs/persistence-changes/README.i18n.yaml +27 -5
  135. package/references/official-docs/docs/persistence-changes/README.md +17 -3
  136. package/references/official-docs/docs/persistence-changes/README.zh.md +17 -3
  137. package/references/official-docs/docs/persistence-changes/finalized/v4.json +379 -0
  138. package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +27 -5
  139. package/references/official-docs/docs/persistence-changes/historical-formats/README.md +3 -2
  140. package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +3 -2
  141. package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +1284 -5
  142. package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +1284 -5
  143. package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +1344 -5
  144. package/references/official-docs/docs/persistence-changes/historical-formats/v3.i18n.yaml +1441 -0
  145. package/references/official-docs/docs/persistence-changes/historical-formats/v3.md +5634 -0
  146. package/references/official-docs/docs/persistence-changes/historical-formats/v3.schema.json +61307 -0
  147. package/references/official-docs/docs/persistence-changes/historical-formats/v3.zh.md +5634 -0
  148. package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +30 -5
  149. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +30 -5
  150. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +30 -5
  151. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +30 -5
  152. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +30 -5
  153. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +30 -5
  154. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +30 -5
  155. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +30 -5
  156. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +30 -5
  157. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +30 -5
  158. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +30 -5
  159. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +30 -5
  160. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +30 -5
  161. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +30 -5
  162. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +30 -5
  163. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +30 -5
  164. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +30 -5
  165. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +30 -5
  166. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +30 -5
  167. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +30 -5
  168. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +30 -5
  169. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +30 -5
  170. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +30 -5
  171. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +30 -5
  172. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +30 -5
  173. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +3 -3
  174. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +30 -5
  175. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +30 -5
  176. package/references/official-docs/docs/persistence-schema.json +12692 -48753
  177. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +33 -5
  178. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +27 -5
  179. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +27 -5
  180. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +27 -5
  181. package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -5
  182. package/references/official-docs/docs/rescope.i18n.yaml +18 -5
  183. package/references/official-docs/docs/rescope.md +1 -1
  184. package/references/official-docs/docs/rescope.zh.md +1 -1
  185. package/references/official-docs/docs/session-format-status.i18n.yaml +27 -5
  186. package/references/official-docs/docs/session-format-status.md +17 -3
  187. package/references/official-docs/docs/session-format-status.zh.md +17 -3
  188. package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -5
  189. package/references/official-docs/docs/subsystems/README.md +6 -3
  190. package/references/official-docs/docs/subsystems/README.zh.md +6 -3
  191. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +21 -5
  192. package/references/official-docs/docs/subsystems/agent-team.md +52 -28
  193. package/references/official-docs/docs/subsystems/agent-team.zh.md +52 -28
  194. package/references/official-docs/docs/subsystems/approval.i18n.yaml +18 -5
  195. package/references/official-docs/docs/subsystems/approval.md +1 -1
  196. package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
  197. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +12 -5
  198. package/references/official-docs/docs/subsystems/attachment.md +2 -2
  199. package/references/official-docs/docs/subsystems/attachment.zh.md +2 -2
  200. package/references/official-docs/docs/subsystems/boot.i18n.yaml +9 -5
  201. package/references/official-docs/docs/subsystems/boot.md +117 -17
  202. package/references/official-docs/docs/subsystems/boot.zh.md +117 -17
  203. package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +18 -5
  204. package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +28 -0
  205. package/references/official-docs/docs/subsystems/claude-code-mods.md +146 -0
  206. package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +146 -0
  207. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +18 -5
  208. package/references/official-docs/docs/subsystems/client-modules.md +13 -7
  209. package/references/official-docs/docs/subsystems/client-modules.zh.md +13 -7
  210. package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +21 -5
  211. package/references/official-docs/docs/subsystems/commands.i18n.yaml +18 -5
  212. package/references/official-docs/docs/subsystems/commands.md +1 -1
  213. package/references/official-docs/docs/subsystems/commands.zh.md +1 -1
  214. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +21 -5
  215. package/references/official-docs/docs/subsystems/compaction.md +2 -2
  216. package/references/official-docs/docs/subsystems/compaction.zh.md +2 -2
  217. package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +15 -5
  218. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +30 -5
  219. package/references/official-docs/docs/subsystems/conversation.md +35 -6
  220. package/references/official-docs/docs/subsystems/conversation.zh.md +34 -5
  221. package/references/official-docs/docs/subsystems/core.i18n.yaml +36 -5
  222. package/references/official-docs/docs/subsystems/core.md +70 -214
  223. package/references/official-docs/docs/subsystems/core.zh.md +70 -214
  224. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +24 -5
  225. package/references/official-docs/docs/subsystems/credentials.md +168 -5
  226. package/references/official-docs/docs/subsystems/credentials.zh.md +168 -5
  227. package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +27 -5
  228. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -5
  229. package/references/official-docs/docs/subsystems/extensions.md +6 -4
  230. package/references/official-docs/docs/subsystems/extensions.zh.md +6 -4
  231. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +27 -5
  232. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +33 -5
  233. package/references/official-docs/docs/subsystems/filesystem.md +10 -0
  234. package/references/official-docs/docs/subsystems/filesystem.zh.md +10 -0
  235. package/references/official-docs/docs/subsystems/goal.i18n.yaml +18 -5
  236. package/references/official-docs/docs/subsystems/goal.md +1 -1
  237. package/references/official-docs/docs/subsystems/goal.zh.md +1 -1
  238. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +24 -5
  239. package/references/official-docs/docs/subsystems/jobs.md +335 -126
  240. package/references/official-docs/docs/subsystems/jobs.zh.md +335 -126
  241. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +48 -5
  242. package/references/official-docs/docs/subsystems/llm-streaming.md +60 -31
  243. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +60 -31
  244. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +18 -5
  245. package/references/official-docs/docs/subsystems/mcp.i18n.yaml +33 -5
  246. package/references/official-docs/docs/subsystems/mcp.md +2 -2
  247. package/references/official-docs/docs/subsystems/mcp.zh.md +2 -2
  248. package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +18 -5
  249. package/references/official-docs/docs/subsystems/office-to-pdf.md +4 -4
  250. package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +4 -4
  251. package/references/official-docs/docs/subsystems/otel.i18n.yaml +7 -0
  252. package/references/official-docs/docs/subsystems/otel.md +44 -0
  253. package/references/official-docs/docs/subsystems/otel.zh.md +44 -0
  254. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +18 -5
  255. package/references/official-docs/docs/subsystems/permission-presets.md +7 -6
  256. package/references/official-docs/docs/subsystems/permission-presets.zh.md +7 -6
  257. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +36 -5
  258. package/references/official-docs/docs/subsystems/persistence.md +3 -3
  259. package/references/official-docs/docs/subsystems/persistence.zh.md +3 -3
  260. package/references/official-docs/docs/subsystems/plan.i18n.yaml +21 -5
  261. package/references/official-docs/docs/subsystems/plan.md +1 -1
  262. package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
  263. package/references/official-docs/docs/subsystems/product-telemetry.i18n.yaml +10 -0
  264. package/references/official-docs/docs/subsystems/product-telemetry.md +79 -0
  265. package/references/official-docs/docs/subsystems/product-telemetry.zh.md +79 -0
  266. package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +18 -5
  267. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +18 -5
  268. package/references/official-docs/docs/subsystems/sandbox.md +1 -1
  269. package/references/official-docs/docs/subsystems/sandbox.zh.md +1 -1
  270. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +39 -5
  271. package/references/official-docs/docs/subsystems/schedule.md +391 -33
  272. package/references/official-docs/docs/subsystems/schedule.zh.md +391 -33
  273. package/references/official-docs/docs/subsystems/scope.i18n.yaml +15 -5
  274. package/references/official-docs/docs/subsystems/scope.md +1 -1
  275. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  276. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +15 -5
  277. package/references/official-docs/docs/subsystems/session-projection.md +20 -18
  278. package/references/official-docs/docs/subsystems/session-projection.zh.md +20 -18
  279. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +27 -5
  280. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +18 -5
  281. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +21 -5
  282. package/references/official-docs/docs/subsystems/session-telemetry.md +6 -4
  283. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -4
  284. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +15 -5
  285. package/references/official-docs/docs/subsystems/session.i18n.yaml +66 -5
  286. package/references/official-docs/docs/subsystems/session.md +113 -62
  287. package/references/official-docs/docs/subsystems/session.zh.md +113 -62
  288. package/references/official-docs/docs/subsystems/settings.i18n.yaml +12 -5
  289. package/references/official-docs/docs/subsystems/settings.md +42 -292
  290. package/references/official-docs/docs/subsystems/settings.zh.md +42 -292
  291. package/references/official-docs/docs/subsystems/shell.i18n.yaml +24 -5
  292. package/references/official-docs/docs/subsystems/shell.md +29 -22
  293. package/references/official-docs/docs/subsystems/shell.zh.md +29 -22
  294. package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +36 -5
  295. package/references/official-docs/docs/subsystems/sidebar-right.md +14 -9
  296. package/references/official-docs/docs/subsystems/sidebar-right.zh.md +14 -9
  297. package/references/official-docs/docs/subsystems/skills.i18n.yaml +27 -5
  298. package/references/official-docs/docs/subsystems/skills.md +2 -2
  299. package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
  300. package/references/official-docs/docs/subsystems/slots.i18n.yaml +27 -5
  301. package/references/official-docs/docs/subsystems/slots.md +21 -7
  302. package/references/official-docs/docs/subsystems/slots.zh.md +21 -7
  303. package/references/official-docs/docs/subsystems/spill.i18n.yaml +15 -5
  304. package/references/official-docs/docs/subsystems/spill.md +1 -1
  305. package/references/official-docs/docs/subsystems/spill.zh.md +1 -1
  306. package/references/official-docs/docs/subsystems/ssh.i18n.yaml +21 -5
  307. package/references/official-docs/docs/subsystems/storage.i18n.yaml +24 -5
  308. package/references/official-docs/docs/subsystems/storage.md +1 -2
  309. package/references/official-docs/docs/subsystems/storage.zh.md +1 -2
  310. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +30 -5
  311. package/references/official-docs/docs/subsystems/subagent.md +35 -60
  312. package/references/official-docs/docs/subsystems/subagent.zh.md +35 -60
  313. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +30 -5
  314. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +18 -5
  315. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +18 -5
  316. package/references/official-docs/docs/subsystems/todo.i18n.yaml +12 -5
  317. package/references/official-docs/docs/subsystems/todo.md +3 -3
  318. package/references/official-docs/docs/subsystems/todo.zh.md +3 -3
  319. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +12 -5
  320. package/references/official-docs/docs/subsystems/tools.i18n.yaml +24 -5
  321. package/references/official-docs/docs/subsystems/tools.md +15 -4
  322. package/references/official-docs/docs/subsystems/tools.zh.md +15 -4
  323. package/references/official-docs/docs/subsystems/typert.i18n.yaml +21 -5
  324. package/references/official-docs/docs/subsystems/typert.md +147 -6
  325. package/references/official-docs/docs/subsystems/typert.zh.md +147 -6
  326. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +27 -5
  327. package/references/official-docs/docs/subsystems/user-questions.md +128 -1
  328. package/references/official-docs/docs/subsystems/user-questions.zh.md +129 -2
  329. package/references/official-docs/docs/subsystems/voice-input.i18n.yaml +19 -0
  330. package/references/official-docs/docs/subsystems/voice-input.md +164 -0
  331. package/references/official-docs/docs/subsystems/voice-input.zh.md +164 -0
  332. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +36 -5
  333. package/references/official-docs/docs/subsystems/web-client.md +10 -5
  334. package/references/official-docs/docs/subsystems/web-client.zh.md +10 -5
  335. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +15 -5
  336. package/references/official-docs/docs/subsystems/web-server.md +12 -4
  337. package/references/official-docs/docs/subsystems/web-server.zh.md +12 -4
  338. package/references/official-docs/docs/subsystems/web.i18n.yaml +27 -5
  339. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +18 -5
  340. package/references/official-docs/docs/subsystems/webhook.md +1 -1
  341. package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
  342. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +27 -5
  343. package/references/official-docs/docs/subsystems/workflow.md +2 -2
  344. package/references/official-docs/docs/subsystems/workflow.zh.md +2 -2
  345. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +27 -5
  346. package/references/official-docs/docs/subsystems/workspace.md +175 -35
  347. package/references/official-docs/docs/subsystems/workspace.zh.md +175 -35
  348. package/references/official-docs/docs/testing.i18n.yaml +33 -5
  349. package/references/official-docs/docs/testing.md +2 -2
  350. package/references/official-docs/docs/testing.zh.md +2 -2
  351. package/references/official-docs/docs/tool-catalog.i18n.yaml +312 -5
  352. package/references/official-docs/docs/tool-catalog.md +321 -92
  353. package/references/official-docs/docs/tool-catalog.zh.md +321 -92
  354. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +9 -5
  355. package/references/official-docs/docs/tool-execution-pipeline.md +6 -3
  356. package/references/official-docs/docs/tool-execution-pipeline.zh.md +6 -3
  357. package/references/official-docs/docs/ui-radius.i18n.yaml +31 -0
  358. package/references/official-docs/docs/ui-radius.md +115 -0
  359. package/references/official-docs/docs/ui-radius.zh.md +115 -0
  360. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.i18n.yaml +16 -0
  361. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
  362. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
  363. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.i18n.yaml +16 -0
  364. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
  365. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
  366. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.i18n.yaml +16 -0
  367. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
  368. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
  369. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.i18n.yaml +16 -0
  370. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
  371. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
  372. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.i18n.yaml +16 -0
  373. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
  374. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
  375. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.i18n.yaml +16 -0
  376. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
  377. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
  378. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +27 -5
  379. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +36 -5
  380. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +30 -5
  381. package/references/official-docs/docs/user/develop/basic/publish.md +7 -1
  382. package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -1
  383. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +15 -5
  384. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +45 -5
  385. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +30 -5
  386. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +39 -5
  387. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +9 -5
  388. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +45 -5
  389. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +33 -5
  390. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +1 -1
  391. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +1 -1
  392. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +24 -5
  393. package/references/official-docs/docs/user/guide/index.i18n.yaml +18 -5
  394. package/references/official-docs/docs/user/guide/index.md +1 -0
  395. package/references/official-docs/docs/user/guide/index.zh.md +1 -0
  396. package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +36 -5
  397. package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +24 -5
  398. package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
  399. package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
  400. package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
  401. package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
  402. package/references/official-docs/docs/user/guide/providers.i18n.yaml +36 -5
  403. package/references/official-docs/docs/user/guide/providers.md +88 -78
  404. package/references/official-docs/docs/user/guide/providers.zh.md +102 -92
  405. package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +19 -0
  406. package/references/official-docs/docs/user/guide/public-deployments.md +33 -0
  407. package/references/official-docs/docs/user/guide/public-deployments.zh.md +33 -0
  408. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +27 -5
  409. package/references/official-docs/docs/user/guide/python-sdk.md +1 -1
  410. package/references/official-docs/docs/user/guide/python-sdk.zh.md +1 -1
  411. package/references/official-docs/docs/user/guide/schedule.i18n.yaml +30 -5
  412. package/references/official-docs/docs/user/guide/schedule.md +69 -11
  413. package/references/official-docs/docs/user/guide/schedule.zh.md +69 -11
  414. package/references/official-docs/docs/user/index.i18n.yaml +9 -5
  415. package/references/official-docs/docs/web-styling.i18n.yaml +18 -5
  416. package/references/official-docs/docs/web-styling.md +12 -3
  417. package/references/official-docs/docs/web-styling.zh.md +12 -3
  418. package/references/official-docs/packages/AGENTS.md +1 -2
  419. package/references/official-docs/packages/README.md +5 -5
  420. package/references/official-docs/vendor/README.md +6 -2
  421. package/references/official-docs/website-docs.ts +10 -3
  422. package/references/official-plugin-dev-skill.md +124 -0
  423. package/references/sources.md +10 -5
  424. package/scripts/archive-discussions.ps1 +9 -1
  425. package/scripts/build-llms-full.mjs +64 -0
  426. package/scripts/check-docs-drift.ps1 +1 -1
  427. package/scripts/sync-official-docs.ps1 +1 -1
  428. package/templates/js/icon.svg +4 -0
  429. package/templates/js/locale/en.json +6 -0
  430. package/templates/js/locale/zh.json +6 -0
  431. package/templates/js/package.json +9 -1
  432. package/templates/ts/icon.svg +4 -0
  433. package/templates/ts/locale/en.json +6 -0
  434. package/templates/ts/locale/zh.json +6 -0
  435. package/templates/ts/package.json +9 -1
  436. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +0 -6
  437. package/references/official-docs/docs/subsystems/invariants.md +0 -88
  438. package/references/official-docs/docs/subsystems/invariants.zh.md +0 -88
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](api-gateway.zh.md)
4
4
 
5
- This is the current-state reference for the Typert API Gateway. It describes how business services declare unary Remote methods, how the build generates Host and Client contracts, and how calls reuse the Connection RPC and `/api` route. Session events, incremental data, and other streaming protocols are outside this document's scope; they may use the same Connection but do not use Remote method descriptors.
5
+ This is the current-state reference for the Typert API Gateway. It describes how business services declare unary and stream Remote methods, how the build generates Host and Client contracts, and how calls reuse the Connection RPC and `/api` route. Session events, incremental data, and other streaming protocols are outside this document's scope; they may use the same Connection but do not use Remote method descriptors.
6
6
 
7
7
  ## Programming model
8
8
 
@@ -55,6 +55,8 @@ export class GoalService extends TypertRemoteService {
55
55
 
56
56
  Remote methods may return a value synchronously or return a Promise. For cooperative cancellation, the final parameter in the Host signature must be `signal: AbortSignal` using the global type; it is recorded in the descriptor instead of entering `args`, while the generated Client method accepts an optional final `AbortSignal`.
57
57
 
58
+ `@Remote({ mode: 'stream' })` marks a method that returns `Iterable`, `AsyncIterable`, or `RemoteStream<Out, In>`: the Gateway delivers each yielded item, a value the Host method produced, over its multiplexed `/api/remote.mux` WebSocket or an in-process carrier, and the generated Client method returns a `RemoteStreamHandle<Out, In>` that iterates the items and exposes `send`, `end`, and `dispose` for the Client-to-Host uplink of the same logical stream. The second type argument of `RemoteStream<Out, In>` declares the uplink item type; the Gateway validates each item the Client sends, because it arrives from the browser, with the generated `In` codec before the Host method reads it through `this.ctx.invocation.uplink<In>()`. The uplink enters neither `args` nor the parameter list; the [Gateway README](../packages/api/gateway/README.md) owns the frame, half-close, cancellation, and inbox-bound contracts.
59
+
58
60
  The Client uses concrete functions on ordinary objects, not a JavaScript Proxy. Direct and scoped calls appear under `ctx.remote.<namespace>` and `agentCtx.remote.<namespace>`. Each namespace is a traced Cordis child Service registered as `remote.<namespace>`; the Client assembly mounts contributions through `ctx.remote.$mount()`, and the namespace unloads after its last method is withdrawn. Dependency declarations belong to the actual caller: only a business package that reads `ctx.remote.<namespace>` or `agentCtx.remote.<namespace>` declares both `remote` and `remote.<namespace>` in its own `inject`; assemblies that only mount contributions and higher-level runtimes that do not call that namespace do not declare the namespace dependency on the business package's behalf. When an `@Remote` method has exactly one lookup parameter and a same-named `TypertContextMap` uses the same wire identity, the generated scoped signature omits that identity parameter. `@RemoteScope` generates only the scoped invocation interface.
59
61
 
60
62
  ```ts ignore-check
@@ -96,7 +98,7 @@ The API Gateway package owns the Host dispatcher and Client Remote endpoint as p
96
98
 
97
99
  The root build runs `build:lib:host`, `build:lib:client`, and `build:web` in order. The Host lib phase first runs `tsc -b tsconfig.host.json`, then `tsdown --env.DSH_BUILD_FACE host`; the normal Host Project Reference graph compiles the Typert generator, which runs during this tsdown pass with the Host aggregate as its only `ts.Program` seed. The Client lib phase then runs `tsc -b tsconfig.client.json` and `tsdown --env.DSH_BUILD_FACE client`, consuming the newly generated Remote Client declarations and runtime contributions without starting Typert again.
98
100
 
99
- Both tsdown passes receive the complete workspace and bundle only JavaScript emitted to `lib/types` by the corresponding tsc phase. The root config does not scan Client artifacts, classify package names, or pass a maintained filter to tsdown; package-local configs return entries for the current phase based on `DSH_BUILD_FACE`. An ordinary Client plugin produces both its Node loader entry and browser bundle during the Client phase.
101
+ Both tsdown passes match `vendor/*`, `packages/*/*`, and `apps/cli`, the Host pass also `apps/desktop-host` ([build order](development.md#typescript-project-layout)), and both bundle only JavaScript emitted to `lib/types` by the corresponding tsc phase. The root config does not scan Client artifacts, classify package names, or pass a maintained filter to tsdown; package-local configs return entries for the current phase based on `DSH_BUILD_FACE`. An ordinary Client plugin produces both its Node loader entry and browser bundle during the Client phase.
100
102
 
101
103
  `api/remotes`, `api/gateway`, `api/session-controller`, and `api/workspace-controller` (plus `client/connection`) split TypeScript faces. `api/remotes`' Client project depends on `/remote` declarations generated for business packages during Host tsdown; root aggregates and direct consumers must reference each split package's `tsconfig.host.json` or `tsconfig.client.json` respectively. `api-remotes`' `clientBundle(..., { hostPhase: true })` produces its Host entry during Host tsdown and leaves only the browser entry for Client tsdown. The Agent/Session lookup policy lives in `@deepseek-ai/dsh-api-session-controller`, not in `api-remotes`.
102
104
 
@@ -120,9 +122,9 @@ Strict analysis requires a Remote to be a public, non-static instance method wit
120
122
 
121
123
  Remote calls use the Connection's `/api` route. The Client Remote calls `connection.rpc.call('/api', '<namespace>/<method>', { args }, signal)`; the HTTP carrier maps this to `POST /api/<namespace>/<method>`, with a payload containing only a named `args` object.
122
124
 
123
- The Connection performs the unified trust check for `/api` before the HTTP bridge, then dispatches inside the shared FetchHandler. The Typert Gateway claims only two-segment endpoints that have a strict descriptor or active SRC marker; feature-owned exact Fetch routes handle non-JSON responses, and other requests return 404. The Connection owns transport, RPC ids, response envelopes, and request cancellation, while the Gateway owns only the Remote data protocol and business dispatch. Replacing the Connection carrier does not require changes to Remote descriptors or the Client programming interface.
125
+ The Connection performs the unified trust check for `/api` before the HTTP bridge, then dispatches inside the shared FetchHandler. The Typert Gateway claims only two-segment endpoints that have a strict descriptor or active SRC marker; it projects binary Remote fields into JSON-compatible metadata and result-relative byte attachments, which Connection frames as multipart responses. Feature-owned exact Fetch routes handle responses outside the RPC envelope, and other requests return 404. Connection owns transport, RPC ids, response envelopes, and request cancellation, while Gateway owns the Remote data protocol and business dispatch. Replacing the Connection carrier does not require changes to Remote descriptors or the Client programming interface.
124
126
 
125
- For every call, the Gateway resolves the descriptor and live service from the current registries instead of caching business objects. It requires the fields in `args` to match the descriptor exactly, validates wire values with codecs, resolves objects or receivers through registered lookup or Context providers, invokes the service method targeted by the binding, and validates the return value. A missing provider, unknown identity, binding mismatch, missing or extra argument, schema failure, or missing method fails before entering or after leaving business code.
127
+ For every call, the Gateway resolves the descriptor and live service from the current registries instead of caching business objects. It requires the fields in `args` to match the descriptor exactly, validates wire values with codecs, resolves objects or receivers through registered lookup or Context providers, and invokes the service method targeted by the binding. The Client Gateway validates decoded binary results with the generated result codec; ordinary JSON results retain their existing handling. A missing provider, unknown identity, binding mismatch, missing or extra argument, schema failure, or missing method fails before entering or after leaving business code.
126
128
 
127
129
  The lookup provider's `register()` supplies both the stable declaration and the default resolver; `configure()` supplies a resolver owned by Host composition that may execute asynchronously and is scoped to an effect lifetime. Configuration may precede provider mounting; without a provider, invocation still fails with `gateway/lookup-unavailable`, and unloading the configuration restores the provider's default policy. The Session Controller owns the standard resolver semantics for `agent` and `session`: it reuses a live Agent, automatically resumes ordinary cold sessions, deduplicates concurrent resumes, and rejects identities owned by subagent routing; the `session` lookup returns that Agent's Session. A resume failure and an ownership fence raise a `RemoteError` carrying their own code, `session/not-found` or `session/agent-busy`, which the Gateway encodes onto the wire unchanged; only an unclassified throw folds into `gateway/internal`.
128
130
 
@@ -138,14 +140,13 @@ SRC solves only dispatch for a Host process running from source. The Client does
138
140
 
139
141
  ## Development mode
140
142
 
141
- Web development prepares current Host, Client, and Web artifacts with `pnpm run build`, then runs the source Host and the Client plugin watcher in separate terminals:
143
+ Web development runs one command, which builds current Host, Client, and Web artifacts, starts the source Host, and keeps Client bundles rebuilt:
142
144
 
143
145
  ```sh
144
- pnpm dsh web
145
146
  pnpm run dev:web
146
147
  ```
147
148
 
148
- `dsh` starts the Host source through tsx, so the Host can use the SRC fallback; `dev:web` watches only Client plugins with a `dsh.client` declaration and rewrites their `lib/client.js`. It does not analyze Host decorators or generate Remote Client DTS.
149
+ `dsh` starts the Host source through tsx, so the Host can use the SRC fallback; the `dev:web` watchers rebuild the client-face type emit, Client plugin and library bundles, and the Web shell on source edits. They do not analyze Host decorators or generate Remote Client DTS; only the complete build that `dev:web` runs first (or `pnpm run build`) does.
149
150
 
150
151
  Changing only a Remote method's implementation body without changing its contract does not require regenerating the Typert files. After adding or removing a decorator or changing an export name, namespace, parameter, return value, lookup, Context, or cancellation signature, rerun the ordered lib build so the Host generates the strict contract before the Client compiles and bundles the new contribution:
151
152
 
@@ -157,8 +158,8 @@ The running Client watcher consumes these generated files when it rebundles. If
157
158
 
158
159
  ## Boundaries
159
160
 
160
- Remote handles only unary method calls with one request and one result. Session event streams, pagination, incremental reduce, projection, and entity substreams require a separate data protocol and registration model; even when they reuse the Connection, they must not masquerade as Remote methods or enter invocation descriptors.
161
+ Remote handles unary method calls with one request and one result, and stream methods whose items flow Host → Client while the Client's items reach the running Host method through `this.ctx.invocation.uplink()`. Session event streams, pagination, incremental reduce, projection, and entity substreams still require a separate data protocol and registration model; even when they reuse the Connection, they must not masquerade as Remote methods or enter invocation descriptors.
161
162
 
162
- The API layers are organized as `remotes → gateway → connection → webserver`. The BFF and Typert RPC layers live under `packages/api`; Connection and WebServer live at `packages/client/connection` and `packages/host/webserver`. A feature that needs a streamed or browser-native response registers an exact Connection Fetch route instead of defining a Remote method.
163
+ The API layers are organized as `remotes → gateway → connection → webserver`. The BFF and Typert RPC layers live under `packages/api`; Connection and WebServer live at `packages/client/connection` and `packages/host/webserver`. Unary results containing `Uint8Array`, including nested fields and array entries, use [binary Remote transfer](../.agents/notes/implemented/architecture/2026-09-17-workspace-file-binary-transfer.md). A feature that needs a response outside the RPC envelope registers an exact Connection Fetch route.
163
164
 
164
165
  Lookup policy is configured per key, so all `agent` or `session` parameters share the cold-resume behavior. Accepting live objects only would require an explicit per-parameter or per-endpoint policy, which does not exist; the business method must not guess whether the object came from restoration.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](api-gateway.md) | 中文
4
4
 
5
- 本文是 Typert API Gateway 的当前状态参考。它描述业务服务如何声明一元 Remote 方法、构建如何生成 Host 与 Client 约定,以及调用如何复用 Connection 的 RPC 与 `/api` 路由。会话事件、增量数据和其他流协议不属于本文范围;它们可以使用同一个 Connection,但不使用 Remote 方法描述符。
5
+ 本文是 Typert API Gateway 的当前状态参考。它描述业务服务如何声明一元与流式 Remote 方法、构建如何生成 Host 与 Client 约定,以及调用如何复用 Connection 的 RPC 与 `/api` 路由。会话事件、增量数据和其他流协议不属于本文范围;它们可以使用同一个 Connection,但不使用 Remote 方法描述符。
6
6
 
7
7
  ## 编程模型
8
8
 
@@ -55,6 +55,8 @@ export class GoalService extends TypertRemoteService {
55
55
 
56
56
  Remote 方法可以同步返回或返回 Promise。若需要协作式取消,Host 签名的最后一个参数必须是全局类型的 `signal: AbortSignal`;它记录在描述符中而不是进入 `args`,Client 生成的方法则接受最后一个可选的 `AbortSignal`。
57
57
 
58
+ `@Remote({ mode: 'stream' })` 标记返回 `Iterable`、`AsyncIterable` 或 `RemoteStream<Out, In>` 的方法:Gateway 把每个产出的项(Host 方法产出的值)经其多路复用的 `/api/remote.mux` WebSocket 或进程内载体投递,Client 生成的方法返回一个 `RemoteStreamHandle<Out, In>`,它迭代这些项,并为同一条逻辑流上从 Client 到 Host 的上行提供 `send`、`end` 与 `dispose`。`RemoteStream<Out, In>` 的第二个类型参数声明上行项类型;Gateway 在 Host 方法通过 `this.ctx.invocation.uplink<In>()` 读取之前,用生成的 `In` codec 校验 Client 发送的每一项——它们来自浏览器。上行既不进入 `args` 也不进入参数列表;帧、半关闭、取消与 inbox 上限的约定由 [Gateway README](../packages/api/gateway/README.zh.md) 拥有。
59
+
58
60
  Client 使用普通对象上的具体函数,不使用 JavaScript Proxy。直接调用与作用域调用分别出现在 `ctx.remote.<namespace>` 和 `agentCtx.remote.<namespace>`。每个 namespace 都是注册为 `remote.<namespace>` 的可追踪 Cordis 子服务;Client assembly 通过 `ctx.remote.$mount()` 挂载贡献,最后一个方法撤回后该 namespace 随即卸载。依赖声明归实际调用方所有:只有读取 `ctx.remote.<namespace>` 或 `agentCtx.remote.<namespace>` 的业务包才在自己的 `inject` 中同时声明 `remote` 与 `remote.<namespace>`;只负责挂载 contribution 的 assembly,以及不调用该 namespace 的上层运行时,不代业务包声明 namespace 依赖。当一个 `@Remote` 方法恰好有一个 lookup 参数、且同名 `TypertContextMap` 使用相同 wire identity 时,生成的作用域签名会省略该 identity 参数。`@RemoteScope` 只生成作用域调用接口。
59
61
 
60
62
  ```ts ignore-check
@@ -96,7 +98,7 @@ API Gateway 包同时拥有 Host dispatcher 与 Client Remote endpoint 两个对
96
98
 
97
99
  根构建依次执行 `build:lib:host`、`build:lib:client` 与 `build:web`。Host lib 阶段先运行 `tsc -b tsconfig.host.json`,再运行 `tsdown --env.DSH_BUILD_FACE host`;Typert generator 由正常 Host Project Reference 图编译,并在这次 tsdown 中以 Host aggregate 为唯一 `ts.Program` 种子运行。Client lib 阶段随后运行 `tsc -b tsconfig.client.json` 与 `tsdown --env.DSH_BUILD_FACE client`,使用刚生成的 Remote Client 声明和运行时贡献,但不再次启动 Typert。
98
100
 
99
- 两次 tsdown 都接收完整 workspace,且都只打包 `lib/types` 中由对应 tsc 阶段发射的 JavaScript。根配置不扫描 Client 产物、不按包名分类,也不向 tsdown 传维护式 filter;各包的本地配置根据 `DSH_BUILD_FACE` 返回当前阶段的入口。普通 Client 插件在 Client 阶段一起生成 Node loader 入口与 browser bundle。
101
+ 两次 tsdown 都匹配 `vendor/*`、`packages/*/*` 与 `apps/cli`,Host 阶段另外匹配 `apps/desktop-host`([构建顺序](development.zh.md#typescript-project-layout)),且都只打包 `lib/types` 中由对应 tsc 阶段发射的 JavaScript。根配置不扫描 Client 产物、不按包名分类,也不向 tsdown 传维护式 filter;各包的本地配置根据 `DSH_BUILD_FACE` 返回当前阶段的入口。普通 Client 插件在 Client 阶段一起生成 Node loader 入口与 browser bundle。
100
102
 
101
103
  `api/remotes`、`api/gateway`、`api/session-controller` 与 `api/workspace-controller`(外加 `client/connection`)都拆分 TypeScript face。`api/remotes` 的 Client project 依赖业务包在 Host tsdown 中生成的 `/remote` 声明;根 aggregate 与直接消费方必须分别引用各拆分包自己的 `tsconfig.host.json` 或 `tsconfig.client.json`。`api-remotes` 的 `clientBundle(..., { hostPhase: true })` 让 Host 入口在 Host tsdown 中生成,让 Client tsdown 只生成 browser 入口。Agent/Session lookup 策略位于 `@deepseek-ai/dsh-api-session-controller`,而非 `api-remotes`。
102
104
 
@@ -120,9 +122,9 @@ Remote Client 声明中的参数名来自 wire 字段,参数和返回类型则
120
122
 
121
123
  Remote 调用使用 Connection 的 `/api` 路由。Client Remote 调用 `connection.rpc.call('/api', '<namespace>/<method>', { args }, signal)`;HTTP carrier 对应 `POST /api/<namespace>/<method>`,payload 只包含一个具名 `args` 对象。
122
124
 
123
- Connection 在 HTTP bridge 之前执行 `/api` 的统一信任检查,再在共享 FetchHandler 内分发。Typert Gateway 只认领存在严格描述符或活跃 SRC marker 的两段式 endpoint;功能自有的精确 Fetch 路由处理非 JSON 响应,其他请求返回 404。Connection 拥有传输、RPC id、响应 envelope 和请求取消,Gateway 只拥有 Remote 数据协议和业务分发。替换 Connection carrier 不要求改变 Remote 描述符或 Client 编程接口。
125
+ Connection 在 HTTP bridge 之前执行 `/api` 的统一信任检查,再在共享 FetchHandler 内分发。Typert Gateway 只认领存在严格描述符或活跃 SRC marker 的两段式 endpoint;它把二进制 Remote 字段投影为 JSON 兼容元数据及相对于结果的字节附件,再由 Connection 封装为 multipart 响应。功能自有的精确 Fetch 路由处理 RPC 信封之外的响应,其他请求返回 404。Connection 拥有传输、RPC id、响应 envelope 和请求取消,Gateway 拥有 Remote 数据协议和业务分发。替换 Connection carrier 不要求改变 Remote 描述符或 Client 编程接口。
124
126
 
125
- Gateway 每次调用都从当前注册表解析描述符和实时服务,不缓存业务对象。它要求 `args` 的字段集合与描述符完全一致,先用 codec 校验 wire 值,再通过注册的 lookup 或 Context 提供方解析对象或接收者,最后调用 binding 指向的服务方法并校验返回值。缺少提供方、identity 未命中、binding 不一致、参数缺失或多余、schema 失败和方法不存在都会在进入业务代码前或离开业务代码后失败。
127
+ Gateway 每次调用都从当前注册表解析描述符和实时服务,不缓存业务对象。它要求 `args` 的字段集合与描述符完全一致,先用 codec 校验 wire 值,再通过注册的 lookup 或 Context 提供方解析对象或接收者,最后调用 binding 指向的服务方法。Client Gateway 使用生成的结果 codec 校验解码后的二进制结果;普通 JSON 结果保持原有处理方式。缺少提供方、identity 未命中、binding 不一致、参数缺失或多余、schema 失败和方法不存在都会在进入业务代码前或离开业务代码后失败。
126
128
 
127
129
  lookup 提供方的 `register()` 同时提供稳定声明和默认 resolver;`configure()` 提供由 Host 组合拥有、可异步执行且受 effect 生命周期约束的 resolver。配置可以先于提供方挂载;没有提供方时调用仍以 `gateway/lookup-unavailable` 失败,配置卸载后则恢复提供方默认策略。Session Controller 负责 `agent` 与 `session` 的标准 resolver 语义:复用 live Agent,自动恢复普通冷会话,对并发恢复去重,并拒绝由 subagent routing 拥有的 identity;`session` lookup 返回该 Agent 的 Session。恢复失败与 ownership fence 抛出携带自有码的 `RemoteError`(`session/not-found` 或 `session/agent-busy`),Gateway 原样编码上 wire;只有未归类的 throw 才折成 `gateway/internal`。
128
130
 
@@ -138,14 +140,13 @@ SRC 只解决 Host 源码进程的分发问题。Client 不会从运行中的 Ho
138
140
 
139
141
  ## 开发模式
140
142
 
141
- Web 开发先使用 `pnpm run build` 准备当前 Host、Client 与 Web 产物,然后在两个终端中分别运行源码 Host 和 Client plugin watcher:
143
+ Web 开发只需一条命令:它先构建当前 Host、Client 与 Web 产物,再启动源码 Host,并持续重建 Client bundle:
142
144
 
143
145
  ```sh
144
- pnpm dsh web
145
146
  pnpm run dev:web
146
147
  ```
147
148
 
148
- `dsh` 通过 tsx 启动 Host 源码,所以 Host 可以使用 SRC 回退;`dev:web` 只监听带 `dsh.client` 声明的 Client 插件并重写其 `lib/client.js`,它不会分析 Host decorator,也不会生成 Remote Client DTS。
149
+ `dsh` 通过 tsx 启动 Host 源码,所以 Host 可以使用 SRC 回退;`dev:web` 的 watcher 会在源码修改时重建 client 侧类型输出、Client 插件与库 bundle 以及 Web 壳层。它们不会分析 Host decorator,也不会生成 Remote Client DTS;只有 `dev:web` 首先执行的完整构建(或 `pnpm run build`)才会。
149
150
 
150
151
  只修改 Remote 方法实现体而不改变约定时,无需重新生成 Typert 文件。新增或删除 decorator、修改导出名、namespace、参数、返回值、lookup、Context 或取消签名时,重新执行有序 lib 构建,让 Host 先生成严格约定,再让 Client 编译并打包新的贡献:
151
152
 
@@ -157,8 +158,8 @@ pnpm run build:lib
157
158
 
158
159
  ## 边界
159
160
 
160
- Remote 只处理有单个请求与单个结果的一元方法调用。会话事件流、分页、增量 reduce、projection 和实体子流需要独立的数据协议与注册模型;即使它们复用 Connection,也不应伪装成 Remote 方法或放入调用描述符。
161
+ Remote 处理单请求单结果的一元方法调用,以及项沿 Host → Client 方向流动、而 Client 的项经 `this.ctx.invocation.uplink()` 到达正在运行的 Host 方法的流方法。会话事件流、分页、增量 reduce、projection 和实体子流仍需要独立的数据协议与注册模型;即使它们复用 Connection,也不应伪装成 Remote 方法或放入调用描述符。
161
162
 
162
- API 各层按 `remotes → gateway → connection → webserver` 组织。BFF 与 Typert RPC 层位于 `packages/api`;Connection 与 WebServer 位于 `packages/client/connection` 和 `packages/host/webserver`。需要流式或浏览器原生响应的功能注册精确的 Connection Fetch 路由,而不定义 Remote 方法。
163
+ API 各层按 `remotes → gateway → connection → webserver` 组织。BFF 与 Typert RPC 层位于 `packages/api`;Connection 与 WebServer 位于 `packages/client/connection` 和 `packages/host/webserver`。包含 `Uint8Array` 的一元结果(包括嵌套字段和数组条目)使用[二进制 Remote 传输](../.agents/notes/implemented/architecture/2026-09-17-workspace-file-binary-transfer.zh.md)。需要 RPC 信封之外响应的功能注册精确的 Connection Fetch 路由。
163
164
 
164
165
  lookup 策略按 key 配置,因此所有 `agent` 或 `session` 参数共享冷恢复行为。只接受 live 对象需要显式的逐参数或逐 endpoint 策略,而这种策略并不存在;不能通过业务方法内部猜测对象是否来自恢复。
@@ -1,6 +1,37 @@
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:
1
+ # Bilingual-pair consistency record for architecture.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/architecture.md
5
- architecture.md: 0bbf5ef7f4c0444635178ba0ba85fbb9527d76ec
6
- architecture.zh.md: 0d28dc349fd9c655529bcc43deabc47055e0d394
5
+ /deepseek-harness-architecture:
6
+ en: 2125f3ec236bc7b2
7
+ zh: 23d8815579592ec4
8
+ /deepseek-harness-architecture/cordis:
9
+ en: da5060e577578ea7
10
+ zh: 2e77d570e32d8938
11
+ /deepseek-harness-architecture/profiles-and-bundles:
12
+ en: 8ef4912295aa32f3
13
+ zh: cf8848a83743f3cc
14
+ /deepseek-harness-architecture/application-launch:
15
+ en: 334b4f390b6e376b
16
+ zh: ce094f24c6162be3
17
+ /deepseek-harness-architecture/desktop-application:
18
+ en: b9eeb18645121a8b
19
+ zh: 70d87a12c43e042a
20
+ /deepseek-harness-architecture/core-packages:
21
+ en: b4a221ac2910600a
22
+ zh: 341046d3c9a9c9cd
23
+ /deepseek-harness-architecture/events:
24
+ en: 214c3c81c21df6f9
25
+ zh: 75d2cdc3c9fc9930
26
+ /deepseek-harness-architecture/turn-flow:
27
+ en: badc0ffea030cdce
28
+ zh: 3241f0b37c3ec067
29
+ /deepseek-harness-architecture/session-log:
30
+ en: 82e67cf5b66b8add
31
+ zh: 5d0ea37270bdd0d5
32
+ /deepseek-harness-architecture/capability-seams:
33
+ en: 93d1dc2eeda4aec2
34
+ zh: ee7a9da89151ea17
35
+ /deepseek-harness-architecture/where-new-behavior-goes:
36
+ en: 9b2eb0539a9cd0d6
37
+ zh: 4f575277b91d4e5c
@@ -44,15 +44,15 @@ Composition mechanics are in [app-boot](../packages/boot/app-boot/README.md#prof
44
44
 
45
45
  Supported Node applications launch through named `dsh` profiles. The shipped profiles are `web`, `headless`, `sdk`, `sdk-minimal`, and `acp`, selected with `dsh --profile <name>` or `dsh <name>`. `plugin` names the management command; a profile with that name requires `--profile plugin`. The TypeScript SDK resolves its same-version `dsh` dependency and selects `sdk`; custom plugin composition remains a profile plus ordered patch files, not another executable or inline application tree. `sdk-minimal` is a repository-owned standalone bundle behind the same launcher, not a caller-supplied Cordis tree.
46
46
 
47
- Vendored CLIs, build-only and test-only executables, direct in-process plugin mounting, and the private browser WebWorker preview are not Harness application launchers. [`verify-application-entrypoints`](../scripts/verify-application-entrypoints.ts) keeps every package bin, executable source, and root demo in an explicit class and rejects a Node application path that bypasses `dsh`.
47
+ Vendored CLIs, build-only and test-only executables, direct in-process plugin mounting, and the private browser WebWorker preview are not Harness application launchers. [`verify-application-entrypoints`](../scripts/verify-application-entrypoints.ts) keeps every package bin, executable source, root demo, and the root `start:web` and `dev:web` scripts in an explicit class and rejects a Node application path that bypasses `dsh`.
48
48
 
49
49
  The Python SDK follows the same application architecture. Its runtime wheel packages the normal `dsh` CLI as `deepseek-harness-sdk-runtime-<platform>-<arch>`, and the client launches `dsh --profile sdk` with an explicit Harness home by default. The minimal example selects the shipped `sdk-minimal` profile. Python exposes profile selection and ordered patch files rather than a complete Cordis tree; persistent external plugins are installed through `dsh plugin`. The removed private direct-config carrier has no compatibility bin or fallback parser.
50
50
 
51
51
  ## Desktop application
52
52
 
53
- The [Electron desktop application](../apps/desktop/README.md) carries its exact dsh production runtime in signed resources and owns the reserved `$DSH_HOME/profiles/desktop`. Shared profile helpers initialize its files, reconcile installed bundles, and resolve installation and bundle dependencies without replacing pnpm-owned packages. CLI and Desktop share product data, while executable packages, activation choices, and lockfiles remain separate. The public CLI cannot manage Desktop’s profile.
53
+ The [Electron desktop application](../apps/desktop/README.md) ships its exact dsh production runtime in signed resources and owns the reserved `$DSH_HOME/profiles/desktop`. Shared helpers initialize profile files, reconcile bundles, and resolve installation and bundle dependencies without replacing pnpm-owned packages. Desktop and npm CLI share product data but keep packages, activation, and lockfiles separate. Desktop’s bundled CLI manages its initialized plugins.
54
54
 
55
- Electron starts the private Desktop Host in Electron Node mode. The Host invokes the shared CLI profile runner and complete Web application. The window immediately loads packaged Web assets and waits for boot injections before activating client plugins in the same document. Web owns RPC and streams; the desktop carrier connects the local page to the authenticated Host. Node IPC carries boot injections, readiness, fatal errors, and shutdown. Desktop defaults to port `19387`; profile configuration can override it. Shell-owned UI runs plugin transactions through bundled pnpm with normal user and profile configuration.
55
+ Electron starts the private Desktop Host in Electron Node mode. The Host invokes the shared CLI profile runner and complete Web application. The window immediately loads packaged Web assets and waits for boot injections before activating client plugins in the same document. Web owns RPC and streams; the desktop carrier connects the local page to the authenticated Host. Node IPC carries boot injections, readiness, fatal errors, and shutdown. Desktop listens on an OS-assigned port by default; profile configuration can override it. Shell-owned UI runs plugin transactions through bundled pnpm with normal user and profile configuration.
56
56
 
57
57
  ## Core packages
58
58
 
@@ -110,9 +110,11 @@ turn/end
110
110
 
111
111
  One inbox feeds the driver; injected context waits for a waking message. AgentLoop’s durable `inbox` projection exposes pending input without live Agents.
112
112
 
113
- `agent/pre-step` decides the accepted input. Listeners may rewrite or reject claimed messages; a rejected or empty first claim closes a durable turn without a step. An enter decision may set `startsRequestSeries`: the loop logs a fresh `request/header` (reason `series`, or `change` with `startsSeries: true` when the envelope also changed). Wrapping listeners preserve that declaration with `{ ...decision, messages }`. After assembly and `step/start`, `agent/request` and `prepareCall()` resolve the actual route before the system prompt and accepted users are committed; cancellation during either async phase commits neither. The prepared call capability governs prompt admission, not the preceding `request/context`. Every attempt synchronously reconciles the same rendered assembly, appends users only on the first attempt, logs header/context as needed, and derives and freezes the request before streaming the bound call. Retries do not repeat assembly or `agent/pre-step`. Surface replacements and image-offload decisions after attachment start a new request series, including during the first resumed pre-step; unchanged resume continues the series. The first admitted step reserves the system head before user messages even for an empty prompt (no wire message). The prompt travels only as `system/message` history: an empty rendering clears all active system nodes, leaving no old prompt model-visible; capable routes can append non-empty updates after the cached prefix; incapable routes and new request series consolidate non-empty prompt text at the first system node, with logged empty replacements for non-empty later system nodes ([decision](../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md); [decision rule](../packages/core/agent-loop/README.md#understand-the-implementation)).
113
+ `agent/pre-step` decides the accepted input. Listeners may rewrite or reject claimed messages; a rejected or empty first claim closes a durable turn without a step. An enter decision may set `startsRequestSeries`: the loop logs a fresh `request/header` (reason `series`, or `change` with `startsSeries: true` when the envelope also changed). Wrapping listeners preserve that declaration with `{ ...decision, messages }`. After assembly and `step/start`, `agent/request` and `prepareCall()` resolve the actual route before the system prompt and accepted users are committed; cancellation during either async phase commits neither. Prepared call capabilities govern prompt admission, not preceding `request/context`. Every attempt synchronously reconciles the same rendered assembly, appends users only on the first attempt, logs header/context as needed, and derives and freezes the request before streaming the bound call. Retries do not repeat assembly or `agent/pre-step`. Surface replacements and image-offload decisions after attachment start a new request series, including during the first resumed pre-step; unchanged resume continues the series. The first admitted step reserves the system head before user messages even for an empty prompt (no wire message). The prompt travels only as `system/message` history: an empty rendering clears all active system nodes, leaving no old prompt model-visible; capable routes append non-empty updates after cached history, including supported tool updates; incapable routes and new request series consolidate non-empty prompt text at the first system node, with logged empty replacements for non-empty later system nodes ([decision](../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md); [decision rule](../packages/core/agent-loop/README.md#understand-the-implementation)).
114
114
 
115
- The loop sends immutable requests while keeping cancellation live. It reuses message-freeze evidence only for identities it has fully frozen; [agent-loop](../packages/core/agent-loop/README.md) owns the request construction rules.
115
+ The loop sends immutable requests with live cancellation and reuses freeze evidence for frozen identities; [agent-loop](../packages/core/agent-loop/README.md) owns construction and cancellation causes.
116
+
117
+ Failed steps [record missing tool results](../packages/core/agent-loop/README.md#understand-the-implementation).
116
118
 
117
119
  Details: the [sequence diagram](agent-lifecycle.md), the [tool pipeline](tool-execution-pipeline.md), and [cancellation and error recovery](subsystems/core.md#the-agent-handle).
118
120
 
@@ -122,7 +124,7 @@ The session log is the source of the context the model sees. `deriveMessages()`
122
124
 
123
125
  Session consumers know only the current logical format. Header-only `stat` and `list` rescan each Session directory, select its numerically highest canonical generation, and translate a supported historical header without loading events or publishing a successor. A stored-session `open` selects that same generation, refuses a future version, or decodes and composes the static adjacent migration chain once before returning validated current logical events. A read open uses that in-memory result without publishing a successor; a write open first encodes, verifies, and exclusively publishes the final version-named successor beside the unchanged source. Ordinary repair of an unsealed interrupted tail remains a handle consumer responsibility; migration inserts a missing interrupted `turn/end` only for the bounded released restart already sealed by a later `turn/start`. JSONL v0 uses `session.jsonl[.zstd]`, v1 and later use lowercase `session.vN.jsonl[.zstd]`, and committed generation paths are never renamed, replaced, or deleted. The JSONL provider owns physical framing, compression, generation selection, and exclusive publication, while each adjacent migration package owns exactly one `vN -> vN+1` step ([decision](../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.md)).
124
126
 
125
- **Model-visible means logged.** Anything that reaches a model request must be reconstructable from the log, and a runtime invariant asserts it. A new model-visible input requires a session event. Plugins that change existing message content register [pure message projections](subsystems/session.md#plugin-owned-message-projections); detached readers supply the same definitions explicitly.
127
+ **Model-visible means logged.** Every model request must be reconstructable from the log. New model-visible inputs require session events. Plugins changing existing message content register [pure message projections](subsystems/session.md#plugin-owned-message-projections); detached readers supply the same definitions explicitly. Tool changes are capability-independent; [Session tool history](../packages/core/session/README.md) supplies provider declarations.
126
128
 
127
129
  **Projection seam.** `dsh-session-projection` owns `ctx.sessionProjections`: registered units fold committed events incrementally, host consumers read one typed state with `stateOf()`, and carriers batch cropped client views with `snapshot()`. A host reader either requires this service during activation or fails explicitly when the registry or required key is absent. Contributors may retain `ctx.inject(['sessionProjections'], ...)` registration without silently defaulting a missing host value. The agent loop registers shared `turnBoundary` state for its readers ([decision](../.agents/notes/implemented/architecture/2026-08-19-session-projection-mandatory-seam.md)).
128
130
 
@@ -146,7 +148,7 @@ New behavior attaches to a documented extension point. Changing the loop itself
146
148
  | Add shell execution | register a `ctx.shell` backend; the local one spawns through `ctx.subprocess` |
147
149
  | Add persistent terminal execution | register a `ctx.terminals` backend plus `dsh-tool-terminal` |
148
150
  | Add a human command | register on `ctx.commands`; it dispatches without a model turn |
149
- | Add background work | register on `ctx.jobs`; `job_*` tools collect or stop it |
151
+ | Manage background jobs | register on `ctx.jobs`; `job_*` tools read or stop jobs |
150
152
  | Start a Session from an external webhook | register a trusted rule on `ctx.webhookRuntime` and mount a provider adapter |
151
153
  | Add filesystem access or policy | register a `ctx.fs` provider or listen to `fs/*` events |
152
154
  | Confine spawned processes | use a `ctx.sandbox` backend; consumers wrap argv before spawning |
@@ -161,4 +163,4 @@ New behavior attaches to a documented extension point. Changing the loop itself
161
163
  | Store sessions in a new backend | implement `SessionPersistence` (`create`/`open`/`stat`/`list`/`export`) over the shared handle scaffolding |
162
164
  | Scope a registration to one agent | use that agent's `agent.ctx` |
163
165
 
164
- The [extension cookbook](cookbook/extension-cookbook.md) maps features to capabilities and indexes the step-by-step guides for [packages](cookbook/adding-a-package.md), [tools](cookbook/adding-a-tool.md), [LLM adapters](cookbook/adding-an-llm-adapter.md), and [settings cards](cookbook/adding-a-settings-card.md). The [Conversation subsystem](subsystems/conversation.md) owns Chat-node assembly.
166
+ The [extension cookbook](cookbook/extension-cookbook.md) maps features to capabilities and indexes the step-by-step guides for [packages](cookbook/adding-a-package.md), [tools](cookbook/adding-a-tool.md), [LLM adapters](cookbook/adding-an-llm-adapter.md), and [settings pages](cookbook/adding-a-settings-card.md). The [Conversation subsystem](subsystems/conversation.md) owns Chat-node assembly.
@@ -44,15 +44,15 @@ dsh --profile web --dump-config
44
44
 
45
45
  受支持的 Node 应用通过具名 `dsh` profile 启动。随附 profile 为 `web`、`headless`、`sdk`、`sdk-minimal` 和 `acp`,可通过 `dsh --profile <name>` 或 `dsh <name>` 选择。`plugin` 表示管理命令;同名 profile 必须用 `--profile plugin` 选择。TypeScript SDK 会解析其同版本 `dsh` 依赖并选择 `sdk`;自定义插件组合继续由 profile 与有序 patch 文件表达,而不是另一个可执行文件或内联应用树。`sdk-minimal` 是位于同一 launcher 后的仓库自有独立组合包,而不是由调用方提供的 Cordis 配置树。
46
46
 
47
- Vendored CLI、仅用于构建和测试的可执行文件、进程内直接挂载插件以及私有浏览器 WebWorker 预览都不属于 Harness 应用启动器。[`verify-application-entrypoints`](../scripts/verify-application-entrypoints.ts)将每个包 bin、可执行源码与根 demo 归入显式类别,并拒绝任何绕过 `dsh` 的 Node 应用路径。
47
+ Vendored CLI、仅用于构建和测试的可执行文件、进程内直接挂载插件以及私有浏览器 WebWorker 预览都不属于 Harness 应用启动器。[`verify-application-entrypoints`](../scripts/verify-application-entrypoints.ts)将每个包 bin、可执行源码、根 demo 以及根脚本 `start:web` 与 `dev:web` 归入显式类别,并拒绝任何绕过 `dsh` 的 Node 应用路径。
48
48
 
49
49
  Python SDK 遵循相同的应用架构。其运行时 wheel 把普通 `dsh` CLI 打包为 `deepseek-harness-sdk-runtime-<platform>-<arch>`,客户端默认以显式 Harness home 启动 `dsh --profile sdk`。极简示例选择随附的 `sdk-minimal` profile。Python 暴露 profile 选择与有序 patch 文件,而不是完整 Cordis 树;持久外部插件通过 `dsh plugin` 安装。已删除的私有直读配置载体没有兼容 bin 或回退 parser。
50
50
 
51
51
  ## 桌面应用
52
52
 
53
- [Electron 桌面应用](../apps/desktop/README.zh.md)在签名资源中携带精确匹配的 dsh 生产运行时,并拥有保留的 `$DSH_HOME/profiles/desktop`。共享 profile helper 初始化其文件、协调已安装 bundle,并解析安装与 bundle 的依赖而不替换 pnpm 拥有的包。CLI 与 Desktop 共享产品数据,可执行包、启用选择与锁文件保持独立。公开 CLI 不能管理 Desktop profile。
53
+ [Electron 桌面应用](../apps/desktop/README.zh.md)在签名资源中携带精确匹配的 dsh 生产运行时,并拥有保留的 `$DSH_HOME/profiles/desktop`。共享 helper 初始化 profile 文件、协调 bundle,并解析安装与 bundle 的依赖而不替换 pnpm 拥有的包。Desktop 与 npm CLI 共享产品数据,但包、启用选择与锁文件保持独立。Desktop 内置 CLI 管理其已初始化的插件。
54
54
 
55
- Electron 使用 Electron Node 模式启动私有 Desktop Host。Host 调用共享 CLI profile runner 与完整 Web 应用。窗口立即加载打包 Web 资源,等待启动注入后在同一文档中激活客户端插件。Web 负责 RPC 与流;桌面载体将本地页面连接到已认证的 Host。Node IPC 承载启动注入、就绪、致命错误与关闭。Desktop 默认端口为 `19387`,profile 配置可覆盖。壳拥有的 UI 通过内置 pnpm 执行插件事务,并遵循正常用户与 profile 配置。
55
+ Electron 使用 Electron Node 模式启动私有 Desktop Host。Host 调用共享 CLI profile runner 与完整 Web 应用。窗口立即加载打包 Web 资源,等待启动注入后在同一文档中激活客户端插件。Web 负责 RPC 与流;桌面载体将本地页面连接到已认证的 Host。Node IPC 承载启动注入、就绪、致命错误与关闭。Desktop 默认监听系统分配的端口,profile 配置可覆盖。壳拥有的 UI 通过内置 pnpm 执行插件事务,并遵循正常用户与 profile 配置。
56
56
 
57
57
  ## 核心包
58
58
 
@@ -114,9 +114,11 @@ turn/end
114
114
 
115
115
  输入通过同一个 inbox 到达驱动器;注入的上下文等待一条唤醒消息。AgentLoop 的持久 `inbox` 投影使待处理输入在没有活跃 Agent 时仍可读取。
116
116
 
117
- `agent/pre-step` 决定接纳的输入。监听器可以改写或拒绝已领取消息;首次领取被拒绝或为空时,关闭不含步骤的持久轮次。enter 决策可设置 `startsRequestSeries`:循环记录新的 `request/header`(原因为 `series`,或在封装同时变化时为携带 `startsSeries: true` 的 `change`)。包装监听器通过 `{ ...decision, messages }` 保留该声明。组装与 `step/start` 之后,`agent/request` 和 `prepareCall()` 先解析实际路由,再提交系统提示词与已接纳用户消息;在任一异步阶段取消都不会提交这两者。提示词准入依据已准备调用的能力,而非先前的 `request/context`。每次尝试同步协调同一份已渲染组装结果、仅在首次尝试追加用户消息、按需记录 header/context、派生并冻结请求,再通过绑定调用发起流式请求。重试不重复组装或 `agent/pre-step`。附接后的 surface 替换和图片省略决定开启新请求序列,包括恢复后的首次 pre-step 中发生的替换;未变化的恢复延续序列。首次接纳的步骤在用户消息之前预留系统头节点,即使提示词为空(不产生协议消息)。提示词仅通过 `system/message` 历史传递:空渲染文本清除所有生效的系统节点,模型不再看到旧提示词;具备能力的路由可在缓存前缀之后追加非空更新;不具备能力的路由与新请求序列将非空提示词文本归并到首个系统节点,并为非空的后续系统节点记录空内容替换([决策](../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.zh.md);[决策规则](../packages/core/agent-loop/README.zh.md#understand-the-implementation))。
117
+ `agent/pre-step` 决定接纳的输入。监听器可以改写或拒绝已领取消息;首次领取被拒绝或为空时,关闭不含步骤的持久轮次。enter 决策可设置 `startsRequestSeries`:循环记录新的 `request/header`(原因为 `series`,或在封装同时变化时为携带 `startsSeries: true` 的 `change`)。包装监听器通过 `{ ...decision, messages }` 保留该声明。组装与 `step/start` 之后,`agent/request` 和 `prepareCall()` 先解析实际路由,再提交系统提示词与已接纳用户消息;在任一异步阶段取消都不会提交这两者。提示词准入依据已准备调用的能力,而非先前的 `request/context`。每次尝试同步协调同一份已渲染组装结果、仅在首次尝试追加用户消息、按需记录 header/context、派生并冻结请求,再通过绑定调用发起流式请求。重试不重复组装或 `agent/pre-step`。附接后的 surface 替换和图片省略决定开启新请求序列,包括恢复后的首次 pre-step 中发生的替换;未变化的恢复延续序列。首次接纳的步骤在用户消息之前预留系统头节点,即使提示词为空(不产生协议消息)。提示词仅通过 `system/message` 历史传递:空渲染文本清除所有生效的系统节点,模型不再看到旧提示词;具备能力的路由可在缓存前缀之后追加非空更新,包括同时发生的受支持工具更新;不具备能力的路由与新请求序列将非空提示词文本归并到首个系统节点,并为非空的后续系统节点记录空内容替换([决策](../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.zh.md);[决策规则](../packages/core/agent-loop/README.zh.md#understand-the-implementation))。
118
118
 
119
- 循环发送不可变请求,同时保留实时取消能力。只有已由该循环完整冻结的消息对象身份才能复用冻结证明;[agent-loop](../packages/core/agent-loop/README.zh.md)拥有请求构造规则。
119
+ 循环发送不可变请求,同时保持取消有效,仅对完全冻结的对象复用冻结证据;[agent-loop](../packages/core/agent-loop/README.zh.md) 负责请求构建与取消原因。
120
+
121
+ 失败步骤会[记录缺失的工具结果](../packages/core/agent-loop/README.zh.md#understand-the-implementation)。
120
122
 
121
123
  详情见[时序图](agent-lifecycle.zh.md)、[工具流水线](tool-execution-pipeline.zh.md)和[取消与错误恢复](subsystems/core.zh.md#the-agent-handle)。
122
124
 
@@ -126,7 +128,7 @@ turn/end
126
128
 
127
129
  Session 消费方只了解当前逻辑格式。仅 header 的 `stat` 与 `list` 会重新扫描每个 Session 目录,选择数值最高的规范 generation,并在不加载事件或发布后继的情况下转换受支持的历史 header。已存储 Session 的 `open` 选择同一 generation,拒绝未来版本,或只 Decode 并组合一次构建时静态确定的相邻迁移链,再返回经过校验的当前逻辑事件。只读 open 直接使用这份内存结果,不发布后继;写 open 则先编码、校验并在未改变源的旁边排他发布最终版本命名的后继。未被后续事件封住的普通中断尾部仍由句柄消费方修复;只有在后续 `turn/start` 已经封住一种有限的已发布 restart 时,migration 才会插入缺失的 interrupted `turn/end`。JSONL v0 使用 `session.jsonl[.zstd]`,v1 及后续版本使用小写 `session.vN.jsonl[.zstd]`;已提交 generation 路径绝不重命名、替换或删除。JSONL provider 负责物理 framing、压缩、generation 选择与排他发布,每个相邻迁移包只负责一个 `vN -> vN+1` 步骤([决策](../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.zh.md))。
128
130
 
129
- **模型可见即已记录。** 抵达模型请求的一切都必须能从日志重建,并由一项运行时不变量断言这一点。新增模型可见输入需要一个会话事件。修改现有消息内容的插件注册[纯消息投影](subsystems/session.zh.md#plugin-owned-message-projections),独立读取器显式传入相同的处理器。
131
+ **模型可见即已记录。** 每个模型请求都必须能从日志重建。新增模型可见输入需要会话事件。修改现有消息内容的插件注册[纯消息投影](subsystems/session.zh.md#plugin-owned-message-projections),独立读取器显式传入相同的处理器。 工具变更不依赖能力;[Session 工具历史](../packages/core/session/README.zh.md)提供提供方声明。
130
132
 
131
133
  **投影 seam。** `dsh-session-projection` 提供 `ctx.sessionProjections`:已注册单元增量折叠已提交事件,host 消费方通过 `stateOf()` 读取单个类型化状态,载体通过 `snapshot()` 批量取得裁剪后的客户端视图。host 读取方要么在激活时要求该服务,要么在注册表或必需 key 缺席时明确失败。贡献方可以保留 `ctx.inject(['sessionProjections'], ...)` 注册,但不能为缺失的 host 值静默提供默认值。agent loop 为读取方注册共享的 `turnBoundary` 状态([决策](../.agents/notes/implemented/architecture/2026-08-19-session-projection-mandatory-seam.zh.md))。
132
134
 
@@ -150,7 +152,7 @@ seam 正是替换一个提供方就能改变整个产品的原因。文件系统
150
152
  | 添加 shell 执行 | 注册 `ctx.shell` 后端;本地后端通过 `ctx.subprocess` spawn 进程 |
151
153
  | 添加持久化终端执行 | 注册 `ctx.terminals` 后端和 `dsh-tool-terminal` |
152
154
  | 添加用户命令 | 在 `ctx.commands` 上注册;它无需模型轮次即可分派 |
153
- | 添加后台工作 | 在 `ctx.jobs` 上注册;`job_*` 工具负责收集或停止 |
155
+ | 管理后台任务 | 在 `ctx.jobs` 上注册;`job_*` 工具读取或停止任务 |
154
156
  | 从外部 webhook 启动 Session | 在 `ctx.webhookRuntime` 上注册可信规则,并挂载提供方适配器 |
155
157
  | 添加文件系统访问或策略 | 注册 `ctx.fs` 提供方,或监听 `fs/*` 事件 |
156
158
  | 限制所启动的进程 | 使用 `ctx.sandbox` 后端;消费方在启动进程前包装 argv |
@@ -165,4 +167,4 @@ seam 正是替换一个提供方就能改变整个产品的原因。文件系统
165
167
  | 在新后端存储会话 | 基于共享的句柄脚手架实现 `SessionPersistence`(`create`/`open`/`stat`/`list`/`export`) |
166
168
  | 将注册项限定到单个 agent | 使用该 agent 的 `agent.ctx` |
167
169
 
168
- [扩展实操手册](cookbook/extension-cookbook.zh.md)将功能映射到能力,并索引[包](cookbook/adding-a-package.zh.md)、[工具](cookbook/adding-a-tool.zh.md)、[LLM(大语言模型)适配器](cookbook/adding-an-llm-adapter.zh.md)和[设置卡片](cookbook/adding-a-settings-card.zh.md)的分步指南。[Conversation 子系统](subsystems/conversation.zh.md)负责 Chat node 组装。
170
+ [扩展实操手册](cookbook/extension-cookbook.zh.md)将功能映射到能力,并索引[包](cookbook/adding-a-package.zh.md)、[工具](cookbook/adding-a-tool.zh.md)、[LLM(大语言模型)适配器](cookbook/adding-an-llm-adapter.zh.md)和[设置页](cookbook/adding-a-settings-card.zh.md)的分步指南。[Conversation 子系统](subsystems/conversation.zh.md)负责 Chat node 组装。
@@ -1,6 +1,10 @@
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:
1
+ # Bilingual-pair consistency record for capability-seams.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/capability-seams.md
5
- capability-seams.md: edb8cd688768ec49ee3699c3775409a66975129d
6
- capability-seams.zh.md: b06d9378616669407b79ffa1da205924ff6ad757
5
+ /:
6
+ en: 41d772192075e133
7
+ zh: 5ef3da69b4de1d8a
8
+ /capability-seams-and-core-services:
9
+ en: 06fac1d7fa402fba
10
+ zh: cc9b56495dc42e69