dsh-plugin-guide 0.3.26 → 0.3.29

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 (292) hide show
  1. package/README-es.md +30 -11
  2. package/README-hi.md +30 -11
  3. package/README-pt.md +30 -11
  4. package/README-zh.md +32 -11
  5. package/README.md +36 -16
  6. package/SKILL.md +4 -3
  7. package/dist/dsh-plugin-dev.js +17 -8
  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/package.json +4 -3
  24. package/references/community-ecosystem.md +2 -1
  25. package/references/dev-resource-landscape.md +294 -0
  26. package/references/official-docs/AGENTS.md +4 -5
  27. package/references/official-docs/SNAPSHOT.md +3 -3
  28. package/references/official-docs/THIRD_PARTY_NOTICES.md +2 -1
  29. package/references/official-docs/docs/AGENTS.md +1 -1
  30. package/references/official-docs/docs/architecture.i18n.yaml +14 -14
  31. package/references/official-docs/docs/architecture.md +11 -12
  32. package/references/official-docs/docs/architecture.zh.md +11 -12
  33. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  34. package/references/official-docs/docs/capability-seams.md +48 -23
  35. package/references/official-docs/docs/capability-seams.zh.md +48 -23
  36. package/references/official-docs/docs/cli-help.i18n.yaml +34 -0
  37. package/references/official-docs/docs/cli-help.md +203 -0
  38. package/references/official-docs/docs/cli-help.zh.md +205 -0
  39. package/references/official-docs/docs/config-catalog.md +305 -145
  40. package/references/official-docs/docs/config-catalog.zh.md +305 -145
  41. package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +6 -6
  42. package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +7 -5
  43. package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +7 -5
  44. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +6 -6
  45. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +11 -9
  46. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +11 -9
  47. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +4 -4
  48. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +5 -5
  49. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +5 -5
  50. package/references/official-docs/docs/defensive-patterns.i18n.yaml +2 -2
  51. package/references/official-docs/docs/defensive-patterns.md +1 -1
  52. package/references/official-docs/docs/defensive-patterns.zh.md +1 -1
  53. package/references/official-docs/docs/development.i18n.yaml +6 -6
  54. package/references/official-docs/docs/development.md +4 -2
  55. package/references/official-docs/docs/development.zh.md +4 -2
  56. package/references/official-docs/docs/event-producer-consumer.md +33 -33
  57. package/references/official-docs/docs/event-producer-consumer.zh.md +33 -33
  58. package/references/official-docs/docs/experimental-persistence-catalog.i18n.yaml +10 -0
  59. package/references/official-docs/docs/experimental-persistence-catalog.md +17 -0
  60. package/references/official-docs/docs/experimental-persistence-catalog.zh.md +17 -0
  61. package/references/official-docs/docs/module-graph.md +202 -131
  62. package/references/official-docs/docs/module-graph.zh.md +202 -131
  63. package/references/official-docs/docs/persistence-catalog.i18n.yaml +185 -158
  64. package/references/official-docs/docs/persistence-catalog.md +213 -112
  65. package/references/official-docs/docs/persistence-catalog.zh.md +213 -112
  66. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.i18n.yaml +28 -0
  67. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.md +48 -0
  68. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.schema.json +76 -0
  69. package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
  70. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +4 -4
  71. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +2 -2
  72. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +2 -2
  73. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.i18n.yaml +28 -0
  74. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
  75. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.schema.json +290 -0
  76. package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
  77. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.i18n.yaml +28 -0
  78. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
  79. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.schema.json +457 -0
  80. package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
  81. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.i18n.yaml +28 -0
  82. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
  83. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.schema.json +11474 -0
  84. package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
  85. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.i18n.yaml +28 -0
  86. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
  87. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.schema.json +2990 -0
  88. package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
  89. package/references/official-docs/docs/persistence-changes/README.i18n.yaml +4 -4
  90. package/references/official-docs/docs/persistence-changes/README.md +12 -10
  91. package/references/official-docs/docs/persistence-changes/README.zh.md +12 -10
  92. package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +2 -2
  93. package/references/official-docs/docs/persistence-changes/historical-formats/README.md +1 -1
  94. package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +1 -1
  95. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +2 -2
  96. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.md +50 -50
  97. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +50 -50
  98. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +2 -2
  99. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.md +14 -14
  100. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +14 -14
  101. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +2 -2
  102. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.md +3 -3
  103. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +3 -3
  104. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +2 -2
  105. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.md +10 -10
  106. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +10 -10
  107. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +2 -2
  108. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.md +3 -3
  109. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +3 -3
  110. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +2 -2
  111. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.md +13 -13
  112. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +13 -13
  113. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +2 -2
  114. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +63 -63
  115. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +63 -63
  116. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +2 -2
  117. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +54 -54
  118. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +54 -54
  119. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +2 -2
  120. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +7 -7
  121. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +7 -7
  122. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +2 -2
  123. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +27 -27
  124. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +27 -27
  125. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +2 -2
  126. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +4 -4
  127. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +4 -4
  128. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +2 -2
  129. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +27 -27
  130. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +27 -27
  131. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +2 -2
  132. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +7 -7
  133. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +7 -7
  134. package/references/official-docs/docs/persistence-schema.json +2084 -1827
  135. package/references/official-docs/docs/session-format-status.i18n.yaml +6 -6
  136. package/references/official-docs/docs/session-format-status.md +6 -6
  137. package/references/official-docs/docs/session-format-status.zh.md +6 -6
  138. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  139. package/references/official-docs/docs/subsystems/README.md +4 -1
  140. package/references/official-docs/docs/subsystems/README.zh.md +4 -1
  141. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +7 -7
  142. package/references/official-docs/docs/subsystems/agent-team.md +10 -10
  143. package/references/official-docs/docs/subsystems/agent-team.zh.md +10 -10
  144. package/references/official-docs/docs/subsystems/boot.i18n.yaml +2 -2
  145. package/references/official-docs/docs/subsystems/boot.md +4 -4
  146. package/references/official-docs/docs/subsystems/boot.zh.md +4 -4
  147. package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +2 -2
  148. package/references/official-docs/docs/subsystems/claude-code-mods.md +1 -1
  149. package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +1 -1
  150. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
  151. package/references/official-docs/docs/subsystems/jobs.md +2 -3
  152. package/references/official-docs/docs/subsystems/jobs.zh.md +2 -3
  153. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +4 -4
  154. package/references/official-docs/docs/subsystems/llm-streaming.md +41 -14
  155. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +41 -14
  156. package/references/official-docs/docs/subsystems/persistence.md +2 -0
  157. package/references/official-docs/docs/subsystems/persistence.zh.md +2 -0
  158. package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
  159. package/references/official-docs/docs/subsystems/plan.md +1 -1
  160. package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
  161. package/references/official-docs/docs/subsystems/session-query.md +2 -0
  162. package/references/official-docs/docs/subsystems/session-query.zh.md +2 -0
  163. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +6 -6
  164. package/references/official-docs/docs/subsystems/session-title.md +14 -5
  165. package/references/official-docs/docs/subsystems/session-title.zh.md +14 -5
  166. package/references/official-docs/docs/subsystems/session.i18n.yaml +3 -0
  167. package/references/official-docs/docs/subsystems/session.md +48 -5
  168. package/references/official-docs/docs/subsystems/session.zh.md +48 -5
  169. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  170. package/references/official-docs/docs/subsystems/skills.md +2 -2
  171. package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
  172. package/references/official-docs/docs/subsystems/slots.md +10 -8
  173. package/references/official-docs/docs/subsystems/slots.zh.md +10 -8
  174. package/references/official-docs/docs/subsystems/ssh.i18n.yaml +2 -2
  175. package/references/official-docs/docs/subsystems/ssh.md +22 -11
  176. package/references/official-docs/docs/subsystems/ssh.zh.md +22 -11
  177. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +24 -27
  178. package/references/official-docs/docs/subsystems/subagent.md +165 -229
  179. package/references/official-docs/docs/subsystems/subagent.zh.md +167 -233
  180. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  181. package/references/official-docs/docs/subsystems/system-prompt.md +32 -2
  182. package/references/official-docs/docs/subsystems/system-prompt.zh.md +32 -2
  183. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  184. package/references/official-docs/docs/subsystems/tools.md +3 -3
  185. package/references/official-docs/docs/subsystems/tools.zh.md +3 -3
  186. package/references/official-docs/docs/subsystems/translation.i18n.yaml +19 -0
  187. package/references/official-docs/docs/subsystems/translation.md +103 -0
  188. package/references/official-docs/docs/subsystems/translation.zh.md +103 -0
  189. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +8 -8
  190. package/references/official-docs/docs/subsystems/web-server.md +43 -8
  191. package/references/official-docs/docs/subsystems/web-server.zh.md +43 -8
  192. package/references/official-docs/docs/subsystems/webhook.md +1 -1
  193. package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
  194. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  195. package/references/official-docs/docs/subsystems/workflow.md +1 -1
  196. package/references/official-docs/docs/subsystems/workflow.zh.md +1 -1
  197. package/references/official-docs/docs/subsystems/working-directory.i18n.yaml +13 -0
  198. package/references/official-docs/docs/subsystems/working-directory.md +64 -0
  199. package/references/official-docs/docs/subsystems/working-directory.zh.md +64 -0
  200. package/references/official-docs/docs/subsystems/workspace.md +2 -2
  201. package/references/official-docs/docs/subsystems/workspace.zh.md +2 -2
  202. package/references/official-docs/docs/subsystems/worktrees.i18n.yaml +13 -0
  203. package/references/official-docs/docs/subsystems/worktrees.md +76 -0
  204. package/references/official-docs/docs/subsystems/worktrees.zh.md +76 -0
  205. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  206. package/references/official-docs/docs/testing.md +1 -1
  207. package/references/official-docs/docs/testing.zh.md +1 -1
  208. package/references/official-docs/docs/tool-catalog.i18n.yaml +57 -45
  209. package/references/official-docs/docs/tool-catalog.md +95 -41
  210. package/references/official-docs/docs/tool-catalog.zh.md +99 -45
  211. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.i18n.yaml +16 -0
  212. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
  213. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
  214. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.i18n.yaml +16 -0
  215. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
  216. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
  217. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.i18n.yaml +16 -0
  218. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
  219. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
  220. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.i18n.yaml +16 -0
  221. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
  222. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
  223. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.i18n.yaml +16 -0
  224. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
  225. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
  226. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.i18n.yaml +16 -0
  227. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
  228. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
  229. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.i18n.yaml +16 -0
  230. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
  231. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
  232. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.i18n.yaml +16 -0
  233. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
  234. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
  235. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.i18n.yaml +16 -0
  236. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
  237. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
  238. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.i18n.yaml +16 -0
  239. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
  240. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
  241. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.i18n.yaml +16 -0
  242. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
  243. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
  244. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.i18n.yaml +16 -0
  245. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
  246. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
  247. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.i18n.yaml +16 -0
  248. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
  249. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
  250. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.i18n.yaml +16 -0
  251. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
  252. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
  253. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.i18n.yaml +16 -0
  254. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
  255. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
  256. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.i18n.yaml +16 -0
  257. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
  258. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
  259. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.i18n.yaml +16 -0
  260. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
  261. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
  262. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.i18n.yaml +16 -0
  263. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
  264. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
  265. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.i18n.yaml +16 -0
  266. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
  267. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
  268. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.i18n.yaml +16 -0
  269. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
  270. package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
  271. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +4 -4
  272. package/references/official-docs/docs/user/guide/github-review.md +7 -10
  273. package/references/official-docs/docs/user/guide/github-review.zh.md +7 -10
  274. package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +8 -8
  275. package/references/official-docs/docs/user/guide/public-deployments.md +9 -5
  276. package/references/official-docs/docs/user/guide/public-deployments.zh.md +9 -5
  277. package/references/official-docs/packages/README.md +4 -6
  278. package/references/official-docs/website-docs.ts +1 -0
  279. package/references/official-plugin-dev-skill.md +2 -2
  280. package/references/sources.md +1 -1
  281. package/scripts/build-llms-full.mjs +8 -0
  282. package/scripts/verify-kit.ps1 +8 -1
  283. package/templates/js/README-es.md +1 -1
  284. package/templates/js/README-hi.md +1 -1
  285. package/templates/js/README-pt.md +1 -1
  286. package/templates/js/README-zh.md +1 -1
  287. package/templates/js/README.md +1 -1
  288. package/templates/ts/README-es.md +1 -1
  289. package/templates/ts/README-hi.md +1 -1
  290. package/templates/ts/README-pt.md +1 -1
  291. package/templates/ts/README-zh.md +1 -1
  292. package/templates/ts/README.md +1 -1
