dsh-plugin-guide 0.3.15 → 0.3.16

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 (423) hide show
  1. package/package.json +1 -1
  2. package/references/official-docs/AGENTS.md +74 -49
  3. package/references/official-docs/README.i18n.yaml +2 -2
  4. package/references/official-docs/README.zh.md +12 -0
  5. package/references/official-docs/SNAPSHOT.md +4 -4
  6. package/references/official-docs/THIRD_PARTY_NOTICES.md +86 -30
  7. package/references/official-docs/docs/AGENTS.md +7 -6
  8. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  9. package/references/official-docs/docs/agent-lifecycle.md +12 -5
  10. package/references/official-docs/docs/agent-lifecycle.zh.md +12 -5
  11. package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
  12. package/references/official-docs/docs/api-gateway.md +2 -2
  13. package/references/official-docs/docs/api-gateway.zh.md +2 -2
  14. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  15. package/references/official-docs/docs/architecture.md +26 -12
  16. package/references/official-docs/docs/architecture.zh.md +28 -14
  17. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  18. package/references/official-docs/docs/capability-seams.md +111 -31
  19. package/references/official-docs/docs/capability-seams.zh.md +111 -31
  20. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  21. package/references/official-docs/docs/config-catalog.md +674 -202
  22. package/references/official-docs/docs/config-catalog.zh.md +691 -219
  23. package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +6 -0
  24. package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +111 -0
  25. package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +111 -0
  26. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +1 -1
  27. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
  28. package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
  29. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +4 -4
  30. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
  31. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +1 -1
  32. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +1 -1
  33. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +1 -1
  34. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  35. package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
  36. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +5 -5
  37. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +2 -2
  38. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
  39. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  40. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +6 -0
  41. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +108 -0
  42. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +108 -0
  43. package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +2 -2
  44. package/references/official-docs/docs/cordis-api/fiber.md +3 -3
  45. package/references/official-docs/docs/cordis-api/fiber.zh.md +3 -3
  46. package/references/official-docs/docs/cordis-api/inherited.md +0 -3
  47. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +2 -2
  48. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.md +2 -2
  49. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +2 -2
  50. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
  51. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +14 -15
  52. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +15 -16
  53. package/references/official-docs/docs/dependency-catalog.json +7312 -0
  54. package/references/official-docs/docs/development.i18n.yaml +2 -2
  55. package/references/official-docs/docs/development.md +13 -3
  56. package/references/official-docs/docs/development.zh.md +16 -6
  57. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  58. package/references/official-docs/docs/event-producer-consumer.md +50 -39
  59. package/references/official-docs/docs/event-producer-consumer.zh.md +55 -44
  60. package/references/official-docs/docs/glossary.i18n.yaml +2 -2
  61. package/references/official-docs/docs/glossary.md +1 -1
  62. package/references/official-docs/docs/glossary.zh.md +1 -1
  63. package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
  64. package/references/official-docs/docs/i18n/README.md +8 -3
  65. package/references/official-docs/docs/i18n/README.zh.md +8 -3
  66. package/references/official-docs/docs/i18n/style-samples.md +1 -1
  67. package/references/official-docs/docs/i18n/translation-prompt.md +5 -5
  68. package/references/official-docs/docs/i18n/translation-rules.zh.md +2 -2
  69. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  70. package/references/official-docs/docs/module-graph.md +303 -120
  71. package/references/official-docs/docs/module-graph.zh.md +303 -120
  72. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  73. package/references/official-docs/docs/persistence-catalog.md +5699 -64
  74. package/references/official-docs/docs/persistence-catalog.zh.md +5708 -73
  75. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +6 -0
  76. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.md +280 -0
  77. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.schema.json +13557 -0
  78. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.zh.md +280 -0
  79. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +6 -0
  80. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
  81. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.schema.json +910 -0
  82. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
  83. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +6 -0
  84. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.md +96 -0
  85. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.schema.json +8478 -0
  86. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
  87. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +6 -0
  88. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
  89. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.schema.json +72 -0
  90. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
  91. package/references/official-docs/docs/persistence-changes/README.i18n.yaml +6 -0
  92. package/references/official-docs/docs/persistence-changes/README.md +74 -0
  93. package/references/official-docs/docs/persistence-changes/README.zh.md +74 -0
  94. package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +6 -0
  95. package/references/official-docs/docs/persistence-changes/historical-formats/README.md +74 -0
  96. package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +74 -0
  97. package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +6 -0
  98. package/references/official-docs/docs/persistence-changes/historical-formats/v0.md +5105 -0
  99. package/references/official-docs/docs/persistence-changes/historical-formats/v0.schema.json +49308 -0
  100. package/references/official-docs/docs/persistence-changes/historical-formats/v0.zh.md +5105 -0
  101. package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +6 -0
  102. package/references/official-docs/docs/persistence-changes/historical-formats/v1.md +5107 -0
  103. package/references/official-docs/docs/persistence-changes/historical-formats/v1.schema.json +49411 -0
  104. package/references/official-docs/docs/persistence-changes/historical-formats/v1.zh.md +5107 -0
  105. package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +6 -0
  106. package/references/official-docs/docs/persistence-changes/historical-formats/v2.md +5362 -0
  107. package/references/official-docs/docs/persistence-changes/historical-formats/v2.schema.json +56466 -0
  108. package/references/official-docs/docs/persistence-changes/historical-formats/v2.zh.md +5362 -0
  109. package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +6 -0
  110. package/references/official-docs/docs/persistence-changes/releases/README.md +103 -0
  111. package/references/official-docs/docs/persistence-changes/releases/README.zh.md +103 -0
  112. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +6 -0
  113. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
  114. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.schema.json +39868 -0
  115. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
  116. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +6 -0
  117. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
  118. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.schema.json +43342 -0
  119. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
  120. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +6 -0
  121. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
  122. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.schema.json +19452 -0
  123. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
  124. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +6 -0
  125. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
  126. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.schema.json +5 -0
  127. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
  128. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +6 -0
  129. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
  130. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.schema.json +5 -0
  131. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
  132. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +6 -0
  133. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
  134. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.schema.json +5 -0
  135. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
  136. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +6 -0
  137. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
  138. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.schema.json +5 -0
  139. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
  140. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +6 -0
  141. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
  142. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.schema.json +5 -0
  143. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
  144. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +6 -0
  145. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
  146. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.schema.json +5 -0
  147. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
  148. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +6 -0
  149. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
  150. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.schema.json +5 -0
  151. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
  152. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +6 -0
  153. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
  154. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.schema.json +5320 -0
  155. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
  156. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +6 -0
  157. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
  158. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.schema.json +21258 -0
  159. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
  160. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +6 -0
  161. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
  162. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.schema.json +417 -0
  163. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
  164. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +6 -0
  165. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
  166. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.schema.json +29672 -0
  167. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
  168. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +6 -0
  169. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
  170. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.schema.json +48429 -0
  171. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
  172. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +6 -0
  173. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
  174. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.schema.json +49347 -0
  175. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
  176. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +6 -0
  177. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
  178. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.schema.json +5 -0
  179. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
  180. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +6 -0
  181. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
  182. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.schema.json +17642 -0
  183. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
  184. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +6 -0
  185. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
  186. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.schema.json +5 -0
  187. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
  188. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +6 -0
  189. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
  190. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.schema.json +5 -0
  191. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
  192. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +6 -0
  193. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
  194. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.schema.json +38678 -0
  195. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
  196. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +6 -0
  197. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
  198. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.schema.json +783 -0
  199. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
  200. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +6 -0
  201. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
  202. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.schema.json +24597 -0
  203. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
  204. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +6 -0
  205. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
  206. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +2132 -0
  207. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
  208. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +6 -0
  209. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
  210. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.schema.json +5 -0
  211. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
  212. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +6 -0
  213. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
  214. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.schema.json +5 -0
  215. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
  216. package/references/official-docs/docs/persistence-changes/releases/manifest.json +162 -0
  217. package/references/official-docs/docs/persistence-schema.json +61480 -0
  218. package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
  219. package/references/official-docs/docs/postmortem/README.md +1 -1
  220. package/references/official-docs/docs/postmortem/README.zh.md +1 -1
  221. package/references/official-docs/docs/rescope.i18n.yaml +2 -2
  222. package/references/official-docs/docs/rescope.md +2 -2
  223. package/references/official-docs/docs/rescope.zh.md +2 -2
  224. package/references/official-docs/docs/session-format-status.i18n.yaml +6 -0
  225. package/references/official-docs/docs/session-format-status.md +49 -0
  226. package/references/official-docs/docs/session-format-status.zh.md +49 -0
  227. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  228. package/references/official-docs/docs/subsystems/README.md +12 -3
  229. package/references/official-docs/docs/subsystems/README.zh.md +23 -14
  230. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +2 -2
  231. package/references/official-docs/docs/subsystems/agent-team.md +1 -1
  232. package/references/official-docs/docs/subsystems/agent-team.zh.md +2 -2
  233. package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
  234. package/references/official-docs/docs/subsystems/approval.md +1 -1
  235. package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
  236. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  237. package/references/official-docs/docs/subsystems/attachment.md +17 -7
  238. package/references/official-docs/docs/subsystems/attachment.zh.md +17 -7
  239. package/references/official-docs/docs/subsystems/{code-runtime.i18n.yaml → boot.i18n.yaml} +3 -3
  240. package/references/official-docs/docs/subsystems/boot.md +223 -0
  241. package/references/official-docs/docs/subsystems/boot.zh.md +223 -0
  242. package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +6 -0
  243. package/references/official-docs/docs/subsystems/browser-use.md +67 -0
  244. package/references/official-docs/docs/subsystems/browser-use.zh.md +67 -0
  245. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
  246. package/references/official-docs/docs/subsystems/client-modules.md +20 -10
  247. package/references/official-docs/docs/subsystems/client-modules.zh.md +21 -11
  248. package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +6 -0
  249. package/references/official-docs/docs/subsystems/client-resources.md +92 -0
  250. package/references/official-docs/docs/subsystems/client-resources.zh.md +92 -0
  251. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  252. package/references/official-docs/docs/subsystems/commands.md +4 -0
  253. package/references/official-docs/docs/subsystems/commands.zh.md +5 -1
  254. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  255. package/references/official-docs/docs/subsystems/compaction.md +48 -2
  256. package/references/official-docs/docs/subsystems/compaction.zh.md +50 -4
  257. package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +6 -0
  258. package/references/official-docs/docs/subsystems/computer-use.md +56 -0
  259. package/references/official-docs/docs/subsystems/computer-use.zh.md +56 -0
  260. package/references/official-docs/docs/subsystems/conversation.zh.md +1 -1
  261. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  262. package/references/official-docs/docs/subsystems/core.md +106 -60
  263. package/references/official-docs/docs/subsystems/core.zh.md +109 -63
  264. package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +6 -0
  265. package/references/official-docs/docs/subsystems/deliverables.md +178 -0
  266. package/references/official-docs/docs/subsystems/deliverables.zh.md +178 -0
  267. package/references/official-docs/docs/subsystems/extensions.zh.md +1 -1
  268. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
  269. package/references/official-docs/docs/subsystems/feedback.md +165 -31
  270. package/references/official-docs/docs/subsystems/feedback.zh.md +165 -31
  271. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
  272. package/references/official-docs/docs/subsystems/filesystem.md +15 -0
  273. package/references/official-docs/docs/subsystems/filesystem.zh.md +16 -1
  274. package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
  275. package/references/official-docs/docs/subsystems/goal.md +37 -1
  276. package/references/official-docs/docs/subsystems/goal.zh.md +38 -2
  277. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
  278. package/references/official-docs/docs/subsystems/invariants.md +1 -1
  279. package/references/official-docs/docs/subsystems/invariants.zh.md +3 -3
  280. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +1 -1
  281. package/references/official-docs/docs/subsystems/jobs.md +1 -1
  282. package/references/official-docs/docs/subsystems/jobs.zh.md +1 -1
  283. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  284. package/references/official-docs/docs/subsystems/llm-streaming.md +35 -15
  285. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +37 -17
  286. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
  287. package/references/official-docs/docs/subsystems/lsp.md +1 -1
  288. package/references/official-docs/docs/subsystems/lsp.zh.md +1 -1
  289. package/references/official-docs/docs/subsystems/mcp.i18n.yaml +6 -0
  290. package/references/official-docs/docs/subsystems/mcp.md +139 -0
  291. package/references/official-docs/docs/subsystems/mcp.zh.md +139 -0
  292. package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +6 -0
  293. package/references/official-docs/docs/subsystems/office-to-pdf.md +87 -0
  294. package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +87 -0
  295. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
  296. package/references/official-docs/docs/subsystems/permission-presets.md +62 -27
  297. package/references/official-docs/docs/subsystems/permission-presets.zh.md +62 -27
  298. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  299. package/references/official-docs/docs/subsystems/persistence.md +36 -15
  300. package/references/official-docs/docs/subsystems/persistence.zh.md +36 -15
  301. package/references/official-docs/docs/subsystems/plan.zh.md +2 -2
  302. package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +6 -0
  303. package/references/official-docs/docs/subsystems/ptc-runtime.md +232 -0
  304. package/references/official-docs/docs/subsystems/ptc-runtime.zh.md +232 -0
  305. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
  306. package/references/official-docs/docs/subsystems/sandbox.md +5 -4
  307. package/references/official-docs/docs/subsystems/sandbox.zh.md +7 -6
  308. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
  309. package/references/official-docs/docs/subsystems/schedule.md +2 -2
  310. package/references/official-docs/docs/subsystems/schedule.zh.md +3 -3
  311. package/references/official-docs/docs/subsystems/scope.i18n.yaml +2 -2
  312. package/references/official-docs/docs/subsystems/scope.md +1 -1
  313. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  314. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  315. package/references/official-docs/docs/subsystems/session-projection.md +1 -1
  316. package/references/official-docs/docs/subsystems/session-projection.zh.md +2 -2
  317. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  318. package/references/official-docs/docs/subsystems/session-reference.md +11 -6
  319. package/references/official-docs/docs/subsystems/session-reference.zh.md +11 -6
  320. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  321. package/references/official-docs/docs/subsystems/session-telemetry.md +22 -6
  322. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +23 -7
  323. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
  324. package/references/official-docs/docs/subsystems/session-title.md +5 -5
  325. package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
  326. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  327. package/references/official-docs/docs/subsystems/session.md +149 -61
  328. package/references/official-docs/docs/subsystems/session.zh.md +150 -62
  329. package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
  330. package/references/official-docs/docs/subsystems/shell.md +19 -15
  331. package/references/official-docs/docs/subsystems/shell.zh.md +20 -16
  332. package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +6 -0
  333. package/references/official-docs/docs/subsystems/sidebar-right.md +153 -0
  334. package/references/official-docs/docs/subsystems/sidebar-right.zh.md +153 -0
  335. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  336. package/references/official-docs/docs/subsystems/skills.md +4 -6
  337. package/references/official-docs/docs/subsystems/skills.zh.md +4 -6
  338. package/references/official-docs/docs/subsystems/slots.i18n.yaml +2 -2
  339. package/references/official-docs/docs/subsystems/slots.md +52 -38
  340. package/references/official-docs/docs/subsystems/slots.zh.md +53 -39
  341. package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
  342. package/references/official-docs/docs/subsystems/spill.md +13 -6
  343. package/references/official-docs/docs/subsystems/spill.zh.md +13 -6
  344. package/references/official-docs/docs/subsystems/ssh.i18n.yaml +6 -0
  345. package/references/official-docs/docs/subsystems/ssh.md +135 -0
  346. package/references/official-docs/docs/subsystems/ssh.zh.md +135 -0
  347. package/references/official-docs/docs/subsystems/storage.zh.md +2 -2
  348. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  349. package/references/official-docs/docs/subsystems/subagent.md +33 -16
  350. package/references/official-docs/docs/subsystems/subagent.zh.md +32 -15
  351. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
  352. package/references/official-docs/docs/subsystems/subprocess.md +41 -44
  353. package/references/official-docs/docs/subsystems/subprocess.zh.md +41 -44
  354. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  355. package/references/official-docs/docs/subsystems/system-prompt.md +6 -2
  356. package/references/official-docs/docs/subsystems/system-prompt.zh.md +7 -3
  357. package/references/official-docs/docs/subsystems/todo.zh.md +1 -1
  358. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
  359. package/references/official-docs/docs/subsystems/token-meter.md +2 -1
  360. package/references/official-docs/docs/subsystems/token-meter.zh.md +2 -1
  361. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  362. package/references/official-docs/docs/subsystems/tools.md +28 -12
  363. package/references/official-docs/docs/subsystems/tools.zh.md +28 -12
  364. package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
  365. package/references/official-docs/docs/subsystems/typert.md +6 -5
  366. package/references/official-docs/docs/subsystems/typert.zh.md +6 -5
  367. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
  368. package/references/official-docs/docs/subsystems/user-questions.md +2 -0
  369. package/references/official-docs/docs/subsystems/user-questions.zh.md +2 -0
  370. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
  371. package/references/official-docs/docs/subsystems/web-client.md +5 -5
  372. package/references/official-docs/docs/subsystems/web-client.zh.md +6 -6
  373. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
  374. package/references/official-docs/docs/subsystems/web-server.md +64 -0
  375. package/references/official-docs/docs/subsystems/web-server.zh.md +65 -1
  376. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +1 -1
  377. package/references/official-docs/docs/subsystems/webhook.md +2 -2
  378. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  379. package/references/official-docs/docs/subsystems/workflow.md +8 -8
  380. package/references/official-docs/docs/subsystems/workflow.zh.md +10 -10
  381. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  382. package/references/official-docs/docs/subsystems/workspace.md +199 -1
  383. package/references/official-docs/docs/subsystems/workspace.zh.md +199 -1
  384. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  385. package/references/official-docs/docs/testing.md +5 -4
  386. package/references/official-docs/docs/testing.zh.md +5 -4
  387. package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
  388. package/references/official-docs/docs/tool-catalog.md +452 -187
  389. package/references/official-docs/docs/tool-catalog.zh.md +454 -189
  390. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
  391. package/references/official-docs/docs/tool-execution-pipeline.md +2 -2
  392. package/references/official-docs/docs/tool-execution-pipeline.zh.md +2 -2
  393. package/references/official-docs/docs/user/develop/basic/index.zh.md +1 -1
  394. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
  395. package/references/official-docs/docs/user/develop/basic/publish.md +2 -2
  396. package/references/official-docs/docs/user/develop/basic/publish.zh.md +5 -5
  397. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +2 -2
  398. package/references/official-docs/docs/user/develop/framework/index.md +1 -1
  399. package/references/official-docs/docs/user/develop/framework/index.zh.md +1 -1
  400. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +2 -2
  401. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +8 -8
  402. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +8 -8
  403. package/references/official-docs/docs/user/guide/index.zh.md +2 -2
  404. package/references/official-docs/docs/user/guide/mcp-memory.zh.md +1 -1
  405. package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +2 -2
  406. package/references/official-docs/docs/user/guide/network-proxy.md +1 -1
  407. package/references/official-docs/docs/user/guide/network-proxy.zh.md +1 -1
  408. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  409. package/references/official-docs/docs/user/guide/providers.md +12 -8
  410. package/references/official-docs/docs/user/guide/providers.zh.md +14 -10
  411. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
  412. package/references/official-docs/docs/user/guide/python-sdk.md +59 -23
  413. package/references/official-docs/docs/user/guide/python-sdk.zh.md +60 -24
  414. package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
  415. package/references/official-docs/docs/web-styling.md +2 -1
  416. package/references/official-docs/docs/web-styling.zh.md +3 -2
  417. package/references/official-docs/packages/AGENTS.md +1 -1
  418. package/references/official-docs/packages/README.md +12 -7
  419. package/references/official-docs/vendor/README.md +15 -11
  420. package/references/official-docs/website-docs.ts +4 -2
  421. package/scripts/sync-official-docs.ps1 +5 -5
  422. package/references/official-docs/docs/subsystems/code-runtime.md +0 -195
  423. package/references/official-docs/docs/subsystems/code-runtime.zh.md +0 -195
