dsh-plugin-guide 0.3.27 → 0.3.30

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 (304) hide show
  1. package/README-es.md +3 -3
  2. package/README-hi.md +3 -3
  3. package/README-pt.md +3 -3
  4. package/README-zh.md +5 -3
  5. package/README.md +5 -3
  6. package/SKILL.md +21 -8
  7. package/dist/dsh-plugin-dev.js +93 -18
  8. package/guide/family-toolchain.md +260 -0
  9. package/guide/links.md +3 -2
  10. package/guide/migration-0.2.md +64 -8
  11. package/guide/plugin-dev-guide.md +8 -6
  12. package/guide/quick-reference.es.md +3 -2
  13. package/guide/quick-reference.hi.md +4 -3
  14. package/guide/quick-reference.md +6 -5
  15. package/guide/quick-reference.pt.md +4 -3
  16. package/guide/quick-reference.zh-CN.md +6 -5
  17. package/guide/release-engineering.md +4 -2
  18. package/guide/release-engineering.zh-CN.md +4 -2
  19. package/guide/unfixed-issues.md +7 -0
  20. package/guide/version-matrix.md +309 -0
  21. package/guide/when-to-retire-a-plugin.md +5 -5
  22. package/guide/when-to-retire-a-plugin.zh-CN.md +5 -5
  23. package/index.d.ts +32 -0
  24. package/index.js +24 -9
  25. package/package.json +19 -11
  26. package/references/community-ecosystem.md +2 -1
  27. package/references/dev-resource-landscape.md +294 -0
  28. package/references/official-docs/AGENTS.md +4 -5
  29. package/references/official-docs/SNAPSHOT.md +3 -3
  30. package/references/official-docs/THIRD_PARTY_NOTICES.md +2 -1
  31. package/references/official-docs/docs/AGENTS.md +1 -1
  32. package/references/official-docs/docs/architecture.i18n.yaml +14 -14
  33. package/references/official-docs/docs/architecture.md +11 -12
  34. package/references/official-docs/docs/architecture.zh.md +11 -12
  35. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  36. package/references/official-docs/docs/capability-seams.md +48 -23
  37. package/references/official-docs/docs/capability-seams.zh.md +48 -23
  38. package/references/official-docs/docs/cli-help.i18n.yaml +34 -0
  39. package/references/official-docs/docs/cli-help.md +203 -0
  40. package/references/official-docs/docs/cli-help.zh.md +205 -0
  41. package/references/official-docs/docs/config-catalog.md +305 -145
  42. package/references/official-docs/docs/config-catalog.zh.md +305 -145
  43. package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +6 -6
  44. package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +7 -5
  45. package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +7 -5
  46. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +6 -6
  47. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +11 -9
  48. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +11 -9
  49. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +4 -4
  50. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +5 -5
  51. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +5 -5
  52. package/references/official-docs/docs/defensive-patterns.i18n.yaml +2 -2
  53. package/references/official-docs/docs/defensive-patterns.md +1 -1
  54. package/references/official-docs/docs/defensive-patterns.zh.md +1 -1
  55. package/references/official-docs/docs/development.i18n.yaml +6 -6
  56. package/references/official-docs/docs/development.md +4 -2
  57. package/references/official-docs/docs/development.zh.md +4 -2
  58. package/references/official-docs/docs/event-producer-consumer.md +33 -33
  59. package/references/official-docs/docs/event-producer-consumer.zh.md +33 -33
  60. package/references/official-docs/docs/experimental-persistence-catalog.i18n.yaml +10 -0
  61. package/references/official-docs/docs/experimental-persistence-catalog.md +17 -0
  62. package/references/official-docs/docs/experimental-persistence-catalog.zh.md +17 -0
  63. package/references/official-docs/docs/module-graph.md +202 -131
  64. package/references/official-docs/docs/module-graph.zh.md +202 -131
  65. package/references/official-docs/docs/persistence-catalog.i18n.yaml +185 -158
  66. package/references/official-docs/docs/persistence-catalog.md +213 -112
  67. package/references/official-docs/docs/persistence-catalog.zh.md +213 -112
  68. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.i18n.yaml +28 -0
  69. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.md +48 -0
  70. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.schema.json +76 -0
  71. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
  72. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +4 -4
  73. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +2 -2
  74. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +2 -2
  75. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.i18n.yaml +28 -0
  76. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
  77. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.schema.json +290 -0
  78. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
  79. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.i18n.yaml +28 -0
  80. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
  81. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.schema.json +457 -0
  82. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
  83. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.i18n.yaml +28 -0
  84. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
  85. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.schema.json +11474 -0
  86. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
  87. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.i18n.yaml +28 -0
  88. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
  89. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.schema.json +2990 -0
  90. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
  91. package/references/official-docs/docs/persistence-changes/README.i18n.yaml +4 -4
  92. package/references/official-docs/docs/persistence-changes/README.md +12 -10
  93. package/references/official-docs/docs/persistence-changes/README.zh.md +12 -10
  94. package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +2 -2
  95. package/references/official-docs/docs/persistence-changes/historical-formats/README.md +1 -1
  96. package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +1 -1
  97. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +2 -2
  98. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.md +50 -50
  99. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +50 -50
  100. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +2 -2
  101. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.md +14 -14
  102. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +14 -14
  103. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +2 -2
  104. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.md +3 -3
  105. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +3 -3
  106. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +2 -2
  107. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.md +10 -10
  108. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +10 -10
  109. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +2 -2
  110. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.md +3 -3
  111. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +3 -3
  112. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +2 -2
  113. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.md +13 -13
  114. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +13 -13
  115. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +2 -2
  116. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +63 -63
  117. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +63 -63
  118. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +2 -2
  119. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +54 -54
  120. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +54 -54
  121. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +2 -2
  122. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +7 -7
  123. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +7 -7
  124. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +2 -2
  125. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +27 -27
  126. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +27 -27
  127. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +2 -2
  128. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +4 -4
  129. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +4 -4
  130. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +2 -2
  131. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +27 -27
  132. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +27 -27
  133. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +2 -2
  134. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +7 -7
  135. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +7 -7
  136. package/references/official-docs/docs/persistence-schema.json +2084 -1827
  137. package/references/official-docs/docs/session-format-status.i18n.yaml +6 -6
  138. package/references/official-docs/docs/session-format-status.md +6 -6
  139. package/references/official-docs/docs/session-format-status.zh.md +6 -6
  140. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  141. package/references/official-docs/docs/subsystems/README.md +4 -1
  142. package/references/official-docs/docs/subsystems/README.zh.md +4 -1
  143. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +7 -7
  144. package/references/official-docs/docs/subsystems/agent-team.md +10 -10
  145. package/references/official-docs/docs/subsystems/agent-team.zh.md +10 -10
  146. package/references/official-docs/docs/subsystems/boot.i18n.yaml +2 -2
  147. package/references/official-docs/docs/subsystems/boot.md +4 -4
  148. package/references/official-docs/docs/subsystems/boot.zh.md +4 -4
  149. package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +2 -2
  150. package/references/official-docs/docs/subsystems/claude-code-mods.md +1 -1
  151. package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +1 -1
  152. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
  153. package/references/official-docs/docs/subsystems/jobs.md +2 -3
  154. package/references/official-docs/docs/subsystems/jobs.zh.md +2 -3
  155. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +4 -4
  156. package/references/official-docs/docs/subsystems/llm-streaming.md +41 -14
  157. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +41 -14
  158. package/references/official-docs/docs/subsystems/persistence.md +2 -0
  159. package/references/official-docs/docs/subsystems/persistence.zh.md +2 -0
  160. package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
  161. package/references/official-docs/docs/subsystems/plan.md +1 -1
  162. package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
  163. package/references/official-docs/docs/subsystems/session-query.md +2 -0
  164. package/references/official-docs/docs/subsystems/session-query.zh.md +2 -0
  165. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +6 -6
  166. package/references/official-docs/docs/subsystems/session-title.md +14 -5
  167. package/references/official-docs/docs/subsystems/session-title.zh.md +14 -5
  168. package/references/official-docs/docs/subsystems/session.i18n.yaml +3 -0
  169. package/references/official-docs/docs/subsystems/session.md +48 -5
  170. package/references/official-docs/docs/subsystems/session.zh.md +48 -5
  171. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  172. package/references/official-docs/docs/subsystems/skills.md +2 -2
  173. package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
  174. package/references/official-docs/docs/subsystems/slots.md +10 -8
  175. package/references/official-docs/docs/subsystems/slots.zh.md +10 -8
  176. package/references/official-docs/docs/subsystems/ssh.i18n.yaml +2 -2
  177. package/references/official-docs/docs/subsystems/ssh.md +22 -11
  178. package/references/official-docs/docs/subsystems/ssh.zh.md +22 -11
  179. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +24 -27
  180. package/references/official-docs/docs/subsystems/subagent.md +165 -229
  181. package/references/official-docs/docs/subsystems/subagent.zh.md +167 -233
  182. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  183. package/references/official-docs/docs/subsystems/system-prompt.md +32 -2
  184. package/references/official-docs/docs/subsystems/system-prompt.zh.md +32 -2
  185. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  186. package/references/official-docs/docs/subsystems/tools.md +3 -3
  187. package/references/official-docs/docs/subsystems/tools.zh.md +3 -3
  188. package/references/official-docs/docs/subsystems/translation.i18n.yaml +19 -0
  189. package/references/official-docs/docs/subsystems/translation.md +103 -0
  190. package/references/official-docs/docs/subsystems/translation.zh.md +103 -0
  191. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +8 -8
  192. package/references/official-docs/docs/subsystems/web-server.md +43 -8
  193. package/references/official-docs/docs/subsystems/web-server.zh.md +43 -8
  194. package/references/official-docs/docs/subsystems/webhook.md +1 -1
  195. package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
  196. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  197. package/references/official-docs/docs/subsystems/workflow.md +1 -1
  198. package/references/official-docs/docs/subsystems/workflow.zh.md +1 -1
  199. package/references/official-docs/docs/subsystems/working-directory.i18n.yaml +13 -0
  200. package/references/official-docs/docs/subsystems/working-directory.md +64 -0
  201. package/references/official-docs/docs/subsystems/working-directory.zh.md +64 -0
  202. package/references/official-docs/docs/subsystems/workspace.md +2 -2
  203. package/references/official-docs/docs/subsystems/workspace.zh.md +2 -2
  204. package/references/official-docs/docs/subsystems/worktrees.i18n.yaml +13 -0
  205. package/references/official-docs/docs/subsystems/worktrees.md +76 -0
  206. package/references/official-docs/docs/subsystems/worktrees.zh.md +76 -0
  207. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  208. package/references/official-docs/docs/testing.md +1 -1
  209. package/references/official-docs/docs/testing.zh.md +1 -1
  210. package/references/official-docs/docs/tool-catalog.i18n.yaml +57 -45
  211. package/references/official-docs/docs/tool-catalog.md +95 -41
  212. package/references/official-docs/docs/tool-catalog.zh.md +99 -45
  213. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.i18n.yaml +16 -0
  214. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
  215. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
  216. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.i18n.yaml +16 -0
  217. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
  218. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
  219. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.i18n.yaml +16 -0
  220. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
  221. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
  222. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.i18n.yaml +16 -0
  223. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
  224. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
  225. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.i18n.yaml +16 -0
  226. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
  227. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
  228. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.i18n.yaml +16 -0
  229. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
  230. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
  231. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.i18n.yaml +16 -0
  232. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
  233. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
  234. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.i18n.yaml +16 -0
  235. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
  236. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
  237. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.i18n.yaml +16 -0
  238. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
  239. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
  240. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.i18n.yaml +16 -0
  241. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
  242. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
  243. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.i18n.yaml +16 -0
  244. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
  245. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
  246. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.i18n.yaml +16 -0
  247. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
  248. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
  249. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.i18n.yaml +16 -0
  250. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
  251. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
  252. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.i18n.yaml +16 -0
  253. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
  254. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
  255. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.i18n.yaml +16 -0
  256. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
  257. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
  258. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.i18n.yaml +16 -0
  259. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
  260. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
  261. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.i18n.yaml +16 -0
  262. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
  263. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
  264. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.i18n.yaml +16 -0
  265. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
  266. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
  267. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.i18n.yaml +16 -0
  268. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
  269. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
  270. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.i18n.yaml +16 -0
  271. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
  272. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
  273. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +4 -4
  274. package/references/official-docs/docs/user/guide/github-review.md +7 -10
  275. package/references/official-docs/docs/user/guide/github-review.zh.md +7 -10
  276. package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +8 -8
  277. package/references/official-docs/docs/user/guide/public-deployments.md +9 -5
  278. package/references/official-docs/docs/user/guide/public-deployments.zh.md +9 -5
  279. package/references/official-docs/packages/README.md +4 -6
  280. package/references/official-docs/website-docs.ts +1 -0
  281. package/references/official-plugin-dev-skill.md +2 -2
  282. package/references/sources.md +2 -1
  283. package/scripts/archive-discussions.ps1 +162 -162
  284. package/scripts/build-llms-full.mjs +8 -0
  285. package/scripts/check-docs-drift.ps1 +55 -55
  286. package/scripts/check-ps1-bom.mjs +68 -0
  287. package/scripts/download-community-articles.ps1 +188 -188
  288. package/scripts/download-community-repos.ps1 +232 -232
  289. package/scripts/download-sources.ps1 +195 -195
  290. package/scripts/gen-topic-snapshot.ps1 +91 -91
  291. package/scripts/install-skill.ps1 +63 -63
  292. package/scripts/sync-official-docs.ps1 +138 -138
  293. package/scripts/verify-artifacts.mjs +26 -0
  294. package/scripts/verify-kit.ps1 +197 -187
  295. package/templates/js/README-es.md +1 -1
  296. package/templates/js/README-hi.md +1 -1
  297. package/templates/js/README-pt.md +1 -1
  298. package/templates/js/README-zh.md +1 -1
  299. package/templates/js/README.md +1 -1
  300. package/templates/ts/README-es.md +1 -1
  301. package/templates/ts/README-hi.md +1 -1
  302. package/templates/ts/README-pt.md +1 -1
  303. package/templates/ts/README-zh.md +1 -1
  304. package/templates/ts/README.md +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](web-server.md) | 中文