@@ -15,5 +15,5 @@
15
15
  en: e31de7452a4f1186
16
16
  zh: db697d4db7f88642
17
17
  /system-prompt-assembly/dynamic-prompt-context:
18
- en: 043740c2cf02b0aa
19
- zh: 5f0bca1306975c72
18
+ en: 2abb13dec8e6d041
19
+ zh: 8cf434f360d8a519
@@ -82,8 +82,26 @@ interface PromptContext {
82
82
  readonly name: string
83
83
  /** Contexts are joined in ascending order. */
84
84
  readonly order: number
85
- /** Static text or a provider evaluated for each assembly. Empty text contributes nothing. */
85
+ /** Static text or a provider evaluated at assembly and admission refresh. Empty text contributes nothing. */
86
86
  readonly text: string | ((context: AssembleContext) => string)
87
+ /** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
88
+ readonly interpolate?: boolean
89
+ /** Keep this operational context when optional runtime context is disabled. */
90
+ readonly required?: boolean
91
+ }
92
+ ```
93
+
94
+ `required: true` keeps an operational contribution when optional runtime context is suppressed. `interpolate: false` preserves literal text, including variable-like directory names. `AssembledContext` carries the resolved text and that interpolation choice into rendering.
95
+
96
+ ```ts type-equiv
97
+ /** One resolved dynamic context contribution. */
98
+ interface AssembledContext {
99
+ /** The contributing context's unique name. */
100
+ name: string
101
+ /** The resolved text before variable interpolation. */
102
+ text: string
103
+ /** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
104
+ interpolate?: boolean
87
105
  }
88
106
  ```
89
107
 
@@ -135,7 +153,7 @@ getContextOrder(name: PromptContextOrderName): number
135
153
  context(context: PromptContext): () => void
136
154
 
137
155
  /**
138
- * Suppress every dynamic runtime-context contribution in the calling
156
+ * Suppress optional dynamic runtime-context contributions in the calling
139
157
  * context's scope without changing the services that own or enforce those
140
158
  * facts. Multiple suppressors remain independently disposable.
141
159
  * @returns the exact Cordis effect disposer.
@@ -161,6 +179,18 @@ tools(provider: (context: AssembleContext) => ToolProviderResult): () => void
161
179
  */
162
180
  variable(name: string, provider: (context: AssembleContext) => string | undefined): () => void
163
181
 
182
+ /**
183
+ * Refresh accepted registered runtime facts for request admission. Contexts
184
+ * added only by the assembly waterfall retain their accepted values. Current
185
+ * suppression removes optional contexts, and missing required registrations
186
+ * are restored in registry order. Sections, tools, and interpolation variables
187
+ * retain the accepted assembly; their providers and waterfall do not rerun.
188
+ * @param assembly - accepted assembly for this scope and step.
189
+ * @param context - the same scope and current plugin-defined assembly fields.
190
+ * @returns the accepted assembly with current runtime-context provider text.
191
+ */
192
+ refreshContext(assembly: PromptAssembly, context: AssembleContext = {}): PromptAssembly
193
+
164
194
  /**
165
195
  * Assemble global and scoped providers, detach tool parameters, apply
166
196
  * canonical ordering, then run the assembly waterfall. Scoped sections and
@@ -82,8 +82,26 @@ interface PromptContext {
82
82
  readonly name: string
83
83
  /** Contexts are joined in ascending order. */
84
84
  readonly order: number
85
- /** Static text or a provider evaluated for each assembly. Empty text contributes nothing. */
85
+ /** Static text or a provider evaluated at assembly and admission refresh. Empty text contributes nothing. */
86
86
  readonly text: string | ((context: AssembleContext) => string)
87
+ /** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
88
+ readonly interpolate?: boolean
89
+ /** Keep this operational context when optional runtime context is disabled. */
90
+ readonly required?: boolean
91
+ }
92
+ ```
93
+
94
+ `required: true` 在可选运行时上下文被抑制时保留操作所需的贡献。`interpolate: false` 原样保留文本,包括看起来像变量的目录名。`AssembledContext` 将已求值文本及其插值选择传给渲染过程。
95
+
96
+ ```ts type-equiv
97
+ /** One resolved dynamic context contribution. */
98
+ interface AssembledContext {
99
+ /** The contributing context's unique name. */
100
+ name: string
101
+ /** The resolved text before variable interpolation. */
102
+ text: string
103
+ /** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
104
+ interpolate?: boolean
87
105
  }
88
106
  ```
89
107
 
@@ -135,7 +153,7 @@ getContextOrder(name: PromptContextOrderName): number
135
153
  context(context: PromptContext): () => void
136
154
 
137
155
  /**
138
- * Suppress every dynamic runtime-context contribution in the calling
156
+ * Suppress optional dynamic runtime-context contributions in the calling
139
157
  * context's scope without changing the services that own or enforce those
140
158
  * facts. Multiple suppressors remain independently disposable.
141
159
  * @returns the exact Cordis effect disposer.
@@ -161,6 +179,18 @@ tools(provider: (context: AssembleContext) => ToolProviderResult): () => void
161
179
  */
162
180
  variable(name: string, provider: (context: AssembleContext) => string | undefined): () => void
163
181
 
182
+ /**
183
+ * Refresh accepted registered runtime facts for request admission. Contexts
184
+ * added only by the assembly waterfall retain their accepted values. Current
185
+ * suppression removes optional contexts, and missing required registrations
186
+ * are restored in registry order. Sections, tools, and interpolation variables
187
+ * retain the accepted assembly; their providers and waterfall do not rerun.
188
+ * @param assembly - accepted assembly for this scope and step.
189
+ * @param context - the same scope and current plugin-defined assembly fields.
190
+ * @returns the accepted assembly with current runtime-context provider text.
191
+ */
192
+ refreshContext(assembly: PromptAssembly, context: AssembleContext = {}): PromptAssembly
193
+
164
194
  /**
165
195
  * Assemble global and scoped providers, detach tool parameters, apply
166
196
  * canonical ordering, then run the assembly waterfall. Scoped sections and
@@ -15,8 +15,8 @@
15
15
  en: 8c3fc4ca26f7e314
16
16
  zh: 2e27263cb25243b9
17
17
  /tools/execution-extensible-waterfalls-plus-monotonic-policy:
18
- en: 1ff922c9803d5456
19
- zh: 983d71cbbff7b702
18
+ en: dcac8fa88ef3e719
19
+ zh: aae2f4ce8852d8d8
20
20
  /tools/the-enforced-raw-json-schema-subset:
21
21
  en: 28e354bfa2f9cebb
22
22
  zh: be1f75abccf8afdf
@@ -17,7 +17,7 @@ interface ToolOutputDefinition {
17
17
  readonly schema: JsonSchemaNode
18
18
  /** Pure projection from validated arguments and value to Native/model content. */
19
19
  render(args: unknown, value: JsonValue): ContentBlock[]
20
- /** Pure replayable presentation projection, computed only for top-level calls. */
20
+ /** Pure replayable presentation projection for native and nested calls. */
21
21
  presentationMeta?(args: unknown, value: JsonValue): JsonValue
22
22
  }
