dsh-plugin-dev-kb 1.6.0 → 1.8.0

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 (500) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.en.md +23 -6
  3. package/README.md +28 -8
  4. package/kb/INDEX.md +3 -3
  5. package/kb/README.md +9 -4
  6. package/kb/extra/AGENTS.md +1 -1
  7. package/kb/extra/cli-help.md +15 -7
  8. package/kb/extra/cli-help.zh.md +15 -7
  9. package/kb/extra/cookbook/adding-a-plugin-preview.md +18 -25
  10. package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +18 -25
  11. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +1 -1
  12. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +1 -1
  13. package/kb/extra/cookbook/reviewing-ui-design.md +166 -0
  14. package/kb/extra/cookbook/reviewing-ui-design.zh.md +166 -0
  15. package/kb/extra/deepseek-llm-api-wire-extensions.md +2 -2
  16. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +2 -2
  17. package/kb/extra/defensive-patterns/conversation-and-session.md +2 -2
  18. package/kb/extra/defensive-patterns/conversation-and-session.zh.md +2 -2
  19. package/kb/extra/defensive-patterns/general.md +2 -0
  20. package/kb/extra/defensive-patterns/general.zh.md +2 -0
  21. package/kb/extra/defensive-patterns/package-surface.md +1 -0
  22. package/kb/extra/defensive-patterns/package-surface.zh.md +1 -0
  23. package/kb/extra/defensive-patterns/remote-and-api.md +5 -3
  24. package/kb/extra/defensive-patterns/remote-and-api.zh.md +5 -3
  25. package/kb/extra/development.md +16 -9
  26. package/kb/extra/development.zh.md +16 -9
  27. package/kb/extra/event-producer-consumer.md +64 -51
  28. package/kb/extra/event-producer-consumer.zh.md +64 -51
  29. package/kb/extra/i18n/README.md +2 -0
  30. package/kb/extra/i18n/README.zh.md +2 -0
  31. package/kb/extra/module-graph.md +204 -92
  32. package/kb/extra/module-graph.zh.md +204 -92
  33. package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.md +60 -0
  34. package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.zh.md +60 -0
  35. package/kb/extra/persistence-changes/2026-10-19-session-team-mode.md +48 -0
  36. package/kb/extra/persistence-changes/2026-10-19-session-team-mode.zh.md +48 -0
  37. package/kb/extra/persistence-changes/2026-10-22-action-card-status.md +60 -0
  38. package/kb/extra/persistence-changes/2026-10-22-action-card-status.zh.md +60 -0
  39. package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.md +60 -0
  40. package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.zh.md +60 -0
  41. package/kb/extra/persistence-changes/2026-10-27-retry-control-input.md +60 -0
  42. package/kb/extra/persistence-changes/2026-10-27-retry-control-input.zh.md +60 -0
  43. package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.md +60 -0
  44. package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.zh.md +60 -0
  45. package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.md +48 -0
  46. package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.zh.md +48 -0
  47. package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.md +48 -0
  48. package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.zh.md +48 -0
  49. package/kb/extra/persistence-changes/README.md +2 -0
  50. package/kb/extra/persistence-changes/README.zh.md +2 -0
  51. package/kb/extra/persistence-changes/historical-formats/README.md +1 -1
  52. package/kb/extra/persistence-changes/historical-formats/README.zh.md +1 -1
  53. package/kb/extra/rescope.md +7 -5
  54. package/kb/extra/rescope.zh.md +7 -5
  55. package/kb/extra/subsystems/agent-team.md +38 -75
  56. package/kb/extra/subsystems/agent-team.zh.md +38 -75
  57. package/kb/extra/subsystems/attachment.md +36 -13
  58. package/kb/extra/subsystems/attachment.zh.md +36 -13
  59. package/kb/extra/subsystems/boot.md +179 -5
  60. package/kb/extra/subsystems/boot.zh.md +179 -5
  61. package/kb/extra/subsystems/computer-use.md +78 -0
  62. package/kb/extra/subsystems/computer-use.zh.md +78 -0
  63. package/kb/extra/subsystems/deliverables.md +2 -0
  64. package/kb/extra/subsystems/deliverables.zh.md +2 -0
  65. package/kb/extra/subsystems/forge.md +1226 -0
  66. package/kb/extra/subsystems/forge.zh.md +1226 -0
  67. package/kb/extra/subsystems/liveshare.md +158 -0
  68. package/kb/extra/subsystems/liveshare.zh.md +158 -0
  69. package/kb/extra/subsystems/mcp.md +96 -1
  70. package/kb/extra/subsystems/mcp.zh.md +96 -1
  71. package/kb/extra/subsystems/worktrees.md +54 -3
  72. package/kb/extra/subsystems/worktrees.zh.md +54 -3
  73. package/kb/extra/testing.md +1 -1
  74. package/kb/extra/testing.zh.md +1 -1
  75. package/kb/extra/ui-design-review-cases.md +445 -0
  76. package/kb/extra/ui-design-review-cases.zh.md +445 -0
  77. package/kb/extra/ui-radius.md +3 -1
  78. package/kb/extra/ui-radius.zh.md +3 -1
  79. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +1 -1
  80. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +1 -1
  81. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.md +24 -0
  82. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.zh.md +24 -0
  83. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.md +25 -0
  84. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.zh.md +25 -0
  85. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.md +30 -0
  86. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.zh.md +30 -0
  87. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.md +28 -0
  88. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.zh.md +28 -0
  89. package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.md +24 -0
  90. package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.zh.md +24 -0
  91. package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md +23 -0
  92. package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md +23 -0
  93. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.md +20 -0
  94. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.zh.md +20 -0
  95. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.md +31 -0
  96. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.zh.md +31 -0
  97. package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.md +34 -0
  98. package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.zh.md +34 -0
  99. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.md +20 -0
  100. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.zh.md +20 -0
  101. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.md +18 -0
  102. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.zh.md +18 -0
  103. package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.md +18 -0
  104. package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.zh.md +18 -0
  105. package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.md +25 -0
  106. package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.zh.md +25 -0
  107. package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.md +23 -0
  108. package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.zh.md +23 -0
  109. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.md +22 -0
  110. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.zh.md +22 -0
  111. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.md +18 -0
  112. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.zh.md +18 -0
  113. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.md +17 -0
  114. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.zh.md +17 -0
  115. package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.md +19 -0
  116. package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.zh.md +19 -0
  117. package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.md +27 -0
  118. package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.zh.md +27 -0
  119. package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.md +18 -0
  120. package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.zh.md +18 -0
  121. package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.md +22 -0
  122. package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.zh.md +22 -0
  123. package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.md +17 -0
  124. package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.zh.md +17 -0
  125. package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.md +18 -0
  126. package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.zh.md +18 -0
  127. package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.md +18 -0
  128. package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.zh.md +18 -0
  129. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.md +18 -0
  130. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.zh.md +18 -0
  131. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.md +53 -0
  132. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.zh.md +53 -0
  133. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.md +30 -0
  134. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.zh.md +30 -0
  135. package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.md +20 -0
  136. package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.zh.md +20 -0
  137. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.md +18 -0
  138. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.zh.md +18 -0
  139. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.md +18 -0
  140. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.zh.md +18 -0
  141. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.md +24 -0
  142. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.zh.md +24 -0
  143. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.md +25 -0
  144. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.zh.md +25 -0
  145. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.md +22 -0
  146. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.zh.md +22 -0
  147. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.md +18 -0
  148. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.zh.md +18 -0
  149. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.md +19 -0
  150. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.zh.md +19 -0
  151. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.md +26 -0
  152. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.zh.md +26 -0
  153. package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.md +35 -0
  154. package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.zh.md +35 -0
  155. package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.md +21 -0
  156. package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.zh.md +21 -0
  157. package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.md +17 -0
  158. package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.zh.md +17 -0
  159. package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.md +23 -0
  160. package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.zh.md +23 -0
  161. package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.md +21 -0
  162. package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.zh.md +21 -0
  163. package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.md +20 -0
  164. package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.zh.md +20 -0
  165. package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.md +20 -0
  166. package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.zh.md +20 -0
  167. package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.md +19 -0
  168. package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.zh.md +19 -0
  169. package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.md +23 -0
  170. package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.zh.md +23 -0
  171. package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.md +20 -0
  172. package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.zh.md +20 -0
  173. package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.md +21 -0
  174. package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.zh.md +21 -0
  175. package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.md +21 -0
  176. package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.zh.md +21 -0
  177. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.md +18 -0
  178. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.zh.md +18 -0
  179. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.md +20 -0
  180. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.zh.md +20 -0
  181. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.md +19 -0
  182. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.zh.md +19 -0
  183. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.md +18 -0
  184. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.zh.md +18 -0
  185. package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.md +22 -0
  186. package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.zh.md +22 -0
  187. package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.md +20 -0
  188. package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.zh.md +20 -0
  189. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.md +19 -0
  190. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.zh.md +19 -0
  191. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.md +24 -0
  192. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.zh.md +24 -0
  193. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.md +21 -0
  194. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.zh.md +21 -0
  195. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.md +19 -0
  196. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.zh.md +19 -0
  197. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.md +18 -0
  198. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.zh.md +18 -0
  199. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.md +21 -0
  200. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.zh.md +21 -0
  201. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.md +29 -0
  202. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.zh.md +29 -0
  203. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.md +29 -0
  204. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.zh.md +29 -0
  205. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.md +29 -0
  206. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.zh.md +29 -0
  207. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.md +18 -0
  208. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.zh.md +18 -0
  209. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.md +32 -0
  210. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.zh.md +32 -0
  211. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.md +30 -0
  212. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.zh.md +30 -0
  213. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.md +19 -0
  214. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.zh.md +19 -0
  215. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.md +21 -0
  216. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.zh.md +21 -0
  217. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.md +37 -0
  218. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.zh.md +37 -0
  219. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.md +22 -0
  220. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.zh.md +22 -0
  221. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.md +24 -0
  222. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.zh.md +24 -0
  223. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.md +20 -0
  224. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.zh.md +20 -0
  225. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.md +20 -0
  226. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.zh.md +20 -0
  227. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.md +17 -0
  228. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.zh.md +17 -0
  229. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.md +19 -0
  230. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.zh.md +19 -0
  231. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.md +18 -0
  232. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.zh.md +18 -0
  233. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.md +29 -0
  234. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.zh.md +29 -0
  235. package/kb/extra/web-styling.md +19 -1
  236. package/kb/extra/web-styling.zh.md +19 -1
  237. package/kb/meta/search-index.json +1272 -1098
  238. package/kb/meta/source.json +8 -4
  239. package/kb/site/develop/cordis-tutorial/04-events.md +1 -1
  240. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +5 -4
  241. package/kb/site/develop/framework/events.md +1 -1
  242. package/kb/site/develop/practice/dynamic-cordis.md +1 -1
  243. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -1
  244. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +5 -4
  245. package/kb/site/en/develop/framework/events.md +1 -1
  246. package/kb/site/en/develop/practice/dynamic-cordis.md +1 -1
  247. package/kb/site/en/guide/network-proxy.md +1 -1
  248. package/kb/site/en/guide/plugin-market.md +10 -10
  249. package/kb/site/en/guide/providers.md +5 -1
  250. package/kb/site/en/guide/python-sdk.md +17 -2
  251. package/kb/site/en/guide/schedule.md +45 -26
  252. package/kb/site/en/reference/agent-lifecycle.md +3 -1
  253. package/kb/site/en/reference/api-gateway.md +4 -4
  254. package/kb/site/en/reference/capability-seams.md +65 -17
  255. package/kb/site/en/reference/config-catalog.md +560 -238
  256. package/kb/site/en/reference/cookbook/adding-a-package.md +4 -2
  257. package/kb/site/en/reference/cookbook/extension-cookbook.md +1 -1
  258. package/kb/site/en/reference/cordis-api/context.md +1 -1
  259. package/kb/site/en/reference/cordis-api/events.md +9 -9
  260. package/kb/site/en/reference/cordis-api/fiber.md +85 -32
  261. package/kb/site/en/reference/cordis-api/inherited.md +10 -9
  262. package/kb/site/en/reference/experimental-persistence-catalog.md +3 -0
  263. package/kb/site/en/reference/index.md +14 -8
  264. package/kb/site/en/reference/persistence-catalog.md +532 -246
  265. package/kb/site/en/reference/subsystems/client-modules.md +19 -11
  266. package/kb/site/en/reference/subsystems/compaction.md +1 -1
  267. package/kb/site/en/reference/subsystems/conversation.md +2 -0
  268. package/kb/site/en/reference/subsystems/core.md +119 -65
  269. package/kb/site/en/reference/subsystems/filesystem.md +202 -28
  270. package/kb/site/en/reference/subsystems/index.md +3 -1
  271. package/kb/site/en/reference/subsystems/llm-streaming.md +92 -4
  272. package/kb/site/en/reference/subsystems/persistence.md +17 -7
  273. package/kb/site/en/reference/subsystems/plan.md +4 -4
  274. package/kb/site/en/reference/subsystems/ptc-runtime.md +12 -5
  275. package/kb/site/en/reference/subsystems/sandbox.md +11 -4
  276. package/kb/site/en/reference/subsystems/schedule.md +194 -430
  277. package/kb/site/en/reference/subsystems/session-projection.md +186 -44
  278. package/kb/site/en/reference/subsystems/session-reference.md +4 -3
  279. package/kb/site/en/reference/subsystems/session.md +119 -31
  280. package/kb/site/en/reference/subsystems/sidebar-right.md +12 -11
  281. package/kb/site/en/reference/subsystems/skills.md +4 -4
  282. package/kb/site/en/reference/subsystems/slots.md +30 -3
  283. package/kb/site/en/reference/subsystems/storage.md +26 -9
  284. package/kb/site/en/reference/subsystems/subagent.md +119 -102
  285. package/kb/site/en/reference/subsystems/system-prompt.md +13 -11
  286. package/kb/site/en/reference/subsystems/token-meter.md +45 -0
  287. package/kb/site/en/reference/subsystems/tools.md +222 -82
  288. package/kb/site/en/reference/subsystems/typert.md +21 -11
  289. package/kb/site/en/reference/subsystems/user-questions.md +22 -6
  290. package/kb/site/en/reference/subsystems/web-client.md +1 -1
  291. package/kb/site/en/reference/subsystems/web-server.md +68 -23
  292. package/kb/site/en/reference/subsystems/web.md +79 -21
  293. package/kb/site/en/reference/tool-catalog.md +270 -395
  294. package/kb/site/en/reference/tool-execution-pipeline.md +5 -4
  295. package/kb/site/guide/network-proxy.md +1 -1
  296. package/kb/site/guide/plugin-market.md +10 -10
  297. package/kb/site/guide/providers.md +5 -1
  298. package/kb/site/guide/python-sdk.md +17 -2
  299. package/kb/site/guide/schedule.md +45 -26
  300. package/kb/site/reference/agent-lifecycle.md +3 -1
  301. package/kb/site/reference/api-gateway.md +4 -4
  302. package/kb/site/reference/capability-seams.md +65 -17
  303. package/kb/site/reference/config-catalog.md +560 -238
  304. package/kb/site/reference/cookbook/adding-a-package.md +4 -2
  305. package/kb/site/reference/cookbook/extension-cookbook.md +1 -1
  306. package/kb/site/reference/cordis-api/context.md +1 -1
  307. package/kb/site/reference/cordis-api/events.md +9 -9
  308. package/kb/site/reference/cordis-api/fiber.md +87 -32
  309. package/kb/site/reference/cordis-api/inherited.md +10 -9
  310. package/kb/site/reference/experimental-persistence-catalog.md +3 -0
  311. package/kb/site/reference/index.md +14 -8
  312. package/kb/site/reference/persistence-catalog.md +532 -246
  313. package/kb/site/reference/subsystems/client-modules.md +19 -11
  314. package/kb/site/reference/subsystems/compaction.md +1 -1
  315. package/kb/site/reference/subsystems/conversation.md +4 -0
  316. package/kb/site/reference/subsystems/core.md +119 -65
  317. package/kb/site/reference/subsystems/filesystem.md +202 -28
  318. package/kb/site/reference/subsystems/index.md +3 -1
  319. package/kb/site/reference/subsystems/llm-streaming.md +92 -4
  320. package/kb/site/reference/subsystems/persistence.md +17 -7
  321. package/kb/site/reference/subsystems/plan.md +4 -4
  322. package/kb/site/reference/subsystems/ptc-runtime.md +12 -5
  323. package/kb/site/reference/subsystems/sandbox.md +11 -4
  324. package/kb/site/reference/subsystems/schedule.md +197 -433
  325. package/kb/site/reference/subsystems/session-projection.md +186 -44
  326. package/kb/site/reference/subsystems/session-reference.md +4 -3
  327. package/kb/site/reference/subsystems/session.md +119 -31
  328. package/kb/site/reference/subsystems/sidebar-right.md +12 -11
  329. package/kb/site/reference/subsystems/skills.md +4 -4
  330. package/kb/site/reference/subsystems/slots.md +30 -3
  331. package/kb/site/reference/subsystems/storage.md +26 -9
  332. package/kb/site/reference/subsystems/subagent.md +119 -102
  333. package/kb/site/reference/subsystems/system-prompt.md +13 -11
  334. package/kb/site/reference/subsystems/token-meter.md +45 -0
  335. package/kb/site/reference/subsystems/tools.md +222 -82
  336. package/kb/site/reference/subsystems/typert.md +21 -11
  337. package/kb/site/reference/subsystems/user-questions.md +22 -6
  338. package/kb/site/reference/subsystems/web-client.md +1 -1
  339. package/kb/site/reference/subsystems/web-server.md +68 -23
  340. package/kb/site/reference/subsystems/web.md +79 -21
  341. package/kb/site/reference/tool-catalog.md +273 -399
  342. package/kb/site/reference/tool-execution-pipeline.md +4 -3
  343. package/lib/index.js +123 -8
  344. package/lib/kb-version.js +118 -0
  345. package/package.json +4 -2
  346. package/scripts/refresh-kb.mjs +153 -0
  347. package/scripts/selfcheck.mjs +18 -0
  348. package/scripts/smoke.mjs +77 -0
  349. package/skills/dsh-plugin-dev-kb.md +7 -6
  350. package/skills/dsh-plugin-starter.md +65 -0
  351. package/skills/dsh-upgrade-assistant.md +62 -0
  352. package/kb/extra/agent-lifecycle.md +0 -91
  353. package/kb/extra/agent-lifecycle.zh.md +0 -93
  354. package/kb/extra/api-gateway.md +0 -172
  355. package/kb/extra/api-gateway.zh.md +0 -178
  356. package/kb/extra/architecture.md +0 -165
  357. package/kb/extra/architecture.zh.md +0 -169
  358. package/kb/extra/capability-seams.md +0 -714
  359. package/kb/extra/capability-seams.zh.md +0 -716
  360. package/kb/extra/config-catalog.md +0 -4801
  361. package/kb/extra/config-catalog.zh.md +0 -4803
  362. package/kb/extra/cookbook/adding-a-package.md +0 -170
  363. package/kb/extra/cookbook/adding-a-package.zh.md +0 -170
  364. package/kb/extra/cookbook/adding-a-settings-card.md +0 -72
  365. package/kb/extra/cookbook/adding-a-settings-card.zh.md +0 -72
  366. package/kb/extra/cookbook/adding-a-tool.md +0 -101
  367. package/kb/extra/cookbook/adding-a-tool.zh.md +0 -103
  368. package/kb/extra/cookbook/adding-an-llm-adapter.md +0 -43
  369. package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +0 -43
  370. package/kb/extra/cookbook/extension-cookbook.md +0 -132
  371. package/kb/extra/cookbook/extension-cookbook.zh.md +0 -136
  372. package/kb/extra/cordis-api/context.md +0 -364
  373. package/kb/extra/cordis-api/context.zh.md +0 -366
  374. package/kb/extra/cordis-api/events.md +0 -207
  375. package/kb/extra/cordis-api/events.zh.md +0 -209
  376. package/kb/extra/cordis-api/fiber.md +0 -375
  377. package/kb/extra/cordis-api/fiber.zh.md +0 -377
  378. package/kb/extra/cordis-api/inherited.md +0 -38
  379. package/kb/extra/cordis-api/registry.md +0 -152
  380. package/kb/extra/cordis-api/registry.zh.md +0 -154
  381. package/kb/extra/cordis-api/service.md +0 -102
  382. package/kb/extra/cordis-api/service.zh.md +0 -104
  383. package/kb/extra/cordis-tutorial/01-first-plugin.md +0 -95
  384. package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +0 -95
  385. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +0 -98
  386. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +0 -98
  387. package/kb/extra/cordis-tutorial/03-services.md +0 -98
  388. package/kb/extra/cordis-tutorial/03-services.zh.md +0 -98
  389. package/kb/extra/cordis-tutorial/04-events.md +0 -144
  390. package/kb/extra/cordis-tutorial/04-events.zh.md +0 -144
  391. package/kb/extra/cordis-tutorial/05-config.md +0 -111
  392. package/kb/extra/cordis-tutorial/05-config.zh.md +0 -111
  393. package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +0 -113
  394. package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +0 -113
  395. package/kb/extra/cordis-tutorial/07-into-the-harness.md +0 -108
  396. package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +0 -108
  397. package/kb/extra/cordis-tutorial/index.md +0 -60
  398. package/kb/extra/cordis-tutorial/index.zh.md +0 -62
  399. package/kb/extra/experimental-persistence-catalog.md +0 -17
  400. package/kb/extra/experimental-persistence-catalog.zh.md +0 -17
  401. package/kb/extra/persistence-catalog.md +0 -9140
  402. package/kb/extra/persistence-catalog.zh.md +0 -9142
  403. package/kb/extra/subsystems/README.md +0 -76
  404. package/kb/extra/subsystems/README.zh.md +0 -76
  405. package/kb/extra/subsystems/approval.md +0 -170
  406. package/kb/extra/subsystems/approval.zh.md +0 -170
  407. package/kb/extra/subsystems/client-modules.md +0 -198
  408. package/kb/extra/subsystems/client-modules.zh.md +0 -198
  409. package/kb/extra/subsystems/client-resources.md +0 -92
  410. package/kb/extra/subsystems/client-resources.zh.md +0 -92
  411. package/kb/extra/subsystems/commands.md +0 -223
  412. package/kb/extra/subsystems/commands.zh.md +0 -223
  413. package/kb/extra/subsystems/compaction.md +0 -284
  414. package/kb/extra/subsystems/compaction.zh.md +0 -284
  415. package/kb/extra/subsystems/conversation.md +0 -301
  416. package/kb/extra/subsystems/conversation.zh.md +0 -303
  417. package/kb/extra/subsystems/core.md +0 -1113
  418. package/kb/extra/subsystems/core.zh.md +0 -1125
  419. package/kb/extra/subsystems/credentials.md +0 -493
  420. package/kb/extra/subsystems/credentials.zh.md +0 -493
  421. package/kb/extra/subsystems/filesystem.md +0 -530
  422. package/kb/extra/subsystems/filesystem.zh.md +0 -530
  423. package/kb/extra/subsystems/goal.md +0 -313
  424. package/kb/extra/subsystems/goal.zh.md +0 -313
  425. package/kb/extra/subsystems/jobs.md +0 -554
  426. package/kb/extra/subsystems/jobs.zh.md +0 -554
  427. package/kb/extra/subsystems/llm-streaming.md +0 -1196
  428. package/kb/extra/subsystems/llm-streaming.zh.md +0 -1202
  429. package/kb/extra/subsystems/lsp.md +0 -202
  430. package/kb/extra/subsystems/lsp.zh.md +0 -202
  431. package/kb/extra/subsystems/permission-presets.md +0 -167
  432. package/kb/extra/subsystems/permission-presets.zh.md +0 -167
  433. package/kb/extra/subsystems/persistence.md +0 -418
  434. package/kb/extra/subsystems/persistence.zh.md +0 -418
  435. package/kb/extra/subsystems/plan.md +0 -87
  436. package/kb/extra/subsystems/plan.zh.md +0 -87
  437. package/kb/extra/subsystems/ptc-runtime.md +0 -250
  438. package/kb/extra/subsystems/ptc-runtime.zh.md +0 -250
  439. package/kb/extra/subsystems/sandbox.md +0 -221
  440. package/kb/extra/subsystems/sandbox.zh.md +0 -221
  441. package/kb/extra/subsystems/schedule.md +0 -550
  442. package/kb/extra/subsystems/schedule.zh.md +0 -550
  443. package/kb/extra/subsystems/scope.md +0 -59
  444. package/kb/extra/subsystems/scope.zh.md +0 -61
  445. package/kb/extra/subsystems/session-projection.md +0 -356
  446. package/kb/extra/subsystems/session-projection.zh.md +0 -356
  447. package/kb/extra/subsystems/session-query.md +0 -511
  448. package/kb/extra/subsystems/session-query.zh.md +0 -511
  449. package/kb/extra/subsystems/session-reference.md +0 -224
  450. package/kb/extra/subsystems/session-reference.zh.md +0 -224
  451. package/kb/extra/subsystems/session-telemetry.md +0 -212
  452. package/kb/extra/subsystems/session-telemetry.zh.md +0 -212
  453. package/kb/extra/subsystems/session-title.md +0 -213
  454. package/kb/extra/subsystems/session-title.zh.md +0 -213
  455. package/kb/extra/subsystems/session.md +0 -1339
  456. package/kb/extra/subsystems/session.zh.md +0 -1343
  457. package/kb/extra/subsystems/settings.md +0 -155
  458. package/kb/extra/subsystems/settings.zh.md +0 -155
  459. package/kb/extra/subsystems/shell.md +0 -314
  460. package/kb/extra/subsystems/shell.zh.md +0 -314
  461. package/kb/extra/subsystems/sidebar-right.md +0 -160
  462. package/kb/extra/subsystems/sidebar-right.zh.md +0 -160
  463. package/kb/extra/subsystems/skills.md +0 -352
  464. package/kb/extra/subsystems/skills.zh.md +0 -352
  465. package/kb/extra/subsystems/slots.md +0 -200
  466. package/kb/extra/subsystems/slots.zh.md +0 -204
  467. package/kb/extra/subsystems/spill.md +0 -124
  468. package/kb/extra/subsystems/spill.zh.md +0 -124
  469. package/kb/extra/subsystems/storage.md +0 -259
  470. package/kb/extra/subsystems/storage.zh.md +0 -259
  471. package/kb/extra/subsystems/subagent.md +0 -686
  472. package/kb/extra/subsystems/subagent.zh.md +0 -688
  473. package/kb/extra/subsystems/subprocess.md +0 -321
  474. package/kb/extra/subsystems/subprocess.zh.md +0 -321
  475. package/kb/extra/subsystems/system-prompt.md +0 -254
  476. package/kb/extra/subsystems/system-prompt.zh.md +0 -254
  477. package/kb/extra/subsystems/terminal.md +0 -184
  478. package/kb/extra/subsystems/terminal.zh.md +0 -184
  479. package/kb/extra/subsystems/token-meter.md +0 -106
  480. package/kb/extra/subsystems/token-meter.zh.md +0 -106
  481. package/kb/extra/subsystems/tools.md +0 -747
  482. package/kb/extra/subsystems/tools.zh.md +0 -747
  483. package/kb/extra/subsystems/typert.md +0 -690
  484. package/kb/extra/subsystems/typert.zh.md +0 -690
  485. package/kb/extra/subsystems/user-questions.md +0 -307
  486. package/kb/extra/subsystems/user-questions.zh.md +0 -307
  487. package/kb/extra/subsystems/web-client.md +0 -100
  488. package/kb/extra/subsystems/web-client.zh.md +0 -100
  489. package/kb/extra/subsystems/web-server.md +0 -302
  490. package/kb/extra/subsystems/web-server.zh.md +0 -302
  491. package/kb/extra/subsystems/web.md +0 -206
  492. package/kb/extra/subsystems/web.zh.md +0 -206
  493. package/kb/extra/subsystems/workflow.md +0 -278
  494. package/kb/extra/subsystems/workflow.zh.md +0 -278
  495. package/kb/extra/subsystems/workspace.md +0 -647
  496. package/kb/extra/subsystems/workspace.zh.md +0 -647
  497. package/kb/extra/tool-catalog.md +0 -2824
  498. package/kb/extra/tool-catalog.zh.md +0 -2832
  499. package/kb/extra/tool-execution-pipeline.md +0 -65
  500. package/kb/extra/tool-execution-pipeline.zh.md +0 -67
