@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
@@ -0,0 +1,2 @@
1
+ export * from './reference-protocol';
2
+ export * from './reference-service';
@@ -0,0 +1,23 @@
1
+ import { Settings, SettingsManager } from './settings-protocol';
2
+ export interface SettingsOptions {
3
+ global: boolean;
4
+ }
5
+ export interface KeyRequest {
6
+ key: keyof Settings;
7
+ }
8
+ export interface KeyValueRequest extends SettingsOptions {
9
+ key: keyof Settings;
10
+ value: any;
11
+ }
12
+ export interface KeyValuesRequest extends SettingsOptions {
13
+ key: keyof Settings;
14
+ values: any[];
15
+ }
16
+ export declare class SettingsController {
17
+ protected readonly settingsManager: SettingsManager;
18
+ set(request: KeyValueRequest): Promise<void>;
19
+ get(request: KeyRequest): Promise<Settings[keyof Settings]>;
20
+ add(request: KeyValuesRequest): Promise<void>;
21
+ remove(request: KeyValuesRequest): Promise<void>;
22
+ list(): Promise<Settings>;
23
+ }
@@ -0,0 +1,9 @@
1
+ import { PathResolver } from '@celljs/web';
2
+ import { Context, Middleware, RequestMatcher } from '@celljs/web/lib/node';
3
+ export declare class SettingsValidateMiddleWare implements Middleware {
4
+ protected readonly requestMatcher: RequestMatcher;
5
+ protected readonly pathResolver: PathResolver;
6
+ readonly priority: number;
7
+ handle(ctx: Context, next: () => Promise<void>): Promise<void>;
8
+ private canHandle;
9
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * 工作空间路径归一算法 —— 全仓库唯一手写真源(Single Source of Truth)。
3
+ *
4
+ * 把一条绝对 `cwd` 归一成一个可作为**单段目录名**的字符串,用于
5
+ * `<configDir>/projects/<name>/<conversationId>.jsonl` 的 `<name>`。
6
+ *
7
+ * ⚠️ 这段逻辑在多个隔离边界(agent-cli 独立产品 / workbuddy-core /
8
+ * workbuddy-server / edge-sync extension / history-migration)都要用到,且
9
+ * **读侧必须与写侧字节一致**,否则读端找不到写端落盘的目录。由于 agent-cli
10
+ * 禁止依赖 workbuddy,无法用「一个共享包被所有人 import」根治。
11
+ *
12
+ * 已知保留独立手写副本、未接入本真源的边界(≤255B 时与真源字节一致;算法变更
13
+ * 需人工同步,不随 CI --check 守卫):lamp-agent-pool 服务、sandbox-proxy Go 侧。
14
+ *
15
+ * 因此本文件是**唯一手写实现**,由 `scripts/generate-compress-path.mjs` 读取本
16
+ * 文件、生成 `compress-path.generated.ts` 分发到各消费方(仿
17
+ * `services/scripts/generate-lamp-error-codes.mjs`)。CI 用 `--check` 守卫漂移。
18
+ *
19
+ * 【修改须知】改这段算法**只改本文件**,然后跑
20
+ * `node scripts/generate-compress-path.mjs` 重新生成所有下游副本。
21
+ *
22
+ * 【实现约束】
23
+ * - 纯函数、零外部依赖(只用 `Buffer`,Node/Bun 都有),可被逐字节复制到任何目标。
24
+ * - hash 用 djb2→base36(对 UTF-8 字节做 hash,跨 runtime/进程稳定);
25
+ * **禁止** `Bun.hash`/`crypto`(跨 runtime 结果不一致,会导致读写错位)。
26
+ * - 阈值 255 字节:APFS/ext4/NTFS 单段文件名上限 NAME_MAX=255B。存量 ≤255B 的
27
+ * 目录走原算法**零漂移**;仅超限时才截断+hash。
28
+ * - 截断按 UTF-8 码点边界,避免把多字节字符(如中文 3B/码点)切成半个坏字节。
29
+ */
30
+ /** 单段目录名字节上限(APFS/ext4/NTFS NAME_MAX)。 */
31
+ export declare const WORKSPACE_PATH_NAME_MAX_BYTES = 255;
32
+ /** 超限时截断前缀保留的最大字节数;给 `-` + hash 后缀留足空间。 */
33
+ export declare const WORKSPACE_PATH_PREFIX_MAX_BYTES = 180;
34
+ /**
35
+ * djb2 哈希(对 UTF-8 字节),输出 base36。与 web-ui mcp-app-handlers 的 djb2
36
+ * 同构,但这里对**字节**而非 UTF-16 char code 取 hash,保证跨编码/跨 runtime 稳定。
37
+ */
38
+ export declare function djb2Base36(input: string): string;
39
+ /**
40
+ * 把字符串按 UTF-8 字节数截断到 `maxBytes`,且不切坏任何码点。
41
+ * 逐码点累加字节长度,超过上限即停。
42
+ */
43
+ export declare function truncateToByteLimitOnCodePoint(value: string, maxBytes: number): string;
44
+ /**
45
+ * 路径归一为「基础串」(未做长度守卫):`/` `\` `:` → `-`,去首尾 `-`,
46
+ * 连续 `-` 折叠。`compressWorkspacePathName` 与读侧 legacy 兜底共用,
47
+ * 避免归一逻辑在写侧/读侧各存一份副本导致算法漂移(见
48
+ * workbuddy-core 的 `tryResolveLegacyProjectDirByPrefix`)。
49
+ */
50
+ export declare function normalizeWorkspacePathBase(dir: string): string;
51
+ /**
52
+ * 把任意目录路径归一成一个安全的单段目录名。
53
+ *
54
+ * 例:'/Users/ericffan/my-project' → 'Users-ericffan-my-project'
55
+ *
56
+ * 超长(>255 字节)时:截断前缀(≤180B,码点边界)+ '-' + djb2Base36(完整归一串),
57
+ * 总长 ≤ 180 + 1 + ~7 < 255B,且对同一输入稳定、可被读侧前缀扫描定位。
58
+ */
59
+ export declare function compressWorkspacePathName(dir: string): string;
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/codebuddy-code",
3
- "version": "2.155.0-dev.90f0e98.202609190049",
3
+ "version": "2.155.0",
4
4
  "description": "Use CodeBuddy, Tencent's AI assistant, right from your terminal. CodeBuddy can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
5
5
  "main": "lib/node/index.js",
6
6
  "typings": "lib/node/index.d.ts",
@@ -71,8 +71,7 @@
71
71
  "url": "https://cnb.cool/codebuddy/codebuddy-code/-/issues"
72
72
  },