23
23
  ```
@@ -389,9 +389,9 @@ interface ToolErrorInfo {
389
389
  }
390
390
  ```
391
391
 
392
- The result carries only the outcome. Call identity remains on the immutable `ToolExecution` that accompanies it through every hook and on the durable `tool/call` / `tool/result` session events, so wrappers cannot create a second, disagreeing identity. The canonical `value` is execution-local: the loop persists only `content`, `error`, and `meta`, while `tool/ptc-dispatch` stores the sub-call's rendered `content`, `isError`, and optional structured `error`. Replay reproduces presentation but cannot reconstruct canonical intermediate values. Optional `ToolErrorInfo.reason` retains raw user-facing detail without adding it to model-facing content.
392
+ The result carries only the outcome. Call identity remains on the immutable `ToolExecution` that accompanies it through every hook and on the durable `tool/call` / `tool/result` session events, so wrappers cannot create a second, disagreeing identity. The canonical `value` is execution-local: the loop persists only `content`, `error`, and `meta`, while `tool/ptc-dispatch` stores the sub-call's rendered `content`, `isError`, optional structured `error`, and presentation `meta`. Replay reproduces presentation but cannot reconstruct canonical intermediate values. Optional `ToolErrorInfo.reason` retains raw user-facing detail without adding it to model-facing content.
393
393
 
