@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,74 +0,0 @@
1
- import { Application, ApplicationLifecycle, Logger } from '@celljs/core';
2
- import { RestOperations } from '@celljs/http';
3
- import { ProductManager } from '@genie/product';
4
- import { HttpProxyAgent } from 'http-proxy-agent';
5
- import { HttpsProxyAgent } from 'https-proxy-agent';
6
- import { ConsoleManager } from '../console';
7
- import { GalileoService } from '../galileo/galileo-protocol';
8
- import { CertificateManager } from './certificate-manager';
9
- /**
10
- * CLI 侧 HTTP 代理拦截器。
11
- *
12
- * 使用 ProxyResolver 按优先级链自治解析代理(配置文件 > env > OS > 直连),
13
- * 不再依赖主进程 spawn 时注入的静态环境变量。
14
- *
15
- * 失败自愈:检测到代理相关错误时清除 OS 缓存重新解析,用新代理重试一次。
16
- */
17
- export declare class HttpProxyInterceptor implements ApplicationLifecycle<Application> {
18
- protected readonly productManager: ProductManager;
19
- protected readonly restOperations: RestOperations;
20
- protected readonly certificateManager: CertificateManager;
21
- protected readonly consoleManager: ConsoleManager;
22
- protected logger: Logger;
23
- protected readonly galileo?: GalileoService;
24
- /** 代理 Agent 缓存,按 proxyUrl + version 做 key */
25
- agentCache: Map<string, {
26
- http?: HttpProxyAgent<string>;
27
- https?: HttpsProxyAgent<string>;
28
- }>;
29
- /**
30
- * 自治式代理解析器。settingsPath 显式注入,确保 WORKBUDDY_CONFIG_DIR 被尊重,
31
- * 不依赖 ProxyResolver 内部默认值(见 ProxyResolver class JSDoc 顶部 invariant)。
32
- *
33
- * #57186:当 daemon 注入 `WORKBUDDY_PAC_RPC_*` env 时(WorkBuddy Desktop 路径),
34
- * 自动启用 L0 PAC 反查 hook,per-request 走 daemon→main 的 Chromium PAC 引擎,
35
- * 完整识别企业 PAC 脚本的 per-URL 决策。env 缺失(独立 cbc CLI / 单测 / headless)
36
- * 时 hook 为 undefined,行为退化为 L1-L4 自治链,向后完全兼容。
37
- */
38
- private proxyResolver;
39
- /**
40
- * keep-alive 参数,对抗中间 LB/NAT 的 TCP idle timeout。
41
- * 背景:2026-04-25 偶发 502 socket hang up。
42
- */
43
- private static readonly KEEP_ALIVE_OPTS;
44
- private defaultHttpsAgent?;
45
- /**
46
- * configuration 变更订阅句柄。当前拦截器为单例、生命周期与进程一致,泄漏风险低;
47
- * 显式持有以便 onStop 注销,避免后续若改为按会话/按窗口实例化时订阅泄漏、
48
- * 在旧实例上重复 disableTlsVerification 打日志(评审 #69542)。
49
- */
50
- private tlsConfigSub?;
51
- private getDefaultHttpsAgent;
52
- private getCABundle;
53
- private getSSLOptions;
54
- /**
55
- * 命中 DisableTlsVerification 时幂等地设置 NODE_TLS_REJECT_UNAUTHORIZED='0'。
56
- * 加 env 守卫,避免在每次 configuration 变更时重复设置与重复打日志。
57
- */
58
- private applyTlsVerificationFromConfig;
59
- /** 进程停止时注销 configuration 订阅,释放 applyTlsVerificationFromConfig 闭包(评审 #69542)。 */
60
- onStop(): void;
61
- private applyConfigFallbackAddress;
62
- initialize(): Promise<void>;
63
- private attachChatAddressLayer;
64
- private replayChatAddress;
65
- private continueChatAddressReplay;
66
- private resolveChatTargetUrl;
67
- private replayChatOrigin;
68
- /** RestOperations 与 ChatAddressConfig 分属两套 Axios 类型,只在发送边界收窄一次。 */
69
- private restRequest;
70
- /** TLS 证书验证失败(代理可达但 CA 不受信) */
71
- private isTlsCertError;
72
- /** 连接级错误(代理不可达) */
73
- private isConnectionError;
74
- }
@@ -1,6 +0,0 @@
1
- export * from './fetch-proxy';
2
- export * from './classify-network-error';
3
- export * from './http-proxy-interceptor';
4
- export * from './certificate-manager';
5
- export * from './custom-headers-provider';
6
- export * from './custom-header-http-interceptor';
@@ -1,17 +0,0 @@
1
- /**
2
- * 解析 WorkBuddy 用户级配置目录的绝对路径。
3
- *
4
- * 优先级:
5
- * 1. `WORKBUDDY_CONFIG_DIR` 环境变量(被测试套件、企业部署、隔离场景使用)
6
- * 2. `~/.workbuddy`(默认)
7
- *
8
- * 与 `apps/workbuddy-desktop/src/main/system/runtime/app-instance.ts` 的
9
- * `getWorkbuddyConfigDir` 行为一致 —— 但 agent-cli 不依赖 desktop main,
10
- * 所以这里维护一份独立的、零依赖的实现。
11
- *
12
- * v5 #49077:用于给 ProxyResolver 注入 settingsPath,避免 ProxyResolver class
13
- * 内部默认值(`os.homedir()/.workbuddy/settings.json`)在
14
- * `WORKBUDDY_CONFIG_DIR` 被设置时仍然指错位置。
15
- */
16
- export declare function getWorkbuddyConfigDir(): string;
17
- export declare function getWorkbuddySettingsPath(): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * LSP 模块导出
3
- */
4
- export * from './lsp-protocol';
5
- export * from './lsp-client';
6
- export * from './lsp-manager';
@@ -1,104 +0,0 @@
1
- /**
2
- * LSP 客户端实现
3
- * 使用 vscode-languageserver-protocol 和 vscode-jsonrpc 与 LSP 服务器通信
4
- */
5
- import { Workspace } from '@genie/runtime';
6
- import { Logger } from '@genie/telemetry';
7
- import type { LspServerConfig } from '@genie/cbc-plugins';
8
- import { LSPCallHierarchyIncomingCall, LSPCallHierarchyItem, LSPCallHierarchyOutgoingCall, LSPClient as ILSPClient, LSPDocumentSymbol, LSPHover, LSPLocation, LSPPosition, LSPSymbolInformation } from './lsp-protocol';
9
- export declare class LSPClientImpl implements ILSPClient {
10
- protected readonly workspace: Workspace;
11
- protected readonly logger: Logger;
12
- private config;
13
- private languageId;
14
- private workspaceRoot;
15
- private process?;
16
- private connection?;
17
- private isInitialized;
18
- private openedDocuments;
19
- init(config: LspServerConfig, languageId: string): void;
20
- /**
21
- * 初始化 LSP 客户端并启动服务器
22
- */
23
- initialize(): Promise<void>;
24
- /**
25
- * 启动 stdio 传输方式的 LSP 服务器
26
- */
27
- private startServerStdio;
28
- /**
29
- * 设置消息处理器 - 处理服务器发起的请求和通知
30
- */
31
- private setupMessageHandlers;
32
- /**
33
- * 发送 initialize 请求
34
- */
35
- private sendInitializeRequest;
36
- /**
37
- * 确保文档已打开
38
- */
39
- private ensureDocumentOpened;
40
- /**
41
- * 转换 LSP Position (0-based) 为内部 Position
42
- */
43
- private toLSPPosition;
44
- /**
45
- * 跳转到定义
46
- */
47
- goToDefinition(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
48
- /**
49
- * 查找引用
50
- */
51
- findReferences(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
52
- /**
53
- * 获取 hover 信息
54
- */
55
- hover(uri: string, position: LSPPosition): Promise<LSPHover | null>;
56
- /**
57
- * 获取文档符号
58
- */
59
- documentSymbol(uri: string): Promise<LSPSymbolInformation[] | LSPDocumentSymbol[]>;
60
- /**
61
- * 工作区符号搜索
62
- */
63
- workspaceSymbol(query: string): Promise<LSPSymbolInformation[]>;
64
- /**
65
- * 跳转到实现
66
- */
67
- goToImplementation(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
68
- /**
69
- * 准备调用层次结构
70
- */
71
- prepareCallHierarchy(uri: string, position: LSPPosition): Promise<LSPCallHierarchyItem[]>;
72
- /**
73
- * 获取入站调用
74
- */
75
- incomingCalls(item: LSPCallHierarchyItem): Promise<LSPCallHierarchyIncomingCall[]>;
76
- /**
77
- * 获取出站调用
78
- */
79
- outgoingCalls(item: LSPCallHierarchyItem): Promise<LSPCallHierarchyOutgoingCall[]>;
80
- /**
81
- * 跳转到类型定义
82
- */
83
- goToTypeDefinition(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
84
- /**
85
- * 获取代码补全
86
- */
87
- completion(uri: string, position: LSPPosition): Promise<any[]>;
88
- /**
89
- * 规范化位置信息
90
- */
91
- private normalizeLocations;
92
- /**
93
- * 检查服务器是否正在运行
94
- */
95
- isRunning(): boolean;
96
- /**
97
- * 关闭 LSP 服务器
98
- */
99
- shutdown(): Promise<void>;
100
- /**
101
- * 清理资源
102
- */
103
- private cleanup;
104
- }
@@ -1,16 +0,0 @@
1
- export declare function registerLspPid(pid: number | undefined): void;
2
- export declare function unregisterLspPid(pid: number | undefined): void;
3
- /**
4
- * 同步 SIGKILL 所有已注册的 LSP 子进程 pid。必须在 process.exit 之前调用——
5
- * 这是退出链路上唯一确定会执行到的清理点(process.exit wrapper)。
6
- * 同步、无 await,确保不放过 event loop 让 doExit 抢跑。
7
- *
8
- * 对每个 pid 先做 process.kill(pid, 0) 存活校验:已死的 pid(ESRCH)静默跳过并
9
- * 从 registry 移除,避免对已退出进程发信号。
10
- *
11
- * pid 复用竞态:kill(pid, 0) 返回成功 → kill(pid, SIGKILL) 之间,目标进程恰好退出
12
- * 且 OS 把同一个 pid 分配给了另一个无关进程,此时会误杀该进程。窗口极窄(微秒级)
13
- * 且 LSP 子进程在 agent-cli 退出瞬间仍是其子进程,OS 回收再复用需跨 fork,
14
- * 实际概率趋近于零;best-effort 兜底场景下可接受。
15
- */
16
- export declare function killAllLspSync(): void;
@@ -1,91 +0,0 @@
1
- /**
2
- * LSP 服务器管理器
3
- * 负责 LSP 服务器的注册、启动、管理和关闭
4
- */
5
- import { Workspace } from '@genie/runtime';
6
- import { Logger } from '@genie/telemetry';
7
- import { PluginManager } from '@genie/cbc-plugins';
8
- import type { LspServerConfig } from '@genie/cbc-plugins';
9
- import { LSPClient as ILSPClient, LSPManager as ILSPManager, LSPServerInstance } from './lsp-protocol';
10
- export declare class LSPManagerImpl implements ILSPManager {
11
- protected readonly logger: Logger;
12
- protected readonly workspace: Workspace;
13
- protected readonly pluginManager: PluginManager;
14
- /** 语言 ID 到服务器配置的映射 */
15
- private languageConfigs;
16
- /** 是否已加载插件的 LSP 配置 */
17
- private hasLoadedPlugins;
18
- /** 文件扩展名到语言 ID 的映射 */
19
- private extensionToLanguage;
20
- /** 正在启动的服务器Promise,用于防止并发启动同一服务器 */
21
- private startingServers;
22
- /** Serialize explicit plugin reloads so teardown and rebuild cannot overlap. */
23
- private reloadPluginServersTail;
24
- /** exit 清理钩子仅在首个 LSP 子进程真实启动时注册(见 startServerSafe)。 */
25
- private exitHookRegistered;
26
- protected init(): void;
27
- private ensureExitHook;
28
- /**
29
- * 确保已加载所有插件的 LSP 配置
30
- */
31
- private ensurePluginsLoaded;
32
- /**
33
- * 注册 LSP 服务器配置
34
- */
35
- registerServers(lspConfigs: Record<string, LspServerConfig>, pluginName: string, marketplaceName: string): void;
36
- /**
37
- * 验证配置
38
- */
39
- private validateConfig;
40
- /**
41
- * 根据文件路径获取对应的 LSP 客户端
42
- */
43
- getClientForFile(filePath: string): Promise<ILSPClient | null>;
44
- /**
45
- * 后台启动服务器(不等待结果,用于注册时立即启动)
46
- */
47
- private startServerInBackground;
48
- /**
49
- * 安全启动服务器(确保单例,防止并发启动)
50
- */
51
- private startServerSafe;
52
- /**
53
- * 启动服务器
54
- */
55
- private startServer;
56
- /**
57
- * 检查是否应该重启
58
- */
59
- private shouldRestart;
60
- /**
61
- * 安排重启
62
- */
63
- private scheduleRestart;
64
- /**
65
- * 获取所有已注册的语言 ID
66
- */
67
- getRegisteredLanguages(): string[];
68
- /**
69
- * 关闭所有 LSP 服务器
70
- */
71
- shutdownAll(): Promise<void>;
72
- reloadPluginServers(): Promise<void>;
73
- private drainStartingServers;
74
- /**
75
- * 同步关闭所有服务器(用于进程退出时)
76
- */
77
- private shutdownAllSync;
78
- /**
79
- * 获取服务器实例信息(用于调试)
80
- */
81
- getServerInstance(languageId: string): LSPServerInstance | undefined;
82
- /**
83
- * 预热指定语言的 LSP 服务器(可选,用于提前启动常用语言)
84
- * @param languageIds 要预热的语言 ID 列表,为空则预热所有已注册语言
85
- */
86
- warmup(languageIds?: string[]): Promise<void>;
87
- /**
88
- * 检查指定语言的 LSP 服务器是否已启动
89
- */
90
- isServerRunning(languageId: string): boolean;
91
- }
@@ -1,245 +0,0 @@
1
- /**
2
- * LSP 协议类型和接口定义
3
- */
4
- import type { LspServerConfig } from '@genie/cbc-plugins';
5
- /**
6
- * LSP 服务器状态
7
- */
8
- export declare enum LSPServerStatus {
9
- /** 未启动 */
10
- Stopped = "stopped",
11
- /** 启动中 */
12
- Starting = "starting",
13
- /** 运行中 */
14
- Running = "running",
15
- /** 已崩溃 */
16
- Crashed = "crashed",
17
- /** 不可用 */
18
- Unavailable = "unavailable"
19
- }
20
- /**
21
- * LSP 服务器实例信息
22
- */
23
- export interface LSPServerInstance {
24
- /** 语言 ID */
25
- languageId: string;
26
- /** 服务器配置 */
27
- config: LspServerConfig;
28
- /** 服务器状态 */
29
- status: LSPServerStatus;
30
- /** 客户端实例 */
31
- client?: LSPClient;
32
- /** 重启次数 */
33
- restartCount: number;
34
- /** 插件名称 */
35
- pluginName: string;
36
- /** 市场名称 */
37
- marketplaceName: string;
38
- }
39
- /**
40
- * LSP 位置信息 (0-based)
41
- */
42
- export interface LSPPosition {
43
- line: number;
44
- character: number;
45
- }
46
- /**
47
- * LSP 范围信息
48
- */
49
- export interface LSPRange {
50
- start: LSPPosition;
51
- end: LSPPosition;
52
- }
53
- /**
54
- * LSP 位置链接
55
- */
56
- export interface LSPLocation {
57
- uri: string;
58
- range: LSPRange;
59
- }
60
- /**
61
- * LSP 符号类型
62
- */
63
- export declare enum LSPSymbolKind {
64
- File = 1,
65
- Module = 2,
66
- Namespace = 3,
67
- Package = 4,
68
- Class = 5,
69
- Method = 6,
70
- Property = 7,
71
- Field = 8,
72
- Constructor = 9,
73
- Enum = 10,
74
- Interface = 11,
75
- Function = 12,
76
- Variable = 13,
77
- Constant = 14,
78
- String = 15,
79
- Number = 16,
80
- Boolean = 17,
81
- Array = 18,
82
- Object = 19,
83
- Key = 20,
84
- Null = 21,
85
- EnumMember = 22,
86
- Struct = 23,
87
- Event = 24,
88
- Operator = 25,
89
- TypeParameter = 26
90
- }
91
- /**
92
- * LSP 符号信息
93
- */
94
- export interface LSPSymbolInformation {
95
- name: string;
96
- kind: LSPSymbolKind;
97
- location: LSPLocation;
98
- containerName?: string;
99
- }
100
- /**
101
- * LSP 文档符号
102
- */
103
- export interface LSPDocumentSymbol {
104
- name: string;
105
- kind: LSPSymbolKind;
106
- range: LSPRange;
107
- selectionRange: LSPRange;
108
- detail?: string;
109
- children?: LSPDocumentSymbol[];
110
- }
111
- /**
112
- * LSP Hover 信息
113
- */
114
- export interface LSPHover {
115
- contents: string | {
116
- language: string;
117
- value: string;
118
- };
119
- range?: LSPRange;
120
- }
121
- /**
122
- * LSP 调用层次结构项
123
- */
124
- export interface LSPCallHierarchyItem {
125
- name: string;
126
- kind: LSPSymbolKind;
127
- uri: string;
128
- range: LSPRange;
129
- selectionRange: LSPRange;
130
- detail?: string;
131
- }
132
- /**
133
- * LSP 调用层次结构入站调用
134
- */
135
- export interface LSPCallHierarchyIncomingCall {
136
- from: LSPCallHierarchyItem;
137
- fromRanges: LSPRange[];
138
- }
139
- /**
140
- * LSP 调用层次结构出站调用
141
- */
142
- export interface LSPCallHierarchyOutgoingCall {
143
- to: LSPCallHierarchyItem;
144
- fromRanges: LSPRange[];
145
- }
146
- /**
147
- * LSP 客户端接口
148
- */
149
- export declare const LSPClient: unique symbol;
150
- export interface LSPClient {
151
- init(config: LspServerConfig, languageId: string): void;
152
- /**
153
- * 初始化 LSP 客户端并启动服务器
154
- */
155
- initialize(): Promise<void>;
156
- /**
157
- * 关闭 LSP 服务器
158
- */
159
- shutdown(): Promise<void>;
160
- /**
161
- * 跳转到定义
162
- */
163
- goToDefinition(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
164
- /**
165
- * 查找引用
166
- */
167
- findReferences(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
168
- /**
169
- * 获取 hover 信息
170
- */
171
- hover(uri: string, position: LSPPosition): Promise<LSPHover | null>;
172
- /**
173
- * 获取文档符号
174
- */
175
- documentSymbol(uri: string): Promise<LSPSymbolInformation[] | LSPDocumentSymbol[]>;
176
- /**
177
- * 工作区符号搜索
178
- */
179
- workspaceSymbol(query: string): Promise<LSPSymbolInformation[]>;
180
- /**
181
- * 跳转到实现
182
- */
183
- goToImplementation(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
184
- /**
185
- * 跳转到类型定义
186
- */
187
- goToTypeDefinition(uri: string, position: LSPPosition): Promise<LSPLocation[]>;
188
- /**
189
- * 获取代码补全
190
- */
191
- completion(uri: string, position: LSPPosition): Promise<any[]>;
192
- /**
193
- * 准备调用层次结构
194
- */
195
- prepareCallHierarchy(uri: string, position: LSPPosition): Promise<LSPCallHierarchyItem[]>;
196
- /**
197
- * 获取入站调用
198
- */
199
- incomingCalls(item: LSPCallHierarchyItem): Promise<LSPCallHierarchyIncomingCall[]>;
200
- /**
201
- * 获取出站调用
202
- */
203
- outgoingCalls(item: LSPCallHierarchyItem): Promise<LSPCallHierarchyOutgoingCall[]>;
204
- /**
205
- * 检查服务器是否正在运行
206
- */
207
- isRunning(): boolean;
208
- }
209
- /**
210
- * LSP Manager 接口
211
- */
212
- export declare const LSPManager: unique symbol;
213
- export interface LSPManager {
214
- /**
215
- * 注册 LSP 服务器配置
216
- */
217
- registerServers(lspConfigs: Record<string, LspServerConfig>, pluginName: string, marketplaceName: string): void;
218
- /**
219
- * 根据文件路径获取对应的 LSP 客户端
220
- */
221
- getClientForFile(filePath: string): Promise<LSPClient | null>;
222
- /**
223
- * 获取所有已注册的语言 ID
224
- */
225
- getRegisteredLanguages(): string[];
226
- /**
227
- * 关闭所有 LSP 服务器
228
- */
229
- shutdownAll(): Promise<void>;
230
- /** Replace plugin-provided LSP registrations from the current active snapshot. */
231
- reloadPluginServers?(): Promise<void>;
232
- /**
233
- * 获取服务器实例信息(用于调试)
234
- */
235
- getServerInstance(languageId: string): LSPServerInstance | undefined;
236
- /**
237
- * 预热指定语言的 LSP 服务器(可选,用于提前启动常用语言)
238
- * @param languageIds 要预热的语言 ID 列表,为空则预热所有已注册语言
239
- */
240
- warmup(languageIds?: string[]): Promise<void>;
241
- /**
242
- * 检查指定语言的 LSP 服务器是否已启动
243
- */
244
- isServerRunning(languageId: string): boolean;
245
- }
@@ -1,64 +0,0 @@
1
- import type { LanguageModel, ReasoningEffortLevel, ThinkingLevelMap } from '@genie/product';
2
- /**
3
- * CLI 模式 effort 档位与模型能力联动(Issue #87437)。
4
- *
5
- * 背景:`/effort` 与 EffortPanel 此前固定展示 5+1 档,不校验当前模型是否支持,
6
- * 用户对不支持的模型选 `max` 后(尤其内部 LLM host 链路跳过出网 compat 层)会触发上游 400。
7
- * 这里提供档位能力解析 / clamp / 过滤的纯函数,供 `/effort` 命令、EffortPanel、
8
- * 发送侧 interceptor 共用,语义对齐 UI 侧 `clampEffortToSupported`
9
- * (`packages/agent-ui/src/components/main-content-core/hooks/use-model-selector.ts`)。
10
- *
11
- * 档位能力来源优先级:
12
- * 1. `LanguageModel.reasoning.supportedEfforts`(product config / Unleash 下发,精确集合)
13
- * 2. `LanguageModel.thinkingLevelMap` 推导最高可达档位(catalog 提供的翻译表启发)
14
- * 3. 都没有 → undefined(不限制,保持现状)
15
- */
16
- /** 共享契约全 6 档的顺序,用于"≤ 原值"的 clamp 语义(与 UI 侧 EFFORT_ORDER 一致)。 */
17
- export declare const EFFORT_ORDER: readonly ReasoningEffortLevel[];
18
- /** CLI `/effort` 当前暴露的档位基座(不含 minimal;ultracode 由命令/面板单独处理)。 */
19
- export declare const CLI_EFFORT_LEVELS: readonly ReasoningEffortLevel[];
20
- /**
21
- * 从 thinkingLevelMap 推导模型可达的最高档位。
22
- *
23
- * 这是 CLI 展示 / clamp 用的启发式上限,不等价于出网 compat 层的逐档翻译:
24
- * - map 含 `max`(非 null)→ 上限 max
25
- * - map 含 `xhigh`(非 null)→ 上限 xhigh
26
- * - 其它(含 map 缺失 / `xhigh: null`)→ 上限 high
27
- */
28
- export declare function deriveMaxEffortFromMap(map: ThinkingLevelMap | undefined): ReasoningEffortLevel;
29
- /**
30
- * 解析模型支持的档位集合。
31
- *
32
- * - `supportedEfforts` 存在 → 直接返回(精确集合;空数组也代表无可选多档)
33
- * - 缺失 → 用 thinkingLevelMap 推导:按 `deriveMaxEffortFromMap` 得到的上限截断 EFFORT_ORDER
34
- * - 都缺失(catalog 未建模 / 白名单 miss 的裸 `{id,name}` 模型)→ undefined(不限制)
35
- */
36
- export declare function resolveSupportedEfforts(model: Pick<LanguageModel, 'reasoning' | 'thinkingLevelMap'> | undefined): ReasoningEffortLevel[] | undefined;
37
- /**
38
- * 发送侧(写模型请求前)用的能力集合。
39
- *
40
- * 与 `resolveSupportedEfforts` 的唯一差异:`supportedEfforts` 为空数组时不视为
41
- * "无可达档位"(那会让 clamp 无从下手),而是退回 thinkingLevelMap 推导。
42
- * 优先级仍是显式集合 > thinkingLevelMap,避免同一模型在命令/面板被拒的档位在
43
- * 发送侧被放行。
44
- */
45
- export declare function resolveRequestEffortCapability(model: Pick<LanguageModel, 'reasoning' | 'thinkingLevelMap'> | undefined): ReasoningEffortLevel[] | undefined;
46
- /**
47
- * 把 effort clamp 到模型支持集合内(对齐 UI 侧 clampEffortToSupported):
48
- * - 无 effort → undefined
49
- * - supported 为空/未声明 → 原样返回(不限制)
50
- * - effort 在集合内 → 原样
51
- * - 否则 → 集合中 ≤ effort 的最高档;所有支持档都比 effort 高 → 取最低档
52
- */
53
- export declare function clampEffortToSupported(effort: ReasoningEffortLevel | undefined, supported: ReadonlyArray<ReasoningEffortLevel> | undefined): ReasoningEffortLevel | undefined;
54
- /**
55
- * 基于模型支持集合过滤候选档位列表(保持 levels 原有顺序)。
56
- * supported 未声明时原样返回,显式空数组时返回空列表。
57
- */
58
- export declare function filterEffortLevels<Level extends ReasoningEffortLevel>(levels: readonly Level[], supported: ReadonlyArray<ReasoningEffortLevel> | undefined): Level[];
59
- /**
60
- * UI picker 专用过滤:能力未知时不按全量展示,改用安全档位(排除 max)。
61
- * picker 不展示未知能力模型的 max;手输 `/effort max` 仍由命令/发送侧兜底,
62
- * 真实支持 max 的自定义模型需在模型配置里声明能力。
63
- */
64
- export declare function filterEffortLevelsForPicker<Level extends ReasoningEffortLevel>(levels: readonly Level[], supported: ReadonlyArray<ReasoningEffortLevel> | undefined): Level[];
@@ -1,25 +0,0 @@
1
- /**
2
- * Policy for client-supplied HTTP headers that agent-cli forwards to the model gateway
3
- * (`_meta['codebuddy.ai'].customPassthroughHeaders`).
4
- *
5
- * Security boundary = the startup prefix allowlist `CODEBUDDY_PASSTHROUGH_HEADER_PREFIXES`
6
- * (deploy-owned, set by sandbox-proxy when it spawns the codebuddy subprocess; default empty ⇒
7
- * feature off). Only headers whose name starts with an allowed prefix are forwarded. The deployer
8
- * is responsible for choosing a prefix namespace **disjoint from the internal `X-*` header space**
9
- * (auth/identity/trace/IDE/conversation headers) — e.g. `x-wb-`, `x-mobile-`. We deliberately do
10
- * NOT maintain a parallel denylist of internal header names (it would drift out of sync with the
11
- * gateway/auth contract); the prefix is the single source of truth. Note that per-request unique
12
- * IDs (`X-Request-Id` / `X-Conversation-Message-Id` / etc.) are additionally re-asserted by the
13
- * caller after these headers are applied, so they cannot be overridden regardless of prefix.
14
- */
15
- /**
16
- * Parse the comma-separated prefix allowlist env value into a normalized list.
17
- * Lowercased, trimmed, empties dropped. `undefined`/empty ⇒ `[]` (feature off).
18
- */
19
- export declare function parsePrefixes(raw?: string): string[];
20
- /**
21
- * Keep only headers whose (lowercased) name starts with one of `prefixes`. Empty `prefixes` ⇒
22
- * everything dropped (feature off). Non-string values and prototype-pollution keys are dropped.
23
- * Returns a null-prototype-safe plain object with original-cased keys preserved.
24
- */
25
- export declare function filterPassthroughHeaders(headers: Record<string, string>, prefixes: string[]): Record<string, string>;