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
@@ -0,0 +1,232 @@
1
+ # PTC runtime
2
+
3
+ English | [中文](ptc-runtime.zh.md)
4
+
5
+ The PTC execution [capability seam](../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.md) supplies `ctx.ptcRuntime` through [dsh-ptc-runtime](../../packages/ptc-runtime/ptc-runtime). It runs one program against host bindings and reports output, failure and applicable sandbox facts. PTC execution is optional rather than part of [the agent-loop spine](core.md). The [PTC foundation](../../.agents/notes/implemented/feature/2026-06-15-ptc.md) owns registry presentation, the [typed-return contract](../../.agents/notes/implemented/feature/2026-07-20-ptc-typed-tool-returns.md) owns binding values, and the [sandboxed Node decision](../../.agents/notes/implemented/architecture/2026-09-11-sandboxed-node-ptc-runtime.md) owns the shipped execution provider.
6
+
7
+ Source: [`packages/ptc-runtime/ptc-runtime/src/types.ts`](../../packages/ptc-runtime/ptc-runtime/src/types.ts)
8
+
9
+ ## The run: request in, result out
10
+
11
+ `PtcRunRequest` contains the program, bindings, cancellation and optional execution choices. The provider's `resolve` validates supported choices and applies its deployment defaults; `run` receives a `PtcRunSpec` with an explicit directory and deadline choice. An omitted timeout uses provider defaults, a number requests a capped elapsed budget, and `null` requests no elapsed deadline. Providers reject unsupported choices before execution:
12
+
13
+ ```ts type-equiv
14
+ /**
15
+ * Caller inputs for one program. The provider's resolve method validates supported
16
+ * options and supplies directory, deadline, and authority before execution.
17
+ */
18
+ interface PtcRunRequest {
19
+ /**
20
+ * The program source, in the runtime's {@link ../index.ts | language}. It
21
+ * runs as the body of an async function: top-level `await` and `return`
22
+ * are available, and the completion value becomes
23
+ * {@link PtcRunResult.value}.
24
+ */
25
+ program: string
26
+ /** Host functions exposed to the program, one global object per namespace. */
27
+ bindings: PtcBindingNamespace[]
28
+ /** Working directory in the mounted filesystem and subprocess execution world. */
29
+ cwd?: string
30
+ /**
31
+ * Elapsed execution budget in milliseconds. Omission uses provider defaults;
32
+ * null requests no deadline. Providers validate and cap numeric budgets or reject unsupported choices.
33
+ */
34
+ timeoutMs?: number | null
35
+ /** Resolved authority for this execution. Providers without confinement reject an explicit policy. */
36
+ sandboxPolicy?: SandboxExecutionPolicy
37
+ /**
38
+ * Abort the run: the runtime stops the program (hard, even mid-loop) and
39
+ * resolves with a {@link PtcRunFailure} of kind `'abort'`. In-flight
40
+ * binding calls are the CALLER's to settle — the runtime only stops asking.
41
+ */
42
+ signal?: AbortSignal
43
+ }
44
+ ```
45
+
46
+ ```ts type-equiv
47
+ /** Fully resolved execution inputs; run never supplies a missing directory or deadline choice. */
48
+ interface PtcRunSpec extends PtcRunRequest {
49
+ /** Absolute directory in the provider's execution world. */
50
+ cwd: string
51
+ /** Positive finite elapsed budget in milliseconds after provider capping, or null for no deadline. */
52
+ timeoutMs: number | null
53
+ }
54
+ ```
55
+
56
+ ```ts type-equiv
57
+ /** File confinement applied to a program, independently of its terminal outcome. */
58
+ interface PtcRunSandbox {
59
+ /** File-effect mode used for this execution. */
60
+ mode: SandboxMode
61
+ /** Program failure text matched backend diagnostics; not enforcement proof or an exhaustive denial record. */
62
+ denied: boolean
63
+ /** Completeness reported by the selected confining backend; absent for full access. */
64
+ enforcement?: SandboxEnforcement
65
+ }
66
+ ```
67
+
68
+ Program failures resolve through `PtcRunResult.error`; invalid caller inputs may reject before execution. Sandbox mode, observed denial and enforcement completeness are separate facts, so a successful program does not by itself prove that every requested restriction was enforced:
69
+
70
+ ```ts type-equiv
71
+ /**
72
+ * The outcome of one run. An error is a FIELD on a resolved result, never a
73
+ * rejection of `run()` — reporting a failed program is the caller's job, not
74
+ * an exception path.
75
+ */
76
+ interface PtcRunResult {
77
+ /** Applied file policy and observed denial, when the provider enforces file policy. */
78
+ sandbox?: PtcRunSandbox
79
+ /**
80
+ * The program's completion value (its top-level `return`), when it ran to
81
+ * completion and the value crossed the runtime's lossless-JSON boundary.
82
+ * Invalid or over-limit completions fail the run instead of substituting a
83
+ * rendered string; a failed or value-less run leaves this absent.
84
+ */
85
+ value?: PtcJsonValue
86
+ /**
87
+ * Captured text. Each source channel preserves emission order; interleaving
88
+ * across independent channels is backend-dependent. Bounded only as part of
89
+ * the outer result.
90
+ */
91
+ logs: string[]
92
+ /** Present iff the run failed; see {@link PtcRunFailure} for the taxonomy. */
93
+ error?: PtcRunFailure
94
+ }
95
+ ```
96
+
97
+ ## Bindings: host functions as program globals
98
+
99
+ Each `PtcBindingNamespace` becomes a global object of async callables; PTC passes `tools`. Arguments and resolutions must be lossless JSON. Providers enforce their own transport caps; the seam sets no uniform binding-byte limit. An optional error-class descriptor creates program-visible typed rejections without naming a consumer inside the runtime. Binding names are own properties, so `__proto__` cannot traverse a prototype:
100
+
101
+ ```ts type-equiv
102
+ /**
103
+ * Program-visible typed rejection for one binding namespace. The runtime
104
+ * injects a real error constructor under `name`; rejected member calls become
105
+ * its instances and expose the exact member name through
106
+ * `memberNameProperty`. Both strings are runtime data rather than knowledge
107
+ * of a particular consumer such as PTC mode.
108
+ */
109
+ interface PtcBindingErrorClass {
110
+ /** Constructor global and resulting `Error.name`; same portable identifier rule as {@link PtcBindingNamespace.global}. */
111
+ name: string
112
+ /**
113
+ * Non-empty own property for the member name. The portable exclusion set is
114
+ * `RESERVED_ERROR_MEMBERS` plus dunder-form names (`__x__`, non-empty
115
+ * middle), enforced identically by every backend; any other name —
116
+ * identifiers or not — is accepted everywhere.
117
+ */
118
+ memberNameProperty: string
119
+ }
120
+ ```
121
+
122
+ ```ts type-equiv
123
+ /**
124
+ * A named group of {@link PtcBindingFunction}s the runtime exposes to the
125
+ * program as one global object (e.g. `tools`). Function names are arbitrary
126
+ * strings — a runtime must treat names like `__proto__` or `constructor` as
127
+ * ordinary own properties (null-prototype construction), never as prototype
128
+ * collisions.
129
+ */
130
+ interface PtcBindingNamespace {
131
+ /**
132
+ * The global identifier the program sees. Must match the LANGUAGE-PORTABLE
133
+ * identifier subset `[A-Za-z_][A-Za-z0-9_]*` and no language's reserved
134
+ * words, so the same namespace list works against every backend regardless
135
+ * of `language` — a JS-only spelling like `$tools` is rejected by design,
136
+ * not just by the Python backend. Names that satisfy the identifier rule but
137
+ * name a backend-owned slot (`RESERVED_BINDING_GLOBALS`, e.g. `console`,
138
+ * `__dsh_main__`) are also refused everywhere; see its declaration for the
139
+ * exact set and why each entry is reserved.
140
+ */
141
+ global: string
142
+ /** The callable members, keyed by the exact name the program calls. */
143
+ functions: Record<string, PtcBindingFunction>
144
+ /** Optional program-visible typed rejection contract for this namespace. */
145
+ errorClass?: PtcBindingErrorClass
146
+ }
147
+ ```
148
+
149
+ ```ts type-equiv
150
+ /** A lossless JSON value transferable through the dependency-light Service Definition. */
151
+ type PtcJsonValue = null | boolean | number | string | PtcJsonValue[] | { [key: string]: PtcJsonValue }
152
+ ```
153
+
154
+ ```ts type-equiv
155
+ /**
156
+ * One host-side function exposed to the program as an async callable. The
157
+ * runtime bridges calls to it (possibly across a serialization boundary), so
158
+ * `args` and the resolution value MUST be lossless JSON. A runtime rejects a
159
+ * lossy or non-cloneable value with a descriptive error rather than corrupting
160
+ * the run. No seam-level byte cap applies to a binding resolution. A rejection
161
+ * of this function surfaces inside the program as a rejection of the
162
+ * corresponding call.
163
+ */
164
+ type PtcBindingFunction = (args: unknown) => Promise<PtcJsonValue>
165
+ ```
166
+
167
+ ## Captured output and the failure taxonomy
168
+
169
+ 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.
170
+
171
+ 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:
172
+
173
+ ```ts type-equiv
174
+ /**
175
+ * Why a run failed. The kinds are orthogonal outcomes reported independently
176
+ * (per docs/defensive-patterns.md): a budget expiry is not an exception, an
177
+ * abort is not a timeout, and a substrate death is neither.
178
+ *
179
+ * - `'exception'` — the program threw or failed to parse/transform.
180
+ * - `'timeout'` — an implementation-owned budget expired; the message says which.
181
+ * - `'abort'` — {@link PtcRunRequest.signal} fired.
182
+ * - `'worker-exit'` — the execution substrate died without settling (e.g. OOM).
183
+ * - `'invalid-output'` — the completion value was not lossless JSON.
184
+ * - `'output-limit'` — the serialized outer logs/value/diagnostic exceeded the configured cap.
185
+ * - `'protocol'` — the program sent invalid or over-budget control traffic.
186
+ * - `'sandbox-unavailable'` — required confinement could not be established.
187
+ */
188
+ interface PtcRunFailure {
189
+ /** The failure class (see the interface doc for each kind's meaning). */
190
+ kind: 'exception' | 'timeout' | 'abort' | 'worker-exit' | 'invalid-output' | 'output-limit' | 'protocol' | 'sandbox-unavailable'
191
+ /** Human-readable detail, suitable for feeding back to a model to self-correct. */
192
+ message: string
193
+ }
194
+ ```
195
+
196
+ ## The service
197
+
198
+ `PtcRuntime` is defined in [`src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts). `resolve(request)` returns complete execution inputs, and `run(spec)` executes them. `executionInstructions` supplies provider-owned usage guidance for consumer presentation. `timeout` reports the configured elapsed-time default and maximum when per-call overrides are supported; `resolve` still validates and caps each request. `language` selects supported program presentation; `isolation` describes the substrate without claiming security. `sandboxMode` advertises file-policy support, with `undefined` for a provider that does not supply confinement. Each implementation keeps program state separate between runs and terminates and awaits active executions during disposal.
199
+
200
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
201
+
202
+ <a id="cordis-surface"></a>
203
+
204
+ ## Cordis API
205
+
206
+ 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).
207
+
208
+ <a id="ctxptcruntime--ptcruntime-abstract-seam"></a>
209
+
210
+ ### `ctx.ptcRuntime` — `PtcRuntime` (abstract seam)
211
+
212
+ Registers one `ctx.ptcRuntime` implementation. Program, budget, abort, and substrate failures resolve in PtcRunResult; 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.
213
+
214
+ ```ts cordis-catalog
215
+ /**
216
+ * Resolve supported options and provider defaults before execution.
217
+ * @param request - Program, bindings, cancellation and optional execution choices.
218
+ * @returns Complete directory, deadline and supported authority for run.
219
+ * @throws When an explicit choice is invalid or unsupported by this provider.
220
+ */
221
+ abstract resolve(request: PtcRunRequest): PtcRunSpec
222
+
223
+ /**
224
+ * Execute resolved inputs; program outcomes resolve as result fields.
225
+ * @param spec - directory, deadline, program, bindings, cancellation and supported policy.
226
+ * @returns Captured output and the execution outcome.
227
+ */
228
+ abstract run(spec: PtcRunSpec): Promise<PtcRunResult>
229
+ ```
230
+
231
+ Source: [`packages/ptc-runtime/ptc-runtime/src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts)
232
+ <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,232 @@
1
+ # PTC 运行时
2
+
3
+ [English](ptc-runtime.md) | 中文
4
+
5
+ PTC 执行[能力 seam](../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.zh.md)通过 [dsh-ptc-runtime](../../packages/ptc-runtime/ptc-runtime) 提供 `ctx.ptcRuntime`。它针对 Host 绑定运行一个程序,报告输出、失败与适用的沙箱事实。PTC 执行是可选能力,不属于[智能体循环主干](core.zh.md)。[PTC 基础](../../.agents/notes/implemented/feature/2026-06-15-ptc.zh.md)负责注册表呈现,[类型化返回约定](../../.agents/notes/implemented/feature/2026-07-20-ptc-typed-tool-returns.zh.md)负责绑定值,[沙箱 Node 决策](../../.agents/notes/implemented/architecture/2026-09-11-sandboxed-node-ptc-runtime.zh.md)负责已发布的执行提供方。
6
+
7
+ 源码:[`packages/ptc-runtime/ptc-runtime/src/types.ts`](../../packages/ptc-runtime/ptc-runtime/src/types.ts)
8
+
9
+ ## 运行:请求进,结果出
10
+
11
+ `PtcRunRequest` 包含程序、绑定、取消和可选执行选择。提供方的 `resolve` 验证支持的选择并应用部署默认值;`run` 接收目录与截止选择明确的 `PtcRunSpec`。省略 timeout 使用提供方默认值,数值请求封顶的经过时间预算,`null` 请求不设经过时间截止。提供方在执行前拒绝不支持的选择:
12
+
13
+ ```ts type-equiv
14
+ /**
15
+ * Caller inputs for one program. The provider's resolve method validates supported
16
+ * options and supplies directory, deadline, and authority before execution.
17
+ */
18
+ interface PtcRunRequest {
19
+ /**
20
+ * The program source, in the runtime's {@link ../index.ts | language}. It
21
+ * runs as the body of an async function: top-level `await` and `return`
22
+ * are available, and the completion value becomes
23
+ * {@link PtcRunResult.value}.
24
+ */
25
+ program: string
26
+ /** Host functions exposed to the program, one global object per namespace. */
27
+ bindings: PtcBindingNamespace[]
28
+ /** Working directory in the mounted filesystem and subprocess execution world. */
29
+ cwd?: string
30
+ /**
31
+ * Elapsed execution budget in milliseconds. Omission uses provider defaults;
32
+ * null requests no deadline. Providers validate and cap numeric budgets or reject unsupported choices.
33
+ */
34
+ timeoutMs?: number | null
35
+ /** Resolved authority for this execution. Providers without confinement reject an explicit policy. */
36
+ sandboxPolicy?: SandboxExecutionPolicy
37
+ /**
38
+ * Abort the run: the runtime stops the program (hard, even mid-loop) and
39
+ * resolves with a {@link PtcRunFailure} of kind `'abort'`. In-flight
40
+ * binding calls are the CALLER's to settle — the runtime only stops asking.
41
+ */
42
+ signal?: AbortSignal
43
+ }
44
+ ```
45
+
46
+ ```ts type-equiv
47
+ /** Fully resolved execution inputs; run never supplies a missing directory or deadline choice. */
48
+ interface PtcRunSpec extends PtcRunRequest {
49
+ /** Absolute directory in the provider's execution world. */
50
+ cwd: string
51
+ /** Positive finite elapsed budget in milliseconds after provider capping, or null for no deadline. */
52
+ timeoutMs: number | null
53
+ }
54
+ ```
55
+
56
+ ```ts type-equiv
57
+ /** File confinement applied to a program, independently of its terminal outcome. */
58
+ interface PtcRunSandbox {
59
+ /** File-effect mode used for this execution. */
60
+ mode: SandboxMode
61
+ /** Program failure text matched backend diagnostics; not enforcement proof or an exhaustive denial record. */
62
+ denied: boolean
63
+ /** Completeness reported by the selected confining backend; absent for full access. */
64
+ enforcement?: SandboxEnforcement
65
+ }
66
+ ```
67
+
68
+ 程序失败通过 `PtcRunResult.error` 返回;无效调用输入可能在执行前拒绝。沙箱模式、观察到的拒绝与强制完整性是独立事实,因此程序成功本身不能证明每项请求限制均已强制执行:
69
+
70
+ ```ts type-equiv
71
+ /**
72
+ * The outcome of one run. An error is a FIELD on a resolved result, never a
73
+ * rejection of `run()` — reporting a failed program is the caller's job, not
74
+ * an exception path.
75
+ */
76
+ interface PtcRunResult {
77
+ /** Applied file policy and observed denial, when the provider enforces file policy. */
78
+ sandbox?: PtcRunSandbox
79
+ /**
80
+ * The program's completion value (its top-level `return`), when it ran to
81
+ * completion and the value crossed the runtime's lossless-JSON boundary.
82
+ * Invalid or over-limit completions fail the run instead of substituting a
83
+ * rendered string; a failed or value-less run leaves this absent.
84
+ */
85
+ value?: PtcJsonValue
86
+ /**
87
+ * Captured text. Each source channel preserves emission order; interleaving
88
+ * across independent channels is backend-dependent. Bounded only as part of
89
+ * the outer result.
90
+ */
91
+ logs: string[]
92
+ /** Present iff the run failed; see {@link PtcRunFailure} for the taxonomy. */
93
+ error?: PtcRunFailure
94
+ }
95
+ ```
96
+
97
+ ## 绑定:宿主函数作为程序全局变量
98
+
99
+ 每个 `PtcBindingNamespace` 成为一个异步可调用函数的全局对象;PTC 传入 `tools`。参数与返回值必须是无损 JSON。提供方强制各自的传输上限;seam 不设统一的绑定字节上限。可选错误类描述符创建程序可见的类型化拒绝,无需在运行时内点名消费方。绑定名是自有属性,因此 `__proto__` 不能遍历原型:
100
+
101
+ ```ts type-equiv
102
+ /**
103
+ * Program-visible typed rejection for one binding namespace. The runtime
104
+ * injects a real error constructor under `name`; rejected member calls become
105
+ * its instances and expose the exact member name through
106
+ * `memberNameProperty`. Both strings are runtime data rather than knowledge
107
+ * of a particular consumer such as PTC mode.
108
+ */
109
+ interface PtcBindingErrorClass {
110
+ /** Constructor global and resulting `Error.name`; same portable identifier rule as {@link PtcBindingNamespace.global}. */
111
+ name: string
112
+ /**
113
+ * Non-empty own property for the member name. The portable exclusion set is
114
+ * `RESERVED_ERROR_MEMBERS` plus dunder-form names (`__x__`, non-empty
115
+ * middle), enforced identically by every backend; any other name —
116
+ * identifiers or not — is accepted everywhere.
117
+ */
118
+ memberNameProperty: string
119
+ }
120
+ ```
121
+
122
+ ```ts type-equiv
123
+ /**
124
+ * A named group of {@link PtcBindingFunction}s the runtime exposes to the
125
+ * program as one global object (e.g. `tools`). Function names are arbitrary
126
+ * strings — a runtime must treat names like `__proto__` or `constructor` as
127
+ * ordinary own properties (null-prototype construction), never as prototype
128
+ * collisions.
129
+ */
130
+ interface PtcBindingNamespace {
131
+ /**
132
+ * The global identifier the program sees. Must match the LANGUAGE-PORTABLE
133
+ * identifier subset `[A-Za-z_][A-Za-z0-9_]*` and no language's reserved
134
+ * words, so the same namespace list works against every backend regardless
135
+ * of `language` — a JS-only spelling like `$tools` is rejected by design,
136
+ * not just by the Python backend. Names that satisfy the identifier rule but
137
+ * name a backend-owned slot (`RESERVED_BINDING_GLOBALS`, e.g. `console`,
138
+ * `__dsh_main__`) are also refused everywhere; see its declaration for the
139
+ * exact set and why each entry is reserved.
140
+ */
141
+ global: string
142
+ /** The callable members, keyed by the exact name the program calls. */
143
+ functions: Record<string, PtcBindingFunction>
144
+ /** Optional program-visible typed rejection contract for this namespace. */
145
+ errorClass?: PtcBindingErrorClass
146
+ }
147
+ ```
148
+
149
+ ```ts type-equiv
150
+ /** A lossless JSON value transferable through the dependency-light Service Definition. */
151
+ type PtcJsonValue = null | boolean | number | string | PtcJsonValue[] | { [key: string]: PtcJsonValue }
152
+ ```
153
+
154
+ ```ts type-equiv
155
+ /**
156
+ * One host-side function exposed to the program as an async callable. The
157
+ * runtime bridges calls to it (possibly across a serialization boundary), so
158
+ * `args` and the resolution value MUST be lossless JSON. A runtime rejects a
159
+ * lossy or non-cloneable value with a descriptive error rather than corrupting
160
+ * the run. No seam-level byte cap applies to a binding resolution. A rejection
161
+ * of this function surfaces inside the program as a rejection of the
162
+ * corresponding call.
163
+ */
164
+ type PtcBindingFunction = (args: unknown) => Promise<PtcJsonValue>
165
+ ```
166
+
167
+ ## 捕获的输出与失败分类体系
168
+
169
+ 日志是纯字符串。每个来源通道保留自身的发出顺序;由于通道元数据不属于 seam,相互独立的通道如何交错由后端决定。运行时捕获程序的 console 与流输出,Consumer 只渲染文本。实现会对序列化后的外层日志数组,以及完成值或失败消息的组合载荷设置上限;固定的结果封装语法与 Consumer 展示空白不计入这份可变载荷计量。超限会显式失败,而不会在值中插入替代内容。
170
+
171
+ 失败类型是**正交的结果,独立报告**(见 [defensive-patterns](../defensive-patterns.zh.md)):预算耗尽不是异常,中止不是超时,基底崩溃(如 OOM)也不是二者中的任何一个:
172
+
173
+ ```ts type-equiv
174
+ /**
175
+ * Why a run failed. The kinds are orthogonal outcomes reported independently
176
+ * (per docs/defensive-patterns.md): a budget expiry is not an exception, an
177
+ * abort is not a timeout, and a substrate death is neither.
178
+ *
179
+ * - `'exception'` — the program threw or failed to parse/transform.
180
+ * - `'timeout'` — an implementation-owned budget expired; the message says which.
181
+ * - `'abort'` — {@link PtcRunRequest.signal} fired.
182
+ * - `'worker-exit'` — the execution substrate died without settling (e.g. OOM).
183
+ * - `'invalid-output'` — the completion value was not lossless JSON.
184
+ * - `'output-limit'` — the serialized outer logs/value/diagnostic exceeded the configured cap.
185
+ * - `'protocol'` — the program sent invalid or over-budget control traffic.
186
+ * - `'sandbox-unavailable'` — required confinement could not be established.
187
+ */
188
+ interface PtcRunFailure {
189
+ /** The failure class (see the interface doc for each kind's meaning). */
190
+ kind: 'exception' | 'timeout' | 'abort' | 'worker-exit' | 'invalid-output' | 'output-limit' | 'protocol' | 'sandbox-unavailable'
191
+ /** Human-readable detail, suitable for feeding back to a model to self-correct. */
192
+ message: string
193
+ }
194
+ ```
195
+
196
+ ## 服务
197
+
198
+ `PtcRuntime` 定义于 [`src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts)。`resolve(request)` 返回完整执行输入,`run(spec)` 执行它们。`executionInstructions` 提供由运行时拥有的使用说明,供消费方呈现。支持逐次覆盖时,`timeout` 报告配置的经过时间默认值和上限;每次请求仍由 `resolve` 验证并截断。`language` 选择支持的程序呈现;`isolation` 描述执行基底,不作安全声明。`sandboxMode` 声明文件策略支持,不提供约束的提供方返回 `undefined`。每个实现将各次运行的程序状态分离,并在资源释放期间终止且等待活跃执行。
199
+
200
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
201
+
202
+ <a id="cordis-surface"></a>
203
+
204
+ ## Cordis API
205
+
206
+ 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).
207
+
208
+ <a id="ctxptcruntime--ptcruntime-abstract-seam"></a>
209
+
210
+ ### `ctx.ptcRuntime` — `PtcRuntime` (abstract seam)
211
+
212
+ Registers one `ctx.ptcRuntime` implementation. Program, budget, abort, and substrate failures resolve in PtcRunResult; 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.
213
+
214
+ ```ts cordis-catalog
215
+ /**
216
+ * Resolve supported options and provider defaults before execution.
217
+ * @param request - Program, bindings, cancellation and optional execution choices.
218
+ * @returns Complete directory, deadline and supported authority for run.
219
+ * @throws When an explicit choice is invalid or unsupported by this provider.
220
+ */
221
+ abstract resolve(request: PtcRunRequest): PtcRunSpec
222
+
223
+ /**
224
+ * Execute resolved inputs; program outcomes resolve as result fields.
225
+ * @param spec - directory, deadline, program, bindings, cancellation and supported policy.
226
+ * @returns Captured output and the execution outcome.
227
+ */
228
+ abstract run(spec: PtcRunSpec): Promise<PtcRunResult>
229
+ ```
230
+
231
+ Source: [`packages/ptc-runtime/ptc-runtime/src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts)
232
+ <!-- END GENERATED cordis-surface -->
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/sandbox.md
5
- sandbox.md: 7160ac699a21a319c991ae70262a8bf61da86b0c
6
- sandbox.zh.md: 6d2b10d63a0e180bc0fe39cc47930e66dee72466
5
+ sandbox.md: c29450d83c54d48a69f74f0b2fa38fe7c4f35ef2
6
+ sandbox.zh.md: 71b55fcb8d46144e45daef717999d8905a78eec4
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](sandbox.zh.md)
4
4
 
