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
@@ -1,8 +1,8 @@
1
- # Bash 执行器
1
+ # Shell 执行器
2
2
 
3
3
  [English](shell.md) | 中文
4
4
 
5
- bash 执行 seam 分为 Service Definition([dsh-shell](../../packages/shell/shell),`ctx.shell`)、Service Provider([dsh-bash-local](../../packages/shell/bash-local) [dsh-bash-sandbox](../../packages/shell/bash-sandbox))和 Consumer([dsh-tool-bash](../../packages/shell/tool-bash),即 `bash` schema)。通用后台任务的 job id、所有权与控制位于 [jobs.md](jobs.zh.md);本 seam 返回一个不含任务概念的进程句柄。原始进程组机制封装在[子进程 seam](subprocess.zh.md)之后。
5
+ shell 执行 seam [dsh-shell](../../packages/shell/shell) 在 `ctx.shell` 上提供 Service Definition。[shell 包组](../../packages/shell/README.zh.md)列出其 Bash PowerShell 提供方以及面向模型的 Consumer。通用后台任务的 id、所有权与控制位于 [jobs.md](jobs.zh.md);本 seam 返回进程句柄,不注册后台任务。managed-range 机制封装在[子进程 seam](subprocess.zh.md)之后。
6
6
 
7
7
  源码:[`packages/shell/shell/src/types.ts`](../../packages/shell/shell/src/types.ts)
8
8
 
@@ -98,7 +98,7 @@ interface ShellExecSpec {
98
98
  }
99
99
  ```
100
100
 
101
- `stdin` 和 `env` 是受信任的进程内插件输入,不由 `dsh-tool-bash` 暴露。本地执行器会先清除环境中的凭据,再合并调用方显式提供的 env。见 [bash-stdin-env Agent Note](../../.agents/notes/implemented/architecture/2026-06-30-bash-stdin-env-trusted-plugin-api.zh.md)
101
+ `stdin` 和 `env` 是受信任的进程内插件输入,不由 `dsh-tool-bash` 暴露。本地执行器会先清除环境中的凭据,再合并调用方显式提供的 env。
102
102
 
103
103
  `stdoutMaxBytes` 同样仅供受信任插件使用。它让前台消费方能在有界解析预算内请求完整 stdout,而不会改变 stderr、后台任务或面向模型的 bash 工具的常规输出上限。
104
104
 
@@ -107,11 +107,11 @@ interface ShellExecSpec {
107
107
  一次已完成(或被终止)的前台运行的结果。正交的结果**独立报告**:一个进程可以同时超时并以退出码 0 退出(因为它捕获了信号),因此 `timedOut`、`aborted`、`signal` 和 `exitCode` 各自独立为一个字段;调用方永远不会把一次被提前中断的运行误读为正常成功。
108
108
 
109
109
  ```ts type-equiv