@@ -1,4 +1,4 @@
1
- # dsh-plugin-guide official-docs sync script.
1
+ # dsh-plugin-guide official-docs sync script.
2
2
  # Purpose: sync the deepseek-harness checkout's official docs into references/official-docs/ (verbatim copy).
3
3
  # Source is pinned to origin/master (HEAD fallback): untracked drafts and unpushed commits in the checkout never enter the KB.
4
4
  # Output: references/official-docs/SNAPSHOT.md (source ref/SHA, sync time, file counts - the freshness authority for READMEs).
@@ -25,10 +25,10 @@ $pruned = 0
25
25
  $mdCount = 0
26
26
  $zhCount = 0
27
27
 
28
- # Sync scope: docs/, root AGENTS.md/BENCHMARK.md/CLAUDE.md/CONTRIBUTING.*/README-zh.md/README.i18n.yaml/THIRD_PARTY_NOTICES.md/LICENSE, packages/AGENTS.md, packages/README.md, vendor/README.md, website/docs.ts
28
+ # Sync scope: docs/, root AGENTS.md/BENCHMARK.md/CLAUDE.md/CONTRIBUTING.*/README.zh.md/README.i18n.yaml/THIRD_PARTY_NOTICES.md/LICENSE, packages/AGENTS.md, packages/README.md, vendor/README.md, website/docs.ts
29
29
  # Upstream root README.md is out of scope: official-docs/README.md is the KB-owned index (the upstream English README snapshot lives in downloads/github/harness/README.md).