5
- The process-sandbox seam of [dsh-sandbox](../../packages/sandbox/sandbox) wraps a same-world subprocess argv in a file-effect policy without coupling consumers to a platform runner. [dsh-sandbox-local](../../packages/sandbox/sandbox-local) supplies Linux bwrap/Landlock, macOS Seatbelt, and the Windows ACL restricted-token backend; [dsh-bash-sandbox](../../packages/shell/bash-sandbox) and [dsh-pwsh-sandbox](../../packages/shell/pwsh-sandbox) consume it. Containers, microVMs, and remote execution are sibling implementations of whole capability seams, not providers of `ctx.sandbox`.
5
+ The process-sandbox seam of [dsh-sandbox](../../packages/sandbox/sandbox) wraps a same-world subprocess argv in a file-effect policy without coupling consumers to a platform runner. [dsh-sandbox-local](../../packages/sandbox/sandbox-local) supplies Linux bwrap/Landlock, macOS Seatbelt, and the Windows ACL restricted-token backend; [dsh-bash-sandbox](../../packages/shell/bash-sandbox) and [dsh-pwsh-sandbox](../../packages/shell/pwsh-sandbox) consume it. [dsh-sandbox-ssh](../../packages/ssh/sandbox-ssh/README.md) applies the same policy through a remote backend paired with the SSH filesystem and subprocess providers.
6
6
 
