@tencent-ai/agent-harness 0.2.0-beta.7 → 0.2.0-beta.8

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 (859) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/cli/CHANGELOG.md +74 -0
  3. package/cli/dist-server/lite/in-memory-session-store.js +1 -1
  4. package/cli/dist-server/shared.cjs +263 -217
  5. package/cli/dist-server/types/node/a2a/a2a-protocol.d.ts +516 -0
  6. package/cli/dist-server/types/node/agent/agent-completion-waiter.d.ts +28 -0
  7. package/cli/dist-server/types/node/agent/agent-controller.d.ts +147 -0
  8. package/cli/dist-server/types/node/agent/agent-display.d.ts +77 -0
  9. package/cli/dist-server/types/node/agent/agent-manager.d.ts +964 -0
  10. package/cli/dist-server/types/node/agent/agent-memory.d.ts +72 -0
  11. package/cli/dist-server/types/node/agent/agent-runtime-adapter.d.ts +71 -0
  12. package/cli/dist-server/types/node/agent/builtin-agent-modes.d.ts +47 -0
  13. package/cli/dist-server/types/node/agent/custom-agent-identity.d.ts +54 -0
  14. package/cli/dist-server/types/node/agent/custom-agent-manager.d.ts +43 -0
  15. package/cli/dist-server/types/node/agent/custom-agent-path-registry.d.ts +19 -0
  16. package/cli/dist-server/types/node/agent/exit-planmode-visibility.d.ts +64 -0
  17. package/cli/dist-server/types/node/agent/index.d.ts +22 -0
  18. package/cli/dist-server/types/node/agent/insights-data-agent-run-interceptor.d.ts +67 -0
  19. package/cli/dist-server/types/node/agent/interceptors/command-interceptors.d.ts +89 -0
  20. package/cli/dist-server/types/node/agent/interceptors/deep-research-pending-interceptor.d.ts +30 -0
  21. package/cli/dist-server/types/node/agent/interceptors/env-interceptor.d.ts +7 -0
  22. package/cli/dist-server/types/node/agent/interceptors/file-interceptors.d.ts +45 -0
  23. package/cli/dist-server/types/node/agent/interceptors/image-interceptors.d.ts +47 -0
  24. package/cli/dist-server/types/node/agent/interceptors/index.d.ts +16 -0
  25. package/cli/dist-server/types/node/agent/interceptors/initial-prompt-interceptor.d.ts +29 -0
  26. package/cli/dist-server/types/node/agent/interceptors/manual-compact-request-handler.d.ts +29 -0
  27. package/cli/dist-server/types/node/agent/interceptors/model-interceptors.d.ts +43 -0
  28. package/cli/dist-server/types/node/agent/interceptors/sandbox-interceptor.d.ts +84 -0
  29. package/cli/dist-server/types/node/agent/interceptors/sensitive-user-input-interceptor.d.ts +7 -0
  30. package/cli/dist-server/types/node/agent/interceptors/system-reminder-interceptor.d.ts +101 -0
  31. package/cli/dist-server/types/node/agent/interceptors/team-resume-intent-interceptor.d.ts +31 -0
  32. package/cli/dist-server/types/node/agent/interceptors/telemetry-interceptors.d.ts +43 -0
  33. package/cli/dist-server/types/node/agent/interceptors/ultracode-effort-reminder-interceptor.d.ts +21 -0
  34. package/cli/dist-server/types/node/agent/interceptors/ultracode-keyword-interceptor.d.ts +34 -0
  35. package/cli/dist-server/types/node/agent/main-agent-policy.d.ts +33 -0
  36. package/cli/dist-server/types/node/agent/main-agent-preset.d.ts +32 -0
  37. package/cli/dist-server/types/node/agent/main-agent-resolver.d.ts +156 -0
  38. package/cli/dist-server/types/node/agent/main-agent-session.d.ts +212 -0
  39. package/cli/dist-server/types/node/agent/memory-context-interceptor.d.ts +84 -0
  40. package/cli/dist-server/types/node/agent/standing-main-agent.d.ts +12 -0
  41. package/cli/dist-server/types/node/agent/stream-json-init-interceptor.d.ts +9 -0
  42. package/cli/dist-server/types/node/agent/subagent-limits.d.ts +90 -0
  43. package/cli/dist-server/types/node/agent/team-context-interceptor.d.ts +42 -0
  44. package/cli/dist-server/types/node/agent/teammate-failure-interceptor.d.ts +67 -0
  45. package/cli/dist-server/types/node/agent-home/agent-home-attachments.d.ts +83 -0
  46. package/cli/dist-server/types/node/agent-home/agent-home-channel-system-event.d.ts +15 -0
  47. package/cli/dist-server/types/node/agent-home/agent-home-channel-task-event.d.ts +24 -0
  48. package/cli/dist-server/types/node/agent-home/agent-home-channel-wake.d.ts +115 -0
  49. package/cli/dist-server/types/node/agent-home/agent-home-channel-widget.d.ts +45 -0
  50. package/cli/dist-server/types/node/agent-home/agent-home-directory.d.ts +304 -0
  51. package/cli/dist-server/types/node/agent-home/agent-home-limits.d.ts +73 -0
  52. package/cli/dist-server/types/node/agent-home/agent-home-membership.d.ts +34 -0
  53. package/cli/dist-server/types/node/agent-home/agent-home-mentions.d.ts +39 -0
  54. package/cli/dist-server/types/node/agent-home/agent-home-room-contacts.d.ts +51 -0
  55. package/cli/dist-server/types/node/agent-home/channel-wake-service.d.ts +69 -0
  56. package/cli/dist-server/types/node/agent-task/agent-task-manager.d.ts +242 -0
  57. package/cli/dist-server/types/node/agent-task/agent-task-output-manager.d.ts +55 -0
  58. package/cli/dist-server/types/node/agent-task/agent-task-protocol.d.ts +687 -0
  59. package/cli/dist-server/types/node/agent-task/agent-task.d.ts +405 -0
  60. package/cli/dist-server/types/node/agent-task/background-task-notifier.d.ts +212 -0
  61. package/cli/dist-server/types/node/agent-task/background-task-tool-approval-service.d.ts +36 -0
  62. package/cli/dist-server/types/node/agent-task/index.d.ts +9 -0
  63. package/cli/dist-server/types/node/agent-task/retained-agent-task.d.ts +11 -0
  64. package/cli/dist-server/types/node/agent-task/stream-json-drain-trigger.d.ts +23 -0
  65. package/cli/dist-server/types/node/agent-task/subagent-output-scanner.d.ts +53 -0
  66. package/cli/dist-server/types/node/agent-team/backends/teammate-backend-protocol.d.ts +119 -0
  67. package/cli/dist-server/types/node/agent-team/team-member.d.ts +391 -0
  68. package/cli/dist-server/types/node/agent-team/team-protocol.d.ts +375 -0
  69. package/cli/dist-server/types/node/agent-view/agent-view-actions.d.ts +209 -0
  70. package/cli/dist-server/types/node/agent-view/agent-view-protocol.d.ts +714 -0
  71. package/cli/dist-server/types/node/agent-view/handoff-policy.d.ts +80 -0
  72. package/cli/dist-server/types/node/agent-view/launch-workspace.d.ts +9 -0
  73. package/cli/dist-server/types/node/agent-view/session-handoff.d.ts +161 -0
  74. package/cli/dist-server/types/node/ask/ask-protoctol.d.ts +102 -0
  75. package/cli/dist-server/types/node/ask/ask-service.d.ts +62 -0
  76. package/cli/dist-server/types/node/ask/index.d.ts +3 -0
  77. package/cli/dist-server/types/node/ask/session-ask-user-question-handler.d.ts +25 -0
  78. package/cli/dist-server/types/node/authentication/api-key-authentication-storage.d.ts +17 -0
  79. package/cli/dist-server/types/node/authentication/custom-token-authentication-storage.d.ts +10 -0
  80. package/cli/dist-server/types/node/authentication/file-authentication-storage.d.ts +71 -0
  81. package/cli/dist-server/types/node/bash-sandbox/bash-sandbox-manager.d.ts +125 -0
  82. package/cli/dist-server/types/node/bash-sandbox/index.d.ts +4 -0
  83. package/cli/dist-server/types/node/bash-sandbox/legacy-sandbox-shell-protocol.d.ts +33 -0
  84. package/cli/dist-server/types/node/bash-sandbox/legacy-sandbox-shell-service.d.ts +33 -0
  85. package/cli/dist-server/types/node/blob-store/blob-store-protocol.d.ts +104 -0
  86. package/cli/dist-server/types/node/blob-store/blob-store-service.d.ts +22 -0
  87. package/cli/dist-server/types/node/blob-store/image-blob-service.d.ts +121 -0
  88. package/cli/dist-server/types/node/blob-store/index.d.ts +4 -0
  89. package/cli/dist-server/types/node/blob-store/tool-result-blob-service.d.ts +109 -0
  90. package/cli/dist-server/types/node/channel/channel-event-service.d.ts +18 -0
  91. package/cli/dist-server/types/node/channel/channel-manager.d.ts +41 -0
  92. package/cli/dist-server/types/node/channel/channel-permission-adapter.d.ts +27 -0
  93. package/cli/dist-server/types/node/channel/channel-protocol.d.ts +192 -0
  94. package/cli/dist-server/types/node/channel/channel-security-manager.d.ts +12 -0
  95. package/cli/dist-server/types/node/channel/index.d.ts +5 -0
  96. package/cli/dist-server/types/node/cli/tui-mode-service.d.ts +20 -0
  97. package/cli/dist-server/types/node/code-ratio/cli-git-commit-watcher.d.ts +142 -0
  98. package/cli/dist-server/types/node/code-ratio/cli-svn-commit-watcher.d.ts +111 -0
  99. package/cli/dist-server/types/node/code-ratio/code-ratio-reporting-service.d.ts +90 -0
  100. package/cli/dist-server/types/node/code-ratio/fs-file-reader.d.ts +26 -0
  101. package/cli/dist-server/types/node/code-ratio/index.d.ts +5 -0
  102. package/cli/dist-server/types/node/code-ratio/vcs-repo-resolver.d.ts +51 -0
  103. package/cli/dist-server/types/node/command/add-dir-command-executor.d.ts +11 -0
  104. package/cli/dist-server/types/node/command/agent-mode-command-executor.d.ts +11 -0
  105. package/cli/dist-server/types/node/command/agents-command-executor.d.ts +9 -0
  106. package/cli/dist-server/types/node/command/auto-compact-command-executor.d.ts +20 -0
  107. package/cli/dist-server/types/node/command/background-command-executor.d.ts +29 -0
  108. package/cli/dist-server/types/node/command/bash-command-executor.d.ts +62 -0
  109. package/cli/dist-server/types/node/command/btw-command-executor.d.ts +13 -0
  110. package/cli/dist-server/types/node/command/clear-command-executor.d.ts +17 -0
  111. package/cli/dist-server/types/node/command/command-manager.d.ts +54 -0
  112. package/cli/dist-server/types/node/command/command-protocol.d.ts +106 -0
  113. package/cli/dist-server/types/node/command/config-command-executor.d.ts +15 -0
  114. package/cli/dist-server/types/node/command/context-command-executor.d.ts +42 -0
  115. package/cli/dist-server/types/node/command/copy-command-executor.d.ts +10 -0
  116. package/cli/dist-server/types/node/command/cost-command-executor.d.ts +13 -0
  117. package/cli/dist-server/types/node/command/custom-command-renderer.d.ts +29 -0
  118. package/cli/dist-server/types/node/command/debug-command-executor.d.ts +15 -0
  119. package/cli/dist-server/types/node/command/deep-research-command-executor.d.ts +27 -0
  120. package/cli/dist-server/types/node/command/doctor-command-executor.d.ts +7 -0
  121. package/cli/dist-server/types/node/command/effort-command-executor.d.ts +68 -0
  122. package/cli/dist-server/types/node/command/exit-command-executor.d.ts +14 -0
  123. package/cli/dist-server/types/node/command/export-command-executor.d.ts +7 -0
  124. package/cli/dist-server/types/node/command/feedback-command-executor.d.ts +9 -0
  125. package/cli/dist-server/types/node/command/fork-bg-command-executor.d.ts +29 -0
  126. package/cli/dist-server/types/node/command/fork-command-executor.d.ts +28 -0
  127. package/cli/dist-server/types/node/command/goal-command-executor.d.ts +50 -0
  128. package/cli/dist-server/types/node/command/handoff-message-adapter.d.ts +9 -0
  129. package/cli/dist-server/types/node/command/help-command-executor.d.ts +9 -0
  130. package/cli/dist-server/types/node/command/hooks-command-executor.d.ts +9 -0
  131. package/cli/dist-server/types/node/command/ide-command-executor.d.ts +11 -0
  132. package/cli/dist-server/types/node/command/index.d.ts +66 -0
  133. package/cli/dist-server/types/node/command/local-shell.d.ts +31 -0
  134. package/cli/dist-server/types/node/command/mcp-command-executor.d.ts +15 -0
  135. package/cli/dist-server/types/node/command/mcp-prompt-renderer.d.ts +44 -0
  136. package/cli/dist-server/types/node/command/memory-command-executor.d.ts +17 -0
  137. package/cli/dist-server/types/node/command/model-command-executor.d.ts +11 -0
  138. package/cli/dist-server/types/node/command/model-image-to-image-command-executor.d.ts +17 -0
  139. package/cli/dist-server/types/node/command/model-image-to-video-command-executor.d.ts +17 -0
  140. package/cli/dist-server/types/node/command/model-lite-command-executor.d.ts +17 -0
  141. package/cli/dist-server/types/node/command/model-reasoning-command-executor.d.ts +17 -0
  142. package/cli/dist-server/types/node/command/model-text-to-image-command-executor.d.ts +17 -0
  143. package/cli/dist-server/types/node/command/model-text-to-video-command-executor.d.ts +17 -0
  144. package/cli/dist-server/types/node/command/multitask-command-executor.d.ts +9 -0
  145. package/cli/dist-server/types/node/command/permissions-command-executor.d.ts +9 -0
  146. package/cli/dist-server/types/node/command/plan-command-executor.d.ts +11 -0
  147. package/cli/dist-server/types/node/command/plugin-command-executor.d.ts +25 -0
  148. package/cli/dist-server/types/node/command/plugin-validate-command-executor.d.ts +21 -0
  149. package/cli/dist-server/types/node/command/release-notes-command-executor.d.ts +18 -0
  150. package/cli/dist-server/types/node/command/reload-plugins-command-executor.d.ts +22 -0
  151. package/cli/dist-server/types/node/command/remote-control-command-executor.d.ts +44 -0
  152. package/cli/dist-server/types/node/command/rename-command-executor.d.ts +11 -0
  153. package/cli/dist-server/types/node/command/reset-command-executor.d.ts +9 -0
  154. package/cli/dist-server/types/node/command/resume-command-executor.d.ts +21 -0
  155. package/cli/dist-server/types/node/command/rewind-command-executor.d.ts +10 -0
  156. package/cli/dist-server/types/node/command/sandbox-command-executor.d.ts +20 -0
  157. package/cli/dist-server/types/node/command/save-workflow-command-executor.d.ts +43 -0
  158. package/cli/dist-server/types/node/command/skills-command-executor.d.ts +9 -0
  159. package/cli/dist-server/types/node/command/stats-command-executor.d.ts +11 -0
  160. package/cli/dist-server/types/node/command/status-command-executor.d.ts +11 -0
  161. package/cli/dist-server/types/node/command/tasks-command-executor.d.ts +9 -0
  162. package/cli/dist-server/types/node/command/terminal-setup-command-executor.d.ts +7 -0
  163. package/cli/dist-server/types/node/command/theme-command-executor.d.ts +7 -0
  164. package/cli/dist-server/types/node/command/todos-command-executor.d.ts +16 -0
  165. package/cli/dist-server/types/node/command/upgrade-command-executor.d.ts +13 -0
  166. package/cli/dist-server/types/node/command/vim-command-executor.d.ts +11 -0
  167. package/cli/dist-server/types/node/command/web-command-executor.d.ts +18 -0
  168. package/cli/dist-server/types/node/command/workflows-command-executor.d.ts +26 -0
  169. package/cli/dist-server/types/node/command-parser/command-parser-protocol.d.ts +81 -0
  170. package/cli/dist-server/types/node/console/console-manager.d.ts +37 -0
  171. package/cli/dist-server/types/node/console/console-protocol.d.ts +112 -0
  172. package/cli/dist-server/types/node/console/index.d.ts +2 -0
  173. package/cli/dist-server/types/node/context/deferred-tools-description-builder.d.ts +145 -0
  174. package/cli/dist-server/types/node/context/token-calculator/token-calculator-protocol.d.ts +27 -0
  175. package/cli/dist-server/types/node/debug/debug-middleware.d.ts +8 -0
  176. package/cli/dist-server/types/node/debug/debug-protocol.d.ts +63 -0
  177. package/cli/dist-server/types/node/debug/debug-service.d.ts +26 -0
  178. package/cli/dist-server/types/node/debug/index.d.ts +3 -0
  179. package/cli/dist-server/types/node/elicitation/elicitation-service.d.ts +100 -0
  180. package/cli/dist-server/types/node/feedback/feedback-protocol.d.ts +32 -0
  181. package/cli/dist-server/types/node/feedback/feedback-service.d.ts +19 -0
  182. package/cli/dist-server/types/node/feedback/index.d.ts +2 -0
  183. package/cli/dist-server/types/node/galileo/agent-metrics-aggregator.d.ts +115 -0
  184. package/cli/dist-server/types/node/galileo/error-category.d.ts +65 -0
  185. package/cli/dist-server/types/node/galileo/galileo-chat-reporter.d.ts +302 -0
  186. package/cli/dist-server/types/node/galileo/galileo-protocol.d.ts +78 -0
  187. package/cli/dist-server/types/node/galileo/galileo-service.d.ts +171 -0
  188. package/cli/dist-server/types/node/galileo/galileo-session-bridge-protocol.d.ts +134 -0
  189. package/cli/dist-server/types/node/galileo/galileo-session-bridge.d.ts +105 -0
  190. package/cli/dist-server/types/node/galileo/galileo-timing-hook.d.ts +115 -0
  191. package/cli/dist-server/types/node/galileo/galileo-tool-error-report-hook.d.ts +32 -0
  192. package/cli/dist-server/types/node/galileo/galileo-tool-post-hook.d.ts +18 -0
  193. package/cli/dist-server/types/node/galileo/galileo-tool-pre-hook.d.ts +16 -0
  194. package/cli/dist-server/types/node/galileo/galileo-tool-start-report-hook.d.ts +14 -0
  195. package/cli/dist-server/types/node/galileo/galileo-tool-success-report-hook.d.ts +14 -0
  196. package/cli/dist-server/types/node/galileo/index.d.ts +15 -0
  197. package/cli/dist-server/types/node/galileo/session-error-tracker.d.ts +44 -0
  198. package/cli/dist-server/types/node/galileo/task-outcome-resolver.d.ts +28 -0
  199. package/cli/dist-server/types/node/galileo/task-outcome.d.ts +35 -0
  200. package/cli/dist-server/types/node/hooks/functional-hooks-protocol.d.ts +78 -0
  201. package/cli/dist-server/types/node/hooks/functional-hooks.d.ts +23 -0
  202. package/cli/dist-server/types/node/http/certificate-manager.d.ts +50 -0
  203. package/cli/dist-server/types/node/http/classify-network-error.d.ts +21 -0
  204. package/cli/dist-server/types/node/http/custom-header-http-interceptor.d.ts +14 -0
  205. package/cli/dist-server/types/node/http/custom-headers-provider.d.ts +26 -0
  206. package/cli/dist-server/types/node/http/fetch-proxy.d.ts +22 -0
  207. package/cli/dist-server/types/node/http/http-proxy-interceptor.d.ts +116 -0
  208. package/cli/dist-server/types/node/http/index.d.ts +6 -0
  209. package/cli/dist-server/types/node/ide-integration/ide-edit-manager.d.ts +53 -0
  210. package/cli/dist-server/types/node/ide-integration/ide-protocol.d.ts +450 -0
  211. package/cli/dist-server/types/node/install/index.d.ts +6 -0
  212. package/cli/dist-server/types/node/install/install-controller.d.ts +15 -0
  213. package/cli/dist-server/types/node/install/install-env.d.ts +12 -0
  214. package/cli/dist-server/types/node/install/install-protocol.d.ts +83 -0
  215. package/cli/dist-server/types/node/install/install-service.d.ts +36 -0
  216. package/cli/dist-server/types/node/install/releases-service.d.ts +29 -0
  217. package/cli/dist-server/types/node/install/shell-setup.d.ts +36 -0
  218. package/cli/dist-server/types/node/library-runtime.d.ts +9 -0
  219. package/cli/dist-server/types/node/loopback/endpoint-provider.d.ts +9 -0
  220. package/cli/dist-server/types/node/loopback/error-provider.d.ts +9 -0
  221. package/cli/dist-server/types/node/loopback/index.d.ts +4 -0
  222. package/cli/dist-server/types/node/loopback/loopback-body-limit.d.ts +52 -0
  223. package/cli/dist-server/types/node/lsp/index.d.ts +6 -0
  224. package/cli/dist-server/types/node/lsp/lsp-client.d.ts +104 -0
  225. package/cli/dist-server/types/node/lsp/lsp-manager.d.ts +90 -0
  226. package/cli/dist-server/types/node/lsp/lsp-protocol.d.ts +245 -0
  227. package/cli/dist-server/types/node/mcp/agent-scoped-mcp-manager.d.ts +38 -0
  228. package/cli/dist-server/types/node/mcp/index.d.ts +32 -0
  229. package/cli/dist-server/types/node/mcp/mcp-cli-config-initializer.d.ts +18 -0
  230. package/cli/dist-server/types/node/mcp/mcp-config-diagnostics-manager.d.ts +29 -0
  231. package/cli/dist-server/types/node/mcp/mcp-config-env-expand-service.d.ts +45 -0
  232. package/cli/dist-server/types/node/mcp/mcp-config-fingerprint.d.ts +28 -0
  233. package/cli/dist-server/types/node/mcp/mcp-config-manager.d.ts +110 -0
  234. package/cli/dist-server/types/node/mcp/mcp-config-store.d.ts +18 -0
  235. package/cli/dist-server/types/node/mcp/mcp-connection-manager.d.ts +35 -0
  236. package/cli/dist-server/types/node/mcp/mcp-controller.d.ts +56 -0
  237. package/cli/dist-server/types/node/mcp/mcp-descriptor-environment.d.ts +5 -0
  238. package/cli/dist-server/types/node/mcp/mcp-first-run-status-service.d.ts +37 -0
  239. package/cli/dist-server/types/node/mcp/mcp-log-service.d.ts +5 -0
  240. package/cli/dist-server/types/node/mcp/mcp-manager.d.ts +339 -0
  241. package/cli/dist-server/types/node/mcp/mcp-oauth-controller.d.ts +26 -0
  242. package/cli/dist-server/types/node/mcp/mcp-oauth-manager.d.ts +33 -0
  243. package/cli/dist-server/types/node/mcp/mcp-oauth-store.d.ts +30 -0
  244. package/cli/dist-server/types/node/mcp/mcp-permissions-manager.d.ts +52 -0
  245. package/cli/dist-server/types/node/mcp/mcp-plugin-registry.d.ts +39 -0
  246. package/cli/dist-server/types/node/mcp/mcp-ready-service.d.ts +94 -0
  247. package/cli/dist-server/types/node/mcp/mcp-resource-catalog-protocol.d.ts +62 -0
  248. package/cli/dist-server/types/node/mcp/mcp-resource-catalog.d.ts +32 -0
  249. package/cli/dist-server/types/node/mcp/mcp-server-manager.d.ts +283 -0
  250. package/cli/dist-server/types/node/mcp/mcp-server-model-manager.d.ts +14 -0
  251. package/cli/dist-server/types/node/mcp/mcp-subagent-tool-manager.d.ts +36 -0
  252. package/cli/dist-server/types/node/mcp/mcp-toggle-manager.d.ts +45 -0
  253. package/cli/dist-server/types/node/mcp/mcp-transport-manager.d.ts +34 -0
  254. package/cli/dist-server/types/node/mcp/mcp-validate-middleware.d.ts +25 -0
  255. package/cli/dist-server/types/node/mcp/node-websocket-transport.d.ts +38 -0
  256. package/cli/dist-server/types/node/mcp/official-mcp-egress-policy.d.ts +17 -0
  257. package/cli/dist-server/types/node/mcp/sdk-mcp-server.d.ts +149 -0
  258. package/cli/dist-server/types/node/mcp/sdk-mcp-transport.d.ts +97 -0
  259. package/cli/dist-server/types/node/memory/conditional-rules-service.d.ts +21 -0
  260. package/cli/dist-server/types/node/memory/glob-matcher.d.ts +16 -0
  261. package/cli/dist-server/types/node/memory/index.d.ts +20 -0
  262. package/cli/dist-server/types/node/memory/memory-age.d.ts +44 -0
  263. package/cli/dist-server/types/node/memory/memory-cache.d.ts +8 -0
  264. package/cli/dist-server/types/node/memory/memory-controller.d.ts +62 -0
  265. package/cli/dist-server/types/node/memory/memory-extraction-prompts.d.ts +11 -0
  266. package/cli/dist-server/types/node/memory/memory-extraction-service.d.ts +56 -0
  267. package/cli/dist-server/types/node/memory/memory-extraction-stop-hook.d.ts +18 -0
  268. package/cli/dist-server/types/node/memory/memory-freshness-post-tool-hook.d.ts +22 -0
  269. package/cli/dist-server/types/node/memory/memory-loader.d.ts +62 -0
  270. package/cli/dist-server/types/node/memory/memory-manager.d.ts +24 -0
  271. package/cli/dist-server/types/node/memory/memory-parser.d.ts +15 -0
  272. package/cli/dist-server/types/node/memory/memory-prompt-builder.d.ts +38 -0
  273. package/cli/dist-server/types/node/memory/memory-protocol.d.ts +235 -0
  274. package/cli/dist-server/types/node/memory/memory-relevance-protocol.d.ts +33 -0
  275. package/cli/dist-server/types/node/memory/memory-relevance-service.d.ts +30 -0
  276. package/cli/dist-server/types/node/memory/memory-scan.d.ts +35 -0
  277. package/cli/dist-server/types/node/memory/memory-types.d.ts +49 -0
  278. package/cli/dist-server/types/node/memory/memory-validator.d.ts +6 -0
  279. package/cli/dist-server/types/node/memory/subdirectory-memory-loader.d.ts +55 -0
  280. package/cli/dist-server/types/node/model/model-protocol.d.ts +22 -0
  281. package/cli/dist-server/types/node/multitask/session-flags.d.ts +110 -0
  282. package/cli/dist-server/types/node/multitask/types.d.ts +123 -0
  283. package/cli/dist-server/types/node/navigation/index.d.ts +2 -0
  284. package/cli/dist-server/types/node/navigation/navigation-manager.d.ts +12 -0
  285. package/cli/dist-server/types/node/navigation/navigation-protocol.d.ts +23 -0
  286. package/cli/dist-server/types/node/notification/notification-protocol.d.ts +19 -0
  287. package/cli/dist-server/types/node/output-style/output-style-protocol.d.ts +60 -0
  288. package/cli/dist-server/types/node/permission/brokered-sandbox/approval-coordinator.d.ts +32 -0
  289. package/cli/dist-server/types/node/permission/brokered-sandbox/host-protocol.d.ts +103 -0
  290. package/cli/dist-server/types/node/permission/canonicalize-command.d.ts +30 -0
  291. package/cli/dist-server/types/node/permission/codebuddy-sandbox-env.d.ts +35 -0
  292. package/cli/dist-server/types/node/permission/directory-trust-service.d.ts +45 -0
  293. package/cli/dist-server/types/node/permission/file-policy-assessment.d.ts +35 -0
  294. package/cli/dist-server/types/node/permission/index.d.ts +16 -0
  295. package/cli/dist-server/types/node/permission/permission-protocol.d.ts +9 -0
  296. package/cli/dist-server/types/node/permission/sandbox-attribution-analyzer.d.ts +108 -0
  297. package/cli/dist-server/types/node/permission/sandbox-audit-service.d.ts +40 -0
  298. package/cli/dist-server/types/node/permission/sandbox-exec-policy-builtin.d.ts +30 -0
  299. package/cli/dist-server/types/node/permission/sandbox-exec-policy-protocol.d.ts +67 -0
  300. package/cli/dist-server/types/node/permission/sandbox-exec-policy.d.ts +13 -0
  301. package/cli/dist-server/types/node/permission/sandbox-orchestrator-protocol.d.ts +239 -0
  302. package/cli/dist-server/types/node/permission/sandbox-orchestrator.d.ts +308 -0
  303. package/cli/dist-server/types/node/permission/sandbox-permission-gateway.d.ts +36 -0
  304. package/cli/dist-server/types/node/permission/sandbox-telemetry-context.d.ts +27 -0
  305. package/cli/dist-server/types/node/permission/sensitive-command-detector.d.ts +71 -0
  306. package/cli/dist-server/types/node/prewarm/prewarm-protocol.d.ts +296 -0
  307. package/cli/dist-server/types/node/product/api-key-helper-product-provider.d.ts +105 -0
  308. package/cli/dist-server/types/node/product/cli-options-product-provider.d.ts +30 -0
  309. package/cli/dist-server/types/node/product/cloud-pre-product-provider.d.ts +76 -0
  310. package/cli/dist-server/types/node/product/config-watch-service.d.ts +201 -0
  311. package/cli/dist-server/types/node/product/craft-to-cli-agent-models-sync-provider.d.ts +16 -0
  312. package/cli/dist-server/types/node/product/custom-agents-product-provider.d.ts +67 -0
  313. package/cli/dist-server/types/node/product/custom-commands-product-provider.d.ts +49 -0
  314. package/cli/dist-server/types/node/product/custom-product-config-provider.d.ts +6 -0
  315. package/cli/dist-server/types/node/product/index.d.ts +21 -0
  316. package/cli/dist-server/types/node/product/internet-enviroment-product-provider.d.ts +61 -0
  317. package/cli/dist-server/types/node/product/mcp-prompt-product-provider.d.ts +17 -0
  318. package/cli/dist-server/types/node/product/mcp-watch-service.d.ts +31 -0
  319. package/cli/dist-server/types/node/product/models-product-provider.d.ts +41 -0
  320. package/cli/dist-server/types/node/product/plugin-product-provider.d.ts +13 -0
  321. package/cli/dist-server/types/node/product/product-capabilities.d.ts +55 -0
  322. package/cli/dist-server/types/node/product/product-config-controller.d.ts +27 -0
  323. package/cli/dist-server/types/node/product/product-env-service.d.ts +20 -0
  324. package/cli/dist-server/types/node/product/product-identity.d.ts +57 -0
  325. package/cli/dist-server/types/node/product/product-protocol.d.ts +7 -0
  326. package/cli/dist-server/types/node/product/sdk-initialize-product-provider.d.ts +17 -0
  327. package/cli/dist-server/types/node/product/settings-endpoint-product-provider.d.ts +20 -0
  328. package/cli/dist-server/types/node/product/skill-product-provider.d.ts +62 -0
  329. package/cli/dist-server/types/node/references/index.d.ts +2 -0
  330. package/cli/dist-server/types/node/references/reference-protocol.d.ts +20 -0
  331. package/cli/dist-server/types/node/references/reference-service.d.ts +42 -0
  332. package/cli/dist-server/types/node/remote-control/remote-control-protocol.d.ts +288 -0
  333. package/cli/dist-server/types/node/runtime/add-dir-middleware.d.ts +13 -0
  334. package/cli/dist-server/types/node/runtime/cli-capabilities.d.ts +28 -0
  335. package/cli/dist-server/types/node/runtime/external-uri-opener.d.ts +8 -0
  336. package/cli/dist-server/types/node/runtime/file-local-storage.d.ts +17 -0
  337. package/cli/dist-server/types/node/runtime/host-capability-provider.d.ts +57 -0
  338. package/cli/dist-server/types/node/runtime/host-detection.d.ts +34 -0
  339. package/cli/dist-server/types/node/runtime/index.d.ts +8 -0
  340. package/cli/dist-server/types/node/runtime/workspace-folder-manager.d.ts +45 -0
  341. package/cli/dist-server/types/node/runtime/workspace.d.ts +5 -0
  342. package/cli/dist-server/types/node/sandbox-cli/sandbox-backend-support.d.ts +7 -0
  343. package/cli/dist-server/types/node/sandbox-cli/sandbox-cli-lifecycle-protocol.d.ts +109 -0
  344. package/cli/dist-server/types/node/sandbox-cli/sandbox-cli-protocol.d.ts +376 -0
  345. package/cli/dist-server/types/node/sandbox-cli/sandbox-rule-sync-service.d.ts +310 -0
  346. package/cli/dist-server/types/node/sandbox-cli/sandbox-session-preparation.d.ts +49 -0
  347. package/cli/dist-server/types/node/sandbox-cli/sandbox-turn-config.d.ts +32 -0
  348. package/cli/dist-server/types/node/sandbox-cli/threat-domain-checker.d.ts +137 -0
  349. package/cli/dist-server/types/node/security-review/gate.d.ts +13 -0
  350. package/cli/dist-server/types/node/security-review/index.d.ts +2 -0
  351. package/cli/dist-server/types/node/security-review/protocol.d.ts +14 -0
  352. package/cli/dist-server/types/node/sensitive-content/index.d.ts +15 -0
  353. package/cli/dist-server/types/node/sensitive-content/managed-cipher-stream-restorer.d.ts +22 -0
  354. package/cli/dist-server/types/node/sensitive-content/sandbox-center-ipc-client-protocol.d.ts +3 -0
  355. package/cli/dist-server/types/node/sensitive-content/sandbox-center-ipc-client.d.ts +7 -0
  356. package/cli/dist-server/types/node/sensitive-content/sandbox-center-port.d.ts +17 -0
  357. package/cli/dist-server/types/node/sensitive-content/sensitive-approval-port.d.ts +22 -0
  358. package/cli/dist-server/types/node/sensitive-content/sensitive-content-mediation.d.ts +6 -0
  359. package/cli/dist-server/types/node/sensitive-content/sensitive-decision-mediation.d.ts +69 -0
  360. package/cli/dist-server/types/node/sensitive-content/sensitive-history-admission.d.ts +42 -0
  361. package/cli/dist-server/types/node/sensitive-content/sensitive-history-replay.d.ts +6 -0
  362. package/cli/dist-server/types/node/sensitive-content/sensitive-local-sideband.d.ts +21 -0
  363. package/cli/dist-server/types/node/sensitive-content/sensitive-model-boundary.d.ts +22 -0
  364. package/cli/dist-server/types/node/sensitive-content/sensitive-protection-metadata.d.ts +7 -0
  365. package/cli/dist-server/types/node/sensitive-content/sensitive-session-grants.d.ts +41 -0
  366. package/cli/dist-server/types/node/sensitive-content/sensitive-tool-egress-guard.d.ts +7 -0
  367. package/cli/dist-server/types/node/sensitive-content/sensitive-user-input-review.d.ts +7 -0
  368. package/cli/dist-server/types/node/sensitive-content/settings-sensitive-protection-policy.d.ts +14 -0
  369. package/cli/dist-server/types/node/server/types.d.ts +3 -1
  370. package/cli/dist-server/types/node/session/index.d.ts +15 -0
  371. package/cli/dist-server/types/node/session/input-history-service.d.ts +47 -0
  372. package/cli/dist-server/types/node/session/input-item-processors.d.ts +70 -0
  373. package/cli/dist-server/types/node/session/session-abort-middleware.d.ts +22 -0
  374. package/cli/dist-server/types/node/session/session-controller.d.ts +126 -0
  375. package/cli/dist-server/types/node/session/session-history-clean-flag.d.ts +2 -0
  376. package/cli/dist-server/types/node/session/session-history-clean-service.d.ts +49 -0
  377. package/cli/dist-server/types/node/session/session-hook-host-adapter.d.ts +21 -0
  378. package/cli/dist-server/types/node/session/session-host-adapter.d.ts +34 -0
  379. package/cli/dist-server/types/node/session/session-http-protocol.d.ts +1 -0
  380. package/cli/dist-server/types/node/session/session-interruption-host-adapter.d.ts +115 -0
  381. package/cli/dist-server/types/node/session/session-manager-host-adapter.d.ts +100 -0
  382. package/cli/dist-server/types/node/session/session-middleware.d.ts +68 -0
  383. package/cli/dist-server/types/node/session/session-response-host-adapter.d.ts +9 -0
  384. package/cli/dist-server/types/node/session/session-store-host-adapter.d.ts +23 -0
  385. package/cli/dist-server/types/node/session/tasks-controller.d.ts +80 -0
  386. package/cli/dist-server/types/node/settings/current-session-model-transition-protocol.d.ts +23 -0
  387. package/cli/dist-server/types/node/settings/current-session-model-transition.d.ts +15 -0
  388. package/cli/dist-server/types/node/settings/index.d.ts +8 -0
  389. package/cli/dist-server/types/node/settings/settings-controller.d.ts +23 -0
  390. package/cli/dist-server/types/node/settings/settings-manager.d.ts +1 -0
  391. package/cli/dist-server/types/node/settings/settings-protocol.d.ts +4 -0
  392. package/cli/dist-server/types/node/settings/settings-validate-middleware.d.ts +9 -0
  393. package/cli/dist-server/types/node/shell/delegating-shell-service.d.ts +44 -0
  394. package/cli/dist-server/types/node/shell/driver-shell-service.d.ts +8 -0
  395. package/cli/dist-server/types/node/shell/index.d.ts +10 -0
  396. package/cli/dist-server/types/node/shell/language-shim-env.d.ts +11 -0
  397. package/cli/dist-server/types/node/shell/output-spiller.d.ts +39 -0
  398. package/cli/dist-server/types/node/shell/powershell-safe-delete.d.ts +16 -0
  399. package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/contract.d.ts +61 -0
  400. package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/index.d.ts +3 -0
  401. package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/marker.d.ts +5 -0
  402. package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/service.d.ts +12 -0
  403. package/cli/dist-server/types/node/shell/safe-delete/index.d.ts +17 -0
  404. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-attribution.d.ts +16 -0
  405. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-bootstrap.d.ts +1 -0
  406. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-env.d.ts +42 -0
  407. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-report.d.ts +18 -0
  408. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-sandbox-helpers.d.ts +39 -0
  409. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-settings.d.ts +42 -0
  410. package/cli/dist-server/types/node/shell/safe-delete/safe-delete-trash-service.d.ts +12 -0
  411. package/cli/dist-server/types/node/shell/shell-protocol.d.ts +287 -0
  412. package/cli/dist-server/types/node/shell/shell-runtime-paths.d.ts +23 -0
  413. package/cli/dist-server/types/node/shell/shell-service.d.ts +257 -0
  414. package/cli/dist-server/types/node/shell/shell-snapshot-protocol.d.ts +75 -0
  415. package/cli/dist-server/types/node/shell/shell-snapshot-service.d.ts +86 -0
  416. package/cli/dist-server/types/node/shell/terminal-serializer.d.ts +26 -0
  417. package/cli/dist-server/types/node/shell/truncate-buffer.d.ts +24 -0
  418. package/cli/dist-server/types/node/shell/windows-process-utils.d.ts +42 -0
  419. package/cli/dist-server/types/node/shortcut/shortcut-protocol.d.ts +41 -0
  420. package/cli/dist-server/types/node/skills/skill-approval.d.ts +31 -0
  421. package/cli/dist-server/types/node/stats/index.d.ts +5 -0
  422. package/cli/dist-server/types/node/stats/insights-protocol.d.ts +59 -0
  423. package/cli/dist-server/types/node/stats/insights-report-service.d.ts +17 -0
  424. package/cli/dist-server/types/node/stats/session-facet-service.d.ts +46 -0
  425. package/cli/dist-server/types/node/stats/stats-protocol.d.ts +145 -0
  426. package/cli/dist-server/types/node/stats/stats-service.d.ts +48 -0
  427. package/cli/dist-server/types/node/telemetry/cost-protocol.d.ts +67 -0
  428. package/cli/dist-server/types/node/telemetry/cost-service.d.ts +21 -0
  429. package/cli/dist-server/types/node/telemetry/extension-info-processor.d.ts +13 -0
  430. package/cli/dist-server/types/node/telemetry/friction-analysis.d.ts +54 -0
  431. package/cli/dist-server/types/node/telemetry/friction-recall-client.d.ts +15 -0
  432. package/cli/dist-server/types/node/telemetry/host-ide-info-processor.d.ts +11 -0
  433. package/cli/dist-server/types/node/telemetry/index.d.ts +21 -0
  434. package/cli/dist-server/types/node/telemetry/logger/index.d.ts +1 -0
  435. package/cli/dist-server/types/node/telemetry/logger/storage-path-provider.d.ts +4 -0
  436. package/cli/dist-server/types/node/telemetry/plugin-telemetry-protocol.d.ts +68 -0
  437. package/cli/dist-server/types/node/telemetry/plugin-telemetry-service.d.ts +31 -0
  438. package/cli/dist-server/types/node/telemetry/qimei-env-detector.d.ts +16 -0
  439. package/cli/dist-server/types/node/telemetry/sandbox-telemetry-protocol.d.ts +164 -0
  440. package/cli/dist-server/types/node/telemetry/sandbox-telemetry-service.d.ts +181 -0
  441. package/cli/dist-server/types/node/telemetry/startup-profiler.d.ts +32 -0
  442. package/cli/dist-server/types/node/telemetry/status-reporter.d.ts +39 -0
  443. package/cli/dist-server/types/node/telemetry/telemetry-client-carrier.d.ts +14 -0
  444. package/cli/dist-server/types/node/telemetry/telemetry-client-info-event-processor.d.ts +8 -0
  445. package/cli/dist-server/types/node/telemetry/telemetry-protocol.d.ts +137 -0
  446. package/cli/dist-server/types/node/telemetry/telemetry-service.d.ts +115 -0
  447. package/cli/dist-server/types/node/telemetry/turn-baggage-processor.d.ts +23 -0
  448. package/cli/dist-server/types/node/telemetry/vcs-event-processor.d.ts +19 -0
  449. package/cli/dist-server/types/node/tips/builtin-tips.d.ts +2 -0
  450. package/cli/dist-server/types/node/tips/index.d.ts +4 -0
  451. package/cli/dist-server/types/node/tips/tips-manager.d.ts +14 -0
  452. package/cli/dist-server/types/node/tips/tips-protocol.d.ts +42 -0
  453. package/cli/dist-server/types/node/tips/user-state-manager.d.ts +25 -0
  454. package/cli/dist-server/types/node/tool-control/index.d.ts +1 -0
  455. package/cli/dist-server/types/node/tool-control/tool-control-policy.d.ts +34 -0
  456. package/cli/dist-server/types/node/tools/a2a-cancel-task-tool.d.ts +55 -0
  457. package/cli/dist-server/types/node/tools/a2a-get-agent-card-tool.d.ts +59 -0
  458. package/cli/dist-server/types/node/tools/a2a-get-task-tool.d.ts +334 -0
  459. package/cli/dist-server/types/node/tools/a2a-send-message-tool.d.ts +168 -0
  460. package/cli/dist-server/types/node/tools/a2a-tool-guards.d.ts +48 -0
  461. package/cli/dist-server/types/node/tools/agent-tool.d.ts +202 -0
  462. package/cli/dist-server/types/node/tools/artifact-control-tool.d.ts +103 -0
  463. package/cli/dist-server/types/node/tools/artifact-tool.d.ts +96 -0
  464. package/cli/dist-server/types/node/tools/ask-user-for-structured-input-tool.d.ts +127 -0
  465. package/cli/dist-server/types/node/tools/ask-user-question-tool.d.ts +237 -0
  466. package/cli/dist-server/types/node/tools/audio-transcribe-service.d.ts +61 -0
  467. package/cli/dist-server/types/node/tools/audio-transcribe-tool.d.ts +66 -0
  468. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-allow-filter.d.ts +33 -0
  469. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-classifier-client.d.ts +230 -0
  470. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-critique-client.d.ts +51 -0
  471. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-defaults.d.ts +16 -0
  472. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-denial-tracker.d.ts +114 -0
  473. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-permission-service.d.ts +51 -0
  474. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-project-instructions.d.ts +26 -0
  475. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-protocol.d.ts +140 -0
  476. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-settings.d.ts +36 -0
  477. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-strategy.d.ts +21 -0
  478. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-system-prompt-builder.d.ts +28 -0
  479. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-timeout.d.ts +16 -0
  480. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-transcript-limit.d.ts +29 -0
  481. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-transcript.d.ts +50 -0
  482. package/cli/dist-server/types/node/tools/auto-mode/index.d.ts +15 -0
  483. package/cli/dist-server/types/node/tools/auto-mode/permission-mode-policy.d.ts +63 -0
  484. package/cli/dist-server/types/node/tools/bash-output-tool.d.ts +34 -0
  485. package/cli/dist-server/types/node/tools/bash-sandbox-approval-requester.d.ts +55 -0
  486. package/cli/dist-server/types/node/tools/bash-tool.d.ts +211 -0
  487. package/cli/dist-server/types/node/tools/brief-mode-service.d.ts +26 -0
  488. package/cli/dist-server/types/node/tools/channel-tasks-tool.d.ts +174 -0
  489. package/cli/dist-server/types/node/tools/computer-use-tool.d.ts +86 -0
  490. package/cli/dist-server/types/node/tools/create-channel-tool.d.ts +82 -0
  491. package/cli/dist-server/types/node/tools/create-colleague-tool.d.ts +64 -0
  492. package/cli/dist-server/types/node/tools/cron-create-tool.d.ts +46 -0
  493. package/cli/dist-server/types/node/tools/cron-delete-tool.d.ts +28 -0
  494. package/cli/dist-server/types/node/tools/cron-list-tool.d.ts +27 -0
  495. package/cli/dist-server/types/node/tools/defer-execute-tool.d.ts +265 -0
  496. package/cli/dist-server/types/node/tools/defer-tool-config-protocol.d.ts +88 -0
  497. package/cli/dist-server/types/node/tools/defer-tool-config-service.d.ts +23 -0
  498. package/cli/dist-server/types/node/tools/deferred-tool-bridge.d.ts +50 -0
  499. package/cli/dist-server/types/node/tools/delegate-tool.d.ts +71 -0
  500. package/cli/dist-server/types/node/tools/edit-tool.d.ts +83 -0
  501. package/cli/dist-server/types/node/tools/enter-planmode-tool.d.ts +29 -0
  502. package/cli/dist-server/types/node/tools/enter-worktree-tool.d.ts +59 -0
  503. package/cli/dist-server/types/node/tools/exit-planmode-tool.d.ts +86 -0
  504. package/cli/dist-server/types/node/tools/file-change-artifact-publisher.d.ts +82 -0
  505. package/cli/dist-server/types/node/tools/glob-tool.d.ts +102 -0
  506. package/cli/dist-server/types/node/tools/grep-tool.d.ts +141 -0
  507. package/cli/dist-server/types/node/tools/image-edit-tool.d.ts +94 -0
  508. package/cli/dist-server/types/node/tools/image-gen-tool.d.ts +107 -0
  509. package/cli/dist-server/types/node/tools/image-service.d.ts +113 -0
  510. package/cli/dist-server/types/node/tools/index.d.ts +109 -0
  511. package/cli/dist-server/types/node/tools/kill-shell-tool.d.ts +27 -0
  512. package/cli/dist-server/types/node/tools/leave-worktree-tool.d.ts +54 -0
  513. package/cli/dist-server/types/node/tools/library-upload-tool.d.ts +70 -0
  514. package/cli/dist-server/types/node/tools/list-colleagues-tool.d.ts +35 -0
  515. package/cli/dist-server/types/node/tools/list-mcp-resources-tool.d.ts +58 -0
  516. package/cli/dist-server/types/node/tools/lsp-tool.d.ts +68 -0
  517. package/cli/dist-server/types/node/tools/main-agent-meta-tools.d.ts +107 -0
  518. package/cli/dist-server/types/node/tools/memory-tool.d.ts +33 -0
  519. package/cli/dist-server/types/node/tools/message-colleague-tool.d.ts +83 -0
  520. package/cli/dist-server/types/node/tools/monitor-tool.d.ts +216 -0
  521. package/cli/dist-server/types/node/tools/multi-edit-tool.d.ts +109 -0
  522. package/cli/dist-server/types/node/tools/notebook-edit-tool.d.ts +75 -0
  523. package/cli/dist-server/types/node/tools/notebook-read-tool.d.ts +55 -0
  524. package/cli/dist-server/types/node/tools/notebook-write-tool.d.ts +7 -0
  525. package/cli/dist-server/types/node/tools/plan-storage-service.d.ts +68 -0
  526. package/cli/dist-server/types/node/tools/powershell-clm-types.d.ts +30 -0
  527. package/cli/dist-server/types/node/tools/powershell-command-semantics.d.ts +23 -0
  528. package/cli/dist-server/types/node/tools/powershell-dangerous-cmdlets.d.ts +72 -0
  529. package/cli/dist-server/types/node/tools/powershell-destructive-warning.d.ts +12 -0
  530. package/cli/dist-server/types/node/tools/powershell-detection.d.ts +51 -0
  531. package/cli/dist-server/types/node/tools/powershell-git-safety.d.ts +60 -0
  532. package/cli/dist-server/types/node/tools/powershell-security.d.ts +93 -0
  533. package/cli/dist-server/types/node/tools/powershell-tool.d.ts +174 -0
  534. package/cli/dist-server/types/node/tools/produced-artifact-report.d.ts +35 -0
  535. package/cli/dist-server/types/node/tools/push-notification-tool.d.ts +55 -0
  536. package/cli/dist-server/types/node/tools/read-file-state-service.d.ts +27 -0
  537. package/cli/dist-server/types/node/tools/read-mcp-resource-tool.d.ts +71 -0
  538. package/cli/dist-server/types/node/tools/read-tool.d.ts +71 -0
  539. package/cli/dist-server/types/node/tools/repl/index.d.ts +10 -0
  540. package/cli/dist-server/types/node/tools/repl/repl-bridge-broker.d.ts +150 -0
  541. package/cli/dist-server/types/node/tools/repl/repl-bridge-host.d.ts +29 -0
  542. package/cli/dist-server/types/node/tools/repl/repl-catalog-protocol.d.ts +149 -0
  543. package/cli/dist-server/types/node/tools/repl/repl-catalog-render.d.ts +56 -0
  544. package/cli/dist-server/types/node/tools/repl/repl-catalog-source.d.ts +108 -0
  545. package/cli/dist-server/types/node/tools/repl/repl-import-rewrite.d.ts +17 -0
  546. package/cli/dist-server/types/node/tools/repl/repl-protocol.d.ts +210 -0
  547. package/cli/dist-server/types/node/tools/repl/repl-tool.d.ts +142 -0
  548. package/cli/dist-server/types/node/tools/repl/repl-worker-manager.d.ts +103 -0
  549. package/cli/dist-server/types/node/tools/repl/repl-worker-source.d.ts +16 -0
  550. package/cli/dist-server/types/node/tools/repl/repl-worker-source.generated.d.ts +2 -0
  551. package/cli/dist-server/types/node/tools/report-findings-tool.d.ts +97 -0
  552. package/cli/dist-server/types/node/tools/sandbox-approval-review.d.ts +40 -0
  553. package/cli/dist-server/types/node/tools/sandbox-permission-file-tool.d.ts +14 -0
  554. package/cli/dist-server/types/node/tools/sandbox-write-rule-guard.d.ts +126 -0
  555. package/cli/dist-server/types/node/tools/send-message-tool.d.ts +116 -0
  556. package/cli/dist-server/types/node/tools/send-user-message-attachments.d.ts +22 -0
  557. package/cli/dist-server/types/node/tools/send-user-message-tool.d.ts +60 -0
  558. package/cli/dist-server/types/node/tools/shell-stream-pusher.d.ts +25 -0
  559. package/cli/dist-server/types/node/tools/skill-manage-tool.d.ts +77 -0
  560. package/cli/dist-server/types/node/tools/skill-tool.d.ts +129 -0
  561. package/cli/dist-server/types/node/tools/slash-command-tool.d.ts +51 -0
  562. package/cli/dist-server/types/node/tools/space-upload/errors.d.ts +14 -0
  563. package/cli/dist-server/types/node/tools/space-upload/index.d.ts +4 -0
  564. package/cli/dist-server/types/node/tools/space-upload/local-file-source.d.ts +33 -0
  565. package/cli/dist-server/types/node/tools/space-upload/types.d.ts +65 -0
  566. package/cli/dist-server/types/node/tools/space-upload/upload-file.d.ts +27 -0
  567. package/cli/dist-server/types/node/tools/speak-in-channel-tool.d.ts +182 -0
  568. package/cli/dist-server/types/node/tools/structured-output-tool.d.ts +43 -0
  569. package/cli/dist-server/types/node/tools/task-create-tool.d.ts +71 -0
  570. package/cli/dist-server/types/node/tools/task-get-tool.d.ts +31 -0
  571. package/cli/dist-server/types/node/tools/task-list-tool.d.ts +20 -0
  572. package/cli/dist-server/types/node/tools/task-output-tool.d.ts +142 -0
  573. package/cli/dist-server/types/node/tools/task-stop-tool.d.ts +61 -0
  574. package/cli/dist-server/types/node/tools/task-storage-service.d.ts +161 -0
  575. package/cli/dist-server/types/node/tools/task-update-tool.d.ts +79 -0
  576. package/cli/dist-server/types/node/tools/team-create-tool.d.ts +84 -0
  577. package/cli/dist-server/types/node/tools/team-delete-tool.d.ts +38 -0
  578. package/cli/dist-server/types/node/tools/todo-storage-service.d.ts +48 -0
  579. package/cli/dist-server/types/node/tools/todo-write-tool.d.ts +117 -0
  580. package/cli/dist-server/types/node/tools/tool-always-approval-service.d.ts +73 -0
  581. package/cli/dist-server/types/node/tools/tool-argument-rewrite-service.d.ts +4 -0
  582. package/cli/dist-server/types/node/tools/tool-error-codes.d.ts +140 -0
  583. package/cli/dist-server/types/node/tools/tool-hook-manager.d.ts +61 -0
  584. package/cli/dist-server/types/node/tools/tool-manager.d.ts +585 -0
  585. package/cli/dist-server/types/node/tools/tool-permission-service.d.ts +145 -0
  586. package/cli/dist-server/types/node/tools/tool-permission-strategy.d.ts +83 -0
  587. package/cli/dist-server/types/node/tools/tool-protocol.d.ts +2 -0
  588. package/cli/dist-server/types/node/tools/tool-risk-review/content-history-admission.d.ts +10 -0
  589. package/cli/dist-server/types/node/tools/tool-risk-review/content-review.d.ts +56 -0
  590. package/cli/dist-server/types/node/tools/tool-risk-review/execution-approval-adapter.d.ts +11 -0
  591. package/cli/dist-server/types/node/tools/tool-risk-review/index.d.ts +7 -0
  592. package/cli/dist-server/types/node/tools/tool-risk-review/mcp-permission-review.d.ts +15 -0
  593. package/cli/dist-server/types/node/tools/tool-risk-review/mcp-projector.d.ts +5 -0
  594. package/cli/dist-server/types/node/tools/tool-risk-review/permission-metadata.d.ts +8 -0
  595. package/cli/dist-server/types/node/tools/tool-risk-review/projector-registry.d.ts +22 -0
  596. package/cli/dist-server/types/node/tools/tool-risk-review/projectors/index.d.ts +5 -0
  597. package/cli/dist-server/types/node/tools/tool-risk-review/prompt.d.ts +6 -0
  598. package/cli/dist-server/types/node/tools/tool-risk-review/protocol.d.ts +231 -0
  599. package/cli/dist-server/types/node/tools/tool-risk-review/review-context-build.d.ts +2 -0
  600. package/cli/dist-server/types/node/tools/tool-risk-review/review-context.d.ts +42 -0
  601. package/cli/dist-server/types/node/tools/tool-risk-review/review-runtime.d.ts +6 -0
  602. package/cli/dist-server/types/node/tools/tool-risk-review/reviewer-client-impl.d.ts +3 -0
  603. package/cli/dist-server/types/node/tools/tool-risk-review/reviewer-client.d.ts +37 -0
  604. package/cli/dist-server/types/node/tools/tool-risk-review/scope.d.ts +6 -0
  605. package/cli/dist-server/types/node/tools/tool-risk-review/service.d.ts +75 -0
  606. package/cli/dist-server/types/node/tools/tool-risk-review/session-state.d.ts +49 -0
  607. package/cli/dist-server/types/node/tools/tool-risk-review/trusted-builtin-code.d.ts +25 -0
  608. package/cli/dist-server/types/node/tools/tool-search-protocol.d.ts +286 -0
  609. package/cli/dist-server/types/node/tools/tool-search-service.d.ts +137 -0
  610. package/cli/dist-server/types/node/tools/tool-search-tool.d.ts +103 -0
  611. package/cli/dist-server/types/node/tools/tool-spec/agent-tool-defer-overlay-cache.d.ts +45 -0
  612. package/cli/dist-server/types/node/tools/tool-spec/index.d.ts +6 -0
  613. package/cli/dist-server/types/node/tools/tool-spec/legacy-ide-tool-names.d.ts +2 -0
  614. package/cli/dist-server/types/node/tools/tool-spec/tool-defer-overlay.d.ts +70 -0
  615. package/cli/dist-server/types/node/tools/tool-spec/tool-spec-augment.d.ts +17 -0
  616. package/cli/dist-server/types/node/tools/tool-spec/tool-spec-parser.d.ts +38 -0
  617. package/cli/dist-server/types/node/tools/tool-spec/tool-spec-protocol.d.ts +83 -0
  618. package/cli/dist-server/types/node/tools/video-gen-tool.d.ts +88 -0
  619. package/cli/dist-server/types/node/tools/video-service.d.ts +57 -0
  620. package/cli/dist-server/types/node/tools/wait-for-mcp-servers-tool.d.ts +79 -0
  621. package/cli/dist-server/types/node/tools/web-fetch-tool.d.ts +164 -0
  622. package/cli/dist-server/types/node/tools/web-search-tool.d.ts +79 -0
  623. package/cli/dist-server/types/node/tools/wechat-reply-tool.d.ts +43 -0
  624. package/cli/dist-server/types/node/tools/wecom-reply-tool.d.ts +65 -0
  625. package/cli/dist-server/types/node/tools/workflow-background-task.d.ts +54 -0
  626. package/cli/dist-server/types/node/tools/workflow-tool.d.ts +83 -0
  627. package/cli/dist-server/types/node/tools/write-tool.d.ts +80 -0
  628. package/cli/dist-server/types/node/trace/trace-collector-protocol.d.ts +203 -0
  629. package/cli/dist-server/types/node/utils/installation-utils.d.ts +35 -0
  630. package/cli/dist-server/types/node/utils/osc-protocol-utils.d.ts +209 -0
  631. package/cli/dist-server/types/node/utils/process-identity.d.ts +40 -0
  632. package/cli/dist-server/types/node/utils/security-audit-log.d.ts +134 -0
  633. package/cli/dist-server/types/node/utils/terminal-detector-utils.d.ts +78 -0
  634. package/cli/dist-server/types/node/vim/index.d.ts +2 -0
  635. package/cli/dist-server/types/node/vim/vim-manager.d.ts +12 -0
  636. package/cli/dist-server/types/node/vim/vim-protocol.d.ts +24 -0
  637. package/cli/dist-server/types/vendor/cbc-core/node/agent/agent-protocol.d.ts +7 -2
  638. package/cli/dist-server/types/vendor/cbc-core/node/agent/reviewer-recovery.d.ts +7 -0
  639. package/cli/dist-server/types/vendor/cbc-core/node/context/mods-bridge.d.ts +38 -2
  640. package/cli/dist-server/types/vendor/cbc-core/node/session/interruption-service.d.ts +4 -0
  641. package/cli/dist-server/types/vendor/cbc-core/node/session/session-hook-host-protocol.d.ts +2 -1
  642. package/cli/dist-server/types/vendor/cbc-core/node/session/session-interruption-host-protocol.d.ts +3 -0
  643. package/cli/dist-server/types/vendor/cbc-core/node/session/session-protocol.d.ts +6 -0
  644. package/cli/dist-server/types/vendor/cbc-core/node/session/session-store.d.ts +46 -7
  645. package/cli/dist-server/types/vendor/cbc-core/node/session-title/session-title-utils.d.ts +36 -0
  646. package/cli/dist-server/types/vendor/cbc-core/node/utils/history-utils.d.ts +37 -9
  647. package/cli/dist-server/types/vendor/cbc-core/node/utils/input-item-utils.d.ts +27 -0
  648. package/cli/dist-server/types/vendor/cbc-core/node/utils/model-utils.d.ts +9 -5
  649. package/cli/dist-server/types/vendor/cbc-shared/node/agent/custom-input-item-types.d.ts +20 -0
  650. package/cli/dist-server/types/vendor/cbc-shared/node/agent/openai-agents-types.d.ts +2 -2
  651. package/cli/dist-server/types/vendor/cbc-shared/node/model/model-errors.d.ts +23 -6
  652. package/cli/dist-server/types/workspace/agent-client-protocol/lib/common/prompt-codec.d.ts +2 -0
  653. package/cli/dist-server/types/workspace/agent-client-protocol/lib/common/security-review-reason-code.d.ts +0 -10
  654. package/cli/dist-server/types/workspace/cbc-checkpoint/lib/node/checkpoint/checkpoint-path-utils.d.ts +10 -0
  655. package/cli/dist-server/types/workspace/cbc-checkpoint/lib/node/checkpoint/checkpoint-service.d.ts +2 -0
  656. package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/agent-protocol.d.ts +7 -2
  657. package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/reviewer-recovery.d.ts +7 -0
  658. package/cli/dist-server/types/workspace/cbc-core/lib/node/context/mods-bridge.d.ts +38 -2
  659. package/cli/dist-server/types/workspace/cbc-core/lib/node/session/interruption-service.d.ts +4 -0
  660. package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-hook-host-protocol.d.ts +2 -1
  661. package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-interruption-host-protocol.d.ts +3 -0
  662. package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-protocol.d.ts +6 -0
  663. package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-store.d.ts +46 -7
  664. package/cli/dist-server/types/workspace/cbc-core/lib/node/session-title/session-title-utils.d.ts +36 -0
  665. package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/history-utils.d.ts +37 -9
  666. package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/input-item-utils.d.ts +27 -0
  667. package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/model-utils.d.ts +9 -5
  668. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-parser.d.ts +34 -0
  669. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-protocol.d.ts +191 -0
  670. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-scheduler-service.d.ts +131 -0
  671. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-scheduler.d.ts +20 -0
  672. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-state-manager.d.ts +50 -0
  673. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-storage.d.ts +61 -0
  674. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-task-session.d.ts +1 -0
  675. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/index.d.ts +8 -0
  676. package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/loop-skill-provider.d.ts +36 -0
  677. package/cli/dist-server/types/workspace/cbc-cron/lib/node/index.d.ts +10 -0
  678. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/bg-session-handler.d.ts +88 -0
  679. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-auto-restart.d.ts +61 -0
  680. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-channel-autoconnect.d.ts +28 -0
  681. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-enhancements-lifecycle.d.ts +45 -0
  682. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-process.d.ts +77 -0
  683. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-protocol.d.ts +324 -0
  684. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-service.d.ts +45 -0
  685. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/index.d.ts +10 -0
  686. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/session-registry.d.ts +39 -0
  687. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/system-service.d.ts +60 -0
  688. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/wake-detector.d.ts +47 -0
  689. package/cli/dist-server/types/workspace/cbc-daemon/lib/node/index.d.ts +11 -0
  690. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-format.d.ts +25 -0
  691. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-policy.d.ts +55 -0
  692. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-protocol.d.ts +204 -0
  693. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-service.d.ts +353 -0
  694. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-session-start-hook.d.ts +25 -0
  695. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-utils.d.ts +23 -0
  696. package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/index.d.ts +6 -0
  697. package/cli/dist-server/types/workspace/cbc-goal/lib/node/index.d.ts +12 -0
  698. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/index.d.ts +35 -0
  699. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/builtin/index.d.ts +14 -0
  700. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/builtin/sec-default.d.ts +32 -0
  701. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/builtin/telemetry.d.ts +43 -0
  702. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/enable-flag.d.ts +41 -0
  703. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/engine-builder.d.ts +61 -0
  704. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/hooks-registry.d.ts +188 -0
  705. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/index.d.ts +6 -0
  706. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/mods-runtime.d.ts +101 -0
  707. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/op-table.d.ts +37 -0
  708. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/pattern.d.ts +20 -0
  709. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/core-handler.d.ts +78 -0
  710. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/host-bindings.d.ts +215 -0
  711. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/index.d.ts +6 -0
  712. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/plugin-store.d.ts +22 -0
  713. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/render-component.d.ts +115 -0
  714. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/render-registry.d.ts +99 -0
  715. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/terminal-play.d.ts +56 -0
  716. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/index.d.ts +9 -0
  717. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/legacy-adapter/fan-out.d.ts +23 -0
  718. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/legacy-adapter/hook-result-mapper.d.ts +27 -0
  719. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/legacy-adapter/index.d.ts +2 -0
  720. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/bootstrap.d.ts +104 -0
  721. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/bundle-cache.d.ts +59 -0
  722. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/index.d.ts +8 -0
  723. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/isolated-import.d.ts +20 -0
  724. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/load-mod.d.ts +151 -0
  725. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/manifest-dir.d.ts +33 -0
  726. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/mounted-import.d.ts +12 -0
  727. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/ts-runtime.d.ts +64 -0
  728. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/types-emitter.d.ts +105 -0
  729. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/testing/harness.d.ts +84 -0
  730. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/testing/index.d.ts +1 -0
  731. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/agent.d.ts +188 -0
  732. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/command.d.ts +114 -0
  733. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/prompt.d.ts +310 -0
  734. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/tool.d.ts +308 -0
  735. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/upstream.d.ts +8777 -0
  736. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events.d.ts +651 -0
  737. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/index.d.ts +1 -0
  738. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/concurrency.d.ts +1 -0
  739. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/dependency-resolver.d.ts +43 -0
  740. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/directory-plugin-cache-projection.d.ts +2 -0
  741. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/guards/index.d.ts +2 -0
  742. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/guards/weixinpay-integrity-guard.d.ts +48 -0
  743. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/index.d.ts +42 -0
  744. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/git-plugin-installer.d.ts +42 -0
  745. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/git-subdir-plugin-installer.d.ts +19 -0
  746. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/index.d.ts +4 -0
  747. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/local-plugin-installer.d.ts +40 -0
  748. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/npm-plugin-installer.d.ts +23 -0
  749. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/agent-loader.d.ts +43 -0
  750. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/command-loader.d.ts +39 -0
  751. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/hook-loader.d.ts +55 -0
  752. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/index.d.ts +8 -0
  753. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/lsp-loader.d.ts +47 -0
  754. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/mcp-loader.d.ts +75 -0
  755. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/output-style-loader.d.ts +49 -0
  756. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/plugin-loader-manager.d.ts +73 -0
  757. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/skill-loader.d.ts +45 -0
  758. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplace-name-validator.d.ts +50 -0
  759. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplace-path-safety.d.ts +86 -0
  760. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/base-marketplace.d.ts +48 -0
  761. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/builtin-marketplace-provider.d.ts +47 -0
  762. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/directory-marketplace.d.ts +19 -0
  763. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/git-availability-detector.d.ts +62 -0
  764. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/git-fallback-coordinator.d.ts +42 -0
  765. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/git-to-zip-url-converter.d.ts +50 -0
  766. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/github-marketplace.d.ts +41 -0
  767. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/http-marketplace.d.ts +47 -0
  768. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/index.d.ts +13 -0
  769. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-config-manager.d.ts +43 -0
  770. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-factory.d.ts +12 -0
  771. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-storage.d.ts +142 -0
  772. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-update-checker.d.ts +41 -0
  773. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/zip-marketplace.d.ts +150 -0
  774. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/mcpb-handler.d.ts +29 -0
  775. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-controller.d.ts +77 -0
  776. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-environment.d.ts +36 -0
  777. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-error-collector.d.ts +17 -0
  778. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-install-stats-service.d.ts +20 -0
  779. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-manager.d.ts +765 -0
  780. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-mcp-snapshot.d.ts +63 -0
  781. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-options-storage.d.ts +87 -0
  782. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-policy-service.d.ts +55 -0
  783. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-protocol.d.ts +1567 -0
  784. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-read-summary.d.ts +61 -0
  785. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-runtime-refresh-service.d.ts +262 -0
  786. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-validator.d.ts +48 -0
  787. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/session-plugin-snapshot.d.ts +5 -0
  788. package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/zip-utils.d.ts +94 -0
  789. package/cli/dist-server/types/workspace/cbc-shared/lib/node/agent/custom-input-item-types.d.ts +20 -0
  790. package/cli/dist-server/types/workspace/cbc-shared/lib/node/agent/openai-agents-types.d.ts +2 -2
  791. package/cli/dist-server/types/workspace/cbc-shared/lib/node/model/model-errors.d.ts +23 -6
  792. package/cli/dist-server/types/workspace/code-ratio/lib/common/code-ratio-protocol.d.ts +124 -0
  793. package/cli/dist-server/types/workspace/code-ratio/lib/common/code-ratio-reporter.d.ts +57 -0
  794. package/cli/dist-server/types/workspace/code-ratio/lib/common/diff/unified-diff.d.ts +37 -0
  795. package/cli/dist-server/types/workspace/code-ratio/lib/common/feature-gate.d.ts +59 -0
  796. package/cli/dist-server/types/workspace/code-ratio/lib/common/filters/file-filter.d.ts +41 -0
  797. package/cli/dist-server/types/workspace/code-ratio/lib/common/index.d.ts +6 -0
  798. package/cli/dist-server/types/workspace/code-ratio/lib/common/vcs-repo-resolver-protocol.d.ts +50 -0
  799. package/cli/dist-server/types/workspace/product/lib/common/index.d.ts +1 -0
  800. package/cli/dist-server/types/workspace/product/lib/common/repo-params.d.ts +14 -0
  801. package/cli/dist-server/types/workspace/product/lib/common/types/features.d.ts +35 -22
  802. package/cli/dist-server/types/workspace/product/lib/common/types/index.d.ts +0 -1
  803. package/cli/dist-server/types/workspace/product/lib/common/types/language-model.d.ts +1 -0
  804. package/cli/dist-server/types/workspace/product/lib/common/types/product.d.ts +0 -7
  805. package/cli/dist-server/types/workspace/sandbox-cli/lib/common/protocol.generated.d.ts +392 -0
  806. package/cli/dist-server/types/workspace/sandbox-cli/lib/node/file-policy.d.ts +48 -0
  807. package/cli/dist-server/types/workspace/sandbox-cli/lib/node/resolver.d.ts +95 -0
  808. package/cli/dist-server/types/workspace/sandbox-cli/lib/node/sandbox-cli-client.d.ts +78 -0
  809. package/cli/dist-server/types/workspace/telemetry/lib/common/event/types/security-review.d.ts +35 -6
  810. package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/index.d.ts +1 -1
  811. package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/otel-env.d.ts +1 -0
  812. package/cli/package.json +1 -1
  813. package/cli/product.cloudhosted.json +1 -1
  814. package/cli/product.internal.json +1 -1
  815. package/cli/product.ioa.json +1 -1
  816. package/cli/product.json +1 -1
  817. package/cli/product.selfhosted.json +1 -1
  818. package/docs/client.md +41 -0
  819. package/docs/in-process.md +151 -14
  820. package/docs/server.md +40 -1
  821. package/executor/lib/capsule/THIRD_PARTY_LICENSES.md +2 -2
  822. package/executor/lib/capsule/entry.mjs +8 -8
  823. package/executor/lib/capsule/manifest.json +2 -2
  824. package/executor/lib/private-protocol.cjs +33 -2
  825. package/executor/lib/private-protocol.d.cts +21 -1
  826. package/executor/lib/types.d.cts +15 -0
  827. package/lib/agent/v2.d.ts +1 -1
  828. package/lib/agent/v2.js +1 -1
  829. package/lib/application/services.d.ts +13 -1
  830. package/lib/application/services.js +1 -1
  831. package/lib/cli/main.js +3 -3
  832. package/lib/client/rpc.d.ts +16 -0
  833. package/lib/components/functional-hooks.d.mts +4 -0
  834. package/lib/components/functional-hooks.mjs +1 -0
  835. package/lib/harness/create-harness.js +1 -1
  836. package/lib/harness/hooks.d.ts +8 -0
  837. package/lib/harness/hooks.js +1 -0
  838. package/lib/harness/runtime.js +1 -1
  839. package/lib/harness/types.d.ts +7 -2
  840. package/lib/integration/agent-integration.d.ts +5 -1
  841. package/lib/integration/agent-integration.js +1 -1
  842. package/lib/integration/client-mcp-attachment.d.ts +5 -1
  843. package/lib/integration/client-mcp-attachment.js +1 -1
  844. package/lib/integration/executor-supervisor.d.ts +10 -1
  845. package/lib/integration/executor-supervisor.js +1 -1
  846. package/lib/integration/session-mcp-scope.d.ts +5 -1
  847. package/lib/integration/session-mcp-scope.js +1 -1
  848. package/lib/integration/session-mcp-view.d.ts +6 -1
  849. package/lib/integration/session-mcp-view.js +1 -1
  850. package/lib/mcp-server/module.d.ts +22 -2
  851. package/lib/mcp-server/module.js +1 -1
  852. package/lib/mcp-server/rpcs.d.ts +174 -123
  853. package/lib/mcp-server/rpcs.js +1 -1
  854. package/lib/mcp-server/schemas.d.ts +33 -0
  855. package/lib/mcp-server/schemas.js +1 -1
  856. package/lib/protocol/rpc.d.ts +73 -3
  857. package/lib/public.d.ts +1 -1
  858. package/package.json +24 -20
  859. package/cli/dist-server/types/workspace/product/lib/common/types/workspace-report.d.ts +0 -119
