dsh-plugin-guide 0.3.15 → 0.3.17

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 (446) hide show
  1. package/README-es.md +43 -40
  2. package/README-hi.md +43 -40
  3. package/README-pt.md +43 -40
  4. package/README-zh.md +43 -40
  5. package/README.md +19 -15
  6. package/dist/dsh-plugin-dev.js +230 -6
  7. package/guide/plugin-dev-guide.md +1 -1
  8. package/guide/release-engineering.md +7 -5
  9. package/guide/release-engineering.zh-CN.md +7 -5
  10. package/guide/unfixed-issues.md +4 -2
  11. package/package.json +5 -4
  12. package/references/official-docs/AGENTS.md +74 -49
  13. package/references/official-docs/README.i18n.yaml +2 -2
  14. package/references/official-docs/README.zh.md +12 -0
  15. package/references/official-docs/SNAPSHOT.md +4 -4
  16. package/references/official-docs/THIRD_PARTY_NOTICES.md +86 -30
  17. package/references/official-docs/docs/AGENTS.md +7 -6
  18. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  19. package/references/official-docs/docs/agent-lifecycle.md +12 -5
  20. package/references/official-docs/docs/agent-lifecycle.zh.md +12 -5
  21. package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
  22. package/references/official-docs/docs/api-gateway.md +2 -2
  23. package/references/official-docs/docs/api-gateway.zh.md +2 -2
  24. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  25. package/references/official-docs/docs/architecture.md +26 -12
  26. package/references/official-docs/docs/architecture.zh.md +28 -14
  27. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  28. package/references/official-docs/docs/capability-seams.md +111 -31
  29. package/references/official-docs/docs/capability-seams.zh.md +111 -31
  30. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  31. package/references/official-docs/docs/config-catalog.md +674 -202
  32. package/references/official-docs/docs/config-catalog.zh.md +691 -219
  33. package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +6 -0
  34. package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +111 -0
  35. package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +111 -0
  36. package/references/official-docs/docs/cookbook/adding-a-settings-card.md +8 -8
  37. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +9 -9
  38. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
  39. package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
  40. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +4 -4
  41. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
  42. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +1 -1
  43. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +1 -1
  44. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +1 -1
  45. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  46. package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
  47. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +5 -5
  48. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +2 -2
  49. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
  50. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  51. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +6 -0
  52. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +108 -0
  53. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +108 -0
  54. package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +2 -2
  55. package/references/official-docs/docs/cordis-api/fiber.md +3 -3
  56. package/references/official-docs/docs/cordis-api/fiber.zh.md +3 -3
  57. package/references/official-docs/docs/cordis-api/inherited.md +0 -3
  58. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +2 -2
  59. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.md +2 -2
  60. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +2 -2
  61. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
  62. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +14 -15
  63. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +15 -16
  64. package/references/official-docs/docs/dependency-catalog.json +7312 -0
  65. package/references/official-docs/docs/development.i18n.yaml +2 -2
  66. package/references/official-docs/docs/development.md +13 -3
  67. package/references/official-docs/docs/development.zh.md +16 -6
  68. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  69. package/references/official-docs/docs/event-producer-consumer.md +50 -39
  70. package/references/official-docs/docs/event-producer-consumer.zh.md +55 -44
  71. package/references/official-docs/docs/glossary.i18n.yaml +2 -2
  72. package/references/official-docs/docs/glossary.md +1 -1
  73. package/references/official-docs/docs/glossary.zh.md +1 -1
  74. package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
  75. package/references/official-docs/docs/i18n/README.md +8 -3
  76. package/references/official-docs/docs/i18n/README.zh.md +8 -3
  77. package/references/official-docs/docs/i18n/style-samples.md +1 -1
  78. package/references/official-docs/docs/i18n/translation-prompt.md +5 -5
  79. package/references/official-docs/docs/i18n/translation-rules.zh.md +2 -2
  80. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  81. package/references/official-docs/docs/module-graph.md +303 -120
  82. package/references/official-docs/docs/module-graph.zh.md +303 -120
  83. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  84. package/references/official-docs/docs/persistence-catalog.md +5699 -64
  85. package/references/official-docs/docs/persistence-catalog.zh.md +5708 -73
  86. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +6 -0
  87. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.md +280 -0
  88. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.schema.json +13557 -0
  89. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.zh.md +280 -0
  90. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +6 -0
  91. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
  92. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.schema.json +910 -0
  93. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
  94. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +6 -0
  95. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.md +96 -0
  96. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.schema.json +8478 -0
  97. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
  98. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +6 -0
  99. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
  100. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.schema.json +72 -0
  101. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
  102. package/references/official-docs/docs/persistence-changes/README.i18n.yaml +6 -0
  103. package/references/official-docs/docs/persistence-changes/README.md +74 -0
  104. package/references/official-docs/docs/persistence-changes/README.zh.md +74 -0
  105. package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +6 -0
  106. package/references/official-docs/docs/persistence-changes/historical-formats/README.md +74 -0
  107. package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +74 -0
  108. package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +6 -0
  109. package/references/official-docs/docs/persistence-changes/historical-formats/v0.md +5105 -0
  110. package/references/official-docs/docs/persistence-changes/historical-formats/v0.schema.json +49308 -0
  111. package/references/official-docs/docs/persistence-changes/historical-formats/v0.zh.md +5105 -0
  112. package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +6 -0
  113. package/references/official-docs/docs/persistence-changes/historical-formats/v1.md +5107 -0
  114. package/references/official-docs/docs/persistence-changes/historical-formats/v1.schema.json +49411 -0
  115. package/references/official-docs/docs/persistence-changes/historical-formats/v1.zh.md +5107 -0
  116. package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +6 -0
  117. package/references/official-docs/docs/persistence-changes/historical-formats/v2.md +5362 -0
  118. package/references/official-docs/docs/persistence-changes/historical-formats/v2.schema.json +56466 -0
  119. package/references/official-docs/docs/persistence-changes/historical-formats/v2.zh.md +5362 -0
  120. package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +6 -0
  121. package/references/official-docs/docs/persistence-changes/releases/README.md +103 -0
  122. package/references/official-docs/docs/persistence-changes/releases/README.zh.md +103 -0
  123. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +6 -0
  124. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
  125. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.schema.json +39868 -0
  126. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
  127. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +6 -0
  128. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
  129. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.schema.json +43342 -0
  130. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
  131. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +6 -0
  132. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
  133. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.schema.json +19452 -0
  134. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
  135. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +6 -0
  136. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
  137. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.schema.json +5 -0
  138. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
  139. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +6 -0
  140. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
  141. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.schema.json +5 -0
  142. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
  143. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +6 -0
  144. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
  145. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.schema.json +5 -0
  146. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
  147. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +6 -0
  148. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
  149. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.schema.json +5 -0
  150. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
  151. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +6 -0
  152. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
  153. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.schema.json +5 -0
  154. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
  155. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +6 -0
  156. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
  157. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.schema.json +5 -0
  158. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
  159. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +6 -0
  160. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
  161. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.schema.json +5 -0
  162. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
  163. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +6 -0
  164. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
  165. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.schema.json +5320 -0
  166. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
  167. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +6 -0
  168. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
  169. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.schema.json +21258 -0
  170. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
  171. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +6 -0
  172. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
  173. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.schema.json +417 -0
  174. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
  175. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +6 -0
  176. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
  177. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.schema.json +29672 -0
  178. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
  179. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +6 -0
  180. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
  181. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.schema.json +48429 -0
  182. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
  183. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +6 -0
  184. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
  185. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.schema.json +49347 -0
  186. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
  187. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +6 -0
  188. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
  189. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.schema.json +5 -0
  190. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
  191. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +6 -0
  192. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
  193. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.schema.json +17642 -0
  194. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
  195. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +6 -0
  196. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
  197. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.schema.json +5 -0
  198. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
  199. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +6 -0
  200. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
  201. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.schema.json +5 -0
  202. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
  203. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +6 -0
  204. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
  205. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.schema.json +38678 -0
  206. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
  207. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +6 -0
  208. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
  209. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.schema.json +783 -0
  210. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
  211. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +6 -0
  212. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
  213. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.schema.json +24597 -0
  214. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
  215. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +6 -0
  216. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
  217. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +2132 -0
  218. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
  219. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +6 -0
  220. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
  221. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.schema.json +5 -0
  222. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
  223. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +6 -0
  224. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
  225. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.schema.json +5 -0
  226. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
  227. package/references/official-docs/docs/persistence-changes/releases/manifest.json +162 -0
  228. package/references/official-docs/docs/persistence-schema.json +61480 -0
  229. package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
  230. package/references/official-docs/docs/postmortem/README.md +1 -1
  231. package/references/official-docs/docs/postmortem/README.zh.md +1 -1
  232. package/references/official-docs/docs/rescope.i18n.yaml +2 -2
  233. package/references/official-docs/docs/rescope.md +2 -2
  234. package/references/official-docs/docs/rescope.zh.md +2 -2
  235. package/references/official-docs/docs/session-format-status.i18n.yaml +6 -0
  236. package/references/official-docs/docs/session-format-status.md +49 -0
  237. package/references/official-docs/docs/session-format-status.zh.md +49 -0
  238. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  239. package/references/official-docs/docs/subsystems/README.md +12 -3
  240. package/references/official-docs/docs/subsystems/README.zh.md +23 -14
  241. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +2 -2
  242. package/references/official-docs/docs/subsystems/agent-team.md +1 -1
  243. package/references/official-docs/docs/subsystems/agent-team.zh.md +2 -2
  244. package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
  245. package/references/official-docs/docs/subsystems/approval.md +1 -1
  246. package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
  247. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  248. package/references/official-docs/docs/subsystems/attachment.md +17 -7
  249. package/references/official-docs/docs/subsystems/attachment.zh.md +17 -7
  250. package/references/official-docs/docs/subsystems/{code-runtime.i18n.yaml → boot.i18n.yaml} +3 -3
  251. package/references/official-docs/docs/subsystems/boot.md +223 -0
  252. package/references/official-docs/docs/subsystems/boot.zh.md +223 -0
  253. package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +6 -0
  254. package/references/official-docs/docs/subsystems/browser-use.md +67 -0
  255. package/references/official-docs/docs/subsystems/browser-use.zh.md +67 -0
  256. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
  257. package/references/official-docs/docs/subsystems/client-modules.md +20 -10
  258. package/references/official-docs/docs/subsystems/client-modules.zh.md +21 -11
  259. package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +6 -0
  260. package/references/official-docs/docs/subsystems/client-resources.md +92 -0
  261. package/references/official-docs/docs/subsystems/client-resources.zh.md +92 -0
  262. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  263. package/references/official-docs/docs/subsystems/commands.md +4 -0
  264. package/references/official-docs/docs/subsystems/commands.zh.md +5 -1
  265. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  266. package/references/official-docs/docs/subsystems/compaction.md +48 -2
  267. package/references/official-docs/docs/subsystems/compaction.zh.md +50 -4
  268. package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +6 -0
  269. package/references/official-docs/docs/subsystems/computer-use.md +56 -0
  270. package/references/official-docs/docs/subsystems/computer-use.zh.md +56 -0
  271. package/references/official-docs/docs/subsystems/conversation.zh.md +1 -1
  272. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  273. package/references/official-docs/docs/subsystems/core.md +106 -60
  274. package/references/official-docs/docs/subsystems/core.zh.md +109 -63
  275. package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +6 -0
  276. package/references/official-docs/docs/subsystems/deliverables.md +178 -0
  277. package/references/official-docs/docs/subsystems/deliverables.zh.md +178 -0
  278. package/references/official-docs/docs/subsystems/extensions.zh.md +1 -1
  279. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
  280. package/references/official-docs/docs/subsystems/feedback.md +165 -31
  281. package/references/official-docs/docs/subsystems/feedback.zh.md +165 -31
  282. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
  283. package/references/official-docs/docs/subsystems/filesystem.md +15 -0
  284. package/references/official-docs/docs/subsystems/filesystem.zh.md +16 -1
  285. package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
  286. package/references/official-docs/docs/subsystems/goal.md +37 -1
  287. package/references/official-docs/docs/subsystems/goal.zh.md +38 -2
  288. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
  289. package/references/official-docs/docs/subsystems/invariants.md +1 -1
  290. package/references/official-docs/docs/subsystems/invariants.zh.md +3 -3
  291. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +1 -1
  292. package/references/official-docs/docs/subsystems/jobs.md +1 -1
  293. package/references/official-docs/docs/subsystems/jobs.zh.md +1 -1
  294. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  295. package/references/official-docs/docs/subsystems/llm-streaming.md +35 -15
  296. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +37 -17
  297. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
  298. package/references/official-docs/docs/subsystems/lsp.md +1 -1
  299. package/references/official-docs/docs/subsystems/lsp.zh.md +1 -1
  300. package/references/official-docs/docs/subsystems/mcp.i18n.yaml +6 -0
  301. package/references/official-docs/docs/subsystems/mcp.md +139 -0
  302. package/references/official-docs/docs/subsystems/mcp.zh.md +139 -0
  303. package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +6 -0
  304. package/references/official-docs/docs/subsystems/office-to-pdf.md +87 -0
  305. package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +87 -0
  306. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
  307. package/references/official-docs/docs/subsystems/permission-presets.md +62 -27
  308. package/references/official-docs/docs/subsystems/permission-presets.zh.md +62 -27
  309. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  310. package/references/official-docs/docs/subsystems/persistence.md +36 -15
  311. package/references/official-docs/docs/subsystems/persistence.zh.md +36 -15
  312. package/references/official-docs/docs/subsystems/plan.zh.md +2 -2
  313. package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +6 -0
  314. package/references/official-docs/docs/subsystems/ptc-runtime.md +232 -0
  315. package/references/official-docs/docs/subsystems/ptc-runtime.zh.md +232 -0
  316. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
  317. package/references/official-docs/docs/subsystems/sandbox.md +5 -4
  318. package/references/official-docs/docs/subsystems/sandbox.zh.md +7 -6
  319. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
  320. package/references/official-docs/docs/subsystems/schedule.md +2 -2
  321. package/references/official-docs/docs/subsystems/schedule.zh.md +3 -3
  322. package/references/official-docs/docs/subsystems/scope.i18n.yaml +2 -2
  323. package/references/official-docs/docs/subsystems/scope.md +1 -1
  324. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  325. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  326. package/references/official-docs/docs/subsystems/session-projection.md +1 -1
  327. package/references/official-docs/docs/subsystems/session-projection.zh.md +2 -2
  328. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  329. package/references/official-docs/docs/subsystems/session-reference.md +11 -6
  330. package/references/official-docs/docs/subsystems/session-reference.zh.md +11 -6
  331. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  332. package/references/official-docs/docs/subsystems/session-telemetry.md +22 -6
  333. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +23 -7
  334. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
  335. package/references/official-docs/docs/subsystems/session-title.md +5 -5
  336. package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
  337. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  338. package/references/official-docs/docs/subsystems/session.md +149 -61
  339. package/references/official-docs/docs/subsystems/session.zh.md +150 -62
  340. package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
  341. package/references/official-docs/docs/subsystems/shell.md +19 -15
  342. package/references/official-docs/docs/subsystems/shell.zh.md +20 -16
  343. package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +6 -0
  344. package/references/official-docs/docs/subsystems/sidebar-right.md +153 -0
  345. package/references/official-docs/docs/subsystems/sidebar-right.zh.md +153 -0
  346. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  347. package/references/official-docs/docs/subsystems/skills.md +4 -6
  348. package/references/official-docs/docs/subsystems/skills.zh.md +4 -6
  349. package/references/official-docs/docs/subsystems/slots.i18n.yaml +2 -2
  350. package/references/official-docs/docs/subsystems/slots.md +52 -38
  351. package/references/official-docs/docs/subsystems/slots.zh.md +53 -39
  352. package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
  353. package/references/official-docs/docs/subsystems/spill.md +13 -6
  354. package/references/official-docs/docs/subsystems/spill.zh.md +13 -6
  355. package/references/official-docs/docs/subsystems/ssh.i18n.yaml +6 -0
  356. package/references/official-docs/docs/subsystems/ssh.md +135 -0
  357. package/references/official-docs/docs/subsystems/ssh.zh.md +135 -0
  358. package/references/official-docs/docs/subsystems/storage.zh.md +2 -2
  359. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  360. package/references/official-docs/docs/subsystems/subagent.md +33 -16
  361. package/references/official-docs/docs/subsystems/subagent.zh.md +32 -15
  362. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
  363. package/references/official-docs/docs/subsystems/subprocess.md +41 -44
  364. package/references/official-docs/docs/subsystems/subprocess.zh.md +41 -44
  365. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  366. package/references/official-docs/docs/subsystems/system-prompt.md +6 -2
  367. package/references/official-docs/docs/subsystems/system-prompt.zh.md +7 -3
  368. package/references/official-docs/docs/subsystems/todo.zh.md +1 -1
  369. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
  370. package/references/official-docs/docs/subsystems/token-meter.md +2 -1
  371. package/references/official-docs/docs/subsystems/token-meter.zh.md +2 -1
  372. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  373. package/references/official-docs/docs/subsystems/tools.md +28 -12
  374. package/references/official-docs/docs/subsystems/tools.zh.md +28 -12
  375. package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
  376. package/references/official-docs/docs/subsystems/typert.md +6 -5
  377. package/references/official-docs/docs/subsystems/typert.zh.md +6 -5
  378. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
  379. package/references/official-docs/docs/subsystems/user-questions.md +2 -0
  380. package/references/official-docs/docs/subsystems/user-questions.zh.md +2 -0
  381. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
  382. package/references/official-docs/docs/subsystems/web-client.md +5 -5
  383. package/references/official-docs/docs/subsystems/web-client.zh.md +6 -6
  384. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
  385. package/references/official-docs/docs/subsystems/web-server.md +64 -0
  386. package/references/official-docs/docs/subsystems/web-server.zh.md +65 -1
  387. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +1 -1
  388. package/references/official-docs/docs/subsystems/webhook.md +2 -2
  389. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  390. package/references/official-docs/docs/subsystems/workflow.md +8 -8
  391. package/references/official-docs/docs/subsystems/workflow.zh.md +10 -10
  392. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  393. package/references/official-docs/docs/subsystems/workspace.md +199 -1
  394. package/references/official-docs/docs/subsystems/workspace.zh.md +199 -1
  395. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  396. package/references/official-docs/docs/testing.md +5 -4
  397. package/references/official-docs/docs/testing.zh.md +5 -4
  398. package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
  399. package/references/official-docs/docs/tool-catalog.md +452 -187
  400. package/references/official-docs/docs/tool-catalog.zh.md +454 -189
  401. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
  402. package/references/official-docs/docs/tool-execution-pipeline.md +2 -2
  403. package/references/official-docs/docs/tool-execution-pipeline.zh.md +2 -2
  404. package/references/official-docs/docs/user/develop/basic/index.zh.md +1 -1
  405. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
  406. package/references/official-docs/docs/user/develop/basic/publish.md +2 -2
  407. package/references/official-docs/docs/user/develop/basic/publish.zh.md +5 -5
  408. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +2 -2
  409. package/references/official-docs/docs/user/develop/framework/index.md +1 -1
  410. package/references/official-docs/docs/user/develop/framework/index.zh.md +1 -1
  411. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +2 -2
  412. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +8 -8
  413. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +8 -8
  414. package/references/official-docs/docs/user/guide/index.zh.md +2 -2
  415. package/references/official-docs/docs/user/guide/mcp-memory.zh.md +1 -1
  416. package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +2 -2
  417. package/references/official-docs/docs/user/guide/network-proxy.md +1 -1
  418. package/references/official-docs/docs/user/guide/network-proxy.zh.md +1 -1
  419. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  420. package/references/official-docs/docs/user/guide/providers.md +12 -8
  421. package/references/official-docs/docs/user/guide/providers.zh.md +14 -10
  422. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
  423. package/references/official-docs/docs/user/guide/python-sdk.md +59 -23
  424. package/references/official-docs/docs/user/guide/python-sdk.zh.md +60 -24
  425. package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
  426. package/references/official-docs/docs/web-styling.md +2 -1
  427. package/references/official-docs/docs/web-styling.zh.md +3 -2
  428. package/references/official-docs/packages/AGENTS.md +1 -1
  429. package/references/official-docs/packages/README.md +12 -7
  430. package/references/official-docs/vendor/README.md +15 -11
  431. package/references/official-docs/website-docs.ts +4 -2
  432. package/scripts/sync-official-docs.ps1 +5 -5
  433. package/templates/js/README-es.md +1 -1
  434. package/templates/js/README-hi.md +1 -1
  435. package/templates/js/README-pt.md +1 -1
  436. package/templates/js/README-zh.md +1 -1
  437. package/templates/js/README.md +1 -1
  438. package/templates/js/package.json +2 -2
  439. package/templates/ts/README-es.md +1 -1
  440. package/templates/ts/README-hi.md +1 -1
  441. package/templates/ts/README-pt.md +1 -1
  442. package/templates/ts/README-zh.md +1 -1
  443. package/templates/ts/README.md +1 -1
  444. package/templates/ts/package.json +2 -2
  445. package/references/official-docs/docs/subsystems/code-runtime.md +0 -195
  446. package/references/official-docs/docs/subsystems/code-runtime.zh.md +0 -195