7
7
  Source: [`packages/sandbox/sandbox/src/index.ts`](../../packages/sandbox/sandbox/src/index.ts)
8
8
 
@@ -40,7 +40,7 @@ type SandboxEnforcement = 'full' | 'partial'
40
40
 
41
41
  ## Per-call policy
42
42
 
43
- The complete execution policy is resolved and carried per capability call. It includes `danger-full-access` so a consumer can resolve policy once before deciding whether to bypass confinement. Normal tool calls derive `workspaceRoot` from the calling session's immutable cwd; deployment configuration is the agentless fallback. The root is canonicalized with filesystem semantics before lexical normalization, so a cwd containing `symlink/..` identifies the directory where a spawned process actually runs.
43
+ The complete execution policy is resolved and carried per capability call. It includes `danger-full-access` so a consumer can resolve policy once before deciding whether to bypass confinement. Normal tool calls derive `workspaceRoot` from the calling session's immutable cwd; deployment configuration is the agentless fallback. The resolver preserves absolute execution-world spelling. Enforcing providers canonicalize the root where the files exist, so a cwd containing `symlink/..` identifies the directory where the paired subprocess provider actually runs.
44
44
 
45
45
  ```ts type-equiv
46
46
  /**
@@ -153,7 +153,7 @@ The [local provider](../../packages/sandbox/sandbox-local/README.md) owns operat
153
153
 
154
154
  ## Provider and fail-closed errors
155
155
 
156
- `ctx.sandbox.confine(argv, policy)` returns a `ConfinedArgv` or throws `SandboxUnavailableError` with code `SANDBOX_UNAVAILABLE` when no usable backend exists. Consumers may also classify a failure while spawning or observing the returned argv; that attribution belongs to the consumer contract. Silent unconfined passthrough is never legal for a confined policy.
156
+ `await ctx.sandbox.confine(argv, policy, signal)` resolves policy paths and returns a `ConfinedArgv` from the execution world, or rejects with `SandboxUnavailableError` and code `SANDBOX_UNAVAILABLE` when no usable backend exists. The optional signal cancels resolution before launch. Consumers may also classify a failure while spawning or observing the returned argv; that attribution belongs to the consumer contract. Silent unconfined passthrough is never legal for a confined policy.
157
157
 
158
158
  Provider selection, probing, caching, and backend-specific enforcement reports belong to the [local provider](../../packages/sandbox/sandbox-local/README.md).
159
159
 
@@ -180,10 +180,11 @@ Abstract process-sandbox service. confine must return enforcing argv or fail clo
180
180
  * `['bash', '-c', command]`.
181
181
  * @param policy - the file-effect policy this execution runs under,
182
182
  * carried per call (see {@link SandboxPolicy}).
183
+ * @param signal - cancellation while the provider resolves the policy and runner.
183
184
  * @returns the argv to spawn instead, plus the enforcement completeness
184
185
  * the selected backend achieves for it.
185
186
  */
186
- abstract confine(argv: readonly string[], policy: SandboxPolicy): ConfinedArgv
187
+ abstract confine(argv: readonly string[], policy: SandboxPolicy, signal?: AbortSignal): Promise<ConfinedArgv>
187
188
  ```