30
30
  # Every pathspec uses the :(top) anchor so git's basename-wide matching cannot sweep in same-named symlinks (e.g. the various CLAUDE.md files).
31
- $paths = @(':(top)docs', ':(top)AGENTS.md', ':(top)BENCHMARK.md', ':(top)CONTRIBUTING.md', ':(top)CONTRIBUTING.zh.md', ':(top)CONTRIBUTING.i18n.yaml', ':(top)README-zh.md', ':(top)README.i18n.yaml', ':(top)THIRD_PARTY_NOTICES.md', ':(top)LICENSE', ':(top)packages/AGENTS.md', ':(top)packages/README.md', ':(top)vendor/README.md', ':(top)website/docs.ts')
31
+ $paths = @(':(top)docs', ':(top)AGENTS.md', ':(top)BENCHMARK.md', ':(top)CONTRIBUTING.md', ':(top)CONTRIBUTING.zh.md', ':(top)CONTRIBUTING.i18n.yaml', ':(top)README.zh.md', ':(top)README.i18n.yaml', ':(top)THIRD_PARTY_NOTICES.md', ':(top)LICENSE', ':(top)packages/AGENTS.md', ':(top)packages/README.md', ':(top)vendor/README.md', ':(top)website/docs.ts')
32
32
 
33
33
  if ($gitOk) {
34
34
  # Prefer origin/master, fall back to HEAD - never the working tree (may contain untracked/unpushed content).
@@ -68,7 +68,7 @@ if ($gitOk) {
68
68
 
69
69
  # Keep only in-scope entries at the destination root (drops stale extraction residue and
70
70
  # upstream-deleted root files so the copy stays verbatim).
71
- $rootKeep = @('docs','examples','packages','vendor','AGENTS.md','BENCHMARK.md','CLAUDE.md','CONTRIBUTING.md','CONTRIBUTING.zh.md','CONTRIBUTING.i18n.yaml','LICENSE','README-zh.md','README.i18n.yaml','THIRD_PARTY_NOTICES.md','SNAPSHOT.md','README.md','website-docs.ts')
71
+ $rootKeep = @('docs','examples','packages','vendor','AGENTS.md','BENCHMARK.md','CLAUDE.md','CONTRIBUTING.md','CONTRIBUTING.zh.md','CONTRIBUTING.i18n.yaml','LICENSE','README.zh.md','README.i18n.yaml','THIRD_PARTY_NOTICES.md','SNAPSHOT.md','README.md','website-docs.ts')
72
72
  Get-ChildItem -Force $dest | Where-Object { $rootKeep -notcontains $_.Name } | ForEach-Object {
73
73
  Remove-Item $_.FullName -Recurse -Force; $pruned++
74
74
  }
@@ -127,7 +127,7 @@ $L = @(
127
127
  "| Source ref | ``$ref`` |",
128
128
  "| Source commit | ``$sha`` |",
129
129
  "| Synced at (UTC) | $utc |",
130
- '| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md` (symlink target text), `CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`, `README-zh.md`/`.i18n.yaml` (the upstream English `README.md` is not in this dir; its snapshot lives in `downloads/github/harness/README.md`), `THIRD_PARTY_NOTICES.md`, `LICENSE`, `packages/AGENTS.md`, `packages/README.md`, `vendor/README.md`, `website/docs.ts` |',
130
+ '| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md` (symlink target text), `CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`, `README.zh.md`/`.i18n.yaml` (the upstream English `README.md` is not in this dir; its snapshot lives in `downloads/github/harness/README.md`), `THIRD_PARTY_NOTICES.md`, `LICENSE`, `packages/AGENTS.md`, `packages/README.md`, `vendor/README.md`, `website/docs.ts` |',
131
131
  "| File counts | docs/: $mdCount md files ($zhCount .zh.md pairs) |",
132
132
  "| Pruned this run | $pruned out-of-scope/upstream-deleted entries |",
133
133
  '',
@@ -1,195 +0,0 @@
1
- # Code Runtime
2
-
3
- English | [中文](code-runtime.zh.md)
4
-
5
- The code-execution seam — a [capability seam](../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.md) whose Service Definition ([dsh-code-runtime](../../packages/code-runtime/code-runtime), `ctx.codeRuntime`) runs one model-written program against host-provided async bindings and reports what it printed and returned. Code execution is **one optional capability**, not part of the agent-loop spine — so its vocabulary lives here, not in [core.md](core.md). Backends differ by execution substrate and source language, both readonly descriptors on the service; the worker-thread Service Provider and tool-registry Consumer are specified by the [PTC mode foundation](../../.agents/notes/implemented/feature/2026-06-15-ptc.md) and [typed-return contract](../../.agents/notes/implemented/feature/2026-07-20-ptc-typed-tool-returns.md).
6
-
7
- Source: [`packages/code-runtime/code-runtime/src/types.ts`](../../packages/code-runtime/code-runtime/src/types.ts)
8
-
9
- ## The run: request in, result out
10
-
11
- A `CodeRunRequest` carries **everything the runtime acts on** — per the "explicit > implicit at package boundaries" rule, defaulting (time budgets, output caps) is the implementation's validated config, never a hidden `??` inside `run()`:
12
-
13
- ```ts type-equiv
14
- /**
15
- * One run: the program source plus everything the runtime acts on. Per the
16
- * explicit-over-implicit convention, defaulting (time budgets, output caps)
17
- * is the implementation's validated config — a request carries no optional
18
- * tuning knobs for a hidden `??` to fill in.
19
- */
20
- interface CodeRunRequest {
21
- /**
22
- * The program source, in the runtime's {@link ../index.ts | language}. It
23
- * runs as the body of an async function: top-level `await` and `return`
24
- * are available, and the completion value becomes
25
- * {@link CodeRunResult.value}.
26
- */
27
- program: string
28
- /** Host functions exposed to the program, one global object per namespace. */
29
- bindings: CodeBindingNamespace[]
30
- /**
31
- * Abort the run: the runtime stops the program (hard, even mid-loop) and
32
- * resolves with a {@link CodeRunFailure} of kind `'abort'`. In-flight
33
- * binding calls are the CALLER's to settle — the runtime only stops asking.
34
- */
35
- signal?: AbortSignal
36
- }
37
- ```
38
-
39
- The result reports an error as a **field**, never a rejection of `run()` — reporting a failed program is the caller's job, not an exception path (matching `ShellExecutor.run`'s resolve-on-failure contract):
40
-
41
- ```ts type-equiv
42
- /**
43
- * The outcome of one run. An error is a FIELD on a resolved result, never a
44
- * rejection of `run()` — reporting a failed program is the caller's job, not
45
- * an exception path.
46
- */
47
- interface CodeRunResult {
48
- /**
49
- * The program's completion value (its top-level `return`), when it ran to
50
- * completion and the value crossed the runtime's lossless-JSON boundary.
51
- * Invalid or over-limit completions fail the run instead of substituting a
52
- * rendered string; a failed or value-less run leaves this absent.
53
- */
54
- value?: CodeJsonValue
55
- /**
56
- * Captured text. Each source channel preserves emission order; interleaving
57
- * across independent channels is backend-dependent. Bounded only as part of
58
- * the outer result.
59
- */
60
- logs: string[]
61
- /** Present iff the run failed; see {@link CodeRunFailure} for the taxonomy. */
62
- error?: CodeRunFailure
63
- }
64
- ```
65
-
66
- ## Bindings: host functions as program globals
67
-
68
- Each `CodeBindingNamespace` becomes one global object of async callables inside the program (the PTC mode consumer passes one: `tools`). Arguments and resolutions must be lossless JSON and cross without a seam-level byte cap; the runtime may bridge them through structured clone. A namespace may declare a program-visible error class without making the runtime know the consumer's names: the runtime injects the real constructor and turns rejected calls into its instances. A runtime also treats binding names as hostile input (`__proto__` is an ordinary own property, never a prototype collision):
69
-
70
- ```ts type-equiv
71
- /**
72
- * Program-visible typed rejection for one binding namespace. The runtime
73
- * injects a real error constructor under `name`; rejected member calls become
74
- * its instances and expose the exact member name through
75
- * `memberNameProperty`. Both strings are runtime data rather than knowledge
76
- * of a particular consumer such as PTC mode.
77
- */
78
- interface CodeBindingErrorClass {
79
- /** Constructor global and resulting `Error.name`; same portable identifier rule as {@link CodeBindingNamespace.global}. */
80
- name: string
81
- /**
82
- * Non-empty own property for the member name. The portable exclusion set is
83
- * `RESERVED_ERROR_MEMBERS` plus dunder-form names (`__x__`, non-empty
84
- * middle), enforced identically by every backend; any other name —
85
- * identifiers or not — is accepted everywhere.
86
- */
87
- memberNameProperty: string
88
- }
89
- ```
90
-
91
- ```ts type-equiv
92
- /**
93
- * A named group of {@link CodeBindingFunction}s the runtime exposes to the
94
- * program as one global object (e.g. `tools`). Function names are arbitrary
95
- * strings — a runtime must treat names like `__proto__` or `constructor` as
96
- * ordinary own properties (null-prototype construction), never as prototype
97
- * collisions.
98
- */
99
- interface CodeBindingNamespace {
100
- /**
101
- * The global identifier the program sees. Must match the LANGUAGE-PORTABLE
102
- * identifier subset `[A-Za-z_][A-Za-z0-9_]*` and no language's reserved
103
- * words, so the same namespace list works against every backend regardless
104
- * of `language` — a JS-only spelling like `$tools` is rejected by design,
105
- * not just by the Python backend. Names that satisfy the identifier rule but
106
- * name a backend-owned slot (`RESERVED_BINDING_GLOBALS`, e.g. `console`,
107
- * `__dsh_main__`) are also refused everywhere; see its declaration for the
108
- * exact set and why each entry is reserved.
109
- */
110
- global: string
111
- /** The callable members, keyed by the exact name the program calls. */
112
- functions: Record<string, CodeBindingFunction>
113
- /** Optional program-visible typed rejection contract for this namespace. */
114
- errorClass?: CodeBindingErrorClass
115
- }
116
- ```
117
-
118
- ```ts type-equiv
119
- /** A lossless JSON value transferable through the dependency-light Service Definition. */
120
- type CodeJsonValue = null | boolean | number | string | CodeJsonValue[] | { [key: string]: CodeJsonValue }
121
- ```
122
-
123
- ```ts type-equiv
124
- /**
125
- * One host-side function exposed to the program as an async callable. The
126
- * runtime bridges calls to it (possibly across a serialization boundary), so
127
- * `args` and the resolution value MUST be lossless JSON. A runtime rejects a
128
- * lossy or non-cloneable value with a descriptive error rather than corrupting
129
- * the run. No seam-level byte cap applies to a binding resolution. A rejection
130
- * of this function surfaces inside the program as a rejection of the
131
- * corresponding call.
132
- */
133
- type CodeBindingFunction = (args: unknown) => Promise<CodeJsonValue>
134
- ```
135
-
136
- ## Captured output and the failure taxonomy
137
-
138
- Logs are plain strings. Each source channel preserves emission order, while interleaving across independent channels is backend-dependent because channel metadata is not part of the seam. The runtime captures the program's console and stream output, and consumers render only the text. Implementations cap the serialized outer log-array plus completion-value or failure-message payload; fixed result-envelope syntax and consumer presentation whitespace are not part of that variable-payload ledger. Overflow is an explicit failure rather than in-band value substitution.
139
-
140
- Failure kinds are **orthogonal outcomes reported independently** (per [defensive-patterns](../defensive-patterns.md)): a budget expiry is not an exception, an abort is not a timeout, and a substrate death (e.g. OOM) is neither:
141
-
142
- ```ts type-equiv
143
- /**
144
- * Why a run failed. The kinds are orthogonal outcomes reported independently
145
- * (per docs/defensive-patterns.md): a budget expiry is not an exception, an
146
- * abort is not a timeout, and a substrate death is neither.
147
- *
148
- * - `'exception'` — the program threw or failed to parse/transform.
149
- * - `'timeout'` — an implementation-owned budget expired; the message says which.
150
- * - `'abort'` — {@link CodeRunRequest.signal} fired.
151
- * - `'worker-exit'` — the execution substrate died without settling (e.g. OOM).
152
- * - `'invalid-output'` — the completion value was not lossless JSON.
153
- * - `'output-limit'` — the serialized outer logs/value/diagnostic exceeded the configured cap.
154
- */
155
- interface CodeRunFailure {
156
- /** The failure class (see the interface doc for each kind's meaning). */
157
- kind: 'exception' | 'timeout' | 'abort' | 'worker-exit' | 'invalid-output' | 'output-limit'
158
- /** Human-readable detail, suitable for feeding back to a model to self-correct. */
159
- message: string
160
- }
161
- ```
162
-
163
- ## The service
164
-
165
- `CodeRuntime` (`ctx.codeRuntime`, abstract — defined in [`packages/code-runtime/code-runtime/src/index.ts`](../../packages/code-runtime/code-runtime/src/index.ts)) is `run(request)` plus two readonly descriptors: `language` (what the program must be written in — `'typescript'` and `'python'` are the well-known values, those `dsh-tools` presents, the TypeScript backend released and the Python backend experimental and private (not published); a consumer generating language-specific presentation switches on it and fails loud on one it cannot present) and `isolation` (the execution substrate — `'worker-thread'`, `'process'`, `'container'`; a diagnostic label, **not a security claim**). Implementations must keep runs isolated from each other (no cross-run state) and dispose to quiescence: in-flight runs are terminated and awaited before teardown completes.
166
-
167
- <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
168
-
169
- <a id="cordis-surface"></a>
170
-
171
- ## Cordis API
172
-
173
- 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).
174
-
175
- <a id="ctxcoderuntime--coderuntime-abstract-seam"></a>
176
-
177
- ### `ctx.codeRuntime` — `CodeRuntime` (abstract seam)
178
-
179
- Registers one `ctx.codeRuntime` implementation. Program, budget, abort, and substrate failures resolve in CodeRunResult; only Service Definition contract misuse rejects. Implementations bridge structured-cloneable bindings, materialize each declared namespace rejection class, treat programs as hostile peers, isolate runs from one another, and terminate and await in-flight runs during disposal.
180
-
181
- ```ts cordis-catalog
182
- /**
183
- * Execute one program against the request's bindings and capture what it
184
- * emitted. See the class doc for the resolution contract (error is a result
185
- * field; rejection means Service Definition contract misuse only).
186
- * @param request - the program, its bindings, and the abort signal; the
187
- * request carries everything the runtime acts on, with no hidden defaults.
188
- * @returns the run's outcome: completion value (when transferable), the
189
- * ordered log capture, and the failure (if any).
190
- */
191
- abstract run(request: CodeRunRequest): Promise<CodeRunResult>
192
- ```
193
-
194
- Source: [`packages/code-runtime/code-runtime/src/index.ts`](../../packages/code-runtime/code-runtime/src/index.ts)
195
- <!-- END GENERATED cordis-surface -->
@@ -1,195 +0,0 @@
1
- # 代码运行时
2
-
3
- [English](code-runtime.md) | 中文
4
-
5
- 代码执行 seam 是一个[能力 seam](../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.zh.md):其 Service Definition([dsh-code-runtime](../../packages/code-runtime/code-runtime),`ctx.codeRuntime`)使用宿主提供的异步绑定运行一段模型编写的程序,并报告其打印内容与返回值。代码执行是**一项可选能力**,不属于 agent loop(智能体循环)主干,因此其词汇定义在此而非 [core.md](core.zh.md) 中。各后端的执行基底与源语言不同,这两项均为服务上的只读描述符;worker-thread Service Provider 与工具注册表 Consumer 的约定见 [PTC mode 基础设计](../../.agents/notes/implemented/feature/2026-06-15-ptc.zh.md) 和[类型化返回约定](../../.agents/notes/implemented/feature/2026-07-20-ptc-typed-tool-returns.zh.md)。
6
-
7
- 源码:[`packages/code-runtime/code-runtime/src/types.ts`](../../packages/code-runtime/code-runtime/src/types.ts)
8
-
9
- ## 运行:请求进,结果出
10
-
11
- `CodeRunRequest` 携带**运行时要处理的一切内容**。按照「包边界处显式优于隐式」的规则,默认值(时间预算、输出上限)来自实现的已校验配置,绝不是 `run()` 内部隐藏的 `??`:
12
-
13
- ```ts type-equiv
14
- /**
15
- * One run: the program source plus everything the runtime acts on. Per the
16
- * explicit-over-implicit convention, defaulting (time budgets, output caps)
17
- * is the implementation's validated config — a request carries no optional
18
- * tuning knobs for a hidden `??` to fill in.
19
- */
20
- interface CodeRunRequest {
21
- /**
22
- * The program source, in the runtime's {@link ../index.ts | language}. It
23
- * runs as the body of an async function: top-level `await` and `return`
24
- * are available, and the completion value becomes
25
- * {@link CodeRunResult.value}.
26
- */
27
- program: string
28
- /** Host functions exposed to the program, one global object per namespace. */
29
- bindings: CodeBindingNamespace[]
30
- /**
31
- * Abort the run: the runtime stops the program (hard, even mid-loop) and
32
- * resolves with a {@link CodeRunFailure} of kind `'abort'`. In-flight
33
- * binding calls are the CALLER's to settle — the runtime only stops asking.
34
- */
35
- signal?: AbortSignal
36
- }
37
- ```
38
-
39
- 结果将错误报告为一个**字段**,而不是让 `run()` 返回被拒绝的 Promise。报告程序失败是调用方的职责,不走异常路径(与 `ShellExecutor.run` 失败时仍正常完成的约定一致):
40
-
41
- ```ts type-equiv
42
- /**
43
- * The outcome of one run. An error is a FIELD on a resolved result, never a
44
- * rejection of `run()` — reporting a failed program is the caller's job, not
45
- * an exception path.
46
- */
47
- interface CodeRunResult {
48
- /**
49
- * The program's completion value (its top-level `return`), when it ran to
50
- * completion and the value crossed the runtime's lossless-JSON boundary.
51
- * Invalid or over-limit completions fail the run instead of substituting a
52
- * rendered string; a failed or value-less run leaves this absent.
53
- */
54
- value?: CodeJsonValue
55
- /**
56
- * Captured text. Each source channel preserves emission order; interleaving
57
- * across independent channels is backend-dependent. Bounded only as part of
58
- * the outer result.
59
- */
60
- logs: string[]
61
- /** Present iff the run failed; see {@link CodeRunFailure} for the taxonomy. */
62
- error?: CodeRunFailure
63
- }
64
- ```
65
-
66
- ## 绑定:宿主函数作为程序全局变量
67
-
68
- 每个 `CodeBindingNamespace` 在程序内成为一个由异步可调用函数组成的全局对象(PTC mode Consumer 传入一个:`tools`)。参数与返回值必须是无损 JSON,且跨越边界时不受 seam 层字节上限约束;运行时可以通过结构化克隆桥接它们。命名空间可以声明程序可见的错误类,而无需让运行时知道 Consumer 的名称:运行时会注入真实构造函数,并将被拒绝的调用转为该类的实例。运行时也将绑定名视为不可信输入(`__proto__` 是普通自有属性,绝不会发生原型碰撞):
69
-
70
- ```ts type-equiv
71
- /**
72
- * Program-visible typed rejection for one binding namespace. The runtime
73
- * injects a real error constructor under `name`; rejected member calls become
74
- * its instances and expose the exact member name through
75
- * `memberNameProperty`. Both strings are runtime data rather than knowledge
76
- * of a particular consumer such as PTC mode.
77
- */
78
- interface CodeBindingErrorClass {
79
- /** Constructor global and resulting `Error.name`; same portable identifier rule as {@link CodeBindingNamespace.global}. */
80
- name: string
81
- /**
82
- * Non-empty own property for the member name. The portable exclusion set is
83
- * `RESERVED_ERROR_MEMBERS` plus dunder-form names (`__x__`, non-empty
84
- * middle), enforced identically by every backend; any other name —
85
- * identifiers or not — is accepted everywhere.
86
- */
87
- memberNameProperty: string
88
- }
89
- ```
90
-
91
- ```ts type-equiv
92
- /**
93
- * A named group of {@link CodeBindingFunction}s the runtime exposes to the
94
- * program as one global object (e.g. `tools`). Function names are arbitrary
95
- * strings — a runtime must treat names like `__proto__` or `constructor` as
96
- * ordinary own properties (null-prototype construction), never as prototype
97
- * collisions.
98
- */
99
- interface CodeBindingNamespace {
100
- /**
101
- * The global identifier the program sees. Must match the LANGUAGE-PORTABLE
102
- * identifier subset `[A-Za-z_][A-Za-z0-9_]*` and no language's reserved
103
- * words, so the same namespace list works against every backend regardless
104
- * of `language` — a JS-only spelling like `$tools` is rejected by design,
105
- * not just by the Python backend. Names that satisfy the identifier rule but
106
- * name a backend-owned slot (`RESERVED_BINDING_GLOBALS`, e.g. `console`,
107
- * `__dsh_main__`) are also refused everywhere; see its declaration for the
108
- * exact set and why each entry is reserved.
109
- */
110
- global: string
111
- /** The callable members, keyed by the exact name the program calls. */
112
- functions: Record<string, CodeBindingFunction>
113
- /** Optional program-visible typed rejection contract for this namespace. */
114
- errorClass?: CodeBindingErrorClass
115
- }
116
- ```
117
-
118
- ```ts type-equiv
119
- /** A lossless JSON value transferable through the dependency-light Service Definition. */
120
- type CodeJsonValue = null | boolean | number | string | CodeJsonValue[] | { [key: string]: CodeJsonValue }
121
- ```
122
-
123
- ```ts type-equiv
124
- /**
125
- * One host-side function exposed to the program as an async callable. The
126
- * runtime bridges calls to it (possibly across a serialization boundary), so
127
- * `args` and the resolution value MUST be lossless JSON. A runtime rejects a
128
- * lossy or non-cloneable value with a descriptive error rather than corrupting
129
- * the run. No seam-level byte cap applies to a binding resolution. A rejection
130
- * of this function surfaces inside the program as a rejection of the
131
- * corresponding call.
132
- */
133
- type CodeBindingFunction = (args: unknown) => Promise<CodeJsonValue>
134
- ```
135
-
136
- ## 捕获的输出与失败分类体系
137
-
138
- 日志是纯字符串。每个来源通道保留自身的发出顺序;由于通道元数据不属于 seam,相互独立的通道如何交错由后端决定。运行时捕获程序的 console 与流输出,Consumer 只渲染文本。实现会对序列化后的外层日志数组,以及完成值或失败消息的组合载荷设置上限;固定的结果封装语法与 Consumer 展示空白不计入这份可变载荷计量。超限会显式失败,而不会在值中插入替代内容。
139
-
140
- 失败类型是**正交的结果,独立报告**(见 [defensive-patterns](../defensive-patterns.zh.md)):预算耗尽不是异常,中止不是超时,基底崩溃(如 OOM)也不是二者中的任何一个:
141
-
142
- ```ts type-equiv
143
- /**
144
- * Why a run failed. The kinds are orthogonal outcomes reported independently
145
- * (per docs/defensive-patterns.md): a budget expiry is not an exception, an
146
- * abort is not a timeout, and a substrate death is neither.
147
- *
148
- * - `'exception'` — the program threw or failed to parse/transform.
149
- * - `'timeout'` — an implementation-owned budget expired; the message says which.
150
- * - `'abort'` — {@link CodeRunRequest.signal} fired.
151
- * - `'worker-exit'` — the execution substrate died without settling (e.g. OOM).
152
- * - `'invalid-output'` — the completion value was not lossless JSON.
153
- * - `'output-limit'` — the serialized outer logs/value/diagnostic exceeded the configured cap.
154
- */
155
- interface CodeRunFailure {
156
- /** The failure class (see the interface doc for each kind's meaning). */
157
- kind: 'exception' | 'timeout' | 'abort' | 'worker-exit' | 'invalid-output' | 'output-limit'
158
- /** Human-readable detail, suitable for feeding back to a model to self-correct. */
159
- message: string
160
- }
161
- ```
162
-
163
- ## 服务
164
-
165
- `CodeRuntime`(`ctx.codeRuntime`,抽象服务,定义于 [`packages/code-runtime/code-runtime/src/index.ts`](../../packages/code-runtime/code-runtime/src/index.ts))由 `run(request)` 加两个只读描述符组成:`language`(程序必须使用的语言,已知值为 `'typescript'` 与 `'python'`,即 `dsh-tools` 能呈现的那些,TypeScript 后端已发布、Python 后端为实验性且私有(未发布);生成语言相关展示的 Consumer 据此切换,遇到无法展示的语言时应显式报错)和 `isolation`(执行基底,`'worker-thread'`、`'process'`、`'container'`;仅为诊断标签,**不构成安全承诺**)。实现必须保证各次运行彼此隔离(无跨运行状态),并在 dispose(资源释放)时等待系统完全停稳:teardown 要等到所有进行中的运行均已终止并结算后才完成。
166
-
167
- <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
168
-
169
- <a id="cordis-surface"></a>
170
-
171
- ## Cordis API
172
-
173
- 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).
174
-
175
- <a id="ctxcoderuntime--coderuntime-abstract-seam"></a>
176
-
177
- ### `ctx.codeRuntime` — `CodeRuntime` (abstract seam)
178
-
179
- Registers one `ctx.codeRuntime` implementation. Program, budget, abort, and substrate failures resolve in CodeRunResult; only Service Definition contract misuse rejects. Implementations bridge structured-cloneable bindings, materialize each declared namespace rejection class, treat programs as hostile peers, isolate runs from one another, and terminate and await in-flight runs during disposal.
180
-
181
- ```ts cordis-catalog
182
- /**
183
- * Execute one program against the request's bindings and capture what it
184
- * emitted. See the class doc for the resolution contract (error is a result
185
- * field; rejection means Service Definition contract misuse only).
186
- * @param request - the program, its bindings, and the abort signal; the
187
- * request carries everything the runtime acts on, with no hidden defaults.
188
- * @returns the run's outcome: completion value (when transferable), the
189
- * ordered log capture, and the failure (if any).
190
- */
191
- abstract run(request: CodeRunRequest): Promise<CodeRunResult>
192
- ```
193
-
194
- Source: [`packages/code-runtime/code-runtime/src/index.ts`](../../packages/code-runtime/code-runtime/src/index.ts)
195
- <!-- END GENERATED cordis-surface -->