@anthropic-ai/claude-code 0.2.27 → 0.2.30

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 (415) hide show
  1. package/cli.mjs +418 -666
  2. package/package.json +1 -5
  3. package/vendor/sdk/CHANGELOG.md +0 -1421
  4. package/vendor/sdk/LICENSE +0 -8
  5. package/vendor/sdk/README.md +0 -536
  6. package/vendor/sdk/_shims/MultipartBody.d.ts +0 -9
  7. package/vendor/sdk/_shims/MultipartBody.d.ts.map +0 -1
  8. package/vendor/sdk/_shims/MultipartBody.js +0 -16
  9. package/vendor/sdk/_shims/MultipartBody.js.map +0 -1
  10. package/vendor/sdk/_shims/MultipartBody.mjs +0 -12
  11. package/vendor/sdk/_shims/MultipartBody.mjs.map +0 -1
  12. package/vendor/sdk/_shims/README.md +0 -46
  13. package/vendor/sdk/_shims/auto/runtime-bun.d.ts +0 -5
  14. package/vendor/sdk/_shims/auto/runtime-bun.d.ts.map +0 -1
  15. package/vendor/sdk/_shims/auto/runtime-bun.js +0 -21
  16. package/vendor/sdk/_shims/auto/runtime-bun.js.map +0 -1
  17. package/vendor/sdk/_shims/auto/runtime-bun.mjs +0 -2
  18. package/vendor/sdk/_shims/auto/runtime-bun.mjs.map +0 -1
  19. package/vendor/sdk/_shims/auto/runtime-node.d.ts +0 -5
  20. package/vendor/sdk/_shims/auto/runtime-node.d.ts.map +0 -1
  21. package/vendor/sdk/_shims/auto/runtime-node.js +0 -21
  22. package/vendor/sdk/_shims/auto/runtime-node.js.map +0 -1
  23. package/vendor/sdk/_shims/auto/runtime-node.mjs +0 -2
  24. package/vendor/sdk/_shims/auto/runtime-node.mjs.map +0 -1
  25. package/vendor/sdk/_shims/auto/runtime.d.ts +0 -5
  26. package/vendor/sdk/_shims/auto/runtime.d.ts.map +0 -1
  27. package/vendor/sdk/_shims/auto/runtime.js +0 -21
  28. package/vendor/sdk/_shims/auto/runtime.js.map +0 -1
  29. package/vendor/sdk/_shims/auto/runtime.mjs +0 -2
  30. package/vendor/sdk/_shims/auto/runtime.mjs.map +0 -1
  31. package/vendor/sdk/_shims/auto/types-node.d.ts +0 -5
  32. package/vendor/sdk/_shims/auto/types-node.d.ts.map +0 -1
  33. package/vendor/sdk/_shims/auto/types-node.js +0 -21
  34. package/vendor/sdk/_shims/auto/types-node.js.map +0 -1
  35. package/vendor/sdk/_shims/auto/types-node.mjs +0 -2
  36. package/vendor/sdk/_shims/auto/types-node.mjs.map +0 -1
  37. package/vendor/sdk/_shims/auto/types.d.ts +0 -101
  38. package/vendor/sdk/_shims/auto/types.js +0 -3
  39. package/vendor/sdk/_shims/auto/types.mjs +0 -3
  40. package/vendor/sdk/_shims/bun-runtime.d.ts +0 -6
  41. package/vendor/sdk/_shims/bun-runtime.d.ts.map +0 -1
  42. package/vendor/sdk/_shims/bun-runtime.js +0 -14
  43. package/vendor/sdk/_shims/bun-runtime.js.map +0 -1
  44. package/vendor/sdk/_shims/bun-runtime.mjs +0 -10
  45. package/vendor/sdk/_shims/bun-runtime.mjs.map +0 -1
  46. package/vendor/sdk/_shims/index.d.ts +0 -81
  47. package/vendor/sdk/_shims/index.js +0 -13
  48. package/vendor/sdk/_shims/index.mjs +0 -7
  49. package/vendor/sdk/_shims/manual-types.d.ts +0 -12
  50. package/vendor/sdk/_shims/manual-types.js +0 -3
  51. package/vendor/sdk/_shims/manual-types.mjs +0 -3
  52. package/vendor/sdk/_shims/node-runtime.d.ts +0 -3
  53. package/vendor/sdk/_shims/node-runtime.d.ts.map +0 -1
  54. package/vendor/sdk/_shims/node-runtime.js +0 -89
  55. package/vendor/sdk/_shims/node-runtime.js.map +0 -1
  56. package/vendor/sdk/_shims/node-runtime.mjs +0 -56
  57. package/vendor/sdk/_shims/node-runtime.mjs.map +0 -1
  58. package/vendor/sdk/_shims/node-types.d.ts +0 -42
  59. package/vendor/sdk/_shims/node-types.js +0 -3
  60. package/vendor/sdk/_shims/node-types.mjs +0 -3
  61. package/vendor/sdk/_shims/registry.d.ts +0 -37
  62. package/vendor/sdk/_shims/registry.d.ts.map +0 -1
  63. package/vendor/sdk/_shims/registry.js +0 -41
  64. package/vendor/sdk/_shims/registry.js.map +0 -1
  65. package/vendor/sdk/_shims/registry.mjs +0 -37
  66. package/vendor/sdk/_shims/registry.mjs.map +0 -1
  67. package/vendor/sdk/_shims/web-runtime.d.ts +0 -5
  68. package/vendor/sdk/_shims/web-runtime.d.ts.map +0 -1
  69. package/vendor/sdk/_shims/web-runtime.js +0 -78
  70. package/vendor/sdk/_shims/web-runtime.js.map +0 -1
  71. package/vendor/sdk/_shims/web-runtime.mjs +0 -71
  72. package/vendor/sdk/_shims/web-runtime.mjs.map +0 -1
  73. package/vendor/sdk/_shims/web-types.d.ts +0 -83
  74. package/vendor/sdk/_shims/web-types.js +0 -3
  75. package/vendor/sdk/_shims/web-types.mjs +0 -3
  76. package/vendor/sdk/_vendor/partial-json-parser/parser.d.ts +0 -3
  77. package/vendor/sdk/_vendor/partial-json-parser/parser.d.ts.map +0 -1
  78. package/vendor/sdk/_vendor/partial-json-parser/parser.js +0 -226
  79. package/vendor/sdk/_vendor/partial-json-parser/parser.js.map +0 -1
  80. package/vendor/sdk/_vendor/partial-json-parser/parser.mjs +0 -223
  81. package/vendor/sdk/_vendor/partial-json-parser/parser.mjs.map +0 -1
  82. package/vendor/sdk/core.d.ts +0 -248
  83. package/vendor/sdk/core.d.ts.map +0 -1
  84. package/vendor/sdk/core.js +0 -935
  85. package/vendor/sdk/core.js.map +0 -1
  86. package/vendor/sdk/core.mjs +0 -903
  87. package/vendor/sdk/core.mjs.map +0 -1
  88. package/vendor/sdk/error.d.ts +0 -48
  89. package/vendor/sdk/error.d.ts.map +0 -1
  90. package/vendor/sdk/error.js +0 -114
  91. package/vendor/sdk/error.js.map +0 -1
  92. package/vendor/sdk/error.mjs +0 -98
  93. package/vendor/sdk/error.mjs.map +0 -1
  94. package/vendor/sdk/index.d.mts +0 -152
  95. package/vendor/sdk/index.d.ts +0 -152
  96. package/vendor/sdk/index.d.ts.map +0 -1
  97. package/vendor/sdk/index.js +0 -179
  98. package/vendor/sdk/index.js.map +0 -1
  99. package/vendor/sdk/index.mjs +0 -136
  100. package/vendor/sdk/index.mjs.map +0 -1
  101. package/vendor/sdk/internal/decoders/jsonl.d.ts +0 -12
  102. package/vendor/sdk/internal/decoders/jsonl.d.ts.map +0 -1
  103. package/vendor/sdk/internal/decoders/jsonl.js +0 -35
  104. package/vendor/sdk/internal/decoders/jsonl.js.map +0 -1
  105. package/vendor/sdk/internal/decoders/jsonl.mjs +0 -31
  106. package/vendor/sdk/internal/decoders/jsonl.mjs.map +0 -1
  107. package/vendor/sdk/internal/decoders/line.d.ts +0 -20
  108. package/vendor/sdk/internal/decoders/line.d.ts.map +0 -1
  109. package/vendor/sdk/internal/decoders/line.js +0 -123
  110. package/vendor/sdk/internal/decoders/line.js.map +0 -1
  111. package/vendor/sdk/internal/decoders/line.mjs +0 -119
  112. package/vendor/sdk/internal/decoders/line.mjs.map +0 -1
  113. package/vendor/sdk/internal/stream-utils.d.ts +0 -8
  114. package/vendor/sdk/internal/stream-utils.d.ts.map +0 -1
  115. package/vendor/sdk/internal/stream-utils.js +0 -39
  116. package/vendor/sdk/internal/stream-utils.js.map +0 -1
  117. package/vendor/sdk/internal/stream-utils.mjs +0 -35
  118. package/vendor/sdk/internal/stream-utils.mjs.map +0 -1
  119. package/vendor/sdk/lib/BetaMessageStream.d.ts +0 -114
  120. package/vendor/sdk/lib/BetaMessageStream.d.ts.map +0 -1
  121. package/vendor/sdk/lib/BetaMessageStream.js +0 -547
  122. package/vendor/sdk/lib/BetaMessageStream.js.map +0 -1
  123. package/vendor/sdk/lib/BetaMessageStream.mjs +0 -543
  124. package/vendor/sdk/lib/BetaMessageStream.mjs.map +0 -1
  125. package/vendor/sdk/lib/MessageStream.d.ts +0 -114
  126. package/vendor/sdk/lib/MessageStream.d.ts.map +0 -1
  127. package/vendor/sdk/lib/MessageStream.js +0 -547
  128. package/vendor/sdk/lib/MessageStream.js.map +0 -1
  129. package/vendor/sdk/lib/MessageStream.mjs +0 -543
  130. package/vendor/sdk/lib/MessageStream.mjs.map +0 -1
  131. package/vendor/sdk/node_modules/@types/node/LICENSE +0 -21
  132. package/vendor/sdk/node_modules/@types/node/README.md +0 -15
  133. package/vendor/sdk/node_modules/@types/node/assert/strict.d.ts +0 -8
  134. package/vendor/sdk/node_modules/@types/node/assert.d.ts +0 -985
  135. package/vendor/sdk/node_modules/@types/node/async_hooks.d.ts +0 -522
  136. package/vendor/sdk/node_modules/@types/node/buffer.buffer.d.ts +0 -385
  137. package/vendor/sdk/node_modules/@types/node/buffer.d.ts +0 -1903
  138. package/vendor/sdk/node_modules/@types/node/child_process.d.ts +0 -1549
  139. package/vendor/sdk/node_modules/@types/node/cluster.d.ts +0 -578
  140. package/vendor/sdk/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  141. package/vendor/sdk/node_modules/@types/node/compatibility/index.d.ts +0 -9
  142. package/vendor/sdk/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  143. package/vendor/sdk/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  144. package/vendor/sdk/node_modules/@types/node/console.d.ts +0 -452
  145. package/vendor/sdk/node_modules/@types/node/constants.d.ts +0 -19
  146. package/vendor/sdk/node_modules/@types/node/crypto.d.ts +0 -4453
  147. package/vendor/sdk/node_modules/@types/node/dgram.d.ts +0 -596
  148. package/vendor/sdk/node_modules/@types/node/diagnostics_channel.d.ts +0 -546
  149. package/vendor/sdk/node_modules/@types/node/dns/promises.d.ts +0 -475
  150. package/vendor/sdk/node_modules/@types/node/dns.d.ts +0 -853
  151. package/vendor/sdk/node_modules/@types/node/dom-events.d.ts +0 -124
  152. package/vendor/sdk/node_modules/@types/node/domain.d.ts +0 -170
  153. package/vendor/sdk/node_modules/@types/node/events.d.ts +0 -819
  154. package/vendor/sdk/node_modules/@types/node/fs/promises.d.ts +0 -1205
  155. package/vendor/sdk/node_modules/@types/node/fs.d.ts +0 -4237
  156. package/vendor/sdk/node_modules/@types/node/globals.d.ts +0 -442
  157. package/vendor/sdk/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  158. package/vendor/sdk/node_modules/@types/node/http.d.ts +0 -1839
  159. package/vendor/sdk/node_modules/@types/node/http2.d.ts +0 -2517
  160. package/vendor/sdk/node_modules/@types/node/https.d.ts +0 -544
  161. package/vendor/sdk/node_modules/@types/node/index.d.ts +0 -90
  162. package/vendor/sdk/node_modules/@types/node/inspector.d.ts +0 -2775
  163. package/vendor/sdk/node_modules/@types/node/module.d.ts +0 -291
  164. package/vendor/sdk/node_modules/@types/node/net.d.ts +0 -924
  165. package/vendor/sdk/node_modules/@types/node/os.d.ts +0 -473
  166. package/vendor/sdk/node_modules/@types/node/package.json +0 -225
  167. package/vendor/sdk/node_modules/@types/node/path.d.ts +0 -191
  168. package/vendor/sdk/node_modules/@types/node/perf_hooks.d.ts +0 -753
  169. package/vendor/sdk/node_modules/@types/node/process.d.ts +0 -1553
  170. package/vendor/sdk/node_modules/@types/node/punycode.d.ts +0 -117
  171. package/vendor/sdk/node_modules/@types/node/querystring.d.ts +0 -141
  172. package/vendor/sdk/node_modules/@types/node/readline/promises.d.ts +0 -154
  173. package/vendor/sdk/node_modules/@types/node/readline.d.ts +0 -715
  174. package/vendor/sdk/node_modules/@types/node/repl.d.ts +0 -430
  175. package/vendor/sdk/node_modules/@types/node/stream/consumers.d.ts +0 -12
  176. package/vendor/sdk/node_modules/@types/node/stream/promises.d.ts +0 -90
  177. package/vendor/sdk/node_modules/@types/node/stream/web.d.ts +0 -523
  178. package/vendor/sdk/node_modules/@types/node/stream.d.ts +0 -1731
  179. package/vendor/sdk/node_modules/@types/node/string_decoder.d.ts +0 -67
  180. package/vendor/sdk/node_modules/@types/node/test.d.ts +0 -1245
  181. package/vendor/sdk/node_modules/@types/node/timers/promises.d.ts +0 -93
  182. package/vendor/sdk/node_modules/@types/node/timers.d.ts +0 -126
  183. package/vendor/sdk/node_modules/@types/node/tls.d.ts +0 -1203
  184. package/vendor/sdk/node_modules/@types/node/trace_events.d.ts +0 -171
  185. package/vendor/sdk/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -385
  186. package/vendor/sdk/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  187. package/vendor/sdk/node_modules/@types/node/ts5.6/index.d.ts +0 -90
  188. package/vendor/sdk/node_modules/@types/node/tty.d.ts +0 -206
  189. package/vendor/sdk/node_modules/@types/node/url.d.ts +0 -957
  190. package/vendor/sdk/node_modules/@types/node/util.d.ts +0 -2083
  191. package/vendor/sdk/node_modules/@types/node/v8.d.ts +0 -753
  192. package/vendor/sdk/node_modules/@types/node/vm.d.ts +0 -666
  193. package/vendor/sdk/node_modules/@types/node/wasi.d.ts +0 -160
  194. package/vendor/sdk/node_modules/@types/node/worker_threads.d.ts +0 -695
  195. package/vendor/sdk/node_modules/@types/node/zlib.d.ts +0 -517
  196. package/vendor/sdk/node_modules/undici-types/README.md +0 -6
  197. package/vendor/sdk/node_modules/undici-types/agent.d.ts +0 -31
  198. package/vendor/sdk/node_modules/undici-types/api.d.ts +0 -43
  199. package/vendor/sdk/node_modules/undici-types/balanced-pool.d.ts +0 -18
  200. package/vendor/sdk/node_modules/undici-types/cache.d.ts +0 -36
  201. package/vendor/sdk/node_modules/undici-types/client.d.ts +0 -97
  202. package/vendor/sdk/node_modules/undici-types/connector.d.ts +0 -34
  203. package/vendor/sdk/node_modules/undici-types/content-type.d.ts +0 -21
  204. package/vendor/sdk/node_modules/undici-types/cookies.d.ts +0 -28
  205. package/vendor/sdk/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  206. package/vendor/sdk/node_modules/undici-types/dispatcher.d.ts +0 -241
  207. package/vendor/sdk/node_modules/undici-types/errors.d.ts +0 -128
  208. package/vendor/sdk/node_modules/undici-types/fetch.d.ts +0 -209
  209. package/vendor/sdk/node_modules/undici-types/file.d.ts +0 -39
  210. package/vendor/sdk/node_modules/undici-types/filereader.d.ts +0 -54
  211. package/vendor/sdk/node_modules/undici-types/formdata.d.ts +0 -108
  212. package/vendor/sdk/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  213. package/vendor/sdk/node_modules/undici-types/global-origin.d.ts +0 -7
  214. package/vendor/sdk/node_modules/undici-types/handlers.d.ts +0 -9
  215. package/vendor/sdk/node_modules/undici-types/header.d.ts +0 -4
  216. package/vendor/sdk/node_modules/undici-types/index.d.ts +0 -63
  217. package/vendor/sdk/node_modules/undici-types/interceptors.d.ts +0 -5
  218. package/vendor/sdk/node_modules/undici-types/mock-agent.d.ts +0 -50
  219. package/vendor/sdk/node_modules/undici-types/mock-client.d.ts +0 -25
  220. package/vendor/sdk/node_modules/undici-types/mock-errors.d.ts +0 -12
  221. package/vendor/sdk/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  222. package/vendor/sdk/node_modules/undici-types/mock-pool.d.ts +0 -25
  223. package/vendor/sdk/node_modules/undici-types/package.json +0 -55
  224. package/vendor/sdk/node_modules/undici-types/patch.d.ts +0 -71
  225. package/vendor/sdk/node_modules/undici-types/pool-stats.d.ts +0 -19
  226. package/vendor/sdk/node_modules/undici-types/pool.d.ts +0 -28
  227. package/vendor/sdk/node_modules/undici-types/proxy-agent.d.ts +0 -30
  228. package/vendor/sdk/node_modules/undici-types/readable.d.ts +0 -61
  229. package/vendor/sdk/node_modules/undici-types/webidl.d.ts +0 -220
  230. package/vendor/sdk/node_modules/undici-types/websocket.d.ts +0 -131
  231. package/vendor/sdk/package.json +0 -124
  232. package/vendor/sdk/pagination.d.ts +0 -27
  233. package/vendor/sdk/pagination.d.ts.map +0 -1
  234. package/vendor/sdk/pagination.js +0 -60
  235. package/vendor/sdk/pagination.js.map +0 -1
  236. package/vendor/sdk/pagination.mjs +0 -56
  237. package/vendor/sdk/pagination.mjs.map +0 -1
  238. package/vendor/sdk/resource.d.ts +0 -6
  239. package/vendor/sdk/resource.d.ts.map +0 -1
  240. package/vendor/sdk/resource.js +0 -11
  241. package/vendor/sdk/resource.js.map +0 -1
  242. package/vendor/sdk/resource.mjs +0 -7
  243. package/vendor/sdk/resource.mjs.map +0 -1
  244. package/vendor/sdk/resources/beta/beta.d.ts +0 -57
  245. package/vendor/sdk/resources/beta/beta.d.ts.map +0 -1
  246. package/vendor/sdk/resources/beta/beta.js +0 -44
  247. package/vendor/sdk/resources/beta/beta.js.map +0 -1
  248. package/vendor/sdk/resources/beta/beta.mjs +0 -17
  249. package/vendor/sdk/resources/beta/beta.mjs.map +0 -1
  250. package/vendor/sdk/resources/beta/index.d.ts +0 -4
  251. package/vendor/sdk/resources/beta/index.d.ts.map +0 -1
  252. package/vendor/sdk/resources/beta/index.js +0 -12
  253. package/vendor/sdk/resources/beta/index.js.map +0 -1
  254. package/vendor/sdk/resources/beta/index.mjs +0 -5
  255. package/vendor/sdk/resources/beta/index.mjs.map +0 -1
  256. package/vendor/sdk/resources/beta/messages/batches.d.ts +0 -289
  257. package/vendor/sdk/resources/beta/messages/batches.d.ts.map +0 -1
  258. package/vendor/sdk/resources/beta/messages/batches.js +0 -112
  259. package/vendor/sdk/resources/beta/messages/batches.js.map +0 -1
  260. package/vendor/sdk/resources/beta/messages/batches.mjs +0 -107
  261. package/vendor/sdk/resources/beta/messages/batches.mjs.map +0 -1
  262. package/vendor/sdk/resources/beta/messages/index.d.ts +0 -3
  263. package/vendor/sdk/resources/beta/messages/index.d.ts.map +0 -1
  264. package/vendor/sdk/resources/beta/messages/index.js +0 -10
  265. package/vendor/sdk/resources/beta/messages/index.js.map +0 -1
  266. package/vendor/sdk/resources/beta/messages/index.mjs +0 -4
  267. package/vendor/sdk/resources/beta/messages/index.mjs.map +0 -1
  268. package/vendor/sdk/resources/beta/messages/messages.d.ts +0 -1038
  269. package/vendor/sdk/resources/beta/messages/messages.d.ts.map +0 -1
  270. package/vendor/sdk/resources/beta/messages/messages.js +0 -93
  271. package/vendor/sdk/resources/beta/messages/messages.js.map +0 -1
  272. package/vendor/sdk/resources/beta/messages/messages.mjs +0 -66
  273. package/vendor/sdk/resources/beta/messages/messages.mjs.map +0 -1
  274. package/vendor/sdk/resources/beta/models.d.ts +0 -49
  275. package/vendor/sdk/resources/beta/models.d.ts.map +0 -1
  276. package/vendor/sdk/resources/beta/models.js +0 -30
  277. package/vendor/sdk/resources/beta/models.js.map +0 -1
  278. package/vendor/sdk/resources/beta/models.mjs +0 -25
  279. package/vendor/sdk/resources/beta/models.mjs.map +0 -1
  280. package/vendor/sdk/resources/completions.d.ts +0 -166
  281. package/vendor/sdk/resources/completions.d.ts.map +0 -1
  282. package/vendor/sdk/resources/completions.js +0 -17
  283. package/vendor/sdk/resources/completions.js.map +0 -1
  284. package/vendor/sdk/resources/completions.mjs +0 -13
  285. package/vendor/sdk/resources/completions.mjs.map +0 -1
  286. package/vendor/sdk/resources/index.d.ts +0 -6
  287. package/vendor/sdk/resources/index.d.ts.map +0 -1
  288. package/vendor/sdk/resources/index.js +0 -29
  289. package/vendor/sdk/resources/index.js.map +0 -1
  290. package/vendor/sdk/resources/index.mjs +0 -7
  291. package/vendor/sdk/resources/index.mjs.map +0 -1
  292. package/vendor/sdk/resources/messages/batches.d.ts +0 -253
  293. package/vendor/sdk/resources/messages/batches.d.ts.map +0 -1
  294. package/vendor/sdk/resources/messages/batches.js +0 -102
  295. package/vendor/sdk/resources/messages/batches.js.map +0 -1
  296. package/vendor/sdk/resources/messages/batches.mjs +0 -97
  297. package/vendor/sdk/resources/messages/batches.mjs.map +0 -1
  298. package/vendor/sdk/resources/messages/index.d.ts +0 -3
  299. package/vendor/sdk/resources/messages/index.d.ts.map +0 -1
  300. package/vendor/sdk/resources/messages/index.js +0 -10
  301. package/vendor/sdk/resources/messages/index.js.map +0 -1
  302. package/vendor/sdk/resources/messages/index.mjs +0 -4
  303. package/vendor/sdk/resources/messages/index.mjs.map +0 -1
  304. package/vendor/sdk/resources/messages/messages.d.ts +0 -1028
  305. package/vendor/sdk/resources/messages/messages.d.ts.map +0 -1
  306. package/vendor/sdk/resources/messages/messages.js +0 -82
  307. package/vendor/sdk/resources/messages/messages.js.map +0 -1
  308. package/vendor/sdk/resources/messages/messages.mjs +0 -54
  309. package/vendor/sdk/resources/messages/messages.mjs.map +0 -1
  310. package/vendor/sdk/resources/models.d.ts +0 -49
  311. package/vendor/sdk/resources/models.d.ts.map +0 -1
  312. package/vendor/sdk/resources/models.js +0 -30
  313. package/vendor/sdk/resources/models.js.map +0 -1
  314. package/vendor/sdk/resources/models.mjs +0 -25
  315. package/vendor/sdk/resources/models.mjs.map +0 -1
  316. package/vendor/sdk/resources/shared.d.ts +0 -42
  317. package/vendor/sdk/resources/shared.d.ts.map +0 -1
  318. package/vendor/sdk/resources/shared.js +0 -4
  319. package/vendor/sdk/resources/shared.js.map +0 -1
  320. package/vendor/sdk/resources/shared.mjs +0 -3
  321. package/vendor/sdk/resources/shared.mjs.map +0 -1
  322. package/vendor/sdk/resources/top-level.d.ts +0 -2
  323. package/vendor/sdk/resources/top-level.d.ts.map +0 -1
  324. package/vendor/sdk/resources/top-level.js +0 -4
  325. package/vendor/sdk/resources/top-level.js.map +0 -1
  326. package/vendor/sdk/resources/top-level.mjs +0 -3
  327. package/vendor/sdk/resources/top-level.mjs.map +0 -1
  328. package/vendor/sdk/shims/node.d.ts +0 -30
  329. package/vendor/sdk/shims/node.d.ts.map +0 -1
  330. package/vendor/sdk/shims/node.js +0 -31
  331. package/vendor/sdk/shims/node.js.map +0 -1
  332. package/vendor/sdk/shims/node.mjs +0 -5
  333. package/vendor/sdk/shims/node.mjs.map +0 -1
  334. package/vendor/sdk/shims/web.d.ts +0 -26
  335. package/vendor/sdk/shims/web.d.ts.map +0 -1
  336. package/vendor/sdk/shims/web.js +0 -31
  337. package/vendor/sdk/shims/web.js.map +0 -1
  338. package/vendor/sdk/shims/web.mjs +0 -5
  339. package/vendor/sdk/shims/web.mjs.map +0 -1
  340. package/vendor/sdk/src/_shims/MultipartBody.ts +0 -9
  341. package/vendor/sdk/src/_shims/README.md +0 -46
  342. package/vendor/sdk/src/_shims/auto/runtime-bun.ts +0 -4
  343. package/vendor/sdk/src/_shims/auto/runtime-node.ts +0 -4
  344. package/vendor/sdk/src/_shims/auto/runtime.ts +0 -4
  345. package/vendor/sdk/src/_shims/auto/types-node.ts +0 -4
  346. package/vendor/sdk/src/_shims/auto/types.d.ts +0 -101
  347. package/vendor/sdk/src/_shims/auto/types.js +0 -3
  348. package/vendor/sdk/src/_shims/auto/types.mjs +0 -3
  349. package/vendor/sdk/src/_shims/bun-runtime.ts +0 -14
  350. package/vendor/sdk/src/_shims/index.d.ts +0 -81
  351. package/vendor/sdk/src/_shims/index.js +0 -13
  352. package/vendor/sdk/src/_shims/index.mjs +0 -7
  353. package/vendor/sdk/src/_shims/manual-types.d.ts +0 -12
  354. package/vendor/sdk/src/_shims/manual-types.js +0 -3
  355. package/vendor/sdk/src/_shims/manual-types.mjs +0 -3
  356. package/vendor/sdk/src/_shims/node-runtime.ts +0 -81
  357. package/vendor/sdk/src/_shims/node-types.d.ts +0 -42
  358. package/vendor/sdk/src/_shims/node-types.js +0 -3
  359. package/vendor/sdk/src/_shims/node-types.mjs +0 -3
  360. package/vendor/sdk/src/_shims/registry.ts +0 -67
  361. package/vendor/sdk/src/_shims/web-runtime.ts +0 -103
  362. package/vendor/sdk/src/_shims/web-types.d.ts +0 -83
  363. package/vendor/sdk/src/_shims/web-types.js +0 -3
  364. package/vendor/sdk/src/_shims/web-types.mjs +0 -3
  365. package/vendor/sdk/src/_vendor/partial-json-parser/README.md +0 -3
  366. package/vendor/sdk/src/_vendor/partial-json-parser/parser.ts +0 -264
  367. package/vendor/sdk/src/core.ts +0 -1250
  368. package/vendor/sdk/src/error.ts +0 -133
  369. package/vendor/sdk/src/index.ts +0 -465
  370. package/vendor/sdk/src/internal/decoders/jsonl.ts +0 -41
  371. package/vendor/sdk/src/internal/decoders/line.ts +0 -145
  372. package/vendor/sdk/src/internal/stream-utils.ts +0 -32
  373. package/vendor/sdk/src/lib/.keep +0 -4
  374. package/vendor/sdk/src/lib/BetaMessageStream.ts +0 -661
  375. package/vendor/sdk/src/lib/MessageStream.ts +0 -662
  376. package/vendor/sdk/src/pagination.ts +0 -92
  377. package/vendor/sdk/src/resource.ts +0 -11
  378. package/vendor/sdk/src/resources/beta/beta.ts +0 -249
  379. package/vendor/sdk/src/resources/beta/index.ts +0 -83
  380. package/vendor/sdk/src/resources/beta/messages/batches.ts +0 -486
  381. package/vendor/sdk/src/resources/beta/messages/index.ts +0 -87
  382. package/vendor/sdk/src/resources/beta/messages/messages.ts +0 -1444
  383. package/vendor/sdk/src/resources/beta/models.ts +0 -78
  384. package/vendor/sdk/src/resources/completions.ts +0 -210
  385. package/vendor/sdk/src/resources/index.ts +0 -95
  386. package/vendor/sdk/src/resources/messages/batches.ts +0 -352
  387. package/vendor/sdk/src/resources/messages/index.ts +0 -85
  388. package/vendor/sdk/src/resources/messages/messages.ts +0 -1412
  389. package/vendor/sdk/src/resources/models.ts +0 -75
  390. package/vendor/sdk/src/resources/shared.ts +0 -72
  391. package/vendor/sdk/src/resources/top-level.ts +0 -3
  392. package/vendor/sdk/src/shims/node.ts +0 -50
  393. package/vendor/sdk/src/shims/web.ts +0 -50
  394. package/vendor/sdk/src/streaming.ts +0 -372
  395. package/vendor/sdk/src/tsconfig.json +0 -11
  396. package/vendor/sdk/src/uploads.ts +0 -255
  397. package/vendor/sdk/src/version.ts +0 -1
  398. package/vendor/sdk/streaming.d.ts +0 -36
  399. package/vendor/sdk/streaming.d.ts.map +0 -1
  400. package/vendor/sdk/streaming.js +0 -316
  401. package/vendor/sdk/streaming.js.map +0 -1
  402. package/vendor/sdk/streaming.mjs +0 -310
  403. package/vendor/sdk/streaming.mjs.map +0 -1
  404. package/vendor/sdk/uploads.d.ts +0 -75
  405. package/vendor/sdk/uploads.d.ts.map +0 -1
  406. package/vendor/sdk/uploads.js +0 -171
  407. package/vendor/sdk/uploads.js.map +0 -1
  408. package/vendor/sdk/uploads.mjs +0 -158
  409. package/vendor/sdk/uploads.mjs.map +0 -1
  410. package/vendor/sdk/version.d.ts +0 -2
  411. package/vendor/sdk/version.d.ts.map +0 -1
  412. package/vendor/sdk/version.js +0 -5
  413. package/vendor/sdk/version.js.map +0 -1
  414. package/vendor/sdk/version.mjs +0 -2
  415. package/vendor/sdk/version.mjs.map +0 -1