188
189
 
189
190
  Source: [`packages/sandbox/sandbox/src/index.ts`](../../packages/sandbox/sandbox/src/index.ts)
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](sandbox.md) | 中文
4
4
 
5
- [dsh-sandbox](../../packages/sandbox/sandbox) 的进程沙箱 seam 将与宿主共享文件系统和内核的子进程 argv 包装在文件效果策略中,而不将消费方耦合到特定平台运行器。[dsh-sandbox-local](../../packages/sandbox/sandbox-local) 提供 Linux bwrap/Landlock、macOS Seatbelt 与 Windows ACL 受限令牌后端;[dsh-bash-sandbox](../../packages/shell/bash-sandbox) 和 [dsh-pwsh-sandbox](../../packages/shell/pwsh-sandbox) 是其消费方。容器、microVM 和远程执行是完整能力 seam 的同级实现,而非 `ctx.sandbox` 的提供方。
5
+ [dsh-sandbox](../../packages/sandbox/sandbox) 的进程沙箱 seam 将与配套子进程提供方共享执行环境的子进程 argv 包装在文件效果策略中,而不将消费方耦合到特定平台运行器。[dsh-sandbox-local](../../packages/sandbox/sandbox-local) 提供 Linux bwrap/Landlock、macOS Seatbelt 与 Windows ACL 受限令牌后端;[dsh-bash-sandbox](../../packages/shell/bash-sandbox) 和 [dsh-pwsh-sandbox](../../packages/shell/pwsh-sandbox) 是其消费方。[dsh-sandbox-ssh](../../packages/ssh/sandbox-ssh/README.zh.md) 通过与 SSH 文件系统及子进程提供方配套的远端后端执行同一策略。
6
6
 
