@mastra/deployer 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,18 +17,18 @@ import { logger } from 'hono/logger';
17
17
  import { z, ZodFirstPartyTypeKind, ZodOptional } from 'zod';
18
18
  import { Agent } from '@mastra/core/agent';
19
19
 
20
- // ../../node_modules/.pnpm/@hono+node-server@1.13.7_hono@4.6.19/node_modules/@hono/node-server/dist/index.mjs
20
+ // ../../node_modules/.pnpm/@hono+node-server@1.13.8_hono@4.7.2/node_modules/@hono/node-server/dist/index.mjs
21
21
  var RequestError = class extends Error {
22
22
  static name = "RequestError";
23
23
  constructor(message, options) {
24
24
  super(message, options);
25
25
  }
26
26
  };
27
- var toRequestError = (e3) => {
28
- if (e3 instanceof RequestError) {
29
- return e3;
27
+ var toRequestError = (e2) => {
28
+ if (e2 instanceof RequestError) {
29
+ return e2;
30
30
  }
31
- return new RequestError(e3.message, { cause: e3 });
31
+ return new RequestError(e2.message, { cause: e2 });
32
32
  };
33
33
  var GlobalRequest = global.Request;
34
34
  var Request = class extends GlobalRequest {
@@ -68,7 +68,16 @@ var newRequestFromIncoming = (method, url, incoming, abortController) => {
68
68
  return req;
69
69
  }
70
70
  if (!(method === "GET" || method === "HEAD")) {
71
- init.body = Readable.toWeb(incoming);
71
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
72
+ init.body = new ReadableStream({
73
+ start(controller) {
74
+ controller.enqueue(incoming.rawBody);
75
+ controller.close();
76
+ }
77
+ });
78
+ } else {
79
+ init.body = Readable.toWeb(incoming);
80
+ }
72
81
  }
73
82
  return new Request(url, init);
74
83
  };
@@ -178,15 +187,15 @@ function writeFromReadableStream(stream, writable) {
178
187
  } else {
179
188
  return reader.read().then(flow, cancel);
180
189
  }
181
- } catch (e3) {
182
- cancel(e3);
190
+ } catch (e2) {
191
+ cancel(e2);
183
192
  }
184
193
  }
185
194
  }