@@ -1,1412 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from "../../resource.js";
4
- import { APIPromise } from "../../core.js";
5
- import * as Core from "../../core.js";
6
- import * as MessagesAPI from "./messages.js";
7
- import * as BatchesAPI from "./batches.js";
8
- import {
9
- BatchCreateParams,
10
- BatchListParams,
11
- Batches,
12
- DeletedMessageBatch,
13
- MessageBatch,
14
- MessageBatchCanceledResult,
15
- MessageBatchErroredResult,
16
- MessageBatchExpiredResult,
17
- MessageBatchIndividualResponse,
18
- MessageBatchRequestCounts,
19
- MessageBatchResult,
20
- MessageBatchSucceededResult,
21
- MessageBatchesPage,
22
- } from "./batches.js";
23
- import { Stream } from "../../streaming.js";
24
- import { MessageStream } from "../../lib/MessageStream.js";
25
-
26
- export { MessageStream } from "../../lib/MessageStream.js";
27
-
28
- export class Messages extends APIResource {
29
- batches: BatchesAPI.Batches = new BatchesAPI.Batches(this._client);
30
-
31
- /**
32
- * Send a structured list of input messages with text and/or image content, and the
33
- * model will generate the next message in the conversation.
34
- *
35
- * The Messages API can be used for either single queries or stateless multi-turn
36
- * conversations.
37
- *
38
- * Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
39
- */
40
- create(body: MessageCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Message>;
41
- create(
42
- body: MessageCreateParamsStreaming,
43
- options?: Core.RequestOptions,
44
- ): APIPromise<Stream<RawMessageStreamEvent>>;
45
- create(
46
- body: MessageCreateParamsBase,
47
- options?: Core.RequestOptions,
48
- ): APIPromise<Stream<RawMessageStreamEvent> | Message>;
49
- create(
50
- body: MessageCreateParams,
51
- options?: Core.RequestOptions,
52
- ): APIPromise<Message> | APIPromise<Stream<RawMessageStreamEvent>> {
53
- if (body.model in DEPRECATED_MODELS) {
54
- console.warn(
55
- `The model '${body.model}' is deprecated and will reach end-of-life on ${
56
- DEPRECATED_MODELS[body.model]
57
- }\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`,
58
- );
59
- }
60
- return this._client.post('/v1/messages', {
61
- body,
62
- timeout: (this._client as any)._options.timeout ?? 600000,
63
- ...options,
64
- stream: body.stream ?? false,
65
- }) as APIPromise<Message> | APIPromise<Stream<RawMessageStreamEvent>>;
66
- }
67
-
68
- /**
69
- * Create a Message stream
70
- */
71
- stream(body: MessageStreamParams, options?: Core.RequestOptions): MessageStream {
72
- return MessageStream.createMessage(this, body, options);
73
- }
74
-
75
- /**
76
- * Count the number of tokens in a Message.
77
- *
78
- * The Token Count API can be used to count the number of tokens in a Message,
79
- * including tools, images, and documents, without creating it.
80
- *
81
- * Learn more about token counting in our
82
- * [user guide](/en/docs/build-with-claude/token-counting)
83
- */
84
- countTokens(
85
- body: MessageCountTokensParams,
86
- options?: Core.RequestOptions,
87
- ): Core.APIPromise<MessageTokensCount> {
88
- return this._client.post('/v1/messages/count_tokens', { body, ...options });
89
- }
90
- }
91
-
92
- export interface Base64PDFSource {
93
- data: string;
94
-
95
- media_type: 'application/pdf';
96
-
97
- type: 'base64';
98
- }
99
-
100
- export interface CacheControlEphemeral {
101
- type: 'ephemeral';
102
- }
103
-
104
- export interface CitationCharLocation {
105
- cited_text: string;
106
-
107
- document_index: number;
108
-
109
- document_title: string | null;
110
-
111
- end_char_index: number;
112
-
113
- start_char_index: number;
114
-
115
- type: 'char_location';
116
- }
117
-
118
- export interface CitationCharLocationParam {
119
- cited_text: string;
120
-
121
- document_index: number;
122
-
123
- document_title: string | null;
124
-
125
- end_char_index: number;
126
-
127
- start_char_index: number;
128
-
129
- type: 'char_location';
130
- }
131
-
132
- export interface CitationContentBlockLocation {
133
- cited_text: string;
134
-
135
- document_index: number;
136
-
137
- document_title: string | null;
138
-
139
- end_block_index: number;
140
-
141
- start_block_index: number;
142
-
143
- type: 'content_block_location';
144
- }
145
-
146
- export interface CitationContentBlockLocationParam {
147
- cited_text: string;
148
-
149
- document_index: number;
150
-
151
- document_title: string | null;
152
-
153
- end_block_index: number;
154
-
155
- start_block_index: number;
156
-
157
- type: 'content_block_location';
158
- }
159
-
160
- export interface CitationPageLocation {
161
- cited_text: string;
162
-
163
- document_index: number;
164
-
165
- document_title: string | null;
166
-
167
- end_page_number: number;
168
-
169
- start_page_number: number;
170
-
171
- type: 'page_location';
172
- }
173
-
174
- export interface CitationPageLocationParam {
175
- cited_text: string;
176
-
177
- document_index: number;
178
-
179
- document_title: string | null;
180
-
181
- end_page_number: number;
182
-
183
- start_page_number: number;
184
-
185
- type: 'page_location';
186
- }
187
-
188
- export interface CitationsConfigParam {
189
- enabled?: boolean;
190
- }
191
-
192
- export interface CitationsDelta {
193
- citation: CitationCharLocation | CitationPageLocation | CitationContentBlockLocation;
194
-
195
- type: 'citations_delta';
196
- }
197
-
198
- export type ContentBlock = TextBlock | ToolUseBlock | ThinkingBlock | RedactedThinkingBlock;
199
-
200
- export type ContentBlockDeltaEvent = RawContentBlockDeltaEvent;
201
-
202
- export type ContentBlockParam =
203
- | TextBlockParam
204
- | ImageBlockParam
205
- | ToolUseBlockParam
206
- | ToolResultBlockParam
207
- | DocumentBlockParam
208
- | ThinkingBlockParam
209
- | RedactedThinkingBlockParam;
210
-
211
- export interface ContentBlockSource {
212
- content: string | Array<ContentBlockSourceContent>;
213
-
214
- type: 'content';
215
- }
216
-
217
- export type ContentBlockSourceContent = TextBlockParam | ImageBlockParam;
218
-
219
- export type ContentBlockStartEvent = RawContentBlockStartEvent;
220
-
221
- export type ContentBlockStopEvent = RawContentBlockStopEvent;
222
-
223
- export interface DocumentBlockParam {
224
- source: Base64PDFSource | PlainTextSource | ContentBlockSource;
225
-
226
- type: 'document';
227
-
228
- cache_control?: CacheControlEphemeral | null;
229
-
230
- citations?: CitationsConfigParam;
231
-
232
- context?: string | null;
233
-
234
- title?: string | null;
235
- }
236
-
237
- export interface ImageBlockParam {
238
- source: ImageBlockParam.Source;
239
-
240
- type: 'image';
241
-
242
- cache_control?: CacheControlEphemeral | null;
243
- }
244
-
245
- export namespace ImageBlockParam {
246
- export interface Source {
247
- data: string;
248
-
249
- media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
250
-
251
- type: 'base64';
252
- }
253
- }
254
-
255
- export type InputJsonDelta = InputJSONDelta;
256
-
257
- export interface InputJSONDelta {
258
- partial_json: string;
259
-
260
- type: 'input_json_delta';
261
- }
262
-
263
- export interface Message {
264
- /**
265
- * Unique object identifier.
266
- *
267
- * The format and length of IDs may change over time.
268
- */
269
- id: string;
270
-
271
- /**
272
- * Content generated by the model.
273
- *
274
- * This is an array of content blocks, each of which has a `type` that determines
275
- * its shape.
276
- *
277
- * Example:
278
- *
279
- * ```json
280
- * [{ "type": "text", "text": "Hi, I'm Claude." }]
281
- * ```
282
- *
283
- * If the request input `messages` ended with an `assistant` turn, then the
284
- * response `content` will continue directly from that last turn. You can use this
285
- * to constrain the model's output.
286
- *
287
- * For example, if the input `messages` were:
288
- *
289
- * ```json
290
- * [
291
- * {
292
- * "role": "user",
293
- * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
294
- * },
295
- * { "role": "assistant", "content": "The best answer is (" }
296
- * ]
297
- * ```
298
- *
299
- * Then the response `content` might be:
300
- *
301
- * ```json
302
- * [{ "type": "text", "text": "B)" }]
303
- * ```
304
- */
305
- content: Array<ContentBlock>;
306
-
307
- /**
308
- * The model that will complete your prompt.\n\nSee
309
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
310
- * details and options.
311
- */
312
- model: Model;
313
-
314
- /**
315
- * Conversational role of the generated message.
316
- *
317
- * This will always be `"assistant"`.
318
- */
319
- role: 'assistant';
320
-
321
- /**
322
- * The reason that we stopped.
323
- *
324
- * This may be one the following values:
325
- *
326
- * - `"end_turn"`: the model reached a natural stopping point
327
- * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
328
- * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
329
- * - `"tool_use"`: the model invoked one or more tools
330
- *
331
- * In non-streaming mode this value is always non-null. In streaming mode, it is
332
- * null in the `message_start` event and non-null otherwise.
333
- */
334
- stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | null;
335
-
336
- /**
337
- * Which custom stop sequence was generated, if any.
338
- *
339
- * This value will be a non-null string if one of your custom stop sequences was
340
- * generated.
341
- */
342
- stop_sequence: string | null;
343
-
344
- /**
345
- * Object type.
346
- *
347
- * For Messages, this is always `"message"`.
348
- */
349
- type: 'message';
350
-
351
- /**
352
- * Billing and rate-limit usage.
353
- *
354
- * Anthropic's API bills and rate-limits by token counts, as tokens represent the
355
- * underlying cost to our systems.
356
- *
357
- * Under the hood, the API transforms requests into a format suitable for the
358
- * model. The model's output then goes through a parsing stage before becoming an
359
- * API response. As a result, the token counts in `usage` will not match one-to-one
360
- * with the exact visible content of an API request or response.
361
- *
362
- * For example, `output_tokens` will be non-zero, even for an empty string response
363
- * from Claude.
364
- *
365
- * Total input tokens in a request is the summation of `input_tokens`,
366
- * `cache_creation_input_tokens`, and `cache_read_input_tokens`.
367
- */
368
- usage: Usage;
369
- }
370
-
371
- export type MessageDeltaEvent = RawMessageDeltaEvent;
372
-
373
- export interface MessageDeltaUsage {
374
- /**
375
- * The cumulative number of output tokens which were used.
376
- */
377
- output_tokens: number;
378
- }
379
-
380
- export interface MessageParam {
381
- content: string | Array<ContentBlockParam>;
382
-
383
- role: 'user' | 'assistant';
384
- }
385
-
386
- export type MessageStartEvent = RawMessageStartEvent;
387
-
388
- export type MessageStopEvent = RawMessageStopEvent;
389
-
390
- export type MessageStreamEvent = RawMessageStreamEvent;
391
-
392
- export interface MessageTokensCount {
393
- /**
394
- * The total number of tokens across the provided list of messages, system prompt,
395
- * and tools.
396
- */
397
- input_tokens: number;
398
- }
399
-
400
- export interface Metadata {
401
- /**
402
- * An external identifier for the user who is associated with the request.
403
- *
404
- * This should be a uuid, hash value, or other opaque identifier. Anthropic may use
405
- * this id to help detect abuse. Do not include any identifying information such as
406
- * name, email address, or phone number.
407
- */
408
- user_id?: string | null;
409
- }
410
-
411
- /**
412
- * The model that will complete your prompt.\n\nSee
413
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
414
- * details and options.
415
- */
416
- export type Model =
417
- | 'claude-3-5-haiku-latest'
418
- | 'claude-3-5-haiku-20241022'
419
- | 'claude-3-5-sonnet-latest'
420
- | 'claude-3-5-sonnet-20241022'
421
- | 'claude-3-5-sonnet-20240620'
422
- | 'claude-3-opus-latest'
423
- | 'claude-3-opus-20240229'
424
- | 'claude-3-sonnet-20240229'
425
- | 'claude-3-haiku-20240307'
426
- | 'claude-2.1'
427
- | 'claude-2.0'
428
- | (string & {});
429
-
430
- const DEPRECATED_MODELS: {
431
- [K in Model]?: string;
432
- } = {
433
- 'claude-1.3': 'November 6th, 2024',
434
- 'claude-1.3-100k': 'November 6th, 2024',
435
- 'claude-instant-1.1': 'November 6th, 2024',
436
- 'claude-instant-1.1-100k': 'November 6th, 2024',
437
- 'claude-instant-1.2': 'November 6th, 2024',
438
- 'claude-3-sonnet-20240229': 'July 21st, 2025',
439
- 'claude-2.1': 'July 21st, 2025',
440
- 'claude-2.0': 'July 21st, 2025',
441
- };
442
-
443
- export interface PlainTextSource {
444
- data: string;
445
-
446
- media_type: 'text/plain';
447
-
448
- type: 'text';
449
- }
450
-
451
- export interface RawContentBlockDeltaEvent {
452
- delta: TextDelta | InputJSONDelta | CitationsDelta | ThinkingDelta | SignatureDelta;
453
-
454
- index: number;
455
-
456
- type: 'content_block_delta';
457
- }
458
-
459
- export interface RawContentBlockStartEvent {
460
- content_block: TextBlock | ToolUseBlock | ThinkingBlock | RedactedThinkingBlock;
461
-
462
- index: number;
463
-
464
- type: 'content_block_start';
465
- }
466
-
467
- export interface RawContentBlockStopEvent {
468
- index: number;
469
-
470
- type: 'content_block_stop';
471
- }
472
-
473
- export interface RawMessageDeltaEvent {
474
- delta: RawMessageDeltaEvent.Delta;
475
-
476
- type: 'message_delta';
477
-
478
- /**
479
- * Billing and rate-limit usage.
480
- *
481
- * Anthropic's API bills and rate-limits by token counts, as tokens represent the
482
- * underlying cost to our systems.
483
- *
484
- * Under the hood, the API transforms requests into a format suitable for the
485
- * model. The model's output then goes through a parsing stage before becoming an
486
- * API response. As a result, the token counts in `usage` will not match one-to-one
487
- * with the exact visible content of an API request or response.
488
- *
489
- * For example, `output_tokens` will be non-zero, even for an empty string response
490
- * from Claude.
491
- *
492
- * Total input tokens in a request is the summation of `input_tokens`,
493
- * `cache_creation_input_tokens`, and `cache_read_input_tokens`.
494
- */
495
- usage: MessageDeltaUsage;
496
- }
497
-
498
- export namespace RawMessageDeltaEvent {
499
- export interface Delta {
500
- stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | null;
501
-
502
- stop_sequence: string | null;
503
- }
504
- }
505
-
506
- export interface RawMessageStartEvent {
507
- message: Message;
508
-
509
- type: 'message_start';
510
- }
511
-
512
- export interface RawMessageStopEvent {
513
- type: 'message_stop';
514
- }
515
-
516
- export type RawMessageStreamEvent =
517
- | RawMessageStartEvent
518
- | RawMessageDeltaEvent
519
- | RawMessageStopEvent
520
- | RawContentBlockStartEvent
521
- | RawContentBlockDeltaEvent
522
- | RawContentBlockStopEvent;
523
-
524
- export interface RedactedThinkingBlock {
525
- data: string;
526
-
527
- type: 'redacted_thinking';
528
- }
529
-
530
- export interface RedactedThinkingBlockParam {
531
- data: string;
532
-
533
- type: 'redacted_thinking';
534
- }
535
-
536
- export interface SignatureDelta {
537
- signature: string;
538
-
539
- type: 'signature_delta';
540
- }
541
-
542
- export interface TextBlock {
543
- /**
544
- * Citations supporting the text block.
545
- *
546
- * The type of citation returned will depend on the type of document being cited.
547
- * Citing a PDF results in `page_location`, plain text results in `char_location`,
548
- * and content document results in `content_block_location`.
549
- */
550
- citations: Array<TextCitation> | null;
551
-
552
- text: string;
553
-
554
- type: 'text';
555
- }
556
-
557
- export interface TextBlockParam {
558
- text: string;
559
-
560
- type: 'text';
561
-
562
- cache_control?: CacheControlEphemeral | null;
563
-
564
- citations?: Array<TextCitationParam> | null;
565
- }
566
-
567
- export type TextCitation = CitationCharLocation | CitationPageLocation | CitationContentBlockLocation;
568
-
569
- export type TextCitationParam =
570
- | CitationCharLocationParam
571
- | CitationPageLocationParam
572
- | CitationContentBlockLocationParam;
573
-
574
- export interface TextDelta {
575
- text: string;
576
-
577
- type: 'text_delta';
578
- }
579
-
580
- export interface ThinkingBlock {
581
- signature: string;
582
-
583
- thinking: string;
584
-
585
- type: 'thinking';
586
- }
587
-
588
- export interface ThinkingBlockParam {
589
- signature: string;
590
-
591
- thinking: string;
592
-
593
- type: 'thinking';
594
- }
595
-
596
- export interface ThinkingConfigDisabled {
597
- type: 'disabled';
598
- }
599
-
600
- export interface ThinkingConfigEnabled {
601
- budget_tokens: number;
602
-
603
- type: 'enabled';
604
- }
605
-
606
- export interface ThinkingDelta {
607
- thinking: string;
608
-
609
- type: 'thinking_delta';
610
- }
611
-
612
- export interface Tool {
613
- /**
614
- * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
615
- *
616
- * This defines the shape of the `input` that your tool accepts and that the model
617
- * will produce.
618
- */
619
- input_schema: Tool.InputSchema;
620
-
621
- /**
622
- * Name of the tool.
623
- *
624
- * This is how the tool will be called by the model and in tool_use blocks.
625
- */
626
- name: string;
627
-
628
- cache_control?: CacheControlEphemeral | null;
629
-
630
- /**
631
- * Description of what this tool does.
632
- *
633
- * Tool descriptions should be as detailed as possible. The more information that
634
- * the model has about what the tool is and how to use it, the better it will
635
- * perform. You can use natural language descriptions to reinforce important
636
- * aspects of the tool input JSON schema.
637
- */
638
- description?: string;
639
- }
640
-
641
- export namespace Tool {
642
- /**
643
- * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
644
- *
645
- * This defines the shape of the `input` that your tool accepts and that the model
646
- * will produce.
647
- */
648
- export interface InputSchema {
649
- type: 'object';
650
-
651
- properties?: unknown | null;
652
- [k: string]: unknown;
653
- }
654
- }
655
-
656
- /**
657
- * How the model should use the provided tools. The model can use a specific tool,
658
- * any available tool, or decide by itself.
659
- */
660
- export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceTool;
661
-
662
- /**
663
- * The model will use any available tools.
664
- */
665
- export interface ToolChoiceAny {
666
- type: 'any';
667
-
668
- /**
669
- * Whether to disable parallel tool use.
670
- *
671
- * Defaults to `false`. If set to `true`, the model will output exactly one tool
672
- * use.
673
- */
674
- disable_parallel_tool_use?: boolean;
675
- }
676
-
677
- /**
678
- * The model will automatically decide whether to use tools.
679
- */
680
- export interface ToolChoiceAuto {
681
- type: 'auto';
682
-
683
- /**
684
- * Whether to disable parallel tool use.
685
- *
686
- * Defaults to `false`. If set to `true`, the model will output at most one tool
687
- * use.
688
- */
689
- disable_parallel_tool_use?: boolean;
690
- }
691
-
692
- /**
693
- * The model will use the specified tool with `tool_choice.name`.
694
- */
695
- export interface ToolChoiceTool {
696
- /**
697
- * The name of the tool to use.
698
- */
699
- name: string;
700
-
701
- type: 'tool';
702
-
703
- /**
704
- * Whether to disable parallel tool use.
705
- *
706
- * Defaults to `false`. If set to `true`, the model will output exactly one tool
707
- * use.
708
- */
709
- disable_parallel_tool_use?: boolean;
710
- }
711
-
712
- export interface ToolResultBlockParam {
713
- tool_use_id: string;
714
-
715
- type: 'tool_result';
716
-
717
- cache_control?: CacheControlEphemeral | null;
718
-
719
- content?: string | Array<TextBlockParam | ImageBlockParam>;
720
-
721
- is_error?: boolean;
722
- }
723
-
724
- export interface ToolUseBlock {
725
- id: string;
726
-
727
- input: unknown;
728
-
729
- name: string;
730
-
731
- type: 'tool_use';
732
- }
733
-
734
- export interface ToolUseBlockParam {
735
- id: string;
736
-
737
- input: unknown;
738
-
739
- name: string;
740
-
741
- type: 'tool_use';
742
-
743
- cache_control?: CacheControlEphemeral | null;
744
- }
745
-
746
- export interface Usage {
747
- /**
748
- * The number of input tokens used to create the cache entry.
749
- */
750
- cache_creation_input_tokens: number | null;
751
-
752
- /**
753
- * The number of input tokens read from the cache.
754
- */
755
- cache_read_input_tokens: number | null;
756
-
757
- /**
758
- * The number of input tokens which were used.
759
- */
760
- input_tokens: number;
761
-
762
- /**
763
- * The number of output tokens which were used.
764
- */
765
- output_tokens: number;
766
- }
767
-
768
- export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
769
-
770
- export interface MessageCreateParamsBase {
771
- /**
772
- * The maximum number of tokens to generate before stopping.
773
- *
774
- * Note that our models may stop _before_ reaching this maximum. This parameter
775
- * only specifies the absolute maximum number of tokens to generate.
776
- *
777
- * Different models have different maximum values for this parameter. See
778
- * [models](https://docs.anthropic.com/en/docs/models-overview) for details.
779
- */
780
- max_tokens: number;
781
-
782
- /**
783
- * Input messages.
784
- *
785
- * Our models are trained to operate on alternating `user` and `assistant`
786
- * conversational turns. When creating a new `Message`, you specify the prior
787
- * conversational turns with the `messages` parameter, and the model then generates
788
- * the next `Message` in the conversation. Consecutive `user` or `assistant` turns
789
- * in your request will be combined into a single turn.
790
- *
791
- * Each input message must be an object with a `role` and `content`. You can
792
- * specify a single `user`-role message, or you can include multiple `user` and
793
- * `assistant` messages.
794
- *
795
- * If the final message uses the `assistant` role, the response content will
796
- * continue immediately from the content in that message. This can be used to
797
- * constrain part of the model's response.
798
- *
799
- * Example with a single `user` message:
800
- *
801
- * ```json
802
- * [{ "role": "user", "content": "Hello, Claude" }]
803
- * ```
804
- *
805
- * Example with multiple conversational turns:
806
- *
807
- * ```json
808
- * [
809
- * { "role": "user", "content": "Hello there." },
810
- * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
811
- * { "role": "user", "content": "Can you explain LLMs in plain English?" }
812
- * ]
813
- * ```
814
- *
815
- * Example with a partially-filled response from Claude:
816
- *
817
- * ```json
818
- * [
819
- * {
820
- * "role": "user",
821
- * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
822
- * },
823
- * { "role": "assistant", "content": "The best answer is (" }
824
- * ]
825
- * ```
826
- *
827
- * Each input message `content` may be either a single `string` or an array of
828
- * content blocks, where each block has a specific `type`. Using a `string` for
829
- * `content` is shorthand for an array of one content block of type `"text"`. The
830
- * following input messages are equivalent:
831
- *
832
- * ```json
833
- * { "role": "user", "content": "Hello, Claude" }
834
- * ```
835
- *
836
- * ```json
837
- * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
838
- * ```
839
- *
840
- * Starting with Claude 3 models, you can also send image content blocks:
841
- *
842
- * ```json
843
- * {
844
- * "role": "user",
845
- * "content": [
846
- * {
847
- * "type": "image",
848
- * "source": {
849
- * "type": "base64",
850
- * "media_type": "image/jpeg",
851
- * "data": "/9j/4AAQSkZJRg..."
852
- * }
853
- * },
854
- * { "type": "text", "text": "What is in this image?" }
855
- * ]
856
- * }
857
- * ```
858
- *
859
- * We currently support the `base64` source type for images, and the `image/jpeg`,
860
- * `image/png`, `image/gif`, and `image/webp` media types.
861
- *
862
- * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
863
- * more input examples.
864
- *
865
- * Note that if you want to include a
866
- * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
867
- * the top-level `system` parameter — there is no `"system"` role for input
868
- * messages in the Messages API.
869
- */
870
- messages: Array<MessageParam>;
871
-
872
- /**
873
- * The model that will complete your prompt.\n\nSee
874
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
875
- * details and options.
876
- */
877
- model: Model;
878
-
879
- /**
880
- * An object describing metadata about the request.
881
- */
882
- metadata?: Metadata;
883
-
884
- /**
885
- * Custom text sequences that will cause the model to stop generating.
886
- *
887
- * Our models will normally stop when they have naturally completed their turn,
888
- * which will result in a response `stop_reason` of `"end_turn"`.
889
- *
890
- * If you want the model to stop generating when it encounters custom strings of
891
- * text, you can use the `stop_sequences` parameter. If the model encounters one of
892
- * the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
893
- * and the response `stop_sequence` value will contain the matched stop sequence.
894
- */
895
- stop_sequences?: Array<string>;
896
-
897
- /**
898
- * Whether to incrementally stream the response using server-sent events.
899
- *
900
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
901
- * details.
902
- */
903
- stream?: boolean;
904
-
905
- /**
906
- * System prompt.
907
- *
908
- * A system prompt is a way of providing context and instructions to Claude, such
909
- * as specifying a particular goal or role. See our
910
- * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
911
- */
912
- system?: string | Array<TextBlockParam>;
913
-
914
- /**
915
- * Amount of randomness injected into the response.
916
- *
917
- * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
918
- * for analytical / multiple choice, and closer to `1.0` for creative and
919
- * generative tasks.
920
- *
921
- * Note that even with `temperature` of `0.0`, the results will not be fully
922
- * deterministic.
923
- */
924
- temperature?: number;
925
-
926
- thinking?: ThinkingConfigEnabled | ThinkingConfigDisabled;
927
-
928
- /**
929
- * How the model should use the provided tools. The model can use a specific tool,
930
- * any available tool, or decide by itself.
931
- */
932
- tool_choice?: ToolChoice;
933
-
934
- /**
935
- * Definitions of tools that the model may use.
936
- *
937
- * If you include `tools` in your API request, the model may return `tool_use`
938
- * content blocks that represent the model's use of those tools. You can then run
939
- * those tools using the tool input generated by the model and then optionally
940
- * return results back to the model using `tool_result` content blocks.
941
- *
942
- * Each tool definition includes:
943
- *
944
- * - `name`: Name of the tool.
945
- * - `description`: Optional, but strongly-recommended description of the tool.
946
- * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
947
- * tool `input` shape that the model will produce in `tool_use` output content
948
- * blocks.
949
- *
950
- * For example, if you defined `tools` as:
951
- *
952
- * ```json
953
- * [
954
- * {
955
- * "name": "get_stock_price",
956
- * "description": "Get the current stock price for a given ticker symbol.",
957
- * "input_schema": {
958
- * "type": "object",
959
- * "properties": {
960
- * "ticker": {
961
- * "type": "string",
962
- * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
963
- * }
964
- * },
965
- * "required": ["ticker"]
966
- * }
967
- * }
968
- * ]
969
- * ```
970
- *
971
- * And then asked the model "What's the S&P 500 at today?", the model might produce
972
- * `tool_use` content blocks in the response like this:
973
- *
974
- * ```json
975
- * [
976
- * {
977
- * "type": "tool_use",
978
- * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
979
- * "name": "get_stock_price",
980
- * "input": { "ticker": "^GSPC" }
981
- * }
982
- * ]
983
- * ```
984
- *
985
- * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
986
- * input, and return the following back to the model in a subsequent `user`
987
- * message:
988
- *
989
- * ```json
990
- * [
991
- * {
992
- * "type": "tool_result",
993
- * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
994
- * "content": "259.75 USD"
995
- * }
996
- * ]
997
- * ```
998
- *
999
- * Tools can be used for workflows that include running client-side tools and
1000
- * functions, or more generally whenever you want the model to produce a particular
1001
- * JSON structure of output.
1002
- *
1003
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
1004
- */
1005
- tools?: Array<MessageCreateParams.BashTool20250124 | MessageCreateParams.TextEditor20250124 | Tool>;
1006
-
1007
- /**
1008
- * Only sample from the top K options for each subsequent token.
1009
- *
1010
- * Used to remove "long tail" low probability responses.
1011
- * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
1012
- *
1013
- * Recommended for advanced use cases only. You usually only need to use
1014
- * `temperature`.
1015
- */
1016
- top_k?: number;
1017
-
1018
- /**
1019
- * Use nucleus sampling.
1020
- *
1021
- * In nucleus sampling, we compute the cumulative distribution over all the options
1022
- * for each subsequent token in decreasing probability order and cut it off once it
1023
- * reaches a particular probability specified by `top_p`. You should either alter
1024
- * `temperature` or `top_p`, but not both.
1025
- *
1026
- * Recommended for advanced use cases only. You usually only need to use
1027
- * `temperature`.
1028
- */
1029
- top_p?: number;
1030
- }
1031
-
1032
- export namespace MessageCreateParams {
1033
- /**
1034
- * @deprecated use `Anthropic.Messages.ToolChoiceAuto` instead
1035
- */
1036
- export type Metadata = MessagesAPI.Metadata;
1037
-
1038
- /**
1039
- * @deprecated use `Anthropic.Messages.ToolChoiceAuto` instead
1040
- */
1041
- export type ToolChoiceAuto = MessagesAPI.ToolChoiceAuto;
1042
-
1043
- /**
1044
- * @deprecated use `Anthropic.Messages.ToolChoiceAny` instead
1045
- */
1046
- export type ToolChoiceAny = MessagesAPI.ToolChoiceAny;
1047
-
1048
- /**
1049
- * @deprecated use `Anthropic.Messages.ToolChoiceTool` instead
1050
- */
1051
- export type ToolChoiceTool = MessagesAPI.ToolChoiceTool;
1052
-
1053
- export interface BashTool20250124 {
1054
- /**
1055
- * Name of the tool.
1056
- *
1057
- * This is how the tool will be called by the model and in tool_use blocks.
1058
- */
1059
- name: 'bash';
1060
-
1061
- type: 'bash_20250124';
1062
-
1063
- cache_control?: MessagesAPI.CacheControlEphemeral | null;
1064
- }
1065
-
1066
- export interface TextEditor20250124 {
1067
- /**
1068
- * Name of the tool.
1069
- *
1070
- * This is how the tool will be called by the model and in tool_use blocks.
1071
- */
1072
- name: 'str_replace_editor';
1073
-
1074
- type: 'text_editor_20250124';
1075
-
1076
- cache_control?: MessagesAPI.CacheControlEphemeral | null;
1077
- }
1078
-
1079
- export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
1080
- export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
1081
- }
1082
-
1083
- export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
1084
- /**
1085
- * Whether to incrementally stream the response using server-sent events.
1086
- *
1087
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
1088
- * details.
1089
- */
1090
- stream?: false;
1091
- }
1092
-
1093
- export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
1094
- /**
1095
- * Whether to incrementally stream the response using server-sent events.
1096
- *
1097
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
1098
- * details.
1099
- */
1100
- stream: true;
1101
- }
1102
-
1103
- export type MessageStreamParams = MessageCreateParamsBase;
1104
-
1105
- export interface MessageCountTokensParams {
1106
- /**
1107
- * Input messages.
1108
- *
1109
- * Our models are trained to operate on alternating `user` and `assistant`
1110
- * conversational turns. When creating a new `Message`, you specify the prior
1111
- * conversational turns with the `messages` parameter, and the model then generates
1112
- * the next `Message` in the conversation. Consecutive `user` or `assistant` turns
1113
- * in your request will be combined into a single turn.
1114
- *
1115
- * Each input message must be an object with a `role` and `content`. You can
1116
- * specify a single `user`-role message, or you can include multiple `user` and
1117
- * `assistant` messages.
1118
- *
1119
- * If the final message uses the `assistant` role, the response content will
1120
- * continue immediately from the content in that message. This can be used to
1121
- * constrain part of the model's response.
1122
- *
1123
- * Example with a single `user` message:
1124
- *
1125
- * ```json
1126
- * [{ "role": "user", "content": "Hello, Claude" }]
1127
- * ```
1128
- *
1129
- * Example with multiple conversational turns:
1130
- *
1131
- * ```json
1132
- * [
1133
- * { "role": "user", "content": "Hello there." },
1134
- * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
1135
- * { "role": "user", "content": "Can you explain LLMs in plain English?" }
1136
- * ]
1137
- * ```
1138
- *
1139
- * Example with a partially-filled response from Claude:
1140
- *
1141
- * ```json
1142
- * [
1143
- * {
1144
- * "role": "user",
1145
- * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
1146
- * },
1147
- * { "role": "assistant", "content": "The best answer is (" }
1148
- * ]
1149
- * ```
1150
- *
1151
- * Each input message `content` may be either a single `string` or an array of
1152
- * content blocks, where each block has a specific `type`. Using a `string` for
1153
- * `content` is shorthand for an array of one content block of type `"text"`. The
1154
- * following input messages are equivalent:
1155
- *
1156
- * ```json
1157
- * { "role": "user", "content": "Hello, Claude" }
1158
- * ```
1159
- *
1160
- * ```json
1161
- * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
1162
- * ```
1163
- *
1164
- * Starting with Claude 3 models, you can also send image content blocks:
1165
- *
1166
- * ```json
1167
- * {
1168
- * "role": "user",
1169
- * "content": [
1170
- * {
1171
- * "type": "image",
1172
- * "source": {
1173
- * "type": "base64",
1174
- * "media_type": "image/jpeg",
1175
- * "data": "/9j/4AAQSkZJRg..."
1176
- * }
1177
- * },
1178
- * { "type": "text", "text": "What is in this image?" }
1179
- * ]
1180
- * }
1181
- * ```
1182
- *
1183
- * We currently support the `base64` source type for images, and the `image/jpeg`,
1184
- * `image/png`, `image/gif`, and `image/webp` media types.
1185
- *
1186
- * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
1187
- * more input examples.
1188
- *
1189
- * Note that if you want to include a
1190
- * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
1191
- * the top-level `system` parameter — there is no `"system"` role for input
1192
- * messages in the Messages API.
1193
- */
1194
- messages: Array<MessageParam>;
1195
-
1196
- /**
1197
- * The model that will complete your prompt.\n\nSee
1198
- * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
1199
- * details and options.
1200
- */
1201
- model: Model;
1202
-
1203
- /**
1204
- * System prompt.
1205
- *
1206
- * A system prompt is a way of providing context and instructions to Claude, such
1207
- * as specifying a particular goal or role. See our
1208
- * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
1209
- */
1210
- system?: string | Array<TextBlockParam>;
1211
-
1212
- thinking?: ThinkingConfigEnabled | ThinkingConfigDisabled;
1213
-
1214
- /**
1215
- * How the model should use the provided tools. The model can use a specific tool,
1216
- * any available tool, or decide by itself.
1217
- */
1218
- tool_choice?: ToolChoice;
1219
-
1220
- /**
1221
- * Definitions of tools that the model may use.
1222
- *
1223
- * If you include `tools` in your API request, the model may return `tool_use`
1224
- * content blocks that represent the model's use of those tools. You can then run
1225
- * those tools using the tool input generated by the model and then optionally
1226
- * return results back to the model using `tool_result` content blocks.
1227
- *
1228
- * Each tool definition includes:
1229
- *
1230
- * - `name`: Name of the tool.
1231
- * - `description`: Optional, but strongly-recommended description of the tool.
1232
- * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
1233
- * tool `input` shape that the model will produce in `tool_use` output content
1234
- * blocks.
1235
- *
1236
- * For example, if you defined `tools` as:
1237
- *
1238
- * ```json
1239
- * [
1240
- * {
1241
- * "name": "get_stock_price",
1242
- * "description": "Get the current stock price for a given ticker symbol.",
1243
- * "input_schema": {
1244
- * "type": "object",
1245
- * "properties": {
1246
- * "ticker": {
1247
- * "type": "string",
1248
- * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
1249
- * }
1250
- * },
1251
- * "required": ["ticker"]
1252
- * }
1253
- * }
1254
- * ]
1255
- * ```
1256
- *
1257
- * And then asked the model "What's the S&P 500 at today?", the model might produce
1258
- * `tool_use` content blocks in the response like this:
1259
- *
1260
- * ```json
1261
- * [
1262
- * {
1263
- * "type": "tool_use",
1264
- * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
1265
- * "name": "get_stock_price",
1266
- * "input": { "ticker": "^GSPC" }
1267
- * }
1268
- * ]
1269
- * ```
1270
- *
1271
- * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
1272
- * input, and return the following back to the model in a subsequent `user`
1273
- * message:
1274
- *
1275
- * ```json
1276
- * [
1277
- * {
1278
- * "type": "tool_result",
1279
- * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
1280
- * "content": "259.75 USD"
1281
- * }
1282
- * ]
1283
- * ```
1284
- *
1285
- * Tools can be used for workflows that include running client-side tools and
1286
- * functions, or more generally whenever you want the model to produce a particular
1287
- * JSON structure of output.
1288
- *
1289
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
1290
- */
1291
- tools?: Array<
1292
- MessageCountTokensParams.BashTool20250124 | MessageCountTokensParams.TextEditor20250124 | Tool
1293
- >;
1294
- }
1295
-
1296
- export namespace MessageCountTokensParams {
1297
- export interface BashTool20250124 {
1298
- /**
1299
- * Name of the tool.
1300
- *
1301
- * This is how the tool will be called by the model and in tool_use blocks.
1302
- */
1303
- name: 'bash';
1304
-
1305
- type: 'bash_20250124';
1306
-
1307
- cache_control?: MessagesAPI.CacheControlEphemeral | null;
1308
- }
1309
-
1310
- export interface TextEditor20250124 {
1311
- /**
1312
- * Name of the tool.
1313
- *
1314
- * This is how the tool will be called by the model and in tool_use blocks.
1315
- */
1316
- name: 'str_replace_editor';
1317
-
1318
- type: 'text_editor_20250124';
1319
-
1320
- cache_control?: MessagesAPI.CacheControlEphemeral | null;
1321
- }
1322
- }
1323
-
1324
- Messages.Batches = Batches;
1325
- Messages.MessageBatchesPage = MessageBatchesPage;
1326
-
1327
- export declare namespace Messages {
1328
- export {
1329
- type Base64PDFSource as Base64PDFSource,
1330
- type CacheControlEphemeral as CacheControlEphemeral,
1331
- type CitationCharLocation as CitationCharLocation,
1332
- type CitationCharLocationParam as CitationCharLocationParam,
1333
- type CitationContentBlockLocation as CitationContentBlockLocation,
1334
- type CitationContentBlockLocationParam as CitationContentBlockLocationParam,
1335
- type CitationPageLocation as CitationPageLocation,
1336
- type CitationPageLocationParam as CitationPageLocationParam,
1337
- type CitationsConfigParam as CitationsConfigParam,
1338
- type CitationsDelta as CitationsDelta,
1339
- type ContentBlock as ContentBlock,
1340
- type ContentBlockDeltaEvent as ContentBlockDeltaEvent,
1341
- type ContentBlockParam as ContentBlockParam,
1342
- type ContentBlockSource as ContentBlockSource,
1343
- type ContentBlockSourceContent as ContentBlockSourceContent,
1344
- type ContentBlockStartEvent as ContentBlockStartEvent,
1345
- type ContentBlockStopEvent as ContentBlockStopEvent,
1346
- type DocumentBlockParam as DocumentBlockParam,
1347
- type ImageBlockParam as ImageBlockParam,
1348
- type InputJsonDelta as InputJsonDelta,
1349
- type InputJSONDelta as InputJSONDelta,
1350
- type Message as Message,
1351
- type MessageDeltaEvent as MessageDeltaEvent,
1352
- type MessageDeltaUsage as MessageDeltaUsage,
1353
- type MessageParam as MessageParam,
1354
- type MessageStartEvent as MessageStartEvent,
1355
- type MessageStopEvent as MessageStopEvent,
1356
- type MessageStreamEvent as MessageStreamEvent,
1357
- type MessageTokensCount as MessageTokensCount,
1358
- type Metadata as Metadata,
1359
- type Model as Model,
1360
- type PlainTextSource as PlainTextSource,
1361
- type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent,
1362
- type RawContentBlockStartEvent as RawContentBlockStartEvent,
1363
- type RawContentBlockStopEvent as RawContentBlockStopEvent,
1364
- type RawMessageDeltaEvent as RawMessageDeltaEvent,
1365
- type RawMessageStartEvent as RawMessageStartEvent,
1366
- type RawMessageStopEvent as RawMessageStopEvent,
1367
- type RawMessageStreamEvent as RawMessageStreamEvent,
1368
- type RedactedThinkingBlock as RedactedThinkingBlock,
1369
- type RedactedThinkingBlockParam as RedactedThinkingBlockParam,
1370
- type SignatureDelta as SignatureDelta,
1371
- type TextBlock as TextBlock,
1372
- type TextBlockParam as TextBlockParam,
1373
- type TextCitation as TextCitation,
1374
- type TextCitationParam as TextCitationParam,
1375
- type TextDelta as TextDelta,
1376
- type ThinkingBlock as ThinkingBlock,
1377
- type ThinkingBlockParam as ThinkingBlockParam,
1378
- type ThinkingConfigDisabled as ThinkingConfigDisabled,
1379
- type ThinkingConfigEnabled as ThinkingConfigEnabled,
1380
- type ThinkingDelta as ThinkingDelta,
1381
- type Tool as Tool,
1382
- type ToolChoice as ToolChoice,
1383
- type ToolChoiceAny as ToolChoiceAny,
1384
- type ToolChoiceAuto as ToolChoiceAuto,
1385
- type ToolChoiceTool as ToolChoiceTool,
1386
- type ToolResultBlockParam as ToolResultBlockParam,
1387
- type ToolUseBlock as ToolUseBlock,
1388
- type ToolUseBlockParam as ToolUseBlockParam,
1389
- type Usage as Usage,
1390
- type MessageCreateParams as MessageCreateParams,
1391
- type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
1392
- type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
1393
- type MessageStreamParams as MessageStreamParams,
1394
- type MessageCountTokensParams as MessageCountTokensParams,
1395
- };
1396
-
1397
- export {
1398
- Batches as Batches,
1399
- type DeletedMessageBatch as DeletedMessageBatch,
1400
- type MessageBatch as MessageBatch,
1401
- type MessageBatchCanceledResult as MessageBatchCanceledResult,
1402
- type MessageBatchErroredResult as MessageBatchErroredResult,
1403
- type MessageBatchExpiredResult as MessageBatchExpiredResult,
1404
- type MessageBatchIndividualResponse as MessageBatchIndividualResponse,
1405
- type MessageBatchRequestCounts as MessageBatchRequestCounts,
1406
- type MessageBatchResult as MessageBatchResult,
1407
- type MessageBatchSucceededResult as MessageBatchSucceededResult,
1408
- MessageBatchesPage as MessageBatchesPage,
1409
- type BatchCreateParams as BatchCreateParams,
1410
- type BatchListParams as BatchListParams,
1411
- };
1412
- }