73
73
  "publishConfig": {
74
- "access": "public",
75
- "tag": "dev"
74
+ "access": "public"
76
75
  },
77
76
  "scripts": {},
78
77
  "devDependencies": {}
@@ -798,6 +798,6 @@
798
798
  "SelectImage": true,
799
799
  "SkipToolCallSupportCheck": true
800
800
  },
801
- "commit": "90f0e980f3e6bbf419c85b3264d90b4f0fab2f55",
802
- "date": "2026-09-18T16:49:06.510Z"
801
+ "commit": "7325d8e7c32cc9f241726667fb3e3d5eb78c710a",
802
+ "date": "2026-09-19T00:08:24.903Z"
803
803
  }
@@ -832,6 +832,6 @@
832
832
  }
833
833
  }
834
834
  },
835
- "commit": "90f0e980f3e6bbf419c85b3264d90b4f0fab2f55",
836
- "date": "2026-09-18T16:49:06.574Z"
835
+ "commit": "7325d8e7c32cc9f241726667fb3e3d5eb78c710a",
836
+ "date": "2026-09-19T00:08:24.813Z"
837
837
  }
@@ -1325,6 +1325,6 @@
1325
1325
  }
1326
1326
  }
1327
1327
  },
1328
- "commit": "90f0e980f3e6bbf419c85b3264d90b4f0fab2f55",
1329
- "date": "2026-09-18T16:49:06.512Z"
1328
+ "commit": "7325d8e7c32cc9f241726667fb3e3d5eb78c710a",
1329
+ "date": "2026-09-19T00:08:24.846Z"
1330
1330
  }