394
- On success the registry snapshots and validates the body value, freezes it, and invokes the pure renderer plus the optional top-level-call metadata projector. It separately materializes the durable presentation fields immediately before `tools/result`; an invalid value, renderer/projector failure, or non-JSON presentation becomes a JSON-safe `isError`. The final live observer therefore sees the exact execution-local value beside fields safe for the later durable append.
394
+ On success the registry snapshots and validates the body value, freezes it, and invokes the pure renderer plus the optional presentation metadata projector for native and nested calls. It separately materializes the durable presentation fields immediately before `tools/result`; an invalid value, renderer/projector failure, or non-JSON presentation becomes a JSON-safe `isError`. The final live observer therefore sees the exact execution-local value beside fields safe for the later durable append.
395
395
 
396
396
  Before final content, the registry materializes the candidate result; a failure in content, structured error, additional context, or presentation metadata becomes a JSON-safe `isError` result that still reaches `finalizeContent`. The registry invokes that callback exactly once, then materializes and freezes the accepted result immediately before `tools/result`, so the observed live outcome is safe for the later durable `tool/result` append.
397
397
 
@@ -17,7 +17,7 @@ interface ToolOutputDefinition {
17
17
  readonly schema: JsonSchemaNode
18
18
  /** Pure projection from validated arguments and value to Native/model content. */
19
19
  render(args: unknown, value: JsonValue): ContentBlock[]
20
- /** Pure replayable presentation projection, computed only for top-level calls. */
20
+ /** Pure replayable presentation projection for native and nested calls. */
21
21
  presentationMeta?(args: unknown, value: JsonValue): JsonValue
22
22
  }
23
23
  ```
@@ -389,9 +389,9 @@ interface ToolErrorInfo {
389
389
  }
390
390
  ```
391
391
 
392
- 结果仅承载产出。调用身份保留在不可变的 `ToolExecution` 上,后者伴随结果经过每个钩子,并出现在持久化的 `tool/call` / `tool/result` 会话事件上,因此包装层无法创建第二个相互矛盾的身份。规范的 `value` 仅存在于执行期间:循环只持久化 `content`、`error` 和 `meta`,`tool/ptc-dispatch` 则存储子调用渲染后的 `content`、`isError` 与可选结构化 `error`。回放可以重现展示,却无法重建规范的中间值。可选的 `ToolErrorInfo.reason` 保留面向用户的原始详情,不将其加入模型可见内容。
392
+ 结果仅承载产出。调用身份保留在不可变的 `ToolExecution` 上,后者伴随结果经过每个钩子,并出现在持久化的 `tool/call` / `tool/result` 会话事件上,因此包装层无法创建第二个相互矛盾的身份。规范的 `value` 仅存在于执行期间:循环只持久化 `content`、`error` 和 `meta`,`tool/ptc-dispatch` 则存储子调用渲染后的 `content`、`isError`、可选结构化 `error` 和展示 `meta`。回放可以重现展示,却无法重建规范的中间值。可选的 `ToolErrorInfo.reason` 保留面向用户的原始详情,不将其加入模型可见内容。
393
393
 
394
- 成功时,注册表会快照并校验函数体返回值,将其冻结,然后调用纯渲染器;对于直接的外层调用,还会调用可选的元数据投影器。注册表会在 `tools/result` 之前另行物化持久展示字段;无效值、渲染器/投影器失败或非 JSON 展示都会转为 JSON 安全的 `isError`。因此,最终实时观察者能看到精确的执行期值,以及可安全用于后续持久追加的字段。
394
+ 成功时,注册表会快照并校验函数体返回值,将其冻结,然后调用纯渲染器,并为原生与嵌套调用执行可选的展示元数据投影器。注册表会在 `tools/result` 之前另行物化持久展示字段;无效值、渲染器/投影器失败或非 JSON 展示都会转为 JSON 安全的 `isError`。因此,最终实时观察者能看到精确的执行期值,以及可安全用于后续持久追加的字段。
395
395
 
396
396
  在得到最终内容之前,注册表会物化候选结果;若内容、结构化错误、附加上下文或展示元数据无法物化,则会转为仍可到达 `finalizeContent` 的 JSON 安全 `isError` 结果。注册表恰好调用该回调一次,随后在 `tools/result` 之前立即物化并冻结已接受的结果,因此实时观察到的产出可安全用于后续持久化的 `tool/result` 追加。
397
397
 
