@adaptic/maestro 1.0.1 → 1.1.1

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 (604) hide show
  1. package/.claude/commands/init-maestro.md +292 -29
  2. package/.gitignore +29 -0
  3. package/README.md +220 -344
  4. package/bin/maestro.mjs +462 -7
  5. package/lib/action-executor.js +225 -0
  6. package/lib/index.js +16 -0
  7. package/lib/singleton.js +116 -0
  8. package/lib/tool-definitions.js +510 -0
  9. package/package.json +12 -2
  10. package/scaffold/CLAUDE.md +207 -0
  11. package/scripts/daemon/maestro-daemon.mjs +37 -0
  12. package/scripts/local-triggers/generate-plists.sh +235 -0
  13. package/scripts/local-triggers/install-all.sh +18 -12
  14. package/scripts/setup/init-agent.sh +58 -27
  15. package/scripts/slack-events-server.mjs +10 -0
  16. package/scripts/huddle/node_modules/.package-lock.json +0 -50
  17. package/scripts/huddle/node_modules/@anthropic-ai/sdk/CHANGELOG.md +0 -1677
  18. package/scripts/huddle/node_modules/@anthropic-ai/sdk/LICENSE +0 -8
  19. package/scripts/huddle/node_modules/@anthropic-ai/sdk/README.md +0 -674
  20. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts +0 -3
  21. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +0 -1
  22. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts +0 -3
  23. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +0 -1
  24. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +0 -226
  25. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +0 -1
  26. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +0 -223
  27. package/scripts/huddle/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +0 -1
  28. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.mts +0 -2
  29. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +0 -1
  30. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.ts +0 -2
  31. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +0 -1
  32. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.js +0 -6
  33. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.js.map +0 -1
  34. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.mjs +0 -2
  35. package/scripts/huddle/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +0 -1
  36. package/scripts/huddle/node_modules/@anthropic-ai/sdk/bin/cli +0 -53
  37. package/scripts/huddle/node_modules/@anthropic-ai/sdk/bin/migration-config.json +0 -7
  38. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.mts +0 -225
  39. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.mts.map +0 -1
  40. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.ts +0 -225
  41. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.d.ts.map +0 -1
  42. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.js +0 -536
  43. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.js.map +0 -1
  44. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.mjs +0 -531
  45. package/scripts/huddle/node_modules/@anthropic-ai/sdk/client.mjs.map +0 -1
  46. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +0 -49
  47. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +0 -1
  48. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +0 -49
  49. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +0 -1
  50. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.js +0 -76
  51. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +0 -1
  52. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +0 -72
  53. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +0 -1
  54. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.mts +0 -47
  55. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +0 -1
  56. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.ts +0 -47
  57. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +0 -1
  58. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.js +0 -114
  59. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.js.map +0 -1
  60. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.mjs +0 -98
  61. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/error.mjs.map +0 -1
  62. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +0 -63
  63. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +0 -1
  64. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +0 -63
  65. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +0 -1
  66. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.js +0 -123
  67. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.js.map +0 -1
  68. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.mjs +0 -117
  69. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +0 -1
  70. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.mts +0 -6
  71. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +0 -1
  72. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.ts +0 -6
  73. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +0 -1
  74. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.js +0 -11
  75. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.js.map +0 -1
  76. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.mjs +0 -7
  77. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/resource.mjs.map +0 -1
  78. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +0 -31
  79. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +0 -1
  80. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +0 -31
  81. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +0 -1
  82. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.js +0 -282
  83. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.js.map +0 -1
  84. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.mjs +0 -277
  85. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +0 -1
  86. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.mts +0 -3
  87. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +0 -1
  88. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.ts +0 -3
  89. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +0 -1
  90. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.js +0 -6
  91. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.js.map +0 -1
  92. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.mjs +0 -2
  93. package/scripts/huddle/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +0 -1
  94. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.mts +0 -2
  95. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.mts.map +0 -1
  96. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.ts +0 -2
  97. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.d.ts.map +0 -1
  98. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.js +0 -6
  99. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.js.map +0 -1
  100. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.mjs +0 -2
  101. package/scripts/huddle/node_modules/@anthropic-ai/sdk/error.mjs.map +0 -1
  102. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.mts +0 -7
  103. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.mts.map +0 -1
  104. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.ts +0 -7
  105. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.d.ts.map +0 -1
  106. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.js +0 -35
  107. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.js.map +0 -1
  108. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.mjs +0 -8
  109. package/scripts/huddle/node_modules/@anthropic-ai/sdk/index.mjs.map +0 -1
  110. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts +0 -73
  111. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts.map +0 -1
  112. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts +0 -73
  113. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts.map +0 -1
  114. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.js +0 -4
  115. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.js.map +0 -1
  116. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs +0 -3
  117. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs.map +0 -1
  118. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.mts +0 -5
  119. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +0 -1
  120. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.ts +0 -5
  121. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +0 -1
  122. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -15
  123. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.js.map +0 -1
  124. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -12
  125. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +0 -1
  126. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts +0 -10
  127. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +0 -1
  128. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts +0 -10
  129. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +0 -1
  130. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +0 -39
  131. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map +0 -1
  132. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +0 -35
  133. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +0 -1
  134. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts +0 -17
  135. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map +0 -1
  136. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts +0 -17
  137. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map +0 -1
  138. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +0 -113
  139. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map +0 -1
  140. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +0 -108
  141. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +0 -1
  142. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts +0 -15
  143. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts.map +0 -1
  144. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts +0 -15
  145. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts.map +0 -1
  146. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.js +0 -162
  147. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.js.map +0 -1
  148. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs +0 -157
  149. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +0 -1
  150. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.mts +0 -3
  151. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map +0 -1
  152. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.ts +0 -3
  153. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map +0 -1
  154. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.js +0 -41
  155. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.js.map +0 -1
  156. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.mjs +0 -36
  157. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/errors.mjs.map +0 -1
  158. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +0 -22
  159. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +0 -1
  160. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +0 -22
  161. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +0 -1
  162. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.js +0 -79
  163. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.js.map +0 -1
  164. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.mjs +0 -74
  165. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +0 -1
  166. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +0 -17
  167. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +0 -1
  168. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +0 -17
  169. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +0 -1
  170. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.js +0 -55
  171. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.js.map +0 -1
  172. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.mjs +0 -51
  173. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +0 -1
  174. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +0 -34
  175. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +0 -1
  176. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +0 -34
  177. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +0 -1
  178. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.js +0 -14
  179. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +0 -1
  180. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +0 -10
  181. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +0 -1
  182. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts +0 -28
  183. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts +0 -28
  184. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +0 -20
  185. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +0 -1
  186. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +0 -20
  187. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +0 -1
  188. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.js +0 -92
  189. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.js.map +0 -1
  190. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.mjs +0 -85
  191. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map +0 -1
  192. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts +0 -8
  193. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map +0 -1
  194. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts +0 -8
  195. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map +0 -1
  196. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.js +0 -38
  197. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.js.map +0 -1
  198. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs +0 -35
  199. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs.map +0 -1
  200. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts +0 -45
  201. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +0 -1
  202. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts +0 -45
  203. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +0 -1
  204. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.js +0 -96
  205. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.js.map +0 -1
  206. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.mjs +0 -93
  207. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +0 -1
  208. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/tslib.js +0 -81
  209. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/tslib.mjs +0 -17
  210. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.mts +0 -67
  211. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +0 -1
  212. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.ts +0 -67
  213. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +0 -1
  214. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.js +0 -4
  215. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.js.map +0 -1
  216. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.mjs +0 -3
  217. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/types.mjs.map +0 -1
  218. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts +0 -42
  219. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +0 -1
  220. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts +0 -42
  221. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +0 -1
  222. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.js +0 -146
  223. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.js.map +0 -1
  224. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.mjs +0 -136
  225. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +0 -1
  226. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts +0 -3
  227. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map +0 -1
  228. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts +0 -3
  229. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map +0 -1
  230. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.js +0 -38
  231. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map +0 -1
  232. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +0 -33
  233. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +0 -1
  234. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts +0 -4
  235. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map +0 -1
  236. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts +0 -4
  237. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map +0 -1
  238. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js +0 -31
  239. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map +0 -1
  240. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs +0 -26
  241. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map +0 -1
  242. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts +0 -9
  243. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map +0 -1
  244. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts +0 -9
  245. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map +0 -1
  246. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.js +0 -22
  247. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map +0 -1
  248. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +0 -18
  249. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map +0 -1
  250. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +0 -37
  251. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +0 -1
  252. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +0 -37
  253. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +0 -1
  254. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.js +0 -86
  255. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +0 -1
  256. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +0 -80
  257. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +0 -1
  258. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts +0 -15
  259. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map +0 -1
  260. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts +0 -15
  261. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map +0 -1
  262. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.js +0 -58
  263. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map +0 -1
  264. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs +0 -53
  265. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +0 -1
  266. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +0 -2
  267. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +0 -1
  268. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +0 -2
  269. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +0 -1
  270. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +0 -7
  271. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +0 -1
  272. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +0 -3
  273. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +0 -1
  274. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts +0 -5
  275. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map +0 -1
  276. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts +0 -5
  277. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map +0 -1
  278. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js +0 -19
  279. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map +0 -1
  280. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs +0 -15
  281. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map +0 -1
  282. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts +0 -16
  283. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map +0 -1
  284. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts +0 -16
  285. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map +0 -1
  286. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.js +0 -109
  287. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map +0 -1
  288. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs +0 -92
  289. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +0 -1
  290. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.mts +0 -7
  291. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +0 -1
  292. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.ts +0 -7
  293. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +0 -1
  294. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.js +0 -11
  295. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.js.map +0 -1
  296. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.mjs +0 -8
  297. package/scripts/huddle/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +0 -1
  298. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +0 -114
  299. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +0 -1
  300. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +0 -114
  301. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +0 -1
  302. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +0 -553
  303. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +0 -1
  304. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +0 -549
  305. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +0 -1
  306. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +0 -114
  307. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +0 -1
  308. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +0 -114
  309. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +0 -1
  310. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +0 -553
  311. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +0 -1
  312. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +0 -549
  313. package/scripts/huddle/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +0 -1
  314. package/scripts/huddle/node_modules/@anthropic-ai/sdk/package.json +0 -185
  315. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.mts +0 -2
  316. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +0 -1
  317. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.ts +0 -2
  318. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +0 -1
  319. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.js +0 -6
  320. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.js.map +0 -1
  321. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.mjs +0 -2
  322. package/scripts/huddle/node_modules/@anthropic-ai/sdk/pagination.mjs.map +0 -1
  323. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.mts +0 -2
  324. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.mts.map +0 -1
  325. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -2
  326. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.d.ts.map +0 -1
  327. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.js +0 -6
  328. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.js.map +0 -1
  329. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.mjs +0 -2
  330. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resource.mjs.map +0 -1
  331. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +0 -61
  332. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +0 -1
  333. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +0 -61
  334. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +0 -1
  335. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +0 -25
  336. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +0 -1
  337. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +0 -20
  338. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +0 -1
  339. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +0 -151
  340. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +0 -1
  341. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +0 -151
  342. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +0 -1
  343. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.js +0 -122
  344. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +0 -1
  345. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +0 -118
  346. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +0 -1
  347. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +0 -5
  348. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +0 -1
  349. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +0 -5
  350. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +0 -1
  351. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.js +0 -13
  352. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +0 -1
  353. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +0 -6
  354. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +0 -1
  355. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +0 -343
  356. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +0 -1
  357. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +0 -343
  358. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +0 -1
  359. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +0 -204
  360. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +0 -1
  361. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +0 -200
  362. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +0 -1
  363. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +0 -3
  364. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +0 -1
  365. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +0 -3
  366. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +0 -1
  367. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js +0 -9
  368. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +0 -1
  369. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs +0 -4
  370. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +0 -1
  371. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +0 -1561
  372. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +0 -1
  373. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +0 -1561
  374. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +0 -1
  375. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +0 -86
  376. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +0 -1
  377. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +0 -81
  378. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +0 -1
  379. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts +0 -2
  380. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +0 -1
  381. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts +0 -2
  382. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +0 -1
  383. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.js +0 -6
  384. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map +0 -1
  385. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs +0 -3
  386. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +0 -1
  387. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +0 -74
  388. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +0 -1
  389. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +0 -74
  390. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +0 -1
  391. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.js +0 -60
  392. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map +0 -1
  393. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +0 -56
  394. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +0 -1
  395. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.mts +0 -2
  396. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +0 -1
  397. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.ts +0 -2
  398. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +0 -1
  399. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.js +0 -6
  400. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.js.map +0 -1
  401. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.mjs +0 -3
  402. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +0 -1
  403. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +0 -183
  404. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +0 -1
  405. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +0 -183
  406. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +0 -1
  407. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -23
  408. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.js.map +0 -1
  409. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -19
  410. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +0 -1
  411. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.mts +0 -6
  412. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +0 -1
  413. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.ts +0 -6
  414. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +0 -1
  415. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.js +0 -15
  416. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.js.map +0 -1
  417. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -7
  418. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +0 -1
  419. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +0 -304
  420. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +0 -1
  421. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +0 -304
  422. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +0 -1
  423. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +0 -153
  424. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +0 -1
  425. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +0 -149
  426. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +0 -1
  427. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +0 -3
  428. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +0 -1
  429. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +0 -3
  430. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +0 -1
  431. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.js +0 -9
  432. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +0 -1
  433. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs +0 -4
  434. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +0 -1
  435. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +0 -1264
  436. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +0 -1
  437. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +0 -1264
  438. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +0 -1
  439. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +0 -72
  440. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +0 -1
  441. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +0 -67
  442. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +0 -1
  443. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.mts +0 -2
  444. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +0 -1
  445. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +0 -2
  446. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +0 -1
  447. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -6
  448. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.js.map +0 -1
  449. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -3
  450. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +0 -1
  451. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.mts +0 -59
  452. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +0 -1
  453. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.ts +0 -59
  454. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +0 -1
  455. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.js +0 -45
  456. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.js.map +0 -1
  457. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.mjs +0 -41
  458. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +0 -1
  459. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.mts +0 -42
  460. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map +0 -1
  461. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.ts +0 -42
  462. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map +0 -1
  463. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.js +0 -4
  464. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.js.map +0 -1
  465. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.mjs +0 -3
  466. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/shared.mjs.map +0 -1
  467. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts +0 -2
  468. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map +0 -1
  469. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +0 -2
  470. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +0 -1
  471. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -4
  472. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +0 -1
  473. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -3
  474. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +0 -1
  475. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.mts +0 -2
  476. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.mts.map +0 -1
  477. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.ts +0 -2
  478. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.d.ts.map +0 -1
  479. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.js +0 -5
  480. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.js.map +0 -1
  481. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.mjs +0 -2
  482. package/scripts/huddle/node_modules/@anthropic-ai/sdk/resources.mjs.map +0 -1
  483. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md +0 -3
  484. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +0 -264
  485. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/api-promise.ts +0 -2
  486. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/client.ts +0 -1070
  487. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/README.md +0 -3
  488. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +0 -101
  489. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/error.ts +0 -133
  490. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +0 -201
  491. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/resource.ts +0 -11
  492. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +0 -331
  493. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/core/uploads.ts +0 -2
  494. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/error.ts +0 -2
  495. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/index.ts +0 -23
  496. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/README.md +0 -3
  497. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts +0 -93
  498. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -12
  499. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts +0 -48
  500. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts +0 -135
  501. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts +0 -196
  502. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/errors.ts +0 -33
  503. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +0 -99
  504. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +0 -84
  505. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +0 -39
  506. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/shim-types.d.ts +0 -28
  507. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/shims.ts +0 -107
  508. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts +0 -32
  509. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts +0 -159
  510. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/types.ts +0 -92
  511. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts +0 -193
  512. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts +0 -40
  513. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts +0 -32
  514. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts +0 -18
  515. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +0 -127
  516. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts +0 -65
  517. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +0 -3
  518. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts +0 -17
  519. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts +0 -102
  520. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/internal/utils.ts +0 -8
  521. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -4
  522. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +0 -683
  523. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +0 -684
  524. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/pagination.ts +0 -2
  525. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resource.ts +0 -2
  526. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +0 -380
  527. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +0 -258
  528. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +0 -148
  529. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +0 -502
  530. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +0 -135
  531. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +0 -2249
  532. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts +0 -3
  533. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +0 -118
  534. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/beta.ts +0 -3
  535. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +0 -231
  536. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/index.ts +0 -121
  537. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +0 -396
  538. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +0 -110
  539. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +0 -1783
  540. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -3
  541. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/models.ts +0 -103
  542. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/shared.ts +0 -72
  543. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +0 -3
  544. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/resources.ts +0 -1
  545. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/streaming.ts +0 -2
  546. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/tsconfig.json +0 -11
  547. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/uploads.ts +0 -2
  548. package/scripts/huddle/node_modules/@anthropic-ai/sdk/src/version.ts +0 -1
  549. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.mts +0 -2
  550. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +0 -1
  551. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -2
  552. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +0 -1
  553. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.js +0 -6
  554. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.js.map +0 -1
  555. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.mjs +0 -2
  556. package/scripts/huddle/node_modules/@anthropic-ai/sdk/streaming.mjs.map +0 -1
  557. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.mts +0 -2
  558. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +0 -1
  559. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -2
  560. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +0 -1
  561. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.js +0 -6
  562. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.js.map +0 -1
  563. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.mjs +0 -2
  564. package/scripts/huddle/node_modules/@anthropic-ai/sdk/uploads.mjs.map +0 -1
  565. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.mts +0 -2
  566. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.mts.map +0 -1
  567. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  568. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.d.ts.map +0 -1
  569. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.js +0 -5
  570. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.js.map +0 -1
  571. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.mjs +0 -2
  572. package/scripts/huddle/node_modules/@anthropic-ai/sdk/version.mjs.map +0 -1
  573. package/scripts/huddle/node_modules/dotenv/CHANGELOG.md +0 -520
  574. package/scripts/huddle/node_modules/dotenv/LICENSE +0 -23
  575. package/scripts/huddle/node_modules/dotenv/README-es.md +0 -411
  576. package/scripts/huddle/node_modules/dotenv/README.md +0 -645
  577. package/scripts/huddle/node_modules/dotenv/SECURITY.md +0 -1
  578. package/scripts/huddle/node_modules/dotenv/config.d.ts +0 -1
  579. package/scripts/huddle/node_modules/dotenv/config.js +0 -9
  580. package/scripts/huddle/node_modules/dotenv/lib/cli-options.js +0 -17
  581. package/scripts/huddle/node_modules/dotenv/lib/env-options.js +0 -28
  582. package/scripts/huddle/node_modules/dotenv/lib/main.d.ts +0 -162
  583. package/scripts/huddle/node_modules/dotenv/lib/main.js +0 -386
  584. package/scripts/huddle/node_modules/dotenv/package.json +0 -62
  585. package/scripts/huddle/node_modules/ws/LICENSE +0 -20
  586. package/scripts/huddle/node_modules/ws/README.md +0 -548
  587. package/scripts/huddle/node_modules/ws/browser.js +0 -8
  588. package/scripts/huddle/node_modules/ws/index.js +0 -22
  589. package/scripts/huddle/node_modules/ws/lib/buffer-util.js +0 -131
  590. package/scripts/huddle/node_modules/ws/lib/constants.js +0 -19
  591. package/scripts/huddle/node_modules/ws/lib/event-target.js +0 -292
  592. package/scripts/huddle/node_modules/ws/lib/extension.js +0 -203
  593. package/scripts/huddle/node_modules/ws/lib/limiter.js +0 -55
  594. package/scripts/huddle/node_modules/ws/lib/permessage-deflate.js +0 -528
  595. package/scripts/huddle/node_modules/ws/lib/receiver.js +0 -706
  596. package/scripts/huddle/node_modules/ws/lib/sender.js +0 -602
  597. package/scripts/huddle/node_modules/ws/lib/stream.js +0 -161
  598. package/scripts/huddle/node_modules/ws/lib/subprotocol.js +0 -62
  599. package/scripts/huddle/node_modules/ws/lib/validation.js +0 -152
  600. package/scripts/huddle/node_modules/ws/lib/websocket-server.js +0 -554
  601. package/scripts/huddle/node_modules/ws/lib/websocket.js +0 -1393
  602. package/scripts/huddle/node_modules/ws/package.json +0 -70
  603. package/scripts/huddle/node_modules/ws/wrapper.mjs +0 -21
  604. package/scripts/local-triggers/plists/ai.adaptic.slack-events-server.plist +0 -45