package/cli/product.json CHANGED
@@ -2226,6 +2226,6 @@
2226
2226
  "description": "tool-a2acanceltask-description"
2227
2227
  }
2228
2228
  ],
2229
- "commit": "90f0e980f3e6bbf419c85b3264d90b4f0fab2f55",
2230
- "date": "2026-09-18T16:49:06.615Z"
2229
+ "commit": "7325d8e7c32cc9f241726667fb3e3d5eb78c710a",
2230
+ "date": "2026-09-19T00:08:24.926Z"
2231
2231
  }
@@ -359,6 +359,6 @@
359
359
  "ScheduledTasks": true,
360
360
  "SkipToolCallSupportCheck": true
361
361
  },
362
- "commit": "90f0e980f3e6bbf419c85b3264d90b4f0fab2f55",
363
- "date": "2026-09-18T16:49:06.499Z"
362
+ "commit": "7325d8e7c32cc9f241726667fb3e3d5eb78c710a",
363
+ "date": "2026-09-19T00:08:24.811Z"
364
364
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/agent-sdk",
3
- "version": "0.3.263-dev.90f0e98.202609190050",
3
+ "version": "0.3.263",
4
4
  "description": "CodeBuddy Code SDK for JavaScript/TypeScript",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -32,7 +32,6 @@
32
32
  "zod": "^4.0.0"
33
33
  },
34
34
  "publishConfig": {
35
- "access": "public",
36
- "tag": "dev"
35
+ "access": "public"
37
36
  }
38
37
  }