@@ -0,0 +1,19 @@
1
+ # Bilingual-pair consistency record for translation.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/translation.md
5
+ /text-translation:
6
+ en: fe10b0616f7bc164
7
+ zh: 84a392a62efdaab9
8
+ /text-translation/requests-and-results:
9
+ en: 485abf6107c73e68
10
+ zh: 78a274d488274035
11
+ /text-translation/failures-and-data-handling:
12
+ en: cf92a1920650888c
13
+ zh: 3e8d3aa244cc8d46
14
+ /text-translation/persistent-translations:
15
+ en: 40d175fbe66fd4cd
16
+ zh: bff18511a8d386e9
17
+ /text-translation/reasoning-display:
18
+ en: aaf7d361b682fe4a
19
+ zh: 485e89bdb063665e
@@ -0,0 +1,103 @@
1
+ # Text translation
2
+
3
+ English | [中文](translation.zh.md)
4
+
5
+ The experimental [translator](../../packages/experimental/translator/README.md) translates text through anonymous browser endpoints or explicitly selected paid native Flash routes. Consumers own display, scheduling, and Session activation; Session-bound requests retain reusable results through an active Session writer.
6
+
7
+ ## Requests and results
8
+
9
+ `TranslationProvider` selects `bing`, `google`, `deepseek-account` or `deepseek-official`. `TranslationRequest` supplies `text`, `targetLanguage`, and optional `sourceLanguage`, `provider` and branded `sessionId`. `resolve()` captures explicit routing in `TranslationSpec`: the configured provider defaults to Bing and omitted source language uses automatic detection. Common Chinese locale tags map to the selected provider's language codes. `translate()` returns plain text from the resolved provider.
10
+
11
+ The service exposes its configured `maxTextChars`, measured in UTF-16 code units. Consumers split longer inputs before requesting translation. Each call bounds the response bytes and includes the response-body read in its deadline. Caller cancellation and service disposal abort accepted requests; disposal waits for them to settle.
12
+
13
+ ## Failures and data handling
14
+
15
+ `TranslationError` carries a `TranslationErrorCode` distinguishing text limits, HTTP failures, invalid responses, response limits, owned deadlines, and request failures. `TRANSLATION_SESSION_REQUIRED` rejects a missing persistence backend or Session; `TRANSLATION_SESSION_INACTIVE` rejects an uncached inactive Session before provider dispatch; `TRANSLATION_STORAGE_ERROR` rejects invalid saved records or failed durability. Provider diagnostics omit submitted text and response bodies. Failed calls do not select another provider. Responses are validated as external JSON and redirects are rejected.
16
+
17
+ `TRANSLATION_UNAVAILABLE` rejects a missing active built-in owner or registered route, unconfigured credentials, absent exact `deepseek-flash` catalog membership, an owner/model-list/official credential-reference change before dispatch, provider withdrawal, or a prepared call whose reasoning effort is not `off`. A native `finish` with reason `error` maps to `TRANSLATION_REQUEST_FAILED`; a missing or other non-`stop` finish maps to `TRANSLATION_INVALID_RESPONSE`.
18
+
19
+ Google receives source text in a form POST body; Bing receives it in a JSON POST body. Both are remote services. Their anonymous endpoints provide no supported developer availability or quota guarantee. Regional connectivity must be verified on the user's network.
20
+
21
+ ## Persistent translations
22
+
23
+ Session-bound calls use `plugin:translator/request` and `plugin:translator/result` for every provider. Requests retain exact source, language tags, selected provider and recipe identity; a successful result references its request sequence. Optional request metadata holds provider-specific details without changing these record types. The translator checkpoints requests before external dispatch and completed results before returning them. Read-only cache lookup precedes provider work and needs no live Session; failures and incomplete attempts do not supply reusable text. New records use the active Session's existing writer. The translator opens no write handle and does not activate a Session. Translation records preserve the original events and model input. Anonymous calls without a Session stay stateless; paid routes require a Session. Experimental record retention across future format migrations is best-effort.
24
+
25
+ Paid cache misses require an active built-in Account or Official owner, configured credentials and exact `deepseek-flash` catalog membership; names and version labels are irrelevant, and pi-ai is excluded. Each miss prepares a separate text-only query with thinking off. Its exact config, system and unique user fragment occupy optional `metadata.modelRequest` in the same request record. Saved results are read before this admission, so missing credentials do not invalidate existing translations. Native request extensions receive no main Session identity and cannot upload its full log.
26
+
27
+ ## Reasoning display
28
+
29
+ The [optional bundle](../../packages/experimental/cot-translation-bundle/README.md) composes the translator with the [GUI consumer](../../packages/experimental/client-ui-cot-translation/README.md). Its `cotTranslation` Remote serves authenticated browser calls. When a Session is inactive and has no saved result, the Host joins normal Session controller activation and retries once. Activation retains normal preset hooks, resume markers, and interrupted-turn repair; cancellation stops the caller's wait and prevents a later translation call without cancelling shared activation. Bundle settings select a translation service and target language; `auto` follows the active interface language.
30
+
31
+ `CotTranslationPreferences` contains the accepted provider and target language. `CotTranslationSnapshot` pairs these preferences with the translator's current `maxTextChars` and eligible provider IDs. The browser reads this Host snapshot before registering translation controls, including when local settings storage is unavailable. Accepted settings updates and reconnects refresh both values; a changed request limit cancels and splits the expanded text again.
32
+
33
+ The GUI registers in the session-scoped `conversation.chat.reasoning.body` single Slot, replacing Chat's default entry. Both entries reuse the official `conversation.chat.reasoning.content` Factory; the translation wrapper selects display text, owns its toolbar and view state, and supplies its localized labels without duplicating Markdown rendering. While enabled, the GUI translates completed paragraphs and request-sized prefixes of long streaming paragraphs only after expansion, and restores completed results from the current Session. Its local cache only optimizes that disclosure. The unfinished tail remains original. Original remains accessible. Closing the disclosure, switching provider or language, and unloading cancel outstanding calls and exclude late results. Provider failure preserves the original and requires an explicit retry; translated text never replaces original Session events or model input.
34
+
35
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
36
+
37
+ <a id="cordis-surface"></a>
38
+
39
+ ## Cordis API
40
+
41
+ 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).
42
+
43
+ <a id="ctxcottranslation--cottranslationcontroller"></a>
44
+
45
+ ### `ctx.cotTranslation` — `CotTranslationController`
46
+
47
+ Optional reasoning translation delegates Session-bound storage to the translator.
48
+
49
+ ```ts cordis-catalog
50
+ /**
51
+ * Read accepted translation preferences and the current request limit without sending text.
52
+ * @param signal - browser query cancellation or Remote contribution withdrawal.
53
+ * @returns authoritative preferences, eligible routes, and maximum UTF-16 text length per request.
54
+ */
55
+ @Remote async limits(signal: AbortSignal): Promise<CotTranslationSnapshot>
56
+
57
+ /**
58
+ * Translate one displayed fragment through the reader's selected provider.
59
+ * @param request - original text and Session identity supplied by the Client; provider and explicit
60
+ * target language match accepted preferences, while auto uses the browser locale.
61
+ * @param signal - browser cancellation or Remote contribution withdrawal.
62
+ * @returns translated text; an uncached inactive Session joins ordinary GUI activation before retry.
63
+ * Failures omit the source and provider response. Cancellation stops this caller's wait, not shared activation.
64
+ */
65
+ @Remote async translate(request: TranslationRequest, signal: AbortSignal): Promise<string>
66
+ ```
67
+
68
+ Source: [`packages/experimental/client-ui-cot-translation/src/index.ts`](../../packages/experimental/client-ui-cot-translation/src/index.ts)
69
+
70
+ <a id="ctxtranslator--translator"></a>
71
+
72
+ ### `ctx.translator` — `Translator`
73
+
74
+ One Host service with explicit routing, cancellation and quiescent unload.
75
+
76
+ ```ts cordis-catalog
77
+ /**
78
+ * Inspect eligible native routes without inference; saved results remain readable for unavailable routes.
79
+ * @param signal - optional caller cancellation, combined with service disposal.
80
+ * @returns anonymous choices followed by eligible explicitly selected paid routes.
81
+ */
82
+ async availableProviders(signal?: AbortSignal): Promise<readonly TranslationProvider[]>
83
+
84
+ /**
85
+ * Resolve provider and source-language defaults without sending text.
86
+ * @param request - consumer text, destination and optional routing choices.
87
+ * @returns a complete specification; exceeding `maxTextChars` throws `TRANSLATION_TEXT_LIMIT`.
88
+ */
89
+ resolve(request: TranslationRequest): TranslationSpec
90
+
91
+ /**
92
+ * Translate one resolved specification; the selected provider receives its text.
93
+ * @param spec - complete routing and language choices from `resolve()`.
94
+ * @param signal - optional caller cancellation, combined with service disposal.
95
+ * @returns translated plain text, durably retained before return when a Session is supplied.
96
+ * An uncached supplied Session must be active; otherwise rejects with `TRANSLATION_SESSION_INACTIVE` before dispatch.
97
+ * Rejects provider/storage/limit failures and preserves cancellation reasons.
98
+ */
99
+ async translate(spec: TranslationSpec, signal?: AbortSignal): Promise<string>
100
+ ```
101
+
102
+ Source: [`packages/experimental/translator/src/index.ts`](../../packages/experimental/translator/src/index.ts)
103
+ <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,103 @@
1
+ # 文本翻译
2
+
3
+ [English](translation.md) | 中文
4
+
5
+ 实验性 [translator](../../packages/experimental/translator/README.zh.md) 通过免登录浏览器端点或显式选择的付费原生 Flash 路由翻译文本。消费者负责展示、调度及 Session 激活;绑定 Session 的请求通过已激活 Session 的写入器保留可复用结果。
6
+
7
+ ## 请求与结果
8
+
9
+ `TranslationProvider` 选择 `bing`、`google`、`deepseek-account` 或 `deepseek-official`。`TranslationRequest` 提供 `text`、`targetLanguage` 及可选的 `sourceLanguage`、`provider` 与带品牌类型的 `sessionId`。`resolve()` 将显式路由写入 `TranslationSpec`:配置的默认 Provider 为 Bing,省略源语言时自动检测。常见中文 locale 标签映射为所选 Provider 的语言代码。`translate()` 返回所选 Provider 翻译后的纯文本。
10
+
11
+ 服务公开配置的 `maxTextChars`,单位为 UTF-16 code unit。消费者先拆分超长输入,再请求翻译。每次调用限制响应字节数,并将响应体读取计入超时。调用者取消和服务卸载都会中止已接收的请求;卸载等待这些请求完成。
12
+
13
+ ## 失败与数据处理
14
+
15
+ `TranslationError` 的 `TranslationErrorCode` 区分文本超限、HTTP 失败、无效响应、响应超限、服务自身超时与请求失败。`TRANSLATION_SESSION_REQUIRED` 拒绝缺失的持久化后端或 Session,`TRANSLATION_SESSION_INACTIVE` 在调用 Provider 前拒绝未激活且缓存未命中的 Session,`TRANSLATION_STORAGE_ERROR` 拒绝无效保存记录或持久化失败。Provider 错误信息省略提交的文本与响应体。失败时不选择其他 Provider。响应作为外部 JSON 校验,重定向被拒绝。
16
+
17
+ `TRANSLATION_UNAVAILABLE` 拒绝缺失的活跃内置所有者或已注册路由、未配置的凭据、目录中不存在精确的 `deepseek-flash`、派发前所有者/模型列表/官方凭据引用变化、提供方卸载,以及准备后的调用推理强度不是 `off` 的情况。原生 `finish` 的原因为 `error` 时映射为 `TRANSLATION_REQUEST_FAILED`;缺失 finish 或其他非 `stop` 原因映射为 `TRANSLATION_INVALID_RESPONSE`。
18
+
19
+ Google 在 form POST 请求体中接收原文,Bing 在 JSON POST 请求体中接收原文。两者都是远端服务。免登录端点不保证开发者 API 的可用性或免费额度。区域连通性须在用户网络上验证。
20
+
21
+ ## 持久化翻译
22
+
23
+ 绑定 Session 的调用对所有 Provider 使用 `plugin:translator/request` 与 `plugin:translator/result`。请求保留精确原文、语言标签、所选 Provider 和翻译规则标识,成功结果引用请求序号。可选请求 metadata 保存 Provider 专有细节,不改变记录类型。translator 在外部派发前完成请求检查点,在返回前完成结果检查点。只读缓存查找先于 Provider 调用,且不要求 Session 已激活;失败或未完成尝试不提供可复用译文。新记录使用已激活 Session 的现有写入器。translator 不打开写句柄,也不激活 Session。翻译记录保留原始事件与模型输入。不指定 Session 的匿名调用保持无状态;付费路由要求 Session。未来格式迁移对实验性记录的保留为尽力而为。
24
+
25
+ 付费缓存未命中时要求内置账号或官方 API 所有者处于活动状态、凭据已配置,且目录包含 ID 恰好为 `deepseek-flash` 的模型;名称和版本标签不参与匹配,pi-ai 路由被排除。每次未命中准备一次关闭思考的独立纯文本查询。精确配置、系统指令和唯一原文片段保存在同一请求记录的可选 `metadata.modelRequest` 中。读取保存结果先于此项准入,因此凭据缺失不会使既有译文失效。原生请求扩展不接收主 Session 身份,不能上传其完整日志。
26
+
27
+ ## 思考内容展示
28
+
29
+ [可选 Bundle](../../packages/experimental/cot-translation-bundle/README.zh.md) 将 translator 与 [GUI 消费者](../../packages/experimental/client-ui-cot-translation/README.zh.md) 组合。其 `cotTranslation` Remote 为经过身份验证的浏览器调用提供服务。Session 未激活且没有已保存结果时,Host 等待 Session controller 的正常激活,再重试一次。激活保留正常的 preset 钩子、恢复标记和中断轮次修复;取消会结束调用者的等待并阻止随后调用翻译,不取消共享激活。Bundle 设置选择翻译服务及目标语言;`auto` 跟随当前界面语言。
30
+
31
+ `CotTranslationPreferences` 包含已接受的翻译服务和目标语言。`CotTranslationSnapshot` 将这些偏好与 translator 当前的 `maxTextChars` 及可用服务 ID 一起返回。浏览器在注册翻译控件前读取此 Host 快照,本地设置存储不可用时也如此。接受的设置更新及重新连接会刷新这两项值;请求长度限制变化时,展开内容的请求被取消并重新分片。
32
+
33
+ GUI 向 Session 作用域的 `conversation.chat.reasoning.body` single Slot 注册,替换 Chat 的默认条目。两个条目均复用官方 `conversation.chat.reasoning.content` Factory;翻译包装选择显示文本,自行维护工具栏和视图状态,传入自己的本地化 labels,不重复实现 Markdown 渲染。启用后,GUI 只在展开后翻译完整段落和流式长段落中达到请求长度的前缀,并从当前 Session 恢复已完成结果;本地缓存只优化当前展开区域。未完成的末尾片段保留原文。原文始终可访问。关闭展开内容、切换 Provider 或语言、卸载插件都会取消未完成调用并忽略迟到的结果。Provider 失败时保留原文,必须显式重试;译文从不替换原始 Session 事件或模型输入。
34
+
35
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
36
+
37
+ <a id="cordis-surface"></a>
38
+
39
+ ## Cordis API
40
+
41
+ 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).
42
+
43
+ <a id="ctxcottranslation--cottranslationcontroller"></a>
44
+
45
+ ### `ctx.cotTranslation` — `CotTranslationController`
46
+
47
+ Optional reasoning translation delegates Session-bound storage to the translator.
48
+
49
+ ```ts cordis-catalog
50
+ /**
51
+ * Read accepted translation preferences and the current request limit without sending text.
52
+ * @param signal - browser query cancellation or Remote contribution withdrawal.
53
+ * @returns authoritative preferences, eligible routes, and maximum UTF-16 text length per request.
54
+ */
55
+ @Remote async limits(signal: AbortSignal): Promise<CotTranslationSnapshot>
56
+
57
+ /**
58
+ * Translate one displayed fragment through the reader's selected provider.
59
+ * @param request - original text and Session identity supplied by the Client; provider and explicit
60
+ * target language match accepted preferences, while auto uses the browser locale.
61
+ * @param signal - browser cancellation or Remote contribution withdrawal.
62
+ * @returns translated text; an uncached inactive Session joins ordinary GUI activation before retry.
63
+ * Failures omit the source and provider response. Cancellation stops this caller's wait, not shared activation.
64
+ */
65
+ @Remote async translate(request: TranslationRequest, signal: AbortSignal): Promise<string>
66
+ ```
67
+
68
+ Source: [`packages/experimental/client-ui-cot-translation/src/index.ts`](../../packages/experimental/client-ui-cot-translation/src/index.ts)
69
+
70
+ <a id="ctxtranslator--translator"></a>
71
+
72
+ ### `ctx.translator` — `Translator`
73
+
74
+ One Host service with explicit routing, cancellation and quiescent unload.
75
+
76
+ ```ts cordis-catalog
77
+ /**
78
+ * Inspect eligible native routes without inference; saved results remain readable for unavailable routes.
79
+ * @param signal - optional caller cancellation, combined with service disposal.
80
+ * @returns anonymous choices followed by eligible explicitly selected paid routes.
81
+ */
82
+ async availableProviders(signal?: AbortSignal): Promise<readonly TranslationProvider[]>
83
+
84
+ /**
85
+ * Resolve provider and source-language defaults without sending text.
86
+ * @param request - consumer text, destination and optional routing choices.
87
+ * @returns a complete specification; exceeding `maxTextChars` throws `TRANSLATION_TEXT_LIMIT`.
88
+ */
89
+ resolve(request: TranslationRequest): TranslationSpec
90
+
91
+ /**
92
+ * Translate one resolved specification; the selected provider receives its text.
93
+ * @param spec - complete routing and language choices from `resolve()`.
94
+ * @param signal - optional caller cancellation, combined with service disposal.
95
+ * @returns translated plain text, durably retained before return when a Session is supplied.
96
+ * An uncached supplied Session must be active; otherwise rejects with `TRANSLATION_SESSION_INACTIVE` before dispatch.
97
+ * Rejects provider/storage/limit failures and preserves cancellation reasons.
98
+ */
99
+ async translate(spec: TranslationSpec, signal?: AbortSignal): Promise<string>
100
+ ```
101
+
102
+ Source: [`packages/experimental/translator/src/index.ts`](../../packages/experimental/translator/src/index.ts)
103
+ <!-- END GENERATED cordis-surface -->
@@ -3,14 +3,14 @@
3
3
  # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/web-server.md
