@tencent-ai/agent-sdk 0.3.263-dev.90f0e98.202609190050 → 0.3.263

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 (264) hide show
  1. package/cli/dist/codebuddy-headless.js +1 -1
  2. package/cli/dist/codebuddy-lite-wb.mjs +1 -1
  3. package/cli/dist-server/codebuddy.js +1 -1
  4. package/cli/dist-server/types/node/references/index.d.ts +2 -0
  5. package/cli/dist-server/types/node/settings/settings-controller.d.ts +23 -0
  6. package/cli/dist-server/types/node/settings/settings-validate-middleware.d.ts +9 -0
  7. package/cli/dist-server/types/node/utils/compress-path.source.d.ts +59 -0
  8. package/cli/package.json +2 -3
  9. package/cli/product.cloudhosted.json +2 -2
  10. package/cli/product.internal.json +2 -2
  11. package/cli/product.ioa.json +2 -2
  12. package/cli/product.json +2 -2
  13. package/cli/product.selfhosted.json +2 -2
  14. package/package.json +2 -3
  15. package/cli/dist-server/types/node/a2a/a2a-artifact-download-service.d.ts +0 -51
  16. package/cli/dist-server/types/node/a2a/a2a-context-store.d.ts +0 -100
  17. package/cli/dist-server/types/node/a2a/a2a-remote-cancel.d.ts +0 -111
  18. package/cli/dist-server/types/node/acp/usage-by-category-calculator.d.ts +0 -45
  19. package/cli/dist-server/types/node/acp/usage-by-category-char-weight.d.ts +0 -9
  20. package/cli/dist-server/types/node/acp/usage-by-category-distribute.d.ts +0 -6
  21. package/cli/dist-server/types/node/acp/usage-by-category-tools-split.d.ts +0 -11
  22. package/cli/dist-server/types/node/agent/agent-config-cli-fields.d.ts +0 -57
  23. package/cli/dist-server/types/node/agent/agent-controller.d.ts +0 -127
  24. package/cli/dist-server/types/node/agent/agent-display.d.ts +0 -77
  25. package/cli/dist-server/types/node/agent/agent-runtime-adapter.d.ts +0 -69
  26. package/cli/dist-server/types/node/agent/custom-agent-identity.d.ts +0 -54
  27. package/cli/dist-server/types/node/agent/custom-agent-manager.d.ts +0 -43
  28. package/cli/dist-server/types/node/agent/custom-agent-path-registry.d.ts +0 -19
  29. package/cli/dist-server/types/node/agent/insights-data-agent-run-interceptor.d.ts +0 -67
  30. package/cli/dist-server/types/node/agent/interceptor-name-registry.d.ts +0 -4
  31. package/cli/dist-server/types/node/agent/interceptors/channel-event-interceptor.d.ts +0 -44
  32. package/cli/dist-server/types/node/agent/interceptors/command-interceptors.d.ts +0 -71
  33. package/cli/dist-server/types/node/agent/interceptors/deep-research-pending-interceptor.d.ts +0 -30
  34. package/cli/dist-server/types/node/agent/interceptors/env-interceptor.d.ts +0 -7
  35. package/cli/dist-server/types/node/agent/interceptors/file-interceptors.d.ts +0 -38
  36. package/cli/dist-server/types/node/agent/interceptors/image-interceptors.d.ts +0 -47
  37. package/cli/dist-server/types/node/agent/interceptors/index.d.ts +0 -15
  38. package/cli/dist-server/types/node/agent/interceptors/initial-prompt-interceptor.d.ts +0 -29
  39. package/cli/dist-server/types/node/agent/interceptors/model-interceptors.d.ts +0 -43
  40. package/cli/dist-server/types/node/agent/interceptors/sandbox-interceptor.d.ts +0 -68
  41. package/cli/dist-server/types/node/agent/interceptors/sensitive-user-input-interceptor.d.ts +0 -7
  42. package/cli/dist-server/types/node/agent/interceptors/system-reminder-interceptor.d.ts +0 -76
  43. package/cli/dist-server/types/node/agent/interceptors/team-resume-intent-interceptor.d.ts +0 -31
  44. package/cli/dist-server/types/node/agent/interceptors/telemetry-interceptors.d.ts +0 -43
  45. package/cli/dist-server/types/node/agent/interceptors/ultracode-effort-reminder-interceptor.d.ts +0 -21
  46. package/cli/dist-server/types/node/agent/interceptors/ultracode-keyword-interceptor.d.ts +0 -34
  47. package/cli/dist-server/types/node/agent/main-agent-acp-handler.d.ts +0 -203
  48. package/cli/dist-server/types/node/agent/main-agent-policy.d.ts +0 -33
  49. package/cli/dist-server/types/node/agent/memory-context-interceptor.d.ts +0 -84
  50. package/cli/dist-server/types/node/agent/stream-json-init-interceptor.d.ts +0 -9
  51. package/cli/dist-server/types/node/agent/subagent-limits.d.ts +0 -75
  52. package/cli/dist-server/types/node/agent/team-context-interceptor.d.ts +0 -42
  53. package/cli/dist-server/types/node/agent/team-resume-intent.d.ts +0 -20
  54. package/cli/dist-server/types/node/agent/teammate-failure-interceptor.d.ts +0 -67
  55. package/cli/dist-server/types/node/agent-home/agent-home-acp-forward.d.ts +0 -11
  56. package/cli/dist-server/types/node/agent-home/agent-home-agent-create.d.ts +0 -31
  57. package/cli/dist-server/types/node/agent-home/agent-home-audit.d.ts +0 -54
  58. package/cli/dist-server/types/node/agent-home/agent-home-channel-context.d.ts +0 -44
  59. package/cli/dist-server/types/node/agent-home/agent-home-channel-create.d.ts +0 -73
  60. package/cli/dist-server/types/node/agent-home/agent-home-channel-events.d.ts +0 -8
  61. package/cli/dist-server/types/node/agent-home/agent-home-channel-lookup.d.ts +0 -30
  62. package/cli/dist-server/types/node/agent-home/agent-home-channel-speech.d.ts +0 -72
  63. package/cli/dist-server/types/node/agent-home/agent-home-channel-task-events.d.ts +0 -45
  64. package/cli/dist-server/types/node/agent-home/agent-home-channel-task-order.d.ts +0 -25
  65. package/cli/dist-server/types/node/agent-home/agent-home-channel-tasks.d.ts +0 -156
  66. package/cli/dist-server/types/node/agent-home/agent-home-channel-wake-guard.d.ts +0 -35
  67. package/cli/dist-server/types/node/agent-home/agent-home-channel-wake.d.ts +0 -102
  68. package/cli/dist-server/types/node/agent-home/agent-home-colleague-job.d.ts +0 -37
  69. package/cli/dist-server/types/node/agent-home/agent-home-colleague-memory.d.ts +0 -52
  70. package/cli/dist-server/types/node/agent-home/agent-home-deliver.d.ts +0 -76
  71. package/cli/dist-server/types/node/agent-home/agent-home-directory-lock.d.ts +0 -22
  72. package/cli/dist-server/types/node/agent-home/agent-home-errors.d.ts +0 -17
  73. package/cli/dist-server/types/node/agent-home/agent-home-inbox.d.ts +0 -101
  74. package/cli/dist-server/types/node/agent-home/agent-home-main-session.d.ts +0 -33
  75. package/cli/dist-server/types/node/agent-home/agent-home-recipients.d.ts +0 -38
  76. package/cli/dist-server/types/node/agent-home/agent-home-room-context-interceptor.d.ts +0 -30
  77. package/cli/dist-server/types/node/agent-home/agent-home-runtime-arm-state.d.ts +0 -14
  78. package/cli/dist-server/types/node/agent-home/agent-home-runtime.d.ts +0 -87
  79. package/cli/dist-server/types/node/agent-home/agent-home-settings.d.ts +0 -39
  80. package/cli/dist-server/types/node/agent-home/agent-home-tool-gate.d.ts +0 -53
  81. package/cli/dist-server/types/node/agent-home/channel-wake-service.d.ts +0 -69
  82. package/cli/dist-server/types/node/agent-task/categorize-failure.d.ts +0 -65
  83. package/cli/dist-server/types/node/agent-team/shutdown-coordinator.d.ts +0 -98
  84. package/cli/dist-server/types/node/agent-team/team-runtime-adopter.d.ts +0 -13
  85. package/cli/dist-server/types/node/agent-team/team-runtime-manifest.d.ts +0 -66
  86. package/cli/dist-server/types/node/agent-team/team-runtime-status.d.ts +0 -34
  87. package/cli/dist-server/types/node/agent-view/agent-view-actions.d.ts +0 -205
  88. package/cli/dist-server/types/node/agent-view/job-reclaim-gate.d.ts +0 -13
  89. package/cli/dist-server/types/node/ask/index.d.ts +0 -3
  90. package/cli/dist-server/types/node/bash-sandbox/index.d.ts +0 -4
  91. package/cli/dist-server/types/node/code-ratio/cli-git-commit-watcher.d.ts +0 -159
  92. package/cli/dist-server/types/node/code-ratio/cli-svn-commit-watcher.d.ts +0 -111
  93. package/cli/dist-server/types/node/code-ratio/code-ratio-reporting-service.d.ts +0 -90
  94. package/cli/dist-server/types/node/code-ratio/fs-file-reader.d.ts +0 -26
  95. package/cli/dist-server/types/node/code-ratio/index.d.ts +0 -5
  96. package/cli/dist-server/types/node/code-ratio/repo-discovery.d.ts +0 -32
  97. package/cli/dist-server/types/node/code-ratio/vcs-repo-resolver.d.ts +0 -51
  98. package/cli/dist-server/types/node/control-signal/stdout-writer.d.ts +0 -99
  99. package/cli/dist-server/types/node/elicitation/elicitation-service.d.ts +0 -100
  100. package/cli/dist-server/types/node/hooks/admin-trusted.d.ts +0 -41
  101. package/cli/dist-server/types/node/http/api-galileo-metrics.d.ts +0 -19
  102. package/cli/dist-server/types/node/http/classify-network-error.d.ts +0 -21
  103. package/cli/dist-server/types/node/http/custom-header-http-interceptor.d.ts +0 -14
  104. package/cli/dist-server/types/node/http/fetch-proxy.d.ts +0 -22
  105. package/cli/dist-server/types/node/http/http-proxy-interceptor.d.ts +0 -74
  106. package/cli/dist-server/types/node/http/index.d.ts +0 -6
  107. package/cli/dist-server/types/node/http/workbuddy-config-dir.d.ts +0 -17
  108. package/cli/dist-server/types/node/lsp/index.d.ts +0 -6
  109. package/cli/dist-server/types/node/lsp/lsp-client.d.ts +0 -104
  110. package/cli/dist-server/types/node/lsp/lsp-exit-registry.d.ts +0 -16
  111. package/cli/dist-server/types/node/lsp/lsp-manager.d.ts +0 -91
  112. package/cli/dist-server/types/node/lsp/lsp-protocol.d.ts +0 -245
  113. package/cli/dist-server/types/node/model/effort-capabilities.d.ts +0 -64
  114. package/cli/dist-server/types/node/model/passthrough-header-policy.d.ts +0 -25
  115. package/cli/dist-server/types/node/multitask/completion-bus.d.ts +0 -36
  116. package/cli/dist-server/types/node/multitask/coordinator-acp-bridge.d.ts +0 -41
  117. package/cli/dist-server/types/node/multitask/coordinator-interceptor.d.ts +0 -7
  118. package/cli/dist-server/types/node/multitask/coordinator-tool-policy.d.ts +0 -18
  119. package/cli/dist-server/types/node/multitask/delegation-planner.d.ts +0 -6
  120. package/cli/dist-server/types/node/multitask/entry-guard.d.ts +0 -12
  121. package/cli/dist-server/types/node/multitask/host-api.d.ts +0 -63
  122. package/cli/dist-server/types/node/multitask/inspect-self-tool.d.ts +0 -18
  123. package/cli/dist-server/types/node/multitask/multitask-log.d.ts +0 -2
  124. package/cli/dist-server/types/node/multitask/multitask-metrics.d.ts +0 -2
  125. package/cli/dist-server/types/node/multitask/planner-runtime.d.ts +0 -7
  126. package/cli/dist-server/types/node/multitask/sandbox-reveal.d.ts +0 -35
  127. package/cli/dist-server/types/node/multitask/self-model.d.ts +0 -7
  128. package/cli/dist-server/types/node/multitask/slash-entry.d.ts +0 -14
  129. package/cli/dist-server/types/node/multitask/spawn-detached.d.ts +0 -9
  130. package/cli/dist-server/types/node/multitask/subagent-alias.d.ts +0 -5
  131. package/cli/dist-server/types/node/multitask/surface-reminder.d.ts +0 -5
  132. package/cli/dist-server/types/node/multitask/types.d.ts +0 -123
  133. package/cli/dist-server/types/node/multitask/wakeup-gate.d.ts +0 -21
  134. package/cli/dist-server/types/node/navigation/index.d.ts +0 -2
  135. package/cli/dist-server/types/node/runtime/add-dir-middleware.d.ts +0 -13
  136. package/cli/dist-server/types/node/runtime/external-uri-opener.d.ts +0 -8
  137. package/cli/dist-server/types/node/runtime/file-local-storage.d.ts +0 -17
  138. package/cli/dist-server/types/node/runtime/workspace-folder-manager.d.ts +0 -45
  139. package/cli/dist-server/types/node/runtime/workspace.d.ts +0 -5
  140. package/cli/dist-server/types/node/sandbox-cli/network-block-records.d.ts +0 -18
  141. package/cli/dist-server/types/node/shortcut/shortcut-protocol.d.ts +0 -41
  142. package/cli/dist-server/types/node/stats/index.d.ts +0 -5
  143. package/cli/dist-server/types/node/tools/a2a-cancel-task-tool.d.ts +0 -55
  144. package/cli/dist-server/types/node/tools/a2a-get-agent-card-tool.d.ts +0 -59
  145. package/cli/dist-server/types/node/tools/a2a-get-task-tool.d.ts +0 -316
  146. package/cli/dist-server/types/node/tools/a2a-poll-retry.d.ts +0 -46
  147. package/cli/dist-server/types/node/tools/a2a-send-message-tool.d.ts +0 -138
  148. package/cli/dist-server/types/node/tools/a2a-tool-guards.d.ts +0 -48
  149. package/cli/dist-server/types/node/tools/agent-tool.d.ts +0 -154
  150. package/cli/dist-server/types/node/tools/artifact-common.d.ts +0 -80
  151. package/cli/dist-server/types/node/tools/artifact-control-tool.d.ts +0 -103
  152. package/cli/dist-server/types/node/tools/artifact-tool.d.ts +0 -109
  153. package/cli/dist-server/types/node/tools/ask-user-for-structured-input-tool.d.ts +0 -127
  154. package/cli/dist-server/types/node/tools/ask-user-question-tool.d.ts +0 -237
  155. package/cli/dist-server/types/node/tools/ask-user-question-validation.d.ts +0 -22
  156. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-critique-client.d.ts +0 -51
  157. package/cli/dist-server/types/node/tools/auto-mode/auto-mode-strategy.d.ts +0 -21
  158. package/cli/dist-server/types/node/tools/auto-mode/index.d.ts +0 -15
  159. package/cli/dist-server/types/node/tools/background-output-files.d.ts +0 -39
  160. package/cli/dist-server/types/node/tools/background-output-tail-poller.d.ts +0 -60
  161. package/cli/dist-server/types/node/tools/bash-output-tool.d.ts +0 -34
  162. package/cli/dist-server/types/node/tools/bash-sandbox-approval-requester.d.ts +0 -48
  163. package/cli/dist-server/types/node/tools/bash-security-windows.d.ts +0 -34
  164. package/cli/dist-server/types/node/tools/bash-tool.d.ts +0 -204
  165. package/cli/dist-server/types/node/tools/channel-tasks-tool.d.ts +0 -174
  166. package/cli/dist-server/types/node/tools/computer-use-capabilities.d.ts +0 -23
  167. package/cli/dist-server/types/node/tools/computer-use-executor.d.ts +0 -130
  168. package/cli/dist-server/types/node/tools/computer-use-tool.d.ts +0 -86
  169. package/cli/dist-server/types/node/tools/create-channel-tool.d.ts +0 -82
  170. package/cli/dist-server/types/node/tools/create-colleague-tool.d.ts +0 -64
  171. package/cli/dist-server/types/node/tools/create-mode-write-guard.d.ts +0 -3
  172. package/cli/dist-server/types/node/tools/cron-create-tool.d.ts +0 -41
  173. package/cli/dist-server/types/node/tools/cron-delete-tool.d.ts +0 -28
  174. package/cli/dist-server/types/node/tools/cron-list-tool.d.ts +0 -27
  175. package/cli/dist-server/types/node/tools/defer-execute-tool.d.ts +0 -260
  176. package/cli/dist-server/types/node/tools/delegate-tool.d.ts +0 -71
  177. package/cli/dist-server/types/node/tools/edit-tool.d.ts +0 -78
  178. package/cli/dist-server/types/node/tools/enter-planmode-tool.d.ts +0 -29
  179. package/cli/dist-server/types/node/tools/enter-worktree-tool.d.ts +0 -59
  180. package/cli/dist-server/types/node/tools/exit-planmode-tool.d.ts +0 -86
  181. package/cli/dist-server/types/node/tools/file-action-report-utils.d.ts +0 -35
  182. package/cli/dist-server/types/node/tools/glob-tool.d.ts +0 -102
  183. package/cli/dist-server/types/node/tools/grep-tool.d.ts +0 -141
  184. package/cli/dist-server/types/node/tools/image-edit-tool.d.ts +0 -94
  185. package/cli/dist-server/types/node/tools/image-gen-tool.d.ts +0 -107
  186. package/cli/dist-server/types/node/tools/kill-shell-tool.d.ts +0 -27
  187. package/cli/dist-server/types/node/tools/leave-worktree-tool.d.ts +0 -54
  188. package/cli/dist-server/types/node/tools/list-colleagues-tool.d.ts +0 -35
  189. package/cli/dist-server/types/node/tools/list-mcp-resources-tool.d.ts +0 -58
  190. package/cli/dist-server/types/node/tools/lsp-tool.d.ts +0 -68
  191. package/cli/dist-server/types/node/tools/main-agent-meta-tools.d.ts +0 -107
  192. package/cli/dist-server/types/node/tools/malicious-block-guidance.d.ts +0 -11
  193. package/cli/dist-server/types/node/tools/memory-tool.d.ts +0 -33
  194. package/cli/dist-server/types/node/tools/message-colleague-tool.d.ts +0 -79
  195. package/cli/dist-server/types/node/tools/monitor-tool.d.ts +0 -216
  196. package/cli/dist-server/types/node/tools/monitor-ws-network-policy.d.ts +0 -64
  197. package/cli/dist-server/types/node/tools/monitor-ws-source.d.ts +0 -72
  198. package/cli/dist-server/types/node/tools/multi-edit-tool.d.ts +0 -104
  199. package/cli/dist-server/types/node/tools/notebook-edit-tool.d.ts +0 -75
  200. package/cli/dist-server/types/node/tools/notebook-read-tool.d.ts +0 -55
  201. package/cli/dist-server/types/node/tools/notebook-write-tool.d.ts +0 -7
  202. package/cli/dist-server/types/node/tools/powershell-clm-types.d.ts +0 -30
  203. package/cli/dist-server/types/node/tools/powershell-command-semantics.d.ts +0 -23
  204. package/cli/dist-server/types/node/tools/powershell-dangerous-cmdlets.d.ts +0 -72
  205. package/cli/dist-server/types/node/tools/powershell-destructive-warning.d.ts +0 -12
  206. package/cli/dist-server/types/node/tools/powershell-detection.d.ts +0 -51
  207. package/cli/dist-server/types/node/tools/powershell-git-safety.d.ts +0 -60
  208. package/cli/dist-server/types/node/tools/powershell-pty-utils.d.ts +0 -13
  209. package/cli/dist-server/types/node/tools/powershell-security.d.ts +0 -93
  210. package/cli/dist-server/types/node/tools/powershell-tool.d.ts +0 -174
  211. package/cli/dist-server/types/node/tools/product-interaction-tools.d.ts +0 -23
  212. package/cli/dist-server/types/node/tools/push-notification-tool.d.ts +0 -55
  213. package/cli/dist-server/types/node/tools/read-mcp-resource-tool.d.ts +0 -71
  214. package/cli/dist-server/types/node/tools/read-state-guard.d.ts +0 -22
  215. package/cli/dist-server/types/node/tools/read-tool.d.ts +0 -71
  216. package/cli/dist-server/types/node/tools/repl/index.d.ts +0 -10
  217. package/cli/dist-server/types/node/tools/repl/repl-bridge-broker.d.ts +0 -109
  218. package/cli/dist-server/types/node/tools/repl/repl-bridge-host.d.ts +0 -29
  219. package/cli/dist-server/types/node/tools/repl/repl-catalog-protocol.d.ts +0 -136
  220. package/cli/dist-server/types/node/tools/repl/repl-catalog-render.d.ts +0 -56
  221. package/cli/dist-server/types/node/tools/repl/repl-catalog-source.d.ts +0 -117
  222. package/cli/dist-server/types/node/tools/repl/repl-import-rewrite.d.ts +0 -17
  223. package/cli/dist-server/types/node/tools/repl/repl-nested-interaction.d.ts +0 -32
  224. package/cli/dist-server/types/node/tools/repl/repl-sandbox-result.d.ts +0 -111
  225. package/cli/dist-server/types/node/tools/repl/repl-tool.d.ts +0 -128
  226. package/cli/dist-server/types/node/tools/repl/repl-worker-manager.d.ts +0 -95
  227. package/cli/dist-server/types/node/tools/repl/repl-worker-source.d.ts +0 -16
  228. package/cli/dist-server/types/node/tools/repl/repl-worker-source.generated.d.ts +0 -2
  229. package/cli/dist-server/types/node/tools/report-findings-tool.d.ts +0 -97
  230. package/cli/dist-server/types/node/tools/running-background-tasks.d.ts +0 -26
  231. package/cli/dist-server/types/node/tools/sandbox-approval-helpers.d.ts +0 -19
  232. package/cli/dist-server/types/node/tools/sandbox-intercept-message.d.ts +0 -22
  233. package/cli/dist-server/types/node/tools/sandbox-network-intercept-message.d.ts +0 -25
  234. package/cli/dist-server/types/node/tools/sandbox-permission-file-tool.d.ts +0 -14
  235. package/cli/dist-server/types/node/tools/sandbox-program-blacklist-message.d.ts +0 -9
  236. package/cli/dist-server/types/node/tools/send-message-tool.d.ts +0 -116
  237. package/cli/dist-server/types/node/tools/send-user-message-attachments.d.ts +0 -22
  238. package/cli/dist-server/types/node/tools/send-user-message-tool.d.ts +0 -60
  239. package/cli/dist-server/types/node/tools/shell-stream-pusher.d.ts +0 -25
  240. package/cli/dist-server/types/node/tools/skill-manage-tool.d.ts +0 -77
  241. package/cli/dist-server/types/node/tools/skill-tool.d.ts +0 -129
  242. package/cli/dist-server/types/node/tools/slash-command-tool.d.ts +0 -45
  243. package/cli/dist-server/types/node/tools/speak-in-channel-tool.d.ts +0 -178
  244. package/cli/dist-server/types/node/tools/structured-output-tool.d.ts +0 -43
  245. package/cli/dist-server/types/node/tools/task-create-tool.d.ts +0 -72
  246. package/cli/dist-server/types/node/tools/task-get-tool.d.ts +0 -31
  247. package/cli/dist-server/types/node/tools/task-list-tool.d.ts +0 -21
  248. package/cli/dist-server/types/node/tools/task-output-tool.d.ts +0 -127
  249. package/cli/dist-server/types/node/tools/task-stop-tool.d.ts +0 -61
  250. package/cli/dist-server/types/node/tools/task-update-tool.d.ts +0 -79
  251. package/cli/dist-server/types/node/tools/team-delete-tool.d.ts +0 -38
  252. package/cli/dist-server/types/node/tools/todo-write-tool.d.ts +0 -117
  253. package/cli/dist-server/types/node/tools/tool-permission-strategy.d.ts +0 -83
  254. package/cli/dist-server/types/node/tools/tool-search-tool.d.ts +0 -113
  255. package/cli/dist-server/types/node/tools/video-gen-tool.d.ts +0 -82
  256. package/cli/dist-server/types/node/tools/wait-for-mcp-servers-tool.d.ts +0 -79
  257. package/cli/dist-server/types/node/tools/web-fetch-tool.d.ts +0 -164
  258. package/cli/dist-server/types/node/tools/web-search-tool.d.ts +0 -79
  259. package/cli/dist-server/types/node/tools/webfetch-resource-kind.d.ts +0 -25
  260. package/cli/dist-server/types/node/tools/wechat-reply-tool.d.ts +0 -43
  261. package/cli/dist-server/types/node/tools/wecom-reply-tool.d.ts +0 -65
  262. package/cli/dist-server/types/node/tools/workflow-tool.d.ts +0 -100
  263. package/cli/dist-server/types/node/tools/write-tool.d.ts +0 -74
  264. package/cli/dist-server/types/node/utils/stdio-persistence.d.ts +0 -39
