@mastra/claude 1.0.1-alpha.2 → 1.0.1-alpha.21

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.
@@ -0,0 +1,805 @@
1
+ import { OpenAPIToolset, Integration } from '@mastra/core';
2
+ import { createClient, createConfig } from '@hey-api/client-fetch';
3
+ import { z } from 'zod';
4
+
5
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
6
+ try {
7
+ var i = n[a](c),
8
+ u = i.value;
9
+ } catch (n) {
10
+ return void e(n);
11
+ }
12
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
13
+ }
14
+ function _asyncToGenerator(n) {
15
+ return function () {
16
+ var t = this,
17
+ e = arguments;
18
+ return new Promise(function (r, o) {
19
+ var a = n.apply(t, e);
20
+ function _next(n) {
21
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
22
+ }
23
+ function _throw(n) {
24
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
25
+ }
26
+ _next(void 0);
27
+ });
28
+ };
29
+ }
30
+ function _defineProperties(e, r) {
31
+ for (var t = 0; t < r.length; t++) {
32
+ var o = r[t];
33
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
34
+ }
35
+ }
36
+ function _createClass(e, r, t) {
37
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
38
+ writable: !1
39
+ }), e;
40
+ }
41
+ function _extends() {
42
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
43
+ for (var e = 1; e < arguments.length; e++) {
44
+ var t = arguments[e];
45
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
46
+ }
47
+ return n;
48
+ }, _extends.apply(null, arguments);
49
+ }
50
+ function _inheritsLoose(t, o) {
51
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
52
+ }
53
+ function _regeneratorRuntime() {
54
+ _regeneratorRuntime = function () {
55
+ return e;
56
+ };
57
+ var t,
58
+ e = {},
59
+ r = Object.prototype,
60
+ n = r.hasOwnProperty,
61
+ o = Object.defineProperty || function (t, e, r) {
62
+ t[e] = r.value;
63
+ },
64
+ i = "function" == typeof Symbol ? Symbol : {},
65
+ a = i.iterator || "@@iterator",
66
+ c = i.asyncIterator || "@@asyncIterator",
67
+ u = i.toStringTag || "@@toStringTag";
68
+ function define(t, e, r) {
69
+ return Object.defineProperty(t, e, {
70
+ value: r,
71
+ enumerable: !0,
72
+ configurable: !0,
73
+ writable: !0
74
+ }), t[e];
75
+ }
76
+ try {
77
+ define({}, "");
78
+ } catch (t) {
79
+ define = function (t, e, r) {
80
+ return t[e] = r;
81
+ };
82
+ }
83
+ function wrap(t, e, r, n) {
84
+ var i = e && e.prototype instanceof Generator ? e : Generator,
85
+ a = Object.create(i.prototype),
86
+ c = new Context(n || []);
87
+ return o(a, "_invoke", {
88
+ value: makeInvokeMethod(t, r, c)
89
+ }), a;
90
+ }
91
+ function tryCatch(t, e, r) {
92
+ try {
93
+ return {
94
+ type: "normal",
95
+ arg: t.call(e, r)
96
+ };
97
+ } catch (t) {
98
+ return {
99
+ type: "throw",
100
+ arg: t
101
+ };
102
+ }
103
+ }
104
+ e.wrap = wrap;
105
+ var h = "suspendedStart",
106
+ l = "suspendedYield",
107
+ f = "executing",
108
+ s = "completed",
109
+ y = {};
110
+ function Generator() {}
111
+ function GeneratorFunction() {}
112
+ function GeneratorFunctionPrototype() {}
113
+ var p = {};
114
+ define(p, a, function () {
115
+ return this;
116
+ });
117
+ var d = Object.getPrototypeOf,
118
+ v = d && d(d(values([])));
119
+ v && v !== r && n.call(v, a) && (p = v);
120
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
121
+ function defineIteratorMethods(t) {
122
+ ["next", "throw", "return"].forEach(function (e) {
123
+ define(t, e, function (t) {
124
+ return this._invoke(e, t);
125
+ });
126
+ });
127
+ }
128
+ function AsyncIterator(t, e) {
129
+ function invoke(r, o, i, a) {
130
+ var c = tryCatch(t[r], t, o);
131
+ if ("throw" !== c.type) {
132
+ var u = c.arg,
133
+ h = u.value;
134
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
135
+ invoke("next", t, i, a);
136
+ }, function (t) {
137
+ invoke("throw", t, i, a);
138
+ }) : e.resolve(h).then(function (t) {
139
+ u.value = t, i(u);
140
+ }, function (t) {
141
+ return invoke("throw", t, i, a);
142
+ });
143
+ }
144
+ a(c.arg);
145
+ }
146
+ var r;
147
+ o(this, "_invoke", {
148
+ value: function (t, n) {
149
+ function callInvokeWithMethodAndArg() {
150
+ return new e(function (e, r) {
151
+ invoke(t, n, e, r);
152
+ });
153
+ }
154
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
155
+ }
156
+ });
157
+ }
158
+ function makeInvokeMethod(e, r, n) {
159
+ var o = h;
160
+ return function (i, a) {
161
+ if (o === f) throw Error("Generator is already running");
162
+ if (o === s) {
163
+ if ("throw" === i) throw a;
164
+ return {
165
+ value: t,
166
+ done: !0
167
+ };
168
+ }
169
+ for (n.method = i, n.arg = a;;) {
170
+ var c = n.delegate;
171
+ if (c) {
172
+ var u = maybeInvokeDelegate(c, n);
173
+ if (u) {
174
+ if (u === y) continue;
175
+ return u;
176
+ }
177
+ }
178
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
179
+ if (o === h) throw o = s, n.arg;
180
+ n.dispatchException(n.arg);
181
+ } else "return" === n.method && n.abrupt("return", n.arg);
182
+ o = f;
183
+ var p = tryCatch(e, r, n);
184
+ if ("normal" === p.type) {
185
+ if (o = n.done ? s : l, p.arg === y) continue;
186
+ return {
187
+ value: p.arg,
188
+ done: n.done
189
+ };
190
+ }
191
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
192
+ }
193
+ };
194
+ }
195
+ function maybeInvokeDelegate(e, r) {
196
+ var n = r.method,
197
+ o = e.iterator[n];
198
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
199
+ var i = tryCatch(o, e.iterator, r.arg);
200
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
201
+ var a = i.arg;
202
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
203
+ }
204
+ function pushTryEntry(t) {
205
+ var e = {
206
+ tryLoc: t[0]
207
+ };
208
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
209
+ }
210
+ function resetTryEntry(t) {
211
+ var e = t.completion || {};
212
+ e.type = "normal", delete e.arg, t.completion = e;
213
+ }
214
+ function Context(t) {
215
+ this.tryEntries = [{
216
+ tryLoc: "root"
217
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
218
+ }
219
+ function values(e) {
220
+ if (e || "" === e) {
221
+ var r = e[a];
222
+ if (r) return r.call(e);
223
+ if ("function" == typeof e.next) return e;
224
+ if (!isNaN(e.length)) {
225
+ var o = -1,
226
+ i = function next() {
227
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
228
+ return next.value = t, next.done = !0, next;
229
+ };
230
+ return i.next = i;
231
+ }
232
+ }
233
+ throw new TypeError(typeof e + " is not iterable");
234
+ }
235
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
236
+ value: GeneratorFunctionPrototype,
237
+ configurable: !0
238
+ }), o(GeneratorFunctionPrototype, "constructor", {
239
+ value: GeneratorFunction,
240
+ configurable: !0
241
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
242
+ var e = "function" == typeof t && t.constructor;
243
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
244
+ }, e.mark = function (t) {
245
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
246
+ }, e.awrap = function (t) {
247
+ return {
248
+ __await: t
249
+ };
250
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
251
+ return this;
252
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
253
+ void 0 === i && (i = Promise);
254
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
255
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
256
+ return t.done ? t.value : a.next();
257
+ });
258
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
259
+ return this;
260
+ }), define(g, "toString", function () {
261
+ return "[object Generator]";
262
+ }), e.keys = function (t) {
263
+ var e = Object(t),
264
+ r = [];
265
+ for (var n in e) r.push(n);
266
+ return r.reverse(), function next() {
267
+ for (; r.length;) {
268
+ var t = r.pop();
269
+ if (t in e) return next.value = t, next.done = !1, next;
270
+ }
271
+ return next.done = !0, next;
272
+ };
273
+ }, e.values = values, Context.prototype = {
274
+ constructor: Context,
275
+ reset: function (e) {
276
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
277
+ },
278
+ stop: function () {
279
+ this.done = !0;
280
+ var t = this.tryEntries[0].completion;
281
+ if ("throw" === t.type) throw t.arg;
282
+ return this.rval;
283
+ },
284
+ dispatchException: function (e) {
285
+ if (this.done) throw e;
286
+ var r = this;
287
+ function handle(n, o) {
288
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
289
+ }
290
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
291
+ var i = this.tryEntries[o],
292
+ a = i.completion;
293
+ if ("root" === i.tryLoc) return handle("end");
294
+ if (i.tryLoc <= this.prev) {
295
+ var c = n.call(i, "catchLoc"),
296
+ u = n.call(i, "finallyLoc");
297
+ if (c && u) {
298
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
299
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
300
+ } else if (c) {
301
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
302
+ } else {
303
+ if (!u) throw Error("try statement without catch or finally");
304
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
305
+ }
306
+ }
307
+ }
308
+ },
309
+ abrupt: function (t, e) {
310
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
311
+ var o = this.tryEntries[r];
312
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
313
+ var i = o;
314
+ break;
315
+ }
316
+ }
317
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
318
+ var a = i ? i.completion : {};
319
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
320
+ },
321
+ complete: function (t, e) {
322
+ if ("throw" === t.type) throw t.arg;
323
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
324
+ },
325
+ finish: function (t) {
326
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
327
+ var r = this.tryEntries[e];
328
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
329
+ }
330
+ },
331
+ catch: function (t) {
332
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
333
+ var r = this.tryEntries[e];
334
+ if (r.tryLoc === t) {
335
+ var n = r.completion;
336
+ if ("throw" === n.type) {
337
+ var o = n.arg;
338
+ resetTryEntry(r);
339
+ }
340
+ return o;
341
+ }
342
+ }
343
+ throw Error("illegal catch attempt");
344
+ },
345
+ delegateYield: function (e, r, n) {
346
+ return this.delegate = {
347
+ iterator: values(e),
348
+ resultName: r,
349
+ nextLoc: n
350
+ }, "next" === this.method && (this.arg = t), y;
351
+ }
352
+ }, e;
353
+ }
354
+ function _setPrototypeOf(t, e) {
355
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
356
+ return t.__proto__ = e, t;
357
+ }, _setPrototypeOf(t, e);
358
+ }
359
+ function _toPrimitive(t, r) {
360
+ if ("object" != typeof t || !t) return t;
361
+ var e = t[Symbol.toPrimitive];
362
+ if (void 0 !== e) {
363
+ var i = e.call(t, r || "default");
364
+ if ("object" != typeof i) return i;
365
+ throw new TypeError("@@toPrimitive must return a primitive value.");
366
+ }
367
+ return ("string" === r ? String : Number)(t);
368
+ }
369
+ function _toPropertyKey(t) {
370
+ var i = _toPrimitive(t, "string");
371
+ return "symbol" == typeof i ? i : i + "";
372
+ }
373
+
374
+ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAaFElEQVR4nOx9W3cUx71vV1XfZ0YCZIwNjg0IbGJiGyMuBpyEWBgJCSHHx5fXOMd5TL6A1znfIXtlP+TBO/thb2O2wEgCXZDAIBAYiSQgMEgCYRzHXHRBEhrN9PSlqvbqqplWT4/AWKNRJ8783EtrkLpruupX9b9XWZycGBGKCA8w7Bf4V0eRgJBRJCBkFAkIGUUCQkaRgJBRJCBkFAkIGUUCQkaRgJBRJCBkFAkIGUUCQkaRgJBRJCBkFAkIGUUCQkaRgJBRJCBkFAkIGUUCQkaRgJBRJCBkFAkIGUUCQkaRgJBRJCBkFAkIGWESQCn1f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YLVv5hPPFFWXb17ejph2TbGjmXyl2GvYpq2bZtmCgBw8+bXLS0tgUUAAJ9JcHo6vm3btlde2TA5+QBjbDNY2UilUhDA/fv3T0xMsAOo81oBeYUiuI/T29s7OTm5cuVzvpr9TGCdFdhAiBKJ6eqq3eXlq9nqnveTaimCrom1p3r3wYb/mZiclLLLez1FhRAqLS09f/58PD6FkMjd5kCBoq5r777z9q2vbuq69vCUAx0fH+/ru/T6668nEpYgzN2gAJMTI3N+mK/ZsbGxaXYYQ2Y3UiY2R9NLl3f+iSeeiEQKuAOUmyjffPONbVuiOPvh3Wxvt+sALlv2JA9Q51rxvJ7s3r17M9Wr2XqY1UxAjElJSYydR5TX6Sr5EsCdUj766RObszvDh4Yfaj7nL3oc8MFVVZXZi8GR5fOAvy3G2HFsblZm71oVMk4Zynjps1iZELqmBw+menv55vzaeRHgVXhzZTVL+DP7QP/C7bfyklx8ggdER7o83Xcsi1c+E6xnydzPS4MwdnLPt+cLInNDvjn6vHSAF3b3Z/Jyb/O6Wjj5w+n3hiN3+meCz8gfRJt19L1+sXZEhKBPtGa1mVt4Opc3z+dh/+SadfT9hccF3W3rhSf9hdAeuJ/ljTsNItiaf9dGrp7wV2Ln36l5SMg8Ymov2J7/QAIr53QnGij2zT5lMdgav/87y17mRaL+AP83VrOPy/cdq4U6NCjMQ2MLCSrkZray/v7ImRc8ZyrwLJhHfn6AK+CfCz/UFRAMhn8/0EdP8PkUTz9UAvIcpoU7Nq4ogkJGkYCQUSQgZBQJCBlFAkJGkYCQUSQgZBQJCBlFAkJGkYCQUSQgZBQJCBlFAkJGkYCQUSQgZBQJCBlFAkJGkYCQUSQgZBQJCBlFAkJGkYCQUSQgZBQJCBn/GwAA//9y8LzByI3dIQAAAABJRU5ErkJggg==";
375
+
376
+ var comments = {
377
+ createMessage: {
378
+ comment: 'Create a Message',
379
+ doc: 'Create a Message\n Send a structured list of input messages with text and/or image content, and the\n model will generate the next message in the conversation.\n \n The Messages API can be used for either single queries or stateless multi-turn\n conversations.'
380
+ },
381
+ createMessageBatch: {
382
+ comment: 'Create a Message Batch',
383
+ doc: 'Create a Message Batch\n Send a batch of Message creation requests.'
384
+ },
385
+ retrieveMessageBatch: {
386
+ comment: 'Retrieve a Message Batch',
387
+ doc: 'Retrieve a Message Batch\n This endpoint is idempotent and can be used to poll for Message Batch\n completion. To access the results of a Message Batch, make a request to the\n `results_url` field in the response.'
388
+ }
389
+ };
390
+
391
+ var client = /*#__PURE__*/createClient(/*#__PURE__*/createConfig());
392
+ /**
393
+ * Create a Message
394
+ * Send a structured list of input messages with text and/or image content, and the
395
+ * model will generate the next message in the conversation.
396
+ *
397
+ * The Messages API can be used for either single queries or stateless multi-turn
398
+ * conversations.
399
+ *
400
+ */
401
+ var createMessage = function createMessage(options) {
402
+ var _options$client;
403
+ return ((_options$client = options == null ? void 0 : options.client) != null ? _options$client : client).post(_extends({}, options, {
404
+ url: '/messages'
405
+ }));
406
+ };
407
+ /**
408
+ * Create a Message Batch
409
+ * Send a batch of Message creation requests.
410
+ */
411
+ var createMessageBatch = function createMessageBatch(options) {
412
+ var _options$client2;
413
+ return ((_options$client2 = options == null ? void 0 : options.client) != null ? _options$client2 : client).post(_extends({}, options, {
414
+ url: '/messages/batches'
415
+ }));
416
+ };
417
+ /**
418
+ * Retrieve a Message Batch
419
+ * This endpoint is idempotent and can be used to poll for Message Batch
420
+ * completion. To access the results of a Message Batch, make a request to the
421
+ * `results_url` field in the response.
422
+ *
423
+ */
424
+ var retrieveMessageBatch = function retrieveMessageBatch(options) {
425
+ var _options$client3;
426
+ return ((_options$client3 = options == null ? void 0 : options.client) != null ? _options$client3 : client).get(_extends({}, options, {
427
+ url: '/messages/batches/{id}'
428
+ }));
429
+ };
430
+
431
+ var integrationClient = {
432
+ __proto__: null,
433
+ client: client,
434
+ createMessage: createMessage,
435
+ createMessageBatch: createMessageBatch,
436
+ retrieveMessageBatch: retrieveMessageBatch
437
+ };
438
+
439
+ // Generated by ts-to-zod
440
+ var textBlockDeltaSchema = /*#__PURE__*/z.object({
441
+ text: /*#__PURE__*/z.string(),
442
+ type: /*#__PURE__*/z.literal('text_delta')
443
+ });
444
+ var inputJsonBlockDeltaSchema = /*#__PURE__*/z.object({
445
+ partial_json: /*#__PURE__*/z.string().optional(),
446
+ type: /*#__PURE__*/z.literal('input_json_delta')
447
+ });
448
+ var cacheControlEphemeralSchema = /*#__PURE__*/z.object({
449
+ type: /*#__PURE__*/z.literal('ephemeral').optional()
450
+ });
451
+ var typeSchema = /*#__PURE__*/z.literal('ephemeral');
452
+ var blockDeltaSchema = /*#__PURE__*/z.union([textBlockDeltaSchema, inputJsonBlockDeltaSchema]);
453
+ var contentBlockStopEventSchema = /*#__PURE__*/z.object({
454
+ index: /*#__PURE__*/z.number(),
455
+ type: /*#__PURE__*/z.literal('content_block_stop')
456
+ });
457
+ var createMessageRequestMetadataSchema = /*#__PURE__*/z.object({
458
+ user_id: /*#__PURE__*/z.string().optional()
459
+ });
460
+ var errorSchema = /*#__PURE__*/z.object({
461
+ type: /*#__PURE__*/z.string(),
462
+ message: /*#__PURE__*/z.string()
463
+ });
464
+ var errorEventSchema = /*#__PURE__*/z.object({
465
+ type: /*#__PURE__*/z.literal('error'),
466
+ error: errorSchema
467
+ });
468
+ var imageBlockSourceSchema = /*#__PURE__*/z.object({
469
+ data: /*#__PURE__*/z.string(),
470
+ media_type: /*#__PURE__*/z.union([/*#__PURE__*/z.literal('image/jpeg'), /*#__PURE__*/z.literal('image/png'), /*#__PURE__*/z.literal('image/gif'), /*#__PURE__*/z.literal('image/webp')]),
471
+ type: /*#__PURE__*/z.literal('base64')
472
+ });
473
+ var mediaTypeSchema = /*#__PURE__*/z.union([/*#__PURE__*/z.literal('image/jpeg'), /*#__PURE__*/z.literal('image/png'), /*#__PURE__*/z.literal('image/gif'), /*#__PURE__*/z.literal('image/webp')]);
474
+ var type2Schema = /*#__PURE__*/z.literal('base64');
475
+ var messageRoleSchema = /*#__PURE__*/z.union([/*#__PURE__*/z.literal('user'), /*#__PURE__*/z.literal('assistant')]);
476
+ var stopReasonSchema = /*#__PURE__*/z.union([/*#__PURE__*/z.literal('end_turn'), /*#__PURE__*/z.literal('max_tokens'), /*#__PURE__*/z.literal('stop_sequence'), /*#__PURE__*/z.literal('tool_use')]);
477
+ var usageSchema = /*#__PURE__*/z.object({
478
+ input_tokens: /*#__PURE__*/z.number(),
479
+ output_tokens: /*#__PURE__*/z.number(),
480
+ cache_creation_input_tokens: /*#__PURE__*/z.number().optional(),
481
+ cache_read_input_tokens: /*#__PURE__*/z.number().optional()
482
+ });
483
+ var messageBatchRequestCountsSchema = /*#__PURE__*/z.object({
484
+ processing: /*#__PURE__*/z.number(),
485
+ succeeded: /*#__PURE__*/z.number(),
486
+ errored: /*#__PURE__*/z.number(),
487
+ canceled: /*#__PURE__*/z.number(),
488
+ expired: /*#__PURE__*/z.number()
489
+ });
490
+ var processingStatusSchema = /*#__PURE__*/z.union([/*#__PURE__*/z.literal('in_progress'), /*#__PURE__*/z.literal('canceling'), /*#__PURE__*/z.literal('ended')]);
491
+ var type3Schema = /*#__PURE__*/z.literal('message_batch');
492
+ var messageDeltaSchema = /*#__PURE__*/z.object({
493
+ stop_reason: /*#__PURE__*/stopReasonSchema.optional(),
494
+ stop_sequence: /*#__PURE__*/z.string().optional()
495
+ });
496
+ var messageDeltaUsageSchema = /*#__PURE__*/z.object({
497
+ output_tokens: /*#__PURE__*/z.number()
498
+ });
499
+ var messageStopEventSchema = /*#__PURE__*/z.object({
500
+ type: /*#__PURE__*/z.literal('message_stop')
501
+ });
502
+ var messageDeltaEventSchema = /*#__PURE__*/z.object({
503
+ delta: messageDeltaSchema,
504
+ type: /*#__PURE__*/z.literal('message_delta'),
505
+ usage: messageDeltaUsageSchema
506
+ });
507
+ var contentBlockDeltaEventSchema = /*#__PURE__*/z.object({
508
+ delta: blockDeltaSchema,
509
+ index: /*#__PURE__*/z.number(),
510
+ type: /*#__PURE__*/z.literal('content_block_delta')
511
+ });
512
+ var pingEventSchema = /*#__PURE__*/z.object({
513
+ type: /*#__PURE__*/z.literal('ping')
514
+ });
515
+ var messageStreamEventTypeSchema = /*#__PURE__*/z.union([/*#__PURE__*/z.literal('message_start'), /*#__PURE__*/z.literal('message_delta'), /*#__PURE__*/z.literal('message_stop'), /*#__PURE__*/z.literal('content_block_start'), /*#__PURE__*/z.literal('content_block_delta'), /*#__PURE__*/z.literal('content_block_stop'), /*#__PURE__*/z.literal('ping'), /*#__PURE__*/z.literal('error')]);
516
+ var textBlockSchema = /*#__PURE__*/z.object({
517
+ text: /*#__PURE__*/z.string(),
518
+ type: /*#__PURE__*/z.literal('text').optional(),
519
+ cache_control: /*#__PURE__*/cacheControlEphemeralSchema.optional()
520
+ });
521
+ var toolCustomSchema = /*#__PURE__*/z.object({
522
+ type: /*#__PURE__*/z.literal('ToolCustom').optional(),
523
+ name: /*#__PURE__*/z.string(),
524
+ description: /*#__PURE__*/z.string().optional(),
525
+ input_schema: /*#__PURE__*/z.record(/*#__PURE__*/z.unknown())
526
+ });
527
+ var toolComputerUseSchema = /*#__PURE__*/z.object({
528
+ type: /*#__PURE__*/z.literal('ToolComputerUse').optional(),
529
+ name: /*#__PURE__*/z.string().optional(),
530
+ cache_control: /*#__PURE__*/cacheControlEphemeralSchema.optional(),
531
+ display_width_px: /*#__PURE__*/z.number(),
532
+ display_height_px: /*#__PURE__*/z.number(),
533
+ display_number: /*#__PURE__*/z.number().optional().nullable()
534
+ });
535
+ var toolTextEditorSchema = /*#__PURE__*/z.object({
536
+ type: /*#__PURE__*/z.literal('ToolTextEditor').optional(),
537
+ name: /*#__PURE__*/z.string().optional(),
538
+ cache_control: /*#__PURE__*/cacheControlEphemeralSchema.optional()
539
+ });
540
+ var toolBashSchema = /*#__PURE__*/z.object({
541
+ type: /*#__PURE__*/z.literal('ToolBash').optional(),
542
+ name: /*#__PURE__*/z.string().optional(),
543
+ cache_control: /*#__PURE__*/cacheControlEphemeralSchema.optional()
544
+ });
545
+ var toolChoiceTypeSchema = /*#__PURE__*/z.union([/*#__PURE__*/z.literal('auto'), /*#__PURE__*/z.literal('any'), /*#__PURE__*/z.literal('tool')]);
546
+ var toolUseBlockSchema = /*#__PURE__*/z.object({
547
+ id: /*#__PURE__*/z.string(),
548
+ name: /*#__PURE__*/z.string(),
549
+ input: /*#__PURE__*/z.record(/*#__PURE__*/z.unknown()),
550
+ type: /*#__PURE__*/z.literal('tool_use').optional(),
551
+ cache_control: /*#__PURE__*/cacheControlEphemeralSchema.optional()
552
+ });
553
+ var createMessageErrorSchema = /*#__PURE__*/z.unknown();
554
+ var messageBatchSchema = /*#__PURE__*/z.object({
555
+ id: /*#__PURE__*/z.string(),
556
+ created_at: /*#__PURE__*/z.string(),
557
+ expires_at: /*#__PURE__*/z.string(),
558
+ processing_status: /*#__PURE__*/z.union([/*#__PURE__*/z.literal('in_progress'), /*#__PURE__*/z.literal('canceling'), /*#__PURE__*/z.literal('ended')]),
559
+ request_counts: messageBatchRequestCountsSchema,
560
+ results_url: /*#__PURE__*/z.string().optional().nullable(),
561
+ type: /*#__PURE__*/z.literal('message_batch')
562
+ });
563
+ var createMessageBatchErrorSchema = /*#__PURE__*/z.unknown();
564
+ var retrieveMessageBatchDataSchema = /*#__PURE__*/z.object({
565
+ path: /*#__PURE__*/z.object({
566
+ id: /*#__PURE__*/z.string()
567
+ })
568
+ });
569
+ var retrieveMessageBatchResponseSchema = messageBatchSchema;
570
+ var retrieveMessageBatchErrorSchema = /*#__PURE__*/z.unknown();
571
+ var imageBlockSchema = /*#__PURE__*/z.object({
572
+ source: imageBlockSourceSchema,
573
+ type: /*#__PURE__*/z.literal('image').optional(),
574
+ cache_control: /*#__PURE__*/cacheControlEphemeralSchema.optional()
575
+ });
576
+ var toolChoiceSchema = /*#__PURE__*/z.object({
577
+ type: toolChoiceTypeSchema,
578
+ name: /*#__PURE__*/z.string().optional(),
579
+ disable_parallel_tool_use: /*#__PURE__*/z["boolean"]().optional()
580
+ });
581
+ var toolSchema = /*#__PURE__*/z.union([toolCustomSchema, toolComputerUseSchema, toolTextEditorSchema, toolBashSchema]);
582
+ var createMessageBatchResponseSchema = messageBatchSchema;
583
+ var batchMessageRequestSchema = /*#__PURE__*/z.lazy(function () {
584
+ return z.object({
585
+ custom_id: z.string(),
586
+ params: createMessageRequestSchema
587
+ });
588
+ });
589
+ var createMessageRequestSchema = /*#__PURE__*/z.lazy(function () {
590
+ return z.object({
591
+ model: z.union([z.string(), z.literal('claude-3-5-sonnet-latest'), z.literal('claude-3-5-sonnet-20241022'), z.literal('claude-3-5-sonnet-20240620'), z.literal('claude-3-opus-latest'), z.literal('claude-3-opus-20240229'), z.literal('claude-3-sonnet-20240229'), z.literal('claude-3-haiku-20240307'), z.literal('claude-2.1'), z.literal('claude-2.0'), z.literal('claude-instant-1.2')]),
592
+ messages: z.array(messageSchema),
593
+ max_tokens: z.number(),
594
+ metadata: createMessageRequestMetadataSchema.optional(),
595
+ stop_sequences: z.array(z.string()).optional(),
596
+ system: z.union([z.string(), z.array(blockSchema)]).optional(),
597
+ temperature: z.number().optional(),
598
+ tool_choice: toolChoiceSchema.optional(),
599
+ tools: z.array(toolSchema).optional(),
600
+ top_k: z.number().optional(),
601
+ top_p: z.number().optional(),
602
+ stream: z["boolean"]().optional()
603
+ });
604
+ });
605
+ var blockSchema = /*#__PURE__*/z.lazy(function () {
606
+ return z.union([textBlockSchema, imageBlockSchema, toolUseBlockSchema, toolResultBlockSchema]);
607
+ });
608
+ var toolResultBlockSchema = /*#__PURE__*/z.lazy(function () {
609
+ return z.object({
610
+ tool_use_id: z.string(),
611
+ content: z.union([z.string(), z.array(blockSchema)]),
612
+ is_error: z["boolean"]().optional(),
613
+ type: z.literal('tool_result').optional(),
614
+ cache_control: cacheControlEphemeralSchema.optional()
615
+ });
616
+ });
617
+ var contentBlockStartEventSchema = /*#__PURE__*/z.lazy(function () {
618
+ return z.object({
619
+ content_block: blockSchema,
620
+ index: z.number(),
621
+ type: z.literal('content_block_start')
622
+ });
623
+ });
624
+ var createMessageBatchRequestSchema = /*#__PURE__*/z.lazy(function () {
625
+ return z.object({
626
+ requests: z.array(batchMessageRequestSchema)
627
+ });
628
+ });
629
+ var messageSchema = /*#__PURE__*/z.lazy(function () {
630
+ return z.object({
631
+ id: z.string().optional(),
632
+ content: z.union([z.string(), z.array(blockSchema)]),
633
+ role: messageRoleSchema,
634
+ model: z.string().optional(),
635
+ stop_reason: stopReasonSchema.optional(),
636
+ stop_sequence: z.string().optional(),
637
+ type: z.string().optional(),
638
+ usage: usageSchema.optional()
639
+ });
640
+ });
641
+ var messageStartEventSchema = /*#__PURE__*/z.lazy(function () {
642
+ return z.object({
643
+ message: messageSchema,
644
+ type: z.literal('message_start')
645
+ });
646
+ });
647
+ var messageStreamEventSchema = /*#__PURE__*/z.lazy(function () {
648
+ return z.union([messageStartEventSchema, messageDeltaEventSchema, messageStopEventSchema, contentBlockStartEventSchema, contentBlockDeltaEventSchema, contentBlockStopEventSchema, pingEventSchema, errorEventSchema]);
649
+ });
650
+ var createMessageDataSchema = /*#__PURE__*/z.lazy(function () {
651
+ return z.object({
652
+ body: createMessageRequestSchema
653
+ });
654
+ });
655
+ var createMessageResponseSchema = /*#__PURE__*/z.lazy(function () {
656
+ return messageSchema;
657
+ });
658
+ var createMessageBatchDataSchema = /*#__PURE__*/z.lazy(function () {
659
+ return z.object({
660
+ body: createMessageBatchRequestSchema
661
+ });
662
+ });
663
+
664
+ var zodSchema = {
665
+ __proto__: null,
666
+ batchMessageRequestSchema: batchMessageRequestSchema,
667
+ blockDeltaSchema: blockDeltaSchema,
668
+ blockSchema: blockSchema,
669
+ cacheControlEphemeralSchema: cacheControlEphemeralSchema,
670
+ contentBlockDeltaEventSchema: contentBlockDeltaEventSchema,
671
+ contentBlockStartEventSchema: contentBlockStartEventSchema,
672
+ contentBlockStopEventSchema: contentBlockStopEventSchema,
673
+ createMessageBatchDataSchema: createMessageBatchDataSchema,
674
+ createMessageBatchErrorSchema: createMessageBatchErrorSchema,
675
+ createMessageBatchRequestSchema: createMessageBatchRequestSchema,
676
+ createMessageBatchResponseSchema: createMessageBatchResponseSchema,
677
+ createMessageDataSchema: createMessageDataSchema,
678
+ createMessageErrorSchema: createMessageErrorSchema,
679
+ createMessageRequestMetadataSchema: createMessageRequestMetadataSchema,
680
+ createMessageRequestSchema: createMessageRequestSchema,
681
+ createMessageResponseSchema: createMessageResponseSchema,
682
+ errorEventSchema: errorEventSchema,
683
+ errorSchema: errorSchema,
684
+ imageBlockSchema: imageBlockSchema,
685
+ imageBlockSourceSchema: imageBlockSourceSchema,
686
+ inputJsonBlockDeltaSchema: inputJsonBlockDeltaSchema,
687
+ mediaTypeSchema: mediaTypeSchema,
688
+ messageBatchRequestCountsSchema: messageBatchRequestCountsSchema,
689
+ messageBatchSchema: messageBatchSchema,
690
+ messageDeltaEventSchema: messageDeltaEventSchema,
691
+ messageDeltaSchema: messageDeltaSchema,
692
+ messageDeltaUsageSchema: messageDeltaUsageSchema,
693
+ messageRoleSchema: messageRoleSchema,
694
+ messageSchema: messageSchema,
695
+ messageStartEventSchema: messageStartEventSchema,
696
+ messageStopEventSchema: messageStopEventSchema,
697
+ messageStreamEventSchema: messageStreamEventSchema,
698
+ messageStreamEventTypeSchema: messageStreamEventTypeSchema,
699
+ pingEventSchema: pingEventSchema,
700
+ processingStatusSchema: processingStatusSchema,
701
+ retrieveMessageBatchDataSchema: retrieveMessageBatchDataSchema,
702
+ retrieveMessageBatchErrorSchema: retrieveMessageBatchErrorSchema,
703
+ retrieveMessageBatchResponseSchema: retrieveMessageBatchResponseSchema,
704
+ stopReasonSchema: stopReasonSchema,
705
+ textBlockDeltaSchema: textBlockDeltaSchema,
706
+ textBlockSchema: textBlockSchema,
707
+ toolBashSchema: toolBashSchema,
708
+ toolChoiceSchema: toolChoiceSchema,
709
+ toolChoiceTypeSchema: toolChoiceTypeSchema,
710
+ toolComputerUseSchema: toolComputerUseSchema,
711
+ toolCustomSchema: toolCustomSchema,
712
+ toolResultBlockSchema: toolResultBlockSchema,
713
+ toolSchema: toolSchema,
714
+ toolTextEditorSchema: toolTextEditorSchema,
715
+ toolUseBlockSchema: toolUseBlockSchema,
716
+ type2Schema: type2Schema,
717
+ type3Schema: type3Schema,
718
+ typeSchema: typeSchema,
719
+ usageSchema: usageSchema
720
+ };
721
+
722
+ var ClaudeToolset = /*#__PURE__*/function (_OpenAPIToolset) {
723
+ function ClaudeToolset(_ref) {
724
+ var _this;
725
+ var config = _ref.config;
726
+ _this = _OpenAPIToolset.call(this) || this;
727
+ _this.name = 'CLAUDE';
728
+ _this.logoUrl = img;
729
+ _this.config = void 0;
730
+ _this.tools = void 0;
731
+ _this.categories = ['ai', 'communications'];
732
+ _this.description = 'Claude is a next generation AI assistant built for work and trained to be safe, accurate, and secure.';
733
+ _this.getApiClient = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
734
+ var _this$config;
735
+ var value, baseClient;
736
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
737
+ while (1) switch (_context.prev = _context.next) {
738
+ case 0:
739
+ value = {
740
+ 'x-api-key': (_this$config = _this.config) == null ? void 0 : _this$config['ANTHROPIC_API_KEY']
741
+ };
742
+ baseClient = _this.baseClient;
743
+ baseClient.client.interceptors.request.use(function (request, options) {
744
+ request.headers.set('x-api-key', value == null ? void 0 : value['ANTHROPIC_API_KEY']);
745
+ return request;
746
+ });
747
+ return _context.abrupt("return", integrationClient);
748
+ case 4:
749
+ case "end":
750
+ return _context.stop();
751
+ }
752
+ }, _callee);
753
+ }));
754
+ _this.config = config;
755
+ _this.tools = _this._generateIntegrationTools();
756
+ return _this;
757
+ }
758
+ _inheritsLoose(ClaudeToolset, _OpenAPIToolset);
759
+ return _createClass(ClaudeToolset, [{
760
+ key: "toolSchemas",
761
+ get: function get() {
762
+ return zodSchema;
763
+ }
764
+ }, {
765
+ key: "toolDocumentations",
766
+ get: function get() {
767
+ return comments;
768
+ }
769
+ }, {
770
+ key: "baseClient",
771
+ get: function get() {
772
+ client.setConfig({
773
+ baseUrl: "https://api.anthropic.com/v1"
774
+ });
775
+ return integrationClient;
776
+ }
777
+ }]);
778
+ }(OpenAPIToolset);
779
+
780
+ var ClaudeIntegration = /*#__PURE__*/function (_Integration) {
781
+ function ClaudeIntegration(_ref) {
782
+ var _this;
783
+ var config = _ref.config;
784
+ _this = _Integration.call(this) || this;
785
+ _this.name = 'CLAUDE';
786
+ _this.logoUrl = img;
787
+ _this.config = void 0;
788
+ _this.categories = ['ai', 'communications'];
789
+ _this.description = 'Claude is a next generation AI assistant built for work and trained to be safe, accurate, and secure.';
790
+ _this.config = config;
791
+ return _this;
792
+ }
793
+ _inheritsLoose(ClaudeIntegration, _Integration);
794
+ var _proto = ClaudeIntegration.prototype;
795
+ _proto.getStaticTools = function getStaticTools() {
796
+ var openapi = new ClaudeToolset({
797
+ config: this.config
798
+ });
799
+ return openapi.tools;
800
+ };
801
+ return ClaudeIntegration;
802
+ }(Integration);
803
+
804
+ export { ClaudeIntegration };
805
+ //# sourceMappingURL=claude.esm.js.map