7
7
  源码:[`packages/sandbox/sandbox/src/index.ts`](../../packages/sandbox/sandbox/src/index.ts)
8
8
 
@@ -40,7 +40,7 @@ type SandboxEnforcement = 'full' | 'partial'
40
40
 
41
41
  ## 逐调用策略
42
42
 
43
- 完整执行策略会按每次能力调用解析并携带。它包括 `danger-full-access`,因此消费方可以只解析一次策略,再决定是否绕过约束。普通工具调用从调用会话的不可变 cwd 派生 `workspaceRoot`;部署配置是没有 agent(智能体)时的回退值。root 会先按文件系统语义规范化,再做词法规范化,因此包含 `symlink/..` 的 cwd 会标识 spawn 出的进程实际运行的目录。
43
+ 完整执行策略会按每次能力调用解析并携带。它包括 `danger-full-access`,因此消费方可以只解析一次策略,再决定是否绕过约束。普通工具调用从调用会话的不可变 cwd 派生 `workspaceRoot`;部署配置是没有 agent(智能体)时的回退值。解析器保留执行环境中的绝对路径写法。执行限制的提供方在文件实际存在的位置规范化根目录,因此包含 `symlink/..` 的 cwd 会标识配套子进程提供方实际运行的目录。
44
44
 