@@ -1,250 +0,0 @@
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
- * follows the provider's programFormat: an async function body supports
22
- * top-level `await` and `return`; a REPL supports top-level declarations,
23
- * `await`, and a final expression. The completion value becomes
24
- * {@link PtcRunResult.value}.
25
- */
26
- program: string
27
- /**
28
- * Object-identity owner for optional in-memory state. Omission requests a fresh
29
- * environment. Consumers must await runtime.release(owner) when the owner ends.
30
- * Stateless providers ignore this field; retained state is never durable.
31
- */
32
- stateOwner?: object
33
- /** Host functions exposed to the program, one global object per namespace. */
34
- bindings: PtcBindingNamespace[]
35
- /** Working directory in the mounted filesystem and subprocess execution world. */
36
- cwd?: string
37
- /**
38
- * Elapsed execution budget in milliseconds. Omission uses provider defaults;
39
- * null requests no deadline. Providers validate and cap numeric budgets or reject unsupported choices.
40
- */
41
- timeoutMs?: number | null
42
- /** Resolved authority for this execution. Providers without confinement reject an explicit policy. */
43
- sandboxPolicy?: SandboxExecutionPolicy
44
- /**
45
- * Abort the run: the runtime stops the program (hard, even mid-loop) and
46
- * resolves with a {@link PtcRunFailure} of kind `'abort'`. In-flight
47
- * binding calls are the CALLER's to settle — the runtime only stops asking.
48
- */
49
- signal?: AbortSignal
50
- }
51
- ```
52
-
53
- ```ts type-equiv
54
- /** Fully resolved execution inputs; run never supplies a missing directory or deadline choice. */
55
- interface PtcRunSpec extends PtcRunRequest {
56
- /** Absolute directory in the provider's execution world. */
57
- cwd: string
58
- /** Positive finite elapsed budget in milliseconds after provider capping, or null for no deadline. */
59
- timeoutMs: number | null
60
- }
61
- ```
62
-
63
- ```ts type-equiv
64
- /** File confinement applied to a program, independently of its terminal outcome. */
65
- interface PtcRunSandbox {
66
- /** File-effect mode used for this execution. */
67
- mode: SandboxMode
68
- /** Program failure text matched backend diagnostics; not enforcement proof or an exhaustive denial record. */
69
- denied: boolean
70
- /** Completeness reported by the selected confining backend; absent for full access. */
71
- enforcement?: SandboxEnforcement
72
- }
73
- ```
74
-
75
- 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:
76
-
77
- ```ts type-equiv
78
- /**
79
- * The outcome of one run. An error is a FIELD on a resolved result, never a
80
- * rejection of `run()` — reporting a failed program is the caller's job, not
81
- * an exception path.
82
- */
83
- interface PtcRunResult {
84
- /** Applied file policy and observed denial, when the provider enforces file policy. */
85
- sandbox?: PtcRunSandbox
86
- /**
87
- * The program's completion value (a return or final REPL expression), when it ran to
88
- * completion and the value crossed the runtime's lossless-JSON boundary.
89
- * Invalid or over-limit completions fail the run instead of substituting a
90
- * rendered string; a failed or value-less run leaves this absent.
91
- */
92
- value?: PtcJsonValue
93
- /**
94
- * Captured text. Each source channel preserves emission order; interleaving
95
- * across independent channels is backend-dependent. Bounded only as part of
96
- * the outer result.
97
- */
98
- logs: string[]
99
- /** Present iff the run failed; see {@link PtcRunFailure} for the taxonomy. */
100
- error?: PtcRunFailure
101
- }
102
- ```
103
-
104
- `programFormat` distinguishes async function bodies from REPL statements. `stateOwner` is an in-process object identity for optional retained memory; distinct objects remain isolated. Consumers await `release(owner)` when that owner ends; cleanup failures reject that call. Omitted owners are one-shot, and stateless providers ignore ownership. The [persistent Node provider](../../packages/ptc-runtime/ptc-runtime-node/README.md#persistent-repl) defines reset and recovery behavior; no retained object enters the durable Session format.
105
-
106
- ## Bindings: host functions as program globals
107
-
108
- 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:
109
-
110
- ```ts type-equiv
111
- /**
112
- * Program-visible typed rejection for one binding namespace. The runtime
113
- * injects a real error constructor under `name`; rejected member calls become
114
- * its instances and expose the exact member name through
115
- * `memberNameProperty`. Both strings are runtime data rather than knowledge
116
- * of a particular consumer such as PTC mode.
117
- */
118
- interface PtcBindingErrorClass {
119
- /** Constructor global and resulting `Error.name`; same portable identifier rule as {@link PtcBindingNamespace.global}. */
120
- name: string
121
- /**
122
- * Non-empty own property for the member name. The portable exclusion set is
123
- * `RESERVED_ERROR_MEMBERS` plus dunder-form names (`__x__`, non-empty
124
- * middle), enforced identically by every backend; any other name —
125
- * identifiers or not — is accepted everywhere.
126
- */
127
- memberNameProperty: string
128
- }
129
- ```
130
-
131
- ```ts type-equiv
132
- /**
133
- * A named group of {@link PtcBindingFunction}s the runtime exposes to the
134
- * program as one global object (e.g. `tools`). Function names are arbitrary
135
- * strings — a runtime must treat names like `__proto__` or `constructor` as
136
- * ordinary own properties (null-prototype construction), never as prototype
137
- * collisions.
138
- */
139
- interface PtcBindingNamespace {
140
- /**
141
- * The global identifier the program sees. Must match the LANGUAGE-PORTABLE
142
- * identifier subset `[A-Za-z_][A-Za-z0-9_]*` and no language's reserved
143
- * words, so the same namespace list works against every backend regardless
144
- * of `language` — a JS-only spelling like `$tools` is rejected by design,
145
- * not just by the Python backend. Names that satisfy the identifier rule but
146
- * name a backend-owned slot (`RESERVED_BINDING_GLOBALS`, e.g. `console`,
147
- * `__dsh_main__`) are also refused everywhere; see its declaration for the
148
- * exact set and why each entry is reserved.
149
- */
150
- global: string
151
- /** The callable members, keyed by the exact name the program calls. */
152
- functions: Record<string, PtcBindingFunction>
153
- /** Optional program-visible typed rejection contract for this namespace. */
154
- errorClass?: PtcBindingErrorClass
155
- }
156
- ```
157
-
158
- ```ts type-equiv
159
- /** A lossless JSON value transferable through the dependency-light Service Definition. */
160
- type PtcJsonValue = null | boolean | number | string | PtcJsonValue[] | { [key: string]: PtcJsonValue }
161
- ```
162
-
163
- ```ts type-equiv
164
- /**
165
- * One host-side function exposed to the program as an async callable. The
166
- * runtime bridges calls to it (possibly across a serialization boundary), so
167
- * `args` and the resolution value MUST be lossless JSON. A runtime rejects a
168
- * lossy or non-cloneable value with a descriptive error rather than corrupting
169
- * the run. No seam-level byte cap applies to a binding resolution. A rejection
170
- * of this function surfaces inside the program as a rejection of the
171
- * corresponding call.
172
- */
173
- type PtcBindingFunction = (args: unknown) => Promise<PtcJsonValue>
174
- ```
175
-
176
- ## Captured output and the failure taxonomy
177
-
178
- 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.
179
-
180
- Failure kinds are **orthogonal outcomes reported independently** (per [defensive-patterns](../defensive-patterns/general.md)): a budget expiry is not an exception, an abort is not a timeout, and a substrate death (e.g. OOM) is neither:
181
-
182
- ```ts type-equiv
183
- /**
184
- * Why a run failed. The kinds are orthogonal outcomes reported independently
185
- * (per docs/defensive-patterns/general.md): a budget expiry is not an exception, an
186
- * abort is not a timeout, and a substrate death is neither.
187
- *
188
- * - `'exception'` — the program threw or failed to parse/transform.
189
- * - `'timeout'` — an implementation-owned budget expired; the message says which.
190
- * - `'abort'` — {@link PtcRunRequest.signal} fired.
191
- * - `'worker-exit'` — the execution substrate died without settling (e.g. OOM).
192
- * - `'invalid-output'` — the completion value was not lossless JSON.
193
- * - `'output-limit'` — the serialized outer logs/value/diagnostic exceeded the configured cap.
194
- * - `'protocol'` — the program sent invalid or over-budget control traffic.
195
- * - `'sandbox-unavailable'` — required confinement could not be established.
196
- */
197
- interface PtcRunFailure {
198
- /** The failure class (see the interface doc for each kind's meaning). */
199
- kind: 'exception' | 'timeout' | 'abort' | 'worker-exit' | 'invalid-output' | 'output-limit' | 'protocol' | 'sandbox-unavailable'
200
- /** Human-readable detail, suitable for feeding back to a model to self-correct. */
201
- message: string
202
- }
203
- ```
204
-
205
- ## The service
206
-
207
- `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.
208
-
209
- <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
210
-
211
- <a id="cordis-surface"></a>
212
-
213
- ## Cordis API
214
-
215
- 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).
216
-
217
- <a id="ctxptcruntime--ptcruntime-abstract-seam"></a>
218
-
219
- ### `ctx.ptcRuntime` — `PtcRuntime` (abstract seam)
220
-
221
- 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 distinct state owners, and terminate and await in-flight runs during disposal.
222
-
223
- ```ts cordis-catalog
224
- /**
225
- * Release an owner's retained environment and await its execution resources.
226
- * Stateless providers have no retained resources to release.
227
- * @param owner - The exact object supplied as the request's state owner.
228
- * @returns Completion after all owned execution resources have been released.
229
- * @throws When managed resource cleanup fails.
230
- */
231
- release(owner: object): Promise<void>
232
-
233
- /**
234
- * Resolve supported options and provider defaults before execution.
235
- * @param request - Program, bindings, cancellation and optional execution choices.
236
- * @returns Complete directory, deadline and supported authority for run.
237
- * @throws When an explicit choice is invalid or unsupported by this provider.
238
- */
239
- abstract resolve(request: PtcRunRequest): PtcRunSpec
240
-
241
- /**
242
- * Execute resolved inputs; program outcomes resolve as result fields.
243
- * @param spec - directory, deadline, program, bindings, cancellation and supported policy.
244
- * @returns Captured output and the execution outcome.
245
- */
246
- abstract run(spec: PtcRunSpec): Promise<PtcRunResult>
247
- ```
248
-
249
- Source: [`packages/ptc-runtime/ptc-runtime/src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts)
250
- <!-- END GENERATED cordis-surface -->
@@ -1,250 +0,0 @@
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
- * follows the provider's programFormat: an async function body supports
22
- * top-level `await` and `return`; a REPL supports top-level declarations,
23
- * `await`, and a final expression. The completion value becomes
24
- * {@link PtcRunResult.value}.
25
- */
26
- program: string
27
- /**
28
- * Object-identity owner for optional in-memory state. Omission requests a fresh
29
- * environment. Consumers must await runtime.release(owner) when the owner ends.
30
- * Stateless providers ignore this field; retained state is never durable.
31
- */
32
- stateOwner?: object
33
- /** Host functions exposed to the program, one global object per namespace. */
34
- bindings: PtcBindingNamespace[]
35
- /** Working directory in the mounted filesystem and subprocess execution world. */
36
- cwd?: string
37
- /**
38
- * Elapsed execution budget in milliseconds. Omission uses provider defaults;
39
- * null requests no deadline. Providers validate and cap numeric budgets or reject unsupported choices.
40
- */
41
- timeoutMs?: number | null
42
- /** Resolved authority for this execution. Providers without confinement reject an explicit policy. */
43
- sandboxPolicy?: SandboxExecutionPolicy
44
- /**
45
- * Abort the run: the runtime stops the program (hard, even mid-loop) and
46
- * resolves with a {@link PtcRunFailure} of kind `'abort'`. In-flight
47
- * binding calls are the CALLER's to settle — the runtime only stops asking.
48
- */
49
- signal?: AbortSignal
50
- }
51
- ```
52
-
53
- ```ts type-equiv
54
- /** Fully resolved execution inputs; run never supplies a missing directory or deadline choice. */
55
- interface PtcRunSpec extends PtcRunRequest {
56
- /** Absolute directory in the provider's execution world. */
57
- cwd: string
58
- /** Positive finite elapsed budget in milliseconds after provider capping, or null for no deadline. */
59
- timeoutMs: number | null
60
- }
61
- ```
62
-
63
- ```ts type-equiv
64
- /** File confinement applied to a program, independently of its terminal outcome. */
65
- interface PtcRunSandbox {
66
- /** File-effect mode used for this execution. */
67
- mode: SandboxMode
68
- /** Program failure text matched backend diagnostics; not enforcement proof or an exhaustive denial record. */
69
- denied: boolean
70
- /** Completeness reported by the selected confining backend; absent for full access. */
71
- enforcement?: SandboxEnforcement
72
- }
73
- ```
74
-
75
- 程序失败通过 `PtcRunResult.error` 返回;无效调用输入可能在执行前拒绝。沙箱模式、观察到的拒绝与强制完整性是独立事实,因此程序成功本身不能证明每项请求限制均已强制执行:
76
-
77
- ```ts type-equiv
78
- /**
79
- * The outcome of one run. An error is a FIELD on a resolved result, never a
80
- * rejection of `run()` — reporting a failed program is the caller's job, not
81
- * an exception path.
82
- */
83
- interface PtcRunResult {
84
- /** Applied file policy and observed denial, when the provider enforces file policy. */
85
- sandbox?: PtcRunSandbox
86
- /**
87
- * The program's completion value (a return or final REPL expression), when it ran to
88
- * completion and the value crossed the runtime's lossless-JSON boundary.
89
- * Invalid or over-limit completions fail the run instead of substituting a
90
- * rendered string; a failed or value-less run leaves this absent.
91
- */
92
- value?: PtcJsonValue
93
- /**
94
- * Captured text. Each source channel preserves emission order; interleaving
95
- * across independent channels is backend-dependent. Bounded only as part of
96
- * the outer result.
97
- */
98
- logs: string[]
99
- /** Present iff the run failed; see {@link PtcRunFailure} for the taxonomy. */
100
- error?: PtcRunFailure
101
- }
102
- ```
103
-
104
- `programFormat` 区分异步函数体与 REPL 语句。`stateOwner` 是标识可选保留内存的进程内对象身份;不同对象相互隔离。消费者在所有者结束时等待 `release(owner)`;清理失败时该调用拒绝。省略所有者时仅执行一次,无状态提供方忽略所有权。[持久 Node 提供方](../../packages/ptc-runtime/ptc-runtime-node/README.zh.md#persistent-repl)定义重置和恢复行为;保留对象不会进入持久 Session 格式。
105
-
106
- ## 绑定:宿主函数作为程序全局变量
107
-
108
- 每个 `PtcBindingNamespace` 成为一个异步可调用函数的全局对象;PTC 传入 `tools`。参数与返回值必须是无损 JSON。提供方强制各自的传输上限;seam 不设统一的绑定字节上限。可选错误类描述符创建程序可见的类型化拒绝,无需在运行时内点名消费方。绑定名是自有属性,因此 `__proto__` 不能遍历原型:
109
-
110
- ```ts type-equiv
111
- /**
112
- * Program-visible typed rejection for one binding namespace. The runtime
113
- * injects a real error constructor under `name`; rejected member calls become
114
- * its instances and expose the exact member name through
115
- * `memberNameProperty`. Both strings are runtime data rather than knowledge
116
- * of a particular consumer such as PTC mode.
117
- */
118
- interface PtcBindingErrorClass {
119
- /** Constructor global and resulting `Error.name`; same portable identifier rule as {@link PtcBindingNamespace.global}. */
120
- name: string
121
- /**
122
- * Non-empty own property for the member name. The portable exclusion set is
123
- * `RESERVED_ERROR_MEMBERS` plus dunder-form names (`__x__`, non-empty
124
- * middle), enforced identically by every backend; any other name —
125
- * identifiers or not — is accepted everywhere.
126
- */
127
- memberNameProperty: string
128
- }
129
- ```
130
-
131
- ```ts type-equiv
132
- /**
133
- * A named group of {@link PtcBindingFunction}s the runtime exposes to the
134
- * program as one global object (e.g. `tools`). Function names are arbitrary
135
- * strings — a runtime must treat names like `__proto__` or `constructor` as
136
- * ordinary own properties (null-prototype construction), never as prototype
137
- * collisions.
138
- */
139
- interface PtcBindingNamespace {
140
- /**
141
- * The global identifier the program sees. Must match the LANGUAGE-PORTABLE
142
- * identifier subset `[A-Za-z_][A-Za-z0-9_]*` and no language's reserved
143
- * words, so the same namespace list works against every backend regardless
144
- * of `language` — a JS-only spelling like `$tools` is rejected by design,
145
- * not just by the Python backend. Names that satisfy the identifier rule but
146
- * name a backend-owned slot (`RESERVED_BINDING_GLOBALS`, e.g. `console`,
147
- * `__dsh_main__`) are also refused everywhere; see its declaration for the
148
- * exact set and why each entry is reserved.
149
- */
150
- global: string
151
- /** The callable members, keyed by the exact name the program calls. */
152
- functions: Record<string, PtcBindingFunction>
153
- /** Optional program-visible typed rejection contract for this namespace. */
154
- errorClass?: PtcBindingErrorClass
155
- }
156
- ```
157
-
158
- ```ts type-equiv
159
- /** A lossless JSON value transferable through the dependency-light Service Definition. */
160
- type PtcJsonValue = null | boolean | number | string | PtcJsonValue[] | { [key: string]: PtcJsonValue }
161
- ```
162
-
163
- ```ts type-equiv
164
- /**
165
- * One host-side function exposed to the program as an async callable. The
166
- * runtime bridges calls to it (possibly across a serialization boundary), so
167
- * `args` and the resolution value MUST be lossless JSON. A runtime rejects a
168
- * lossy or non-cloneable value with a descriptive error rather than corrupting
169
- * the run. No seam-level byte cap applies to a binding resolution. A rejection
170
- * of this function surfaces inside the program as a rejection of the
171
- * corresponding call.
172
- */
173
- type PtcBindingFunction = (args: unknown) => Promise<PtcJsonValue>
174
- ```
175
-
176
- ## 捕获的输出与失败分类体系
177
-
178
- 日志是纯字符串。每个来源通道保留自身的发出顺序;由于通道元数据不属于 seam,相互独立的通道如何交错由后端决定。运行时捕获程序的 console 与流输出,Consumer 只渲染文本。实现会对序列化后的外层日志数组,以及完成值或失败消息的组合载荷设置上限;固定的结果封装语法与 Consumer 展示空白不计入这份可变载荷计量。超限会显式失败,而不会在值中插入替代内容。
179
-
180
- 失败类型是**正交的结果,独立报告**(见 [defensive-patterns](../defensive-patterns/general.zh.md)):预算耗尽不是异常,中止不是超时,基底崩溃(如 OOM)也不是二者中的任何一个:
181
-
182
- ```ts type-equiv
183
- /**
184
- * Why a run failed. The kinds are orthogonal outcomes reported independently
185
- * (per docs/defensive-patterns/general.md): a budget expiry is not an exception, an
186
- * abort is not a timeout, and a substrate death is neither.
187
- *
188
- * - `'exception'` — the program threw or failed to parse/transform.
189
- * - `'timeout'` — an implementation-owned budget expired; the message says which.
190
- * - `'abort'` — {@link PtcRunRequest.signal} fired.
191
- * - `'worker-exit'` — the execution substrate died without settling (e.g. OOM).
192
- * - `'invalid-output'` — the completion value was not lossless JSON.
193
- * - `'output-limit'` — the serialized outer logs/value/diagnostic exceeded the configured cap.
194
- * - `'protocol'` — the program sent invalid or over-budget control traffic.
195
- * - `'sandbox-unavailable'` — required confinement could not be established.
196
- */
197
- interface PtcRunFailure {
198
- /** The failure class (see the interface doc for each kind's meaning). */
199
- kind: 'exception' | 'timeout' | 'abort' | 'worker-exit' | 'invalid-output' | 'output-limit' | 'protocol' | 'sandbox-unavailable'
200
- /** Human-readable detail, suitable for feeding back to a model to self-correct. */
201
- message: string
202
- }
203
- ```
204
-
205
- ## 服务
206
-
207
- `PtcRuntime` 定义于 [`src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts)。`resolve(request)` 返回完整执行输入,`run(spec)` 执行它们。`executionInstructions` 提供由运行时拥有的使用说明,供消费方呈现。支持逐次覆盖时,`timeout` 报告配置的经过时间默认值和上限;每次请求仍由 `resolve` 验证并截断。`language` 选择支持的程序呈现;`isolation` 描述执行基底,不作安全声明。`sandboxMode` 声明文件策略支持,不提供约束的提供方返回 `undefined`。每个实现将各次运行的程序状态分离,并在资源释放期间终止且等待活跃执行。
208
-
209
- <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
210
-
211
- <a id="cordis-surface"></a>
212
-
213
- ## Cordis API
214
-
215
- 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).
216
-
217
- <a id="ctxptcruntime--ptcruntime-abstract-seam"></a>
218
-
219
- ### `ctx.ptcRuntime` — `PtcRuntime` (abstract seam)
220
-
221
- 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 distinct state owners, and terminate and await in-flight runs during disposal.
222
-
223
- ```ts cordis-catalog
224
- /**
225
- * Release an owner's retained environment and await its execution resources.
226
- * Stateless providers have no retained resources to release.
227
- * @param owner - The exact object supplied as the request's state owner.
228
- * @returns Completion after all owned execution resources have been released.
229
- * @throws When managed resource cleanup fails.
230
- */
231
- release(owner: object): Promise<void>
232
-
233
- /**
234
- * Resolve supported options and provider defaults before execution.
235
- * @param request - Program, bindings, cancellation and optional execution choices.
236
- * @returns Complete directory, deadline and supported authority for run.
237
- * @throws When an explicit choice is invalid or unsupported by this provider.
238
- */
239
- abstract resolve(request: PtcRunRequest): PtcRunSpec
240
-
241
- /**
242
- * Execute resolved inputs; program outcomes resolve as result fields.
243
- * @param spec - directory, deadline, program, bindings, cancellation and supported policy.
244
- * @returns Captured output and the execution outcome.
245
- */
246
- abstract run(spec: PtcRunSpec): Promise<PtcRunResult>
247
- ```
248
-
249
- Source: [`packages/ptc-runtime/ptc-runtime/src/index.ts`](../../packages/ptc-runtime/ptc-runtime/src/index.ts)
250
- <!-- END GENERATED cordis-surface -->