4
4
 
5
- [dsh-host-webserver](../../packages/host/webserver) 是 GUI Host 的浏览器 HTTP 载体:它是一个提供 `ctx.webServer` 的 `node:http` 插件,包含具名路由注册表、可选的 gzip 响应压缩、index.html 转换回调,以及一个可由插件认领的回退处理器。它不属于 agent loop(智能体循环),也不是能力 seam;它不了解任何 harness 概念。其他插件负责注册所有功能路由,包括 `/api` 桥接、插件 bundle 和 HMR(热模块替换)事件流([分层说明](../../packages/boot/app-boot/README.zh.md))。该服务器只服务浏览器:Electron 通过 `file://` 加载已构建文件,并经 IPC 桥接发送 fetch 请求,不使用本服务器。
5
+ [dsh-host-webserver](../../packages/host/webserver) 是 GUI Host 的浏览器 HTTP 载体:一个 `node:http` 服务器——配置 `tls` 时改用 `node:https`——提供 `ctx.webServer`、具名路由注册表、可选的 gzip 响应压缩、index.html 转换回调,以及一个可由插件认领的回退处理器。它不属于 agent loop(智能体循环),也不是能力 seam;它不了解任何 harness 概念。其他插件负责注册所有功能路由,包括 `/api` 桥接、插件 bundle 和 HMR(热模块替换)事件流([分层说明](../../packages/boot/app-boot/README.zh.md))。该服务器只服务浏览器:Electron 通过 `file://` 加载已构建文件,并经 IPC 桥接发送 fetch 请求,不使用本服务器。
6
6
 