45
45
  ```ts type-equiv
46
46
  /**
@@ -149,13 +149,13 @@ interface ConfinedArgv {
149
149
  }
150
150
  ```
151
151
 
152
- [本地提供方](../../packages/sandbox/sandbox-local/README-zh.md)拥有运维配置,并将其 runner 方言映射到这些规则。[沙箱化 bash 消费方](../../packages/shell/bash-sandbox/README-zh.md)拥有 spawn 与结果归因。
152
+ [本地提供方](../../packages/sandbox/sandbox-local/README.zh.md)拥有运维配置,并将其 runner 方言映射到这些规则。[沙箱化 bash 消费方](../../packages/shell/bash-sandbox/README.zh.md)拥有 spawn 与结果归因。
153
153
 
154
154
  ## 提供方与 fail-closed 错误
155
155
 
156
- `ctx.sandbox.confine(argv, policy)` 返回一个 `ConfinedArgv`,或在没有可用后端时抛出 `SandboxUnavailableError`(错误码 `SANDBOX_UNAVAILABLE`)。消费方也可以在 spawn 或观察所返回的 argv 时对失败进行分类;该归因属于消费方约定。对于受限策略,静默的无隔离透传永远不合法。
156
+ `await ctx.sandbox.confine(argv, policy, signal)` 在执行环境中解析策略路径并返回 `ConfinedArgv`,没有可用后端时以 `SandboxUnavailableError`(错误码 `SANDBOX_UNAVAILABLE`)拒绝。可选信号可在启动前取消解析。消费方也可以在 spawn 或观察所返回的 argv 时对失败进行分类;该归因属于消费方约定。对于受限策略,静默的无隔离透传永远不合法。
157
157
 