@@ -0,0 +1,108 @@
1
+ /**
2
+ * ReplCatalogSource —— 骨架目录与发现 API 的统一采集层(主线程)。
3
+ *
4
+ * 设计见 docs/repl-code-mode/mcp-code-mode-design.md §4.3.2「目录数据源」。
5
+ *
6
+ * 三个数据源,各补一块:
7
+ * - ToolSearchService.listDeferredToolInfosForSession() → 全局及会话延迟工具,带 parameters
8
+ * - ToolManager.listRegisteredTools() → 非延迟内置工具(不在延迟索引里)
9
+ * - McpManager.getConnectedServers() → 补"已连接但尚无工具"的空分组
10
+ *
11
+ * **无状态**:每次 collect 现采、不缓存。理由见 protocol 里 ReplCatalogSource 的注释。
12
+ */
13
+ import type { Session } from '../../../vendor/cbc-core/node/index.js';
14
+ import { Logger } from '../../../workspace/telemetry/lib/common/index.js';
15
+ import type { RunContext } from '@openai/agents';
16
+ import { CliRuntimeOptions } from '../../cli/cli-runtime-options';
17
+ import { AgentScopedMcpManager, McpManager } from '../../mcp/mcp-protocol';
18
+ import { ToolManager } from '../tool-protocol';
19
+ import { ToolSearchService } from '../tool-search-protocol';
20
+ import { AgentToolDeferOverlayCache } from '../tool-spec';
21
+ import { REPLCatalog, ReplCatalogSource } from './repl-catalog-protocol';
22
+ /**
23
+ * 所有 MCP server 的 sandbox global 统一加 `mcp_` 前缀(§4.7,常量定义在 protocol)。
24
+ * 与内置工具 / 基础设施(Bash、Read、REPL、tools…)彻底隔离,骨架目录里
25
+ * 看到 `mcp_xxx:` 就能照抄。canonical 全名(mcp__server__tool)不受影响。
26
+ * worker 侧 `INFRA_GLOBALS` 仍是第二道防线,防止漏改名的 catalog 顶掉 SDK。
27
+ */
28
+ export declare class ReplCatalogSourceImpl implements ReplCatalogSource {
29
+ protected readonly logger: Logger;
30
+ protected readonly toolSearchService: ToolSearchService;
31
+ protected readonly toolManager: ToolManager;
32
+ protected readonly overlayCache: AgentToolDeferOverlayCache;
33
+ protected readonly mcpManager?: McpManager;
34
+ protected readonly agentScopedMcpManager?: AgentScopedMcpManager;
35
+ protected readonly cliRuntimeOptions?: CliRuntimeOptions;
36
+ /**
37
+ * @param opts.sandboxAgentName 采集用的**沙箱身份**覆盖(缺省按 session 推)。
38
+ * Code Mode 的 REPL 工具 schema 在 agent 构建期物化,那一刻用的是合成会话(没有子会话身份),
39
+ * 继承模式的子代理就会拿到「模式的全量目录」而不是自己的白名单。派发侧知道子代理身份,
40
+ * 经此显式传入(见 AgentManager.sandboxScopedAgentView)。运行时路径(broker / worker)
41
+ * 仍然按 live session 推,不受影响。
42
+ */
43
+ collect(context: RunContext<Session>, opts?: {
44
+ sandboxAgentName?: string;
45
+ }): Promise<REPLCatalog>;
46
+ /**
47
+ * 构建期兜底:当 live session 未携带 `--tools`(agent 构建早于会话建立,
48
+ * getCurrent() 为 undefined)时,用进程级 CliRuntimeOptions 的 `--tools`
49
+ * 合成一个带 options.tools 的 context,交给 getAllowedToolsForAgent 走同一套
50
+ * 白名单解析。
51
+ *
52
+ * 优先级与 ToolManager.resolveSessionToolContext 对齐:live session 已有
53
+ * options.tools 时**不覆盖**(它是权威值);仅在缺失时才回退到 CLI 快照。
54
+ * 未装配 CliRuntimeOptions(headless/单测)或无 `--tools` 时原样返回。
55
+ */
56
+ private contextWithCliTools;
57
+ private ensureGroup;
58
+ private appendEmptyServerGroups;
59
+ /**
60
+ * 采集全部 MCP server 的配置,建立 serverName → McpConfig 映射,供 repl_expose 判定用。
61
+ * 失败时返回空 map —— 白名单默认 false,等价于"任何 MCP 都不暴露给沙箱",安全兜底。
62
+ */
63
+ private collectServerConfigs;
64
+ /**
65
+ * repl_expose 白名单判定(仅约束 MCP 工具,内置工具不走此路径)。
66
+ * 只认 server 级:显式 repl_expose:true 才暴露,其余(含未配置)一律默认 false。
67
+ */
68
+ private isReplExposed;
69
+ private toBuiltinTool;
70
+ /**
71
+ * 整工具级 deny 规则命中的**内置**工具名集合(MCP 由调用方按单名逐个判)。
72
+ *
73
+ * 与 `AgentManager.isToolDisallowed` 严格同口径:匹配时**带上 aliases**——
74
+ * `--disallowed-tools read` 要能同时命中 LSP / BashOutput 等把 `read` 声明为
75
+ * 别名的工具(isToolDisallowed 用的是 `[toolName, ...aliases]`)。
76
+ *
77
+ * 无任何 deny 规则时立刻返回,避免为绝大多数会话白跑一遍 O(工具数×规则数)。
78
+ */
79
+ private collectWholeToolDenyNames;
80
+ private toMcpTool;
81
+ /** 裸名 MCP 工具没有 serverName 也不带 mcp__ 前缀,此时返回 undefined 归入 builtin 段。 */
82
+ private serverNameOf;
83
+ /**
84
+ * 内置工具的 agent 白名单判定:与 ToolSearchService.isAllowedByAgentTools 同口径
85
+ * (MCP 工具豁免,内置工具必须显式启用)。
86
+ */
87
+ private isAllowedBuiltin;
88
+ /**
89
+ * PTC 跳过直连白名单之后,仍要过工具自己的 isEnabled。
90
+ * 否则 WorkBuddy 的沙箱骨架会列出 SpeakInChannel / MessageColleague。
91
+ */
92
+ private isSandboxToolEnabled;
93
+ /**
94
+ * 归一化成 JSON Schema。三种入参形态都要处理:
95
+ * - 已是 JSON Schema 对象 → 原样
96
+ * - zod schema → `zodToJsonSchema`
97
+ * - **函数**(`parameters(): ZodTypeAny` / `async () => ...`)→ 先调用再转
98
+ *
99
+ * 第三种必须处理:`ToolManager.init()` 对函数式 `parameters` **刻意跳过**转换
100
+ * (留给 `get()` 时动态生成),而这里走 `listRegisteredTools()` 拿的是原始 toolMap,
101
+ * `parameters` 仍是函数。漏掉它会让 Bash / PowerShell / Agent / StructuredOutput
102
+ * 在骨架目录里渲染成无参的 `Bash()` —— 而 Bash 恰是价值最高的工具。
103
+ *
104
+ * 函数必须带 `thisArg`:Agent 的 `parameters()` 是 `return this.buildParametersSchema()`,
105
+ * 抽成裸 `()` 调用会在 strict 下把 schema 打成 `{}`。
106
+ */
107
+ private asJsonSchema;
108
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 预处理用户 REPL 代码,在包进 async-IIFE 之前用 acorn 做两趟变换:
3
+ * 1. 动态 import(x) → __replImport(x)(bridge resolver 全局;Bun 的 vm.SyntheticModule 有 bug,只能源码改写)。
4
+ * 2. 顶层声明提升 + 末尾表达式 → return:
5
+ * - const/let/var/function/class 改写成对持久 vm.Context 的 global 赋值,让变量跨 cell 存活
6
+ * (kernel/cell 模型的关键——否则 IIFE 一结束声明就没了,`const x = 5` 下个 cell 就读不到);
7
+ * - 最后一条裸表达式前缀 `return`,所以 `return` 和末尾表达式两种写法都能拿到结果。
8
+ *
9
+ * 变换后由 manager 包进 (async () => { ... })()。顶层 await/return 落进这个 async 函数;顶层声明已经被改成
10
+ * 对 global 的 bare 赋值——非严格模式下 bare 赋值写到 vm.Context 的 global,于是跨 cell 持久。
11
+ */
12
+ /** import() → __replImport() + 顶层声明提升到 global + 末尾表达式 → return。解析失败则原样返回(交给 vm.Script 报错)。
13
+ *
14
+ * async:内部走 acorn/acorn-walk lazy chunk(standby 不 parse);本函数是 hot path
15
+ * 上唯一使用者。caller `repl-worker-manager.executeCell` 在 async 上下文,加 await 即可。
16
+ */
17
+ export declare function transformReplCode(source: string): Promise<string>;
@@ -0,0 +1,210 @@
1
+ /**
2
+ * REPL / code-mode 平台契约(接口级)。
3
+ *
4
+ * 设计见 docs/repl-code-mode/architecture.md。
5
+ * 核心:
6
+ * - 模型只见 1 个 REPL 工具;内部经 `await import("@wb/...")` 拿桥门面。
7
+ * - vm 在 agent-cli 的常驻 node worker 里跑(starved,无 seatbelt);能力在 WorkBuddy。
8
+ * - agent-cli 只认 BridgeHost 三方法 SPI,零业务、不硬编码任何桥。
9
+ */
10
+ import type { Session } from '../../../vendor/cbc-core/node/index.js';
11
+ import type { RunContext } from '@openai/agents';
12
+ import type { BridgeEntry, SearchToolsOptions, ToolDescriptor, ToolSearchHit } from './repl-catalog-protocol';
13
+ export type { BridgeEntry, SearchToolsOptions, ToolDescriptor, ToolSearchHit };
14
+ /** 模型 import 一个桥时得到的 API 描述符(→ 生成门面 + documentation())。 */
15
+ export interface BridgeApiDescriptor {
16
+ /** 桥标识,如 "@wb/browser"。 */
17
+ specifier: string;
18
+ version?: string;
19
+ /** 顶层导出名,如 ["browser", "default"]。门面按此生成。 */
20
+ exports: string[];
21
+ /** 模型面文档(声明式生成或整段字符串);门面的 documentation() 返回它。 */
22
+ documentation: string;
23
+ /** 可选:方法/签名声明,用于更严格的门面/校验;不给则门面走全通 Proxy。 */
24
+ methods?: Array<{
25
+ path: string;
26
+ signature: string;
27
+ doc?: string;
28
+ }>;
29
+ }
30
+ /** 一次桥方法调用(门面 → broker → BridgeHost)。 */
31
+ export interface BridgeInvokeRequest {
32
+ specifier: string;
33
+ /** 方法路径,如 "page.click" / "cua.computer.click"。 */
34
+ method: string;
35
+ args: unknown[];
36
+ /** 归属哪个 REPL 调用(取消/关联)。 */
37
+ callId: string;
38
+ /** 归属哪个会话(WorkBuddy 侧定位浏览器/桌面上下文)。 */
39
+ sessionRef: string;
40
+ }
41
+ /** broker 收到的一次调用(worker 不知道 sessionRef,由 broker 补)。 */
42
+ export type BridgeInvokeOp = Omit<BridgeInvokeRequest, 'sessionRef'>;
43
+ /** 多模态图片内容(data URL 或远端 URL)。 */
44
+ export interface BridgeImage {
45
+ type: 'image_url';
46
+ image_url: {
47
+ url: string;
48
+ };
49
+ }
50
+ /** 桥调用结果。截图等作为 value 内联返回({ $media, data } 或 image_url 块),由模型 return 出去渲染。 */
51
+ export interface BridgeResult {
52
+ ok: boolean;
53
+ /** 结构化返回值(需可结构化克隆)。 */
54
+ value?: unknown;
55
+ error?: string;
56
+ }
57
+ /** 单次桥调用的取消/超时控制(随 cell 预算,不写死)。 */
58
+ export interface BridgeCallOpts {
59
+ signal?: AbortSignal;
60
+ timeoutMs?: number;
61
+ /**
62
+ * 本次内层工具所属外层 REPL 的 tool-call id(UI function_call_group 的 callId)。
63
+ * 由 worker-manager 从当前 ActiveRun 显式透传,供 Hook 展示归属到正确的外层 REPL。
64
+ * 不走 Session 全局标量:多个外层 REPL 交错时标量会串位/清空(见 #124851 评审)。
65
+ */
66
+ replParentCallId?: string;
67
+ }
68
+ /**
69
+ * BridgeHost —— agent-cli 只认这三个方法,零业务知识。
70
+ * WorkBuddy 侧实现它;资源布局/加载/结构对 agent-cli 完全透明。
71
+ */
72
+ export declare const BridgeHost: unique symbol;
73
+ export interface BridgeHost {
74
+ /** 发现:当前可用的 specifier 列表(可选;可懒——先不给 descriptor)。 */
75
+ listBridges(): Promise<string[]>;
76
+ /** 解析:模型 import 时拿描述符;null = 不可用。WorkBuddy 可在此才真正 load 桥代码。 */
77
+ resolveBridge(specifier: string): Promise<BridgeApiDescriptor | null>;
78
+ /** 调用:门面方法落点。agent-cli 在调用前已过权限;此处只执行。opts 携带 cell 的超时/abort。 */
79
+ invokeBridge(req: BridgeInvokeRequest, opts?: BridgeCallOpts): Promise<BridgeResult>;
80
+ }
81
+ /** 一次 REPL 执行的结果。 */
82
+ export interface CellResult {
83
+ ok: boolean;
84
+ result?: unknown;
85
+ /** Worker-side transfer budget truncated the structured return value. */
86
+ resultTruncated?: boolean;
87
+ stdout: string;
88
+ stderr: string;
89
+ images: BridgeImage[];
90
+ error?: string;
91
+ /**
92
+ * 输出超阈值且完整内容已落盘(OutputSpiller)时的落盘信息。
93
+ *
94
+ * 存在即表示模型面 content 应收敛为 `<persisted-output>` 占位符(与 Bash 截断路径
95
+ * 对齐):模型拿 2KB 预览 + 文件路径,完整输出留在磁盘供 Read 读取,避免跨轮重复
96
+ * 发送全量结果撑爆上下文。
97
+ */
98
+ persisted?: {
99
+ callId: string;
100
+ filePath: string;
101
+ totalBytes: number;
102
+ };
103
+ }
104
+ /**
105
+ * REPL cell 执行中的进度快照(流式上报用)。
106
+ *
107
+ * duration 一律由消费方用 `Date.now() - startedAt` 算 —— `startedAt` 是 cell 启动的
108
+ * 固定墙钟,保证运行时长单调递增(不像内部子工具各自从 0 计时那样反复重置)。
109
+ */
110
+ export interface ReplProgressSnapshot {
111
+ /** cell 启动的墙钟时刻(固定基准)。 */
112
+ startedAt: number;
113
+ /** 截至当前的累积 stdout 快照。 */
114
+ stdout: string;
115
+ /** 截至当前的累积 stderr 快照。 */
116
+ stderr: string;
117
+ /** 最近一次子工具调用标识(如 `Bash` 或 `Bash · sleep 5`)。 */
118
+ lastTool?: string;
119
+ }
120
+ export interface REPLRunOptions {
121
+ timeoutMs: number;
122
+ signal?: AbortSignal;
123
+ /**
124
+ * cell 执行中的进度回调:每秒一次(对齐 bash 的 startStreamingUpdates),以及每次
125
+ * 收到 worker 的 output / toolCall 消息时即时触发一次。上层据此推 UI 聚合流式。
126
+ */
127
+ onProgress?: (snapshot: ReplProgressSnapshot) => void;
128
+ /**
129
+ * 本次外层 REPL 的 tool-call id(与 UI function_call_group 一致)。worker-manager 存到
130
+ * ActiveRun,并在每次内层 toolCall 时透传给 broker,用于内层 Hook 的展示归属。
131
+ */
132
+ replCallId?: string;
133
+ }
134
+ /**
135
+ * 每 session 一个常驻 node worker(= cell,状态跨调用存活)的管理者。
136
+ * `run` get-or-spawn worker → post exec → await done。
137
+ */
138
+ export declare const REPLWorkerManager: unique symbol;
139
+ export interface REPLWorkerManager {
140
+ /**
141
+ * 收 `RunContext<Session>` 而非 `Session`:发现类 broker 方法需要 RunContext 才能拿
142
+ * agent 工具白名单(`getAllowedToolsForAgent`),且 RunContext 无法从 Session 反推。
143
+ * 见 docs/repl-code-mode/mcp-code-mode-design.md §4.3.3 易漏点 ①。
144
+ */
145
+ run(context: RunContext<Session>, code: string, opts: REPLRunOptions): Promise<CellResult>;
146
+ /** 协作取消(hard=true → worker.terminate() 硬杀失控 async)。 */
147
+ abort(session: Session, callId: string, hard?: boolean): void;
148
+ /** session 结束/闲置:拆 worker。 */
149
+ dispose(session: Session): Promise<void>;
150
+ }
151
+ /**
152
+ * BridgeBroker —— worker 的 resolve / bridgeOp / toolCall / replApi 落点(主线程)。
153
+ *
154
+ * 三条分流:
155
+ * - 工具调用 `callTool` → 主动 checkPermission → DeferExecuteTool 两条现成路由
156
+ * - 工具发现 `searchTools` / `describeTool(s)` → ToolSearchService(只读,不过权限)
157
+ * - 外部桥 `resolve` / `invoke` → BridgeHost
158
+ *
159
+ * 批准在 REPL 工具层(整段 code 批一次);发现类是只读元数据查询,把关的是可见性而非权限。
160
+ */
161
+ export declare const REPLBridgeBroker: unique symbol;
162
+ export interface REPLBridgeBroker {
163
+ resolve(session: Session, specifier: string): Promise<BridgeApiDescriptor | null>;
164
+ invoke(session: Session, op: BridgeInvokeOp, opts?: BridgeCallOpts): Promise<BridgeResult>;
165
+ /**
166
+ * 工具调用。**主动**跑 `checkPermission` 再执行——REPL 的 toolCall 不经 AgentService,
167
+ * 不主动跑则 deny rules 与命令安全检查全部被绕过。
168
+ * 被拒时返回 `{ error }` 而不 throw(§4.8)。
169
+ */
170
+ callTool(context: RunContext<Session>, toolName: string, params: Record<string, unknown>, opts?: BridgeCallOpts): Promise<{
171
+ result?: unknown;
172
+ error?: string;
173
+ }>;
174
+ /** BM25 检索。发现类方法一律收 RunContext(agent 白名单需要它)。 */
175
+ searchTools(context: RunContext<Session>, query: string | string[], opts?: SearchToolsOptions): Promise<ToolSearchHit[]>;
176
+ /** 单个工具完整 schema;未知返回 null(**不做 fuzzy fallback**)。 */
177
+ describeTool(context: RunContext<Session>, name: string): Promise<ToolDescriptor | null>;
178
+ /** 精准批量(≤ REPL_DESCRIBE_TOOLS_MAX 条),不是全量拉取。 */
179
+ describeTools(context: RunContext<Session>, names: string[]): Promise<Record<string, ToolDescriptor | null>>;
180
+ /** 外部桥目录(需 import 后用,与工具发现隔离)。 */
181
+ listBridges(session: Session): Promise<BridgeEntry[]>;
182
+ }
183
+ /**
184
+ * REPL 桥传输 = 一条**本地 socket / 命名管道**(Unix domain socket / Windows 命名管道),
185
+ * 0600 owner-only + token 授权,零端口。
186
+ *
187
+ * spawn agent-cli 的一方(如 WorkBuddy)通过 env 传入**管道路径** + **授权 token**:
188
+ * - `CODEBUDDY_REPL_HOST_PIPE_PATH`:mac/linux = Unix domain socket 路径;Windows = 命名管道 `\\.\pipe\...`。
189
+ * Node `net.connect(path)` 对两者透明,由提供方按平台给正确的 path → agent-cli 代码天然跨平台。
190
+ * - `CODEBUDDY_REPL_HOST_TOKEN`:随每次请求带上,提供方校验(Windows 命名管道无 Unix peer creds,用 token 通用)。
191
+ *
192
+ * 协议:一次连接一次请求——agent-cli 写 `<json>\n`,读 `<json>\n`。agent-cli 不认提供方身份、不做发现、
193
+ * 不走 MCP 工具。**零端口。** 未配置 = 无桥。
194
+ */
195
+ export declare const REPL_HOST_PIPE_ENV = "CODEBUDDY_REPL_HOST_PIPE_PATH";
196
+ export declare const REPL_HOST_TOKEN_ENV = "CODEBUDDY_REPL_HOST_TOKEN";
197
+ /**
198
+ * REPL 总闸 env。开启 code-mode(REPL 工具暴露 + 骨架目录注入)的唯一开关。
199
+ * 单一实现放协议层,供 REPLTool(isEnabled / 骨架渲染)与 AgentManager(首轮
200
+ * MCP prewait 判定)复用,避免各处内联 env 判定漂移。
201
+ */
202
+ export declare const REPL_ENABLED_ENV = "CODEBUDDY_REPL_ENABLED";
203
+ export declare function isReplEnabled(agentName?: string, session?: {
204
+ meta?: Record<string, unknown>;
205
+ agentName?: string;
206
+ }): boolean;
207
+ /** REPL 工具入参上限:默认 60s,上限 600s。 */
208
+ export declare const REPL_DEFAULT_TIMEOUT_MS = 60000;
209
+ export declare const REPL_MAX_TIMEOUT_MS = 600000;
210
+ export declare function clampReplTimeout(ms?: number): number;
@@ -0,0 +1,142 @@
1
+ /**
2
+ * REPLTool —— 模型面唯一入口:写 JS、import WorkBuddy 桥来编排。
3
+ *
4
+ * 见 docs/repl-code-mode/architecture.md。
5
+ * - 暴露面:1 个工具;能力经 `await import("@wb/...")` 桥,不做直连工具、暂不给 tools.*。
6
+ * - 执行委托 REPLWorkerManager(每 session 常驻 kernel = cell,状态跨调用存活)。
7
+ * - 高权限:能触达桥,needsApproval=true;必须投影 code 给 auto 分类器(否则静默放行)。
8
+ * - feature-gate:CODEBUDDY_REPL_ENABLED。
9
+ */
10
+ import { Session, type SessionManager as ISessionManager } from '../../../vendor/cbc-core/node/index.js';
11
+ import { type FunctionCallItem, ToolArg, ToolNames } from '../../../vendor/cbc-shared/node/index.js';
12
+ import { Logger } from '../../../workspace/telemetry/lib/common/index.js';
13
+ import type { RunContext } from '@openai/agents';
14
+ import { z } from 'zod';
15
+ import { ToolResultBlobService } from '../../blob-store/tool-result-blob-service';
16
+ import { BaseTool } from '../base-tool';
17
+ import { type ShellStreamPusherService } from '../shell-stream-pusher';
18
+ import { Tool, ToolCallArgumentRenderer, ToolManager, ToolResult } from '../tool-protocol';
19
+ import { ReplCatalogSource } from './repl-catalog-protocol';
20
+ import { REPLWorkerManager } from './repl-protocol';
21
+ /**
22
+ * `parameters()` 收到的 agent 配置。除产品字段外多一个 CLI 内部注记:
23
+ *
24
+ * `sandboxAgentName` —— 沙箱目录(骨架)按哪个身份收窄。Code Mode 的 agent 实例是
25
+ * **进程级共享**的(`agentManager.get('ptc')` 命中的是同一个对象),schema 在构建期物化时
26
+ * 用合成会话采集,拿不到「这一轮是谁在跑」;继承模式的子代理(Explore 等)就会看到模式
27
+ * 的全量目录。派发侧知道子代理身份,经本字段显式传入(见 AgentManager.sandboxScopedAgentView)。
28
+ * 不是产品配置字段,只为 REPL 的动态 schema 服务。
29
+ */
30
+ interface ReplParametersAgentConfig {
31
+ name?: string;
32
+ sandboxAgentName?: string;
33
+ }
34
+ /**
35
+ * 入参形状。运行时 schema 由 `parameters()` 动态生成(要把骨架目录拼进 code 描述),
36
+ * 这里只声明 `execute` 的入参类型——两处字段必须保持一致。
37
+ */
38
+ interface ReplToolInput {
39
+ code: string;
40
+ timeout?: number;
41
+ description?: string;
42
+ }
43
+ export declare class REPLTool extends BaseTool implements Tool {
44
+ protected readonly logger: Logger;
45
+ protected readonly shellStreamPusher: ShellStreamPusherService;
46
+ protected readonly workers: REPLWorkerManager;
47
+ protected readonly catalogSource: ReplCatalogSource;
48
+ protected readonly sessionManager?: ISessionManager;
49
+ protected readonly toolManager?: ToolManager;
50
+ protected readonly toolResultBlobService?: ToolResultBlobService;
51
+ name: ToolNames;
52
+ readonly promptCacheStability: "volatile";
53
+ description: string;
54
+ /**
55
+ * 动态 schema:把骨架目录注入 `code` 参数描述,让模型写 code 前就知道有哪些工具
56
+ * 及其参数形状(一次写对、不盲写)。ToolManager.get() 在 parameters 是函数时会
57
+ * 调用它并转成 JSON Schema,且把正在构建的 agent 传进来。
58
+ *
59
+ * **异常必须自吞**:ToolManager 对 parameters() 抛错的兜底是把 parameters 置为
60
+ * undefined,那对 REPL 是灾难(没有 code 参数就完全不可用)。所以采集失败一律
61
+ * 降级为"无目录但可用"。
62
+ *
63
+ * `agentConfig.sandboxAgentName`(CLI 内部注记)会把骨架目录按子代理身份收窄 ——
64
+ * 共享模式 agent 实例的 schema 本来分不清「谁在跑」,见该字段的说明。
65
+ */
66
+ parameters: (agentConfig?: ReplParametersAgentConfig) => Promise<z.ZodTypeAny>;
67
+ argumentRenderer: ToolCallArgumentRenderer;
68
+ isEnabled: (args?: unknown) => Promise<boolean>;
69
+ /** 必须 override:REPL 能跑桥(含高权限),auto 模式不能静默放行。投影 code 给分类器。 */
70
+ toAutoClassifierInput(input: unknown): string;
71
+ resolveNeedPermissionArgs(_rc: RunContext, input: unknown): ToolArg[];
72
+ execute(input: ReplToolInput, context?: RunContext<Session>, details?: {
73
+ toolCall: FunctionCallItem;
74
+ }): Promise<ToolResult>;
75
+ /**
76
+ * details.toolCall.callId 缺失时(部分非交互路径),从 session.history 倒序反查本次 REPL
77
+ * function_call 的 callId——对齐 bash 的 findCallId。拿到与 UI 侧 function_call_group 一致
78
+ * 的 callId,流式进度帧才能就地并入同一条工具结果,而不是在对话流里堆积孤立行(issue #101579)。
79
+ * 用 code 精确匹配,避免命中同一会话里更早的 REPL 调用。
80
+ */
81
+ private findReplCallId;
82
+ /**
83
+ * 推一条聚合流式进度到 UI(复用 bash 的 `function_call_result` + `isStreaming` 模式,
84
+ * 不新增 sessionUpdate 类型)。用外层 REPL tool-call 的 callId + 固定 resultId,
85
+ * use-message-groups 据此就地更新同一条 in_progress 结果;运行时长由固定 startedAt
86
+ * 算,单调递增,天然取代内部子工具那种各自从 0 反复重置的孤立条目。
87
+ */
88
+ private emitStreaming;
89
+ /**
90
+ * 渲染骨架目录。**必须自吞全部异常并返回空串**——见 parameters 的注释。
91
+ *
92
+ * 总闸 `CODEBUDDY_REPL_ENABLED` 关闭时直接短路。`isEnabled` 只把工具从 LLM tools
93
+ * 列表里剔除,管不到这里:`parameters` 是动态函数,ToolManager 构建 agent tools 时
94
+ * **无条件** `await tool.parameters()`(tool-manager.ts:396-404)。不短路的话,总闸
95
+ * 关着也会为一个永不暴露给模型的工具跑一遍全量目录采集。
96
+ *
97
+ * 细闸 `CODEBUDDY_REPL_TOOLS_INJECT_CATALOG=0`(或 `false`)可单独关掉目录注入(工具仍
98
+ * 预加载,只是模型不提前知情,退化为纯渐进披露)。默认开启。
99
+ *
100
+ * 另有 `CODEBUDDY_REPL_TOOLS_INJECT_BUILTIN` 控制**内置工具**是否加载到 REPL
101
+ * (PTC/Minimal 默认开,其余模式默认关;`1`/`0` 强开强关)。控制点在
102
+ * ReplCatalogSource.collect(关闭时 catalog.builtin 为空,骨架目录与 sandbox
103
+ * 注入同时不含内置工具),不在本方法。
104
+ */
105
+ private renderSkeleton;
106
+ /**
107
+ * Code Mode 对齐标准模式的技能注入:标准模式的 `<available_skills>` 目录长在
108
+ * Skill 工具描述里;Code Mode 模型面只有 REPL、骨架每行摘要只截 80 字符,
109
+ * 目录会整体丢失。这里把 ToolManager 渲染的完整 Skill 描述(同一份字符预算 /
110
+ * skillOverrides 逻辑)附到 code 参数描述末尾,token 成本与标准模式等价。
111
+ *
112
+ * 与 catalog.collect 分开:骨架摘要每行只截 80 字符,技能列表会丢掉。
113
+ * 即使当前会话不是 Code Mode(正在 freeze ptc agent),只要
114
+ * specForReplParameters 认成 PTC/Minimal,也要把完整 Skill 描述打进去。
115
+ */
116
+ private renderSkillCatalogSection;
117
+ /** ACP 在 ALS 外 getCurrent 会抛;不能让整个 parameters() 失败。 */
118
+ private currentSessionSafe;
119
+ /**
120
+ * ToolManager ↔ REPL 循环依赖时 @Optional 注入会是 undefined。
121
+ * parameters() 在所有组件装配之后才跑,这时再懒取一次。
122
+ */
123
+ private resolveToolManager;
124
+ /**
125
+ * 完成态工具结果。
126
+ * - `content`:模型面结构化 JSON(`buildReplToolContent`,含 result/stdout/stderr[/images])。
127
+ * 输出超阈值且已落盘时收敛为 `<persisted-output>` 占位符(2KB 预览 + 文件路径),
128
+ * 与 Bash 截断路径对齐——完整内容留在磁盘供 Read,避免跨轮重复发送全量结果。
129
+ * - `renderer.value`:人面展示。**不再显示 "ok"**——改为「耗时置顶 + 执行详情」:
130
+ * 耗时用 `formatTurnDuration`("50s" / "1m 05s",无 "ago")置于首行且始终可见
131
+ * (不被折叠吃掉);执行详情(`buildReplDisplayText`)在下方,超 DEFAULT_DISPLAY_ROWS
132
+ * 自动折叠,`ctrl+o` 展开完整详情——与 bash 的结果行体验一致。
133
+ */
134
+ private toToolResult;
135
+ /**
136
+ * REPL 输出超阈值且完整内容已落盘时,把模型面 content 换成 `<persisted-output>` 占位符。
137
+ * 与 Bash buildForegroundResult 的 externalizeFromSpillFile 路径对齐;占位失败
138
+ * (service 缺失/异常)时保留截断文本兜底。
139
+ */
140
+ private externalizeReplOutput;
141
+ }
142
+ export {};
@@ -0,0 +1,103 @@
1
+ /**
2
+ * REPLWorkerManager 实现(checkpoint 2b:常驻 Bun worker,perf/错误隔离)。
3
+ *
4
+ * - 每个 session 一个常驻 worker = kernel,里面一个持久 vm.Context = cell,状态跨多次 run 存活。
5
+ * - worker 建在 @genie/cbc-worker 的 kit 上(rpc + 加固 realm),只用 builtins;acorn 的 import() 改写在主线程做好再发进去。
6
+ * - 主线程侧是 @genie/cbc-worker 的 WorkerHost:exec 是带 rid 的请求,__replImport / facade / 工具调用是
7
+ * worker → host 的请求,经 inSession 落在会话的 rootScope 里 → broker.resolve / broker.invoke / broker.callTool。
8
+ * 帧见 repl-worker-protocol.ts。心跳只在没有 active cell 时计缺失(cell 同步占线程时 pong 发不出来)。
9
+ * - lifecycle:cell 超时/取消只结束这次 cell(abort 它在途的 bridge 调用让它 unwind),kernel 和状态都留着;
10
+ * 只有 worker 崩溃/退出,或 hard abort(= reset),才销毁 worker、下次 run 重建。像 Jupyter / node_repl 的 kernel。
11
+ *
12
+ * 见 docs/repl-code-mode/architecture.md。
13
+ */
14
+ import { Session } from '../../../vendor/cbc-core/node/index.js';
15
+ import { Logger } from '../../../workspace/telemetry/lib/common/index.js';
16
+ import type { RunContext } from '@openai/agents';
17
+ import { ToolResultBlobService } from '../../blob-store/tool-result-blob-service';
18
+ import { ToolSearchService } from '../tool-search-protocol';
19
+ import { ReplCatalogSource } from './repl-catalog-protocol';
20
+ import { CellResult, REPLBridgeBroker, REPLRunOptions, REPLWorkerManager } from './repl-protocol';
21
+ export declare class REPLWorkerManagerImpl implements REPLWorkerManager {
22
+ protected readonly logger: Logger;
23
+ protected readonly broker: REPLBridgeBroker;
24
+ protected readonly catalogSource: ReplCatalogSource;
25
+ protected readonly toolSearchService: ToolSearchService;
26
+ protected readonly toolResultBlobService?: ToolResultBlobService;
27
+ private readonly workers;
28
+ private callSeq;
29
+ run(context: RunContext<Session>, code: string, opts: REPLRunOptions): Promise<CellResult>;
30
+ /** 取消当前 cell:软取消(默认)结束这次 cell、保留 kernel;硬取消(hard=true)销毁 worker,下次 run 重建(= reset)。 */
31
+ abort(session: Session, _callId: string, hard?: boolean): void;
32
+ dispose(session: Session): Promise<void>;
33
+ /**
34
+ * 记一次 bridge 交互的起讫,驱动 idle 超时:发起 inflightBridges++,结算 --并刷新 lastBridgeActivity。
35
+ * 有在途调用(inflightBridges>0)idle 就续期,故 AskUserQuestion 等用户、长任务在途都不会被超时打断。
36
+ * active 用发起时捕获的引用——即便结算时 cell 已被换,写旧 active 也无副作用(其计数已无人读)。
37
+ */
38
+ private withBridgeActivity;
39
+ private ensureWorker;
40
+ /**
41
+ * 把当前工具集同步进 sandbox。
42
+ *
43
+ * 首次是全量 `init`;之后 `(epoch, 能力指纹)` 变了才推 `toolsUpdate` 增量。cell 执行中到达的
44
+ * 变更排队到 `done` 之后(见 flushPendingTools)——否则模型 code 跑到一半时
45
+ * `const g = github` 脚下的对象会被换掉。
46
+ *
47
+ * 为什么键里要有能力指纹:工具可见性不止由索引/overlay 版本决定(房间类工具还要看
48
+ * Agent Home 表面 / 身份 / 已加入频道),那些变化不推进任何 epoch。只比 epoch 会让新
49
+ * 加入频道的会话永远拿不到 SpeakInChannel(见 repl-sandbox-capability 头注释)。
50
+ */
51
+ private syncTools;
52
+ /** cell 结束后补推排队的工具变更。 */
53
+ private flushPendingTools;
54
+ /**
55
+ * 推一次进度快照给本次 run 的 onProgress。
56
+ *
57
+ * 带 `callId` 校验:进度定时器/异步消息可能在 cell 已被 abandon(超时/取消)或换成
58
+ * 下一次 run 之后才触发,此时 entry.active 已是别的 cell 或 undefined,不能误推。
59
+ * 回调异常一律吞掉——UI 侧问题绝不能影响 cell 执行。
60
+ */
61
+ private emitProgress;
62
+ private postCatalog;
63
+ private bindWorkerHandlers;
64
+ /** 发现类 API 分流。只读,不过权限判定(把关的是可见性,见 §4.8)。 */
65
+ private dispatchReplApi;
66
+ /**
67
+ * exec 回执的 async 收尾:只认当前 cell(被 abandon 的旧 cell 的回执已被 WorkerHost 丢弃,
68
+ * callId 不符的也直接丢,别误清新 cell 的 active)。
69
+ *
70
+ * 在 settle 前把 spill 文件收口(追加 result 文本 + 判定截断),这样上层拿到
71
+ * CellResult.persisted 时文件已完整可读。
72
+ */
73
+ private handleDone;
74
+ /** 被放弃 cell 的 continuation 终于 unwind 完:worker 已自行收尾,取消宽限、不必 terminate,kernel 状态保留。 */
75
+ private onUnwound;
76
+ /** 执行期把完整 stdout/stderr 流式落盘(懒创建:无输出的 cell 不产生文件)。 */
77
+ private pushSpill;
78
+ /**
79
+ * 收尾本次 run 的 spill 文件:
80
+ * 1. 把完整 result 文本追加进文件(模型面只剩 head/tail 时,完整内容留给 Read);
81
+ * 2. 关闭文件流;
82
+ * 3. 任一 buffer 截断且落盘成功 → 返回 persisted(上层把模型面收敛为占位符);
83
+ * 未截断 / 落盘失败 → 删除临时文件,不产生垃圾。
84
+ *
85
+ * result 截断判定与 buildReplToolContent 的 truncateReplResult 同口径
86
+ * (replResultToText 文本的 UTF-8 字节数超本次 run 的输出预算)。
87
+ */
88
+ private finalizeSpiller;
89
+ private createSpiller;
90
+ /** 中止/失败的 cell 不留落盘文件(内容不完整,Read 也没有意义)。 */
91
+ private cleanupSpiller;
92
+ /** cell 超时/软取消:让这次 cell 以错误结束,并 abort 它在途的 bridge 调用(cell 的 await 会抛错、自行 unwind);
93
+ * worker(= kernel)保留,vm.Context 里的状态不丢——像 Jupyter / node_repl 那样。真卡死(CPU 打满)时靠 hard abort 重建。 */
94
+ private abandonCell;
95
+ /** 起 unwind 宽限;到期 worker 仍未发回 unwound 就 terminate 重建。 */
96
+ private armAbandonGrace;
97
+ /** 清 unwind 宽限计时器(收到 unwound / hard abort / 崩溃时调用;不动 abandonedCallId)。 */
98
+ private clearGrace;
99
+ /** 失败当前运行(崩溃/退出/dispose);active 的 promise 以错误态 settle,并清理 abandon 宽限。 */
100
+ private failActive;
101
+ /** 销毁 worker(崩溃/退出,或 hard abort / reset)并下线;下次 run 重建。 */
102
+ private killWorker;
103
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * REPL worker source string for `new Worker(src, { eval: true })`.
3
+ *
4
+ * The worker is authored as TypeScript in `./worker/repl-worker.ts` and bundled by
5
+ * `scripts/gen-repl-worker-source.mjs` (vite) into `./repl-worker-source.generated.ts`.
6
+ * This module only re-exports the generated constant so the import path stays stable.
7
+ *
8
+ * Why a string constant rather than a worker file:
9
+ * - agent-cli ships as a Bun single-file executable; there is no worker file to point at.
10
+ * - A string is opaque to rspack, so the worker's own `require` calls are never rewritten.
11
+ * - An inline worker inside the SFE has no node_modules, so the worker uses Node builtins
12
+ * only; acorn's import() rewrite runs on the main thread before the code is sent in.
13
+ *
14
+ * Protocol and sandbox rules are documented at the top of `./worker/repl-worker.ts`.
15
+ */
16
+ export { REPL_WORKER_SOURCE } from './repl-worker-source.generated';
@@ -0,0 +1,2 @@
1
+ /** Worker script for `new Worker(source, { eval: true })`. */
2
+ export declare const REPL_WORKER_SOURCE: string;