5
5
  /http-server:
6
- en: 778b8499fa5ec417
7
- zh: f2073db3d2ed8b70
6
+ en: c9b2f67d3248c496
7
+ zh: 5fa36d2837ff4f63
8
8
  /http-server/routes:
9
- en: 940bc78642c990b0
10
- zh: 901d2ba7e354a766
9
+ en: e949c3738a35b58f
10
+ zh: 138e3aaeb319ddc4
11
11
  /http-server/config:
12
- en: 30118110a0ea3702
13
- zh: 940f2b69d2dd54af
12
+ en: 4b162bd9f280eb06
13
+ zh: 3bea98dfee88c582
14
14
  /http-server/the-service:
15
- en: e304734ab2143438
16
- zh: 065f9c2acbbb07ca
15
+ en: cc36972b8458279f
16
+ zh: c129044935d44769
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](web-server.zh.md)
4
4
 
5
- [dsh-host-webserver](../../packages/host/webserver) is the browser HTTP carrier for the GUI host: a single `node:http` plugin providing `ctx.webServer`, a named-route registry, optional gzip response compression, index.html transform callbacks, and one fallback handler that a plugin may claim. It is not part of the agent loop and not a capability seam; it knows no harness concepts, and another plugin registers every feature route, including the `/api` bridge, plugin bundles, and the HMR event stream ([layering reference](../../packages/boot/app-boot/README.md)). It serves browsers only: Electron loads the built files over `file://` and sends fetch requests through an IPC bridge instead of this server.
5
+ [dsh-host-webserver](../../packages/host/webserver) is the browser HTTP carrier for the GUI host: one `node:http` server — `node:https` when `tls` is configured — providing `ctx.webServer`, a named-route registry, optional gzip response compression, index.html transform callbacks, and one fallback handler that a plugin may claim. It is not part of the agent loop and not a capability seam; it knows no harness concepts, and another plugin registers every feature route, including the `/api` bridge, plugin bundles, and the HMR event stream ([layering reference](../../packages/boot/app-boot/README.md)). It serves browsers only: Electron loads the built files over `file://` and sends fetch requests through an IPC bridge instead of this server.
6
6
 