158
- 提供方选择、探测、缓存和后端特定的强制执行报告归[本地提供方](../../packages/sandbox/sandbox-local/README-zh.md)所有。
158
+ 提供方选择、探测、缓存和后端特定的强制执行报告归[本地提供方](../../packages/sandbox/sandbox-local/README.zh.md)所有。
159
159
 
160
160
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
161
161
 
@@ -180,10 +180,11 @@ Abstract process-sandbox service. confine must return enforcing argv or fail clo
180
180
  * `['bash', '-c', command]`.
181
181
  * @param policy - the file-effect policy this execution runs under,
182
182
  * carried per call (see {@link SandboxPolicy}).
183
+ * @param signal - cancellation while the provider resolves the policy and runner.
183
184
  * @returns the argv to spawn instead, plus the enforcement completeness
184
185
  * the selected backend achieves for it.
185
186
  */
186
- abstract confine(argv: readonly string[], policy: SandboxPolicy): ConfinedArgv
187
+ abstract confine(argv: readonly string[], policy: SandboxPolicy, signal?: AbortSignal): Promise<ConfinedArgv>
187
188
  ```
188
189
 
189
190
  Source: [`packages/sandbox/sandbox/src/index.ts`](../../packages/sandbox/sandbox/src/index.ts)
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/schedule.md
5
- schedule.md: 40aa3592dec89fe8daa45beb630076e0476d2b16
6
- schedule.zh.md: 53a36ee9b51545ca74ac6166ef31d1e002d1f1f2
5
+ schedule.md: b92b81c6f24773b8cbafea5fccd7ac16df07ccd3
6
+ schedule.zh.md: a3e6a4e5f82223526f0ec84e60e5c752e6f65f9a
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](schedule.zh.md)
4
4
 
5
- Schedule owns durable reminders that return to the original live Session as ordinary later conversation turns. The [durable Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.md) owns persistence, lifecycle, and active-state presentation, [conversational delivery](../../.agents/notes/implemented/simplification/2026-08-09-conversational-schedule-delivery.md) owns the no-receipt boundary, the [explicit time-zone boundary](../../.agents/notes/implemented/simplification/2026-08-09-explicit-schedule-time-zone.md) owns browser-local interpretation, and [bounded fixed-rate Schedule](../../.agents/notes/implemented/simplification/2026-08-09-bounded-fixed-rate-schedule.md) owns recurrence. This page records the durable and model-facing shapes from [`packages/schedule/schedule/src/types.ts`](../../packages/schedule/schedule/src/types.ts); the [package README](../../packages/schedule/schedule/README.md) owns composition, tool behavior, and the exact reminder framing.
5
+ Schedule owns durable reminders that return to the original live Session as ordinary later conversation turns. The [durable Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.md) owns persistence, lifecycle, and active-state presentation, and the [explicit time-zone boundary](../../.agents/notes/implemented/simplification/2026-08-09-explicit-schedule-time-zone.md) owns browser-local interpretation. This page records the durable and model-facing shapes from [`packages/schedule/schedule/src/types.ts`](../../packages/schedule/schedule/src/types.ts); the [package README](../../packages/schedule/schedule/README.md) owns composition, tool behavior, and the exact reminder framing.
6
6
 
7
7
  ## Durable records
8
8
 
@@ -85,7 +85,7 @@ interface LocalAtInput {
85
85
  type AtInput = string | LocalAtInput
86
86
  ```
87
87
 
88
- The official Web overlay samples the browser's IANA zone for every prompt. Time-context tells the model to interpret otherwise-unqualified natural-language dates and times in that request-local zone when the open turn has one unambiguous browser zone; mixed or missing provenance tells the model to ask. That guidance is not a durable Session default: the model must still pass an offset in the string form or `time_zone` in the local form, and Schedule never reads browser, Session, process, or model context.
88
+ The official Web overlay samples the browser's IANA zone for every prompt. Time-context tells the model to interpret otherwise-unqualified natural-language dates and times in that request-local zone when the open turn has one unambiguous browser zone; mixed or missing browser-zone records tell the model to ask. That guidance is not a durable Session default: the model must still pass an offset in the string form or `time_zone` in the local form, and Schedule never reads browser, Session, process, or model context.
89
89
 