@@ -1,51 +0,0 @@
1
- import type { Session } from '../../vendor/cbc-core/node/index.js';
2
- import { Logger } from '@genie/telemetry';
3
- import { A2aArtifactDownloadService, type A2aArtifactDownloadStatus, type A2aArtifactSummary } from './a2a-protocol';
4
- /**
5
- * Outbound A2A artifact download (issue #99451). All four knobs are read LIVE
6
- * from `process.env` on every call — never cached — matching this repo's
7
- * prewarm convention and letting tests flip them between calls.
8
- */
9
- export declare const ENV_ARTIFACT_MAX_SIZE_MB = "CODEBUDDY_A2A_ARTIFACT_MAX_SIZE_MB";
10
- export declare const ENV_ARTIFACT_DOWNLOAD_TIMEOUT_MS = "CODEBUDDY_A2A_ARTIFACT_DOWNLOAD_TIMEOUT_MS";
11
- export declare const ENV_ARTIFACT_AWAIT_MS = "CODEBUDDY_A2A_ARTIFACT_AWAIT_MS";
12
- export declare const ENV_ARTIFACT_DOWNLOAD_ENABLED = "CODEBUDDY_A2A_ARTIFACT_DOWNLOAD_ENABLED";
13
- export interface A2aArtifactDownloadConfig {
14
- maxSizeBytes: number;
15
- downloadTimeoutMs: number;
16
- awaitMs: number;
17
- }
18
- /** Resolved fresh on every call — see module doc comment. */
19
- export declare function resolveArtifactDownloadConfig(): A2aArtifactDownloadConfig;
20
- /** Independent kill switch for the download side effect. */
21
- export declare function isArtifactDownloadEnabled(): boolean;
22
- /**
23
- * Process-scoped component with Session-owned records and workspace paths.
24
- * `startDownload` captures the exact sandbox/cwd before launching async work,
25
- * so a late completion cannot fall through into another session's backend.
26
- */
27
- export declare class A2aArtifactDownloadServiceImpl implements A2aArtifactDownloadService {
28
- protected readonly logger: Logger;
29
- private readonly recordsBySession;
30
- startDownload(session: Session, artifact: A2aArtifactSummary): void;
31
- getResult(session: Session, url: string): {
32
- status: A2aArtifactDownloadStatus;
33
- localPath?: string;
34
- error?: string;
35
- } | undefined;
36
- awaitPending(session: Session, urls: string[], timeoutMs: number): Promise<void>;
37
- private recordsFor;
38
- private failRecord;
39
- private download;
40
- private writeArtifact;
41
- private ensureHostDirectories;
42
- private sandboxContentMatches;
43
- private hostContentMatches;
44
- private atomicWriteHostFile;
45
- }
46
- /** Fire-and-forget trigger for every URL-referenced artifact. */
47
- export declare function startArtifactDownloads(service: A2aArtifactDownloadService | undefined, session: Session, artifacts: A2aArtifactSummary[] | undefined): void;
48
- /** Wait briefly before a terminal result and add completed workspace paths. */
49
- export declare function awaitAndEnrichArtifacts(service: A2aArtifactDownloadService | undefined, session: Session, artifacts: A2aArtifactSummary[] | undefined): Promise<A2aArtifactSummary[] | undefined>;
50
- /** Append the existing model-visible download summary without rewriting text. */
51
- export declare function appendDownloadSummary(text: string, artifacts: A2aArtifactSummary[] | undefined, service: A2aArtifactDownloadService | undefined, session: Session): string;
@@ -1,100 +0,0 @@
1
- import { Session } from '../../vendor/cbc-core/node/index.js';
2
- /**
3
- * Session-scoped continuation state for outbound A2A calls: continuation key
4
- * -> A2A contextId, so a follow-up `message/send` continues the same
5
- * conversation on the remote agent instead of opening a fresh one.
6
- *
7
- * Why it lives on `session.meta` rather than a module-level map (the shape
8
- * this replaces):
9
- *
10
- * - **Session isolation.** A module-level map is process-global. One
11
- * agent-cli process can serve several conversations (and `/clear` starts a
12
- * new one in the same process), so a global map lets conversation B
13
- * silently resume conversation A's remote context.
14
- * - **Cross-process survival.** `A2A_CONTEXTS_META_KEY` is on
15
- * `PERSISTED_SESSION_META_KEYS`, so it rides the off-tree `session-meta`
16
- * line inside the session transcript and comes back on `--resume`. Without
17
- * it, a resumed conversation looks continuous locally while the remote
18
- * agent has lost every earlier turn.
19
- * - **Lifecycle for free.** The session owns the data: deleting the session
20
- * drops it, a new session starts empty, and nothing needs a separate
21
- * cleanup pass.
22
- *
23
- * Served sessions (ACP / gateway) never write the `session-meta` line — the
24
- * store still works in memory for the process lifetime, it just doesn't
25
- * survive a restart there. Degrading, not breaking.
26
- *
27
- * The key is `(discovery source, agentId)` — see {@link a2aContinuationKey}.
28
- */
29
- export declare const A2A_CONTEXTS_META_KEY = "codebuddy.ai/a2aContexts";
30
- /**
31
- * Continuation key: discovery source + agent.
32
- *
33
- * The source participates because an agent name is only unique *within* a
34
- * directory — the same name served by a different source is a different
35
- * remote. That matters more here than for an in-memory map: this state is
36
- * persisted, so it outlives the process and can still be around after a
37
- * session re-points its discovery source.
38
- *
39
- * Deliberately NOT keyed by skill. A contextId identifies a conversation with
40
- * an agent; skills are routing *within* that agent. Splitting per skill would
41
- * cut one conversation into several remote contexts that cannot see each
42
- * other's history.
43
- */
44
- export declare function a2aContinuationKey(source: string | undefined, agentId: string): string;
45
- /** One remembered remote conversation. `updatedAt` is epoch ms, used for expiry only. */
46
- export interface A2aContextEntry {
47
- contextId: string;
48
- updatedAt: number;
49
- }
50
- /** The persisted value under {@link A2A_CONTEXTS_META_KEY}: continuation key -> entry. */
51
- export type A2aContextMap = Record<string, A2aContextEntry>;
52
- /**
53
- * How long a remembered contextId stays usable. The A2A spec lets a remote
54
- * agent expire and reclaim contexts, and requires it to REJECT an unknown
55
- * contextId rather than quietly substituting a new one — so a stale id turns
56
- * every later call into a hard failure. Expiring locally keeps that from
57
- * happening: past the TTL we simply open a fresh context.
58
- *
59
- * 24h is deliberately conservative. It comfortably covers "close the laptop,
60
- * resume tomorrow morning" while staying well inside any plausible remote
61
- * retention window.
62
- *
63
- * Expiry is the ONLY staleness defence here, on purpose. Reacting to the
64
- * remote's rejection instead would be more precise, but the spec defines no
65
- * distinct error for "unknown contextId" and this SDK surfaces failures as
66
- * free-text messages (see classifyA2AError), so a rejection cannot be told
67
- * apart from a transient network failure. Guessing wrong either discards a
68
- * healthy context or — if paired with an automatic retry — re-sends a task
69
- * the remote may already have started. A clock is not clever, but it is
70
- * deterministic.
71
- */
72
- export declare const DEFAULT_A2A_CONTEXT_TTL_MS: number;
73
- /**
74
- * Resolve the context TTL, allowing an ops override without a release.
75
- *
76
- * - unset / empty -> default
77
- * - positive integer -> that value
78
- * - zero / negative / non-numeric -> default (fail soft; a broken env var
79
- * must not silently disable continuation)
80
- */
81
- export declare function resolveA2aContextTtlMs(envValue?: string | undefined, defaultValue?: number): number;
82
- /**
83
- * The contextId to continue with for `key` (see {@link a2aContinuationKey}),
84
- * or undefined to start a fresh remote context. Undefined covers all of: no
85
- * session, nothing remembered, malformed persisted data, and expired entries.
86
- *
87
- * Pure read — expired entries are pruned on the next write, not here, so that
88
- * reading never mutates the session behind the caller's back.
89
- */
90
- export declare function readA2aContextId(session: Session | undefined, key: string, now?: number, ttlMs?: number): string | undefined;
91
- /**
92
- * Remember `contextId` under `key` (see {@link a2aContinuationKey}) on this
93
- * session, pruning expired entries along the way.
94
- *
95
- * Returns whether anything actually changed, which is the caller's signal to
96
- * persist. A no-change result is the common case (same context, recently
97
- * touched) and must NOT trigger a write — every write appends a line to the
98
- * transcript.
99
- */
100
- export declare function rememberA2aContextId(session: Session | undefined, key: string, contextId: string, now?: number, ttlMs?: number): boolean;
@@ -1,111 +0,0 @@
1
- import type { Logger } from '@genie/telemetry';
2
- import type { A2aClientService, A2aRegisteredAgent, A2aTaskSnapshot } from './a2a-protocol';
3
- /**
4
- * Default bounded timeout for the best-effort user-cancel `tasks/cancel` RPC,
5
- * env-overridable via {@link ENV_A2A_CANCEL_TIMEOUT_MS}. Deliberately short
6
- * (issue #99451 follow-up, plan §3.4/§7): a user cancel should settle quickly
7
- * — a few seconds is far better than an undelivered cancel, but we don't want
8
- * the cancel path to hang on the full 120s client default.
9
- */
10
- export declare const DEFAULT_A2A_CANCEL_TIMEOUT_MS = 3000;
11
- /** Env override for the best-effort user-cancel timeout (ms). */
12
- export declare const ENV_A2A_CANCEL_TIMEOUT_MS = "CODEBUDDY_A2A_CANCEL_TIMEOUT_MS";
13
- /**
14
- * Bounded timeout for {@link cancelRemoteTaskForReport}'s RPCs, env-overridable
15
- * via {@link ENV_A2A_CANCEL_REPORT_TIMEOUT_MS}.
16
- *
17
- * Longer than {@link DEFAULT_A2A_CANCEL_TIMEOUT_MS} because this path must
18
- * REPORT the real outcome, not just fire and forget — 3s is too tight to
19
- * reliably read a slow remote's terminal state. Still far below the client's
20
- * own 120s default: the user is sitting in front of a card they just
21
- * dismissed, and both RPCs (cancel, plus the follow-up read when the task
22
- * turns out to be already terminal) are bounded by this, so the worst case
23
- * the user waits is twice this value rather than four minutes.
24
- */
25
- export declare const DEFAULT_A2A_CANCEL_REPORT_TIMEOUT_MS = 10000;
26
- /** Env override for {@link cancelRemoteTaskForReport}'s bounded timeout (ms). */
27
- export declare const ENV_A2A_CANCEL_REPORT_TIMEOUT_MS = "CODEBUDDY_A2A_CANCEL_REPORT_TIMEOUT_MS";
28
- /**
29
- * Best-effort remote `tasks/cancel` for a user-initiated cancel of an
30
- * in-flight outbound A2A poll (issue #99451 follow-up).
31
- *
32
- * When a user (not the model) cancels an `A2AGetTask` poll loop, the loop
33
- * simply throws and unwinds today, leaving the remote agent running an
34
- * orphaned task. This helper closes that gap by telling the remote agent to
35
- * stop the task it was polling.
36
- *
37
- * Two hard constraints (both plan traps):
38
- *
39
- * 1. **Never pass the session's already-aborted signal.** At user-cancel
40
- * time `session.abortSignal` is already aborted, and
41
- * `A2aClientServiceImpl.withAbortAndClient` aborts its own controller
42
- * immediately if the passed signal is already aborted — firing ZERO
43
- * network calls. So this deliberately passes NO `signal` and relies on the
44
- * client's own bounded `timeoutMs`.
45
- * 2. **Swallow raced-completion errors.** A task that finished between the
46
- * last poll and the cancel yields `TaskNotCancelable` / `TaskNotFound`; a
47
- * cancel racing completion is a success, not an error to surface. Any
48
- * failure is logged at debug and swallowed — this is invisible,
49
- * best-effort cleanup with no user-facing error.
50
- */
51
- export declare function bestEffortCancelRemoteTask(client: A2aClientService, agent: A2aRegisteredAgent, taskId: string, logger?: Pick<Logger, 'info' | 'debug'>, timeoutMs?: number): Promise<void>;
52
- /**
53
- * Outcome of {@link cancelRemoteTaskForReport} — three distinguishable
54
- * results, because the caller has to tell the model which one happened.
55
- */
56
- export type CancelForReportOutcome =
57
- /** `tasks/cancel` landed; `snapshot` is the resulting (canceled) task. */
58
- {
59
- kind: 'canceled';
60
- snapshot: A2aTaskSnapshot;
61
- }
62
- /**
63
- * The task was ALREADY terminal, so it could not be canceled — per the
64
- * A2A spec that surfaces as `TaskNotCancelable`/`TaskNotFound`. `snapshot`
65
- * is a follow-up `tasks/get` carrying the task's REAL terminal state.
66
- */
67
- | {
68
- kind: 'already-terminal';
69
- snapshot: A2aTaskSnapshot;
70
- }
71
- /** Neither call settled (transport failure); the remote task's fate is unknown. */
72
- | {
73
- kind: 'unknown';
74
- message: string;
75
- };
76
- /**
77
- * Cancel a remote task and report what actually happened (issue #107183).
78
- *
79
- * Distinct from {@link bestEffortCancelRemoteTask}, and deliberately not a
80
- * variant of it. That helper exists for USER-ABORT cleanup: the session is
81
- * already tearing down, nobody is listening, so it returns `void`, passes no
82
- * signal (the session's is already aborted, which would fire zero network
83
- * calls), and swallows every failure into a debug log.
84
- *
85
- * This one runs on a LIVE session, when a user declined (or did not answer)
86
- * an approval card and the result has to be reported back to the model. Here
87
- * the failure modes are load-bearing information, not noise:
88
- *
89
- * - `TaskNotCancelable`/`TaskNotFound` means the task is already terminal —
90
- * very often because the approval was granted through the approving
91
- * system's own UI while our card was open, and the task ran to completion.
92
- * Reporting "task canceled" there would tell the model the opposite of the
93
- * truth, so we re-read the task and report its real state instead.
94
- * - A transport failure means we genuinely don't know, and the model must be
95
- * told the remote task may still be running rather than assume either way.
96
- *
97
- * Never throws: every path resolves to one of the three
98
- * {@link CancelForReportOutcome} variants.
99
- *
100
- * `options.timeoutMs` defaults to {@link DEFAULT_A2A_CANCEL_REPORT_TIMEOUT_MS}
101
- * and is applied to BOTH RPCs. Defaulting here rather than at the call site is
102
- * deliberate: omitting it would fall through to `A2aClientServiceImpl`'s 120s
103
- * default, and with the follow-up read that is a four-minute stall right after
104
- * the user dismissed a card. The bound belongs to this helper's contract, so a
105
- * future caller cannot reintroduce that by forgetting to pass one.
106
- */
107
- export declare function cancelRemoteTaskForReport(client: A2aClientService, agent: A2aRegisteredAgent, taskId: string, options?: {
108
- signal?: AbortSignal;
109
- timeoutMs?: number;
110
- logger?: Pick<Logger, 'info' | 'debug' | 'warn'>;
111
- }): Promise<CancelForReportOutcome>;
@@ -1,45 +0,0 @@
1
- /**
2
- * 上下文消耗 5 类目细拆 · 字符分类 + 反向归一化分配。
3
- * 严格守恒:sum(usageByCategory) === input.totalTokens(即 ACP usage_update.used)。
4
- */
5
- /** 5 类目细拆结果。schema 版本字段 `version` 为后续扩展预留。 */
6
- export interface UsageByCategory {
7
- systemPrompt: number;
8
- conversation: number;
9
- tools: number;
10
- mcp: number;
11
- skills: number;
12
- /** schema 版本:未来扩展加字段时 +1,客户端按 version 兼容。 */
13
- version: 1;
14
- }
15
- /** 单个 tool 定义的最小契约(仅消费 name + description;其它字段透传 JSON.stringify)。 */
16
- export interface ToolLike {
17
- name: string;
18
- description?: string;
19
- /** OpenAI Agent SDK 的 tool 通常带 parameters/schema;calculator 不解析,只 JSON.stringify。 */
20
- input_schema?: unknown;
21
- parameters?: unknown;
22
- }
23
- /** 单条 history item 的结构松约束(结构不规范时 calculator 跳过,不抛错)。 */
24
- export interface HistoryItemLike {
25
- type?: string;
26
- role?: string;
27
- content?: unknown;
28
- callId?: string;
29
- name?: string;
30
- arguments?: unknown;
31
- output?: unknown;
32
- }
33
- export interface UsageByCategoryInput {
34
- /** 当前请求最终发给模型的 system prompt 渲染产物(已 resolve 为字符串)。 */
35
- systemPrompt: string;
36
- /** 当前请求装载的 tool 定义列表(用作字符代理:JSON.stringify 每个 tool)。 */
37
- tools: ReadonlyArray<ToolLike>;
38
- /** session.history(user/assistant 消息 + function_call / function_call_result)。 */
39
- history: ReadonlyArray<HistoryItemLike>;
40
- /** ACP usage_update.used,作为最终归一化的总分母。 */
41
- totalTokens: number;
42
- }
43
- export declare class UsageByCategoryCalculator {
44
- static compute(input: UsageByCategoryInput): UsageByCategory;
45
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * 字符权重 · 上下文消耗 5 类目细拆专用。
3
- * CJK / ASCII 字母空白 / 其它字符分别按 1.2 / 0.25 / 0.7 折算。
4
- */
5
- /**
6
- * 按字符权重把字符串折算成「token 数」估算量(用于 5 类目反向归一化的相对比例)。
7
- * 真实 token 数由 ACP usage_update.used 决定;本函数仅用作类目分配权重。
8
- */
9
- export declare function weighted(text: string): number;
@@ -1,6 +0,0 @@
1
- /**
2
- * 守恒分配函数 —— 把 totalTokens 按 5 类目权重分配到非负整数桶里,sum 严格守恒。
3
- * 算法:floor 分配 + 按余数从大到小补 1。
4
- */
5
- export type UsageByCategoryKey = 'systemPrompt' | 'conversation' | 'tools' | 'mcp' | 'skills';
6
- export declare function distributeWithConservation(estimates: Record<UsageByCategoryKey, number>, totalTokens: number): Record<UsageByCategoryKey, number>;
@@ -1,11 +0,0 @@
1
- /**
2
- * Skills / MCP 切分 · 上下文消耗 5 类目细拆专用。
3
- * Skill 的 `<available_skills>` 归 skills;ToolSearch 的 `mcp__` 行归 mcp。
4
- */
5
- import type { ToolLike } from './usage-by-category-calculator';
6
- export interface ToolsBuckets {
7
- toolsChars: string;
8
- mcpChars: string;
9
- skillsChars: string;
10
- }
11
- export declare function collectToolsBuckets(tools: ReadonlyArray<ToolLike>): ToolsBuckets;
@@ -1,57 +0,0 @@
1
- /**
2
- * CLI-only extensions to the product `Agent` definition, declared via TypeScript
3
- * module augmentation so `@genie/product` (owned by another team) stays untouched.
4
- *
5
- * These fields are parsed from `.codebuddy/agents/*.md` frontmatter (and plugin
6
- * agent frontmatter) by agent-cli's own loaders, and consumed only inside
7
- * agent-cli. Runtime-wise they are plain optional properties on the agent
8
- * config object; this file only teaches the type system about them.
9
- *
10
- * If the product team later adopts any of these fields into
11
- * `packages/product/src/common/types/agent.ts`, the corresponding line here
12
- * must be removed (duplicate declarations with different types fail to compile).
13
- */
14
- import '@genie/product';
15
- declare module '@genie/product' {
16
- interface Agent {
17
- /**
18
- * 原始 Agent 定义中显式声明的 model。
19
- *
20
- * Product 模型关系层会把 custom/chat 模型自动追加到 `models`,仅看最终
21
- * 数组无法区分“定义明确选择了 custom 模型”和“定义没有 model、仅被自动
22
- * 追加”。保留该字段供运行时恢复真正的定义默认值。
23
- */
24
- readonly declaredModel?: string;
25
- /**
26
- * 子代理最大轮次(对齐 Claude subagent 的 maxTurns frontmatter)。
27
- * 生效优先级:env CODEBUDDY_CODE_SUBAGENT_MAX_TURNS > Agent 工具 max_turns 入参 > 本字段。
28
- */
29
- readonly maxTurns?: number;
30
- /**
31
- * 定义层强制后台运行(对齐 Claude subagent 的 background frontmatter)。
32
- * true = 该 agent 被 Agent 工具 spawn 时总是走后台,等同调用方传 run_in_background=true;
33
- * 受 CODEBUDDY_CODE_DISABLE_BACKGROUND_TASKS 门控(禁用时降级为同步执行)。
34
- */
35
- readonly background?: boolean;
36
- /**
37
- * 主 agent 模式(--agent / settings.agent)下自动前置到首条用户消息的提示词
38
- * (对齐 Claude subagent 的 initialPrompt frontmatter)。
39
- * 仅主会话首轮生效;子代理 spawn / teammate / 恢复会话不注入。
40
- */
41
- readonly initialPrompt?: string;
42
- /**
43
- * agent 级持久记忆 scope(对齐 Claude subagent 的 memory frontmatter)。
44
- * - 'user': <configDir>/agent-memory/<name>/,跨项目共享
45
- * - 'project': <cwd>/.codebuddy/agent-memory/<name>/,随仓库提交
46
- * - 'local': <cwd>/.codebuddy/agent-memory-local/<name>/,项目内私有
47
- * 启用后子代理系统提示注入 MEMORY.md(截断 200 行/25KB),
48
- * 且显式 tools 白名单自动补 Read/Write/Edit。
49
- */
50
- readonly memory?: 'user' | 'project' | 'local';
51
- /**
52
- * 选择器展示名(可含空格 / 中文)。缺省回退 `name`。
53
- * 内置模式用它把稳定 id(cli/ptc/minimal/create)显示成「标准模式」等。
54
- */
55
- readonly displayName?: string;
56
- }
57
- }