@@ -1,2249 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import * as MessagesMessagesAPI from './messages';
5
- import * as BetaAPI from '../beta';
6
- import * as MessagesAPI from '../../messages/messages';
7
- import * as BatchesAPI from './batches';
8
- import {
9
- BatchCancelParams,
10
- BatchCreateParams,
11
- BatchDeleteParams,
12
- BatchListParams,
13
- BatchResultsParams,
14
- BatchRetrieveParams,
15
- Batches,
16
- BetaDeletedMessageBatch,
17
- BetaMessageBatch,
18
- BetaMessageBatchCanceledResult,
19
- BetaMessageBatchErroredResult,
20
- BetaMessageBatchExpiredResult,
21
- BetaMessageBatchIndividualResponse,
22
- BetaMessageBatchRequestCounts,
23
- BetaMessageBatchResult,
24
- BetaMessageBatchSucceededResult,
25
- BetaMessageBatchesPage,
26
- } from './batches';
27
- import { APIPromise } from '../../../core/api-promise';
28
- import { Stream } from '../../../core/streaming';
29
- import { buildHeaders } from '../../../internal/headers';
30
- import { RequestOptions } from '../../../internal/request-options';
31
- import type { Model } from '../../messages/messages';
32
- import { BetaMessageStream } from '../../../lib/BetaMessageStream';
33
-
34
- const DEPRECATED_MODELS: {
35
- [K in Model]?: string;
36
- } = {
37
- 'claude-1.3': 'November 6th, 2024',
38
- 'claude-1.3-100k': 'November 6th, 2024',
39
- 'claude-instant-1.1': 'November 6th, 2024',
40
- 'claude-instant-1.1-100k': 'November 6th, 2024',
41
- 'claude-instant-1.2': 'November 6th, 2024',
42
- 'claude-3-sonnet-20240229': 'July 21st, 2025',
43
- 'claude-2.1': 'July 21st, 2025',
44
- 'claude-2.0': 'July 21st, 2025',
45
- };
46
- import { MODEL_NONSTREAMING_TOKENS } from '../../../internal/constants';
47
-
48
- export class Messages extends APIResource {
49
- batches: BatchesAPI.Batches = new BatchesAPI.Batches(this._client);
50
-
51
- /**
52
- * Send a structured list of input messages with text and/or image content, and the
53
- * model will generate the next message in the conversation.
54
- *
55
- * The Messages API can be used for either single queries or stateless multi-turn
56
- * conversations.
57
- *
58
- * Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
59
- *
60
- * @example
61
- * ```ts
62
- * const betaMessage = await client.beta.messages.create({
63
- * max_tokens: 1024,
64
- * messages: [{ content: 'Hello, world', role: 'user' }],
65
- * model: 'claude-3-7-sonnet-20250219',
66
- * });
67
- * ```
68
- */
69
- create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise<BetaMessage>;
70
- create(
71
- params: MessageCreateParamsStreaming,
72
- options?: RequestOptions,
73
- ): APIPromise<Stream<BetaRawMessageStreamEvent>>;
74
- create(
75
- params: MessageCreateParamsBase,
76
- options?: RequestOptions,
77
- ): APIPromise<Stream<BetaRawMessageStreamEvent> | BetaMessage>;
78
- create(
79
- params: MessageCreateParams,
80
- options?: RequestOptions,
81
- ): APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>> {
82
- const { betas, ...body } = params;
83
-
84
- if (body.model in DEPRECATED_MODELS) {
85
- console.warn(
86
- `The model '${body.model}' is deprecated and will reach end-of-life on ${
87
- DEPRECATED_MODELS[body.model]
88
- }\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`,
89
- );
90
- }
91
-
92
- let timeout = (this._client as any)._options.timeout as number | null;
93
- if (!body.stream && timeout == null) {
94
- const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined;
95
- timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens);
96
- }
97
- return this._client.post('/v1/messages?beta=true', {
98
- body,
99
- timeout: timeout ?? 600000,
100
- ...options,
101
- headers: buildHeaders([
102
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
103
- options?.headers,
104
- ]),
105
- stream: params.stream ?? false,
106
- }) as APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>>;
107
- }
108
-
109
- /**
110
- * Create a Message stream
111
- */
112
- stream(body: BetaMessageStreamParams, options?: RequestOptions): BetaMessageStream {
113
- return BetaMessageStream.createMessage(this, body, options);
114
- }
115
-
116
- /**
117
- * Count the number of tokens in a Message.
118
- *
119
- * The Token Count API can be used to count the number of tokens in a Message,
120
- * including tools, images, and documents, without creating it.
121
- *
122
- * Learn more about token counting in our
123
- * [user guide](/en/docs/build-with-claude/token-counting)
124
- *
125
- * @example
126
- * ```ts
127
- * const betaMessageTokensCount =
128
- * await client.beta.messages.countTokens({
129
- * messages: [{ content: 'string', role: 'user' }],
130
- * model: 'claude-3-7-sonnet-latest',
131
- * });
132
- * ```
133
- */
134
- countTokens(
135
- params: MessageCountTokensParams,
136
- options?: RequestOptions,
137
- ): APIPromise<BetaMessageTokensCount> {
138
- const { betas, ...body } = params;
139
- return this._client.post('/v1/messages/count_tokens?beta=true', {
140
- body,
141
- ...options,
142
- headers: buildHeaders([
143
- { 'anthropic-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString() },
144
- options?.headers,
145
- ]),
146
- });
147
- }
148
- }
149
-
150
- export type BetaMessageStreamParams = MessageCreateParamsBase;
151
-
152
- export interface BetaBase64ImageSource {
153
- data: string;
154
-
155
- media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
156
-
157
- type: 'base64';
158
- }
159
-
160
- export interface BetaBase64PDFBlock {
161
- source:
162
- | BetaBase64PDFSource
163
- | BetaPlainTextSource
164
- | BetaContentBlockSource
165
- | BetaURLPDFSource
166
- | BetaFileDocumentSource;
167
-
168
- type: 'document';
169
-
170
- /**
171
- * Create a cache control breakpoint at this content block.
172
- */
173
- cache_control?: BetaCacheControlEphemeral | null;
174
-
175
- citations?: BetaCitationsConfigParam;
176
-
177
- context?: string | null;
178
-
179
- title?: string | null;
180
- }
181
-
182
- export interface BetaBase64PDFSource {
183
- data: string;
184
-
185
- media_type: 'application/pdf';
186
-
187
- type: 'base64';
188
- }
189
-
190
- export interface BetaCacheControlEphemeral {
191
- type: 'ephemeral';
192
-
193
- /**
194
- * The time-to-live for the cache control breakpoint.
195
- *
196
- * This may be one the following values:
197
- *
198
- * - `5m`: 5 minutes
199
- * - `1h`: 1 hour
200
- *
201
- * Defaults to `5m`.
202
- */
203
- ttl?: '5m' | '1h';
204
- }
205
-
206
- export interface BetaCacheCreation {
207
- /**
208
- * The number of input tokens used to create the 1 hour cache entry.
209
- */
210
- ephemeral_1h_input_tokens: number;
211
-
212
- /**
213
- * The number of input tokens used to create the 5 minute cache entry.
214
- */
215
- ephemeral_5m_input_tokens: number;
216
- }
217
-
218
- export interface BetaCitationCharLocation {
219
- cited_text: string;
220
-
221
- document_index: number;
222
-
223
- document_title: string | null;
224
-
225
- end_char_index: number;
226
-
227
- start_char_index: number;
228
-
229
- type: 'char_location';
230
- }
231
-
232
- export interface BetaCitationCharLocationParam {
233
- cited_text: string;
234
-
235
- document_index: number;
236
-
237
- document_title: string | null;
238
-
239
- end_char_index: number;
240
-
241
- start_char_index: number;
242
-
243
- type: 'char_location';
244
- }
245
-
246
- export interface BetaCitationContentBlockLocation {
247
- cited_text: string;
248
-
249
- document_index: number;
250
-
251
- document_title: string | null;
252
-
253
- end_block_index: number;
254
-
255
- start_block_index: number;
256
-
257
- type: 'content_block_location';
258
- }
259
-
260
- export interface BetaCitationContentBlockLocationParam {
261
- cited_text: string;
262
-
263
- document_index: number;
264
-
265
- document_title: string | null;
266
-
267
- end_block_index: number;
268
-
269
- start_block_index: number;
270
-
271
- type: 'content_block_location';
272
- }
273
-
274
- export interface BetaCitationPageLocation {
275
- cited_text: string;
276
-
277
- document_index: number;
278
-
279
- document_title: string | null;
280
-
281
- end_page_number: number;
282
-
283
- start_page_number: number;
284
-
285
- type: 'page_location';
286
- }
287
-
288
- export interface BetaCitationPageLocationParam {
289
- cited_text: string;
290
-
291
- document_index: number;
292
-
293
- document_title: string | null;
294
-
295
- end_page_number: number;
296
-
297
- start_page_number: number;
298
-
299
- type: 'page_location';
300
- }
301
-
302
- export interface BetaCitationWebSearchResultLocationParam {
303
- cited_text: string;
304
-
305
- encrypted_index: string;
306
-
307
- title: string | null;
308
-
309
- type: 'web_search_result_location';
310
-
311
- url: string;
312
- }
313
-
314
- export interface BetaCitationsConfigParam {
315
- enabled?: boolean;
316
- }
317
-
318
- export interface BetaCitationsDelta {
319
- citation:
320
- | BetaCitationCharLocation
321
- | BetaCitationPageLocation
322
- | BetaCitationContentBlockLocation
323
- | BetaCitationsWebSearchResultLocation;
324
-
325
- type: 'citations_delta';
326
- }
327
-
328
- export interface BetaCitationsWebSearchResultLocation {
329
- cited_text: string;
330
-
331
- encrypted_index: string;
332
-
333
- title: string | null;
334
-
335
- type: 'web_search_result_location';
336
-
337
- url: string;
338
- }
339
-
340
- export interface BetaCodeExecutionOutputBlock {
341
- file_id: string;
342
-
343
- type: 'code_execution_output';
344
- }
345
-
346
- export interface BetaCodeExecutionOutputBlockParam {
347
- file_id: string;
348
-
349
- type: 'code_execution_output';
350
- }
351
-
352
- export interface BetaCodeExecutionResultBlock {
353
- content: Array<BetaCodeExecutionOutputBlock>;
354
-
355
- return_code: number;
356
-
357
- stderr: string;
358
-
359
- stdout: string;
360
-
361
- type: 'code_execution_result';
362
- }
363
-
364
- export interface BetaCodeExecutionResultBlockParam {
365
- content: Array<BetaCodeExecutionOutputBlockParam>;
366
-
367
- return_code: number;
368
-
369
- stderr: string;
370
-
371
- stdout: string;
372
-
373
- type: 'code_execution_result';
374
- }
375
-
376
- export interface BetaCodeExecutionTool20250522 {
377
- /**
378
- * Name of the tool.
379
- *
380
- * This is how the tool will be called by the model and in `tool_use` blocks.
381
- */
382
- name: 'code_execution';
383
-
384
- type: 'code_execution_20250522';
385
-
386
- /**
387
- * Create a cache control breakpoint at this content block.
388
- */
389
- cache_control?: BetaCacheControlEphemeral | null;
390
- }
391
-
392
- export interface BetaCodeExecutionToolResultBlock {
393
- content: BetaCodeExecutionToolResultBlockContent;
394
-
395
- tool_use_id: string;
396
-
397
- type: 'code_execution_tool_result';
398
- }
399
-
400
- export type BetaCodeExecutionToolResultBlockContent =
401
- | BetaCodeExecutionToolResultError
402
- | BetaCodeExecutionResultBlock;
403
-
404
- export interface BetaCodeExecutionToolResultBlockParam {
405
- content: BetaCodeExecutionToolResultBlockParamContent;
406
-
407
- tool_use_id: string;
408
-
409
- type: 'code_execution_tool_result';
410
-
411
- /**
412
- * Create a cache control breakpoint at this content block.
413
- */
414
- cache_control?: BetaCacheControlEphemeral | null;
415
- }
416
-
417
- export type BetaCodeExecutionToolResultBlockParamContent =
418
- | BetaCodeExecutionToolResultErrorParam
419
- | BetaCodeExecutionResultBlockParam;
420
-
421
- export interface BetaCodeExecutionToolResultError {
422
- error_code: BetaCodeExecutionToolResultErrorCode;
423
-
424
- type: 'code_execution_tool_result_error';
425
- }
426
-
427
- export type BetaCodeExecutionToolResultErrorCode =
428
- | 'invalid_tool_input'
429
- | 'unavailable'
430
- | 'too_many_requests'
431
- | 'execution_time_exceeded';
432
-
433
- export interface BetaCodeExecutionToolResultErrorParam {
434
- error_code: BetaCodeExecutionToolResultErrorCode;
435
-
436
- type: 'code_execution_tool_result_error';
437
- }
438
-
439
- /**
440
- * Information about the container used in the request (for the code execution
441
- * tool)
442
- */
443
- export interface BetaContainer {
444
- /**
445
- * Identifier for the container used in this request
446
- */
447
- id: string;
448
-
449
- /**
450
- * The time at which the container will expire.
451
- */
452
- expires_at: string;
453
- }
454
-
455
- /**
456
- * Response model for a file uploaded to the container.
457
- */
458
- export interface BetaContainerUploadBlock {
459
- file_id: string;
460
-
461
- type: 'container_upload';
462
- }
463
-
464
- /**
465
- * A content block that represents a file to be uploaded to the container Files
466
- * uploaded via this block will be available in the container's input directory.
467
- */
468
- export interface BetaContainerUploadBlockParam {
469
- file_id: string;
470
-
471
- type: 'container_upload';
472
-
473
- /**
474
- * Create a cache control breakpoint at this content block.
475
- */
476
- cache_control?: BetaCacheControlEphemeral | null;
477
- }
478
-
479
- /**
480
- * Response model for a file uploaded to the container.
481
- */
482
- export type BetaContentBlock =
483
- | BetaTextBlock
484
- | BetaToolUseBlock
485
- | BetaServerToolUseBlock
486
- | BetaWebSearchToolResultBlock
487
- | BetaCodeExecutionToolResultBlock
488
- | BetaMCPToolUseBlock
489
- | BetaMCPToolResultBlock
490
- | BetaContainerUploadBlock
491
- | BetaThinkingBlock
492
- | BetaRedactedThinkingBlock;
493
-
494
- /**
495
- * Regular text content.
496
- */
497
- export type BetaContentBlockParam =
498
- | BetaServerToolUseBlockParam
499
- | BetaWebSearchToolResultBlockParam
500
- | BetaCodeExecutionToolResultBlockParam
501
- | BetaMCPToolUseBlockParam
502
- | BetaRequestMCPToolResultBlockParam
503
- | BetaTextBlockParam
504
- | BetaImageBlockParam
505
- | BetaToolUseBlockParam
506
- | BetaToolResultBlockParam
507
- | BetaBase64PDFBlock
508
- | BetaThinkingBlockParam
509
- | BetaRedactedThinkingBlockParam
510
- | BetaContainerUploadBlockParam;
511
-
512
- export interface BetaContentBlockSource {
513
- content: string | Array<BetaContentBlockSourceContent>;
514
-
515
- type: 'content';
516
- }
517
-
518
- export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam;
519
-
520
- export interface BetaFileDocumentSource {
521
- file_id: string;
522
-
523
- type: 'file';
524
- }
525
-
526
- export interface BetaFileImageSource {
527
- file_id: string;
528
-
529
- type: 'file';
530
- }
531
-
532
- export interface BetaImageBlockParam {
533
- source: BetaBase64ImageSource | BetaURLImageSource | BetaFileImageSource;
534
-
535
- type: 'image';
536
-
537
- /**
538
- * Create a cache control breakpoint at this content block.
539
- */
540
- cache_control?: BetaCacheControlEphemeral | null;
541
- }
542
-
543
- export interface BetaInputJSONDelta {
544
- partial_json: string;
545
-
546
- type: 'input_json_delta';
547
- }
548
-
549
- export interface BetaMCPToolResultBlock {
550
- content: string | Array<BetaTextBlock>;
551
-
552
- is_error: boolean;
553
-
554
- tool_use_id: string;
555
-
556
- type: 'mcp_tool_result';
557
- }
558
-
559
- export interface BetaMCPToolUseBlock {
560
- id: string;
561
-
562
- input: unknown;
563
-
564
- /**
565
- * The name of the MCP tool
566
- */
567
- name: string;
568
-
569
- /**
570
- * The name of the MCP server
571
- */
572
- server_name: string;
573
-
574
- type: 'mcp_tool_use';
575
- }
576
-
577
- export interface BetaMCPToolUseBlockParam {
578
- id: string;
579
-
580
- input: unknown;
581
-
582
- name: string;
583
-
584
- /**
585
- * The name of the MCP server
586
- */
587
- server_name: string;
588
-
589
- type: 'mcp_tool_use';
590
-
591
- /**
592
- * Create a cache control breakpoint at this content block.
593
- */
594
- cache_control?: BetaCacheControlEphemeral | null;
595
- }
596
-
597
- export interface BetaMessage {
598
- /**
599
- * Unique object identifier.
600
- *
601
- * The format and length of IDs may change over time.
602
- */
603
- id: string;
604
-
605
- /**
606
- * Information about the container used in the request (for the code execution
607
- * tool)
608
- */
609
- container: BetaContainer | null;
610
-
611
- /**
612
- * Content generated by the model.
613
- *
614
- * This is an array of content blocks, each of which has a `type` that determines
615
- * its shape.
616
- *
617
- * Example:
618
- *
619
- * ```json
620
- * [{ "type": "text", "text": "Hi, I'm Claude." }]
621
- * ```
622
- *
623
- * If the request input `messages` ended with an `assistant` turn, then the
624
- * response `content` will continue directly from that last turn. You can use this
625
- * to constrain the model's output.
626
- *
627
- * For example, if the input `messages` were:
628
- *
629
- * ```json
630
- * [
631
- * {
632
- * "role": "user",
633
- * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
634
- * },
635
- * { "role": "assistant", "content": "The best answer is (" }
636
- * ]
637
- * ```
638
- *
639
- * Then the response `content` might be:
640
- *
641
- * ```json
642
- * [{ "type": "text", "text": "B)" }]
643
- * ```
644
- */
645
- content: Array<BetaContentBlock>;
646
-
647
- /**
648
- * The model that will complete your prompt.\n\nSee
649
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
650
- * details and options.
651
- */
652
- model: MessagesAPI.Model;
653
-
654
- /**
655
- * Conversational role of the generated message.
656
- *
657
- * This will always be `"assistant"`.
658
- */
659
- role: 'assistant';
660
-
661
- /**
662
- * The reason that we stopped.
663
- *
664
- * This may be one the following values:
665
- *
666
- * - `"end_turn"`: the model reached a natural stopping point
667
- * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
668
- * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
669
- * - `"tool_use"`: the model invoked one or more tools
670
- *
671
- * In non-streaming mode this value is always non-null. In streaming mode, it is
672
- * null in the `message_start` event and non-null otherwise.
673
- */
674
- stop_reason: BetaStopReason | null;
675
-
676
- /**
677
- * Which custom stop sequence was generated, if any.
678
- *
679
- * This value will be a non-null string if one of your custom stop sequences was
680
- * generated.
681
- */
682
- stop_sequence: string | null;
683
-
684
- /**
685
- * Object type.
686
- *
687
- * For Messages, this is always `"message"`.
688
- */
689
- type: 'message';
690
-
691
- /**
692
- * Billing and rate-limit usage.
693
- *
694
- * Anthropic's API bills and rate-limits by token counts, as tokens represent the
695
- * underlying cost to our systems.
696
- *
697
- * Under the hood, the API transforms requests into a format suitable for the
698
- * model. The model's output then goes through a parsing stage before becoming an
699
- * API response. As a result, the token counts in `usage` will not match one-to-one
700
- * with the exact visible content of an API request or response.
701
- *
702
- * For example, `output_tokens` will be non-zero, even for an empty string response
703
- * from Claude.
704
- *
705
- * Total input tokens in a request is the summation of `input_tokens`,
706
- * `cache_creation_input_tokens`, and `cache_read_input_tokens`.
707
- */
708
- usage: BetaUsage;
709
- }
710
-
711
- export interface BetaMessageDeltaUsage {
712
- /**
713
- * The cumulative number of input tokens used to create the cache entry.
714
- */
715
- cache_creation_input_tokens: number | null;
716
-
717
- /**
718
- * The cumulative number of input tokens read from the cache.
719
- */
720
- cache_read_input_tokens: number | null;
721
-
722
- /**
723
- * The cumulative number of input tokens which were used.
724
- */
725
- input_tokens: number | null;
726
-
727
- /**
728
- * The cumulative number of output tokens which were used.
729
- */
730
- output_tokens: number;
731
-
732
- /**
733
- * The number of server tool requests.
734
- */
735
- server_tool_use: BetaServerToolUsage | null;
736
- }
737
-
738
- export interface BetaMessageParam {
739
- content: string | Array<BetaContentBlockParam>;
740
-
741
- role: 'user' | 'assistant';
742
- }
743
-
744
- export interface BetaMessageTokensCount {
745
- /**
746
- * The total number of tokens across the provided list of messages, system prompt,
747
- * and tools.
748
- */
749
- input_tokens: number;
750
- }
751
-
752
- export interface BetaMetadata {
753
- /**
754
- * An external identifier for the user who is associated with the request.
755
- *
756
- * This should be a uuid, hash value, or other opaque identifier. Anthropic may use
757
- * this id to help detect abuse. Do not include any identifying information such as
758
- * name, email address, or phone number.
759
- */
760
- user_id?: string | null;
761
- }
762
-
763
- export interface BetaPlainTextSource {
764
- data: string;
765
-
766
- media_type: 'text/plain';
767
-
768
- type: 'text';
769
- }
770
-
771
- export type BetaRawContentBlockDelta =
772
- | BetaTextDelta
773
- | BetaInputJSONDelta
774
- | BetaCitationsDelta
775
- | BetaThinkingDelta
776
- | BetaSignatureDelta;
777
-
778
- export interface BetaRawContentBlockDeltaEvent {
779
- delta: BetaRawContentBlockDelta;
780
-
781
- index: number;
782
-
783
- type: 'content_block_delta';
784
- }
785
-
786
- export interface BetaRawContentBlockStartEvent {
787
- /**
788
- * Response model for a file uploaded to the container.
789
- */
790
- content_block:
791
- | BetaTextBlock
792
- | BetaToolUseBlock
793
- | BetaServerToolUseBlock
794
- | BetaWebSearchToolResultBlock
795
- | BetaCodeExecutionToolResultBlock
796
- | BetaMCPToolUseBlock
797
- | BetaMCPToolResultBlock
798
- | BetaContainerUploadBlock
799
- | BetaThinkingBlock
800
- | BetaRedactedThinkingBlock;
801
-
802
- index: number;
803
-
804
- type: 'content_block_start';
805
- }
806
-
807
- export interface BetaRawContentBlockStopEvent {
808
- index: number;
809
-
810
- type: 'content_block_stop';
811
- }
812
-
813
- export interface BetaRawMessageDeltaEvent {
814
- delta: BetaRawMessageDeltaEvent.Delta;
815
-
816
- type: 'message_delta';
817
-
818
- /**
819
- * Billing and rate-limit usage.
820
- *
821
- * Anthropic's API bills and rate-limits by token counts, as tokens represent the
822
- * underlying cost to our systems.
823
- *
824
- * Under the hood, the API transforms requests into a format suitable for the
825
- * model. The model's output then goes through a parsing stage before becoming an
826
- * API response. As a result, the token counts in `usage` will not match one-to-one
827
- * with the exact visible content of an API request or response.
828
- *
829
- * For example, `output_tokens` will be non-zero, even for an empty string response
830
- * from Claude.
831
- *
832
- * Total input tokens in a request is the summation of `input_tokens`,
833
- * `cache_creation_input_tokens`, and `cache_read_input_tokens`.
834
- */
835
- usage: BetaMessageDeltaUsage;
836
- }
837
-
838
- export namespace BetaRawMessageDeltaEvent {
839
- export interface Delta {
840
- /**
841
- * Information about the container used in the request (for the code execution
842
- * tool)
843
- */
844
- container: MessagesMessagesAPI.BetaContainer | null;
845
-
846
- stop_reason: MessagesMessagesAPI.BetaStopReason | null;
847
-
848
- stop_sequence: string | null;
849
- }
850
- }
851
-
852
- export interface BetaRawMessageStartEvent {
853
- message: BetaMessage;
854
-
855
- type: 'message_start';
856
- }
857
-
858
- export interface BetaRawMessageStopEvent {
859
- type: 'message_stop';
860
- }
861
-
862
- export type BetaRawMessageStreamEvent =
863
- | BetaRawMessageStartEvent
864
- | BetaRawMessageDeltaEvent
865
- | BetaRawMessageStopEvent
866
- | BetaRawContentBlockStartEvent
867
- | BetaRawContentBlockDeltaEvent
868
- | BetaRawContentBlockStopEvent;
869
-
870
- export interface BetaRedactedThinkingBlock {
871
- data: string;
872
-
873
- type: 'redacted_thinking';
874
- }
875
-
876
- export interface BetaRedactedThinkingBlockParam {
877
- data: string;
878
-
879
- type: 'redacted_thinking';
880
- }
881
-
882
- export interface BetaRequestMCPServerToolConfiguration {
883
- allowed_tools?: Array<string> | null;
884
-
885
- enabled?: boolean | null;
886
- }
887
-
888
- export interface BetaRequestMCPServerURLDefinition {
889
- name: string;
890
-
891
- type: 'url';
892
-
893
- url: string;
894
-
895
- authorization_token?: string | null;
896
-
897
- tool_configuration?: BetaRequestMCPServerToolConfiguration | null;
898
- }
899
-
900
- export interface BetaRequestMCPToolResultBlockParam {
901
- tool_use_id: string;
902
-
903
- type: 'mcp_tool_result';
904
-
905
- /**
906
- * Create a cache control breakpoint at this content block.
907
- */
908
- cache_control?: BetaCacheControlEphemeral | null;
909
-
910
- content?: string | Array<BetaTextBlockParam>;
911
-
912
- is_error?: boolean;
913
- }
914
-
915
- export interface BetaServerToolUsage {
916
- /**
917
- * The number of web search tool requests.
918
- */
919
- web_search_requests: number;
920
- }
921
-
922
- export interface BetaServerToolUseBlock {
923
- id: string;
924
-
925
- input: unknown;
926
-
927
- name: 'web_search' | 'code_execution';
928
-
929
- type: 'server_tool_use';
930
- }
931
-
932
- export interface BetaServerToolUseBlockParam {
933
- id: string;
934
-
935
- input: unknown;
936
-
937
- name: 'web_search' | 'code_execution';
938
-
939
- type: 'server_tool_use';
940
-
941
- /**
942
- * Create a cache control breakpoint at this content block.
943
- */
944
- cache_control?: BetaCacheControlEphemeral | null;
945
- }
946
-
947
- export interface BetaSignatureDelta {
948
- signature: string;
949
-
950
- type: 'signature_delta';
951
- }
952
-
953
- export type BetaStopReason =
954
- | 'end_turn'
955
- | 'max_tokens'
956
- | 'stop_sequence'
957
- | 'tool_use'
958
- | 'pause_turn'
959
- | 'refusal';
960
-
961
- export interface BetaTextBlock {
962
- /**
963
- * Citations supporting the text block.
964
- *
965
- * The type of citation returned will depend on the type of document being cited.
966
- * Citing a PDF results in `page_location`, plain text results in `char_location`,
967
- * and content document results in `content_block_location`.
968
- */
969
- citations: Array<BetaTextCitation> | null;
970
-
971
- text: string;
972
-
973
- type: 'text';
974
- }
975
-
976
- export interface BetaTextBlockParam {
977
- text: string;
978
-
979
- type: 'text';
980
-
981
- /**
982
- * Create a cache control breakpoint at this content block.
983
- */
984
- cache_control?: BetaCacheControlEphemeral | null;
985
-
986
- citations?: Array<BetaTextCitationParam> | null;
987
- }
988
-
989
- export type BetaTextCitation =
990
- | BetaCitationCharLocation
991
- | BetaCitationPageLocation
992
- | BetaCitationContentBlockLocation
993
- | BetaCitationsWebSearchResultLocation;
994
-
995
- export type BetaTextCitationParam =
996
- | BetaCitationCharLocationParam
997
- | BetaCitationPageLocationParam
998
- | BetaCitationContentBlockLocationParam
999
- | BetaCitationWebSearchResultLocationParam;
1000
-
1001
- export interface BetaTextDelta {
1002
- text: string;
1003
-
1004
- type: 'text_delta';
1005
- }
1006
-
1007
- export interface BetaThinkingBlock {
1008
- signature: string;
1009
-
1010
- thinking: string;
1011
-
1012
- type: 'thinking';
1013
- }
1014
-
1015
- export interface BetaThinkingBlockParam {
1016
- signature: string;
1017
-
1018
- thinking: string;
1019
-
1020
- type: 'thinking';
1021
- }
1022
-
1023
- export interface BetaThinkingConfigDisabled {
1024
- type: 'disabled';
1025
- }
1026
-
1027
- export interface BetaThinkingConfigEnabled {
1028
- /**
1029
- * Determines how many tokens Claude can use for its internal reasoning process.
1030
- * Larger budgets can enable more thorough analysis for complex problems, improving
1031
- * response quality.
1032
- *
1033
- * Must be ≥1024 and less than `max_tokens`.
1034
- *
1035
- * See
1036
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
1037
- * for details.
1038
- */
1039
- budget_tokens: number;
1040
-
1041
- type: 'enabled';
1042
- }
1043
-
1044
- /**
1045
- * Configuration for enabling Claude's extended thinking.
1046
- *
1047
- * When enabled, responses include `thinking` content blocks showing Claude's
1048
- * thinking process before the final answer. Requires a minimum budget of 1,024
1049
- * tokens and counts towards your `max_tokens` limit.
1050
- *
1051
- * See
1052
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
1053
- * for details.
1054
- */
1055
- export type BetaThinkingConfigParam = BetaThinkingConfigEnabled | BetaThinkingConfigDisabled;
1056
-
1057
- export interface BetaThinkingDelta {
1058
- thinking: string;
1059
-
1060
- type: 'thinking_delta';
1061
- }
1062
-
1063
- export interface BetaTool {
1064
- /**
1065
- * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
1066
- *
1067
- * This defines the shape of the `input` that your tool accepts and that the model
1068
- * will produce.
1069
- */
1070
- input_schema: BetaTool.InputSchema;
1071
-
1072
- /**
1073
- * Name of the tool.
1074
- *
1075
- * This is how the tool will be called by the model and in `tool_use` blocks.
1076
- */
1077
- name: string;
1078
-
1079
- /**
1080
- * Create a cache control breakpoint at this content block.
1081
- */
1082
- cache_control?: BetaCacheControlEphemeral | null;
1083
-
1084
- /**
1085
- * Description of what this tool does.
1086
- *
1087
- * Tool descriptions should be as detailed as possible. The more information that
1088
- * the model has about what the tool is and how to use it, the better it will
1089
- * perform. You can use natural language descriptions to reinforce important
1090
- * aspects of the tool input JSON schema.
1091
- */
1092
- description?: string;
1093
-
1094
- type?: 'custom' | null;
1095
- }
1096
-
1097
- export namespace BetaTool {
1098
- /**
1099
- * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
1100
- *
1101
- * This defines the shape of the `input` that your tool accepts and that the model
1102
- * will produce.
1103
- */
1104
- export interface InputSchema {
1105
- type: 'object';
1106
-
1107
- properties?: unknown | null;
1108
-
1109
- [k: string]: unknown;
1110
- }
1111
- }
1112
-
1113
- export interface BetaToolBash20241022 {
1114
- /**
1115
- * Name of the tool.
1116
- *
1117
- * This is how the tool will be called by the model and in `tool_use` blocks.
1118
- */
1119
- name: 'bash';
1120
-
1121
- type: 'bash_20241022';
1122
-
1123
- /**
1124
- * Create a cache control breakpoint at this content block.
1125
- */
1126
- cache_control?: BetaCacheControlEphemeral | null;
1127
- }
1128
-
1129
- export interface BetaToolBash20250124 {
1130
- /**
1131
- * Name of the tool.
1132
- *
1133
- * This is how the tool will be called by the model and in `tool_use` blocks.
1134
- */
1135
- name: 'bash';
1136
-
1137
- type: 'bash_20250124';
1138
-
1139
- /**
1140
- * Create a cache control breakpoint at this content block.
1141
- */
1142
- cache_control?: BetaCacheControlEphemeral | null;
1143
- }
1144
-
1145
- /**
1146
- * How the model should use the provided tools. The model can use a specific tool,
1147
- * any available tool, decide by itself, or not use tools at all.
1148
- */
1149
- export type BetaToolChoice = BetaToolChoiceAuto | BetaToolChoiceAny | BetaToolChoiceTool | BetaToolChoiceNone;
1150
-
1151
- /**
1152
- * The model will use any available tools.
1153
- */
1154
- export interface BetaToolChoiceAny {
1155
- type: 'any';
1156
-
1157
- /**
1158
- * Whether to disable parallel tool use.
1159
- *
1160
- * Defaults to `false`. If set to `true`, the model will output exactly one tool
1161
- * use.
1162
- */
1163
- disable_parallel_tool_use?: boolean;
1164
- }
1165
-
1166
- /**
1167
- * The model will automatically decide whether to use tools.
1168
- */
1169
- export interface BetaToolChoiceAuto {
1170
- type: 'auto';
1171
-
1172
- /**
1173
- * Whether to disable parallel tool use.
1174
- *
1175
- * Defaults to `false`. If set to `true`, the model will output at most one tool
1176
- * use.
1177
- */
1178
- disable_parallel_tool_use?: boolean;
1179
- }
1180
-
1181
- /**
1182
- * The model will not be allowed to use tools.
1183
- */
1184
- export interface BetaToolChoiceNone {
1185
- type: 'none';
1186
- }
1187
-
1188
- /**
1189
- * The model will use the specified tool with `tool_choice.name`.
1190
- */
1191
- export interface BetaToolChoiceTool {
1192
- /**
1193
- * The name of the tool to use.
1194
- */
1195
- name: string;
1196
-
1197
- type: 'tool';
1198
-
1199
- /**
1200
- * Whether to disable parallel tool use.
1201
- *
1202
- * Defaults to `false`. If set to `true`, the model will output exactly one tool
1203
- * use.
1204
- */
1205
- disable_parallel_tool_use?: boolean;
1206
- }
1207
-
1208
- export interface BetaToolComputerUse20241022 {
1209
- /**
1210
- * The height of the display in pixels.
1211
- */
1212
- display_height_px: number;
1213
-
1214
- /**
1215
- * The width of the display in pixels.
1216
- */
1217
- display_width_px: number;
1218
-
1219
- /**
1220
- * Name of the tool.
1221
- *
1222
- * This is how the tool will be called by the model and in `tool_use` blocks.
1223
- */
1224
- name: 'computer';
1225
-
1226
- type: 'computer_20241022';
1227
-
1228
- /**
1229
- * Create a cache control breakpoint at this content block.
1230
- */
1231
- cache_control?: BetaCacheControlEphemeral | null;
1232
-
1233
- /**
1234
- * The X11 display number (e.g. 0, 1) for the display.
1235
- */
1236
- display_number?: number | null;
1237
- }
1238
-
1239
- export interface BetaToolComputerUse20250124 {
1240
- /**
1241
- * The height of the display in pixels.
1242
- */
1243
- display_height_px: number;
1244
-
1245
- /**
1246
- * The width of the display in pixels.
1247
- */
1248
- display_width_px: number;
1249
-
1250
- /**
1251
- * Name of the tool.
1252
- *
1253
- * This is how the tool will be called by the model and in `tool_use` blocks.
1254
- */
1255
- name: 'computer';
1256
-
1257
- type: 'computer_20250124';
1258
-
1259
- /**
1260
- * Create a cache control breakpoint at this content block.
1261
- */
1262
- cache_control?: BetaCacheControlEphemeral | null;
1263
-
1264
- /**
1265
- * The X11 display number (e.g. 0, 1) for the display.
1266
- */
1267
- display_number?: number | null;
1268
- }
1269
-
1270
- export interface BetaToolResultBlockParam {
1271
- tool_use_id: string;
1272
-
1273
- type: 'tool_result';
1274
-
1275
- /**
1276
- * Create a cache control breakpoint at this content block.
1277
- */
1278
- cache_control?: BetaCacheControlEphemeral | null;
1279
-
1280
- content?: string | Array<BetaTextBlockParam | BetaImageBlockParam>;
1281
-
1282
- is_error?: boolean;
1283
- }
1284
-
1285
- export interface BetaToolTextEditor20241022 {
1286
- /**
1287
- * Name of the tool.
1288
- *
1289
- * This is how the tool will be called by the model and in `tool_use` blocks.
1290
- */
1291
- name: 'str_replace_editor';
1292
-
1293
- type: 'text_editor_20241022';
1294
-
1295
- /**
1296
- * Create a cache control breakpoint at this content block.
1297
- */
1298
- cache_control?: BetaCacheControlEphemeral | null;
1299
- }
1300
-
1301
- export interface BetaToolTextEditor20250124 {
1302
- /**
1303
- * Name of the tool.
1304
- *
1305
- * This is how the tool will be called by the model and in `tool_use` blocks.
1306
- */
1307
- name: 'str_replace_editor';
1308
-
1309
- type: 'text_editor_20250124';
1310
-
1311
- /**
1312
- * Create a cache control breakpoint at this content block.
1313
- */
1314
- cache_control?: BetaCacheControlEphemeral | null;
1315
- }
1316
-
1317
- export interface BetaToolTextEditor20250429 {
1318
- /**
1319
- * Name of the tool.
1320
- *
1321
- * This is how the tool will be called by the model and in `tool_use` blocks.
1322
- */
1323
- name: 'str_replace_based_edit_tool';
1324
-
1325
- type: 'text_editor_20250429';
1326
-
1327
- /**
1328
- * Create a cache control breakpoint at this content block.
1329
- */
1330
- cache_control?: BetaCacheControlEphemeral | null;
1331
- }
1332
-
1333
- export type BetaToolUnion =
1334
- | BetaTool
1335
- | BetaToolComputerUse20241022
1336
- | BetaToolBash20241022
1337
- | BetaToolTextEditor20241022
1338
- | BetaToolComputerUse20250124
1339
- | BetaToolBash20250124
1340
- | BetaToolTextEditor20250124
1341
- | BetaToolTextEditor20250429
1342
- | BetaWebSearchTool20250305
1343
- | BetaCodeExecutionTool20250522;
1344
-
1345
- export interface BetaToolUseBlock {
1346
- id: string;
1347
-
1348
- input: unknown;
1349
-
1350
- name: string;
1351
-
1352
- type: 'tool_use';
1353
- }
1354
-
1355
- export interface BetaToolUseBlockParam {
1356
- id: string;
1357
-
1358
- input: unknown;
1359
-
1360
- name: string;
1361
-
1362
- type: 'tool_use';
1363
-
1364
- /**
1365
- * Create a cache control breakpoint at this content block.
1366
- */
1367
- cache_control?: BetaCacheControlEphemeral | null;
1368
- }
1369
-
1370
- export interface BetaURLImageSource {
1371
- type: 'url';
1372
-
1373
- url: string;
1374
- }
1375
-
1376
- export interface BetaURLPDFSource {
1377
- type: 'url';
1378
-
1379
- url: string;
1380
- }
1381
-
1382
- export interface BetaUsage {
1383
- /**
1384
- * Breakdown of cached tokens by TTL
1385
- */
1386
- cache_creation: BetaCacheCreation | null;
1387
-
1388
- /**
1389
- * The number of input tokens used to create the cache entry.
1390
- */
1391
- cache_creation_input_tokens: number | null;
1392
-
1393
- /**
1394
- * The number of input tokens read from the cache.
1395
- */
1396
- cache_read_input_tokens: number | null;
1397
-
1398
- /**
1399
- * The number of input tokens which were used.
1400
- */
1401
- input_tokens: number;
1402
-
1403
- /**
1404
- * The number of output tokens which were used.
1405
- */
1406
- output_tokens: number;
1407
-
1408
- /**
1409
- * The number of server tool requests.
1410
- */
1411
- server_tool_use: BetaServerToolUsage | null;
1412
-
1413
- /**
1414
- * If the request used the priority, standard, or batch tier.
1415
- */
1416
- service_tier: 'standard' | 'priority' | 'batch' | null;
1417
- }
1418
-
1419
- export interface BetaWebSearchResultBlock {
1420
- encrypted_content: string;
1421
-
1422
- page_age: string | null;
1423
-
1424
- title: string;
1425
-
1426
- type: 'web_search_result';
1427
-
1428
- url: string;
1429
- }
1430
-
1431
- export interface BetaWebSearchResultBlockParam {
1432
- encrypted_content: string;
1433
-
1434
- title: string;
1435
-
1436
- type: 'web_search_result';
1437
-
1438
- url: string;
1439
-
1440
- page_age?: string | null;
1441
- }
1442
-
1443
- export interface BetaWebSearchTool20250305 {
1444
- /**
1445
- * Name of the tool.
1446
- *
1447
- * This is how the tool will be called by the model and in `tool_use` blocks.
1448
- */
1449
- name: 'web_search';
1450
-
1451
- type: 'web_search_20250305';
1452
-
1453
- /**
1454
- * If provided, only these domains will be included in results. Cannot be used
1455
- * alongside `blocked_domains`.
1456
- */
1457
- allowed_domains?: Array<string> | null;
1458
-
1459
- /**
1460
- * If provided, these domains will never appear in results. Cannot be used
1461
- * alongside `allowed_domains`.
1462
- */
1463
- blocked_domains?: Array<string> | null;
1464
-
1465
- /**
1466
- * Create a cache control breakpoint at this content block.
1467
- */
1468
- cache_control?: BetaCacheControlEphemeral | null;
1469
-
1470
- /**
1471
- * Maximum number of times the tool can be used in the API request.
1472
- */
1473
- max_uses?: number | null;
1474
-
1475
- /**
1476
- * Parameters for the user's location. Used to provide more relevant search
1477
- * results.
1478
- */
1479
- user_location?: BetaWebSearchTool20250305.UserLocation | null;
1480
- }
1481
-
1482
- export namespace BetaWebSearchTool20250305 {
1483
- /**
1484
- * Parameters for the user's location. Used to provide more relevant search
1485
- * results.
1486
- */
1487
- export interface UserLocation {
1488
- type: 'approximate';
1489
-
1490
- /**
1491
- * The city of the user.
1492
- */
1493
- city?: string | null;
1494
-
1495
- /**
1496
- * The two letter
1497
- * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
1498
- * user.
1499
- */
1500
- country?: string | null;
1501
-
1502
- /**
1503
- * The region of the user.
1504
- */
1505
- region?: string | null;
1506
-
1507
- /**
1508
- * The [IANA timezone](https://nodatime.org/TimeZones) of the user.
1509
- */
1510
- timezone?: string | null;
1511
- }
1512
- }
1513
-
1514
- export interface BetaWebSearchToolRequestError {
1515
- error_code: BetaWebSearchToolResultErrorCode;
1516
-
1517
- type: 'web_search_tool_result_error';
1518
- }
1519
-
1520
- export interface BetaWebSearchToolResultBlock {
1521
- content: BetaWebSearchToolResultBlockContent;
1522
-
1523
- tool_use_id: string;
1524
-
1525
- type: 'web_search_tool_result';
1526
- }
1527
-
1528
- export type BetaWebSearchToolResultBlockContent =
1529
- | BetaWebSearchToolResultError
1530
- | Array<BetaWebSearchResultBlock>;
1531
-
1532
- export interface BetaWebSearchToolResultBlockParam {
1533
- content: BetaWebSearchToolResultBlockParamContent;
1534
-
1535
- tool_use_id: string;
1536
-
1537
- type: 'web_search_tool_result';
1538
-
1539
- /**
1540
- * Create a cache control breakpoint at this content block.
1541
- */
1542
- cache_control?: BetaCacheControlEphemeral | null;
1543
- }
1544
-
1545
- export type BetaWebSearchToolResultBlockParamContent =
1546
- | Array<BetaWebSearchResultBlockParam>
1547
- | BetaWebSearchToolRequestError;
1548
-
1549
- export interface BetaWebSearchToolResultError {
1550
- error_code: BetaWebSearchToolResultErrorCode;
1551
-
1552
- type: 'web_search_tool_result_error';
1553
- }
1554
-
1555
- export type BetaWebSearchToolResultErrorCode =
1556
- | 'invalid_tool_input'
1557
- | 'unavailable'
1558
- | 'max_uses_exceeded'
1559
- | 'too_many_requests'
1560
- | 'query_too_long';
1561
-
1562
- export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
1563
-
1564
- export interface MessageCreateParamsBase {
1565
- /**
1566
- * Body param: The maximum number of tokens to generate before stopping.
1567
- *
1568
- * Note that our models may stop _before_ reaching this maximum. This parameter
1569
- * only specifies the absolute maximum number of tokens to generate.
1570
- *
1571
- * Different models have different maximum values for this parameter. See
1572
- * [models](https://docs.anthropic.com/en/docs/models-overview) for details.
1573
- */
1574
- max_tokens: number;
1575
-
1576
- /**
1577
- * Body param: Input messages.
1578
- *
1579
- * Our models are trained to operate on alternating `user` and `assistant`
1580
- * conversational turns. When creating a new `Message`, you specify the prior
1581
- * conversational turns with the `messages` parameter, and the model then generates
1582
- * the next `Message` in the conversation. Consecutive `user` or `assistant` turns
1583
- * in your request will be combined into a single turn.
1584
- *
1585
- * Each input message must be an object with a `role` and `content`. You can
1586
- * specify a single `user`-role message, or you can include multiple `user` and
1587
- * `assistant` messages.
1588
- *
1589
- * If the final message uses the `assistant` role, the response content will
1590
- * continue immediately from the content in that message. This can be used to
1591
- * constrain part of the model's response.
1592
- *
1593
- * Example with a single `user` message:
1594
- *
1595
- * ```json
1596
- * [{ "role": "user", "content": "Hello, Claude" }]
1597
- * ```
1598
- *
1599
- * Example with multiple conversational turns:
1600
- *
1601
- * ```json
1602
- * [
1603
- * { "role": "user", "content": "Hello there." },
1604
- * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
1605
- * { "role": "user", "content": "Can you explain LLMs in plain English?" }
1606
- * ]
1607
- * ```
1608
- *
1609
- * Example with a partially-filled response from Claude:
1610
- *
1611
- * ```json
1612
- * [
1613
- * {
1614
- * "role": "user",
1615
- * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
1616
- * },
1617
- * { "role": "assistant", "content": "The best answer is (" }
1618
- * ]
1619
- * ```
1620
- *
1621
- * Each input message `content` may be either a single `string` or an array of
1622
- * content blocks, where each block has a specific `type`. Using a `string` for
1623
- * `content` is shorthand for an array of one content block of type `"text"`. The
1624
- * following input messages are equivalent:
1625
- *
1626
- * ```json
1627
- * { "role": "user", "content": "Hello, Claude" }
1628
- * ```
1629
- *
1630
- * ```json
1631
- * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
1632
- * ```
1633
- *
1634
- * Starting with Claude 3 models, you can also send image content blocks:
1635
- *
1636
- * ```json
1637
- * {
1638
- * "role": "user",
1639
- * "content": [
1640
- * {
1641
- * "type": "image",
1642
- * "source": {
1643
- * "type": "base64",
1644
- * "media_type": "image/jpeg",
1645
- * "data": "/9j/4AAQSkZJRg..."
1646
- * }
1647
- * },
1648
- * { "type": "text", "text": "What is in this image?" }
1649
- * ]
1650
- * }
1651
- * ```
1652
- *
1653
- * We currently support the `base64` source type for images, and the `image/jpeg`,
1654
- * `image/png`, `image/gif`, and `image/webp` media types.
1655
- *
1656
- * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
1657
- * more input examples.
1658
- *
1659
- * Note that if you want to include a
1660
- * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
1661
- * the top-level `system` parameter — there is no `"system"` role for input
1662
- * messages in the Messages API.
1663
- *
1664
- * There is a limit of 100000 messages in a single request.
1665
- */
1666
- messages: Array<BetaMessageParam>;
1667
-
1668
- /**
1669
- * Body param: The model that will complete your prompt.\n\nSee
1670
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
1671
- * details and options.
1672
- */
1673
- model: MessagesAPI.Model;
1674
-
1675
- /**
1676
- * Body param: Container identifier for reuse across requests.
1677
- */
1678
- container?: string | null;
1679
-
1680
- /**
1681
- * Body param: MCP servers to be utilized in this request
1682
- */
1683
- mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;
1684
-
1685
- /**
1686
- * Body param: An object describing metadata about the request.
1687
- */
1688
- metadata?: BetaMetadata;
1689
-
1690
- /**
1691
- * Body param: Determines whether to use priority capacity (if available) or
1692
- * standard capacity for this request.
1693
- *
1694
- * Anthropic offers different levels of service for your API requests. See
1695
- * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
1696
- */
1697
- service_tier?: 'auto' | 'standard_only';
1698
-
1699
- /**
1700
- * Body param: Custom text sequences that will cause the model to stop generating.
1701
- *
1702
- * Our models will normally stop when they have naturally completed their turn,
1703
- * which will result in a response `stop_reason` of `"end_turn"`.
1704
- *
1705
- * If you want the model to stop generating when it encounters custom strings of
1706
- * text, you can use the `stop_sequences` parameter. If the model encounters one of
1707
- * the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
1708
- * and the response `stop_sequence` value will contain the matched stop sequence.
1709
- */
1710
- stop_sequences?: Array<string>;
1711
-
1712
- /**
1713
- * Body param: Whether to incrementally stream the response using server-sent
1714
- * events.
1715
- *
1716
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
1717
- * details.
1718
- */
1719
- stream?: boolean;
1720
-
1721
- /**
1722
- * Body param: System prompt.
1723
- *
1724
- * A system prompt is a way of providing context and instructions to Claude, such
1725
- * as specifying a particular goal or role. See our
1726
- * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
1727
- */
1728
- system?: string | Array<BetaTextBlockParam>;
1729
-
1730
- /**
1731
- * Body param: Amount of randomness injected into the response.
1732
- *
1733
- * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
1734
- * for analytical / multiple choice, and closer to `1.0` for creative and
1735
- * generative tasks.
1736
- *
1737
- * Note that even with `temperature` of `0.0`, the results will not be fully
1738
- * deterministic.
1739
- */
1740
- temperature?: number;
1741
-
1742
- /**
1743
- * Body param: Configuration for enabling Claude's extended thinking.
1744
- *
1745
- * When enabled, responses include `thinking` content blocks showing Claude's
1746
- * thinking process before the final answer. Requires a minimum budget of 1,024
1747
- * tokens and counts towards your `max_tokens` limit.
1748
- *
1749
- * See
1750
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
1751
- * for details.
1752
- */
1753
- thinking?: BetaThinkingConfigParam;
1754
-
1755
- /**
1756
- * Body param: How the model should use the provided tools. The model can use a
1757
- * specific tool, any available tool, decide by itself, or not use tools at all.
1758
- */
1759
- tool_choice?: BetaToolChoice;
1760
-
1761
- /**
1762
- * Body param: Definitions of tools that the model may use.
1763
- *
1764
- * If you include `tools` in your API request, the model may return `tool_use`
1765
- * content blocks that represent the model's use of those tools. You can then run
1766
- * those tools using the tool input generated by the model and then optionally
1767
- * return results back to the model using `tool_result` content blocks.
1768
- *
1769
- * Each tool definition includes:
1770
- *
1771
- * - `name`: Name of the tool.
1772
- * - `description`: Optional, but strongly-recommended description of the tool.
1773
- * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
1774
- * tool `input` shape that the model will produce in `tool_use` output content
1775
- * blocks.
1776
- *
1777
- * For example, if you defined `tools` as:
1778
- *
1779
- * ```json
1780
- * [
1781
- * {
1782
- * "name": "get_stock_price",
1783
- * "description": "Get the current stock price for a given ticker symbol.",
1784
- * "input_schema": {
1785
- * "type": "object",
1786
- * "properties": {
1787
- * "ticker": {
1788
- * "type": "string",
1789
- * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
1790
- * }
1791
- * },
1792
- * "required": ["ticker"]
1793
- * }
1794
- * }
1795
- * ]
1796
- * ```
1797
- *
1798
- * And then asked the model "What's the S&P 500 at today?", the model might produce
1799
- * `tool_use` content blocks in the response like this:
1800
- *
1801
- * ```json
1802
- * [
1803
- * {
1804
- * "type": "tool_use",
1805
- * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
1806
- * "name": "get_stock_price",
1807
- * "input": { "ticker": "^GSPC" }
1808
- * }
1809
- * ]
1810
- * ```
1811
- *
1812
- * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
1813
- * input, and return the following back to the model in a subsequent `user`
1814
- * message:
1815
- *
1816
- * ```json
1817
- * [
1818
- * {
1819
- * "type": "tool_result",
1820
- * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
1821
- * "content": "259.75 USD"
1822
- * }
1823
- * ]
1824
- * ```
1825
- *
1826
- * Tools can be used for workflows that include running client-side tools and
1827
- * functions, or more generally whenever you want the model to produce a particular
1828
- * JSON structure of output.
1829
- *
1830
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
1831
- */
1832
- tools?: Array<BetaToolUnion>;
1833
-
1834
- /**
1835
- * Body param: Only sample from the top K options for each subsequent token.
1836
- *
1837
- * Used to remove "long tail" low probability responses.
1838
- * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
1839
- *
1840
- * Recommended for advanced use cases only. You usually only need to use
1841
- * `temperature`.
1842
- */
1843
- top_k?: number;
1844
-
1845
- /**
1846
- * Body param: Use nucleus sampling.
1847
- *
1848
- * In nucleus sampling, we compute the cumulative distribution over all the options
1849
- * for each subsequent token in decreasing probability order and cut it off once it
1850
- * reaches a particular probability specified by `top_p`. You should either alter
1851
- * `temperature` or `top_p`, but not both.
1852
- *
1853
- * Recommended for advanced use cases only. You usually only need to use
1854
- * `temperature`.
1855
- */
1856
- top_p?: number;
1857
-
1858
- /**
1859
- * Header param: Optional header to specify the beta version(s) you want to use.
1860
- */
1861
- betas?: Array<BetaAPI.AnthropicBeta>;
1862
- }
1863
-
1864
- export namespace MessageCreateParams {
1865
- export type MessageCreateParamsNonStreaming = MessagesMessagesAPI.MessageCreateParamsNonStreaming;
1866
- export type MessageCreateParamsStreaming = MessagesMessagesAPI.MessageCreateParamsStreaming;
1867
- }
1868
-
1869
- export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
1870
- /**
1871
- * Body param: Whether to incrementally stream the response using server-sent
1872
- * events.
1873
- *
1874
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
1875
- * details.
1876
- */
1877
- stream?: false;
1878
- }
1879
-
1880
- export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
1881
- /**
1882
- * Body param: Whether to incrementally stream the response using server-sent
1883
- * events.
1884
- *
1885
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
1886
- * details.
1887
- */
1888
- stream: true;
1889
- }
1890
-
1891
- export interface MessageCountTokensParams {
1892
- /**
1893
- * Body param: Input messages.
1894
- *
1895
- * Our models are trained to operate on alternating `user` and `assistant`
1896
- * conversational turns. When creating a new `Message`, you specify the prior
1897
- * conversational turns with the `messages` parameter, and the model then generates
1898
- * the next `Message` in the conversation. Consecutive `user` or `assistant` turns
1899
- * in your request will be combined into a single turn.
1900
- *
1901
- * Each input message must be an object with a `role` and `content`. You can
1902
- * specify a single `user`-role message, or you can include multiple `user` and
1903
- * `assistant` messages.
1904
- *
1905
- * If the final message uses the `assistant` role, the response content will
1906
- * continue immediately from the content in that message. This can be used to
1907
- * constrain part of the model's response.
1908
- *
1909
- * Example with a single `user` message:
1910
- *
1911
- * ```json
1912
- * [{ "role": "user", "content": "Hello, Claude" }]
1913
- * ```
1914
- *
1915
- * Example with multiple conversational turns:
1916
- *
1917
- * ```json
1918
- * [
1919
- * { "role": "user", "content": "Hello there." },
1920
- * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
1921
- * { "role": "user", "content": "Can you explain LLMs in plain English?" }
1922
- * ]
1923
- * ```
1924
- *
1925
- * Example with a partially-filled response from Claude:
1926
- *
1927
- * ```json
1928
- * [
1929
- * {
1930
- * "role": "user",
1931
- * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
1932
- * },
1933
- * { "role": "assistant", "content": "The best answer is (" }
1934
- * ]
1935
- * ```
1936
- *
1937
- * Each input message `content` may be either a single `string` or an array of
1938
- * content blocks, where each block has a specific `type`. Using a `string` for
1939
- * `content` is shorthand for an array of one content block of type `"text"`. The
1940
- * following input messages are equivalent:
1941
- *
1942
- * ```json
1943
- * { "role": "user", "content": "Hello, Claude" }
1944
- * ```
1945
- *
1946
- * ```json
1947
- * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
1948
- * ```
1949
- *
1950
- * Starting with Claude 3 models, you can also send image content blocks:
1951
- *
1952
- * ```json
1953
- * {
1954
- * "role": "user",
1955
- * "content": [
1956
- * {
1957
- * "type": "image",
1958
- * "source": {
1959
- * "type": "base64",
1960
- * "media_type": "image/jpeg",
1961
- * "data": "/9j/4AAQSkZJRg..."
1962
- * }
1963
- * },
1964
- * { "type": "text", "text": "What is in this image?" }
1965
- * ]
1966
- * }
1967
- * ```
1968
- *
1969
- * We currently support the `base64` source type for images, and the `image/jpeg`,
1970
- * `image/png`, `image/gif`, and `image/webp` media types.
1971
- *
1972
- * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
1973
- * more input examples.
1974
- *
1975
- * Note that if you want to include a
1976
- * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
1977
- * the top-level `system` parameter — there is no `"system"` role for input
1978
- * messages in the Messages API.
1979
- *
1980
- * There is a limit of 100000 messages in a single request.
1981
- */
1982
- messages: Array<BetaMessageParam>;
1983
-
1984
- /**
1985
- * Body param: The model that will complete your prompt.\n\nSee
1986
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
1987
- * details and options.
1988
- */
1989
- model: MessagesAPI.Model;
1990
-
1991
- /**
1992
- * Body param: MCP servers to be utilized in this request
1993
- */
1994
- mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;
1995
-
1996
- /**
1997
- * Body param: System prompt.
1998
- *
1999
- * A system prompt is a way of providing context and instructions to Claude, such
2000
- * as specifying a particular goal or role. See our
2001
- * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
2002
- */
2003
- system?: string | Array<BetaTextBlockParam>;
2004
-
2005
- /**
2006
- * Body param: Configuration for enabling Claude's extended thinking.
2007
- *
2008
- * When enabled, responses include `thinking` content blocks showing Claude's
2009
- * thinking process before the final answer. Requires a minimum budget of 1,024
2010
- * tokens and counts towards your `max_tokens` limit.
2011
- *
2012
- * See
2013
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
2014
- * for details.
2015
- */
2016
- thinking?: BetaThinkingConfigParam;
2017
-
2018
- /**
2019
- * Body param: How the model should use the provided tools. The model can use a
2020
- * specific tool, any available tool, decide by itself, or not use tools at all.
2021
- */
2022
- tool_choice?: BetaToolChoice;
2023
-
2024
- /**
2025
- * Body param: Definitions of tools that the model may use.
2026
- *
2027
- * If you include `tools` in your API request, the model may return `tool_use`
2028
- * content blocks that represent the model's use of those tools. You can then run
2029
- * those tools using the tool input generated by the model and then optionally
2030
- * return results back to the model using `tool_result` content blocks.
2031
- *
2032
- * Each tool definition includes:
2033
- *
2034
- * - `name`: Name of the tool.
2035
- * - `description`: Optional, but strongly-recommended description of the tool.
2036
- * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
2037
- * tool `input` shape that the model will produce in `tool_use` output content
2038
- * blocks.
2039
- *
2040
- * For example, if you defined `tools` as:
2041
- *
2042
- * ```json
2043
- * [
2044
- * {
2045
- * "name": "get_stock_price",
2046
- * "description": "Get the current stock price for a given ticker symbol.",
2047
- * "input_schema": {
2048
- * "type": "object",
2049
- * "properties": {
2050
- * "ticker": {
2051
- * "type": "string",
2052
- * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
2053
- * }
2054
- * },
2055
- * "required": ["ticker"]
2056
- * }
2057
- * }
2058
- * ]
2059
- * ```
2060
- *
2061
- * And then asked the model "What's the S&P 500 at today?", the model might produce
2062
- * `tool_use` content blocks in the response like this:
2063
- *
2064
- * ```json
2065
- * [
2066
- * {
2067
- * "type": "tool_use",
2068
- * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
2069
- * "name": "get_stock_price",
2070
- * "input": { "ticker": "^GSPC" }
2071
- * }
2072
- * ]
2073
- * ```
2074
- *
2075
- * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
2076
- * input, and return the following back to the model in a subsequent `user`
2077
- * message:
2078
- *
2079
- * ```json
2080
- * [
2081
- * {
2082
- * "type": "tool_result",
2083
- * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
2084
- * "content": "259.75 USD"
2085
- * }
2086
- * ]
2087
- * ```
2088
- *
2089
- * Tools can be used for workflows that include running client-side tools and
2090
- * functions, or more generally whenever you want the model to produce a particular
2091
- * JSON structure of output.
2092
- *
2093
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
2094
- */
2095
- tools?: Array<
2096
- | BetaTool
2097
- | BetaToolComputerUse20241022
2098
- | BetaToolBash20241022
2099
- | BetaToolTextEditor20241022
2100
- | BetaToolComputerUse20250124
2101
- | BetaToolBash20250124
2102
- | BetaToolTextEditor20250124
2103
- | BetaToolTextEditor20250429
2104
- | BetaWebSearchTool20250305
2105
- | BetaCodeExecutionTool20250522
2106
- >;
2107
-
2108
- /**
2109
- * Header param: Optional header to specify the beta version(s) you want to use.
2110
- */
2111
- betas?: Array<BetaAPI.AnthropicBeta>;
2112
- }
2113
-
2114
- Messages.Batches = Batches;
2115
-
2116
- export declare namespace Messages {
2117
- export {
2118
- type BetaBase64ImageSource as BetaBase64ImageSource,
2119
- type BetaBase64PDFBlock as BetaBase64PDFBlock,
2120
- type BetaBase64PDFSource as BetaBase64PDFSource,
2121
- type BetaCacheControlEphemeral as BetaCacheControlEphemeral,
2122
- type BetaCacheCreation as BetaCacheCreation,
2123
- type BetaCitationCharLocation as BetaCitationCharLocation,
2124
- type BetaCitationCharLocationParam as BetaCitationCharLocationParam,
2125
- type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation,
2126
- type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam,
2127
- type BetaCitationPageLocation as BetaCitationPageLocation,
2128
- type BetaCitationPageLocationParam as BetaCitationPageLocationParam,
2129
- type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam,
2130
- type BetaCitationsConfigParam as BetaCitationsConfigParam,
2131
- type BetaCitationsDelta as BetaCitationsDelta,
2132
- type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation,
2133
- type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock,
2134
- type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam,
2135
- type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock,
2136
- type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam,
2137
- type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522,
2138
- type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock,
2139
- type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent,
2140
- type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam,
2141
- type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent,
2142
- type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError,
2143
- type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode,
2144
- type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam,
2145
- type BetaContainer as BetaContainer,
2146
- type BetaContainerUploadBlock as BetaContainerUploadBlock,
2147
- type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam,
2148
- type BetaContentBlock as BetaContentBlock,
2149
- type BetaContentBlockParam as BetaContentBlockParam,
2150
- type BetaContentBlockSource as BetaContentBlockSource,
2151
- type BetaContentBlockSourceContent as BetaContentBlockSourceContent,
2152
- type BetaFileDocumentSource as BetaFileDocumentSource,
2153
- type BetaFileImageSource as BetaFileImageSource,
2154
- type BetaImageBlockParam as BetaImageBlockParam,
2155
- type BetaInputJSONDelta as BetaInputJSONDelta,
2156
- type BetaMCPToolResultBlock as BetaMCPToolResultBlock,
2157
- type BetaMCPToolUseBlock as BetaMCPToolUseBlock,
2158
- type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam,
2159
- type BetaMessage as BetaMessage,
2160
- type BetaMessageDeltaUsage as BetaMessageDeltaUsage,
2161
- type BetaMessageParam as BetaMessageParam,
2162
- type BetaMessageTokensCount as BetaMessageTokensCount,
2163
- type BetaMetadata as BetaMetadata,
2164
- type BetaPlainTextSource as BetaPlainTextSource,
2165
- type BetaRawContentBlockDelta as BetaRawContentBlockDelta,
2166
- type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent,
2167
- type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent,
2168
- type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent,
2169
- type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent,
2170
- type BetaRawMessageStartEvent as BetaRawMessageStartEvent,
2171
- type BetaRawMessageStopEvent as BetaRawMessageStopEvent,
2172
- type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent,
2173
- type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock,
2174
- type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam,
2175
- type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration,
2176
- type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition,
2177
- type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam,
2178
- type BetaServerToolUsage as BetaServerToolUsage,
2179
- type BetaServerToolUseBlock as BetaServerToolUseBlock,
2180
- type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam,
2181
- type BetaSignatureDelta as BetaSignatureDelta,
2182
- type BetaStopReason as BetaStopReason,
2183
- type BetaTextBlock as BetaTextBlock,
2184
- type BetaTextBlockParam as BetaTextBlockParam,
2185
- type BetaTextCitation as BetaTextCitation,
2186
- type BetaTextCitationParam as BetaTextCitationParam,
2187
- type BetaTextDelta as BetaTextDelta,
2188
- type BetaThinkingBlock as BetaThinkingBlock,
2189
- type BetaThinkingBlockParam as BetaThinkingBlockParam,
2190
- type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled,
2191
- type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled,
2192
- type BetaThinkingConfigParam as BetaThinkingConfigParam,
2193
- type BetaThinkingDelta as BetaThinkingDelta,
2194
- type BetaTool as BetaTool,
2195
- type BetaToolBash20241022 as BetaToolBash20241022,
2196
- type BetaToolBash20250124 as BetaToolBash20250124,
2197
- type BetaToolChoice as BetaToolChoice,
2198
- type BetaToolChoiceAny as BetaToolChoiceAny,
2199
- type BetaToolChoiceAuto as BetaToolChoiceAuto,
2200
- type BetaToolChoiceNone as BetaToolChoiceNone,
2201
- type BetaToolChoiceTool as BetaToolChoiceTool,
2202
- type BetaToolComputerUse20241022 as BetaToolComputerUse20241022,
2203
- type BetaToolComputerUse20250124 as BetaToolComputerUse20250124,
2204
- type BetaToolResultBlockParam as BetaToolResultBlockParam,
2205
- type BetaToolTextEditor20241022 as BetaToolTextEditor20241022,
2206
- type BetaToolTextEditor20250124 as BetaToolTextEditor20250124,
2207
- type BetaToolTextEditor20250429 as BetaToolTextEditor20250429,
2208
- type BetaToolUnion as BetaToolUnion,
2209
- type BetaToolUseBlock as BetaToolUseBlock,
2210
- type BetaToolUseBlockParam as BetaToolUseBlockParam,
2211
- type BetaURLImageSource as BetaURLImageSource,
2212
- type BetaURLPDFSource as BetaURLPDFSource,
2213
- type BetaUsage as BetaUsage,
2214
- type BetaWebSearchResultBlock as BetaWebSearchResultBlock,
2215
- type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam,
2216
- type BetaWebSearchTool20250305 as BetaWebSearchTool20250305,
2217
- type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError,
2218
- type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock,
2219
- type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent,
2220
- type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam,
2221
- type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent,
2222
- type BetaWebSearchToolResultError as BetaWebSearchToolResultError,
2223
- type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode,
2224
- type MessageCreateParams as MessageCreateParams,
2225
- type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
2226
- type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
2227
- type MessageCountTokensParams as MessageCountTokensParams,
2228
- };
2229
-
2230
- export {
2231
- Batches as Batches,
2232
- type BetaDeletedMessageBatch as BetaDeletedMessageBatch,
2233
- type BetaMessageBatch as BetaMessageBatch,
2234
- type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult,
2235
- type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult,
2236
- type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult,
2237
- type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse,
2238
- type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts,
2239
- type BetaMessageBatchResult as BetaMessageBatchResult,
2240
- type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult,
2241
- type BetaMessageBatchesPage as BetaMessageBatchesPage,
2242
- type BatchCreateParams as BatchCreateParams,
2243
- type BatchRetrieveParams as BatchRetrieveParams,
2244
- type BatchListParams as BatchListParams,
2245
- type BatchDeleteParams as BatchDeleteParams,
2246
- type BatchCancelParams as BatchCancelParams,
2247
- type BatchResultsParams as BatchResultsParams,
2248
- };
2249
- }