@@ -1,36 +0,0 @@
1
- import { Application, ApplicationLifecycle } from '@celljs/core';
2
- import type { Session } from '../../vendor/cbc-core/node/index.js';
3
- import { type AgentTask } from '../agent-task/agent-task-protocol';
4
- export declare const MultitaskCompletionBus: unique symbol;
5
- /** @deprecated use MultitaskCompletionBus */
6
- /** @internal 未接线 — 仅保留原文档用名,生产请用 MultitaskCompletionBus */
7
- export declare const CompletionBus: symbol;
8
- export type TaskTerminalKind = 'completed' | 'failed' | 'cancelled' | 'killed';
9
- /** 必须裸 `<task-notification>`;kind 放子节点。带属性会被现网 isSystemInjected 漏掉。 */
10
- export declare function buildAgentTaskNotificationXml(task: {
11
- id?: string;
12
- status?: string;
13
- result?: string;
14
- error?: string;
15
- }, status: string): string;
16
- export declare function handleMultitaskTaskTerminal(opts: {
17
- task: Pick<AgentTask, 'id' | 'status' | 'error' | 'sessionId'> & {
18
- resume?: unknown;
19
- getMainSession?: () => Session | undefined;
20
- result?: string;
21
- };
22
- kind: TaskTerminalKind;
23
- notifyEvent: (session: Session, xml: string) => void;
24
- }): void;
25
- /** 必须同时绑 ApplicationLifecycle,否则 IoC 不实例化、终态订不上。 */
26
- export declare class MultitaskCompletionBusImpl implements ApplicationLifecycle<Application> {
27
- private bound;
28
- protected start(): void;
29
- onStart(): Promise<void>;
30
- private safeBind;
31
- private bind;
32
- private onTerminal;
33
- }
34
- /** @deprecated name kept for the original spec wording */
35
- /** @internal 未接线 — 仅保留原文档用名,生产请用 MultitaskCompletionBusImpl */
36
- export declare const CompletionBusImpl: typeof MultitaskCompletionBusImpl;
@@ -1,41 +0,0 @@
1
- import { type AgentTask } from '../agent-task/agent-task-protocol';
2
- import type { MultitaskSessionRef } from './types';
3
- export interface CoordinatorAcpBridgeHandle {
4
- detach(): void;
5
- }
6
- export interface CoordinatorAcpBridgeArgs {
7
- task: AgentTask;
8
- /** 协调器(父)会话。 */
9
- parentSession: MultitaskSessionRef;
10
- /** 协调器那次 Agent 工具调用的 callId,即 Web / WorkBuddy 上那张 Agent 卡。 */
11
- parentToolUseId?: string;
12
- /** Detached worker 的展示名;不赋予 Team member 语义。 */
13
- displayName?: string;
14
- }
15
- /**
16
- * 多任务协调器 detached worker 的 ACP 桥。
17
- *
18
- * 为什么存在:detached worker 的 AgentTask 协议故意不把 combineSubject / model / phase
19
- * 转发到父会话(Team 与普通 run_in_background Agent 都依赖这个语义,不能动);而父会话
20
- * 的 ACP 转发(createEventForwardingPromise)随 prompt 结束退订。于是 Web / WorkBuddy
21
- * 只能看到一张秒结束的 Agent 卡,看不到 worker 的任何动作。
22
- *
23
- * 桥的做法(全部发生在 multitask 层,不改通用 detached / ACP 语义):
24
- * 1. 挂上时机:spawnDetachedNoTeam 在 task.init + register 之后调用本函数。
25
- * 2. attach 时同步合成一张标准 Agent 卡(tool_call):协调器在 REPL 沙箱里调 Agent,
26
- * 沙箱的 tool_call 帧不会落到父会话,Web 侧本来没有这张卡。合成帧复用
27
- * convertInputItemToAcp(run_in_background: true 推出 isBackground),
28
- * 不传 parentToolUseId,因此它是顶层卡、不带 parentToolCallId meta。
29
- * 3. worker session 在 execute() 的 setupPhase 才创建,靠 onMultitaskWorkerSession
30
- * (markWorkerSession 触发)在创建的同一调用栈里订它的 combineSubject。
31
- * 4. 事件转成 ACP update 后直发父会话当前绑定的所有连接(含发起方),
32
- * sessionId 用父会话 id + _meta parentToolCallId 嵌套到那张 Agent 卡下。
33
- * 5. 每条 worker `tool_call` 发出后必须 `notifyToolCallSent`(与 AcpTeamBridge 同款)。
34
- * handleToolApproval 会等 toolCallSentDeferreds;父 combineSubject 收不到 detached
35
- * 帧,不通知的话 AskUserQuestion 的 requestPermission 永远发不出去,卡片上只剩
36
- * 「[已跳过]」,后续主会话自己再问也会被 AskService 单例盖掉。
37
- * 6. worker 到终态时补一帧该卡的 tool_call_update(completed / failed + 结果摘要),
38
- * 然后拆订阅;订阅跟 worker 生命周期,不跟父会话 prompt——父会话 end_turn 后照常发。
39
- * 7. 绝不写父会话任何 subject:父会话 phase / runState 保持 idle。
40
- */
41
- export declare function attachCoordinatorAcpBridge(args: CoordinatorAcpBridgeArgs): CoordinatorAcpBridgeHandle;
@@ -1,7 +0,0 @@
1
- import { AgentRunInterceptor, type AgentRunRequest } from '../../vendor/cbc-core/node/index.js';
2
- /** 最后一条用户消息的正文。唤醒 / isMeta 不算新用户话,避免覆盖 planner follow-up。 */
3
- export declare function extractUserText(input: unknown): string;
4
- export declare class MultitaskCoordinatorInterceptor implements AgentRunInterceptor {
5
- priority: number;
6
- intercept(request: AgentRunRequest): Promise<void>;
7
- }
@@ -1,18 +0,0 @@
1
- import { type ToolResult } from '../tools/tool-protocol';
2
- import { type MultitaskSessionRef } from './types';
3
- export declare const COORDINATOR_TOOL_ALLOWLIST_NAMES: readonly ["Agent", "TaskOutput", "TaskStop", "InterruptAgent", "ListAgents", "InspectSelf", "AskUserQuestion", "SendUserMessage", "Grep", "Read"];
4
- export declare function noteCoordinatorBatchTool(session: object | undefined, toolName: string): void;
5
- /** planner 在 gate 之前 note 之后调用,避免 pending=0 时下一发 gate 拆掉本轮 Agent。 */
6
- export declare function holdCoordinatorToolBatch(session?: object): void;
7
- export declare function getCoordinatorBatchTools(session?: object): ReadonlySet<string>;
8
- /** 每轮协调器 run 开头换新集合,并绑定到当前异步链,避免重叠 run 串批。 */
9
- export declare function beginCoordinatorToolBatch(session?: object): void;
10
- /** 轮次开头:已有 in-flight gate 时不拆掉当前波。 */
11
- export declare function beginCoordinatorToolBatchIfIdle(session?: object): void;
12
- export declare function resetCoordinatorBatchToolsForTests(): void;
13
- /** 同波探测:Grep/Read 仅本 run 无 Agent 才放行;批次由下一 run 显式重置。 */
14
- export declare function gateCoordinatorTool(session: MultitaskSessionRef | null | undefined, toolName: string, callId?: string): Promise<ToolResult | null>;
15
- /** 非协调器/白名单 → null。Grep/Read 须本波已探测且无 Agent。禁止 throw。 */
16
- export declare function evaluateCoordinatorTool(session: MultitaskSessionRef | null | undefined, toolName: string, callId?: string): ToolResult | null;
17
- /** 协调器派工/进度要对用户可见。TaskStop 仍藏。 */
18
- export declare function shouldRevealCoordinatorToolCall(toolName: string): boolean;
@@ -1,6 +0,0 @@
1
- import type { PlannerDecision } from './types';
2
- /** 生产路径由 coordinator-interceptor 调用。 */
3
- export declare function decide(input: {
4
- userText?: string;
5
- liveTaskIds?: readonly string[];
6
- }): PlannerDecision;
@@ -1,12 +0,0 @@
1
- import { type MultitaskProcessGuardOpts } from './types';
2
- export declare class MultitaskProcessNotAllowedError extends Error {
3
- readonly reason: 'print' | 'non-tty' | 'stream-json' | 'disable-background' | 'acp';
4
- constructor(reason: MultitaskProcessNotAllowedError['reason'], detail: string);
5
- }
6
- /** `--multitask` 归一成 `--agent multitask`。显式 flag 优先于其它 --agent。 */
7
- export declare function normalizeMultitaskCliAgent(opts: {
8
- agent?: unknown;
9
- multitask?: unknown;
10
- }): string | undefined;
11
- /** agent 名为 multitask 时检查。失败 throw,不 process.exit。 */
12
- export declare function assertMultitaskProcessAllowed(opts?: MultitaskProcessGuardOpts): void;
@@ -1,63 +0,0 @@
1
- import { ACP_META_UNSOLICITED_TURN, ACP_METHOD_SESSION_SET_MULTITASK, buildSetMultitaskParams, buildUnsolicitedTurnUpdate, isMultitaskSupportAdvertised, readUnsolicitedTurn, type SetMultitaskRequest, type SetMultitaskResponse, type UnsolicitedTurnAnnouncement } from '@genie/agent-client-protocol';
2
- import { type EnterMultitaskResult } from './slash-entry';
3
- import type { MultitaskSessionRef } from './types';
4
- export { ACP_META_UNSOLICITED_TURN, ACP_METHOD_SESSION_SET_MULTITASK, buildSetMultitaskParams, buildUnsolicitedTurnUpdate, isMultitaskSupportAdvertised, readUnsolicitedTurn, };
5
- export type { SetMultitaskRequest, SetMultitaskResponse, UnsolicitedTurnAnnouncement };
6
- /** initialize.agentCapabilities 上的能力位。与 mainAgentSupport 独立。 */
7
- export declare const MULTITASK_ACP_CAPABILITY_KEY: 'multitaskSupport';
8
- /** 标准 ACP configOptions / session/set_config_option 使用的配置 ID。 */
9
- export declare const MULTITASK_CONFIG_OPTION_ID: 'multitask';
10
- export interface MultitaskConfigOption {
11
- type: 'boolean';
12
- id: typeof MULTITASK_CONFIG_OPTION_ID;
13
- name: string;
14
- description: string;
15
- category: '_codebuddy.ai/multitask';
16
- currentValue: boolean;
17
- }
18
- export declare function resolveMultitaskAcpSupport(): boolean;
19
- /** 标准 ACP 客户端可直接从 configOptions 发现并渲染 Multitask 开关。 */
20
- export declare function buildMultitaskConfigOption(session: MultitaskSessionRef | null | undefined): MultitaskConfigOption | undefined;
21
- export interface SetMultitaskLivePeer<T> {
22
- getCurrentSession?: () => T | undefined;
23
- getCurrentSessionId?: () => string | undefined;
24
- }
25
- export interface SetMultitaskLiveLookup<T extends {
26
- id?: string;
27
- }> {
28
- current?: T | null;
29
- alsCurrent?: T | null;
30
- subject?: T | null;
31
- peers?: Iterable<SetMultitaskLivePeer<T>>;
32
- }
33
- export type SetMultitaskLiveHit<T> = {
34
- kind: 'live';
35
- session: T;
36
- } | {
37
- kind: 'unbound';
38
- } | {
39
- kind: 'idle';
40
- };
41
- /** 盖章必须打在活对象上。get() 是磁盘副本,打上去 RPC 仍 ok、运行中协调器不变。 */
42
- export declare function findLiveSetMultitaskSession<T extends {
43
- id?: string;
44
- }>(sessionId: string, lookup: SetMultitaskLiveLookup<T>): SetMultitaskLiveHit<T>;
45
- /** 只比 acpConnectionId。调用方缺 id fail-closed;会话无 owner 时已识别连接可认领。 */
46
- export declare function isMultitaskSessionOwnedByConnection(session: {
47
- meta?: Record<string, unknown>;
48
- } | null | undefined, connectionId?: string): boolean;
49
- /** enabled true/false/省略 = 进入/退出/toggle。非空白也可进。 */
50
- export declare function applyMultitaskFromAcp(session: MultitaskSessionRef | null | undefined, enabled?: unknown): EnterMultitaskResult;
51
- export declare function toSetMultitaskResponse(result: EnterMultitaskResult, session?: MultitaskSessionRef | null): SetMultitaskResponse;
52
- /** 标准 ACP 写入:session/set_config_option + id=multitask + JSON boolean。 */
53
- export declare function buildSetMultitaskConfigOptionParams(sessionId: string, enabled: boolean): {
54
- sessionId: string;
55
- configId: typeof MULTITASK_CONFIG_OPTION_ID;
56
- type: 'boolean';
57
- value: boolean;
58
- };
59
- export declare function readMultitaskConfigCurrentValue(configOptions: Array<{
60
- id?: unknown;
61
- type?: unknown;
62
- currentValue?: unknown;
63
- }> | null | undefined): boolean | undefined;
@@ -1,18 +0,0 @@
1
- import type { Session } from '../../vendor/cbc-core/node/index.js';
2
- import { ToolNames } from '../../vendor/cbc-shared/node/index.js';
3
- import type { RunContext } from '@openai/agents';
4
- import { z } from 'zod';
5
- import { BaseTool } from '../tools/base-tool';
6
- import { Tool, type ToolResult } from '../tools/tool-protocol';
7
- import type { SelfSnapshot } from './types';
8
- declare const InspectSelfParameters: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
9
- /** TUI 折叠行:不把整份 JSON 摊开。tools[] / notes 只留在 content 给模型。 */
10
- export declare function formatInspectSelfTitle(snap: SelfSnapshot): string;
11
- export declare class InspectSelfTool extends BaseTool implements Tool {
12
- name: ToolNames;
13
- description: string;
14
- parameters: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
15
- needsApproval: boolean;
16
- execute(_input: z.infer<typeof InspectSelfParameters>, context?: RunContext<Session>): Promise<ToolResult>;
17
- }
18
- export {};
@@ -1,2 +0,0 @@
1
- /** fail-open:日志失败不得拖垮默认 CLI。 */
2
- export declare function warnMultitask(message: string, error?: unknown): void;
@@ -1,2 +0,0 @@
1
- /** fail-open:指标失败不得拖垮默认 CLI。 */
2
- export declare function countMultitask(metric: string, dimensions?: Record<string, string>): void;
@@ -1,7 +0,0 @@
1
- import { type MultitaskSessionRef, type PlannerDecision, type PlannerSpawnSibling, type SelfSnapshot } from './types';
2
- export declare function autoSpawnJobs(decision: PlannerDecision): PlannerSpawnSibling[];
3
- /** reminder 只认 snapshot.liveWorkers,禁止按 plan 形状谎称已拉起。 */
4
- export declare function coordinatorPlanReminder(snapshot: SelfSnapshot): string;
5
- export declare function applyPlannerDecision(session: MultitaskSessionRef & {
6
- id?: string;
7
- }, userText: string): Promise<PlannerDecision>;
@@ -1,35 +0,0 @@
1
- import type { FunctionCallItem } from '../../vendor/cbc-shared/node/index.js';
2
- import { type ToolResult } from '../tools/tool-protocol';
3
- import type { MultitaskSessionRef } from './types';
4
- /** 沙箱揭示只需盖章面 + combineSubject,单测不必拉齐完整 Session。 */
5
- export type SandboxRevealSession = MultitaskSessionRef & {
6
- combineSubject?: {
7
- next(event: unknown): void;
8
- };
9
- };
10
- /** REPL 沙箱里只有 Agent 提成对话层卡片。 */
11
- export declare function shouldRevealSandboxCoordinatorTool(session: SandboxRevealSession | undefined, toolName: string): boolean;
12
- export declare function createSandboxAgentToolCall(params: Record<string, unknown>): FunctionCallItem;
13
- /** 把 REPL 里的 Agent() 推到 combineSubject;不落 history。 */
14
- export declare function revealSandboxCoordinatorTool(session: SandboxRevealSession | undefined, item: FunctionCallItem | {
15
- type: 'function_call_result';
16
- callId: string;
17
- name: string;
18
- output: {
19
- type: 'text';
20
- text: string;
21
- };
22
- providerData?: {
23
- toolResult?: ToolResult;
24
- };
25
- }): void;
26
- export declare function revealSandboxAgentResult(session: SandboxRevealSession | undefined, callId: string, result: ToolResult): void;
27
- /** REPL 内层工具统一携带 synthetic callId;仅 Agent() 额外投影对话卡片。 */
28
- export declare function routeCoordinatorSandboxTool(opts: {
29
- session: SandboxRevealSession | undefined;
30
- toolName: string;
31
- params: Record<string, unknown>;
32
- route: (details?: {
33
- toolCall: FunctionCallItem;
34
- }) => Promise<ToolResult>;
35
- }): Promise<ToolResult>;
@@ -1,7 +0,0 @@
1
- import { type MultitaskSessionRef, type PlannerDecision, type SelfSnapshot } from './types';
2
- export declare const SelfModel: {
3
- snapshot(session?: MultitaskSessionRef | null): SelfSnapshot;
4
- };
5
- export declare function readLastPlan(session?: MultitaskSessionRef | null): PlannerDecision | undefined;
6
- export declare function writeLastPlan(session: MultitaskSessionRef, plan: PlannerDecision, turnKey: string): void;
7
- export declare function readLastPlanTurn(session?: MultitaskSessionRef | null): string | undefined;
@@ -1,14 +0,0 @@
1
- import { type MultitaskSessionRef } from './types';
2
- export interface EnterMultitaskResult {
3
- ok: boolean;
4
- already: boolean;
5
- /** 切换后是否处于协调器。enter 永远 true(失败除外);toggle 可 false。 */
6
- on: boolean;
7
- message: string;
8
- }
9
- export declare const MINIMAL_MULTITASK_BLOCKED = "Multitask is not available in Minimal. Switch to Standard, PTC, or Creator first.";
10
- /** 会话内 `/multitask` 立刻盖章。非空白也可进。 */
11
- export declare function enterMultitaskFromSlash(session: MultitaskSessionRef | null | undefined): EnterMultitaskResult;
12
- export declare function leaveMultitaskFromSlash(session: MultitaskSessionRef | null | undefined): EnterMultitaskResult;
13
- /** `/multitask` 开关:已在协调器则关掉 overlay,站立 mode 不动。 */
14
- export declare function toggleMultitaskFromSlash(session: MultitaskSessionRef | null | undefined): EnterMultitaskResult;
@@ -1,9 +0,0 @@
1
- import { type ToolResult } from '../tools/tool-protocol';
2
- import { shouldDetachCoordinatorSpawn } from './session-flags';
3
- import type { PreparedCoordinatorSpawn, SpawnDetachedContext, SpawnDetachedInput } from './types';
4
- export { shouldDetachCoordinatorSpawn };
5
- /** Agent catalog 读取或取消挂死会堵住同会话派工链。 */
6
- export declare const SPAWN_OPERATION_TIMEOUT_MS = 8000;
7
- export declare function prepareCoordinatorSpawn(session: SpawnDetachedContext['session'], input: SpawnDetachedInput): PreparedCoordinatorSpawn;
8
- /** detached spawn。失败必须 return ToolResult,禁止 throw(同批 Promise.all)。 */
9
- export declare function spawnDetachedNoTeam(ctx: SpawnDetachedContext): Promise<ToolResult>;
@@ -1,5 +0,0 @@
1
- export declare class IllegalMultitaskSubagentTypeError extends Error {
2
- constructor(raw: string);
3
- }
4
- /** Preserve exact live-catalog names; only the empty default and fork safety gate are special. */
5
- export declare function normalizeSubagentType(raw?: string | null): string;
@@ -1,5 +0,0 @@
1
- import { type MultitaskSessionRef } from './types';
2
- export declare const MULTITASK_SURFACE_REMINDER_ROLE = "multitask-surface";
3
- export declare function formatOverlayOffSurfaceReminder(session: MultitaskSessionRef): string;
4
- /** 本会话开过 overlay、现在已关:下一轮要热注入站立工具面,否则模型跟着历史里的协调器目录答。 */
5
- export declare function shouldInjectOverlayOffSurface(session?: MultitaskSessionRef | null): boolean;
@@ -1,123 +0,0 @@
1
- import type { ToolResult } from '../tools/tool-protocol';
2
- export declare const MULTITASK_MODE_NAME = "multitask";
3
- /** 必须与 `MAIN_AGENT_META_KEY` 同字面量,本模块不反向 import main-agent-session。 */
4
- export declare const MULTITASK_STANDING_META_KEY = "codebuddy.ai/mainAgent";
5
- export declare const MULTITASK_MODE_META_KEY = "multitaskMode";
6
- export declare const MULTITASK_ROLE_META_KEY = "multitaskRole";
7
- export declare const MULTITASK_ACTIVE_TASK_IDS_KEY = "multitaskActiveTaskIds";
8
- /** 旧会话站立键曾写成 `multitask` 时,用来迁回进 overlay 前的 mode。新盖章不再写。 */
9
- export declare const MULTITASK_PREVIOUS_AGENT_KEY = "multitaskPreviousAgent";
10
- export declare const MULTITASK_SCOPE_BY_TASK_KEY = "multitaskWorkerScopeByTaskId";
11
- export declare const MULTITASK_TASK_STORAGE_ID_KEY = "multitaskTaskStorageId";
12
- export declare const MULTITASK_LAST_PLAN_KEY = "multitaskLastPlan";
13
- export declare const MULTITASK_LAST_PLAN_TURN_KEY = "multitaskLastPlanTurn";
14
- /** 每次真正打开/关掉 overlay 加一。关了之后每轮靠它决定要不要热注入站立工具面。 */
15
- export declare const MULTITASK_SURFACE_EPOCH_KEY = "multitaskSurfaceEpoch";
16
- export declare const MULTITASK_DELEGATED_FORBIDDEN = "delegated_work_forbidden";
17
- /** 同批探测通过后才放行。不在 shipped 白名单里单独开;策略按 batch 判定。 */
18
- export declare const MULTITASK_COORDINATOR_READONLY_TOOL_NAMES: readonly ['Grep', 'Read'];
19
- /** Overlay 打开时的热注入首句。拦截器 / notes / InspectSelf 共用,不作废历史。 */
20
- export declare const OVERLAY_ON_SURFACE_LEAD: string;
21
- /** 派工后:别空转等完成;用户问进度时必须读一次中途输出。 */
22
- export declare const COORDINATOR_WAIT_FOR_NOTIFICATION: string;
23
- /** 通知后:TaskOutput 就是用来读全文的。`<summary>` 只有 240 字标题。 */
24
- export declare const COORDINATOR_READ_REPORT_THEN_SYNTHESIZE: string;
25
- /** Code Mode overlay:对话层没有 TaskOutput,必须在 REPL 里 await 一次。 */
26
- export declare const COORDINATOR_READ_REPORT_IN_REPL: string;
27
- /** 每轮 reminder / InspectSelf / snapshot 共用,避免三处文案漂移。 */
28
- export declare const COORDINATOR_BEHAVIOR_NOTES: string;
29
- /** 协调器工具白名单。策略拦截与 shipped mode `tools` 共用这一份。 */
30
- export declare const MULTITASK_COORDINATOR_TOOL_NAMES: readonly ['Agent', 'TaskOutput', 'TaskStop', 'InterruptAgent', 'ListAgents', 'InspectSelf', 'AskUserQuestion', 'SendUserMessage', 'Grep', 'Read'];
31
- export type MultitaskCoordinatorToolName = (typeof MULTITASK_COORDINATOR_TOOL_NAMES)[number];
32
- export type MultitaskRole = 'coordinator' | 'worker';
33
- /** 策略 / 盖章用的最小 session 面,避免单测拉齐完整 Session。 */
34
- export interface MultitaskSessionRef {
35
- id?: string;
36
- /** 子代理落盘用 agent-*,反序列化后 role/parent 已丢,靠这个认 worker。 */
37
- storeId?: string;
38
- meta?: Record<string, unknown>;
39
- agentName?: string;
40
- options?: {
41
- permissionMode?: string;
42
- };
43
- permissionModeSubject?: {
44
- next(mode: string): void;
45
- };
46
- }
47
- export interface SpawnDetachedInput {
48
- prompt?: string;
49
- description?: string;
50
- model?: string;
51
- resume?: string;
52
- subagent_type?: string;
53
- name?: string;
54
- max_turns?: number;
55
- run_in_background?: boolean;
56
- scopeKey?: string;
57
- }
58
- export interface SpawnDetachedContext {
59
- session: MultitaskSessionRef & {
60
- id?: string;
61
- };
62
- input: SpawnDetachedInput;
63
- parentToolUseId?: string;
64
- }
65
- export interface PreparedCoordinatorSpawn {
66
- agentType: string;
67
- resume?: string;
68
- /** 目标 worker 仍 pending/running:禁止再 new 一条 execute。 */
69
- alreadyLive?: boolean;
70
- consumeBudget: boolean;
71
- description: string;
72
- prompt: string;
73
- /** Optional display label for this detached worker. It does not create a Team member. */
74
- displayName?: string;
75
- /** Original isolation mode of the worker being resumed. */
76
- historicalAgentIsolation?: 'worktree';
77
- scopeKey?: string;
78
- }
79
- export interface MultitaskProcessGuardOpts {
80
- /** 已归一化的进程 agent 名(`--multitask` 必须先收成 `multitask`)。 */
81
- agentName?: string;
82
- print?: boolean;
83
- streamJson?: boolean;
84
- stdoutIsTTY?: boolean;
85
- stdinIsTTY?: boolean;
86
- acp?: boolean;
87
- serve?: boolean;
88
- backgroundDisabled?: boolean;
89
- }
90
- export interface PlannerSpawnSibling {
91
- subagentType?: string;
92
- scopeKey: string;
93
- hint: string;
94
- }
95
- export type PlannerDecision = {
96
- action: 'answer_inline';
97
- } | {
98
- action: 'spawn';
99
- subagentType: string;
100
- count: number;
101
- scopeKey?: string;
102
- siblings?: PlannerSpawnSibling[];
103
- followUp?: string;
104
- } | {
105
- action: 'resume';
106
- taskId: string;
107
- };
108
- export interface CoordinatorLiveWorker {
109
- id: string;
110
- status: string;
111
- scopeKey?: string;
112
- description?: string;
113
- }
114
- export interface SelfSnapshot {
115
- role: 'coordinator';
116
- tools: readonly string[];
117
- liveWorkers: CoordinatorLiveWorker[];
118
- locks: string[];
119
- plan?: PlannerDecision;
120
- permissionMode?: string;
121
- notes: string;
122
- }
123
- export type CoordinatorToolDecision = ToolResult | null;
@@ -1,21 +0,0 @@
1
- import { isMultitaskCoordinator } from './session-flags';
2
- /** TaskStop / InterruptAgent 在 cancel 前打标:协调器已经看过 ToolResult,不要再 wakeup。 */
3
- export declare function markCoordinatorSelfStop(task: {
4
- id?: string;
5
- sessionId?: string;
6
- resume?: unknown;
7
- }): void;
8
- /** 只有协调器自己停 worker 才打标。Esc / UI 停不走这里,照常 wakeup。 */
9
- export declare function markCoordinatorSelfStopIfNeeded(session: Parameters<typeof isMultitaskCoordinator>[0], task: {
10
- id?: string;
11
- sessionId?: string;
12
- resume?: unknown;
13
- }): void;
14
- /** 终态消费一次。命中则跳过 `<task-notification>`,锁仍由 CompletionBus 清。 */
15
- export declare function takeCoordinatorSelfStop(task: {
16
- id?: string;
17
- sessionId?: string;
18
- resume?: unknown;
19
- }): boolean;
20
- /** @internal */
21
- export declare function resetCoordinatorSelfStopForTests(): void;
@@ -1,2 +0,0 @@
1
- export * from './navigation-protocol';
2
- export * from './navigation-manager';
@@ -1,13 +0,0 @@
1
- import { Context, Middleware } from '@celljs/web/lib/node';
2
- import { ConsoleManager } from '../console';
3
- import { NavigationManager } from '../navigation';
4
- import { WorkspaceFolderManager } from '../runtime';
5
- import { SessionManager } from '../../vendor/cbc-core/node/index.js';
6
- export declare class AddDirMiddleWare implements Middleware {
7
- protected readonly sessionManager: SessionManager;
8
- protected readonly workspaceFolderManager: WorkspaceFolderManager;
9
- protected readonly navigationManager: NavigationManager;
10
- protected readonly consoleManager: ConsoleManager;
11
- handle(ctx: Context, next: () => Promise<void>): Promise<void>;
12
- readonly priority: number;
13
- }
@@ -1,8 +0,0 @@
1
- import { Logger } from '@celljs/core';
2
- import { ExternalUriOpener } from '@genie/runtime';
3
- import { Subject } from 'rxjs';
4
- export declare class CliExternalUriOpener implements ExternalUriOpener {
5
- urlSubject: Subject<string>;
6
- protected readonly logger: Logger;
7
- open(uri: string): Promise<boolean>;
8
- }
@@ -1,17 +0,0 @@
1
- import { FileSystem, LocalStorage, LocalStorageChangeEvent } from '@genie/runtime';
2
- export declare class MemoryLocalStorage implements LocalStorage {
3
- protected readonly fileSystem: FileSystem;
4
- private emitter;
5
- changeEvent: import("@celljs/core").Event<LocalStorageChangeEvent>;
6
- /**
7
- * server 面缺省 no-op(CODEBUDDY_DISABLE_LOCAL_STORAGE=1):消费者全是
8
- * 交互产品面(问卷冷却、输入历史等),pod 上无消费者;写盘还会把多租户
9
- * 状态混进进程全局文件。no-op 而非内存 Map——假共享不如无共享。
10
- */
11
- private get disabled();
12
- set<T>(key: string, value: T): Promise<void>;
13
- getSync<T>(key: string, defaultValue?: T): T | undefined;
14
- get<T>(key: string, defaultValue?: T): Promise<T | undefined>;
15
- remove(key: string): Promise<void>;
16
- private resolveEntryPath;
17
- }
@@ -1,45 +0,0 @@
1
- import { Session, SessionManager } from '../../vendor/cbc-core/node/index.js';
2
- import { SettingsManager, SettingsScope } from '../settings';
3
- export declare const WorkspaceFolderManager: unique symbol;
4
- /**
5
- * 工作目录的落点:
6
- * - 'session':仅当前会话生效,存 session.options.addDir,不落盘
7
- * - SettingsScope:持久化到对应的配置文件(user / project / project-local)
8
- */
9
- type WorkspaceFolderTarget = 'session' | SettingsScope;
10
- export interface WorkspaceFolderManager {
11
- /**
12
- * 添加工作目录
13
- */
14
- addWorkspaceFolder(directory: string, target: WorkspaceFolderTarget): Promise<void>;
15
- /**
16
- * 移除工作目录
17
- */
18
- removeWorkspaceFolder(directory: string, target: WorkspaceFolderTarget): Promise<void>;
19
- /**
20
- * 从所有落点(session + 所有持久化 scope)移除工作目录
21
- */
22
- removeWorkspaceFolderEverywhere(directory: string): Promise<void>;
23
- /**
24
- * 获取所有工作目录
25
- */
26
- getWorkspaceFolders(target?: WorkspaceFolderTarget): Promise<string[]>;
27
- /**
28
- * 判断是否包含工作目录
29
- */
30
- hasWorkspaceFolder(directory: string, target: WorkspaceFolderTarget): Promise<boolean>;
31
- }
32
- export declare class WorkspaceFolderManagerImpl implements WorkspaceFolderManager {
33
- protected readonly sessionManager: SessionManager;
34
- protected readonly settingsManager: SettingsManager;
35
- protected currentSession: Session | undefined;
36
- protected init(): void;
37
- private getScopeDirectories;
38
- private operateWorkspaceFolder;
39
- addWorkspaceFolder(directory: string, target: WorkspaceFolderTarget): Promise<void>;
40
- removeWorkspaceFolder(directory: string, target: WorkspaceFolderTarget): Promise<void>;
41
- removeWorkspaceFolderEverywhere(directory: string): Promise<void>;
42
- getWorkspaceFolders(target?: WorkspaceFolderTarget): Promise<string[]>;
43
- hasWorkspaceFolder(directory: string, target: WorkspaceFolderTarget): Promise<boolean>;
44
- }
45
- export {};
@@ -1,5 +0,0 @@
1
- import { Workspace, WorkspaceFolder } from '@genie/runtime';
2
- export declare class CliWorkspace implements Workspace {
3
- private readonly cwdService;
4
- get workspaceFolders(): readonly WorkspaceFolder[];
5
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * 按域名合并一次工具调用内重复的**恶意域名**拦截记录。
3
- *
4
- * `curl --retry`、脚本轮询等会对同一域名反复发起连接,Rust 侧对每次拦截都追加一条记录。
5
- * 不合并会让安全中心审计和给模型的提示同时刷屏,也不满足设计文档「同一次工具调用内相同
6
- * 域名的重复事件应合并」的要求。
7
- *
8
- * 只合并恶意命中,非恶意记录原样保留:普通网络拦截写几条审计、给模型输出几行,是主干
9
- * 既有行为,本功能不应顺手改掉。相对顺序也保持不变,审计落库顺序与拦截发生顺序一致。
10
- *
11
- * 去重键不含 scheme 与 port:恶意拦截审计本身只展示 origin、不展示 LocalProxy 连接端口,
12
- * 且同域名的后续记录不带新的用户可见信息(风险类型按域名给出)。保留首条记录,威胁标签、
13
- * 命中主域等上下文随之保留。
14
- */
15
- export declare function dedupeMaliciousNetworkBlockRecords<T extends {
16
- host?: string;
17
- reason?: string;
18
- }>(records: readonly T[] | undefined): T[];
@@ -1,41 +0,0 @@
1
- import { Disposable, MaybePromise } from '@celljs/core';
2
- export interface ShortcutHandler {
3
- id: string;
4
- keyCode: string;
5
- handler: () => MaybePromise<void>;
6
- description?: string;
7
- }
8
- export interface ShortcutInfo {
9
- keyCode: string;
10
- description?: string;
11
- }
12
- export declare const ShortcutManager: unique symbol;
13
- export interface ShortcutManager {
14
- register(keyCode: string, handler: () => MaybePromise<void>, description?: string): Disposable;
15
- getShortcuts(): ShortcutInfo[];
16
- /** 分发一个输入序列到匹配的快捷键 handler(由 TUI 的 useShortcutBridge 调用) */
17
- dispatch(sequence: string): void;
18
- }
19
- export declare const TtyInputService: unique symbol;
20
- export interface TtyInputService {
21
- getInputStream(): import('tty').ReadStream | undefined;
22
- dispose(): void;
23
- }
24
- export declare const KEY_CODES: {
25
- readonly CTRL_B: '\u0002';
26
- readonly CTRL_C: '\u0003';
27
- readonly CTRL_D: '\u0004';
28
- readonly CTRL_Z: '\u001A';
29
- readonly CTRL_L: '\f';
30
- readonly CTRL_R: '\u0012';
31
- readonly CTRL_U: '\u0015';
32
- readonly CTRL_K: '\v';
33
- readonly ESC: '\u001B';
34
- readonly TAB: '\t';
35
- readonly ENTER: '\r';
36
- readonly BACKSPACE: '';
37
- readonly ARROW_UP: '\u001B[A';
38
- readonly ARROW_DOWN: '\u001B[B';
39
- readonly ARROW_LEFT: '\u001B[D';
40
- readonly ARROW_RIGHT: '\u001B[C';
41
- };
@@ -1,5 +0,0 @@
1
- export * from './stats-protocol';
2
- export * from './insights-protocol';
3
- export * from './stats-service';
4
- export * from './insights-report-service';
5
- export * from './session-facet-service';