7
7
  Source: [`packages/host/webserver/src/index.ts`](../../packages/host/webserver/src/index.ts)
8
8
 
@@ -26,15 +26,34 @@ interface WebRoute {
26
26
 
27
27
  Match order is fixed: exact table first, then longest matching prefix, then the registered fallback. Registration order carries no request-facing semantics — named routes are composed to be disjoint, and the fallback seat answers anything no named route claims; one owner only, a second registration throws. The shipped Web composition claims the seat with [`dsh-host-frontend-static`](../../packages/host/frontend-static/src/index.ts), the SPA dist server with locked semantics: Connection authenticates the dist root and configured index before their HTML is read; non-index assets remain public; non-GET/HEAD is 405, traversal outside the dist root is 403, existing files are served directly, absent or non-file targets are empty 404 responses, and unknown extensions ship as octet-stream.
28
28
 
29
+ <a id="config"></a>
30
+
29
31
  ## Config
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` accepts only `127.0.0.1` (default posture) and `0.0.0.0` (deliberate network exposure). The carrier itself owns no TLS, authentication, or Origin policy, so a non-loopback bind exposes the server unless the composition supplies those controls. `compression` defaults to `none`; the shipped Web bundle selects gzip level 1 with a 1024-byte threshold. The shipped `dsh web` command selects loopback and rejects `--host 0.0.0.0`; its Connection plugin supplies Host/Origin checks plus browser-session authentication for every Host API route and stream. Other compositions own their bind and route-authentication policy. The dist location is an assembly fact of the frontend plugin that claims the seat.
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
+ No composition can bind every interface at once: the unspecified address is rejected at load. The exported `isWildcardHost` and `isLoopbackHost` classify a bind address from its parsed value, and an IPv6 `%zone` is kept for `listen` while classification reads the address alone. The carrier owns no authentication or Origin policy, and it serves plain HTTP unless `tls` supplies a certificate and key. `compression` defaults to `none`; the shipped Web bundle selects gzip level 1 with a 1024-byte threshold. The shipped `dsh web` command selects loopback by default and accepts one concrete `--host` address, warning at startup when a non-loopback bind serves plain HTTP; its Connection plugin supplies Host/Origin checks plus browser-session authentication for every Host API route and stream, and the bind address plus `--trusted-host` govern which browser Host is accepted; `--public-url` changes only the advertised URL. Other compositions own their bind and route-authentication policy. The dist location is an assembly fact of the frontend plugin that claims the seat.
48
81
 
49
82
  ## The service
50
83
 
51
- `WebServer` (`ctx.webServer`) listens immediately on activation; a listen failure (EADDRINUSE…) rejects initialization, and the boot process reports the failed fiber. `register(route)` adds one named route and returns its disposer; a duplicate `(kind, path)` throws because route patterns are a composition-level contract and a collision is a misconfiguration. Gzip wraps eligible socket-backed responses inside the server, so route handlers retain direct `ServerResponse` ownership and no response-writing API is added to the service. Existing content encodings, `Cache-Control: no-transform`, ranges, SSE, ZIP, and the packaged `.gz` Worker image remain identity responses. `collectIndexInjections()` gathers structured `IndexInjection` rows over one `webserver/index-inject` emit, and `renderIndex(html)` renders them into successful root and configured index responses before applying the raw `tapIndex(transform)` escape-hatch transforms in registration order; [dsh-client-modules](../../packages/client/modules) answers the event with the boot manifest rows. `port` reads the listening port, including the port assigned by the OS when `config.port` is 0.
84
+ `WebServer` (`ctx.webServer`) listens immediately on activation; a listen failure (EADDRINUSE…) rejects initialization, and the boot process reports the failed fiber. The `tls` pair is read once before the listener binds, and an unreadable, empty, or mismatched pair rejects initialization the same way instead of falling back to HTTP. `register(route)` adds one named route and returns its disposer; a duplicate `(kind, path)` throws because route patterns are a composition-level contract and a collision is a misconfiguration. Gzip wraps eligible socket-backed responses inside the server, so route handlers retain direct `ServerResponse` ownership and no response-writing API is added to the service. Existing content encodings, `Cache-Control: no-transform`, ranges, SSE, ZIP, and the packaged `.gz` Worker image remain identity responses. `collectIndexInjections()` gathers structured `IndexInjection` rows over one `webserver/index-inject` emit, and `renderIndex(html)` renders them into successful root and configured index responses before applying the raw `tapIndex(transform)` escape-hatch transforms in registration order; [dsh-client-modules](../../packages/client/modules) answers the event with the boot manifest rows. `port` reads the listening port, including the port assigned by the OS when `config.port` is 0, and `protocol` reports the scheme the listener serves (`http:` or `https:`).
52
85
 
53
- A request whose handling throws (a malformed %-escape hitting `decodeURIComponent`, a client dropping mid-body) is logged as a warning and answered 400 — or the socket destroyed when headers are already out — never a process exit. Disposal pairs `close()` with `closeAllConnections()` because a handler may hold its response open (SSE) and such connections never end on their own; without the force-close, teardown would hang. The package never prints: the URL line belongs to the shell. Per-package operational detail, including the dev-mode bundle watch pipeline, stays in the [README](../../packages/host/webserver/README.md).
86
+ A request whose handling throws (a malformed %-escape hitting `decodeURIComponent`, a client dropping mid-body) is logged as a warning and answered 400 — or the socket destroyed when headers are already out — never a process exit. Disposal pairs `close()` with `closeAllConnections()` because a handler may hold its response open (SSE) and such connections never end on their own; without the force-close, teardown would hang. A TLS socket counts as a connection only after its handshake, so the server tracks raw TLS sockets beside upgraded ones and destroys both at disposal. The package never prints: the URL line belongs to the shell. Per-package operational detail, including the dev-mode bundle watch pipeline, stays in the [README](../../packages/host/webserver/README.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
  /**