@@ -36,7 +36,7 @@ interface WebBootEntry {
36
36
  ```
37
37
 
38
38
  ```ts type-equiv
39
- /** Initial scheduling phase for one content-addressed combo script. */
39
+ /** Initial scheduling phase for one revisioned combo script. */
40
40
  type WebBootBatchPhase = 'bootstrap' | 'application'
41
41
  ```
42
42
 
@@ -45,9 +45,9 @@ type WebBootBatchPhase = 'bootstrap' | 'application'
45
45
  interface WebBootBatch {
46
46
  /** Parser-blocking bootstrap or preloaded application scheduling. */
47
47
  phase: WebBootBatchPhase
48
- /** Content-addressed combo script endpoint. */
48
+ /** Revisioned combo script endpoint. */
49
49
  url: string
50
- /** Revision over the combined plugin script bytes and indexed source map. */
50
+ /** Revision derived from the ordered entry revisions. */
51
51
  rev: string
52
52
  /** Graph entry ids whose factories the script registers, in execution order. */
53
53
  entries: string[]
@@ -57,7 +57,7 @@ interface WebBootBatch {
57
57
  ```ts type-equiv
58
58
  /** The composed client entry graph the host injects as `window.__DSH_BOOT__`. */
59
59
  interface WebBootGraph {
60
- /** Consistency anchor over the whole graph (content + bundle hashes). */
60
+ /** Consistency anchor over the current entry and batch descriptors. */
61
61
  rev: string
62
62
  /**
63
63
  * Composed entries in module-graph order — a dynamic package row precedes
@@ -70,7 +70,7 @@ interface WebBootGraph {
70
70
  }
71
71
  ```
72
72
 
73
- Each initial row's `rev` is an opaque process nonce plus sequence, so graph composition does not hash every plugin artifact. After HMR observes a change, that row's revision becomes the hash of its new bundle and available source map. The initial descriptors partition rows into bootstrap and application scheduling phases, and either phase may contain several descriptors. Their URLs contain only the ordered package-resource list and revision; phase names do not enter the route. Graph composition preserves row order while greedily splitting before the map-form URL exceeds 3 KiB. Startup combo revisions hash the combined plugin script bytes and indexed source map, and the graph revision hashes both rows and descriptors. `immediately` marks the stage-one registration barrier; rows within one combo share its script transport, while separate combos load independently.
73
+ Each initial row's `rev` is an opaque process nonce plus sequence, so graph composition does not hash every plugin artifact. After HMR observes a bundle change, that row's revision becomes the hash of its new executable bytes. The initial descriptors partition rows into bootstrap and application scheduling phases, and either phase may contain several descriptors. Their URLs contain only the ordered package-resource list and a revision derived from those row revisions; phase names do not enter the route. Graph composition preserves row order while greedily splitting before the map-form URL exceeds 3 KiB, without concatenating scripts or reading maps. The graph revision hashes the entry and batch descriptors. `immediately` marks the stage-one registration barrier; rows within one combo share its script transport, while separate combos load independently.
74
74
 
75
75
  ## The scan
76
76
 
@@ -82,7 +82,7 @@ Package metadata — including the negative "not a client package" verdict — i
82
82
 
83
83
  ## The bundle route and index injection
84
84
 
85
- `GET`/`HEAD /plugins/??<package-a>/client.js,<package-b>/client.js&rev=<rev>` serves an exact generated combo script; a one-resource request uses the same form and is the HMR path. Its absolute `sourceMappingURL` changes every resource suffix in parallel, yielding `/plugins/??<package-a>/client.js.map,<package-b>/client.js.map&rev=<rev>`. The map is Indexed Source Map v3 even for one resource. An authored component map supplies its section; a component without one receives an identity section whose `sourcesContent` is the generated bundle and whose source name is its packaged `sourceURL` or plugin route. Every startup request URL is at most 3 KiB measured as UTF-8 bytes; partitioning uses the longer map form. All application URLs are preloaded, and all bootstrap URLs execute before the graph global and Vite entry. All advertised responses use long-lived immutable caching. Unknown or altered resource lists, missing revisions, and stale revisions answer 404 rather than serving different bytes or letting the SPA fallback return HTML as JavaScript; other methods are 405. The injection rows carry the current graph on every index render, so a reload always boots against the live composition.
85
+ `GET`/`HEAD /plugins/??<package-a>/client.js,<package-b>/client.js&rev=<rev>` addresses one generated combo script; a one-resource request uses the same form and is the HMR path. The script is concatenated once on its first `GET` and ends with an absolute `sourceMappingURL` whose resource suffixes are `.js.map`. The map files are not read by startup, index rendering, script `GET`, or `HEAD`; the first map `GET` reads and validates them, composes one Indexed Source Map v3, and caches that body. An authored component map supplies its section; a component without one receives an identity section whose `sourcesContent` is the captured bundle and whose source name is its packaged `sourceURL` or plugin route. Every startup request URL is at most 3 KiB measured as UTF-8 bytes; partitioning uses the longer map form. All application URLs are preloaded, and all bootstrap URLs execute before the graph global and Vite entry. Materialized responses use long-lived immutable caching. Unknown or altered resource lists, missing revisions, and stale revisions answer 404 rather than serving different bytes or letting the SPA fallback return HTML as JavaScript; other methods are 405. The injection rows carry the current graph on every index render, so a reload always boots against the live composition.
86
86
 
87
87
  ## The service
88
88
 
@@ -98,9 +98,9 @@ interface ClientArtifactBaseline {
98
98
  }
99
99
  ```
100
100
 
101
- `ClientModuleRegistry` (`ctx.clientModules`, defined in [`packages/client/modules/src/index.ts`](../../packages/client/modules/src/index.ts)) exposes reads and the rebuild face; signatures are in the generated [service catalog](#ctxclientmodules--clientmoduleregistry). `graph()` returns the current composed graph (a stable object between changes), `clientPath(id)` returns the bundle's absolute path, and `artifactBaseline(id)` returns the bundle stat values captured before the current snapshot was read. `rebuilt(id)` is the only entry point through which changed bundle content reaches the graph: it re-hashes the bundle together with its current source map, and only a real rev change recomposes the graph and notifies. `onRebuilt` fires per changed bundle with the new rev; `onGraphChanged` fires after any flush that recomposed the graph (row added or removed, or a rebuilt rev change) and is pull-model — listeners re-read `graph()`. Both notification paths contain listener exceptions so one throwing subscriber cannot skip later subscribers or kill whatever triggered the flush.
101
+ `ClientModuleRegistry` (`ctx.clientModules`, defined in [`packages/client/modules/src/index.ts`](../../packages/client/modules/src/index.ts)) exposes reads and the rebuild face; signatures are in the generated [service catalog](#ctxclientmodules--clientmoduleregistry). `graph()` returns the current composed graph (a stable object between changes), `clientPath(id)` returns the bundle's absolute path, and `artifactBaseline(id)` returns the bundle stat values captured before the current snapshot was read. `fetchBundle()` resolves the same lazy response used by the HTTP route. `rebuilt(id)` is the only entry point through which changed bundle content reaches the graph: it re-hashes the bundle bytes, and only a real revision change recomposes the graph and notifies. `onRebuilt` fires per changed bundle with the new revision; `onGraphChanged` fires after any flush that recomposed the graph (row added or removed, or a rebuilt revision change) and is pull-model — listeners re-read `graph()`. Both notification paths contain listener exceptions so one throwing subscriber cannot skip later subscribers or kill whatever triggered the flush.
102
102
 
103
- In development, [dsh-client-hmr](../../packages/client/hmr/README.md) is the registry's watch driver: its node half stat-polls every graph row's bundle from the module host's pre-read baseline, calls `rebuilt(id)` only for a changed or dirty row, resyncs its watch set through `onGraphChanged`, and broadcasts rev changes to the browser half over SSE. Source-map changes alone do not trigger a reload; the current map joins the snapshot when a bundle change does. Production graphs omit the HMR row entirely; the module host itself never watches files.
103
+ [`dsh-client-hmr`](../../packages/client/hmr/README.md) delivers live graph snapshots in the shipped Web composition. The Host forwards existing graph-change notifications immediately, and reconnect sends the current full graph. A graph describes desired browser entries without asserting that Host cleanup has completed. Its artifact poll separately reports rebuilt revisions. Source-map changes alone do not trigger a reload; a new combo-map URL appears only after a bundle revision changes, and each map body is fixed by its first `GET`. Client Modules validates snapshots and serializes reconciliation with those rebuilds; it owns the boot-created entry map, single-resource arrivals, asynchronous removal, unused-module/style cleanup and page-local retry status. Static platform modules and the bootstrap retain their page lifetime; Electron installation is a separate flow.
104
104
 
105
105
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
106
106
 
@@ -130,6 +130,16 @@ graph(): WebBootGraph
130
130
  */
131
131
  clientPath(id: string): string | undefined
132
132
 
133
+ /**
134
+ * Serve an advertised revisioned bundle or source map without a Web server.
135
+ * Unknown URLs return 404, unsupported methods return 405, and `HEAD`
136
+ * returns the same immutable headers without materializing a body. Each body
137
+ * is built once on its first `GET`; script construction never reads maps.
138
+ * @param request - shell-carrier request for a `/plugins` resource.
139
+ * @returns the exact response also exposed by the optional Web route.
140
+ */
141
+ async fetchBundle(request: Request): Promise<Response>
142
+
133
143
  /**
134
144
  * Filesystem baseline captured before an entry's current bytes were read.
135
145
  * HMR compares it with the live files when installing a watch, so a write
@@ -141,8 +151,8 @@ clientPath(id: string): string | undefined
141
151
  artifactBaseline(id: string): ClientArtifactBaseline | undefined
142
152
 
143
153
  /**
144
- * Re-hash one bundle (the HMR watch's registration hook — the only entry
145
- * point through which bundle content changes reach the graph).
154
+ * Publish one completed bundle generation (the HMR watch's registration
155
+ * hook — the only entry point through which build changes reach the graph).
146
156
  * @param id - entry id (package name).
147
157
  * @returns the new rev, or undefined for an unknown id.
148
158
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](client-modules.md) | 中文
4
4
 
5
- Web 插件表:[dsh-client-modules](../../packages/client/modules) 中 client 模块系统的 Node 半,以 `ctx.clientModules`(`ClientModuleRegistry`)形式提供。它扫描宿主 Loader 的 entry,找出声明了 `dsh.client` 的包,组合出 `window.__DSH_BOOT__` entry 图,在 `/plugins` 下提供带版本的单资源或多资源 combo 脚本,并以启动协议行回应每次 index 注入收集——这是同一个服务的四个面。它是 Web GUI 栈的一项可选能力,不属于 agent loop(智能体循环)主干,并且是 [dsh-host-webserver](../../packages/host/webserver) 的消费方:[web-server.md](web-server.zh.md) 所述的载体提供本服务注册的前缀路由与其回应的 `webserver/index-inject` 事件。同一个包的浏览器半(`ctx.modules`,即拉取并物化这些 bundle 的 lazy CJS 模块表)属于内核机件,记录在[包 README](../../packages/client/modules/README-zh.md)中,不在本页。
5
+ Web 插件表:[dsh-client-modules](../../packages/client/modules) 中 client 模块系统的 Node 半,以 `ctx.clientModules`(`ClientModuleRegistry`)形式提供。它扫描宿主 Loader 的 entry,找出声明了 `dsh.client` 的包,组合出 `window.__DSH_BOOT__` entry 图,在 `/plugins` 下提供带版本的单资源或多资源 combo 脚本,并以启动协议行回应每次 index 注入收集——这是同一个服务的四个面。它是 Web GUI 栈的一项可选能力,不属于 agent loop(智能体循环)主干,并且是 [dsh-host-webserver](../../packages/host/webserver) 的消费方:[web-server.md](web-server.zh.md) 所述的载体提供本服务注册的前缀路由与其回应的 `webserver/index-inject` 事件。同一个包的浏览器半(`ctx.modules`,即拉取并物化这些 bundle 的 lazy CJS 模块表)属于内核机件,记录在[包 README](../../packages/client/modules/README.zh.md)中,不在本页。
6
6
 
7
7
  源码:[`packages/client/modules/src/client/manifest.ts`](../../packages/client/modules/src/client/manifest.ts)
8
8
 
@@ -36,7 +36,7 @@ interface WebBootEntry {
36
36
  ```
37
37
 
38
38
  ```ts type-equiv
39
- /** Initial scheduling phase for one content-addressed combo script. */
39
+ /** Initial scheduling phase for one revisioned combo script. */
40
40
  type WebBootBatchPhase = 'bootstrap' | 'application'
41
41
  ```
42
42
 
@@ -45,9 +45,9 @@ type WebBootBatchPhase = 'bootstrap' | 'application'
45
45
  interface WebBootBatch {
46
46
  /** Parser-blocking bootstrap or preloaded application scheduling. */
47
47
  phase: WebBootBatchPhase
48
- /** Content-addressed combo script endpoint. */
48
+ /** Revisioned combo script endpoint. */
49
49
  url: string
50
- /** Revision over the combined plugin script bytes and indexed source map. */
50
+ /** Revision derived from the ordered entry revisions. */
51
51
  rev: string
52
52
  /** Graph entry ids whose factories the script registers, in execution order. */
53
53
  entries: string[]
@@ -57,7 +57,7 @@ interface WebBootBatch {
57
57
  ```ts type-equiv
58
58
  /** The composed client entry graph the host injects as `window.__DSH_BOOT__`. */
59
59
  interface WebBootGraph {
60
- /** Consistency anchor over the whole graph (content + bundle hashes). */
60
+ /** Consistency anchor over the current entry and batch descriptors. */
61
61
  rev: string
62
62
  /**
63
63
  * Composed entries in module-graph order — a dynamic package row precedes
@@ -70,7 +70,7 @@ interface WebBootGraph {
70
70
  }
71
71
  ```
72
72
 
73
- 每个初始 row 的 `rev` 都是不透明的进程 nonce 加序号,因此组合图时不会哈希每个插件产物。HMR 观察到变化后,该 row 的 revision 才改为新 bundle 及其可用 sourcemap 的哈希。初始描述把 row 划入 bootstrap 与 application 两个调度阶段,每个阶段都可以包含多条描述。URL 只含有序 package 资源列表与 revision,阶段名不会进入路由。图组合保持 row 顺序,并在 map 形式 URL 超过 3 KiB 前贪心切分。启动 combo revision 对合并后的插件脚本字节与 indexed sourcemap 求哈希,图 revision 则对 row 与描述一并求哈希。`immediately` 标记第一阶段的 registration barrier;同一 combo 中的 row 共享脚本传输,不同 combo 则独立加载。
73
+ 每个初始 row 的 `rev` 都是不透明的进程 nonce 加序号,因此组合图时不会哈希每个插件产物。HMR 观察到 bundle 变化后,该 row 的 revision 才改为新可执行字节的哈希。初始 descriptor 把 row 划入 bootstrap 与 application 两个调度阶段,每个阶段都可以包含多条 descriptor。URL 只含有序 package 资源列表和从这些 row revision 派生的 revision,阶段名不会进入路由。图组合保持 row 顺序,并在 map 形式 URL 超过 3 KiB 前贪心切分,不拼接脚本,也不读取 map。图 revision 对 entry 与 batch descriptor 求哈希。`immediately` 标记第一阶段的 registration barrier;同一 combo 中的 row 共享脚本传输,不同 combo 则独立加载。
74
74
 
75
75
  ## 扫描
76
76
 
@@ -82,7 +82,7 @@ interface WebBootGraph {
82
82
 
83
83
  ## bundle 路由与 index 注入
84
84
 
85
- `GET`/`HEAD /plugins/??<package-a>/client.js,<package-b>/client.js&rev=<rev>` 提供精确生成的 combo 脚本;单资源请求采用同一形式,也是 HMR 路径。其绝对 `sourceMappingURL` 平行改写每个资源后缀,得到 `/plugins/??<package-a>/client.js.map,<package-b>/client.js.map&rev=<rev>`。即使只有一个资源,map 仍采用 Indexed Source Map v3。组件有自带 map 时直接用于对应 section;没有时则获得 identity section,其 `sourcesContent` 是构建后 bundle,source 名取打包后的 `sourceURL` 或插件路由。每条启动请求 URL 按 UTF-8 字节计算都不超过 3 KiB;切分按更长的 map 形式计算。所有 application URL 都会预加载,所有 bootstrap URL 都会在图全局量与 Vite entry 之前执行。所有已发布响应都使用长期 immutable 缓存。未知或被修改的资源列表、缺少 revision 及陈旧 revision 都返回 404,绝不提供其他字节,也不会让 SPA fallback 把 HTML 当作 JavaScript 返回;其他方法返回 405。注入行在每次 index 渲染时携带当前图,因此重新加载总是基于实时组合启动。
85
+ `GET`/`HEAD /plugins/??<package-a>/client.js,<package-b>/client.js&rev=<rev>` 寻址一份生成的 combo 脚本;单资源请求采用同一形式,也是 HMR 路径。脚本在首次 `GET` 时只拼接一次,并以绝对 `sourceMappingURL` 结尾,其中每个资源后缀改为 `.js.map`。启动、index 渲染、脚本 `GET` 和 `HEAD` 都不会读取 map 文件;首次 map `GET` 才会读取并校验这些文件、组合一份 Indexed Source Map v3,并缓存该 body。组件有自带 map 时直接用于对应 section;没有时则获得 identity section,其 `sourcesContent` 是捕获的 bundle,source 名取打包后的 `sourceURL` 或插件路由。每条启动请求 URL 按 UTF-8 字节计算都不超过 3 KiB;切分按更长的 map 形式计算。所有 application URL 都会预加载,所有 bootstrap URL 都会在图全局量与 Vite entry 之前执行。已物化响应使用长期 immutable 缓存。未知或被修改的资源列表、缺少 revision 及陈旧 revision 都返回 404,绝不提供其他字节,也不会让 SPA fallback 把 HTML 当作 JavaScript 返回;其他方法返回 405。注入行在每次 index 渲染时携带当前图,因此重新加载总是基于实时组合启动。
86
86
 
87
87
  ## 服务
88
88
 
@@ -98,9 +98,9 @@ interface ClientArtifactBaseline {
98
98
  }
99
99
  ```
100
100
 
101
- `ClientModuleRegistry`(`ctx.clientModules`,定义于 [`packages/client/modules/src/index.ts`](../../packages/client/modules/src/index.ts))暴露读取面与重建面;签名见生成的[服务目录](#ctxclientmodules--clientmoduleregistry)。`graph()` 返回当前组合出的图(两次变更之间是同一个稳定对象),`clientPath(id)` 返回 bundle 的绝对路径,`artifactBaseline(id)` 返回读取当前快照前捕获的 bundle stat 值。`rebuilt(id)` 是变化后的 bundle 内容到达图的唯一入口:它把 bundle 与当前 source map 一起重新哈希,只有 rev 真正变化才会重新组合图并发出通知。`onRebuilt` 按发生变化的 bundle 逐个触发并携带新 rev;`onGraphChanged` 在任何一次重新组合了图的 flush 之后触发(行的增删,或 rebuilt 带来的 rev 变化),并采用拉取模型——监听器自行重读 `graph()`。两条通知路径都会兜住监听器异常,因此一个抛错的订阅者既不能让后续订阅者被跳过,也不能杀死触发这次 flush 的一方。
101
+ `ClientModuleRegistry`(`ctx.clientModules`,定义于 [`packages/client/modules/src/index.ts`](../../packages/client/modules/src/index.ts))暴露读取面与重建面;签名见生成的[服务目录](#ctxclientmodules--clientmoduleregistry)。`graph()` 返回当前组合出的图(两次变更之间是同一个稳定对象),`clientPath(id)` 返回 bundle 的绝对路径,`artifactBaseline(id)` 返回读取当前快照前捕获的 bundle stat 值。`fetchBundle()` 解析 HTTP 路由所使用的同一份惰性响应。`rebuilt(id)` 是变化后的 bundle 内容到达图的唯一入口:它重新哈希 bundle 字节,只有 revision 真正变化才会重新组合图并发出通知。`onRebuilt` 按发生变化的 bundle 逐个触发并携带新 revision;`onGraphChanged` 在任何一次重新组合了图的 flush 之后触发(行的增删,或 rebuilt 带来的 revision 变化),并采用拉取模型——监听器自行重读 `graph()`。两条通知路径都会兜住监听器异常,因此一个抛错的订阅者既不能让后续订阅者被跳过,也不能杀死触发这次 flush 的一方。
102
102
 
103
- 开发环境下,[dsh-client-hmr](../../packages/client/hmr/README-zh.md) 是注册表的监视驱动:它的 Node 半从 module host 读文件前记录的基线出发,对图中每一行的 bundle 做 stat 轮询,只为变化或标脏的 row 调用 `rebuilt(id)`,经 `onGraphChanged` 重新同步监视集合,并通过 SSE(Server-Sent Events)把 rev 变化广播给浏览器半。仅 source map 变化不会触发重载;bundle 变化时,当前 map 会一起进入快照。生产环境的图完全不含 HMR(热模块替换)行;module host 自身从不监视文件。
103
+ 随包提供的 Web 组合通过 [`dsh-client-hmr`](../../packages/client/hmr/README.zh.md) 交付动态图快照。Host 立即转发现有图变化通知,重连会发送当前完整图。图描述浏览器的目标条目,不声明 Host 清理已经完成。产物轮询另外报告重建 revision。仅 source map 变化不会触发重载;新 combo-map URL 只会在 bundle revision 变化后出现,每份 map body 由其首次 `GET` 固定。Client Modules 校验快照,并将对账与重建串行协调;它持有启动创建的条目映射,负责单资源到达、异步移除、未使用模块与样式清理,以及页面本地重试状态。静态平台模块与 bootstrap 保持页面生命周期;Electron 安装属于独立流程。
104
104
 
105
105
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
106
106
 
@@ -130,6 +130,16 @@ graph(): WebBootGraph
130
130
  */
131
131
  clientPath(id: string): string | undefined
132
132
 
133
+ /**
134
+ * Serve an advertised revisioned bundle or source map without a Web server.
135
+ * Unknown URLs return 404, unsupported methods return 405, and `HEAD`
136
+ * returns the same immutable headers without materializing a body. Each body
137
+ * is built once on its first `GET`; script construction never reads maps.
138
+ * @param request - shell-carrier request for a `/plugins` resource.
139
+ * @returns the exact response also exposed by the optional Web route.
140
+ */
141
+ async fetchBundle(request: Request): Promise<Response>
142
+
133
143
  /**
134
144
  * Filesystem baseline captured before an entry's current bytes were read.
135
145
  * HMR compares it with the live files when installing a watch, so a write
@@ -141,8 +151,8 @@ clientPath(id: string): string | undefined
141
151
  artifactBaseline(id: string): ClientArtifactBaseline | undefined
142
152
 
143
153
  /**
144
- * Re-hash one bundle (the HMR watch's registration hook — the only entry
145
- * point through which bundle content changes reach the graph).
154
+ * Publish one completed bundle generation (the HMR watch's registration
155
+ * hook — the only entry point through which build changes reach the graph).
146
156
  * @param id - entry id (package name).
147
157
  * @returns the new rev, or undefined for an unknown id.
148
158
  */
@@ -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/client-resources.md
5
+ client-resources.md: 09acaf72eb5ee6f6003d9b275afa8a73f0822771
6
+ client-resources.zh.md: 4a0e30d2d885d143b1bc59ca58f59fd8d1f3e9b7
@@ -0,0 +1,92 @@
1
+ # Client Resources
2
+
3
+ English | [中文](client-resources.zh.md)
4
+
5
+ The client resource model turns an address into live data for any Web Client component. [`dsh-client-resources`](../../packages/client/resources/README.md) provides the `ctx.resources` service and the `useResource` global standard hook; a package that owns a kind of content registers one **provider** for its **protocol**, and a component reads the content's current state by **address** without importing the owner's runtime. The right Sidebar's tabs are the model's first consumer ([Right Sidebar](sidebar-right.md)); the decision record is the [client resource model Agent Note](../../.agents/notes/implemented/architecture/2026-09-05-client-resource-model.md).
6
+
7
+ This page is the developer reference: how to write an address, how to register a provider, how to read a resource, what the states and failures mean, and how the model holds and releases a resource.
8
+
9
+ ## Addresses
10
+
11
+ A resource address is a `dsh-resource://<type>/…` URL. The host names the protocol and must be a key of `ResourceProtocolMap`; the path is the protocol's own, and its owner percent-encodes each segment. A protocol that needs a scope puts it in the path: the `file` protocol's addresses read `dsh-resource://file/session/<sessionId>/<path>`, where path is workspace-relative or absolute with its leading slashes preserved, built with `fileAddressFor(sessionId, cwd, path)` and read back with `parseFileAddress(address)` from [`dsh-util-workspace-path`](../../packages/util/workspace-path/README.md). The model itself reads only the scheme and the host: `protocolOf(address)` returns the lower-cased host of a `dsh-resource://` URL and `undefined` for anything else. Addresses under any other scheme — the Sidebar's `sidebar://guide` — name no resource and read as `none`.
12
+
13
+ | Address | Protocol key | Reads as |
14
+ |---|---|---|
15
+ | `dsh-resource://file/session/s1/notes/a.md` | `file` | the metadata of `notes/a.md` under session `s1`'s workspace root, when the `file` provider is registered |
16
+ | `dsh-resource://file/absolute/home/me/notes.md` | `file` | parseable but fails with `workspace-file/unknown-workspace`: no authorizing Session, and neither current nor Tab Session is borrowed |
17
+ | `DSH-RESOURCE://File/session/s1/a` | `file` | a distinct record: addresses compare as strings, and `openResource` accepts only the canonical lower-case spelling that `fileAddressFor` emits |
18
+ | `dsh-resource://subagentchat/session/c1?parent=p1&mode=continuable` | `subagentchat` | an addressed subagent Conversation whose value owns a `SessionReference` until the resource closes |
19
+ | `sidebar://guide` | — | `none`: a navigation address |
20
+ | `/home/me/notes.md` | — | `none`: not a URL |
21
+
22
+ ## Registering a provider
23
+
24
+ The owner of a protocol declares its value type on `ResourceProtocolMap` and registers one provider inside its own `ctx.effect`, so the protocol lives exactly as long as the plugin ([provide a protocol](../../packages/client/resources/README.md#provide-a-protocol)). `open(address, { signal })` returns a stream of `RemoteResult` frames — the current state first, then one frame per change — and must stop when `signal` aborts. A failure is an `ok: false` frame carrying a `RemoteFailure`; a throw inside the stream is a programming error and is not caught.
25
+
26
+ ```ts ignore-check
27
+ import type { Context } from '@deepseek-ai/cordis'
28
+ import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'
29
+ import type {} from '@deepseek-ai/dsh-client-resources/client'
30
+
31
+ interface NoteView { readonly title: string; readonly updatedAt: string }
32
+
33
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
34
+ interface ResourceProtocolMap { note: NoteView }
35
+ }
36
+
37
+ export const inject = ['resources', 'remote']
38
+
39
+ export function apply(ctx: Context): void {
40
+ ctx.effect(() => ctx.resources.register<'note'>({
41
+ protocol: 'note',
42
+ async *open(address, { signal }): AsyncIterable<RemoteResult<NoteView>> {
43
+ const id = new URL(address).pathname.slice(1)
44
+ yield await ctx.remote.notes.read(id, signal)
45
+ for await (const change of ctx.remote.notes.follow(id, signal)) yield change
46
+ },
47
+ }), 'my-notes: note resource provider')
48
+ }
49
+ ```
50
+
51
+ A protocol has exactly one provider; a second registration throws. Registering while addresses of the protocol are already held opens their streams at once; disposing the provider ends those streams and the addresses read `none` until a provider returns.
52
+
53
+ ## Reading a resource
54
+
55
+ Every slot component receives `useResource` in its props, whatever its scope ([Slots](slots.md)). `useResource<P>(address)` names the protocol as the type argument and returns the address's current snapshot; subscribing is what holds the resource open, and a component that mounts while another holder keeps the resource alive reads the latest value at once without reopening the stream ([read a resource](../../packages/client/resources/README.md#read-a-resource)).
56
+
57
+ | `status` | Meaning | `value` | `failure` |
58
+ |---|---|---|---|
59
+ | `none` | No provider is registered for the address's protocol, or the address is not a resource address | `undefined` | `undefined` |
60
+ | `loading` | The provider's stream is open and has not yielded yet | `undefined` | `undefined` |
61
+ | `live` | The latest frame succeeded | the latest `ok` value | `undefined` |
62
+ | `failed` | The latest frame reported a failure | the last `ok` value, kept | the frame's `RemoteFailure` |
63
+
64
+ ```tsx ignore-check
65
+ import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
66
+ import type {} from '@deepseek-ai/dsh-api-workspace-files/client'
67
+
68
+ type Props = PropsRuntime<'sidebar.right.pane.tab'>
69
+
70
+ export function FileHeader({ useTabInfo, useResource, t }: Props) {
71
+ const { tab } = useTabInfo()
72
+ const meta = useResource<'file'>(tab.contentId)
73
+ if (meta.status === 'failed') return <p role="alert">{t('failed', { code: meta.failure.code })}</p>
74
+ return (
75
+ <header>
76
+ {tab.title}
77
+ </header>
78
+ )
79
+ }
80
+ ```
81
+
82
+ A consumer presents `failed` itself: the model keeps the last value beside the failure so a body can show stale content with a notice rather than a blank, and the next `ok` frame clears the failure. Nothing in the model produces user-visible text.
83
+
84
+ ## Holding and releasing
85
+
86
+ A resource is alive while it has a holder: a subscribed `useResource`, or a pin. `ctx.resources.pin(address, signal)` keeps a resource open without subscribing until `signal` aborts, and an already-aborted signal pins nothing; the right Sidebar pins every open tab record's address for the record's life, so switching tabs unmounts a body without closing its stream. The first holder opens the provider's stream; the last release aborts it, discards the value, and returns the snapshot to `loading` (provider present) or `none` (absent). A frame the provider yields after that release is dropped, and the iterator is returned. `ctx.resources.source(address)` is the bare observable behind the hook, reference-stable per address, for callers outside React; reading its snapshot does not hold the resource ([lifecycle](../../packages/client/resources/README.md#lifecycle)).
87
+
88
+ Most streams carry metadata rather than content. The `file` provider's value is `WorkspaceFileStat { absolutePath, version, bytes? }`: the first frame comes from Host `stat`, and later observations update the version. A consumer reads content through the Workspace Files Remote namespace; Preview owns refresh independently per tab ([`dsh-api-workspace-files`](../../packages/api/workspace-files/README.md)). The `subagentchat` provider retains the addressed Session and yields its `SessionReference`, then releases that reference when the resource signal aborts.
89
+
90
+ ## Limits
91
+
92
+ Records live for the page lifetime: an address's record stays after its last holder leaves, holding no stream and no value, so memory grows with the number of distinct addresses ever read. A provider that ignores `signal` keeps running until its next frame. The failure type is the Remote face's `RemoteFailure`, so a provider whose source is not a Remote call mints one. A misspelled protocol or a malformed address reads as `none` with no other diagnostic.
@@ -0,0 +1,92 @@
1
+ # 客户端资源
2
+
3
+ [English](client-resources.md) | 中文
4
+
5
+ 客户端资源模型把一个地址变成任何 Web Client 组件都能读的活数据。[`dsh-client-resources`](../../packages/client/resources/README.zh.md) 提供 `ctx.resources` 服务与 `useResource` 全局标准 hook;拥有某类内容的包为它的**协议**注册一个**提供方**,组件按**地址**读取该内容的当前状态,而无需引用拥有者的运行时。右侧 Sidebar 的 tab 是这个模型的第一个消费方([右侧 Sidebar](sidebar-right.zh.md));决策记录见 [客户端资源模型 Agent Note](../../.agents/notes/implemented/architecture/2026-09-05-client-resource-model.zh.md)。
6
+
7
+ 本页是面向开发者的参考:地址怎么写、提供方怎么注册、资源怎么读、状态与失败各是什么意思、模型怎样持有与释放一份资源。
8
+
9
+ ## 地址
10
+
11
+ 资源地址是 `dsh-resource://<type>/…` 形式的 URL。host 命名协议,必须是 `ResourceProtocolMap` 的键;路径归协议自己,由其拥有者逐段做百分号编码。需要作用域的协议把作用域放进路径:`file` 协议的地址形如 `dsh-resource://file/session/<sessionId>/<path>`,其中 path 可以相对工作区根,也可以是保留前导斜杠的绝对路径,用 [`dsh-util-workspace-path`](../../packages/util/workspace-path/README.zh.md) 的 `fileAddressFor(sessionId, cwd, path)` 构造、`parseFileAddress(address)` 读回。模型本身只读 scheme 与 host:`protocolOf(address)` 对 `dsh-resource://` URL 返回小写 host,对其它任何字串返回 `undefined`。其它 scheme 下的地址——Sidebar 的 `sidebar://guide`——不指向资源,读作 `none`。
12
+
13
+ | 地址 | 协议键 | 读作 |
14
+ |---|---|---|
15
+ | `dsh-resource://file/session/s1/notes/a.md` | `file` | 会话 `s1` 工作区根下 `notes/a.md` 的元数据(`file` 提供方已注册时) |
16
+ | `dsh-resource://file/absolute/home/me/notes.md` | `file` | 可解析,但没有授权 Session,以 `workspace-file/unknown-workspace` 失败;不借用当前或 Tab Session |
17
+ | `DSH-RESOURCE://File/session/s1/a` | `file` | 另一份记录:地址按字符串比较,`openResource` 只接受 `fileAddressFor` 生成的规范小写拼写 |
18
+ | `dsh-resource://subagentchat/session/c1?parent=p1&mode=continuable` | `subagentchat` | 已寻址的 subagent Conversation;其值持有一个 `SessionReference`,直到资源关闭 |
19
+ | `sidebar://guide` | — | `none`:导航地址 |
20
+ | `/home/me/notes.md` | — | `none`:不是 URL |
21
+
22
+ ## 注册提供方
23
+
24
+ 协议拥有者在 `ResourceProtocolMap` 上声明其值类型,并在自己的 `ctx.effect` 里注册一个提供方,使协议与插件同寿([提供协议](../../packages/client/resources/README.zh.md#provide-a-protocol))。`open(address, { signal })` 返回一条 `RemoteResult` 帧流——首帧是当前状态,之后每次变化一帧——并且必须在 `signal` 中止时停下。失败是携带 `RemoteFailure` 的 `ok: false` 帧;流里抛出是编程错误,不会被捕获。
25
+
26
+ ```ts ignore-check
27
+ import type { Context } from '@deepseek-ai/cordis'
28
+ import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'
29
+ import type {} from '@deepseek-ai/dsh-client-resources/client'
30
+
31
+ interface NoteView { readonly title: string; readonly updatedAt: string }
32
+
33
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
34
+ interface ResourceProtocolMap { note: NoteView }
35
+ }
36
+
37
+ export const inject = ['resources', 'remote']
38
+
39
+ export function apply(ctx: Context): void {
40
+ ctx.effect(() => ctx.resources.register<'note'>({
41
+ protocol: 'note',
42
+ async *open(address, { signal }): AsyncIterable<RemoteResult<NoteView>> {
43
+ const id = new URL(address).pathname.slice(1)
44
+ yield await ctx.remote.notes.read(id, signal)
45
+ for await (const change of ctx.remote.notes.follow(id, signal)) yield change
46
+ },
47
+ }), 'my-notes: note resource provider')
48
+ }
49
+ ```
50
+
51
+ 一个协议恰有一个提供方;第二次注册抛错。注册时若该协议的地址已被持有,则立刻打开它们的流;提供方 dispose 时结束这些流,地址读作 `none` 直到提供方回来。
52
+
53
+ ## 读取资源
54
+
55
+ 每个 slot 组件不论作用域都在 props 上收到 `useResource`([Slots](slots.zh.md))。`useResource<P>(address)` 以类型参数命名协议,返回该地址的当前快照;订阅就是持有资源的方式,另一个持有者让资源存活时,新挂载的组件立刻读到最新值而不重开流([读取资源](../../packages/client/resources/README.zh.md#read-a-resource))。
56
+
57
+ | `status` | 含义 | `value` | `failure` |
58
+ |---|---|---|---|
59
+ | `none` | 地址的协议没有注册提供方,或地址不是资源地址 | `undefined` | `undefined` |
60
+ | `loading` | 提供方的流已打开、尚未产出 | `undefined` | `undefined` |
61
+ | `live` | 最新一帧成功 | 最新的 `ok` 值 | `undefined` |
62
+ | `failed` | 最新一帧报告了失败 | 保留的上一个 `ok` 值 | 该帧的 `RemoteFailure` |
63
+
64
+ ```tsx ignore-check
65
+ import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
66
+ import type {} from '@deepseek-ai/dsh-api-workspace-files/client'
67
+
68
+ type Props = PropsRuntime<'sidebar.right.pane.tab'>
69
+
70
+ export function FileHeader({ useTabInfo, useResource, t }: Props) {
71
+ const { tab } = useTabInfo()
72
+ const meta = useResource<'file'>(tab.contentId)
73
+ if (meta.status === 'failed') return <p role="alert">{t('failed', { code: meta.failure.code })}</p>
74
+ return (
75
+ <header>
76
+ {tab.title}
77
+ </header>
78
+ )
79
+ }
80
+ ```
81
+
82
+ `failed` 由消费方自己呈现:模型把最后一个值留在失败旁,正文可以带提示显示旧内容而不是一片空白,下一个 `ok` 帧会清除失败。模型本身不产生任何用户可见文案。
83
+
84
+ ## 持有与释放
85
+
86
+ 资源有持有者就存活:一个订阅中的 `useResource`,或一次钉住。`ctx.resources.pin(address, signal)` 在不订阅的情况下让资源保持打开直到 `signal` 中止,已中止的信号什么也不钉;右侧 Sidebar 在每条打开的 tab 记录存续期内钉住其地址,因此切 tab 卸载正文不关流。第一个持有者打开提供方的流;最后一个释放时中止它、丢弃值,并把快照回到 `loading`(有提供方)或 `none`(没有)。提供方在这次释放之后产出的帧被丢弃,迭代器被归还。`ctx.resources.source(address)` 是 hook 背后的裸 observable,按地址引用稳定,供 React 之外的调用方使用;只读它的快照不算持有([生命周期](../../packages/client/resources/README.zh.md#lifecycle))。
87
+
88
+ 多数流只推元数据而不推内容。`file` 提供方的值是 `WorkspaceFileStat { absolutePath, version, bytes? }`:首帧来自 Host 的 `stat`,后续观察更新版本。消费方自己经 Workspace Files Remote 命名空间读取内容;Preview 按 tab 独立刷新([`dsh-api-workspace-files`](../../packages/api/workspace-files/README.zh.md))。`subagentchat` 提供方保留已寻址 Session 并产出其 `SessionReference`,在资源 signal 中止时释放该 reference。
89
+
90
+ ## 限制
91
+
92
+ 记录在页面存续期内保留:地址的记录在最后一个持有者离开后仍留着,不持有流也不持有值,因此内存随读过的不同地址数增长。忽略 `signal` 的提供方会一直跑到它的下一帧。失败类型是 Remote 面的 `RemoteFailure`,来源不是 Remote 调用的提供方得自己铸一个。拼错的协议或畸形的地址读作 `none`,没有别的诊断。
@@ -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/commands.md
5
- commands.md: 4705048e06796792d8e013450b72035b1f87315b
6
- commands.zh.md: f3af9f6e81745514efd1e073868292a02f90dca8
5
+ commands.md: dc6ad74da872166fbf584dcab8e1ed21878c243a
6
+ commands.zh.md: 57a60a87f78cd264acdbffa3f7514b4ac287073c
@@ -33,6 +33,8 @@ interface CommandInputDescriptor {
33
33
  ```ts type-equiv
34
34
  /** Plugin-owned command registration. */
35
35
  interface CommandDefinition {
36
+ /** Stable plugin-owned identity; absent for definitions without identity-based client behavior. */
37
+ readonly definitionId?: CommandDefinitionId
36
38
  /** Lowercase command name without the leading slash. */
37
39
  readonly name: string
38
40
  /** Human-readable summary used in discovery UI. */
@@ -97,6 +99,8 @@ Adapters receive handler-free immutable descriptors after scope resolution. `par
97
99
  ```ts type-equiv
98
100
  /** Handler-free immutable command view returned to UI adapters. */
99
101
  interface CommandDescriptor {
102
+ /** Stable plugin-owned identity; absent for definitions without identity-based client behavior. */
103
+ readonly definitionId?: CommandDefinitionId
100
104
  /** Lowercase command name without the leading slash. */
101
105
  readonly name: string
102
106
  /** Human-readable summary used in discovery UI. */
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](commands.md) | 中文
4
4
 
5
- [`dsh-commands`](../../packages/interaction/commands) 提供的用户命令注册表服务。交互式适配器用它发现插件拥有的命令,并针对确切的 agent(智能体)直接执行这些命令,而不创建模型消息。[命令 Agent Note](../../.agents/notes/implemented/feature/2026-07-19-plugin-command-registration.zh.md) 负责分发与生命周期的决策依据;[包 README](../../packages/interaction/commands/README-zh.md) 负责组合方式与限制。
5
+ [`dsh-commands`](../../packages/interaction/commands) 提供的用户命令注册表服务。交互式适配器用它发现插件拥有的命令,并针对确切的 agent(智能体)直接执行这些命令,而不创建模型消息。[命令 Agent Note](../../.agents/notes/implemented/feature/2026-07-19-plugin-command-registration.zh.md) 负责分发与生命周期的决策依据;[包 README](../../packages/interaction/commands/README.zh.md) 负责组合方式与限制。
6
6
 
7
7
  来源:[`packages/interaction/commands/src/index.ts`](../../packages/interaction/commands/src/index.ts)
8
8
 
@@ -33,6 +33,8 @@ interface CommandInputDescriptor {
33
33
  ```ts type-equiv
34
34
  /** Plugin-owned command registration. */
35
35
  interface CommandDefinition {
36
+ /** Stable plugin-owned identity; absent for definitions without identity-based client behavior. */
37
+ readonly definitionId?: CommandDefinitionId
36
38
  /** Lowercase command name without the leading slash. */
37
39
  readonly name: string
38
40
  /** Human-readable summary used in discovery UI. */
@@ -97,6 +99,8 @@ type CommandResult =
97
99
  ```ts type-equiv
98
100
  /** Handler-free immutable command view returned to UI adapters. */
99
101
  interface CommandDescriptor {
102
+ /** Stable plugin-owned identity; absent for definitions without identity-based client behavior. */
103
+ readonly definitionId?: CommandDefinitionId
100
104
  /** Lowercase command name without the leading slash. */
101
105
  readonly name: string
102
106
  /** Human-readable summary used in discovery UI. */
@@ -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/compaction.md
5
- compaction.md: b49957a5f476a02ccd12b791f287a9675073c0ae
6
- compaction.zh.md: 4b4c6845b8ff48bce019b352a811f968628cbdbf
5
+ compaction.md: 6e135025ab6095e2365e172847bc493d41c50774
6
+ compaction.zh.md: 9b82fb7a7b9e55f2aefa6d561922948fd328c8e9
@@ -8,7 +8,7 @@ Source: [`packages/compaction/compaction/src/types.ts`](../../packages/compactio
8
8
 
9
9
  ## The `compaction/*` session events
10
10
 
11
- Compaction extends [`SessionEventMap`](session.md) with three event types via declaration merging. All three are **log-only** — they record the lock, summary, selected range, shadowed event seqs, token count, and model call without joining the surface. `SurfaceEventType` is deliberately NOT extended (only message-producing events reach the model), so the summary itself rides on a separate `user/message` with `surfaceOp: { op: 'replace', start, end }` — the only surface mutation performed by summary compaction. The [Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md) owns the rationale for reusing `user/message`.
11
+ Compaction extends [`SessionEventMap`](session.md) with three event types via declaration merging. All three are **log-only** — they record the lock, summary, selected range, shadowed event seqs, token count, and model call without joining the surface. `SurfaceEventType` is deliberately NOT extended (only message-producing events reach the model), so the summary itself rides on a separate `user/message` with `surfaceOp: { op: 'replace', startSeq, endSeq }` — the only surface mutation performed by summary compaction. The [Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md) owns the rationale for reusing `user/message`.
12
12
 
13
13
  | Event | Payload | Role |
14
14
  |---|---|---|
@@ -22,6 +22,21 @@ The markers are lock time points, not an exclusive container. An unrelated idle
22
22
 
23
23
  These variants are merged inside a `declare module '@deepseek-ai/dsh-session/types'` block, so — unlike the top-level types on the other subsystem pages — they are not pasted as a drift-checked ` ```ts type-equiv ` block (the `verify-type-equiv` extractor matches only top-level declarations by name). The payload table above is the catalog entry; follow the source link for the authoritative fields.
24
24
 
25
+ <a id="image-offload"></a>
26
+ ## Image offload
27
+
28
+ `compaction-image-offload` owns the `image/offload` declaration and its pure message projection. Each target identifies a current input node and exact depth-first image occurrences. The event preserves node and message identities and carries no `surfaceOp`. The [package README](../../packages/compaction/compaction-image-offload/README.md) owns recovery policy, registration, and detached replay.
29
+
30
+ ```ts type-equiv
31
+ /** Exact input-image occurrences selected by one durable offload decision. */
32
+ interface ImageOffloadTarget {
33
+ /** Current message-producing event containing these occurrences. */
34
+ seq: SessionSeq
35
+ /** Zero-based depth-first image indexes within the immutable message. */
36
+ imageIndexes: number[]
37
+ }
38
+ ```
39
+
25
40
  ## `CompactionResult`
26
41
 
27
42
  What a successful compaction returns to its caller: the bookkeeping-event seqs, safe summary projection, shadowed range and seqs, and estimated token count.
@@ -81,7 +96,7 @@ type ManualCompactionErrorCode =
81
96
  | 'persistence'
82
97
  ```
83
98
 
84
- `changed` and `summary` leave the conversation surface unchanged but still close and persist the failed attempt in the log. `commit` may follow partial mutation; `persistence` means the in-memory bracket closed but its flush failed. Cancellation remains separate and throws the exact abort reason after required cleanup.
99
+ `changed` and `summary` close and persist the failed attempt without a summary replacement; image omissions recorded during recovery remain effective. `commit` may follow partial mutation; `persistence` means the in-memory bracket closed but its flush failed. Cancellation remains separate and throws the exact abort reason after required cleanup.
85
100
 
86
101
  Pressure compaction runs at the `agent/pre-step` waterfall before request derivation. Once pressure or canonical overflow qualifies, compaction-basic invokes optional [`ctx.toolResultPruner`](../../packages/compaction/compaction-tool-result-pruner/README.md) before range selection, remeasures through `ctx.tokenMeter`, and can advance the surface without a summary. Failed-request recovery runs through `agent/request-error` after the failed step closes and returns a retry action only when the surface replacement generation advances, even if later summary work throws after pruning; cancellation still wins. Region boundaries preserve tool-call/result pairing but not whole turns, allowing early closed steps of one oversized turn to compact. `dsh-compaction-basic` owns thresholds, retained-tail policy, overflow caps, and failure handling.
87
102
 
@@ -235,4 +250,35 @@ pruneSession(session: Session): PruneResult
235
250
  Types: [ContentBlock](llm-streaming.md) · [Session](session.md)
236
251
 
237
252
  Source: [`packages/compaction/compaction-tool-result-pruner/src/index.ts`](../../packages/compaction/compaction-tool-result-pruner/src/index.ts)
253
+
254
+ <a id="compaction-events"></a>
255
+
256
+ ### `compaction/*` events
257
+
258
+ <a id="compactionsummary-error--waterfall"></a>
259
+
260
+ #### `compaction/summary-error` — waterfall
261
+
262
+ Recover a failed summary request by synchronously recording a durable change to its selected input. Return true only after making progress; the provider re-derives and re-prices the selection before retrying. Call next() when the failure cannot be recovered. Decisions survive a later summary failure or cancellation.
263
+
264
+ ```ts cordis-catalog
265
+ /**
266
+ * Recover a failed summary request by synchronously recording a durable
267
+ * change to its selected input. Return true only after making progress;
268
+ * the provider re-derives and re-prices the selection before retrying.
269
+ * Call next() when the failure cannot be recovered. Decisions survive a
270
+ * later summary failure or cancellation.
271
+ * @param payload.session - session containing the selected input.
272
+ * @param payload.sourceEventSeqs - selected message events in request order.
273
+ * @param payload.error - failure thrown by the summarizer.
274
+ * @param payload.signal - optional compaction cancellation signal.
275
+ * @param next - delegate to the next recovery listener.
276
+ * @mode waterfall
277
+ */
278
+ 'compaction/summary-error'(payload: { session: Session; sourceEventSeqs: readonly SessionSeq[]; error: unknown; signal?: AbortSignal }, next: () => boolean): boolean
279
+ ```
280
+
281
+ Types: [Session](session.md) · [SessionSeq](session.md)
282
+
283
+ Source: [`packages/compaction/compaction/src/index.ts`](../../packages/compaction/compaction/src/index.ts)
238
284
  <!-- END GENERATED cordis-surface -->