110
- /** The outcome of one completed (or killed) foreground run. */
110
+ /** The outcome of a foreground run, including timeout during preparation. */
111
111
  interface ShellRunResult {
112
- /** Exit code; null when the process died from a signal. */
112
+ /** Exit code; null when preparation expired or the process died from a signal. */
113
113
  exitCode: number | null
114
- /** Terminating signal (e.g. 'SIGTERM'); null on normal exit. */
114
+ /** Terminating signal, or null when none was reported, including preparation expiry. */
115
115
  signal: NodeJS.Signals | null
116
116
  /**
117
117
  * True when the executor's own timeout was the FIRST cause to cut the command
@@ -140,7 +140,7 @@ interface ShellRunResult {
140
140
 
141
141
  ## 文件沙箱:`ShellSandboxInfo`
142
142
 
143
- 使用沙箱的执行器通过 `ShellExecutor.sandboxMode` 暴露其已配置的模式回退值。工具层请求 [`@deepseek-ai/dsh-sandbox-policy`](../../packages/sandbox/sandbox-policy/README-zh.md),把每个调用会话的持久 `sandbox/mode` 覆盖值与不可变 cwd 解析为 `ShellExecRequest.sandboxPolicy`;经用户批准、严格更宽松的调用只替换模式。模式/root/enforcement 词汇归 [`@deepseek-ai/dsh-sandbox` 沙箱 seam](sandbox.zh.md) 所有;模式仅管辖文件效果。
143
+ 使用沙箱的执行器通过 `ShellExecutor.sandboxMode` 暴露其已配置的模式回退值。工具层请求 [`@deepseek-ai/dsh-sandbox-policy`](../../packages/sandbox/sandbox-policy/README.zh.md),把每个调用会话的持久 `sandbox/mode` 覆盖值与不可变 cwd 解析为 `ShellExecRequest.sandboxPolicy`;经用户批准、严格更宽松的调用只替换模式。模式/root/enforcement 词汇归 [`@deepseek-ai/dsh-sandbox` 沙箱 seam](sandbox.zh.md) 所有;模式仅管辖文件效果。
144
144
 
145
145
  沙箱化运行会报告其模式、保守的拒绝分类与强制执行完整度。`runnerFailed` 标记命令运行前沙箱 runner 已失败;前台执行会抛出 `SANDBOX_UNAVAILABLE`,而已结束的后台进程只能通过其事实通道报告。
146
146
 
@@ -166,7 +166,7 @@ interface ShellSandboxInfo {
166
166
 
167
167
  ## 后台进程:`ShellProcess`
168
168
 
169
- `start()` 返回不含 id 或所有者的句柄。`dsh-tool-bash` 将它适配为 `ctx.jobs.start()` 钩子;随后由通用运行时拥有任务标识与生命周期。`done` 在进程关闭时完成且绝不被拒绝;进程结束后仍可读取,并且沙箱事实会在 `done` 完成前写入。
169
+ `start()` 在异步启动准备完成后返回句柄;取消或准备失败会在发布前拒绝调用。该句柄没有 id 或 owner。`dsh-tool-bash` 将它适配为 `ctx.jobs.start()` 钩子;随后由通用运行时拥有任务标识与生命周期。`done` 会在底层进程结算时完成且绝不 reject;subprocess 提供方的 rejection 会生成状态为 `killed` 的进程,并把不声明阶段的错误写入 stderr。进程结算后仍可读取,并且沙箱事实会在 `done` 完成前写入。
170
170
 
171
171
  ```ts type-equiv
172
172
  /**
@@ -182,7 +182,10 @@ interface ShellProcess {
182
182
  exitCode: number | null
183
183
  /** Terminating signal name, when signal-killed. */
184
184
  signal: NodeJS.Signals | null
185
- /** Resolves when the underlying process closes (never rejects — a spawn failure settles as `killed` with the error on stderr). */
185
+ /**
186
+ * Resolves when the underlying process settles (never rejects — provider
187
+ * rejection settles as `killed` with a stage-neutral error on stderr).
188
+ */
186
189
  readonly done: Promise<void>
187
190
  /** Sandbox facts, stamped once a confined process settles. */
188
191
  sandbox?: ShellSandboxInfo
@@ -193,7 +196,7 @@ interface ShellProcess {
193
196
  */
194
197
  readOutput(): ShellProcessRead
195
198
  /**
196
- * Kill the process group. Returns false when it had already finished
199
+ * Terminate the provider-managed range. Returns false when it had already finished
197
200
  * (no-op); idempotent.
198
201
  */
199
202
  kill(): boolean
@@ -218,7 +221,7 @@ interface ShellProcessRead {
218
221
 
219
222
  ## 服务
220
223
 
221
- `ShellExecutor` 拥有 `resolve`、前台 `run`、后台进程 `start` 以及 `sandboxMode` 能力事实。`dsh-bash-local` 拥有命令默认值补全、超时/中止分类、终端环境以及后台读取合并;进程组、有界收集器、spill 文件、凭据清除与 dispose(资源释放)后完全停稳归[子进程服务](subprocess.zh.md)所有。`dsh-tool-bash` 拥有面向模型的渲染,并将后台句柄适配到[通用任务运行时](jobs.zh.md)。`dsh-shell` 拥有 shell 工具共享的退出状态约定:导出的 `parseExitStatus`/`ParsedExitStatus` 是 `dsh-tool-bash` 的 `renderResult` 与 `dsh-tool-pwsh` 的 `renderPwshResult` 所追加的 `[exit code: N]` / `[killed by signal: X]` 标记的逆解析,两个工具的 `presentResult` 都用它把渲染文本拆分为 terminal 卡的输出正文与退出状态 pill。
224
+ `ShellExecutor` 拥有 `resolve`、前台 `run`、后台进程 `start` 以及 `sandboxMode` 能力事实。`dsh-bash-local` 拥有命令默认值补全、超时/中止分类、终端环境以及后台读取合并;managed-range 终止、有界收集器、spill 文件、凭据清除与 dispose(资源释放)后完全停稳归[子进程服务](subprocess.zh.md)所有。`dsh-tool-bash` 拥有面向模型的渲染,并将后台句柄适配到[通用任务运行时](jobs.zh.md)。`dsh-shell` 拥有 shell 工具共享的退出状态约定:导出的 `parseExitStatus`/`ParsedExitStatus` 是 `dsh-tool-bash` 的 `renderResult` 与 `dsh-tool-pwsh` 的 `renderPwshResult` 所追加的 `[exit code: N]` / `[killed by signal: X]` 标记的逆解析,两个工具的 `presentResult` 都用它把渲染文本拆分为 terminal 卡的输出正文与退出状态 pill。
222
225
 
223
226
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
224
227
 
@@ -237,7 +240,7 @@ Abstract bash execution service. Subclass, implement the abstract methods, and l
237
240
  Implementations must honor these semantics:
238
241
 
239
242
  - run rejects only for infrastructure failures. Nonzero exits, timeout kills, and abort kills resolve with a ShellRunResult.
240
- - start returns immediately; no timeout applies to background processes. `done` settles at process close and never rejects; spawn failures settle as `killed` with the error on stderr.
243
+ - start resolves after launch preparation; cancellation or setup failure rejects before publishing a handle. No timeout applies to background processes. Once published, `done` settles at process close and never rejects; subprocess provider failures settle as `killed` with the error on stderr.
241
244
  - ShellProcess.readOutput is incremental: consecutive reads never repeat output. Lossy reads report truncation and available spill files.
242
245
  - A still-running background process is stopped and awaited when its owning composition tears down. With the subprocess seam that boundary is `ctx.subprocess` disposal, so a background process survives an executor-only reload.
243
246
 
@@ -251,19 +254,20 @@ Implementations must honor these semantics:
251
254
  abstract resolve(request: ShellExecRequest): ShellExecSpec
252
255
 
253
256
  /**
254
- * Run a command in the foreground; resolves when it finishes.
257
+ * Run preparation and the foreground command under the resolved timeout.
255
258
  * @param spec - a resolved spec from {@link resolve}, never a raw request.
256
259
  * @returns the outcome; nonzero exits, timeout kills, and abort kills
257
260
  * resolve with a descriptive result rather than reject.
261
+ * @throws on preparation failure or caller cancellation before process publication.
258
262
  */
259
263
  abstract run(spec: ShellExecSpec): Promise<ShellRunResult>
260
264
 
261
265
  /**
262
- * Start a background process and return its handle immediately.
266
+ * Prepare a background process asynchronously and publish its live handle.
263
267
  * @param spec - a resolved spec from {@link resolve}, never a raw request.
264
- * @returns the live process handle (reads, kill, quiescence promise).
268
+ * @returns the live process handle after preparation; cancellation or setup failure rejects.
265
269
  */
266
- abstract start(spec: ShellExecSpec): ShellProcess
270
+ abstract start(spec: ShellExecSpec): Promise<ShellProcess>
267
271
  ```
268
272
 
269
273
  Source: [`packages/shell/shell/src/index.ts`](../../packages/shell/shell/src/index.ts)
@@ -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/sidebar-right.md
5
+ sidebar-right.md: a6478e10f19bc11f2a8bfa89d6213a85ffd76ffc
6
+ sidebar-right.zh.md: af23b93945ce714cf4f0485752d8e07f155055c2
@@ -0,0 +1,153 @@
1
+ # Right Sidebar
2
+
3
+ English | [中文](sidebar-right.zh.md)
4
+
5
+ The right Sidebar is the Web Client's per-Session docking surface: a column of panes and tabs beside the conversation in which addressed content — a workspace file, a directory tree, the product's own pages — opens, splits, floats, and closes. [`dsh-client-ui-sidebar-right`](../../packages/client/ui-sidebar-right/README.md) owns the surface, the tab-type registry, and the navigation service; [`dsh-client-ui-dockkit`](../../packages/client/ui-dockkit/README.md) is its internal layout engine; [`dsh-client-resources`](../../packages/client/resources/README.md) turns addresses into live values for any component; [`dsh-api-workspace-files`](../../packages/api/workspace-files/README.md) provides both the Host workspace service and the Client `file` resource provider.
6
+
7
+ This page is the reference for the subsystem's contracts: addresses, tab-type registration, the navigation service, the extension slots and their owner props, the resource model, the Workspace Files service, the shipped types, and what is deliberately not built. How the layout engine, the frame, and the surface fit together is in the [Agent Note](../../.agents/notes/implemented/feature/2026-09-04-right-sidebar-docking-infrastructure.md); slot mechanics are in the [Slots reference](slots.md).
8
+
9
+ ## Position and ownership
10
+
11
+ One docking surface exists per Session, held in a session-scoped slot store and drawn by `rightbar.session`. The root-scoped `rightbar` controller mounts that seat only while Conversation is selected; a reload returns every session to the collapsed default, and switching sessions keeps each surface where it was ([state](../../packages/client/ui-sidebar-right/README.md#state)). The surface's every change is one recorded history entry computed by the kit's pure planners; a docked pane never stays empty, and an empty root pane receives the default page selected from registered guide entries.
12
+
13
+ A tab type is two registrations that share the definition's `id`: a static definition in `ctx.sidebarRightTabs` saying which addresses its `kind` opens, and a keyed slot registration supplying its body. The framework injects `useTabInfo()` for live Sidebar, pane and tab information; each type keeps its own state in its slot store. Packages import each other's declarations only as types.
14
+
15
+ | Package | Role |
16
+ |---|---|
17
+ | [`client/ui-sidebar-right`](../../packages/client/ui-sidebar-right/README.md) | The panel and rail seats, the layout store, `ctx.sidebarRightTabs`, `ctx.sidebarRight`, the Tab domain, the guide type |
18
+ | [`client/ui-dockkit`](../../packages/client/ui-dockkit/README.md) | Pure layout engine and React surface; an internal dependency of `ui-sidebar-right`, not a stable interface |
19
+ | [`client/resources`](../../packages/client/resources/README.md) | `ctx.resources`, `useResource`, the protocol → value roster `ResourceProtocolMap` |
20
+ | [`api/workspace-files`](../../packages/api/workspace-files/README.md) | Host `ctx.workspaceFiles`, the `workspaceFiles` Remote namespace, and the Client `file` resource provider |
21
+ | [`util/workspace-path`](../../packages/util/workspace-path/README.md) | The file address grammar: `fileAddressFor`, `parseFileAddress` |
22
+ | [`client/ui-sidebar-documentpreview`](../../packages/client/ui-sidebar-documentpreview/README.md), [`client/ui-sidebar-files`](../../packages/client/ui-sidebar-files/README.md), [`client/ui-sidebar-browser`](../../packages/client/ui-sidebar-browser/README.md) | The shipped `text`, `files`, and `browser` types |
23
+
24
+ ## Addresses
25
+
26
+ Every tab is opened by an address string, and the address is the tab's content identity. Two families exist.
27
+
28
+ A **resource address** is a `dsh-resource://<type>/…` URL. The host names the resource protocol — the key of `ResourceProtocolMap` — and everything after it is the protocol's own path; one scheme serves every protocol, so adding a protocol adds a host, never a scheme. The `file` protocol's path opens with its scope: `session/<sessionId>` followed by the path relative to that session's workspace root (`dsh-resource://file/session/abc/src/notes.txt`), or `absolute` followed by the absolute path with its leading `/` dropped (`dsh-resource://file/absolute/home/ys/notes.txt`, `dsh-resource://file/absolute/C:/x/y.txt` on Windows). Every id and path segment is component-encoded, with `:` kept literal for drive letters. `fileAddressFor(sessionId, cwd, path)` builds one — a relative path or an absolute path inside the workspace becomes `session`-relative, any other absolute path becomes `absolute` — and `parseFileAddress(address)` reads it back or returns `undefined` ([grammar](../../packages/util/workspace-path/README.md)).
29
+
30
+ A **page address** is what the Sidebar records for a tab opened by kind rather than by resource: `sidebar://<kind>`, written by the Sidebar itself when `openTab(kind)` runs. Callers never build one — the guide and the file tree are opened as `openTab('guide')` and `openTab('files')` — and no other navigation address exists ([not built](#not-built)).
31
+
32
+ Tab identity is the pair `(kind, address)`: the registry's claim uses the address verbatim as the record's `contentId`, so opening the same address through the same type finds the existing tab, and the same address through two types is two tabs.
33
+
34
+ ## Tab-type registration
35
+
36
+ `ctx.sidebarRightTabs.register(definition)` registers one implementation of a type for the caller's lifetime and returns the disposer; the caller holds it inside its own `ctx.effect`, so an implementation lives exactly as long as the plugin that contributed it, and a second registration of the same `id` throws ([extension seats](../../packages/client/ui-sidebar-right/README.md#extension-seats)). The definition is static: no runtime hook, nothing per tab or per session.
37
+
38
+ | Field | Meaning |
39
+ |---|---|
40
+ | `id` | The implementation's identity, unique across every registration; a package name is the natural value (`@deepseek-ai/dsh-client-ui-sidebar-files`). It is the key the body and title register under. |
41
+ | `kind` | The type's discriminator: what its tabs are, and what `openTab` names. Not unique — an extension may take over a builtin's kind. The shipped kinds are `guide`, `text`, `files`. |
42
+ | `patterns` | Optional resource-address globs the type recognizes; a page type opened by kind omits them. A pattern containing `:` matches the whole address (`dsh-resource://file/**`); one without matches the URL's path at any depth (`*.md`), and an address that is not a URL matches no such pattern. Matching is case-insensitive and does not hide dotfiles; the syntax is picomatch's POSIX dialect. |
43
+ | `priority` | One of three literal bands: `extension` (the default and the highest: a type from outside the product outranks every shipped viewer), `builtin` (types shipped with the product), `fallback` (plain-content viewers anything more specific should beat). |
44
+ | `canOpen(address)` | Optional synchronous veto of a glob match; it runs on every routing decision. |
45
+ | `title(address)` | The chip's text, captured into the layout record when the tab opens and never rewritten. |
46
+ | `guide` | Optional entry boxes for the guide page: `{ order, title(), description?(), icon? }`. Picking a box opens the contributing type as a page; omit to stay off the page. |
47
+
48
+ Routing is a ranked claim. `candidates(address)` ranks the types whose patterns match and whose `canOpen` does not veto: by band, then by the length of the longest matched pattern, then by registration order. `claim(address, kind?)` picks the first candidate, or the named `kind` outright — its globs are skipped, its `canOpen` still applies — and returns `{ kind, contentId: address, title }`. An address no type claims throws: it is a wiring mistake, not a user error.
49
+
50
+ One `kind` may carry one `builtin` and one `extension` registration at the same time. The extension is the one in force for claims, `get(kind)`, `openTab(kind)`, and the guide page, and the seat finds a tab's body and title under the definition in force's `id`, so no slot priority is involved; when the extension unregisters, the builtin resumes. Every other collision on a kind, and every duplicate `id`, throws.
51
+
52
+ ```ts ignore-check
53
+ import type { Context } from '@deepseek-ai/cordis'
54
+ import type {} from '@deepseek-ai/dsh-client-ui-sidebar-right/client'
55
+
56
+ export const inject = ['sidebarRightTabs', 'slots']
57
+
58
+ export function apply(ctx: Context): void {
59
+ ctx.effect(() => ctx.sidebarRightTabs.register({
60
+ id: '@acme/dsh-client-ui-image',
61
+ kind: 'image',
62
+ patterns: ['*.png', '*.jpg', '*.gif', '*.svg'],
63
+ canOpen: address => address.startsWith('dsh-resource://file/'),
64
+ title: address => address.slice(address.lastIndexOf('/') + 1),
65
+ }), 'image type')
66
+ ctx.effect(() => ctx.slots.inject('sidebar.right.pane.tab', () => ctx.slots.register(
67
+ { name: 'sidebar.right.pane.tab', key: '@acme/dsh-client-ui-image' },
68
+ ImageBody,
69
+ )), 'image body')
70
+ }
71
+ ```
72
+
73
+ ## Navigation: `ctx.sidebarRight`
74
+
75
+ Two opens are the navigation controller, and every way into the column calls one of them: `openResource(address, options?)` for a `dsh-resource://` address — the conversation's file links, a tool row's line reference, a file tree's rows — and `openTab(kind, options?)` for a page — the strip's add control, a guide entry box, or an HTTP(S) link in Assistant Markdown. Both run four steps as one history entry — claim (the registry ranks the resource's types, or the named `kind`'s implementation in force answers); focus a tab already showing the same `(kind, address)`; otherwise seat a new tab; expand the column — and then record the navigation in the Tab domain ([service](../../packages/client/ui-sidebar-right/README.md#ctxsidebarright)). Content the user cannot see is not opened, so a collapsed column expands in the same step. `openResource` throws for an address outside `dsh-resource://` or one no type claims; `openTab` throws for a kind nothing registered: both are wiring mistakes, not user errors.
76
+
77
+ | Option | Meaning |
78
+ |---|---|
79
+ | `paneId` | Land a new tab in this pane; default is the active docked pane (the first docked pane while a floating pane is active). |
80
+ | `replaceTab` | Take this tab's pane and strip slot, closing it in the same step; a floating tab lends no place, so the new tab lands as if unplaced. |
81
+ | `revealIfOpened` | Default `true`: a tab already showing the same `(kind, address)` is focused and handed `params`. `false` opens another tab regardless. |
82
+ | `preferNewPane` | Prefer a new docked pane under the normal pane budget and room rule; fall back to the target pane when it cannot split. Ignored with `replaceTab`. |
83
+ | `kind` (`openResource` only) | Name the opening type instead of ranking claims; its implementation in force opens the address, and its `canOpen` still applies. |
84
+ | `params` | Navigation parameters for the body, delivered as `navigation.params`. `openResource` types them by resource type through the merge-extensible `SidebarRightResourceParamsMap` (the text preview declares `{ line?: number }`); `openTab<K>` types them by kind through `SidebarRightTabParamsMap`, `undefined` for a kind that declares none; a body reads `SidebarRightNavigationParams`, the union of both. Values are JSON-shaped by convention and not validated at run time. |
85
+
86
+ Placement is the caller's option, never a type's property. The conversation calls `openResource(fileAddressFor(sessionId, cwd, path))` and, from a `read` tool row, adds `{ params: { line } }` from the call's 1-based `offset`; a guide entry box calls `tab.actions.openTab(entry.kind, { replaceTab: true })`; a file-tree row calls `tab.actions.openResource(address)`; the strip's add control calls `openTab('guide', { paneId, revealIfOpened: false })`.
87
+
88
+ `close(tabId)` closes a tab; `active()` returns the active pane's active tab; `isExpanded()` and `toggleExpanded()` read and flip the column, the flip recorded in the sequence. Reads answer for the no-Session case with `undefined` or `false`; writes need a mounted Session surface and throw without one rather than write into a surface nobody draws.
89
+
90
+ `focus(tabId)` makes a tab its pane's active tab; `split(paneId?)` splits the active docked pane, or the named one, and returns the new pane's id — or `undefined`, recording nothing, when the pane budget or the column's width forbids a split; `float(tabId, rect?)` lifts a tab into a floating pane; `dock(paneId)` returns a floating pane to the docked area. All four run the store's existing actions and record one history entry each; a target that does not exist or is already in the requested state is a no-op, and like `open` they throw without a mounted Session surface. `TabId`, `PaneId`, `TabRecord`, and `FloatRect` are re-exported from the package's `/client` entry so a caller needs no dockkit import.
91
+
92
+ ## Slots and owner props
93
+
94
+ The Sidebar declares four extension slots; its document tab declares the additional keyed document body below ([hierarchy](slots.md)).
95
+
96
+ | Slot | Cardinality | Purpose |
97
+ |---|---|---|
98
+ | `sidebar.right.pane.tab` | keyed by the definition's `id`, Session scope | One tab's body. The seat dispatches a tab to the `id` of its kind's implementation in force, so the registrant receives every tab of its kind, docked or floating. A kind whose implementation registered no body renders the owner's "nothing can view this" notice. |
99
+ | `sidebar.right.pane.tab.title` | keyed by the definition's `id`, Session scope | The chip's title, with the same owner share as the body. Optional: without an entry the chip shows the `title(address)` text captured at open time; a type with a live title reads its own store here. |
100
+ | `sidebar.right.tab.guide` | chain, Session scope | Replaces the guide tab's contents without replacing the tab; the first non-declining entry takes the body, otherwise the shipped guide renders. |
101
+ | `sidebar.right.tab.menu.item` | list, Session scope | Content-level actions appended after the kit's own layout actions. An item that acts must call the owner's `dismiss()`. |
102
+ | `sidebar.right.tab.document` | keyed by the document implementation's `id`, Session scope | The selected file renderer inside the document tab; the parent owns shared loading and toolbar controls. |
103
+
104
+ A body, title and guide replacement receive the framework-injected `useTabInfo()`. It returns `{ sidebar, panel, tab }`: `sidebar` holds `expanded` and `fullscreen`, `panel.id` names the containing pane, and `tab` contains its record fields plus `visible`, `navigation`, `signal`, and `actions`. Docked bodies are visible only while expanded and active; docked titles need only expansion; floats stay visible. `signal` aborts when the record disappears or the plugin unloads, not on hiding or Session switching. `tab.actions` provides `openResource`, `openTab`, and `close`, bound to the tab's own Session. Open placement defaults to its current pane; `revealIfOpened` defaults to `true`, and `replaceTab: true` replaces this record in the same history entry. Menu entries retain plain `tab` and `dismiss` owner parameters.
105
+
106
+ `navigation.revision` increments on every navigation to the tab whether or not `params` changed, so a body can act on "navigated again" alone; it is `1` for a tab opened by address and `0` for a record nobody opened by address — a seeded guide, or a tab restored by undo. The Tab domain holds one occurrence per open record: a record that appears is pinned in the resource model, so switching tabs unmounts a body without dropping its content; a record that vanishes is aborted and dropped; a record restored by undo is a new occurrence ([Tab domain](../../packages/client/ui-sidebar-right/README.md#the-tab-domain)).
107
+
108
+ ## Document renderers
109
+
110
+ The `text` tab is the shared Document Preview owner. Its [root registration](../../packages/client/ui-sidebar-documentpreview/src/client/index.ts) declares `sidebar.right.tab.document` and provides `ctx.documentPreviews`. A renderer registers `DocumentPreviewDefinition` metadata in its own effect, then waits through `ctx.slots.inject('sidebar.right.tab.document', ...)` and registers its component with `key: definition.id` and its locale namespace. A renderer registers its own body and can reuse shared presentation through its child slots. Changing the renderer does not change the tab or resource address; the [extension decision](../../.agents/notes/implemented/architecture/2026-09-08-document-preview-operations.md) separates preview policy from resource ownership.
111
+
112
+ The [registry](../../packages/client/ui-sidebar-documentpreview/src/client/document/registry.ts) records unique `id`, `extensions`, localized `title()`, `loading`, optional `priority`, and optional `wrap`. Case-insensitive suffix matching ranks `extension` (the default) before `builtin`, then longer suffixes before shorter ones, then registration order. Unlike tab-kind replacement, the registry keeps all implementations available; the toolbar lists matching alternatives and remembers the selection per tab. Unknown extensions use plain text. Suffixes declared in `binaryExtensions` suppress the plain-text alternative, as described in the [package README](../../packages/client/ui-sidebar-documentpreview/README.md#what-it-registers). `loading` is `text-pages`, `bytes-complete`, or `renderer`; `wrap` advertises support for the shared source-wrap control.
113
+
114
+ [`DocumentPreviewProps`](../../packages/client/ui-sidebar-documentpreview/src/client/document/contract.ts) derives from `PropsRuntime<'sidebar.right.tab.document'>`. The owner supplies the original `resourceAddress`, `content`, and current `wrap`: text content is `{ kind: 'text', text, pages: [{ offset, text, lines }], eof }`, with cumulative `text`; complete bytes are `{ kind: 'bytes', data }`, with `Uint8Array<ArrayBuffer>` data. These transient buffers are borrowed read-only and must not enter durable layout or Session JSON. PDF copies the bytes before Worker transfer, preserving the owner's buffer. The child receives the same framework-bound `useTabInfo` and the global metadata-only `useResource`. The parent reads through ordinary inject callbacks to `remote.workspaceFiles.read`/`readAll` and owns page appends, per-tab refresh, and loading status. HTML's own inject callback uses `readRelated`; Host code resolves paths. Markdown and code retain one incremental renderer across appends and settle at EOF; HTML and PDF receive complete bytes.
115
+
116
+ Preview records its loaded version and the version observed when a read starts. Refresh rereads only that tab, without changing shared metadata or another tab's content. Reads are non-transactional; versions are opaque equality tokens, not ordered timestamps ([resource observation and Preview RPC](../../.agents/notes/implemented/architecture/2026-09-08-document-preview-operations.md)).
117
+
118
+ A renderer that owns loading receives `{ kind: 'renderer', revision, loaded, reload }` instead of file bytes. The body loads through its own injected callbacks, cancels on revision changes and unmount, and reports its displayed source version through `loaded(version)`. The parent ignores stale reports and retains the shared reload and source-change controls. Office uses this mode to request [Host-rendered PDFs](office-to-pdf.md); its own store and bounded cache retain converted bytes, and its body owns font notices above a nested PDF view. The [package README](../../packages/client/ui-sidebar-documentpreview/README.md#what-it-registers) defines the loading lifecycle.
119
+
120
+ ## Resource model
121
+
122
+ The model is documented in [Client Resources](client-resources.md); this section states what the Sidebar relies on. A resource is one address, and a resource address is a `dsh-resource://<type>/…` URL whose lower-cased host is the protocol key. The protocol's owning client package registers one provider with `ctx.resources.register(provider)` for its own lifetime; a second provider for the same protocol throws ([provide a protocol](../../packages/client/resources/README.md#provide-a-protocol)). A provider is `{ protocol, open(address, { signal }) }`: `open` yields `RemoteResult` frames — the current state first, one frame per later change — and stops when `signal` aborts; a failure is an `{ ok: false, error }` frame, never a throw, and a throw inside the stream is a programming error the model does not catch.
123
+
124
+ `useResource<P>(address)` is a global standard prop on every slot component, whatever its scope. It returns `{ status, value, failure }`: `none` when the address's protocol has no provider or the address is not a resource address (`sidebar://guide` names no resource), `loading` until the first frame, `live` with the latest `ok` value, `failed` with the latest frame's failure beside the last value. ([read a resource](../../packages/client/resources/README.md#read-a-resource)).
125
+
126
+ A resource stays open while it has a holder — a subscribed `useResource` or a `ctx.resources.pin(address, signal)`; the first holder opens the provider's stream, later holders share it and read the latest value at once, and the last release aborts the stream and discards the value. Streams carry metadata, not content: the `file` value is `{ absolutePath, version, bytes? }`, and a consumer reads file text itself, by page, through the Workspace Files service ([lifecycle](../../packages/client/resources/README.md#lifecycle)).
127
+
128
+ ## Workspace Files
129
+
130
+ The Host `ctx.workspaceFiles` service and generated `workspaceFiles` Remote namespace read files allowed by the Session filesystem backend: `stat(path)` returns `{ absolutePath, version, bytes? }`; `read(path, { offset?, limit? })` returns one page of lines (`offset` 1-based, `limit` capped by the configured page size) as `{ …stat, offset, text, eof }`; `readBytes(path, { offset?, length? })` returns one raw byte window (`offset` 0-based, `length` capped by the configured byte limit) as base64 `{ …stat, offset, data, eof }` with no text decoding. `list(path)` remains inside the workspace root and returns a directory's direct children (`name`, `type: 'file' | 'directory' | 'other'`, `size?`) cut to the configured cap with `truncated` set. `changes()` likewise remains workspace-scoped and yields `{ kind: 'ready' }` once subscribed, then `{ kind: 'change', change }` frames whose payload is `{ absolutePath, version }` or `{ absolutePath, absent: true }` ([README](../../packages/api/workspace-files/README.md#use-this-package)). File operations reject final symlinks and enforce transfer caps; `read` additionally requires UTF-8 text. Failures use `workspace-file/*` codes ([failures](../../packages/api/workspace-files/README.md)).
131
+
132
+ [`dsh-api-workspace-files`](../../packages/api/workspace-files/README.md) registers the `file` provider, with `ResourceProtocolMap.file` directly naming `WorkspaceFileStat`. A Session address carries the authorizing Session and a relative or absolute path, passed unchanged to the Host for resolution. The provider waits for Host `ready` before stat and filters changes by `stat.absolutePath`. Bare `absolute` addresses have no authorizing Session and fail with `workspace-file/unknown-workspace`, without borrowing current or Tab Session. Any UI, including Global components, shares the observation for the same complete address. Preview's ordinary Remote callbacks use the Session in that address; Host `readAll` and `readRelated` remain, and Preview's `rpc.ts` decodes byte results.
133
+
134
+ ## Shipped types
135
+
136
+ - **`guide`** — `builtin`, opened as `openTab('guide')`. A muted compass sits above one capsule per contributed `guide` entry, in `order`; short lists show registered descriptions, and every missing icon uses the shipped placeholder. Picking a capsule opens the contributing type as a page in the guide tab's place. A pane holds at most one guide tab, and the strip's add control appears only while its pane has none. A new pane receives the registered default page: the sole guide entry directly, or the guide when the entry count is not one ([guide](../../packages/client/ui-sidebar-right/README.md#the-guide)).
137
+ - **`text`** — `fallback`, `dsh-resource://file/**`, claiming Session addresses only. Document Preview observes metadata through `useResource<'file'>`, loads content through Remote callbacks, and owns renderer selection, the toolbar, per-tab refresh, scroll, and source navigation; unknown extensions render as plain text ([README](../../packages/client/ui-sidebar-documentpreview/README.md)).
138
+ - **`files`** — `builtin`, opened as `openTab('files')`. The workspace directory tree, listed lazily through `list`, opening a file with `tab.actions.openResource(fileAddressFor(sessionId, root, path))` into its own pane ([README](../../packages/client/ui-sidebar-files/README.md)).
139
+ - **`browser`** — multi-instance `builtin`, opened as `openTab('browser', { params: { url? } })`. Assistant Markdown delegates HTTP(S) links to this page type. It accepts public and loopback HTTP(S) targets under the default sandbox, rejects local files in favor of Document Preview, and uses application-known iframe history ([README](../../packages/client/ui-sidebar-browser/README.md)).
140
+ - **`subagentchat`** — `builtin`, `dsh-resource://subagentchat/session/<child>?parent=<parent>&mode=<mode>`. An explicitly addressed subagent Conversation retained by the resource provider and rendered through the shared Conversation Factory ([README](../../packages/client/ui-subagent/README.md)).
141
+
142
+ <a id="not-built"></a>
143
+ ## Not built
144
+
145
+ - Persistence: layout state is memory-only; a reload starts every session collapsed, and no session's tabs are visible from another.
146
+ - A read-only layout snapshot or subscription on `ctx.sidebarRight`: the service exposes operations only, and dockkit's `LayoutState`/`LayoutOp` are internal.
147
+ - A capability-discovery array (`features`) on the service.
148
+ - An `option` priority band for tab types: nothing lists a tab type without letting it claim.
149
+ - Retitling a record: `title(address)` is captured once; a live chip comes from the title slot, not from the record.
150
+ - Naming a tab implementation when opening: `openResource` names a kind at most; document-renderer selection belongs to the file tab's toolbar.
151
+ - An address lookup on the service (`find`): a caller opens with `revealIfOpened` and lets the surface de-duplicate.
152
+ - Navigation addresses beyond the Sidebar's own `sidebar://<kind>` bookkeeping; their grammar waits for the navigation controller as a whole.
153
+ - A user-facing undo and general cross-type content navigation stack ([deferred](../../.agents/notes/implemented/feature/2026-09-04-right-sidebar-docking-infrastructure.md#deferred)); Browser owns only its own page history.
@@ -0,0 +1,153 @@
1
+ # 右侧 Sidebar
2
+
3
+ [English](sidebar-right.md) | 中文
4
+
5
+ 右侧 Sidebar 是 Web Client 里每个会话一份的停靠面:会话区旁的一列 pane 与 tab,按地址寻址的内容——工作区文件、目录树、产品自带页面——在这里打开、分栏、浮出、关闭。[`dsh-client-ui-sidebar-right`](../../packages/client/ui-sidebar-right/README.zh.md) 拥有这个面、tab 类型注册表与导航服务;[`dsh-client-ui-dockkit`](../../packages/client/ui-dockkit/README.zh.md) 是它内部的布局引擎;[`dsh-client-resources`](../../packages/client/resources/README.zh.md) 把地址变成任何组件都能读的活数据;[`dsh-api-workspace-files`](../../packages/api/workspace-files/README.zh.md) 同时提供 Host 工作区文件服务与 Client `file` 资源提供者。
6
+
7
+ 本页是该子系统契约的参考:地址、tab 类型注册、导航服务、扩展 slot 与其 owner props、资源模型、Workspace Files 服务、内置类型,以及明确不做的事。布局引擎、frame 与停靠面如何拼在一起见 [Agent Note](../../.agents/notes/implemented/feature/2026-09-04-right-sidebar-docking-infrastructure.zh.md);slot 机制见 [Slots 参考](slots.zh.md)。
8
+
9
+ ## 定位与归属
10
+
11
+ 每个会话恰有一个停靠面,保存在会话作用域的 slot store 里、由 `rightbar.session` 绘制。root 作用域的 `rightbar` 控制器仅在选中 Conversation 时挂载该席位;刷新页面后每个会话回到折叠的默认态,切换会话时各自的面保持原状([状态](../../packages/client/ui-sidebar-right/README.zh.md#state))。面的每一次变化都是 kit 纯规划器算出的一条历史记录;停靠的 pane 从不空着,根 pane 为空时会加入根据已注册引导入口选出的默认页。
12
+
13
+ 一个 tab 类型是共用定义 `id` 的两次注册:在 `ctx.sidebarRightTabs` 里的静态定义说明其 `kind` 打开哪些地址,一次 keyed slot 注册提供它的正文。框架注入 `useTabInfo()` 以读取 Sidebar、窗格和标签的实时信息;各类型把自身状态放在 slot store 里。各包之间只以类型形式引用彼此的声明。
14
+
15
+ | 包 | 职责 |
16
+ |---|---|
17
+ | [`client/ui-sidebar-right`](../../packages/client/ui-sidebar-right/README.zh.md) | 面板与栏席位、布局 store、`ctx.sidebarRightTabs`、`ctx.sidebarRight`、Tab 域、引导类型 |
18
+ | [`client/ui-dockkit`](../../packages/client/ui-dockkit/README.zh.md) | 纯布局引擎与 React 面;`ui-sidebar-right` 的内部依赖,不是稳定接口 |
19
+ | [`client/resources`](../../packages/client/resources/README.zh.md) | `ctx.resources`、`useResource`、协议 → 值类型的花名册 `ResourceProtocolMap` |
20
+ | [`api/workspace-files`](../../packages/api/workspace-files/README.zh.md) | Host `ctx.workspaceFiles`、`workspaceFiles` Remote 命名空间与 Client `file` 资源提供者 |
21
+ | [`util/workspace-path`](../../packages/util/workspace-path/README.zh.md) | 文件地址语法:`fileAddressFor`、`parseFileAddress` |
22
+ | [`client/ui-sidebar-documentpreview`](../../packages/client/ui-sidebar-documentpreview/README.zh.md)、[`client/ui-sidebar-files`](../../packages/client/ui-sidebar-files/README.zh.md)、[`client/ui-sidebar-browser`](../../packages/client/ui-sidebar-browser/README.zh.md) | 内置的 `text`、`files` 与 `browser` 类型 |
23
+
24
+ ## 地址
25
+
26
+ 每个 tab 都由一个地址字串打开,地址就是 tab 的内容身份。地址分两族。
27
+
28
+ **资源地址**是 `dsh-resource://<type>/…` 形式的 URL。host 命名资源协议——即 `ResourceProtocolMap` 的键——其后是该协议自己的路径;所有协议共用一个 scheme,新增协议只新增 host、不新增 scheme。`file` 协议的路径以其作用域开头:`session/<sessionId>` 后接相对该会话工作区根的路径(`dsh-resource://file/session/abc/src/notes.txt`),或 `absolute` 后接去掉前导 `/` 的绝对路径(`dsh-resource://file/absolute/home/ys/notes.txt`,Windows 上为 `dsh-resource://file/absolute/C:/x/y.txt`)。id 与每一段路径都做组件编码,盘符的 `:` 保留原样。`fileAddressFor(sessionId, cwd, path)` 构造地址——相对路径或工作区内的绝对路径成为 `session` 相对地址,其他绝对路径成为 `absolute` 地址——`parseFileAddress(address)` 读回各部分或返回 `undefined`([语法](../../packages/util/workspace-path/README.zh.md))。
29
+
30
+ **页面地址**是 Sidebar 为按 kind(而非按资源)打开的 tab 记下的地址:`sidebar://<kind>`,由 Sidebar 自己在 `openTab(kind)` 运行时写入。调用方从不拼它——引导页与文件树以 `openTab('guide')`、`openTab('files')` 打开——此外不存在任何导航地址([不做](#not-built))。
31
+
32
+ tab 身份是 `(kind, address)` 二元组:注册表的认领把地址原文用作记录的 `contentId`,因此同一地址经同一类型再次打开会找到已有 tab,同一地址经两个类型打开则是两个 tab。
33
+
34
+ ## Tab 类型注册
35
+
36
+ `ctx.sidebarRightTabs.register(definition)` 在调用方的生命周期内注册一个类型的一份实现并返回注销器;调用方把它放在自己的 `ctx.effect` 里,因此实现与贡献它的插件同寿,同一 `id` 的第二次注册抛错([扩展席位](../../packages/client/ui-sidebar-right/README.zh.md#extension-seats))。定义是静态的:没有运行时 hook,没有按 tab 或按会话的东西。
37
+
38
+ | 字段 | 含义 |
39
+ |---|---|
40
+ | `id` | 该实现的身份,在所有注册中唯一;包名是自然取值(`@deepseek-ai/dsh-client-ui-sidebar-files`)。正文与标题坑位按它注册。 |
41
+ | `kind` | 类型的判别名:它的 tab 是什么,也是 `openTab` 点名的对象。不唯一——extension 可以接管 builtin 的 kind。内置 kind 为 `guide`、`text`、`files`。 |
42
+ | `patterns` | 可选的资源地址 glob;按 kind 打开的页面类型省略。含 `:` 的模式匹配整个地址(`dsh-resource://file/**`);不含的匹配 URL 的路径部分且任意深度都中(`*.md`),不是 URL 的地址不会命中此类模式。匹配不分大小写、不隐藏 dotfile;语法为 picomatch 的 POSIX 方言。 |
43
+ | `priority` | 三档字面量之一:`extension`(缺省且最高:产品之外的类型压过所有内置查看器)、`builtin`(随产品发布的类型)、`fallback`(任何更具体的类型都应压过的纯内容查看器)。 |
44
+ | `canOpen(address)` | 可选的同步否决,对 glob 命中生效;每次路由决策都会调用。 |
45
+ | `title(address)` | chip 文本,在 tab 打开时捕获进布局记录,之后不再改写。 |
46
+ | `guide` | 可选的引导页入口框:`{ order, title(), description?(), icon? }`。点一框即把贡献它的类型作为页面打开;省略即不上引导页。 |
47
+
48
+ 路由是一次排序认领。`candidates(address)` 对模式命中且未被 `canOpen` 否决的类型排序:先按档,再按最长命中模式的长度,最后按注册顺序。`claim(address, kind?)` 取第一个候选,或直接用点名的 `kind`——跳过它的 glob,但 `canOpen` 仍生效——返回 `{ kind, contentId: address, title }`。没有任何类型认领的地址会抛错:这是接线错误,不是用户错误。
49
+
50
+ 同一个 `kind` 可同时携带一个 `builtin` 与一个 `extension` 注册。extension 在认领、`get(kind)`、`openTab(kind)` 与引导页上生效,席位按生效定义的 `id` 找 tab 的正文与标题,不涉及任何 slot 优先级;extension 注销后 builtin 恢复。kind 上的其它任何撞名以及任何重复的 `id` 都抛错。
51
+
52
+ ```ts ignore-check
53
+ import type { Context } from '@deepseek-ai/cordis'
54
+ import type {} from '@deepseek-ai/dsh-client-ui-sidebar-right/client'
55
+
56
+ export const inject = ['sidebarRightTabs', 'slots']
57
+
58
+ export function apply(ctx: Context): void {
59
+ ctx.effect(() => ctx.sidebarRightTabs.register({
60
+ id: '@acme/dsh-client-ui-image',
61
+ kind: 'image',
62
+ patterns: ['*.png', '*.jpg', '*.gif', '*.svg'],
63
+ canOpen: address => address.startsWith('dsh-resource://file/'),
64
+ title: address => address.slice(address.lastIndexOf('/') + 1),
65
+ }), 'image type')
66
+ ctx.effect(() => ctx.slots.inject('sidebar.right.pane.tab', () => ctx.slots.register(
67
+ { name: 'sidebar.right.pane.tab', key: '@acme/dsh-client-ui-image' },
68
+ ImageBody,
69
+ )), 'image body')
70
+ }
71
+ ```
72
+
73
+ ## 导航:`ctx.sidebarRight`
74
+
75
+ 两种打开构成导航控制器,进入这一列的每条路都调用其一:`openResource(address, options?)` 打开 `dsh-resource://` 地址——会话区的文件链接、工具行的行号引用、文件树的行;`openTab(kind, options?)` 打开页面——tab 条的新增控件、引导页入口框或 Assistant Markdown 中的 HTTP(S) 链接。两者都以一条历史记录走完四步——认领(注册表为资源排候选,或点名 `kind` 的生效实现应答);聚焦已显示同一 `(kind, address)` 的 tab;否则落一个新 tab;展开这一列——然后把导航记入 Tab 域([服务](../../packages/client/ui-sidebar-right/README.zh.md#ctxsidebarright))。用户看不见的内容不算打开,所以折叠的列会在同一步展开。`openResource` 对 `dsh-resource://` 之外的地址或无人认领的地址抛错;`openTab` 对无人注册的 kind 抛错:二者都是接线错误,不是用户错误。
76
+
77
+ | 选项 | 含义 |
78
+ |---|---|
79
+ | `paneId` | 新 tab 落到这个 pane;缺省为活动的停靠 pane(活动的是浮窗时取第一个停靠 pane)。 |
80
+ | `replaceTab` | 占用这个 tab 的 pane 与条上位置,并在同一步关闭它;浮窗里的 tab 让不出位置,新 tab 按未指定位置落位。 |
81
+ | `revealIfOpened` | 缺省 `true`:已显示同一 `(kind, address)` 的 tab 被聚焦并收到 `params`。`false` 则无论如何再开一个。 |
82
+ | `preferNewPane` | 在普通格数预算与空间规则下优先新建停靠格;不能分栏时回退到目标格。与 `replaceTab` 一起使用时忽略。 |
83
+ | `kind`(仅 `openResource`) | 点名打开类型而不排候选;该 kind 的生效实现打开地址,它的 `canOpen` 仍生效。 |
84
+ | `params` | 给正文的导航参数,作为 `navigation.params` 送达。`openResource` 按资源类型经声明合并表 `SidebarRightResourceParamsMap` 定型(文本预览声明 `{ line?: number }`);`openTab<K>` 按 kind 经 `SidebarRightTabParamsMap` 定型,未声明的 kind 为 `undefined`;正文读到的是二者联合 `SidebarRightNavigationParams`。值按约定为 JSON 形状,运行时不校验。 |
85
+
86
+ 落位是调用方的选项,从不是类型的属性。会话区调 `openResource(fileAddressFor(sessionId, cwd, path))`,`read` 工具行另加 `{ params: { line } }`(来自调用的 1 起 `offset`);引导页入口框调 `tab.actions.openTab(entry.kind, { replaceTab: true })`;文件树的行调 `tab.actions.openResource(address)`;tab 条的新增控件调 `openTab('guide', { paneId, revealIfOpened: false })`。
87
+
88
+ `close(tabId)` 关闭一个 tab;`active()` 返回活动 pane 的活动 tab;`isExpanded()` 与 `toggleExpanded()` 读取与翻转这一列,翻转记入序列。无会话时读操作返回 `undefined` 或 `false`;写操作需要已挂载的会话面,没有时抛错而不是写进没人绘制的面。
89
+
90
+ `focus(tabId)` 让一个 tab 成为其 pane 的活动 tab;`split(paneId?)` 分割活动的停靠 pane 或点名的 pane,返回新 pane 的 id——pane 数预算或列宽不允许时返回 `undefined` 且不记账;`float(tabId, rect?)` 把一个 tab 浮出为浮窗 pane;`dock(paneId)` 把浮窗 pane 收回停靠区。四者都走 store 既有动作、各记一条历史;目标不存在或已处于目标状态时是空操作,与 `open` 一样在没有已挂载会话面时抛错。`TabId`、`PaneId`、`TabRecord`、`FloatRect` 自本包 `/client` 入口再导出,调用方无需引 dockkit。
91
+
92
+ ## Slot 与 owner props
93
+
94
+ Sidebar 声明四个扩展 slot;其文档 tab 另行声明下表中的 keyed 文档正文 slot([层级](slots.zh.md))。
95
+
96
+ | Slot | Cardinality | 用途 |
97
+ |---|---|---|
98
+ | `sidebar.right.pane.tab` | 按定义的 `id` keyed,会话作用域 | 一个 tab 的正文。席位把 tab 分发到其 kind 生效实现的 `id`,因此注册者收到该 kind 的每个 tab,停靠或浮窗。实现没有注册正文的 kind 渲染 owner 的「无法查看此内容」提示。 |
99
+ | `sidebar.right.pane.tab.title` | 按定义的 `id` keyed,会话作用域 | chip 的标题,owner share 与正文相同。可选:没有条目时 chip 显示打开时捕获的 `title(address)` 文本;有活标题的类型在此读自己的 store。 |
100
+ | `sidebar.right.tab.guide` | chain,会话作用域 | 替换引导 tab 的内容而不替换 tab;第一个不拒绝的条目接管正文,否则渲染自带引导。 |
101
+ | `sidebar.right.tab.menu.item` | list,会话作用域 | 追加在 kit 自身布局动作之后的内容级动作。执行了动作的条目必须调用 owner 的 `dismiss()`。 |
102
+ | `sidebar.right.tab.document` | 按文档实现的 `id` keyed,会话作用域 | 文档 tab 内选中的文件渲染器;父组件拥有共享加载与工具栏控件。 |
103
+
104
+ 正文、标题与引导页替换项接收框架注入的 `useTabInfo()`。它返回 `{ sidebar, panel, tab }`:`sidebar` 包含 `expanded` 与 `fullscreen`,`panel.id` 标识所属窗格,`tab` 包含记录字段以及 `visible`、`navigation`、`signal` 和 `actions`。停靠正文仅在展开且活跃时可见;停靠标题只要求展开;浮窗保持可见。`signal` 在记录消失或插件卸载时中止,不因隐藏或切换 Session 而中止。`tab.actions` 提供绑定到标签所属 Session 的 `openResource`、`openTab` 与 `close`。打开位置缺省为当前所属窗格;`revealIfOpened` 缺省为 `true`,`replaceTab: true` 在同一历史项中替换本记录。菜单项保留普通的 `tab` 与 `dismiss` owner 参数。
105
+
106
+ `navigation.revision` 在每次导航到该 tab 时递增,`params` 不变也递增,正文可仅凭「又被导航了」行动;按地址打开的 tab 为 `1`,没有人按地址打开的记录——种入的引导、撤销恢复的 tab——为 `0`。Tab 域为每条打开的记录保有一个 occurrence:记录出现即在资源模型里钉住,因此切换 tab 卸载正文也不丢内容;记录消失即中止并丢弃;撤销恢复的记录是新的 occurrence([Tab 域](../../packages/client/ui-sidebar-right/README.zh.md#the-tab-domain))。
107
+
108
+ ## 文档渲染器
109
+
110
+ `text` tab 是共享的 Document Preview 所有者。其[根注册](../../packages/client/ui-sidebar-documentpreview/src/client/index.ts)声明 `sidebar.right.tab.document` 并提供 `ctx.documentPreviews`。渲染器在自己的 effect 中注册 `DocumentPreviewDefinition` 元数据,再通过 `ctx.slots.inject('sidebar.right.tab.document', ...)` 等待 slot,以 `key: definition.id` 和自己的 locale 命名空间注册组件。渲染器注册自己的正文,并可通过子 slot 复用共享展示组件。切换渲染器不改变 tab 或资源地址;[扩展决议](../../.agents/notes/implemented/architecture/2026-09-08-document-preview-operations.zh.md)将预览策略与资源归属分开。
111
+
112
+ [注册表](../../packages/client/ui-sidebar-documentpreview/src/client/document/registry.ts)记录唯一的 `id`、`extensions`、本地化 `title()`、`loading`,以及可选的 `priority` 和 `wrap`。后缀匹配不区分大小写,先排 `extension`(缺省值)、再排 `builtin`,随后比较后缀长度(长者优先)与注册顺序。与 tab kind 替换不同,注册表保留所有实现;工具栏列出匹配的候选,按 tab 记住选择。未知扩展名使用纯文本。`binaryExtensions` 声明的后缀不提供纯文本备选,见[包 README](../../packages/client/ui-sidebar-documentpreview/README.zh.md#what-it-registers)。`loading` 为 `text-pages`、`bytes-complete` 或 `renderer`;`wrap` 声明是否支持共享的源码换行控件。
113
+
114
+ [`DocumentPreviewProps`](../../packages/client/ui-sidebar-documentpreview/src/client/document/contract.ts) 派生自 `PropsRuntime<'sidebar.right.tab.document'>`。owner 提供原始 `resourceAddress`、`content` 与当前 `wrap`:文本内容为 `{ kind: 'text', text, pages: [{ offset, text, lines }], eof }`,其中 `text` 为累积文本;完整字节为 `{ kind: 'bytes', data }`,其中 `data` 为 `Uint8Array<ArrayBuffer>`。这些瞬时缓冲区按只读方式借用,不得进入持久布局或 Session JSON。PDF 在转移到 Worker 前复制字节,以保留 owner 的缓冲区。子组件收到同一个框架绑定的 `useTabInfo`,以及全局共享、仅提供元数据的 `useResource`。父组件通过普通 inject 回调调用 `remote.workspaceFiles.read`/`readAll`,拥有追加分页、逐 tab 刷新与加载状态。HTML 自己的 inject 回调使用 `readRelated`;路径由 Host 代码解析。Markdown 和代码在追加期间保留同一个增量渲染器,到 EOF 完成最终解析;HTML 和 PDF 接收完整字节。
115
+
116
+ Preview 记录已载入版本和读取开始时的观察版本。刷新只重读当前 tab,不改变共享元数据或其他 tab 的内容。读取不具备事务性;版本是不透明的相等性令牌,不是可排序的时间戳([资源观察与 Preview RPC](../../.agents/notes/implemented/architecture/2026-09-08-document-preview-operations.zh.md))。
117
+
118
+ 自行加载的渲染器接收 `{ kind: 'renderer', revision, loaded, reload }`,而不是文件字节。正文通过自己的注入回调加载,在 revision 变化和卸载时取消请求,并通过 `loaded(version)` 报告已展示的源版本。父组件忽略过期报告,保留共享的重新加载与源文件变更控件。Office 使用此模式请求 [Host 渲染的 PDF](office-to-pdf.zh.md);自己的 store 和有界缓存保留转换字节,正文在嵌套 PDF 视图上方管理字体提示。[包 README](../../packages/client/ui-sidebar-documentpreview/README.zh.md#what-it-registers)定义加载生命周期。
119
+
120
+ ## 资源模型
121
+
122
+ 模型本身见[客户端资源](client-resources.zh.md);本节只写 Sidebar 依赖的部分。一份资源是一个地址,资源地址是 `dsh-resource://<type>/…` 形式的 URL,小写 host 即协议键。协议所属的客户端包用 `ctx.resources.register(provider)` 在自身生命周期内注册唯一的提供方;同一协议的第二个提供方抛错([提供协议](../../packages/client/resources/README.zh.md#provide-a-protocol))。提供方是 `{ protocol, open(address, { signal }) }`:`open` 产出 `RemoteResult` 帧——首帧是当前状态,之后每次变化一帧——并在 `signal` 中止时停下;失败是 `{ ok: false, error }` 帧而不是抛错,流里抛出的东西是编程错误,模型不捕获。
123
+
124
+ `useResource<P>(address)` 是每个 slot 组件都有的全局标准 prop,不论作用域。它返回 `{ status, value, failure }`:地址协议没有提供方或地址不是资源地址(`sidebar://guide` 不指向资源)时为 `none`,首帧之前为 `loading`,`live` 携带最新 `ok` 值,`failed` 在最后一个值旁携带最新帧的失败。([读取资源](../../packages/client/resources/README.zh.md#read-a-resource))。
125
+
126
+ 资源有持有者就保持打开——订阅中的 `useResource` 或一次 `ctx.resources.pin(address, signal)`;第一个持有者打开提供方的流,之后的持有者共享它并立刻读到最新值,最后一个释放时中止流并丢弃值。流只推元数据不推内容:`file` 的值是 `{ absolutePath, version, bytes? }`,消费方自己经 Workspace Files 服务按页读文件文本([生命周期](../../packages/client/resources/README.zh.md#lifecycle))。
127
+
128
+ ## Workspace Files
129
+
130
+ Host 的 `ctx.workspaceFiles` 服务与生成的 `workspaceFiles` Remote 命名空间读取 Session 文件系统后端允许的文件:`stat(path)` 返回 `{ absolutePath, version, bytes? }`;`read(path, { offset?, limit? })` 返回一页行(`offset` 1 起,`limit` 受配置页长限制),形如 `{ …stat, offset, text, eof }`;`readBytes(path, { offset?, length? })` 返回一个原始字节窗口(`offset` 0 起,`length` 受配置字节上限限制),形如 base64 的 `{ …stat, offset, data, eof }`、不做文本解码。`list(path)` 仍限定在工作区根内,返回目录的直接子项(`name`、`type: 'file' | 'directory' | 'other'`、`size?`),按配置上限截断并置 `truncated`。`changes()` 同样限定于工作区,订阅就绪后产出 `{ kind: 'ready' }`,随后产出 `{ kind: 'change', change }` 帧,其载荷为 `{ absolutePath, version }` 或 `{ absolutePath, absent: true }`([README](../../packages/api/workspace-files/README.zh.md#use-this-package))。文件操作拒绝末端符号链接并执行传输上限;`read` 还要求 UTF-8 文本。失败使用 `workspace-file/*` 错误码([失败](../../packages/api/workspace-files/README.zh.md))。
131
+
132
+ [`dsh-api-workspace-files`](../../packages/api/workspace-files/README.zh.md) 注册 `file` 提供方,`ResourceProtocolMap.file` 直接是 `WorkspaceFileStat`。Session 地址携带授权 Session 与相对或绝对路径,Host 原样接收并解析。提供方在 stat 前等待 Host 的 `ready` 帧,并按 `stat.absolutePath` 过滤变更。裸 `absolute` 地址没有授权 Session,以 `workspace-file/unknown-workspace` 失败,不借用当前或 Tab Session。任何 UI(包括 Global)访问同一完整地址都共享观察。Preview 的普通 Remote 回调使用地址中的 Session;Host `readAll` 和 `readRelated` 保留,字节结果由 Preview 的 `rpc.ts` 解码。
133
+
134
+ ## 内置类型
135
+
136
+ - **`guide`**——`builtin`,以 `openTab('guide')` 打开。一枚弱化的罗盘位于各类型按 `order` 贡献的入口胶囊上方;入口较少时显示已注册的描述,未提供图标的入口统一使用内置占位符。点选胶囊即在引导 tab 的位置把贡献它的类型作为页面打开。每个 pane 最多一个引导 tab,tab 条的新增控件只在本 pane 没有引导时出现。新 pane 使用已注册的默认页:只有一个引导入口时直接使用该入口,否则使用引导页([引导](../../packages/client/ui-sidebar-right/README.zh.md#the-guide))。
137
+ - **`text`**——`fallback`,`dsh-resource://file/**`,只认领 Session 地址。Document Preview 通过 `useResource<'file'>` 观察元数据,经 Remote 回调加载内容,并拥有渲染器选择、工具栏、逐 tab 刷新、滚动与源码定位;未知扩展名按纯文本渲染([README](../../packages/client/ui-sidebar-documentpreview/README.zh.md))。
138
+ - **`files`**——`builtin`,以 `openTab('files')` 打开。工作区目录树,经 `list` 懒加载,用 `tab.actions.openResource(fileAddressFor(sessionId, root, path))` 在自己所在 pane 打开文件([README](../../packages/client/ui-sidebar-files/README.zh.md))。
139
+ - **`browser`**——可多开的 `builtin`,以 `openTab('browser', { params: { url? } })` 打开。Assistant Markdown 会把 HTTP(S) 链接委托给该页面类型。它在默认 sandbox 下接受公共与 loopback HTTP(S) 目标,本地文件改用 Document Preview,并使用应用已知的 iframe history([README](../../packages/client/ui-sidebar-browser/README.zh.md))。
140
+ - **`subagentchat`**——`builtin`,`dsh-resource://subagentchat/session/<child>?parent=<parent>&mode=<mode>`。资源提供方保留一个显式寻址的 subagent Conversation,并通过共享 Conversation Factory 渲染([README](../../packages/client/ui-subagent/README.zh.md))。
141
+
142
+ <a id="not-built"></a>
143
+ ## 不做
144
+
145
+ - 持久化:布局状态只在内存里;刷新后每个会话从折叠开始,任何会话的 tab 都不会出现在另一个会话里。
146
+ - `ctx.sidebarRight` 上的只读布局快照或订阅:服务只暴露操作,dockkit 的 `LayoutState`/`LayoutOp` 是内部的。
147
+ - 服务上的能力探测数组(`features`)。
148
+ - tab 类型的 `option` 优先级档:没有「只列出、不许认领」的 tab 类型。
149
+ - 改写记录的标题:`title(address)` 只捕获一次;活的 chip 来自标题 slot,而不是记录。
150
+ - 打开时点名某个 tab 实现:`openResource` 最多点名一个 kind;文档渲染器由文件 tab 的工具栏选择。
151
+ - 服务上的地址查找(`find`):调用方用 `revealIfOpened` 打开,由停靠面去重。
152
+ - Sidebar 自身 `sidebar://<kind>` 记账之外的导航地址;其语法等导航控制器整体做时再定。
153
+ - 面向用户的撤销与跨类型通用内容导航栈([暂缓](../../.agents/notes/implemented/feature/2026-09-04-right-sidebar-docking-infrastructure.zh.md#deferred));Browser 只拥有自身页面历史。
@@ -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/skills.md
5
- skills.md: 8224b91290c110d52d739cd85b3fc7d641f9a7ea
6
- skills.zh.md: 018bd85d74ba40717c741d6600f991f3c6d36d4c
5
+ skills.md: 7e45418b8b63955619b1d964e0cfc40ee7264632
6
+ skills.zh.md: ead07c09fe7174d960a36173d842c652fa544c07
@@ -2,9 +2,9 @@
2
2
 
3
3
  English | [中文](skills.zh.md)
4
4
 
5
- The [skill capability family](../../packages/skill) includes the Service Definition ([dsh-skill](../../packages/skill/skill), `ctx.skills`), the local Service Provider ([dsh-skill-filesystem](../../packages/skill/skill-filesystem)), the optional packaged badge provider ([dsh-skill-badge](../../packages/skill/skill-badge)), and the Consumer ([dsh-tool-skill](../../packages/skill/tool-skill)). The registry merges provider catalogs across its host and per-scope layers; providers contribute local or packaged skills; the Consumer owns the initial and replacement catalogs plus the model-facing `skill` tool. Skills are optional instructions, not session events, so their vocabulary lives here rather than in [core.md](core.md).
5
+ The [skill capability family](../../packages/skill) includes the Service Definition ([dsh-skill](../../packages/skill/skill), `ctx.skills`), the local Service Provider ([dsh-skill-filesystem](../../packages/skill/skill-filesystem)), optional packaged providers ([dsh-skill-badge](../../packages/skill/skill-badge) and [dsh-skill-office](../../packages/skill/skill-office)), and the Consumer ([dsh-tool-skill](../../packages/skill/tool-skill)). The registry merges provider catalogs across its host and per-scope layers; providers contribute local or packaged skills; the Consumer owns the initial and replacement catalogs plus the model-facing `skill` tool. Skills are optional instructions, not session events, so their vocabulary lives here rather than in [core.md](core.md).
6
6
 
7
- Source: [`packages/skill/skill/src/index.ts`](../../packages/skill/skill/src/index.ts), [`packages/skill/skill-filesystem/src/index.ts`](../../packages/skill/skill-filesystem/src/index.ts), [`packages/skill/skill-badge/src/index.ts`](../../packages/skill/skill-badge/src/index.ts), and [`packages/skill/tool-skill/src/index.ts`](../../packages/skill/tool-skill/src/index.ts).
7
+ Source: [`packages/skill/skill/src/index.ts`](../../packages/skill/skill/src/index.ts), [`packages/skill/skill-filesystem/src/index.ts`](../../packages/skill/skill-filesystem/src/index.ts), [`packages/skill/skill-badge/src/index.ts`](../../packages/skill/skill-badge/src/index.ts), [`packages/skill/skill-office/src/index.ts`](../../packages/skill/skill-office/src/index.ts), and [`packages/skill/tool-skill/src/index.ts`](../../packages/skill/tool-skill/src/index.ts).
8
8
 
9
9
  ## Provider registry
10
10
 
@@ -106,6 +106,8 @@ interface SkillInvocationPolicy {
106
106
  ```ts type-equiv
107
107
  /** Invocation-neutral skill metadata returned by `ctx.skills.list()`. */
108
108
  interface SkillSummary {
109
+ /** Absolute instruction file path when supplied by the provider; absent for virtual skills. */
110
+ readonly path?: string
109
111
  /** Kebab-case identifier used to address the skill. */
110
112
  readonly name: string
111
113
  /** Short routing description shown by discovery consumers. */
@@ -146,8 +148,6 @@ interface SkillCandidate extends SkillSummary {
146
148
  readonly rank: number
147
149
  /** Opaque provider-owned handle passed back to `provider.get()`. */
148
150
  readonly locator: unknown
149
- /** Absolute file path when the provider has one. */
150
- readonly path?: string
151
151
  /** Parsed optional metadata object from provider-specific skill frontmatter. */
152
152
  readonly metadata?: Readonly<Record<string, unknown>>
153
153
  }
@@ -168,8 +168,6 @@ type SkillResourceBase =
168
168
  interface SkillDefinition extends SkillSummary {
169
169
  /** Markdown instruction body after any provider-specific metadata removal. */
170
170
  readonly content: string
171
- /** Absolute file path when the skill came from disk. */
172
- readonly path?: string
173
171
  /** Parsed optional metadata object from frontmatter. */
174
172
  readonly metadata?: Readonly<Record<string, unknown>>
175
173
  }
@@ -2,9 +2,9 @@
2
2
 
3
3
  [English](skills.md) | 中文
4
4
 
5
- [skill(技能)能力族](../../packages/skill) 包含 Service Definition([dsh-skill](../../packages/skill/skill),`ctx.skills`)、本地 Service Provider([dsh-skill-filesystem](../../packages/skill/skill-filesystem))、可选的随包徽章提供方([dsh-skill-badge](../../packages/skill/skill-badge))和 Consumer([dsh-tool-skill](../../packages/skill/tool-skill))。注册表在其宿主层与各 scope 层之间合并各提供方的目录;提供方贡献本地或随包 skill;Consumer 拥有初始目录和替换目录,以及面向模型的 `skill` 工具。skill 是可选的指令而非会话事件,因此其词汇定义在此处而非 [core.md](core.zh.md)。
5
+ [skill(技能)能力族](../../packages/skill) 包含 Service Definition([dsh-skill](../../packages/skill/skill),`ctx.skills`)、本地 Service Provider([dsh-skill-filesystem](../../packages/skill/skill-filesystem))、可选的随包提供方([dsh-skill-badge](../../packages/skill/skill-badge) 与 [dsh-skill-office](../../packages/skill/skill-office))和 Consumer([dsh-tool-skill](../../packages/skill/tool-skill))。注册表在其宿主层与各 scope 层之间合并各提供方的目录;提供方贡献本地或随包 skill;Consumer 拥有初始目录和替换目录,以及面向模型的 `skill` 工具。skill 是可选的指令而非会话事件,因此其词汇定义在此处而非 [core.md](core.zh.md)。
6
6
 
7
- 源码:[`packages/skill/skill/src/index.ts`](../../packages/skill/skill/src/index.ts)、[`packages/skill/skill-filesystem/src/index.ts`](../../packages/skill/skill-filesystem/src/index.ts)、[`packages/skill/skill-badge/src/index.ts`](../../packages/skill/skill-badge/src/index.ts) 与 [`packages/skill/tool-skill/src/index.ts`](../../packages/skill/tool-skill/src/index.ts)。
7
+ 源码:[`packages/skill/skill/src/index.ts`](../../packages/skill/skill/src/index.ts)、[`packages/skill/skill-filesystem/src/index.ts`](../../packages/skill/skill-filesystem/src/index.ts)、[`packages/skill/skill-badge/src/index.ts`](../../packages/skill/skill-badge/src/index.ts)、[`packages/skill/skill-office/src/index.ts`](../../packages/skill/skill-office/src/index.ts) 与 [`packages/skill/tool-skill/src/index.ts`](../../packages/skill/tool-skill/src/index.ts)。
8
8
 
9
9
  ## 提供方注册表
10
10
 
@@ -106,6 +106,8 @@ interface SkillInvocationPolicy {
106
106
  ```ts type-equiv
107
107
  /** Invocation-neutral skill metadata returned by `ctx.skills.list()`. */
108
108
  interface SkillSummary {
109
+ /** Absolute instruction file path when supplied by the provider; absent for virtual skills. */
110
+ readonly path?: string
109
111
  /** Kebab-case identifier used to address the skill. */
110
112
  readonly name: string
111
113
  /** Short routing description shown by discovery consumers. */
@@ -146,8 +148,6 @@ interface SkillCandidate extends SkillSummary {
146
148
  readonly rank: number
147
149
  /** Opaque provider-owned handle passed back to `provider.get()`. */
148
150
  readonly locator: unknown
149
- /** Absolute file path when the provider has one. */
150
- readonly path?: string
151
151
  /** Parsed optional metadata object from provider-specific skill frontmatter. */
152
152
  readonly metadata?: Readonly<Record<string, unknown>>
153
153
  }
@@ -168,8 +168,6 @@ type SkillResourceBase =
168
168
  interface SkillDefinition extends SkillSummary {
169
169
  /** Markdown instruction body after any provider-specific metadata removal. */
170
170
  readonly content: string
171
- /** Absolute file path when the skill came from disk. */
172
- readonly path?: string
173
171
  /** Parsed optional metadata object from frontmatter. */
174
172
  readonly metadata?: Readonly<Record<string, unknown>>
175
173
  }
@@ -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/slots.md
5
- slots.md: a37374ff11f9d460a2566a7a30f8318e69cbfa0b
6
- slots.zh.md: 09329b1f299f4912490f888efa3146ec0ce11e28
5
+ slots.md: a9f0ee6ab2ef37065ab965a7989f5989350bca8b
6
+ slots.zh.md: da6a38eab6aac1c2670b131fa49a832ce41f711e