186
195
  var buildOutgoingHttpHeaders = (headers) => {
187
196
  const res = {};
188
197
  if (!(headers instanceof Headers)) {
189
- headers = new Headers(headers ?? undefined);
198
+ headers = new Headers(headers ?? void 0);
190
199
  }
191
200
  const cookies = [];
192
201
  for (const [k, v] of headers) {
@@ -277,7 +286,7 @@ function getInternalBody(response) {
277
286
  response = response[getResponseCache]();
278
287
  }
279
288
  const state = response[stateKey];
280
- return state && state.body || undefined;
289
+ return state && state.body || void 0;
281
290
  }
282
291
  var X_ALREADY_SENT = "x-hono-already-sent";
283
292
  var webFetch = global.fetch;
@@ -298,15 +307,15 @@ var regContentType = /^(application\/json\b|text\/(?!event-stream\b))/i;
298
307
  var handleRequestError = () => new Response(null, {
299
308
  status: 400
300
309
  });
301
- var handleFetchError = (e3) => new Response(null, {
302
- status: e3 instanceof Error && (e3.name === "TimeoutError" || e3.constructor.name === "TimeoutError") ? 504 : 500
310
+ var handleFetchError = (e2) => new Response(null, {
311
+ status: e2 instanceof Error && (e2.name === "TimeoutError" || e2.constructor.name === "TimeoutError") ? 504 : 500
303
312
  });
304
- var handleResponseError = (e3, outgoing) => {
305
- const err = e3 instanceof Error ? e3 : new Error("unknown error", { cause: e3 });
313
+ var handleResponseError = (e2, outgoing) => {
314
+ const err = e2 instanceof Error ? e2 : new Error("unknown error", { cause: e2 });
306
315
  if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
307
316
  console.info("The user aborted a request.");
308
317
  } else {
309
- console.error(e3);
318
+ console.error(e2);
310
319
  if (!outgoing.headersSent) {
311
320
  outgoing.writeHead(500, { "Content-Type": "text/plain" });
312
321
  }
@@ -323,7 +332,7 @@ var responseViaCache = (res, outgoing) => {
323
332
  } else {
324
333
  outgoing.writeHead(status, header);
325
334
  return writeFromReadableStream(body, outgoing)?.catch(
326
- (e3) => handleResponseError(e3, outgoing)
335
+ (e2) => handleResponseError(e2, outgoing)
327
336
  );
328
337
  }
329
338
  };
@@ -402,36 +411,40 @@ var getRequestListener = (fetchCallback, options = {}) => {
402
411
  try {
403
412
  req = newRequest(incoming, options.hostname);
404
413
  outgoing.on("close", () => {
414
+ const abortController = req[abortControllerKey];
415
+ if (!abortController) {
416
+ return;
417
+ }
405
418
  if (incoming.errored) {
406
- req[getAbortController]().abort(incoming.errored.toString());
419
+ req[abortControllerKey].abort(incoming.errored.toString());
407
420
  } else if (!outgoing.writableFinished) {
408
- req[getAbortController]().abort("Client connection prematurely closed.");
421
+ req[abortControllerKey].abort("Client connection prematurely closed.");
409
422
  }
410
423
  });
411
424
  res = fetchCallback(req, { incoming, outgoing });
412
425
  if (cacheKey in res) {
413
426
  return responseViaCache(res, outgoing);
414
427
  }
415
- } catch (e3) {
428
+ } catch (e2) {
416
429
  if (!res) {
417
430
  if (options.errorHandler) {
418
- res = await options.errorHandler(req ? e3 : toRequestError(e3));
431
+ res = await options.errorHandler(req ? e2 : toRequestError(e2));
419
432
  if (!res) {
420
433
  return;
421
434
  }
422
435
  } else if (!req) {
423
436
  res = handleRequestError();
424
437
  } else {
425
- res = handleFetchError(e3);
438
+ res = handleFetchError(e2);
426
439
  }
427
440
  } else {
428
- return handleResponseError(e3, outgoing);
441
+ return handleResponseError(e2, outgoing);
429
442
  }
430
443
  }
431
444
  try {
432
445
  return responseViaResponseObject(res, outgoing, options);
433
- } catch (e3) {
434
- return handleResponseError(e3, outgoing);
446
+ } catch (e2) {
447
+ return handleResponseError(e2, outgoing);
435
448
  }
436
449
  };
437
450
  };
@@ -449,7 +462,7 @@ var serve = (options, listeningListener) => {
449
462
  const server = createAdaptorServer(options);
450
463
  server.listen(options?.port, options.hostname, () => {
451
464
  const serverInfo = server.address();
452
- listeningListener(serverInfo);
465
+ listeningListener && listeningListener(serverInfo);
453
466
  });
454
467
  return server;
455
468
  };
@@ -641,7 +654,7 @@ var renderSwaggerUIOptions = (options) => {
641
654
  return optionsStrings;
642
655
  };
643
656
  var remoteAssets = ({ version }) => {
644
- const url = `https://cdn.jsdelivr.net/npm/swagger-ui-dist${version !== undefined ? `@${version}` : ""}`;
657
+ const url = `https://cdn.jsdelivr.net/npm/swagger-ui-dist${version !== void 0 ? `@${version}` : ""}`;
645
658
  return {
646
659
  css: [`${url}/swagger-ui.css`],
647
660
  js: [`${url}/swagger-ui-bundle.js`]
@@ -689,101 +702,100 @@ var middleware = (options) => async (c2) => {
689
702
  );
690
703
  };
691
704
 
692
- // ../../node_modules/.pnpm/hono-openapi@0.4.3_hono@4.6.19_openapi-types@12.1.3_zod@3.24.1/node_modules/hono-openapi/utils.js
705
+ // ../../node_modules/.pnpm/hono-openapi@0.4.4_hono@4.7_c963f431f476ec58780e56f6b21cedc5/node_modules/hono-openapi/utils.js
693
706
  var e = Symbol("openapi");
694
-
695
- // ../../node_modules/.pnpm/hono-openapi@0.4.3_hono@4.6.19_openapi-types@12.1.3_zod@3.24.1/node_modules/hono-openapi/index.js
696
- function n(n2) {
697
- const { validateResponse: s2, ...o2 } = n2;
698
- return Object.assign(async (t, o3) => {
699
- if (await o3(), s2 && n2.responses) {
700
- const s3 = t.res.status, o4 = t.res.headers.get("content-type");
701
- if (s3 && o4) {
702
- const c2 = n2.responses[s3];
703
- if (c2 && "content" in c2 && c2.content) {
704
- const n3 = o4.split(";")[0], s4 = c2.content[n3];
705
- if (s4?.schema && "validator" in s4.schema) try {
706
- let e3;
707
- const o5 = t.res.clone();
708
- if ("application/json" === n3 ? e3 = await o5.json() : "text/plain" === n3 && (e3 = await o5.text()), !e3) throw new Error("No data to validate!");
709
- await s4.schema.validator(e3);
710
- } catch (t2) {
711
- throw new HTTPException(400, { message: "Response validation failed!", cause: t2 });
712
- }
713
- }
714
- }
715
- }
716
- }, { [e]: { resolver: (e3, t) => async function(e4, t2, n3 = {}) {
717
- let s3 = {};
718
- const o3 = { ...n3, ...t2, responses: { ...n3?.responses, ...t2.responses } };
719
- for (const t3 of Object.keys(o3.responses)) {
720
- const n4 = o3.responses[t3];
721
- if (n4 && "content" in n4) for (const t4 of Object.keys(n4.content ?? {})) {
722
- const o4 = n4.content?.[t4];
723
- if (o4 && (o4.schema && "builder" in o4.schema)) {
724
- const t5 = await o4.schema.builder(e4);
725
- o4.schema = t5.schema, t5.components && (s3 = { ...s3, ...t5.components });
726
- }
727
- }
728
- }
729
- return { docs: o3, components: s3 };
730
- }(e3, o2, t) } });
731
- }
732
- var s = ["GET", "PUT", "POST", "DELETE", "OPTIONS", "HEAD", "PATCH", "TRACE"];
733
- var o = (e3) => e3.charAt(0).toUpperCase() + e3.slice(1);
734
- var c = (e3, t) => {
735
- let n2 = e3;
736
- if ("/" === t) return `${n2}Index`;
737
- for (const e4 of t.split("/")) 123 === e4.charCodeAt(0) ? n2 += `By${o(e4.slice(1, -1))}` : n2 += o(e4);
738
- return n2;
707
+ var s2 = ["GET", "PUT", "POST", "DELETE", "OPTIONS", "HEAD", "PATCH", "TRACE"];
708
+ var n = (e2) => e2.charAt(0).toUpperCase() + e2.slice(1);
709
+ var o = (e2, t2) => {
710
+ let s3 = e2;
711
+ if ("/" === t2) return `${s3}Index`;
712
+ for (const e3 of t2.split("/")) 123 === e3.charCodeAt(0) ? s3 += `By${n(e3.slice(1, -1))}` : s3 += n(e3);
713
+ return s3;
739
714
  };
740
- function a({ path: e3, method: t, data: n2, schema: s2 }) {
741
- e3 = ((e4) => e4.split("/").map((e5) => {
742
- let t2 = e5;
743
- return t2.startsWith(":") && (t2 = t2.slice(1, t2.length), t2.endsWith("?") && (t2 = t2.slice(0, -1)), t2 = `{${t2}}`), t2;
744
- }).join("/"))(e3);
745
- const o2 = t.toLowerCase();
746
- s2[e3] = { ...s2[e3] ? s2[e3] : {}, [o2]: { responses: {}, ...s2[e3]?.[o2] ?? {}, operationId: c(o2, e3), ...n2 } };
715
+ function a({ path: e2, method: t2, data: s3, schema: n2 }) {
716
+ e2 = ((e3) => e3.split("/").map((e4) => {
717
+ let t3 = e4;
718
+ return t3.startsWith(":") && (t3 = t3.slice(1, t3.length), t3.endsWith("?") && (t3 = t3.slice(0, -1)), t3 = `{${t3}}`), t3;
719
+ }).join("/"))(e2);
720
+ const a2 = t2.toLowerCase();
721
+ n2[e2] = { ...n2[e2] ? n2[e2] : {}, [a2]: { responses: {}, ...n2[e2]?.[a2] ?? {}, operationId: o(a2, e2), ...s3 } };
747
722
  }
748
- function i(e3, { excludeStaticFile: t = true, exclude: n2 = [] }) {
749
- const s2 = {}, o2 = Array.isArray(n2) ? n2 : [n2];
750
- for (const [n3, c2] of Object.entries(e3)) if (!(o2.some((e4) => "string" == typeof e4 ? n3 === e4 : e4.test(n3)) || n3.includes("*") || t && n3.includes("."))) {
751
- for (const e4 of Object.keys(c2)) {
752
- const t2 = c2[e4];
753
- if (n3.includes("{")) {
754
- t2.parameters || (t2.parameters = []);
755
- const e5 = n3.split("/").filter((e6) => e6.startsWith("{") && !t2.parameters.find((t3) => "path" === t3.in && t3.name === e6.slice(1, e6.length - 1)));
756
- for (const n4 of e5) {
757
- const e6 = n4.slice(1, n4.length - 1), s3 = t2.parameters.findIndex((t3) => "param" === t3.in && t3.name === e6);
758
- -1 !== s3 ? t2.parameters[s3].in = "path" : t2.parameters.push({ schema: { type: "string" }, in: "path", name: e6, required: true });
723
+ function c(e2, { excludeStaticFile: t2 = true, exclude: s3 = [] }) {
724
+ const n2 = {}, o2 = Array.isArray(s3) ? s3 : [s3];
725
+ for (const [s4, a2] of Object.entries(e2)) if (!(o2.some((e3) => "string" == typeof e3 ? s4 === e3 : e3.test(s4)) || s4.includes("*") || t2 && s4.includes("."))) {
726
+ for (const e3 of Object.keys(a2)) {
727
+ const t3 = a2[e3];
728
+ if (s4.includes("{")) {
729
+ t3.parameters || (t3.parameters = []);
730
+ const e4 = s4.split("/").filter((e5) => e5.startsWith("{") && !t3.parameters.find((t4) => "path" === t4.in && t4.name === e5.slice(1, e5.length - 1)));
731
+ for (const s5 of e4) {
732
+ const e5 = s5.slice(1, s5.length - 1), n3 = t3.parameters.findIndex((t4) => "param" === t4.in && t4.name === e5);
733
+ -1 !== n3 ? t3.parameters[n3].in = "path" : t3.parameters.push({ schema: { type: "string" }, in: "path", name: e5, required: true });
759
734
  }
760
735
  }
761
- t2.responses || (t2.responses = { 200: {} });
736
+ t3.responses || (t3.responses = { 200: {} });
762
737
  }
763
- s2[n3] = c2;
738
+ n2[s4] = a2;
764
739
  }
765
- return s2;
740
+ return n2;
766
741
  }
767
- function r(e3, t) {
768
- const n2 = { version: "3.1.0", components: {} };
769
- let s2 = null;
770
- return async (o2) => (s2 || (s2 = await p(e3, t, n2, o2)), o2.json(s2));
742
+ function i(e2, t2) {
743
+ const s3 = { version: "3.1.0", components: {} };
744
+ let n2 = null;
745
+ return async (o2) => (n2 || (n2 = await r(e2, t2, s3, o2)), o2.json(n2));
771
746
  }
772
- async function p(e3, { documentation: n2 = {}, excludeStaticFile: o2 = true, exclude: c2 = [], excludeMethods: r2 = ["OPTIONS"], excludeTags: p2 = [], defaultOptions: l } = { documentation: {}, excludeStaticFile: true, exclude: [], excludeMethods: ["OPTIONS"], excludeTags: [] }, { version: d = "3.1.0", components: m = {} } = { version: "3.1.0", components: {} }, h) {
773
- const f = { version: d, components: m }, u = {};
774
- for (const n3 of e3.routes) {
747
+ async function r(t2, { documentation: n2 = {}, excludeStaticFile: o2 = true, exclude: i2 = [], excludeMethods: r2 = ["OPTIONS"], excludeTags: p2 = [], defaultOptions: l } = { documentation: {}, excludeStaticFile: true, exclude: [], excludeMethods: ["OPTIONS"], excludeTags: [] }, { version: m = "3.1.0", components: d = {} } = { version: "3.1.0", components: {} }, h) {
748
+ const u = { version: m, components: d }, f = {};
749
+ for (const n3 of t2.routes) {
775
750
  if (!(e in n3.handler)) continue;
776
751
  if (r2.includes(n3.method)) continue;
777
- if (false === s.includes(n3.method) && "ALL" !== n3.method) continue;
778
- const { resolver: e4, metadata: o3 = {} } = n3.handler[e], c3 = l?.[n3.method], { docs: i2, components: p3 } = await e4({ ...f, ...o3 }, c3);
779
- if (f.components = { ...f.components, ...p3 ?? {} }, "ALL" === n3.method) for (const e5 of s) a({ path: n3.path, data: i2, method: e5, schema: u });
780
- else a({ method: n3.method, path: n3.path, data: i2, schema: u });
752
+ if (false === s2.includes(n3.method) && "ALL" !== n3.method) continue;
753
+ const { resolver: t3, metadata: o3 = {} } = n3.handler[e], c2 = l?.[n3.method], { docs: i3, components: p3 } = await t3({ ...u, ...o3 }, c2);
754
+ if (u.components = { ...u.components, ...p3 ?? {} }, "ALL" === n3.method) for (const e2 of s2) a({ path: n3.path, data: i3, method: e2, schema: f });
755
+ else a({ method: n3.method, path: n3.path, data: i3, schema: f });
781
756
  }
782
- for (const e4 in u) for (const t in u[e4]) {
783
- const n3 = u[e4][t]?.hide;
784
- n3 && ("boolean" == typeof n3 ? n3 : h && n3(h)) && delete u[e4][t];
757
+ for (const e2 in f) for (const t3 in f[e2]) {
758
+ const s3 = f[e2][t3]?.hide;
759
+ s3 && ("boolean" == typeof s3 ? s3 : h && s3(h)) && delete f[e2][t3];
785
760
  }
786
- return { openapi: f.version, ...{ ...n2, tags: n2.tags?.filter((e4) => !p2?.includes(e4?.name)), info: { title: "Hono Documentation", description: "Development documentation", version: "0.0.0", ...n2.info }, paths: { ...i(u, { excludeStaticFile: o2, exclude: c2 }), ...n2.paths }, components: { ...n2.components, schemas: { ...f.components, ...n2.components?.schemas } } } };
761
+ return { openapi: u.version, ...{ ...n2, tags: n2.tags?.filter((e2) => !p2?.includes(e2?.name)), info: { title: "Hono Documentation", description: "Development documentation", version: "0.0.0", ...n2.info }, paths: { ...c(f, { excludeStaticFile: o2, exclude: i2 }), ...n2.paths }, components: { ...n2.components, schemas: { ...u.components, ...n2.components?.schemas } } } };
762
+ }
763
+ function p(s3) {
764
+ const { validateResponse: n2, ...o2 } = s3;
765
+ return Object.assign(async (e2, o3) => {
766
+ if (await o3(), n2 && s3.responses) {
767
+ const o4 = e2.res.status, a2 = e2.res.headers.get("content-type");
768
+ if (o4 && a2) {
769
+ const c2 = s3.responses[o4];
770
+ if (c2 && "content" in c2 && c2.content) {
771
+ const s4 = a2.split(";")[0], o5 = c2.content[s4];
772
+ if (o5?.schema && "validator" in o5.schema) try {
773
+ let t2;
774
+ const n3 = e2.res.clone();
775
+ if ("application/json" === s4 ? t2 = await n3.json() : "text/plain" === s4 && (t2 = await n3.text()), !t2) throw new Error("No data to validate!");
776
+ await o5.schema.validator(t2);
777
+ } catch (e3) {
778
+ let s5 = { status: 500, message: "Response validation failed!" };
779
+ throw "object" == typeof n2 && (s5 = { ...s5, ...n2 }), new HTTPException(s5.status, { message: s5.message, cause: e3 });
780
+ }
781
+ }
782
+ }
783
+ }
784
+ }, { [e]: { resolver: (e2, t2) => async function(e3, t3, s4 = {}) {
785
+ let n3 = {};
786
+ const o3 = { ...s4, ...t3, responses: { ...s4?.responses, ...t3.responses } };
787
+ for (const t4 of Object.keys(o3.responses)) {
788
+ const s5 = o3.responses[t4];
789
+ if (s5 && "content" in s5) for (const t5 of Object.keys(s5.content ?? {})) {
790
+ const o4 = s5.content?.[t5];
791
+ if (o4 && (o4.schema && "builder" in o4.schema)) {
792
+ const t6 = await o4.schema.builder(e3);
793
+ o4.schema = t6.schema, t6.components && (n3 = { ...n3, ...t6.components });
794
+ }
795
+ }
796
+ }
797
+ return { docs: o3, components: n3 };
798
+ }(e2, o2, t2) } });
787
799
  }
788
800
 
789
801
  // ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/double-indexed-kv.js
@@ -880,7 +892,7 @@ function find(record, predicate) {
880
892
  return value;
881
893
  }
882
894
  }
883
- return undefined;
895
+ return void 0;
884
896
  }
885
897
  function forEach(record, run) {
886
898
  Object.entries(record).forEach(([key, value]) => run(value, key));
@@ -895,7 +907,7 @@ function findArr(record, predicate) {
895
907
  return value;
896
908
  }
897
909
  }
898
- return undefined;
910
+ return void 0;
899
911
  }
900
912
 
901
913
  // ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/custom-transformer-registry.js
@@ -982,7 +994,7 @@ function simpleTransformation(isApplicable, annotation, transform, untransform)
982
994
  };
983
995
  }
984
996
  var simpleRules = [
985
- simpleTransformation(isUndefined, "undefined", () => null, () => undefined),
997
+ simpleTransformation(isUndefined, "undefined", () => null, () => void 0),
986
998
  simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
987
999
  if (typeof BigInt !== "undefined") {
988
1000
  return BigInt(v);
@@ -1001,13 +1013,13 @@ var simpleRules = [
1001
1013
  });
1002
1014
  return baseError;
1003
1015
  }, (v, superJson) => {
1004
- const e3 = new Error(v.message);
1005
- e3.name = v.name;
1006
- e3.stack = v.stack;
1016
+ const e2 = new Error(v.message);
1017
+ e2.name = v.name;
1018
+ e2.stack = v.stack;
1007
1019
  superJson.allowedErrorProps.forEach((prop) => {
1008
- e3[prop] = v[prop];
1020
+ e2[prop] = v[prop];
1009
1021
  });
1010
- return e3;
1022
+ return e2;
1011
1023
  }),
1012
1024
  simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
1013
1025
  const body = regex.slice(1, regex.lastIndexOf("/"));
@@ -1046,14 +1058,14 @@ function compositeTransformation(isApplicable, annotation, transform, untransfor
1046
1058
  untransform
1047
1059
  };
1048
1060
  }
1049
- var symbolRule = compositeTransformation((s2, superJson) => {
1050
- if (isSymbol(s2)) {
1051
- const isRegistered = !!superJson.symbolRegistry.getIdentifier(s2);
1061
+ var symbolRule = compositeTransformation((s3, superJson) => {
1062
+ if (isSymbol(s3)) {
1063
+ const isRegistered = !!superJson.symbolRegistry.getIdentifier(s3);
1052
1064
  return isRegistered;
1053
1065
  }
1054
1066
  return false;
1055
- }, (s2, superJson) => {
1056
- const identifier = superJson.symbolRegistry.getIdentifier(s2);
1067
+ }, (s3, superJson) => {
1068
+ const identifier = superJson.symbolRegistry.getIdentifier(s3);
1057
1069
  return ["symbol", identifier];
1058
1070
  }, (v) => v.description, (_, a2, superJson) => {
1059
1071
  const value = superJson.symbolRegistry.getValue(a2[1]);
@@ -1141,7 +1153,7 @@ var transformValue = (value, superJson) => {
1141
1153
  type: applicableSimpleRule.annotation
1142
1154
  };
1143
1155
  }
1144
- return undefined;
1156
+ return void 0;
1145
1157
  };
1146
1158
  var simpleRulesByAnnotation = {};
1147
1159
  simpleRules.forEach((rule) => {
@@ -1340,7 +1352,7 @@ function addIdentity(object, path, identities) {
1340
1352
  }
1341
1353
  function generateReferentialEqualityAnnotations(identitites, dedupe) {
1342
1354
  const result = {};
1343
- let rootEqualityPaths = undefined;
1355
+ let rootEqualityPaths = void 0;
1344
1356
  identitites.forEach((paths) => {
1345
1357
  if (paths.length <= 1) {
1346
1358
  return;
@@ -1362,7 +1374,7 @@ function generateReferentialEqualityAnnotations(identitites, dedupe) {
1362
1374
  return [rootEqualityPaths, result];
1363
1375
  }
1364
1376
  } else {
1365
- return isEmptyObject(result) ? undefined : result;
1377
+ return isEmptyObject(result) ? void 0 : result;
1366
1378
  }
1367
1379
  }
1368
1380
  var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
@@ -1414,7 +1426,7 @@ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPat
1414
1426
  });
1415
1427
  const result = isEmptyObject(innerAnnotations) ? {
1416
1428
  transformedValue,
1417
- annotations: !!transformationResult ? [transformationResult.type] : undefined
1429
+ annotations: !!transformationResult ? [transformationResult.type] : void 0
1418
1430
  } : {
1419
1431
  transformedValue,
1420
1432
  annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
@@ -1480,7 +1492,7 @@ var SuperJSON = class {
1480
1492
  */
1481
1493
  constructor({ dedupe = false } = {}) {
1482
1494
  this.classRegistry = new ClassRegistry();
1483
- this.symbolRegistry = new Registry((s2) => s2.description ?? "");
1495
+ this.symbolRegistry = new Registry((s3) => s3.description ?? "");
1484
1496
  this.customTransformerRegistry = new CustomTransformerRegistry();
1485
1497
  this.allowedErrorProps = [];
1486
1498
  this.dedupe = dedupe;
@@ -1550,10 +1562,10 @@ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJS
1550
1562
  SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
1551
1563
  var stringify = SuperJSON.stringify;
1552
1564
 
1553
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/Options.js
1565
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/Options.js
1554
1566
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
1555
1567
  var defaultOptions = {
1556
- name: undefined,
1568
+ name: void 0,
1557
1569
  $refStrategy: "root",
1558
1570
  basePath: ["#"],
1559
1571
  effectStrategy: "input",
@@ -1581,27 +1593,27 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
1581
1593
  ...options
1582
1594
  };
1583
1595
 
1584
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/Refs.js
1596
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/Refs.js
1585
1597
  var getRefs = (options) => {
1586
1598
  const _options = getDefaultOptions(options);
1587
- const currentPath = _options.name !== undefined ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
1599
+ const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
1588
1600
  return {
1589
1601
  ..._options,
1590
1602
  currentPath,
1591
- propertyPath: undefined,
1603
+ propertyPath: void 0,
1592
1604
  seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
1593
1605
  def._def,
1594
1606
  {
1595
1607
  def: def._def,
1596
1608
  path: [..._options.basePath, _options.definitionPath, name],
1597
1609
  // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
1598
- jsonSchema: undefined
1610
+ jsonSchema: void 0
1599
1611
  }
1600
1612
  ]))
1601
1613
  };
1602
1614
  };
1603
1615
 
1604
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
1616
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
1605
1617
  function addErrorMessage(res, key, errorMessage, refs) {
1606
1618
  if (!refs?.errorMessages)
1607
1619
  return;
@@ -1617,7 +1629,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
1617
1629
  addErrorMessage(res, key, errorMessage, refs);
1618
1630
  }
1619
1631
 
1620
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
1632
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
1621
1633
  function parseAnyDef() {
1622
1634
  return {};
1623
1635
  }
@@ -1644,7 +1656,7 @@ function parseArrayDef(def, refs) {
1644
1656
  return res;
1645
1657
  }
1646
1658
 
1647
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
1659
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
1648
1660
  function parseBigintDef(def, refs) {
1649
1661
  const res = {
1650
1662
  type: "integer",
@@ -1690,24 +1702,24 @@ function parseBigintDef(def, refs) {
1690
1702
  return res;
1691
1703
  }
1692
1704
 
1693
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
1705
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
1694
1706
  function parseBooleanDef() {
1695
1707
  return {
1696
1708
  type: "boolean"
1697
1709
  };
1698
1710
  }
1699
1711
 
1700
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
1712
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
1701
1713
  function parseBrandedDef(_def, refs) {
1702
1714
  return parseDef(_def.type._def, refs);
1703
1715
  }
1704
1716
 
1705
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
1717
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
1706
1718
  var parseCatchDef = (def, refs) => {
1707
1719
  return parseDef(def.innerType._def, refs);
1708
1720
  };
1709
1721
 
1710
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
1722
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
1711
1723
  function parseDateDef(def, refs, overrideDateStrategy) {
1712
1724
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
1713
1725
  if (Array.isArray(strategy)) {
@@ -1766,7 +1778,7 @@ var integerDateParser = (def, refs) => {
1766
1778
  return res;
1767
1779
  };
1768
1780
 
1769
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
1781
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
1770
1782
  function parseDefaultDef(_def, refs) {
1771
1783
  return {
1772
1784
  ...parseDef(_def.innerType._def, refs),
@@ -1774,12 +1786,12 @@ function parseDefaultDef(_def, refs) {
1774
1786
  };
1775
1787
  }
1776
1788
 
1777
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
1789
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
1778
1790
  function parseEffectsDef(_def, refs) {
1779
1791
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : {};
1780
1792
  }
1781
1793
 
1782
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
1794
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
1783
1795
  function parseEnumDef(def) {
1784
1796
  return {
1785
1797
  type: "string",
@@ -1787,7 +1799,7 @@ function parseEnumDef(def) {
1787
1799
  };
1788
1800
  }
1789
1801
 
1790
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
1802
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
1791
1803
  var isJsonSchema7AllOfType = (type) => {
1792
1804
  if ("type" in type && type.type === "string")
1793
1805
  return false;
@@ -1804,13 +1816,13 @@ function parseIntersectionDef(def, refs) {
1804
1816
  currentPath: [...refs.currentPath, "allOf", "1"]
1805
1817
  })
1806
1818
  ].filter((x) => !!x);
1807
- let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : undefined;
1819
+ let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
1808
1820
  const mergedAllOf = [];
1809
1821
  allOf.forEach((schema) => {
1810
1822
  if (isJsonSchema7AllOfType(schema)) {
1811
1823
  mergedAllOf.push(...schema.allOf);
1812
- if (schema.unevaluatedProperties === undefined) {
1813
- unevaluatedProperties = undefined;
1824
+ if (schema.unevaluatedProperties === void 0) {
1825
+ unevaluatedProperties = void 0;
1814
1826
  }
1815
1827
  } else {
1816
1828
  let nestedSchema = schema;
@@ -1818,7 +1830,7 @@ function parseIntersectionDef(def, refs) {
1818
1830
  const { additionalProperties, ...rest } = schema;
1819
1831
  nestedSchema = rest;
1820
1832
  } else {
1821
- unevaluatedProperties = undefined;
1833
+ unevaluatedProperties = void 0;
1822
1834
  }
1823
1835
  mergedAllOf.push(nestedSchema);
1824
1836
  }
@@ -1826,10 +1838,10 @@ function parseIntersectionDef(def, refs) {
1826
1838
  return mergedAllOf.length ? {
1827
1839
  allOf: mergedAllOf,
1828
1840
  ...unevaluatedProperties
1829
- } : undefined;
1841
+ } : void 0;
1830
1842
  }
1831
1843
 
1832
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
1844
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
1833
1845
  function parseLiteralDef(def, refs) {
1834
1846
  const parsedType = typeof def.value;
1835
1847
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
@@ -1849,8 +1861,8 @@ function parseLiteralDef(def, refs) {
1849
1861
  };
1850
1862
  }
1851
1863
 
1852
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
1853
- var emojiRegex = undefined;
1864
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
1865
+ var emojiRegex = void 0;
1854
1866
  var zodPatterns = {
1855
1867
  /**
1856
1868
  * `c` was changed to `[cC]` to replicate /i flag
@@ -1874,7 +1886,7 @@ var zodPatterns = {
1874
1886
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
1875
1887
  */
1876
1888
  emoji: () => {
1877
- if (emojiRegex === undefined) {
1889
+ if (emojiRegex === void 0) {
1878
1890
  emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u");
1879
1891
  }
1880
1892
  return emojiRegex;
@@ -2167,7 +2179,7 @@ function stringifyRegExpWithFlags(regex, refs) {
2167
2179
  return pattern;
2168
2180
  }
2169
2181
 
2170
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
2182
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
2171
2183
  function parseRecordDef(def, refs) {
2172
2184
  if (refs.target === "openAi") {
2173
2185
  console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
@@ -2219,7 +2231,7 @@ function parseRecordDef(def, refs) {
2219
2231
  return schema;
2220
2232
  }
2221
2233
 
2222
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
2234
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
2223
2235
  function parseMapDef(def, refs) {
2224
2236
  if (refs.mapStrategy === "record") {
2225
2237
  return parseRecordDef(def, refs);
@@ -2244,7 +2256,7 @@ function parseMapDef(def, refs) {
2244
2256
  };
2245
2257
  }
2246
2258
 
2247
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
2259
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
2248
2260
  function parseNativeEnumDef(def) {
2249
2261
  const object = def.values;
2250
2262
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -2258,14 +2270,14 @@ function parseNativeEnumDef(def) {
2258
2270
  };
2259
2271
  }
2260
2272
 
2261
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
2273
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
2262
2274
  function parseNeverDef() {
2263
2275
  return {
2264
2276
  not: {}
2265
2277
  };
2266
2278
  }
2267
2279
 
2268
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
2280
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
2269
2281
  function parseNullDef(refs) {
2270
2282
  return refs.target === "openApi3" ? {
2271
2283
  enum: ["null"],
@@ -2275,7 +2287,7 @@ function parseNullDef(refs) {
2275
2287
  };
2276
2288
  }
2277
2289
 
2278
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
2290
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
2279
2291
  var primitiveMappings = {
2280
2292
  ZodString: "string",
2281
2293
  ZodNumber: "number",
@@ -2340,10 +2352,10 @@ var asAnyOf = (def, refs) => {
2340
2352
  ...refs,
2341
2353
  currentPath: [...refs.currentPath, "anyOf", `${i2}`]
2342
2354
  })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
2343
- return anyOf.length ? { anyOf } : undefined;
2355
+ return anyOf.length ? { anyOf } : void 0;
2344
2356
  };
2345
2357
 
2346
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
2358
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
2347
2359
  function parseNullableDef(def, refs) {
2348
2360
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
2349
2361
  if (refs.target === "openApi3") {
@@ -2375,7 +2387,7 @@ function parseNullableDef(def, refs) {
2375
2387
  return base && { anyOf: [base, { type: "null" }] };
2376
2388
  }
2377
2389
 
2378
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
2390
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
2379
2391
  function parseNumberDef(def, refs) {
2380
2392
  const res = {
2381
2393
  type: "number"
@@ -2441,7 +2453,7 @@ function parseObjectDef(def, refs) {
2441
2453
  const result = {
2442
2454
  type: "object",
2443
2455
  ...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
2444
- if (propDef === undefined || propDef._def === undefined)
2456
+ if (propDef === void 0 || propDef._def === void 0)
2445
2457
  return acc;
2446
2458
  let propOptional = propDef.isOptional();
2447
2459
  if (propOptional && forceOptionalIntoNullable) {
@@ -2458,7 +2470,7 @@ function parseObjectDef(def, refs) {
2458
2470
  currentPath: [...refs.currentPath, "properties", propName],
2459
2471
  propertyPath: [...refs.currentPath, "properties", propName]
2460
2472
  });
2461
- if (parsedDef === undefined)
2473
+ if (parsedDef === void 0)
2462
2474
  return acc;
2463
2475
  return {
2464
2476
  properties: { ...acc.properties, [propName]: parsedDef },
@@ -2472,7 +2484,7 @@ function parseObjectDef(def, refs) {
2472
2484
  return result;
2473
2485
  }
2474
2486
 
2475
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
2487
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
2476
2488
  var parseOptionalDef = (def, refs) => {
2477
2489
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
2478
2490
  return parseDef(def.innerType._def, refs);
@@ -2491,7 +2503,7 @@ var parseOptionalDef = (def, refs) => {
2491
2503
  } : {};
2492
2504
  };
2493
2505
 
2494
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
2506
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
2495
2507
  var parsePipelineDef = (def, refs) => {
2496
2508
  if (refs.pipeStrategy === "input") {
2497
2509
  return parseDef(def.in._def, refs);
@@ -2507,16 +2519,16 @@ var parsePipelineDef = (def, refs) => {
2507
2519
  currentPath: [...refs.currentPath, "allOf", a2 ? "1" : "0"]
2508
2520
  });
2509
2521
  return {
2510
- allOf: [a2, b].filter((x) => x !== undefined)
2522
+ allOf: [a2, b].filter((x) => x !== void 0)
2511
2523
  };
2512
2524
  };
2513
2525
 
2514
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
2526
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
2515
2527
  function parsePromiseDef(def, refs) {
2516
2528
  return parseDef(def.type._def, refs);
2517
2529
  }
2518
2530
 
2519
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
2531
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
2520
2532
  function parseSetDef(def, refs) {
2521
2533
  const items = parseDef(def.valueType._def, {
2522
2534
  ...refs,
@@ -2536,7 +2548,7 @@ function parseSetDef(def, refs) {
2536
2548
  return schema;
2537
2549
  }
2538
2550
 
2539
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
2551
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
2540
2552
  function parseTupleDef(def, refs) {
2541
2553
  if (def.rest) {
2542
2554
  return {
@@ -2545,7 +2557,7 @@ function parseTupleDef(def, refs) {
2545
2557
  items: def.items.map((x, i2) => parseDef(x._def, {
2546
2558
  ...refs,
2547
2559
  currentPath: [...refs.currentPath, "items", `${i2}`]
2548
- })).reduce((acc, x) => x === undefined ? acc : [...acc, x], []),
2560
+ })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
2549
2561
  additionalItems: parseDef(def.rest._def, {
2550
2562
  ...refs,
2551
2563
  currentPath: [...refs.currentPath, "additionalItems"]
@@ -2559,29 +2571,29 @@ function parseTupleDef(def, refs) {
2559
2571
  items: def.items.map((x, i2) => parseDef(x._def, {
2560
2572
  ...refs,
2561
2573
  currentPath: [...refs.currentPath, "items", `${i2}`]
2562
- })).reduce((acc, x) => x === undefined ? acc : [...acc, x], [])
2574
+ })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
2563
2575
  };
2564
2576
  }
2565
2577
  }
2566
2578
 
2567
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
2579
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
2568
2580
  function parseUndefinedDef() {
2569
2581
  return {
2570
2582
  not: {}
2571
2583
  };
2572
2584
  }
2573
2585
 
2574
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
2586
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
2575
2587
  function parseUnknownDef() {
2576
2588
  return {};
2577
2589
  }
2578
2590
 
2579
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
2591
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
2580
2592
  var parseReadonlyDef = (def, refs) => {
2581
2593
  return parseDef(def.innerType._def, refs);
2582
2594
  };
2583
2595
 
2584
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/parseDef.js
2596
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/parseDef.js
2585
2597
  function parseDef(def, refs, forceResolution = false) {
2586
2598
  const seenItem = refs.seen.get(def);
2587
2599
  if (refs.override) {
@@ -2592,11 +2604,11 @@ function parseDef(def, refs, forceResolution = false) {
2592
2604
  }
2593
2605
  if (seenItem && !forceResolution) {
2594
2606
  const seenSchema = get$ref(seenItem, refs);
2595
- if (seenSchema !== undefined) {
2607
+ if (seenSchema !== void 0) {
2596
2608
  return seenSchema;
2597
2609
  }
2598
2610
  }
2599
- const newItem = { def, path: refs.currentPath, jsonSchema: undefined };
2611
+ const newItem = { def, path: refs.currentPath, jsonSchema: void 0 };
2600
2612
  refs.seen.set(def, newItem);
2601
2613
  const jsonSchema = selectParser(def, def.typeName, refs);
2602
2614
  if (jsonSchema) {
@@ -2617,7 +2629,7 @@ var get$ref = (item, refs) => {
2617
2629
  console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
2618
2630
  return {};
2619
2631
  }
2620
- return refs.$refStrategy === "seen" ? {} : undefined;
2632
+ return refs.$refStrategy === "seen" ? {} : void 0;
2621
2633
  }
2622
2634
  }
2623
2635
  };
@@ -2698,9 +2710,9 @@ var selectParser = (def, typeName, refs) => {
2698
2710
  case ZodFirstPartyTypeKind.ZodFunction:
2699
2711
  case ZodFirstPartyTypeKind.ZodVoid:
2700
2712
  case ZodFirstPartyTypeKind.ZodSymbol:
2701
- return undefined;
2713
+ return void 0;
2702
2714
  default:
2703
- return /* @__PURE__ */ ((_) => undefined)();
2715
+ return /* @__PURE__ */ ((_) => void 0)();
2704
2716
  }
2705
2717
  };
2706
2718
  var addMeta = (def, refs, jsonSchema) => {
@@ -2713,7 +2725,7 @@ var addMeta = (def, refs, jsonSchema) => {
2713
2725
  return jsonSchema;
2714
2726
  };
2715
2727
 
2716
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
2728
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
2717
2729
  var zodToJsonSchema = (schema, options) => {
2718
2730
  const refs = getRefs(options);
2719
2731
  const definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
@@ -2722,17 +2734,17 @@ var zodToJsonSchema = (schema, options) => {
2722
2734
  ...refs,
2723
2735
  currentPath: [...refs.basePath, refs.definitionPath, name2]
2724
2736
  }, true) ?? {}
2725
- }), {}) : undefined;
2726
- const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? undefined : options?.name;
2727
- const main = parseDef(schema._def, name === undefined ? refs : {
2737
+ }), {}) : void 0;
2738
+ const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name;
2739
+ const main = parseDef(schema._def, name === void 0 ? refs : {
2728
2740
  ...refs,
2729
2741
  currentPath: [...refs.basePath, refs.definitionPath, name]
2730
2742
  }, false) ?? {};
2731
- const title = typeof options === "object" && options.name !== undefined && options.nameStrategy === "title" ? options.name : undefined;
2732
- if (title !== undefined) {
2743
+ const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0;
2744
+ if (title !== void 0) {
2733
2745
  main.title = title;
2734
2746
  }
2735
- const combined = name === undefined ? definitions ? {
2747
+ const combined = name === void 0 ? definitions ? {
2736
2748
  ...main,
2737
2749
  [refs.definitionPath]: definitions
2738
2750
  } : main : {
@@ -2757,7 +2769,7 @@ var zodToJsonSchema = (schema, options) => {
2757
2769
  return combined;
2758
2770
  };
2759
2771
 
2760
- // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/index.js
2772
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.1_zod@3.24.2/node_modules/zod-to-json-schema/dist/esm/index.js
2761
2773
  var esm_default = zodToJsonSchema;
2762
2774
  function handleError(error, defaultMessage) {
2763
2775
  console.error(defaultMessage, error);
@@ -3535,6 +3547,39 @@ async function executeWorkflowHandler(c2) {
3535
3547
  return handleError(error, "Error executing workflow");
3536
3548
  }
3537
3549
  }
3550
+ async function watchWorkflowHandler(c2) {
3551
+ try {
3552
+ const mastra = c2.get("mastra");
3553
+ const workflowId = c2.req.param("workflowId");
3554
+ const workflow = mastra.getWorkflow(workflowId);
3555
+ const stream = new ReadableStream({
3556
+ async start(controller) {
3557
+ workflow.watch(({ activePaths, context }) => {
3558
+ controller.enqueue(JSON.stringify({ activePaths, context }) + "");
3559
+ });
3560
+ }
3561
+ });
3562
+ return c2.body(stream);
3563
+ } catch (error) {
3564
+ return handleError(error, "Error watching workflow");
3565
+ }
3566
+ }
3567
+ async function resumeWorkflowHandler(c2) {
3568
+ try {
3569
+ const mastra = c2.get("mastra");
3570
+ const workflowId = c2.req.param("workflowId");
3571
+ const workflow = mastra.getWorkflow(workflowId);
3572
+ const { stepId, runId, context } = await c2.req.json();
3573
+ const result = await workflow.resume({
3574
+ stepId,
3575
+ runId,
3576
+ context
3577
+ });
3578
+ return c2.json(result);
3579
+ } catch (error) {
3580
+ return handleError(error, "Error resuming workflow step");
3581
+ }
3582
+ }
3538
3583
 
3539
3584
  // src/server/welcome.ts
3540
3585
  var html2 = `
@@ -3686,7 +3731,7 @@ async function createHonoServer(mastra, options = {}) {
3686
3731
  };
3687
3732
  app.get(
3688
3733
  "/api",
3689
- n({
3734
+ p({
3690
3735
  description: "Get API status",
3691
3736
  tags: ["system"],
3692
3737
  responses: {
@@ -3699,7 +3744,7 @@ async function createHonoServer(mastra, options = {}) {
3699
3744
  );
3700
3745
  app.get(
3701
3746
  "/api/agents",
3702
- n({
3747
+ p({
3703
3748
  description: "Get all available agents",
3704
3749
  tags: ["agents"],
3705
3750
  responses: {
@@ -3712,7 +3757,7 @@ async function createHonoServer(mastra, options = {}) {
3712
3757
  );
3713
3758
  app.get(
3714
3759
  "/api/agents/:agentId",
3715
- n({
3760
+ p({
3716
3761
  description: "Get agent by ID",
3717
3762
  tags: ["agents"],
3718
3763
  parameters: [
@@ -3736,7 +3781,7 @@ async function createHonoServer(mastra, options = {}) {
3736
3781
  );
3737
3782
  app.get(
3738
3783
  "/api/agents/:agentId/evals/ci",
3739
- n({
3784
+ p({
3740
3785
  description: "Get CI evals by agent ID",
3741
3786
  tags: ["agents"],
3742
3787
  parameters: [
@@ -3757,7 +3802,7 @@ async function createHonoServer(mastra, options = {}) {
3757
3802
  );
3758
3803
  app.get(
3759
3804
  "/api/agents/:agentId/evals/live",
3760
- n({
3805
+ p({
3761
3806
  description: "Get live evals by agent ID",
3762
3807
  tags: ["agents"],
3763
3808
  parameters: [
@@ -3779,7 +3824,7 @@ async function createHonoServer(mastra, options = {}) {
3779
3824
  app.post(
3780
3825
  "/api/agents/:agentId/generate",
3781
3826
  bodyLimit(bodyLimitOptions),
3782
- n({
3827
+ p({
3783
3828
  description: "Generate a response from an agent",
3784
3829
  tags: ["agents"],
3785
3830
  parameters: [
@@ -3829,7 +3874,7 @@ async function createHonoServer(mastra, options = {}) {
3829
3874
  app.post(
3830
3875
  "/api/agents/:agentId/stream",
3831
3876
  bodyLimit(bodyLimitOptions),
3832
- n({
3877
+ p({
3833
3878
  description: "Stream a response from an agent",
3834
3879
  tags: ["agents"],
3835
3880
  parameters: [
@@ -3879,7 +3924,7 @@ async function createHonoServer(mastra, options = {}) {
3879
3924
  app.post(
3880
3925
  "/api/agents/:agentId/instructions",
3881
3926
  bodyLimit(bodyLimitOptions),
3882
- n({
3927
+ p({
3883
3928
  description: "Update an agent's instructions",
3884
3929
  tags: ["agents"],
3885
3930
  parameters: [
@@ -3924,7 +3969,7 @@ async function createHonoServer(mastra, options = {}) {
3924
3969
  app.post(
3925
3970
  "/api/agents/:agentId/instructions/enhance",
3926
3971
  bodyLimit(bodyLimitOptions),
3927
- n({
3972
+ p({
3928
3973
  description: "Generate an improved system prompt from instructions",
3929
3974
  tags: ["agents"],
3930
3975
  parameters: [
@@ -3994,7 +4039,7 @@ async function createHonoServer(mastra, options = {}) {
3994
4039
  app.post(
3995
4040
  "/api/agents/:agentId/tools/:toolId/execute",
3996
4041
  bodyLimit(bodyLimitOptions),
3997
- n({
4042
+ p({
3998
4043
  description: "Execute a tool through an agent",
3999
4044
  tags: ["agents"],
4000
4045
  parameters: [
@@ -4038,7 +4083,7 @@ async function createHonoServer(mastra, options = {}) {
4038
4083
  );
4039
4084
  app.get(
4040
4085
  "/api/memory/status",
4041
- n({
4086
+ p({
4042
4087
  description: "Get memory status",
4043
4088
  tags: ["memory"],
4044
4089
  parameters: [
@@ -4059,7 +4104,7 @@ async function createHonoServer(mastra, options = {}) {
4059
4104
  );
4060
4105
  app.get(
4061
4106
  "/api/memory/threads",
4062
- n({
4107
+ p({
4063
4108
  description: "Get all threads",
4064
4109
  tags: ["memory"],
4065
4110
  parameters: [
@@ -4086,7 +4131,7 @@ async function createHonoServer(mastra, options = {}) {
4086
4131
  );
4087
4132
  app.get(
4088
4133
  "/api/memory/threads/:threadId",
4089
- n({
4134
+ p({
4090
4135
  description: "Get thread by ID",
4091
4136
  tags: ["memory"],
4092
4137
  parameters: [
@@ -4116,7 +4161,7 @@ async function createHonoServer(mastra, options = {}) {
4116
4161
  );
4117
4162
  app.get(
4118
4163
  "/api/memory/threads/:threadId/messages",
4119
- n({
4164
+ p({
4120
4165
  description: "Get messages for a thread",
4121
4166
  tags: ["memory"],
4122
4167
  parameters: [
@@ -4144,7 +4189,7 @@ async function createHonoServer(mastra, options = {}) {
4144
4189
  app.post(
4145
4190
  "/api/memory/threads",
4146
4191
  bodyLimit(bodyLimitOptions),
4147
- n({
4192
+ p({
4148
4193
  description: "Create a new thread",
4149
4194
  tags: ["memory"],
4150
4195
  parameters: [
@@ -4181,7 +4226,7 @@ async function createHonoServer(mastra, options = {}) {
4181
4226
  );
4182
4227
  app.patch(
4183
4228
  "/api/memory/threads/:threadId",
4184
- n({
4229
+ p({
4185
4230
  description: "Update a thread",
4186
4231
  tags: ["memory"],
4187
4232
  parameters: [
@@ -4219,7 +4264,7 @@ async function createHonoServer(mastra, options = {}) {
4219
4264
  );
4220
4265
  app.delete(
4221
4266
  "/api/memory/threads/:threadId",
4222
- n({
4267
+ p({
4223
4268
  description: "Delete a thread",
4224
4269
  tags: ["memory"],
4225
4270
  parameters: [
@@ -4250,7 +4295,7 @@ async function createHonoServer(mastra, options = {}) {
4250
4295
  app.post(
4251
4296
  "/api/memory/save-messages",
4252
4297
  bodyLimit(bodyLimitOptions),
4253
- n({
4298
+ p({
4254
4299
  description: "Save messages",
4255
4300
  tags: ["memory"],
4256
4301
  parameters: [
@@ -4288,7 +4333,7 @@ async function createHonoServer(mastra, options = {}) {
4288
4333
  );
4289
4334
  app.get(
4290
4335
  "/api/telemetry",
4291
- n({
4336
+ p({
4292
4337
  description: "Get all traces",
4293
4338
  tags: ["telemetry"],
4294
4339
  responses: {
@@ -4301,7 +4346,7 @@ async function createHonoServer(mastra, options = {}) {
4301
4346
  );
4302
4347
  app.get(
4303
4348
  "/api/workflows",
4304
- n({
4349
+ p({
4305
4350
  description: "Get all workflows",
4306
4351
  tags: ["workflows"],
4307
4352
  responses: {
@@ -4314,7 +4359,7 @@ async function createHonoServer(mastra, options = {}) {
4314
4359
  );
4315
4360
  app.get(
4316
4361
  "/api/workflows/:workflowId",
4317
- n({
4362
+ p({
4318
4363
  description: "Get workflow by ID",
4319
4364
  tags: ["workflows"],
4320
4365
  parameters: [
@@ -4339,8 +4384,8 @@ async function createHonoServer(mastra, options = {}) {
4339
4384
  app.post(
4340
4385
  "/api/workflows/:workflowId/execute",
4341
4386
  bodyLimit(bodyLimitOptions),
4342
- n({
4343
- description: "Execute a workflow",
4387
+ p({
4388
+ description: "Execute/Start a workflow",
4344
4389
  tags: ["workflows"],
4345
4390
  parameters: [
4346
4391
  {
@@ -4374,9 +4419,61 @@ async function createHonoServer(mastra, options = {}) {
4374
4419
  }),
4375
4420
  executeWorkflowHandler
4376
4421
  );
4422
+ app.post(
4423
+ "/api/workflows/:workflowId/resume",
4424
+ p({
4425
+ description: "Resume a suspended workflow step",
4426
+ tags: ["workflows"],
4427
+ parameters: [
4428
+ {
4429
+ name: "workflowId",
4430
+ in: "path",
4431
+ required: true,
4432
+ schema: { type: "string" }
4433
+ }
4434
+ ],
4435
+ requestBody: {
4436
+ required: true,
4437
+ content: {
4438
+ "application/json": {
4439
+ schema: {
4440
+ type: "object",
4441
+ properties: {
4442
+ stepId: { type: "string" },
4443
+ runId: { type: "string" },
4444
+ context: { type: "object" }
4445
+ }
4446
+ }
4447
+ }
4448
+ }
4449
+ }
4450
+ }),
4451
+ resumeWorkflowHandler
4452
+ );
4453
+ app.get(
4454
+ "/api/workflows/:workflowId/watch",
4455
+ p({
4456
+ description: "Watch workflow transitions in real-time",
4457
+ parameters: [
4458
+ {
4459
+ name: "workflowId",
4460
+ in: "path",
4461
+ required: true,
4462
+ schema: { type: "string" }
4463
+ }
4464
+ ],
4465
+ tags: ["workflows"],
4466
+ responses: {
4467
+ 200: {
4468
+ description: "Workflow transitions in real-time"
4469
+ }
4470
+ }
4471
+ }),
4472
+ watchWorkflowHandler
4473
+ );
4377
4474
  app.get(
4378
4475
  "/api/logs",
4379
- n({
4476
+ p({
4380
4477
  description: "Get all logs",
4381
4478
  tags: ["logs"],
4382
4479
  parameters: [
@@ -4397,7 +4494,7 @@ async function createHonoServer(mastra, options = {}) {
4397
4494
  );
4398
4495
  app.get(
4399
4496
  "/api/logs/:runId",
4400
- n({
4497
+ p({
4401
4498
  description: "Get logs by run ID",
4402
4499
  tags: ["logs"],
4403
4500
  parameters: [
@@ -4424,7 +4521,7 @@ async function createHonoServer(mastra, options = {}) {
4424
4521
  );
4425
4522
  app.get(
4426
4523
  "/api/tools",
4427
- n({
4524
+ p({
4428
4525
  description: "Get all tools",
4429
4526
  tags: ["tools"],
4430
4527
  responses: {
@@ -4437,7 +4534,7 @@ async function createHonoServer(mastra, options = {}) {
4437
4534
  );
4438
4535
  app.get(
4439
4536
  "/api/tools/:toolId",
4440
- n({
4537
+ p({
4441
4538
  description: "Get tool by ID",
4442
4539
  tags: ["tools"],
4443
4540
  parameters: [
@@ -4462,7 +4559,7 @@ async function createHonoServer(mastra, options = {}) {
4462
4559
  app.post(
4463
4560
  "/api/tools/:toolId/execute",
4464
4561
  bodyLimit(bodyLimitOptions),
4465
- n({
4562
+ p({
4466
4563
  description: "Execute a tool",
4467
4564
  tags: ["tools"],
4468
4565
  parameters: [
@@ -4501,7 +4598,7 @@ async function createHonoServer(mastra, options = {}) {
4501
4598
  app.post(
4502
4599
  "/api/vector/:vectorName/upsert",
4503
4600
  bodyLimit(bodyLimitOptions),
4504
- n({
4601
+ p({
4505
4602
  description: "Upsert vectors into an index",
4506
4603
  tags: ["vector"],
4507
4604
  parameters: [
@@ -4552,7 +4649,7 @@ async function createHonoServer(mastra, options = {}) {
4552
4649
  app.post(
4553
4650
  "/api/vector/:vectorName/create-index",
4554
4651
  bodyLimit(bodyLimitOptions),
4555
- n({
4652
+ p({
4556
4653
  description: "Create a new vector index",
4557
4654
  tags: ["vector"],
4558
4655
  parameters: [
@@ -4593,7 +4690,7 @@ async function createHonoServer(mastra, options = {}) {
4593
4690
  app.post(
4594
4691
  "/api/vector/:vectorName/query",
4595
4692
  bodyLimit(bodyLimitOptions),
4596
- n({
4693
+ p({
4597
4694
  description: "Query vectors from an index",
4598
4695
  tags: ["vector"],
4599
4696
  parameters: [
@@ -4635,7 +4732,7 @@ async function createHonoServer(mastra, options = {}) {
4635
4732
  );
4636
4733
  app.get(
4637
4734
  "/api/vector/:vectorName/indexes",
4638
- n({
4735
+ p({
4639
4736
  description: "List all indexes for a vector store",
4640
4737
  tags: ["vector"],
4641
4738
  parameters: [
@@ -4656,7 +4753,7 @@ async function createHonoServer(mastra, options = {}) {
4656
4753
  );
4657
4754
  app.get(
4658
4755
  "/api/vector/:vectorName/indexes/:indexName",
4659
- n({
4756
+ p({
4660
4757
  description: "Get details about a specific index",
4661
4758
  tags: ["vector"],
4662
4759
  parameters: [
@@ -4683,7 +4780,7 @@ async function createHonoServer(mastra, options = {}) {
4683
4780
  );
4684
4781
  app.delete(
4685
4782
  "/api/vector/:vectorName/indexes/:indexName",
4686
- n({
4783
+ p({
4687
4784
  description: "Delete a specific index",
4688
4785
  tags: ["vector"],
4689
4786
  parameters: [
@@ -4710,7 +4807,7 @@ async function createHonoServer(mastra, options = {}) {
4710
4807
  );
4711
4808
  app.get(
4712
4809
  "/openapi.json",
4713
- r(app, {
4810
+ i(app, {
4714
4811
  documentation: {
4715
4812
  info: { title: "Mastra API", version: "1.0.0", description: "Mastra API" }
4716
4813
  }