90
90
  Schedule rejects invalid offsets and zones, offset-free strings, non-future targets, and local times inside daylight-saving gaps. A daylight-saving overlap chooses its first, earlier instant. Successful creation stores only canonical UTC `scheduledAt`, so replay never depends on ambient time-zone state.
91
91
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](schedule.md) | 中文
4
4
 
5
- Schedule 拥有持久提醒;这些提醒会作为普通的后续对话轮次返回原 live Session。[持久 Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.zh.md) 负责持久化、生命周期与活动状态呈现,[对话式交付](../../.agents/notes/implemented/simplification/2026-08-09-conversational-schedule-delivery.zh.md) 负责无回执边界,[显式时区边界](../../.agents/notes/implemented/simplification/2026-08-09-explicit-schedule-time-zone.zh.md) 负责浏览器本地解释,[有界固定速率 Schedule](../../.agents/notes/implemented/simplification/2026-08-09-bounded-fixed-rate-schedule.zh.md) 负责重复调度。本页记录 [`packages/schedule/schedule/src/types.ts`](../../packages/schedule/schedule/src/types.ts) 中的持久数据形状和面向模型的数据形状;[包 README](../../packages/schedule/schedule/README-zh.md) 负责组合、工具行为与确切的提醒 framing。
5
+ Schedule 拥有持久提醒;这些提醒会作为普通的后续对话轮次返回原 live Session。[持久 Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.zh.md) 负责持久化、生命周期与活动状态呈现,[显式时区边界](../../.agents/notes/implemented/simplification/2026-08-09-explicit-schedule-time-zone.zh.md) 负责浏览器本地解释。本页记录 [`packages/schedule/schedule/src/types.ts`](../../packages/schedule/schedule/src/types.ts) 中的持久数据形状和面向模型的数据形状;[包 README](../../packages/schedule/schedule/README.zh.md) 负责组合、工具行为与确切的提醒 framing。
6
6
 
7
7
  ## 持久记录
8
8
 
@@ -85,7 +85,7 @@ interface LocalAtInput {
85
85
  type AtInput = string | LocalAtInput
86
86
  ```
87
87
 
88
- 官方 Web overlay 会为每条提示词采样浏览器的 IANA 时区。当 open turn 只有一个无歧义的浏览器时区时,Time-context 会告诉模型按该请求本地时区解释未明确限定时区的自然语言日期和时间;provenance 混合或缺失时,则告诉模型询问用户。该指引不是持久 Session 默认值:模型仍必须在字符串形式中传入偏移量,或在本地形式中传入 `time_zone`;Schedule 绝不会读取浏览器、Session、进程或模型上下文。
88
+ 官方 Web overlay 会为每条提示词采样浏览器的 IANA 时区。当 open turn 只有一个无歧义的浏览器时区时,Time-context 会告诉模型按该请求本地时区解释未明确限定时区的自然语言日期和时间;浏览器时区记录混合或缺失时,则告诉模型询问用户。该指引不是持久 Session 默认值:模型仍必须在字符串形式中传入偏移量,或在本地形式中传入 `time_zone`;Schedule 绝不会读取浏览器、Session、进程或模型上下文。
89
89
 
90
90
  Schedule 会拒绝无效偏移量与时区、不带偏移量的字符串、非未来目标,以及落在夏令时缺口内的本地时间。遇到夏令时重叠时,会选择第一次出现的较早时点。创建成功后只存储规范化后的 UTC `scheduledAt`,因此回放绝不依赖环境时区状态。
91
91
 
@@ -181,7 +181,7 @@ type ScheduleView = ScheduleRecord & {
181
181
 
182
182
  可选 Session projection 注册表存在时,Schedule 会注册客户端可见的 `schedule` key,其值是完整的活动 `ScheduleRecord[]`。live、cache、history 与 detached 读取共用同一套 header-aware 严格 fold;畸形权威输入会使既有读取路径失败,而不会发布部分值。
183
183
 
184
- shipped Web bundle 默认禁用 `ui-schedule`,显式 Schedule overlay 则把它与 Host 能力一同启用。[`dsh-client-ui-schedule`](../../packages/client/ui-schedule/README-zh.md)拥有 header 交互,[`dsh-client-ui-workspace`](../../packages/client/ui-workspace/README-zh.md)拥有列表行呈现,持久 Schedule Agent Note 拥有二者共享的活动状态边界。共享值只表示当前活动状态,绝不表示交付历史或回执;到期提醒仍通过下文所述的普通 Assistant 输出出现。
184
+ shipped Web bundle 默认禁用 `ui-schedule`,显式 Schedule overlay 则把它与 Host 能力一同启用。[`dsh-client-ui-schedule`](../../packages/client/ui-schedule/README.zh.md)拥有 header 交互,[`dsh-client-ui-workspace`](../../packages/client/ui-workspace/README.zh.md)拥有列表行呈现,持久 Schedule Agent Note 拥有二者共享的活动状态边界。共享值只表示当前活动状态,绝不表示交付历史或回执;到期提醒仍通过下文所述的普通 Assistant 输出出现。
185
185
 
186
186
  ## Live 交付
187
187
 
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/scope.md
5
- scope.md: c425217de224839d719da213e33f58bd2e6bf002
6
- scope.zh.md: 448f9fbfdc2211e9134cdf831a6e5311511acdfe
5
+ scope.md: 1ed297f7ae8bec2b850ee2110cd689751e287cf6
6
+ scope.zh.md: 3633c99003d3c47cb02c04313fd6dd1a5208ddfc