7
7
  源码:[`packages/host/webserver/src/index.ts`](../../packages/host/webserver/src/index.ts)
8
8
 
@@ -26,15 +26,34 @@ interface WebRoute {
26
26
 
27
27
  匹配顺序固定:先查 exact 表,再取最长匹配前缀,最后落到已注册的回退。注册顺序不携带任何面向请求的语义:具名路由在组合上互不相交,任何未被具名路由认领的请求都由回退席位应答;席位只有一个所有者,第二次注册会抛出异常。发布的 Web 组合用 [`dsh-host-frontend-static`](../../packages/host/frontend-static/src/index.ts) 认领席位,即遵循固定语义的 SPA dist 服务器:Connection 在读取 dist 根目录和配置 index 的 HTML 前完成认证;非 index 资产保持公开;非 GET/HEAD 返回 405,越出 dist 根目录的遍历返回 403,现有文件直接提供,缺失或不是文件的目标返回空的 404,未知扩展名按 octet-stream 发送。
28
28
 
29
+ <a id="config"></a>
30
+
29
31
  ## 配置
30
32
 
31
33
  ```ts type-equiv
32
- /** Web server listen and response-compression config. */
34
+ /** Web server listen, TLS, and response-compression config. */
33
35
  interface Config {
34
- /** Listen host; the two supported values are loopback and all-interfaces. */
35
- host: '127.0.0.1' | '0.0.0.0'
36
+ /**
37
+ * Listen address: a concrete IPv4 or IPv6 literal of one local interface,
38
+ * for example the container's own Pod address from `hostname -i`. A loopback
39
+ * literal (any address in 127/8, `::1`, or a mapped form of either) keeps the
40
+ * server on this machine; any other literal serves the network that address
41
+ * belongs to, over plain HTTP unless `tls` is set. The unspecified address —
42
+ * IPv4 any, IPv6 any, and the IPv4-mapped forms of IPv4 any — is rejected at
43
+ * load: it would expose the port on every interface at once.
44
+ */
45
+ host: string
36
46
  /** Listen port; zero requests an OS-assigned port. */
37
47
  port: number
48
+ /**
49
+ * Serve HTTPS with this certificate and key instead of plain HTTP. Both files
50
+ * are read once, before the listener binds: an unreadable or empty file,
51
+ * invalid PEM, or a key that does not match the certificate rejects
52
+ * initialization rather than falling back to HTTP. The material is never
53
+ * re-read, so replacing a certificate takes a reload. Omitted or null listens
54
+ * over plain HTTP.
55
+ */
56
+ tls?: TlsConfig
38
57
  /** Response compression for socket-backed HTTP requests. @default 'none' */
39
58
  compression?: 'none' | 'gzip'
40
59
  /** Gzip DEFLATE level from 0 through 9. @default 1 */
@@ -44,13 +63,27 @@ interface Config {
44
63
  }
45
64
  ```
46
65
 
47
- `host` 只接受 `127.0.0.1`(默认姿态)和 `0.0.0.0`(刻意的网络暴露)。载体本身不拥有 TLS、认证或 Origin 策略,因此绑定到非回环地址会暴露服务器,除非组合层提供这些控制。`compression` 默认为 `none`;随附的 Web 组合选择 gzip level 1 和 1024 字节阈值。随附的 `dsh web` 命令选择 loopback 并拒绝 `--host 0.0.0.0`;其 Connection 插件为每个 Host API route 与 stream 提供 Host/Origin 校验和浏览器会话认证。其他组合自行拥有绑定与路由认证策略。dist 位置是认领席位的前端插件的组装事实。
66
+ ```ts type-equiv
67
+ /**
68
+ * TLS material for the HTTPS listener: one certificate chain file and the
69
+ * private key file it pairs with. Both hold PEM text and both resolve against
70
+ * the process working directory.
71
+ */
72
+ interface TlsConfig {
73
+ /** Certificate chain file, leaf certificate first, PEM, no passphrase. */
74
+ certFile: string
75
+ /** Private key file for the chain's leaf certificate; unencrypted PEM. */
76
+ keyFile: string
77
+ }
78
+ ```
79
+
80
+ 没有组合能一次性绑定所有网络接口:未指定地址在加载时即被拒绝。导出的 `isWildcardHost` 与 `isLoopbackHost` 按解析后的地址值分类,IPv6 的 `%zone` 会保留给 `listen`,而分类只读取地址本身。载体不拥有认证或 Origin 策略,并且除非 `tls` 提供证书与密钥,否则以明文 HTTP 提供服务。`compression` 默认为 `none`;随附的 Web 组合选择 gzip level 1 和 1024 字节阈值。随附的 `dsh web` 命令默认选择 loopback 并接受一个具体的 `--host` 地址,非 loopback 绑定以明文 HTTP 提供服务时会在启动时警告;其 Connection 插件为每个 Host API route 与 stream 提供 Host/Origin 校验和浏览器会话认证,绑定地址加 `--trusted-host` 决定接受哪个浏览器 Host;`--public-url` 只改变公告的 URL。其他组合自行拥有绑定与路由认证策略。dist 位置是认领席位的前端插件的组装事实。
48
81
 
49
82
  ## 服务
50
83
 
51
- `WebServer`(`ctx.webServer`)在激活时立即监听;监听失败(EADDRINUSE 等)会使初始化被拒绝,启动进程会报告失败的 fiber。`register(route)` 添加一条具名路由并返回其 disposer;重复的 `(kind, path)` 抛出异常,因为路由模式是组合层约定,冲突即配置错误。Gzip 在服务器内部包装符合条件且基于 socket 的响应,因此 route handler 继续直接持有 `ServerResponse`,服务也不新增响应写出 API。已有内容编码、`Cache-Control: no-transform`、范围响应、SSE、ZIP 与打包后的 `.gz` Worker 镜像均保持 identity 响应。`collectIndexInjections()` 经一次 `webserver/index-inject` emit 收集结构化 `IndexInjection` 行,`renderIndex(html)` 把它们渲染进成功的根路径和配置 index 响应,随后再按注册顺序应用原始的 `tapIndex(transform)` 逃生口转换;[dsh-client-modules](../../packages/client/modules) 以启动 manifest(元数据清单)行回应该事件。`port` 读取监听端口,包括 `config.port` 为 0 时操作系统分配的端口。
84
+ `WebServer`(`ctx.webServer`)在激活时立即监听;监听失败(EADDRINUSE 等)会使初始化被拒绝,启动进程会报告失败的 fiber。`tls` 证书对在监听器绑定前读取一次;文件不可读、为空或二者不匹配时同样会使初始化被拒绝,而不是回退到 HTTP。`register(route)` 添加一条具名路由并返回其 disposer;重复的 `(kind, path)` 抛出异常,因为路由模式是组合层约定,冲突即配置错误。Gzip 在服务器内部包装符合条件且基于 socket 的响应,因此 route handler 继续直接持有 `ServerResponse`,服务也不新增响应写出 API。已有内容编码、`Cache-Control: no-transform`、范围响应、SSE、ZIP 与打包后的 `.gz` Worker 镜像均保持 identity 响应。`collectIndexInjections()` 经一次 `webserver/index-inject` emit 收集结构化 `IndexInjection` 行,`renderIndex(html)` 把它们渲染进成功的根路径和配置 index 响应,随后再按注册顺序应用原始的 `tapIndex(transform)` 逃生口转换;[dsh-client-modules](../../packages/client/modules) 以启动 manifest(元数据清单)行回应该事件。`port` 读取监听端口,包括 `config.port` 为 0 时操作系统分配的端口,`protocol` 则报告监听器提供的协议(`http:` 或 `https:`)。
52
85
 
53
- 处理过程中抛出异常的请求(畸形的 % 转义撞上 `decodeURIComponent`、客户端在请求体中途断开)会记录为警告并应答 400(响应头已发出时则销毁 socket),绝不导致进程退出。dispose(资源释放)把 `close()` 与 `closeAllConnections()` 配对使用,因为处理器可能像 SSE(Server-Sent Events)那样保持响应打开,而这类连接永远不会自行结束;没有强制关闭,拆卸就会挂起。该包从不打印输出:URL 行归 shell 所有。逐包运维细节(含开发模式的 bundle 监视流水线)留在 [README](../../packages/host/webserver/README.zh.md) 中。
86
+ 处理过程中抛出异常的请求(畸形的 % 转义撞上 `decodeURIComponent`、客户端在请求体中途断开)会记录为警告并应答 400(响应头已发出时则销毁 socket),绝不导致进程退出。dispose(资源释放)把 `close()` 与 `closeAllConnections()` 配对使用,因为处理器可能像 SSE(Server-Sent Events)那样保持响应打开,而这类连接永远不会自行结束;没有强制关闭,拆卸就会挂起。TLS socket 只有完成握手后才计入连接,因此服务器会把原始 TLS socket 与升级后的 socket 一并跟踪,并在 dispose 时销毁两者。该包从不打印输出:URL 行归 shell 所有。逐包运维细节(含开发模式的 bundle 监视流水线)留在 [README](../../packages/host/webserver/README.zh.md) 中。
54
87
 
55
88
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
56
89
 
@@ -92,6 +125,8 @@ admit(request: ConnectionTrustRequest): PeerAdmission
92
125
 
93
126
  /**
94
127
  * Authenticate one frontend index request, owning a token redirect or 401.
128
+ * The cookie this mints is `Secure` when the mounted Web carrier serves TLS,
129
+ * which only that listener's protocol decides.
95
130
  * @param request - root or configured-index HTTP request.
96
131
  * @param response - response owned when the result is false.
97
132
  * @returns true only when the frontend may serve index.html.
@@ -112,7 +147,7 @@ Source: [`packages/client/connection/src/rpc.ts`](../../packages/client/connecti
112
147
 
113
148
  ### `ctx.webServer` — `WebServer`
114
149
 
115
- The browser HTTP carrier service. Activation listens immediately. Route registration order does not affect requests because configured named routes must be distinct, and the fallback handler answers anything not yet claimed during startup with 404 until its owner registers. A listen failure rejects initialization, and the boot process reports the failed fiber.
150
+ The browser HTTP carrier service. Activation loads any configured TLS material, then listens immediately; a material or listen failure rejects initialization, and the boot process reports the failed fiber. Route registration order does not affect requests because configured named routes must be distinct, and the fallback handler answers anything not yet claimed during startup with 404 until its owner registers.
116
151
 
117
152
  ```ts cordis-catalog
118
153
  /**
@@ -66,5 +66,5 @@ register<K extends string>(rule: WebhookRule<K>): () => Promise<void>
66
66
  dispatch<K extends string>(delivery: VerifiedWebhookDelivery<K>): void
67
67
  ```
68
68
 
69
- Source: [`packages/webhook/webhook/src/index.ts`](../../packages/webhook/webhook/src/index.ts)
69
+ Source: [`packages/experimental/webhook/src/index.ts`](../../packages/experimental/webhook/src/index.ts)
70
70
  <!-- END GENERATED cordis-surface -->
@@ -66,5 +66,5 @@ register<K extends string>(rule: WebhookRule<K>): () => Promise<void>
66
66
  dispatch<K extends string>(delivery: VerifiedWebhookDelivery<K>): void
67
67
  ```
68
68
 
69
- Source: [`packages/webhook/webhook/src/index.ts`](../../packages/webhook/webhook/src/index.ts)
69
+ Source: [`packages/experimental/webhook/src/index.ts`](../../packages/experimental/webhook/src/index.ts)
70
70
  <!-- END GENERATED cordis-surface -->
@@ -3,8 +3,8 @@
3
3
  # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/workflow.md
5
5
  /workflow:
6
- en: eaf02eb7b85ec696
7
- zh: 648807dce7860e2d
6
+ en: 4b264eb88e5cedfb
7
+ zh: 78585763a79cd1c9
8
8
  /workflow/the-start-request:
9
9
  en: 6c8755833293a36c
10
10
  zh: a0f061387fe0d3a6
@@ -4,7 +4,7 @@ English | [中文](workflow.zh.md)
4
4
 
5
5
  The workflow seam lets an agent run a model-written orchestration SCRIPT that starts subagents. Like [subagent](subagent.md) it is **one optional capability**, not part of the agent loop, so its types and operations live here rather than in [core.md](core.md). Like bash, it permits ONE engine implementation per context to provide `ctx.workflowEngine`; there is no named-provider registry (a second engine replaces the first through plugin configuration rather than running beside it).
6
6
 
7
- Service Definition: [dsh-workflow](../../packages/workflow/workflow) (`ctx.workflowEngine` and the vocabulary below). [dsh-workflow-ptc](../../packages/workflow/workflow-ptc) executes the VM and helpers through the shared Node PTC process runtime under the calling Session's file policy. The consumers are [dsh-tool-workflow](../../packages/workflow/tool-workflow) and the opt-in [dsh-tool-ralph](../../packages/workflow/tool-ralph). [Workflow sandbox reuse](../../.agents/notes/implemented/architecture/2026-09-13-workflow-ptc-sandbox-reuse.md) owns execution choices; the [dynamic-workflows reference](../../packages/workflow/workflow/README.md) owns script semantics.
7
+ Service Definition: [dsh-workflow](../../packages/workflow/workflow) (`ctx.workflowEngine` and the vocabulary below). [dsh-workflow-ptc](../../packages/workflow/workflow-ptc) executes the VM and helpers through the shared Node PTC process runtime under the calling Session's file policy. The consumers are [dsh-tool-workflow](../../packages/workflow/tool-workflow) and the opt-in [dsh-tool-ralph](../../packages/experimental/tool-ralph). [Workflow sandbox reuse](../../.agents/notes/implemented/architecture/2026-09-13-workflow-ptc-sandbox-reuse.md) owns execution choices; the [dynamic-workflows reference](../../packages/workflow/workflow/README.md) owns script semantics.
8
8
 
9
9
  Sources: browser-safe vocabulary in [`packages/workflow/workflow/src/types.ts`](../../packages/workflow/workflow/src/types.ts), Host request and live-run handles in [`runtime-types.ts`](../../packages/workflow/workflow/src/runtime-types.ts).
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  工作流 seam 允许 agent(智能体)运行由模型编写、会启动 subagent 的编排脚本。与 [subagent](subagent.zh.md) 一样,它是**一项可选能力**,不属于 agent loop,因此其类型和操作记录在此处,而非 [core.md](core.zh.md)。与 bash 一样,每个上下文只允许一个引擎实现提供 `ctx.workflowEngine`;没有命名提供方注册表(第二个引擎通过插件配置替换第一个,而不与它同时运行)。
6
6
 
7
- Service Definition:[dsh-workflow](../../packages/workflow/workflow)(`ctx.workflowEngine` 和下文词汇)。[dsh-workflow-ptc](../../packages/workflow/workflow-ptc)通过共享 Node PTC 进程运行时按调用 Session 的文件策略执行 VM 与辅助函数。消费方为 [dsh-tool-workflow](../../packages/workflow/tool-workflow) 和需显式启用的 [dsh-tool-ralph](../../packages/workflow/tool-ralph)。[工作流沙箱复用](../../.agents/notes/implemented/architecture/2026-09-13-workflow-ptc-sandbox-reuse.zh.md)负责执行选择;[动态工作流参考](../../packages/workflow/workflow/README.zh.md)负责脚本语义。
7
+ Service Definition:[dsh-workflow](../../packages/workflow/workflow)(`ctx.workflowEngine` 和下文词汇)。[dsh-workflow-ptc](../../packages/workflow/workflow-ptc)通过共享 Node PTC 进程运行时按调用 Session 的文件策略执行 VM 与辅助函数。消费方为 [dsh-tool-workflow](../../packages/workflow/tool-workflow) 和需显式启用的 [dsh-tool-ralph](../../packages/experimental/tool-ralph)。[工作流沙箱复用](../../.agents/notes/implemented/architecture/2026-09-13-workflow-ptc-sandbox-reuse.zh.md)负责执行选择;[动态工作流参考](../../packages/workflow/workflow/README.zh.md)负责脚本语义。
8
8
 
9
9
  源码:浏览器安全词汇位于 [`packages/workflow/workflow/src/types.ts`](../../packages/workflow/workflow/src/types.ts),Host 请求与活跃运行句柄位于 [`runtime-types.ts`](../../packages/workflow/workflow/src/runtime-types.ts)。
10
10
 
@@ -0,0 +1,13 @@
1
+ # Bilingual-pair consistency record for working-directory.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write docs/subsystems/working-directory.md
5
+ /working-directory:
6
+ en: 0882d8b4c09c2890
7
+ zh: a75af7ce19f661fa
8
+ /working-directory/directory-selection:
9
+ en: b67e268cc9422d31
10
+ zh: 4c7243c87aadcd7a
11
+ /working-directory/model-context:
12
+ en: 9789081854cbdd35
13
+ zh: 1f6712c4e5b9c47e
@@ -0,0 +1,64 @@
1
+ # Working Directory
2
+
3
+ English | [中文](working-directory.zh.md)
4
+
5
+ A Session's active directory is owned by [`dsh-working-directory`](../../packages/session/working-directory/README.md). The immutable header identifies the original project; `working-directory/change` records the effective directory used by later directory-based operations. The generated [persistence catalog](../persistence-catalog.md) owns the event declaration.
6
+
7
+ ## Directory selection
8
+
9
+ `ctx.workingDirectory.get(session)` reads the logged value. `ensure(agent)` validates it and restores the original project when the directory disappeared. `set(agent, path)` validates and records a requested change. Sessions without a header directory use the configured runtime fallback; an unavailable fallback produces an error.
10
+
11
+ Changes are local to one Session. Relative filesystem operations, newly started processes, instruction discovery, skills, and file completion use the active directory. Existing terminals and persistent shells retain their own directories. Sandbox writable roots and project membership remain anchored to the original project.
12
+
13
+ ## Model context
14
+
15
+ The initial value and subsequent current values reach the model as required user-context snapshots, even when optional runtime context is disabled. Each committed change attempts to queue a notice through the ordinary Agent inbox; cancellation or disposal can discard notices before request admission. The directory event survives, and the next admitted request receives the current value. Directory context never enters the system prompt. [`working_directory`](../../packages/session/tool-working-directory/README.md) exposes one optional `cd` argument.
16
+
17
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
18
+
19
+ <a id="cordis-surface"></a>
20
+
21
+ ## Cordis API
22
+
23
+ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
24
+
25
+ <a id="ctxworkingdirectory--workingdirectoryservice"></a>
26
+
27
+ ### `ctx.workingDirectory` — `WorkingDirectoryService`
28
+
29
+ One owner for each Session's effective directory and its model-visible changes.
30
+
31
+ ```ts cordis-catalog
32
+ /**
33
+ * Read the committed directory without filesystem I/O.
34
+ * @param session - Session whose directory is requested.
35
+ * @returns its effective absolute directory.
36
+ */
37
+ get(session: Session): string
38
+
39
+ /**
40
+ * Validate the current directory and restore the original project when it disappeared.
41
+ * @param agent - live or unpublished Agent owning the Session.
42
+ * @param signal - cancellation for filesystem inspection.
43
+ * @returns the existing directory; recovery is committed before fulfillment.
44
+ * A notice failure is warned without reverting the committed state.
45
+ * @throws when the original project is also unavailable.
46
+ */
47
+ ensure(agent: Agent, signal?: AbortSignal): Promise<string>
48
+
49
+ /**
50
+ * Change one Session's directory without changing existing processes or permissions.
51
+ * @param agent - live or unpublished Agent owning the Session.
52
+ * @param path - absolute path or a path relative to its current directory.
53
+ * @param signal - cancellation before the durable change.
54
+ * @returns the canonical absolute directory, committed before fulfillment.
55
+ * A notice failure is warned; the next request still receives the committed directory.
56
+ * @throws when the requested path is not an existing directory.
57
+ */
58
+ set(agent: Agent, path: string, signal?: AbortSignal): Promise<string>
59
+ ```
60
+
61
+ Types: [Agent](core.md) · [Session](session.md)
62
+
63
+ Source: [`packages/session/working-directory/src/index.ts`](../../packages/session/working-directory/src/index.ts)
64
+ <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,64 @@
1
+ # 工作目录
2
+
3
+ [English](working-directory.md) | 中文
4
+
5
+ Session 的当前目录由 [`dsh-working-directory`](../../packages/session/working-directory/README.zh.md) 拥有。不可变 header 标识原始项目;`working-directory/change` 记录后续目录相关操作使用的有效目录。生成的[持久化目录](../persistence-catalog.zh.md) 拥有事件声明。
6
+
7
+ ## 目录选择
8
+
9
+ `ctx.workingDirectory.get(session)` 读取日志中的值。`ensure(agent)` 验证它,并在目录消失时恢复原始项目。`set(agent, path)` 验证并记录请求的变更。header 没有目录的 Session 使用配置的运行时回退目录;回退目录不可用时返回错误。
10
+
11
+ 变更仅影响一个 Session。相对路径文件系统操作、新启动的进程、指令发现、技能和文件补全使用当前目录。已有终端和持久 shell 保留自己的目录。沙箱可写根目录与项目归属继续绑定原始项目。
12
+
13
+ ## 模型上下文
14
+
15
+ 初始值与后续当前值通过必需的用户上下文快照到达模型,即使可选运行时上下文被禁用也不例外。每次已提交变更都会尝试通过普通 Agent 收件箱排入通知;取消或销毁可能丢弃尚未进入请求的通知。目录事件仍然保留,下一次获准进入的请求会收到当前值。目录上下文不进入系统提示词。[`working_directory`](../../packages/session/tool-working-directory/README.zh.md) 提供一个可选的 `cd` 参数。
16
+
17
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
18
+
19
+ <a id="cordis-surface"></a>
20
+
21
+ ## Cordis API
22
+
23
+ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
24
+
25
+ <a id="ctxworkingdirectory--workingdirectoryservice"></a>
26
+
27
+ ### `ctx.workingDirectory` — `WorkingDirectoryService`
28
+
29
+ One owner for each Session's effective directory and its model-visible changes.
30
+
31
+ ```ts cordis-catalog
32
+ /**
33
+ * Read the committed directory without filesystem I/O.
34
+ * @param session - Session whose directory is requested.
35
+ * @returns its effective absolute directory.
36
+ */
37
+ get(session: Session): string
38
+
39
+ /**
40
+ * Validate the current directory and restore the original project when it disappeared.
41
+ * @param agent - live or unpublished Agent owning the Session.
42
+ * @param signal - cancellation for filesystem inspection.
43
+ * @returns the existing directory; recovery is committed before fulfillment.
44
+ * A notice failure is warned without reverting the committed state.
45
+ * @throws when the original project is also unavailable.
46
+ */
47
+ ensure(agent: Agent, signal?: AbortSignal): Promise<string>
48
+
49
+ /**
50
+ * Change one Session's directory without changing existing processes or permissions.
51
+ * @param agent - live or unpublished Agent owning the Session.
52
+ * @param path - absolute path or a path relative to its current directory.
53
+ * @param signal - cancellation before the durable change.
54
+ * @returns the canonical absolute directory, committed before fulfillment.
55
+ * A notice failure is warned; the next request still receives the committed directory.
56
+ * @throws when the requested path is not an existing directory.
57
+ */
58
+ set(agent: Agent, path: string, signal?: AbortSignal): Promise<string>
59
+ ```
60
+
61
+ Types: [Agent](core.zh.md) · [Session](session.zh.md)
62
+
63
+ Source: [`packages/session/working-directory/src/index.ts`](../../packages/session/working-directory/src/index.ts)
64
+ <!-- END GENERATED cordis-surface -->
@@ -232,10 +232,10 @@ Typed Remote control of transient Session-owned terminal processes.
232
232
 
233
233
  ```ts cordis-catalog
234
234
  /**
235
- * Read the Session working directory and terminal limits without resolving a shell.
235
+ * Read the Session's current directory and terminal limits without filesystem validation or shell lookup.
236
236
  * @param agent - Session owner supplied by the Gateway.
237
237
  * @param signal - request cancellation.
238
- * @returns the Session workspace directory and terminal limits.
238
+ * @returns the logged current directory and terminal limits; retained terminals keep their own process directories.
239
239
  */
240
240
  @Remote environment(agent: Agent, signal: AbortSignal): TerminalEnvironment
241
241
 
@@ -232,10 +232,10 @@ Typed Remote control of transient Session-owned terminal processes.
232
232
 
233
233
  ```ts cordis-catalog
234
234
  /**
235
- * Read the Session working directory and terminal limits without resolving a shell.
235
+ * Read the Session's current directory and terminal limits without filesystem validation or shell lookup.
236
236
  * @param agent - Session owner supplied by the Gateway.
237
237
  * @param signal - request cancellation.
238
- * @returns the Session workspace directory and terminal limits.
238
+ * @returns the logged current directory and terminal limits; retained terminals keep their own process directories.
239
239
  */
240
240
  @Remote environment(agent: Agent, signal: AbortSignal): TerminalEnvironment
241
241
 
@@ -0,0 +1,13 @@
1
+ # Bilingual-pair consistency record for worktrees.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write docs/subsystems/worktrees.md
5
+ /git-worktrees:
6
+ en: 21ec4a3b825d7e81
7
+ zh: c841c5ca4b4e8959
8
+ /git-worktrees/creation-and-retention:
9
+ en: 53f643c5d30e00b2
10
+ zh: ba9e52efc62c7656
11
+ /git-worktrees/request-and-result:
12
+ en: 8391b091607600eb
13
+ zh: 6c735a337d60d566
@@ -0,0 +1,76 @@
1
+ # Git Worktrees
2
+
3
+ English | [中文](worktrees.zh.md)
4
+
5
+ The experimental [`dsh-experimental-worktree`](../../packages/experimental/worktree/README.md) service provides `ctx.worktrees`. Its [`create_worktree`](../../packages/experimental/tool-worktree/README.md) consumer creates a new Git branch and checkout, then selects it through the [working-directory service](working-directory.md). The [Git Worktrees optional bundle](../../packages/experimental/tool-worktree/README.md#use-this-package) loads both packages through the GUI plugin manager. It ships switched off; explicit compositions can also mount the two packages.
6
+
7
+ ## Creation and retention
8
+
9
+ The calling Session's current directory selects the source repository. Creation pins the requested local commit, branch, or tag before allocating the checkout; omission selects `HEAD`. Each name must identify a new branch and an unused checkout path. The operation neither fetches missing objects nor copies staged, unstaged, untracked, or ignored files from the source checkout.
10
+
11
+ The default destination is `<current checkout root>/.agents/worktrees/<name>`. `repositoryRoot` is the top-level directory of the caller’s current checkout; a linked checkout therefore contains its own pool. The service writes a `.gitignore` containing `*` and a trailing newline only when its allocation creates the configured pool directory. Existing files and ignore rules are preserved. The calling Session’s existing sandbox policy must permit writes to the destination and shared Git administration directory. Successful Git setup precedes the working-directory change.
12
+
13
+ Leaving through `working_directory({ cd: path })` retains the checkout and branch. Cancellation or failure can also retain partial artifacts; the error identifies their location. The service aborts and drains pending operations on disposal. The [package README](../../packages/experimental/worktree/README.md) owns configuration and Git requirements.
14
+
15
+ ## Request and result
16
+
17
+ The request selects only the new name and local revision. The result identifies the created checkout and exact commit; it does not change the Session's original project or write permissions.
18
+
19
+ ```ts type-equiv
20
+ /** A new checkout from a locally available Git commit, branch, or tag. */
21
+ interface CreateWorktreeRequest {
22
+ /** New branch name, also used as the relative checkout directory; omission generates a name. */
23
+ name?: string
24
+ /** Local revision to resolve before creation; omission selects HEAD. */
25
+ from?: string
26
+ }
27
+ ```
28
+
29
+ ```ts type-equiv
30
+ /** Committed Git baseline and the calling Session's resulting working directory. */
31
+ interface CreatedWorktree {
32
+ /** Canonical absolute checkout directory in the filesystem provider's execution world. */
33
+ path: string
34
+ /** Newly created branch name. */
35
+ branch: string
36
+ /** Resolved commit object name; repository-local replacement refs can change its checked-out content. */
37
+ baseCommit: string
38
+ /** Canonical root of the source checkout. */
39
+ repositoryRoot: string
40
+ }
41
+ ```
42
+
43
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
44
+
45
+ <a id="cordis-surface"></a>
46
+
47
+ ## Cordis API
48
+
49
+ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
50
+
51
+ <a id="ctxworktrees--worktreeservice"></a>
52
+
53
+ ### `ctx.worktrees` — `WorktreeService`
54
+
55
+ Creates retained Git worktrees under the mounted filesystem and sandbox providers.
56
+
57
+ ```ts cordis-catalog
58
+ /**
59
+ * Create a fresh branch and checkout at a pinned local revision, then enter it.
60
+ * Existing branches or checkout paths fail. Uncommitted files stay in the source checkout.
61
+ * Checkout disables configured clean, smudge, and process filters without changing Git config.
62
+ * Repository-local replacement refs still apply; baseCommit reports the resolved object name.
63
+ * The new checkout becomes current only after Git setup succeeds. Failures may retain newly
64
+ * allocated Git/filesystem artifacts; no branch or checkout is removed automatically.
65
+ * @param agent - caller whose current directory selects the source repository and file policy.
66
+ * @param request - optional new name and local revision; defaults are generated name and HEAD.
67
+ * @param signal - cancellation of lookup, creation, and working-directory publication.
68
+ * @returns canonical checkout path, branch name, pinned commit, and source repository root.
69
+ */
70
+ async create(agent: Agent, request: CreateWorktreeRequest = {}, signal?: AbortSignal): Promise<CreatedWorktree>
71
+ ```
72
+
73
+ Types: [Agent](core.md)
74
+
75
+ Source: [`packages/experimental/worktree/src/index.ts`](../../packages/experimental/worktree/src/index.ts)
76
+ <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,76 @@
1
+ # Git 工作树
2
+
3
+ [English](worktrees.md) | 中文
4
+
5
+ 实验性的 [`dsh-experimental-worktree`](../../packages/experimental/worktree/README.zh.md) 服务提供 `ctx.worktrees`。其消费方 [`create_worktree`](../../packages/experimental/tool-worktree/README.zh.md) 创建新的 Git 分支与检出目录,再通过[工作目录服务](working-directory.zh.md)选中它。[Git 工作树可选 bundle](../../packages/experimental/tool-worktree/README.zh.md#use-this-package)通过 GUI 插件管理器一起加载这两个包。它随安装提供,但默认关闭;显式组合也可以挂载这两个包。
6
+
7
+ ## 创建与保留
8
+
9
+ 调用方 Session 的当前目录决定源仓库。创建操作在分配检出目录前,将请求的本地提交、分支或标签固定为具体提交;省略时选择 `HEAD`。每个名称必须对应新分支与未使用的检出路径。操作既不获取缺失对象,也不复制源检出目录中的暂存、未暂存、未跟踪或被忽略文件。
10
+
11
+ 默认目标为 `<current checkout root>/.agents/worktrees/<name>`。`repositoryRoot` 是调用方当前检出目录的顶层目录;因此,链接检出目录会在自身内部保存工作树父目录。仅当服务的分配操作创建了配置指定的父目录时,服务才会写入内容为 `*` 加换行符的 `.gitignore`。已有文件与忽略规则保持不变。调用方 Session 的现有沙箱策略必须允许写入目标目录与共享 Git 管理目录。Git 初始化成功后才改变工作目录。
12
+
13
+ 通过 `working_directory({ cd: path })` 离开时,会保留检出目录与分支。取消或失败也可能留下部分产物;错误会指出它们的位置。服务销毁时会中止待完成操作并等待它们结束。[包 README](../../packages/experimental/worktree/README.zh.md)拥有配置与 Git 要求。
14
+
15
+ ## 请求与结果
16
+
17
+ 请求只选择新名称与本地版本。结果标识创建的检出目录与确切提交;它不会改变 Session 的原始项目或写权限。
18
+
19
+ ```ts type-equiv
20
+ /** A new checkout from a locally available Git commit, branch, or tag. */
21
+ interface CreateWorktreeRequest {
22
+ /** New branch name, also used as the relative checkout directory; omission generates a name. */
23
+ name?: string
24
+ /** Local revision to resolve before creation; omission selects HEAD. */
25
+ from?: string
26
+ }
27
+ ```
28
+
29
+ ```ts type-equiv
30
+ /** Committed Git baseline and the calling Session's resulting working directory. */
31
+ interface CreatedWorktree {
32
+ /** Canonical absolute checkout directory in the filesystem provider's execution world. */
33
+ path: string
34
+ /** Newly created branch name. */
35
+ branch: string
36
+ /** Resolved commit object name; repository-local replacement refs can change its checked-out content. */
37
+ baseCommit: string
38
+ /** Canonical root of the source checkout. */
39
+ repositoryRoot: string
40
+ }
41
+ ```
42
+
43
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
44
+
45
+ <a id="cordis-surface"></a>
46
+
47
+ ## Cordis API
48
+
49
+ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
50
+
51
+ <a id="ctxworktrees--worktreeservice"></a>
52
+
53
+ ### `ctx.worktrees` — `WorktreeService`
54
+
55
+ Creates retained Git worktrees under the mounted filesystem and sandbox providers.
56
+
57
+ ```ts cordis-catalog
58
+ /**
59
+ * Create a fresh branch and checkout at a pinned local revision, then enter it.
60
+ * Existing branches or checkout paths fail. Uncommitted files stay in the source checkout.
61
+ * Checkout disables configured clean, smudge, and process filters without changing Git config.
62
+ * Repository-local replacement refs still apply; baseCommit reports the resolved object name.
63
+ * The new checkout becomes current only after Git setup succeeds. Failures may retain newly
64
+ * allocated Git/filesystem artifacts; no branch or checkout is removed automatically.
65
+ * @param agent - caller whose current directory selects the source repository and file policy.
66
+ * @param request - optional new name and local revision; defaults are generated name and HEAD.
67
+ * @param signal - cancellation of lookup, creation, and working-directory publication.
68
+ * @returns canonical checkout path, branch name, pinned commit, and source repository root.
69
+ */
70
+ async create(agent: Agent, request: CreateWorktreeRequest = {}, signal?: AbortSignal): Promise<CreatedWorktree>
71
+ ```
72
+
73
+ Types: [Agent](core.zh.md)
74
+
75
+ Source: [`packages/experimental/worktree/src/index.ts`](../../packages/experimental/worktree/src/index.ts)
76
+ <!-- END GENERATED cordis-surface -->
@@ -9,8 +9,8 @@
9
9
  en: c024da7e8d9cb056
10
10
  zh: c4cc1a66d2903656
11
11
  /testing-policy/how-specs-execute:
12
- en: 298c13b105e86eae
13
- zh: 4f1b0b7742fb7b49
12
+ en: 5d8eb65958da096d
13
+ zh: 4a40f1c5fe5b2d14
14
14
  /testing-policy/the-with-key-policy-inference-is-cheap-here:
15
15
  en: d555af53068bf523
16
16
  zh: ddc4265e5de5b3be
@@ -18,7 +18,7 @@ Session fixtures retain headers and payloads but omit body sequence/time envelop
18
18
 
19
19
  ## How specs execute
20
20
 
21
- Forked workers run several spec files at once, the coverage gate splits into concurrent partitions beside the other gates in its job, and the self-hosted runners share one host and one volume. Only the process is isolated: ports, predictable paths, external namespaces, and inherited children are not. Own each acquired resource through its teardown, and read a spec that passes only when it runs alone as a defect in the spec rather than an unstable runner. [dsh-ci-test-reliability](../.agents/skills/dsh-ci-test-reliability/SKILL.md) owns the allocation, restoration, synchronization, timeout-budget, platform, and teardown rules; its [flake diagnosis workflow](../.agents/skills/dsh-ci-test-reliability/references/ci-flake-diagnosis.md) classifies an existing probabilistic failure.
21
+ Forked workers run several spec files at once, the coverage gate splits into concurrent partitions beside the other gates in its job, and the self-hosted runners share one host and one volume. Only the process is isolated: ports, predictable paths, external namespaces, and inherited children are not. Own each acquired resource through teardown. A spec passing only alone has a test defect, not an unstable runner. [dsh-ci-test-reliability](../.agents/skills/dsh-ci-test-reliability/SKILL.md) owns the allocation, restoration, synchronization, timeout-budget, platform, and teardown rules; its [flake diagnosis workflow](../.agents/skills/dsh-ci-test-reliability/references/ci-flake-diagnosis.md) classifies an existing probabilistic failure. [Unexpected fork exits](../scripts/coverage-fork-diagnostics.ts) report PID, file, code, and signal.
22
22
 
23
23
  ## The with-key policy: inference is cheap here
24
24
 
@@ -18,7 +18,7 @@ Session fixture 保留 header 与 payload,但省略正文 seq/time envelope;
18
18
 
19
19
  ## spec 如何被执行
20
20
 
21
- fork 出的 worker 会同时运行多个 spec 文件,coverage gate 会拆成并发的 partition,与同一个 job 中的其它 gate 并排运行,而自托管 runner 共用同一台宿主机和同一个卷。被隔离的只有进程:端口、可预测路径、外部命名空间和继承而来的子进程都不隔离。为每个占用的资源负责到它的 teardown,并把「只有单独运行时才通过」的 spec 读作该 spec 的缺陷,而不是 runner 不稳定。[dsh-ci-test-reliability](../.agents/skills/dsh-ci-test-reliability/SKILL.md) 负责资源分配、状态恢复、同步、超时预算、平台差异与 teardown 规则;它的 [flake 诊断流程](../.agents/skills/dsh-ci-test-reliability/references/ci-flake-diagnosis.md)用于归类已经存在的概率性失败。
21
+ fork 出的 worker 会同时运行多个 spec 文件,coverage gate 会拆成并发的 partition,与同一个 job 中的其它 gate 并排运行,而自托管 runner 共用同一台宿主机和同一个卷。被隔离的只有进程:端口、可预测路径、外部命名空间和继承而来的子进程都不隔离。为每个占用的资源负责到 teardown。只在单独运行时通过的 spec 存在测试缺陷,而非 runner 不稳定。[dsh-ci-test-reliability](../.agents/skills/dsh-ci-test-reliability/SKILL.md) 负责资源分配、状态恢复、同步、超时预算、平台差异与 teardown 规则;它的 [flake 诊断流程](../.agents/skills/dsh-ci-test-reliability/references/ci-flake-diagnosis.md)用于归类已经存在的概率性失败。 [fork 意外退出](../scripts/coverage-fork-diagnostics.ts)时会报告 PID、文件、退出码和信号。
22
22
 
23
23
  ## 带密钥策略:推理(inference)在这里很便宜
24
24