@mastra/deployer 1.80.0 → 1.81.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/_types/@internal_core/dist/base/index.d.ts +28 -0
  2. package/dist/_types/@internal_core/dist/index-Diz1p9N7.d.ts +316 -0
  3. package/dist/_types/@internal_core/dist/logger/index.d.ts +2 -0
  4. package/dist/_types/@internal_core/package.json +1 -0
  5. package/dist/_types/@internal_deployer/dist/_types/@internal_core/dist/index-Diz1p9N7.d.ts +316 -0
  6. package/dist/_types/@internal_deployer/dist/_types/@internal_core/dist/logger/index.d.ts +2 -0
  7. package/dist/_types/@internal_deployer/dist/bundler.d.ts +79 -0
  8. package/dist/_types/@internal_deployer/dist/deployer.d.ts +11 -0
  9. package/dist/_types/@internal_deployer/dist/index.d.ts +4 -0
  10. package/dist/_types/@internal_deployer/package.json +1 -0
  11. package/dist/{analyze-CQH2CQM9.js → analyze-BZGcfVSL.js} +4 -4
  12. package/dist/analyze-BZGcfVSL.js.map +1 -0
  13. package/dist/{analyze-SxVgkEcB.cjs → analyze-CtWBhASF.cjs} +13 -13
  14. package/dist/analyze-CtWBhASF.cjs.map +1 -0
  15. package/dist/build/analyze/analyzeEntry.d.ts +1 -1
  16. package/dist/build/analyze/analyzeEntry.d.ts.map +1 -1
  17. package/dist/build/analyze.cjs +1 -1
  18. package/dist/build/analyze.d.ts +4 -4
  19. package/dist/build/analyze.d.ts.map +1 -1
  20. package/dist/build/analyze.js +1 -1
  21. package/dist/build/babel/remove-all-options-except.d.ts +1 -1
  22. package/dist/build/babel/remove-all-options-except.d.ts.map +1 -1
  23. package/dist/build/bundler.cjs +1 -1
  24. package/dist/build/bundler.js +1 -1
  25. package/dist/build/bundlerOptions.d.ts +3 -3
  26. package/dist/build/bundlerOptions.d.ts.map +1 -1
  27. package/dist/build/deployer.d.ts +3 -3
  28. package/dist/build/deployer.d.ts.map +1 -1
  29. package/dist/build/index.cjs +5 -5
  30. package/dist/build/index.js +5 -5
  31. package/dist/build/plugins/esm-shim.d.ts.map +1 -1
  32. package/dist/build/plugins/remove-all-except.d.ts +1 -1
  33. package/dist/build/plugins/remove-all-except.d.ts.map +1 -1
  34. package/dist/build/serverOptions.d.ts +1 -1
  35. package/dist/build/serverOptions.d.ts.map +1 -1
  36. package/dist/build/shared/extract-mastra-option.d.ts +1 -1
  37. package/dist/build/shared/extract-mastra-option.d.ts.map +1 -1
  38. package/dist/{build-BlmomwDs.js → build-CkZ0xUid.js} +7 -9
  39. package/dist/build-CkZ0xUid.js.map +1 -0
  40. package/dist/{build-CXMVTo1j.cjs → build-D0eiANsp.cjs} +8 -10
  41. package/dist/build-D0eiANsp.cjs.map +1 -0
  42. package/dist/bundler/index.cjs +6 -506
  43. package/dist/bundler/index.d.ts +14 -8
  44. package/dist/bundler/index.d.ts.map +1 -1
  45. package/dist/bundler/index.js +1 -498
  46. package/dist/bundler/workspaceDependencies.d.ts +1 -1
  47. package/dist/bundler/workspaceDependencies.d.ts.map +1 -1
  48. package/dist/bundler-BBi45M7f.cjs +549 -0
  49. package/dist/bundler-BBi45M7f.cjs.map +1 -0
  50. package/dist/bundler-CNgW1Vui.js +516 -0
  51. package/dist/bundler-CNgW1Vui.js.map +1 -0
  52. package/dist/{bundler-D3Ky7WCf.js → bundler-C_LpvgiH.js} +2 -2
  53. package/dist/bundler-C_LpvgiH.js.map +1 -0
  54. package/dist/{bundler-D_3GyN0N.cjs → bundler-Cb7pRVvA.cjs} +5 -5
  55. package/dist/bundler-Cb7pRVvA.cjs.map +1 -0
  56. package/dist/{bundlerOptions-Dgt4ZEo1.cjs → bundlerOptions-BBvSNHFj.cjs} +2 -2
  57. package/dist/bundlerOptions-BBvSNHFj.cjs.map +1 -0
  58. package/dist/{bundlerOptions-BtDsaIgs.js → bundlerOptions-BlUHmPBE.js} +2 -2
  59. package/dist/bundlerOptions-BlUHmPBE.js.map +1 -0
  60. package/dist/deploy/base.d.ts +1 -1
  61. package/dist/deploy/base.d.ts.map +1 -1
  62. package/dist/deploy/log.d.ts +1 -1
  63. package/dist/deploy/log.d.ts.map +1 -1
  64. package/dist/docs/SKILL.md +1 -1
  65. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  66. package/dist/docs/references/docs-deployment-mastra-server.md +3 -1
  67. package/dist/error-BVvc5jcw.js +172 -0
  68. package/dist/error-BVvc5jcw.js.map +1 -0
  69. package/dist/error-CR4whExy.cjs +195 -0
  70. package/dist/error-CR4whExy.cjs.map +1 -0
  71. package/dist/index.cjs +5 -5
  72. package/dist/index.cjs.map +1 -1
  73. package/dist/index.js +4 -4
  74. package/dist/index.js.map +1 -1
  75. package/dist/server/handlers/a2a.d.ts +31 -31
  76. package/dist/server/handlers/a2a.d.ts.map +1 -1
  77. package/dist/server/handlers/client.d.ts.map +1 -1
  78. package/dist/server/index.cjs +9 -8
  79. package/dist/server/index.cjs.map +1 -1
  80. package/dist/server/index.js +9 -8
  81. package/dist/server/index.js.map +1 -1
  82. package/dist/services/deps.d.ts +2 -2
  83. package/dist/services/deps.d.ts.map +1 -1
  84. package/dist/services/env.d.ts.map +1 -1
  85. package/dist/services/fs.d.ts.map +1 -1
  86. package/dist/services/index.cjs +1 -1
  87. package/dist/services/index.js +1 -1
  88. package/dist/{services-BJQJLQs9.js → services-CXZJN9er.js} +294 -5
  89. package/dist/services-CXZJN9er.js.map +1 -0
  90. package/dist/{services-Dqx1iouv.cjs → services-CtVt5CJq.cjs} +321 -20
  91. package/dist/services-CtVt5CJq.cjs.map +1 -0
  92. package/dist/validator/validate.d.ts.map +1 -1
  93. package/package.json +10 -8
  94. package/dist/analyze-CQH2CQM9.js.map +0 -1
  95. package/dist/analyze-SxVgkEcB.cjs.map +0 -1
  96. package/dist/build-BlmomwDs.js.map +0 -1
  97. package/dist/build-CXMVTo1j.cjs.map +0 -1
  98. package/dist/bundler/index.cjs.map +0 -1
  99. package/dist/bundler/index.js.map +0 -1
  100. package/dist/bundler-D3Ky7WCf.js.map +0 -1
  101. package/dist/bundler-D_3GyN0N.cjs.map +0 -1
  102. package/dist/bundlerOptions-BtDsaIgs.js.map +0 -1
  103. package/dist/bundlerOptions-Dgt4ZEo1.cjs.map +0 -1
  104. package/dist/services-BJQJLQs9.js.map +0 -1
  105. package/dist/services-Dqx1iouv.cjs.map +0 -1
@@ -3,7 +3,7 @@ name: mastra-deployer
3
3
  description: Documentation for @mastra/deployer. Use when working with @mastra/deployer APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/deployer"
6
- version: "1.80.0"
6
+ version: "1.81.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.80.0",
2
+ "version": "1.81.0-alpha.1",
3
3
  "package": "@mastra/deployer",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -33,12 +33,14 @@ After building, Mastra creates the following structure:
33
33
  ├── package.json # Production dependencies
34
34
  ├── node_modules/ # Installed dependencies
35
35
  ├── .npmrc # Copied from your project (if present)
36
- ├── public/ # Static assets (if src/mastra/public exists)
36
+ ├── <static assets> # Contents of src/mastra/public, merged into the output root
37
37
  └── playground/ # Studio UI (if --studio flag used)
38
38
  ```
39
39
 
40
40
  The `output` directory is self-contained. You can copy it to any server and run it directly.
41
41
 
42
+ > **Don't keep a database file in src/mastra/public:** Build copies the contents of `src/mastra/public` into `.mastra/output` and overwrites files with the same name. A SQLite database stored in `public` therefore ends up inside the build, and a URL such as `file:./mastra.db` resolves against the directory the server runs from. If that's the output directory, the server opens the copied database instead of the one you edit, and changes to it are lost on the next build. Keep database files outside `public`.
43
+
42
44
  ## Running the server
43
45
 
44
46
  Start the server using the Mastra CLI:
@@ -0,0 +1,172 @@
1
+ // ../_internal-core/dist/error/index.js
2
+ /**
3
+ * Safely converts an object to a string representation.
4
+ * Uses JSON.stringify first, but falls back to String() if:
5
+ * - JSON.stringify fails (e.g., circular references)
6
+ * - JSON.stringify returns "{}" (e.g., Error objects with no enumerable properties)
7
+ */
8
+ function safeParseErrorObject(obj) {
9
+ if (typeof obj !== "object" || obj === null) return String(obj);
10
+ try {
11
+ const stringified = JSON.stringify(obj);
12
+ if (stringified === "{}") return String(obj);
13
+ return stringified;
14
+ } catch {
15
+ return String(obj);
16
+ }
17
+ }
18
+ /**
19
+ * Safely converts an unknown error to an Error instance.
20
+ */
21
+ function getErrorFromUnknown(unknown, options = {}) {
22
+ const defaultOptions = {
23
+ fallbackMessage: "Unknown error",
24
+ maxDepth: 5,
25
+ supportSerialization: true,
26
+ serializeStack: true
27
+ };
28
+ const mergedOptions = options ? {
29
+ ...defaultOptions,
30
+ ...options
31
+ } : defaultOptions;
32
+ const { fallbackMessage, maxDepth, supportSerialization, serializeStack } = mergedOptions;
33
+ if (unknown && unknown instanceof Error) {
34
+ if (supportSerialization) addErrorToJSON(unknown, serializeStack, { maxDepth });
35
+ return unknown;
36
+ }
37
+ let error;
38
+ if (unknown && typeof unknown === "object") {
39
+ const errorMessage = unknown && "message" in unknown && typeof unknown.message === "string" ? unknown.message : safeParseErrorObject(unknown);
40
+ const errorCause = "cause" in unknown && unknown.cause !== void 0 ? unknown.cause instanceof Error ? unknown.cause : maxDepth > 0 ? getErrorFromUnknown(unknown.cause, {
41
+ ...mergedOptions,
42
+ maxDepth: maxDepth - 1
43
+ }) : void 0 : void 0;
44
+ error = new Error(errorMessage, errorCause ? { cause: errorCause } : void 0);
45
+ Object.assign(error, unknown);
46
+ error.stack = "stack" in unknown && typeof unknown.stack === "string" ? unknown.stack : void 0;
47
+ } else if (unknown && typeof unknown === "string") {
48
+ error = new Error(unknown);
49
+ error.stack = void 0;
50
+ } else error = new Error(fallbackMessage);
51
+ if (supportSerialization) addErrorToJSON(error, serializeStack, { maxDepth });
52
+ return error;
53
+ }
54
+ const DEFAULT_MAX_DEPTH = 5;
55
+ /**
56
+ * Adds a toJSON method to an Error instance for proper serialization.
57
+ * Ensures that message, name, cause, and custom properties are all serialized.
58
+ * Stack is only included in JSON output if serializeStack is true.
59
+ * Recursively adds toJSON to the cause chain for proper nested error serialization.
60
+ */
61
+ function addErrorToJSON(error, serializeStack = true, options) {
62
+ const maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;
63
+ const currentDepth = options?.currentDepth ?? 0;
64
+ if (error.toJSON) return;
65
+ if (error.cause instanceof Error && currentDepth < maxDepth) addErrorToJSON(error.cause, serializeStack, {
66
+ maxDepth,
67
+ currentDepth: currentDepth + 1
68
+ });
69
+ Object.defineProperty(error, "toJSON", {
70
+ value: function() {
71
+ const json = {
72
+ message: this.message,
73
+ name: this.name
74
+ };
75
+ if (serializeStack && this.stack !== void 0) json.stack = this.stack;
76
+ if (this.cause !== void 0) {
77
+ if (this.cause instanceof Error && "toJSON" in this.cause && typeof this.cause.toJSON === "function") json.cause = this.cause.toJSON();
78
+ else json.cause = this.cause;
79
+ }
80
+ const errorAsAny = this;
81
+ for (const key in errorAsAny) if (errorAsAny.hasOwnProperty(key) && !(key in json) && key !== "toJSON") json[key] = errorAsAny[key];
82
+ return json;
83
+ },
84
+ enumerable: false,
85
+ writable: true,
86
+ configurable: true
87
+ });
88
+ }
89
+ let ErrorDomain = /* @__PURE__ */ function(ErrorDomain) {
90
+ ErrorDomain["TOOL"] = "TOOL";
91
+ ErrorDomain["AGENT"] = "AGENT";
92
+ ErrorDomain["MCP"] = "MCP";
93
+ ErrorDomain["AGENT_NETWORK"] = "AGENT_NETWORK";
94
+ ErrorDomain["MASTRA_SERVER"] = "MASTRA_SERVER";
95
+ ErrorDomain["MASTRA_OBSERVABILITY"] = "MASTRA_OBSERVABILITY";
96
+ ErrorDomain["MASTRA_WORKFLOW"] = "MASTRA_WORKFLOW";
97
+ ErrorDomain["MASTRA_VOICE"] = "MASTRA_VOICE";
98
+ ErrorDomain["MASTRA_VECTOR"] = "MASTRA_VECTOR";
99
+ ErrorDomain["MASTRA_MEMORY"] = "MASTRA_MEMORY";
100
+ ErrorDomain["LLM"] = "LLM";
101
+ ErrorDomain["EVAL"] = "EVAL";
102
+ ErrorDomain["SCORER"] = "SCORER";
103
+ ErrorDomain["A2A"] = "A2A";
104
+ ErrorDomain["MASTRA_INSTANCE"] = "MASTRA_INSTANCE";
105
+ ErrorDomain["MASTRA"] = "MASTRA";
106
+ ErrorDomain["DEPLOYER"] = "DEPLOYER";
107
+ ErrorDomain["STORAGE"] = "STORAGE";
108
+ ErrorDomain["MODEL_ROUTER"] = "MODEL_ROUTER";
109
+ return ErrorDomain;
110
+ }({});
111
+ let ErrorCategory = /* @__PURE__ */ function(ErrorCategory) {
112
+ ErrorCategory["UNKNOWN"] = "UNKNOWN";
113
+ ErrorCategory["USER"] = "USER";
114
+ ErrorCategory["SYSTEM"] = "SYSTEM";
115
+ ErrorCategory["THIRD_PARTY"] = "THIRD_PARTY";
116
+ return ErrorCategory;
117
+ }({});
118
+ /**
119
+ * Base error class for the Mastra ecosystem.
120
+ * It standardizes error reporting and can be extended for more specific error types.
121
+ */
122
+ var MastraBaseError = class extends Error {
123
+ id;
124
+ domain;
125
+ category;
126
+ details = {};
127
+ message;
128
+ cause;
129
+ constructor(errorDefinition, originalError) {
130
+ const error = originalError ? getErrorFromUnknown(originalError, {
131
+ serializeStack: false,
132
+ fallbackMessage: "Unknown error"
133
+ }) : void 0;
134
+ const message = errorDefinition.text ?? error?.message ?? "Unknown error";
135
+ super(message, { cause: error });
136
+ this.id = errorDefinition.id;
137
+ this.domain = errorDefinition.domain;
138
+ this.category = errorDefinition.category;
139
+ this.details = errorDefinition.details ?? {};
140
+ this.message = message;
141
+ this.cause = error;
142
+ Object.setPrototypeOf(this, new.target.prototype);
143
+ }
144
+ /**
145
+ * Returns a structured representation of the error, useful for logging or API responses.
146
+ */
147
+ toJSONDetails() {
148
+ return {
149
+ message: this.message,
150
+ domain: this.domain,
151
+ category: this.category,
152
+ details: this.details
153
+ };
154
+ }
155
+ toJSON() {
156
+ return {
157
+ message: this.message,
158
+ domain: this.domain,
159
+ category: this.category,
160
+ code: this.id,
161
+ details: this.details,
162
+ cause: this.cause?.toJSON?.()
163
+ };
164
+ }
165
+ toString() {
166
+ return JSON.stringify(this.toJSON());
167
+ }
168
+ };
169
+ var MastraError = class extends MastraBaseError {};
170
+ export { MastraError as i, ErrorDomain as n, MastraBaseError as r, ErrorCategory as t };
171
+
172
+ //# sourceMappingURL=error-BVvc5jcw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-BVvc5jcw.js","names":[],"sources":["../../_internal-core/dist/error/index.js"],"sourcesContent":["// src/error/utils.ts\n/**\n* Safely converts an object to a string representation.\n* Uses JSON.stringify first, but falls back to String() if:\n* - JSON.stringify fails (e.g., circular references)\n* - JSON.stringify returns \"{}\" (e.g., Error objects with no enumerable properties)\n*/\nfunction safeParseErrorObject(obj) {\n\tif (typeof obj !== \"object\" || obj === null) return String(obj);\n\ttry {\n\t\tconst stringified = JSON.stringify(obj);\n\t\tif (stringified === \"{}\") return String(obj);\n\t\treturn stringified;\n\t} catch {\n\t\treturn String(obj);\n\t}\n}\n/**\n* Safely converts an unknown error to an Error instance.\n*/\nfunction getErrorFromUnknown(unknown, options = {}) {\n\tconst defaultOptions = {\n\t\tfallbackMessage: \"Unknown error\",\n\t\tmaxDepth: 5,\n\t\tsupportSerialization: true,\n\t\tserializeStack: true\n\t};\n\tconst mergedOptions = options ? {\n\t\t...defaultOptions,\n\t\t...options\n\t} : defaultOptions;\n\tconst { fallbackMessage, maxDepth, supportSerialization, serializeStack } = mergedOptions;\n\tif (unknown && unknown instanceof Error) {\n\t\tif (supportSerialization) addErrorToJSON(unknown, serializeStack, { maxDepth });\n\t\treturn unknown;\n\t}\n\tlet error;\n\tif (unknown && typeof unknown === \"object\") {\n\t\tconst errorMessage = unknown && \"message\" in unknown && typeof unknown.message === \"string\" ? unknown.message : safeParseErrorObject(unknown);\n\t\tconst errorCause = \"cause\" in unknown && unknown.cause !== void 0 ? unknown.cause instanceof Error ? unknown.cause : maxDepth > 0 ? getErrorFromUnknown(unknown.cause, {\n\t\t\t...mergedOptions,\n\t\t\tmaxDepth: maxDepth - 1\n\t\t}) : void 0 : void 0;\n\t\terror = new Error(errorMessage, errorCause ? { cause: errorCause } : void 0);\n\t\tObject.assign(error, unknown);\n\t\terror.stack = \"stack\" in unknown && typeof unknown.stack === \"string\" ? unknown.stack : void 0;\n\t} else if (unknown && typeof unknown === \"string\") {\n\t\terror = new Error(unknown);\n\t\terror.stack = void 0;\n\t} else error = new Error(fallbackMessage);\n\tif (supportSerialization) addErrorToJSON(error, serializeStack, { maxDepth });\n\treturn error;\n}\nconst DEFAULT_MAX_DEPTH = 5;\n/**\n* Adds a toJSON method to an Error instance for proper serialization.\n* Ensures that message, name, cause, and custom properties are all serialized.\n* Stack is only included in JSON output if serializeStack is true.\n* Recursively adds toJSON to the cause chain for proper nested error serialization.\n*/\nfunction addErrorToJSON(error, serializeStack = true, options) {\n\tconst maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;\n\tconst currentDepth = options?.currentDepth ?? 0;\n\tif (error.toJSON) return;\n\tif (error.cause instanceof Error && currentDepth < maxDepth) addErrorToJSON(error.cause, serializeStack, {\n\t\tmaxDepth,\n\t\tcurrentDepth: currentDepth + 1\n\t});\n\tObject.defineProperty(error, \"toJSON\", {\n\t\tvalue: function() {\n\t\t\tconst json = {\n\t\t\t\tmessage: this.message,\n\t\t\t\tname: this.name\n\t\t\t};\n\t\t\tif (serializeStack && this.stack !== void 0) json.stack = this.stack;\n\t\t\tif (this.cause !== void 0) {\n\t\t\t\tif (this.cause instanceof Error && \"toJSON\" in this.cause && typeof this.cause.toJSON === \"function\") json.cause = this.cause.toJSON();\n\t\t\t\telse json.cause = this.cause;\n\t\t\t}\n\t\t\tconst errorAsAny = this;\n\t\t\tfor (const key in errorAsAny) if (errorAsAny.hasOwnProperty(key) && !(key in json) && key !== \"toJSON\") json[key] = errorAsAny[key];\n\t\t\treturn json;\n\t\t},\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tconfigurable: true\n\t});\n}\n// src/error/index.ts\nlet ErrorDomain = /* @__PURE__ */ function(ErrorDomain) {\n\tErrorDomain[\"TOOL\"] = \"TOOL\";\n\tErrorDomain[\"AGENT\"] = \"AGENT\";\n\tErrorDomain[\"MCP\"] = \"MCP\";\n\tErrorDomain[\"AGENT_NETWORK\"] = \"AGENT_NETWORK\";\n\tErrorDomain[\"MASTRA_SERVER\"] = \"MASTRA_SERVER\";\n\tErrorDomain[\"MASTRA_OBSERVABILITY\"] = \"MASTRA_OBSERVABILITY\";\n\tErrorDomain[\"MASTRA_WORKFLOW\"] = \"MASTRA_WORKFLOW\";\n\tErrorDomain[\"MASTRA_VOICE\"] = \"MASTRA_VOICE\";\n\tErrorDomain[\"MASTRA_VECTOR\"] = \"MASTRA_VECTOR\";\n\tErrorDomain[\"MASTRA_MEMORY\"] = \"MASTRA_MEMORY\";\n\tErrorDomain[\"LLM\"] = \"LLM\";\n\tErrorDomain[\"EVAL\"] = \"EVAL\";\n\tErrorDomain[\"SCORER\"] = \"SCORER\";\n\tErrorDomain[\"A2A\"] = \"A2A\";\n\tErrorDomain[\"MASTRA_INSTANCE\"] = \"MASTRA_INSTANCE\";\n\tErrorDomain[\"MASTRA\"] = \"MASTRA\";\n\tErrorDomain[\"DEPLOYER\"] = \"DEPLOYER\";\n\tErrorDomain[\"STORAGE\"] = \"STORAGE\";\n\tErrorDomain[\"MODEL_ROUTER\"] = \"MODEL_ROUTER\";\n\treturn ErrorDomain;\n}({});\nlet ErrorCategory = /* @__PURE__ */ function(ErrorCategory) {\n\tErrorCategory[\"UNKNOWN\"] = \"UNKNOWN\";\n\tErrorCategory[\"USER\"] = \"USER\";\n\tErrorCategory[\"SYSTEM\"] = \"SYSTEM\";\n\tErrorCategory[\"THIRD_PARTY\"] = \"THIRD_PARTY\";\n\treturn ErrorCategory;\n}({});\n/**\n* Base error class for the Mastra ecosystem.\n* It standardizes error reporting and can be extended for more specific error types.\n*/\nvar MastraBaseError = class extends Error {\n\tid;\n\tdomain;\n\tcategory;\n\tdetails = {};\n\tmessage;\n\tcause;\n\tconstructor(errorDefinition, originalError) {\n\t\tconst error = originalError ? getErrorFromUnknown(originalError, {\n\t\t\tserializeStack: false,\n\t\t\tfallbackMessage: \"Unknown error\"\n\t\t}) : void 0;\n\t\tconst message = errorDefinition.text ?? error?.message ?? \"Unknown error\";\n\t\tsuper(message, { cause: error });\n\t\tthis.id = errorDefinition.id;\n\t\tthis.domain = errorDefinition.domain;\n\t\tthis.category = errorDefinition.category;\n\t\tthis.details = errorDefinition.details ?? {};\n\t\tthis.message = message;\n\t\tthis.cause = error;\n\t\tObject.setPrototypeOf(this, new.target.prototype);\n\t}\n\t/**\n\t* Returns a structured representation of the error, useful for logging or API responses.\n\t*/\n\ttoJSONDetails() {\n\t\treturn {\n\t\t\tmessage: this.message,\n\t\t\tdomain: this.domain,\n\t\t\tcategory: this.category,\n\t\t\tdetails: this.details\n\t\t};\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tmessage: this.message,\n\t\t\tdomain: this.domain,\n\t\t\tcategory: this.category,\n\t\t\tcode: this.id,\n\t\t\tdetails: this.details,\n\t\t\tcause: this.cause?.toJSON?.()\n\t\t};\n\t}\n\ttoString() {\n\t\treturn JSON.stringify(this.toJSON());\n\t}\n};\nvar MastraError = class extends MastraBaseError {};\n/** Permanent workflow step failure — bypasses workflow retryConfig. */\nvar MastraNonRetryableError = class extends Error {\n\tisNonRetryable = true;\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"MastraNonRetryableError\";\n\t\tObject.setPrototypeOf(this, new.target.prototype);\n\t}\n};\nexport { ErrorCategory, ErrorDomain, MastraBaseError, MastraError, MastraNonRetryableError, getErrorFromUnknown, safeParseErrorObject };\n\n//# sourceMappingURL=index.js.map"],"mappings":";;;;;;;AAOA,SAAS,qBAAqB,KAAK;CAClC,IAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM,OAAO,OAAO,GAAG;CAC9D,IAAI;EACH,MAAM,cAAc,KAAK,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C,yBAAS,eAAe;CAC3D,cAAc,aAAa;CAC3B,cAAc,UAAU;CACxB,cAAc,YAAY;CAC1B,cAAc,iBAAiB;CAC/B,OAAO;AACR,EAAE,CAAC,CAAC;;;;;AAKJ,IAAI,kBAAkB,cAAc,MAAM;CACzC;CACA;CACA;CACA,UAAU,CAAC;CACX;CACA;CACA,YAAY,iBAAiB,eAAe;EAC3C,MAAM,QAAQ,gBAAgB,oBAAoB,eAAe;GAChE,gBAAgB;GAChB,iBAAiB;EAClB,CAAC,IAAI,KAAK;EACV,MAAM,UAAU,gBAAgB,QAAQ,OAAO,WAAW;EAC1D,MAAM,SAAS,EAAE,OAAO,MAAM,CAAC;EAC/B,KAAK,KAAK,gBAAgB;EAC1B,KAAK,SAAS,gBAAgB;EAC9B,KAAK,WAAW,gBAAgB;EAChC,KAAK,UAAU,gBAAgB,WAAW,CAAC;EAC3C,KAAK,UAAU;EACf,KAAK,QAAQ;EACb,OAAO,eAAe,MAAM,WAAW,SAAS;CACjD;;;;CAIA,gBAAgB;EACf,OAAO;GACN,SAAS,KAAK;GACd,QAAQ,KAAK;GACb,UAAU,KAAK;GACf,SAAS,KAAK;EACf;CACD;CACA,SAAS;EACR,OAAO;GACN,SAAS,KAAK;GACd,QAAQ,KAAK;GACb,UAAU,KAAK;GACf,MAAM,KAAK;GACX,SAAS,KAAK;GACd,OAAO,KAAK,OAAO,SAAS;EAC7B;CACD;CACA,WAAW;EACV,OAAO,KAAK,UAAU,KAAK,OAAO,CAAC;CACpC;AACD;AACA,IAAI,cAAc,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,195 @@
1
+ // ../_internal-core/dist/error/index.js
2
+ /**
3
+ * Safely converts an object to a string representation.
4
+ * Uses JSON.stringify first, but falls back to String() if:
5
+ * - JSON.stringify fails (e.g., circular references)
6
+ * - JSON.stringify returns "{}" (e.g., Error objects with no enumerable properties)
7
+ */
8
+ function safeParseErrorObject(obj) {
9
+ if (typeof obj !== "object" || obj === null) return String(obj);
10
+ try {
11
+ const stringified = JSON.stringify(obj);
12
+ if (stringified === "{}") return String(obj);
13
+ return stringified;
14
+ } catch {
15
+ return String(obj);
16
+ }
17
+ }
18
+ /**
19
+ * Safely converts an unknown error to an Error instance.
20
+ */
21
+ function getErrorFromUnknown(unknown, options = {}) {
22
+ const defaultOptions = {
23
+ fallbackMessage: "Unknown error",
24
+ maxDepth: 5,
25
+ supportSerialization: true,
26
+ serializeStack: true
27
+ };
28
+ const mergedOptions = options ? {
29
+ ...defaultOptions,
30
+ ...options
31
+ } : defaultOptions;
32
+ const { fallbackMessage, maxDepth, supportSerialization, serializeStack } = mergedOptions;
33
+ if (unknown && unknown instanceof Error) {
34
+ if (supportSerialization) addErrorToJSON(unknown, serializeStack, { maxDepth });
35
+ return unknown;
36
+ }
37
+ let error;
38
+ if (unknown && typeof unknown === "object") {
39
+ const errorMessage = unknown && "message" in unknown && typeof unknown.message === "string" ? unknown.message : safeParseErrorObject(unknown);
40
+ const errorCause = "cause" in unknown && unknown.cause !== void 0 ? unknown.cause instanceof Error ? unknown.cause : maxDepth > 0 ? getErrorFromUnknown(unknown.cause, {
41
+ ...mergedOptions,
42
+ maxDepth: maxDepth - 1
43
+ }) : void 0 : void 0;
44
+ error = new Error(errorMessage, errorCause ? { cause: errorCause } : void 0);
45
+ Object.assign(error, unknown);
46
+ error.stack = "stack" in unknown && typeof unknown.stack === "string" ? unknown.stack : void 0;
47
+ } else if (unknown && typeof unknown === "string") {
48
+ error = new Error(unknown);
49
+ error.stack = void 0;
50
+ } else error = new Error(fallbackMessage);
51
+ if (supportSerialization) addErrorToJSON(error, serializeStack, { maxDepth });
52
+ return error;
53
+ }
54
+ const DEFAULT_MAX_DEPTH = 5;
55
+ /**
56
+ * Adds a toJSON method to an Error instance for proper serialization.
57
+ * Ensures that message, name, cause, and custom properties are all serialized.
58
+ * Stack is only included in JSON output if serializeStack is true.
59
+ * Recursively adds toJSON to the cause chain for proper nested error serialization.
60
+ */
61
+ function addErrorToJSON(error, serializeStack = true, options) {
62
+ const maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;
63
+ const currentDepth = options?.currentDepth ?? 0;
64
+ if (error.toJSON) return;
65
+ if (error.cause instanceof Error && currentDepth < maxDepth) addErrorToJSON(error.cause, serializeStack, {
66
+ maxDepth,
67
+ currentDepth: currentDepth + 1
68
+ });
69
+ Object.defineProperty(error, "toJSON", {
70
+ value: function() {
71
+ const json = {
72
+ message: this.message,
73
+ name: this.name
74
+ };
75
+ if (serializeStack && this.stack !== void 0) json.stack = this.stack;
76
+ if (this.cause !== void 0) {
77
+ if (this.cause instanceof Error && "toJSON" in this.cause && typeof this.cause.toJSON === "function") json.cause = this.cause.toJSON();
78
+ else json.cause = this.cause;
79
+ }
80
+ const errorAsAny = this;
81
+ for (const key in errorAsAny) if (errorAsAny.hasOwnProperty(key) && !(key in json) && key !== "toJSON") json[key] = errorAsAny[key];
82
+ return json;
83
+ },
84
+ enumerable: false,
85
+ writable: true,
86
+ configurable: true
87
+ });
88
+ }
89
+ let ErrorDomain = /* @__PURE__ */ function(ErrorDomain) {
90
+ ErrorDomain["TOOL"] = "TOOL";
91
+ ErrorDomain["AGENT"] = "AGENT";
92
+ ErrorDomain["MCP"] = "MCP";
93
+ ErrorDomain["AGENT_NETWORK"] = "AGENT_NETWORK";
94
+ ErrorDomain["MASTRA_SERVER"] = "MASTRA_SERVER";
95
+ ErrorDomain["MASTRA_OBSERVABILITY"] = "MASTRA_OBSERVABILITY";
96
+ ErrorDomain["MASTRA_WORKFLOW"] = "MASTRA_WORKFLOW";
97
+ ErrorDomain["MASTRA_VOICE"] = "MASTRA_VOICE";
98
+ ErrorDomain["MASTRA_VECTOR"] = "MASTRA_VECTOR";
99
+ ErrorDomain["MASTRA_MEMORY"] = "MASTRA_MEMORY";
100
+ ErrorDomain["LLM"] = "LLM";
101
+ ErrorDomain["EVAL"] = "EVAL";
102
+ ErrorDomain["SCORER"] = "SCORER";
103
+ ErrorDomain["A2A"] = "A2A";
104
+ ErrorDomain["MASTRA_INSTANCE"] = "MASTRA_INSTANCE";
105
+ ErrorDomain["MASTRA"] = "MASTRA";
106
+ ErrorDomain["DEPLOYER"] = "DEPLOYER";
107
+ ErrorDomain["STORAGE"] = "STORAGE";
108
+ ErrorDomain["MODEL_ROUTER"] = "MODEL_ROUTER";
109
+ return ErrorDomain;
110
+ }({});
111
+ let ErrorCategory = /* @__PURE__ */ function(ErrorCategory) {
112
+ ErrorCategory["UNKNOWN"] = "UNKNOWN";
113
+ ErrorCategory["USER"] = "USER";
114
+ ErrorCategory["SYSTEM"] = "SYSTEM";
115
+ ErrorCategory["THIRD_PARTY"] = "THIRD_PARTY";
116
+ return ErrorCategory;
117
+ }({});
118
+ /**
119
+ * Base error class for the Mastra ecosystem.
120
+ * It standardizes error reporting and can be extended for more specific error types.
121
+ */
122
+ var MastraBaseError = class extends Error {
123
+ id;
124
+ domain;
125
+ category;
126
+ details = {};
127
+ message;
128
+ cause;
129
+ constructor(errorDefinition, originalError) {
130
+ const error = originalError ? getErrorFromUnknown(originalError, {
131
+ serializeStack: false,
132
+ fallbackMessage: "Unknown error"
133
+ }) : void 0;
134
+ const message = errorDefinition.text ?? error?.message ?? "Unknown error";
135
+ super(message, { cause: error });
136
+ this.id = errorDefinition.id;
137
+ this.domain = errorDefinition.domain;
138
+ this.category = errorDefinition.category;
139
+ this.details = errorDefinition.details ?? {};
140
+ this.message = message;
141
+ this.cause = error;
142
+ Object.setPrototypeOf(this, new.target.prototype);
143
+ }
144
+ /**
145
+ * Returns a structured representation of the error, useful for logging or API responses.
146
+ */
147
+ toJSONDetails() {
148
+ return {
149
+ message: this.message,
150
+ domain: this.domain,
151
+ category: this.category,
152
+ details: this.details
153
+ };
154
+ }
155
+ toJSON() {
156
+ return {
157
+ message: this.message,
158
+ domain: this.domain,
159
+ category: this.category,
160
+ code: this.id,
161
+ details: this.details,
162
+ cause: this.cause?.toJSON?.()
163
+ };
164
+ }
165
+ toString() {
166
+ return JSON.stringify(this.toJSON());
167
+ }
168
+ };
169
+ var MastraError = class extends MastraBaseError {};
170
+ Object.defineProperty(exports, "ErrorCategory", {
171
+ enumerable: true,
172
+ get: function() {
173
+ return ErrorCategory;
174
+ }
175
+ });
176
+ Object.defineProperty(exports, "ErrorDomain", {
177
+ enumerable: true,
178
+ get: function() {
179
+ return ErrorDomain;
180
+ }
181
+ });
182
+ Object.defineProperty(exports, "MastraBaseError", {
183
+ enumerable: true,
184
+ get: function() {
185
+ return MastraBaseError;
186
+ }
187
+ });
188
+ Object.defineProperty(exports, "MastraError", {
189
+ enumerable: true,
190
+ get: function() {
191
+ return MastraError;
192
+ }
193
+ });
194
+
195
+ //# sourceMappingURL=error-CR4whExy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-CR4whExy.cjs","names":[],"sources":["../../_internal-core/dist/error/index.js"],"sourcesContent":["// src/error/utils.ts\n/**\n* Safely converts an object to a string representation.\n* Uses JSON.stringify first, but falls back to String() if:\n* - JSON.stringify fails (e.g., circular references)\n* - JSON.stringify returns \"{}\" (e.g., Error objects with no enumerable properties)\n*/\nfunction safeParseErrorObject(obj) {\n\tif (typeof obj !== \"object\" || obj === null) return String(obj);\n\ttry {\n\t\tconst stringified = JSON.stringify(obj);\n\t\tif (stringified === \"{}\") return String(obj);\n\t\treturn stringified;\n\t} catch {\n\t\treturn String(obj);\n\t}\n}\n/**\n* Safely converts an unknown error to an Error instance.\n*/\nfunction getErrorFromUnknown(unknown, options = {}) {\n\tconst defaultOptions = {\n\t\tfallbackMessage: \"Unknown error\",\n\t\tmaxDepth: 5,\n\t\tsupportSerialization: true,\n\t\tserializeStack: true\n\t};\n\tconst mergedOptions = options ? {\n\t\t...defaultOptions,\n\t\t...options\n\t} : defaultOptions;\n\tconst { fallbackMessage, maxDepth, supportSerialization, serializeStack } = mergedOptions;\n\tif (unknown && unknown instanceof Error) {\n\t\tif (supportSerialization) addErrorToJSON(unknown, serializeStack, { maxDepth });\n\t\treturn unknown;\n\t}\n\tlet error;\n\tif (unknown && typeof unknown === \"object\") {\n\t\tconst errorMessage = unknown && \"message\" in unknown && typeof unknown.message === \"string\" ? unknown.message : safeParseErrorObject(unknown);\n\t\tconst errorCause = \"cause\" in unknown && unknown.cause !== void 0 ? unknown.cause instanceof Error ? unknown.cause : maxDepth > 0 ? getErrorFromUnknown(unknown.cause, {\n\t\t\t...mergedOptions,\n\t\t\tmaxDepth: maxDepth - 1\n\t\t}) : void 0 : void 0;\n\t\terror = new Error(errorMessage, errorCause ? { cause: errorCause } : void 0);\n\t\tObject.assign(error, unknown);\n\t\terror.stack = \"stack\" in unknown && typeof unknown.stack === \"string\" ? unknown.stack : void 0;\n\t} else if (unknown && typeof unknown === \"string\") {\n\t\terror = new Error(unknown);\n\t\terror.stack = void 0;\n\t} else error = new Error(fallbackMessage);\n\tif (supportSerialization) addErrorToJSON(error, serializeStack, { maxDepth });\n\treturn error;\n}\nconst DEFAULT_MAX_DEPTH = 5;\n/**\n* Adds a toJSON method to an Error instance for proper serialization.\n* Ensures that message, name, cause, and custom properties are all serialized.\n* Stack is only included in JSON output if serializeStack is true.\n* Recursively adds toJSON to the cause chain for proper nested error serialization.\n*/\nfunction addErrorToJSON(error, serializeStack = true, options) {\n\tconst maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;\n\tconst currentDepth = options?.currentDepth ?? 0;\n\tif (error.toJSON) return;\n\tif (error.cause instanceof Error && currentDepth < maxDepth) addErrorToJSON(error.cause, serializeStack, {\n\t\tmaxDepth,\n\t\tcurrentDepth: currentDepth + 1\n\t});\n\tObject.defineProperty(error, \"toJSON\", {\n\t\tvalue: function() {\n\t\t\tconst json = {\n\t\t\t\tmessage: this.message,\n\t\t\t\tname: this.name\n\t\t\t};\n\t\t\tif (serializeStack && this.stack !== void 0) json.stack = this.stack;\n\t\t\tif (this.cause !== void 0) {\n\t\t\t\tif (this.cause instanceof Error && \"toJSON\" in this.cause && typeof this.cause.toJSON === \"function\") json.cause = this.cause.toJSON();\n\t\t\t\telse json.cause = this.cause;\n\t\t\t}\n\t\t\tconst errorAsAny = this;\n\t\t\tfor (const key in errorAsAny) if (errorAsAny.hasOwnProperty(key) && !(key in json) && key !== \"toJSON\") json[key] = errorAsAny[key];\n\t\t\treturn json;\n\t\t},\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tconfigurable: true\n\t});\n}\n// src/error/index.ts\nlet ErrorDomain = /* @__PURE__ */ function(ErrorDomain) {\n\tErrorDomain[\"TOOL\"] = \"TOOL\";\n\tErrorDomain[\"AGENT\"] = \"AGENT\";\n\tErrorDomain[\"MCP\"] = \"MCP\";\n\tErrorDomain[\"AGENT_NETWORK\"] = \"AGENT_NETWORK\";\n\tErrorDomain[\"MASTRA_SERVER\"] = \"MASTRA_SERVER\";\n\tErrorDomain[\"MASTRA_OBSERVABILITY\"] = \"MASTRA_OBSERVABILITY\";\n\tErrorDomain[\"MASTRA_WORKFLOW\"] = \"MASTRA_WORKFLOW\";\n\tErrorDomain[\"MASTRA_VOICE\"] = \"MASTRA_VOICE\";\n\tErrorDomain[\"MASTRA_VECTOR\"] = \"MASTRA_VECTOR\";\n\tErrorDomain[\"MASTRA_MEMORY\"] = \"MASTRA_MEMORY\";\n\tErrorDomain[\"LLM\"] = \"LLM\";\n\tErrorDomain[\"EVAL\"] = \"EVAL\";\n\tErrorDomain[\"SCORER\"] = \"SCORER\";\n\tErrorDomain[\"A2A\"] = \"A2A\";\n\tErrorDomain[\"MASTRA_INSTANCE\"] = \"MASTRA_INSTANCE\";\n\tErrorDomain[\"MASTRA\"] = \"MASTRA\";\n\tErrorDomain[\"DEPLOYER\"] = \"DEPLOYER\";\n\tErrorDomain[\"STORAGE\"] = \"STORAGE\";\n\tErrorDomain[\"MODEL_ROUTER\"] = \"MODEL_ROUTER\";\n\treturn ErrorDomain;\n}({});\nlet ErrorCategory = /* @__PURE__ */ function(ErrorCategory) {\n\tErrorCategory[\"UNKNOWN\"] = \"UNKNOWN\";\n\tErrorCategory[\"USER\"] = \"USER\";\n\tErrorCategory[\"SYSTEM\"] = \"SYSTEM\";\n\tErrorCategory[\"THIRD_PARTY\"] = \"THIRD_PARTY\";\n\treturn ErrorCategory;\n}({});\n/**\n* Base error class for the Mastra ecosystem.\n* It standardizes error reporting and can be extended for more specific error types.\n*/\nvar MastraBaseError = class extends Error {\n\tid;\n\tdomain;\n\tcategory;\n\tdetails = {};\n\tmessage;\n\tcause;\n\tconstructor(errorDefinition, originalError) {\n\t\tconst error = originalError ? getErrorFromUnknown(originalError, {\n\t\t\tserializeStack: false,\n\t\t\tfallbackMessage: \"Unknown error\"\n\t\t}) : void 0;\n\t\tconst message = errorDefinition.text ?? error?.message ?? \"Unknown error\";\n\t\tsuper(message, { cause: error });\n\t\tthis.id = errorDefinition.id;\n\t\tthis.domain = errorDefinition.domain;\n\t\tthis.category = errorDefinition.category;\n\t\tthis.details = errorDefinition.details ?? {};\n\t\tthis.message = message;\n\t\tthis.cause = error;\n\t\tObject.setPrototypeOf(this, new.target.prototype);\n\t}\n\t/**\n\t* Returns a structured representation of the error, useful for logging or API responses.\n\t*/\n\ttoJSONDetails() {\n\t\treturn {\n\t\t\tmessage: this.message,\n\t\t\tdomain: this.domain,\n\t\t\tcategory: this.category,\n\t\t\tdetails: this.details\n\t\t};\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tmessage: this.message,\n\t\t\tdomain: this.domain,\n\t\t\tcategory: this.category,\n\t\t\tcode: this.id,\n\t\t\tdetails: this.details,\n\t\t\tcause: this.cause?.toJSON?.()\n\t\t};\n\t}\n\ttoString() {\n\t\treturn JSON.stringify(this.toJSON());\n\t}\n};\nvar MastraError = class extends MastraBaseError {};\n/** Permanent workflow step failure — bypasses workflow retryConfig. */\nvar MastraNonRetryableError = class extends Error {\n\tisNonRetryable = true;\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"MastraNonRetryableError\";\n\t\tObject.setPrototypeOf(this, new.target.prototype);\n\t}\n};\nexport { ErrorCategory, ErrorDomain,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@@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_services = require("./services-Dqx1iouv.cjs");
3
- const require_bundlerOptions = require("./bundlerOptions-Dgt4ZEo1.cjs");
4
- const require_bundler_index = require("./bundler/index.cjs");
5
- require("./build-CXMVTo1j.cjs");
2
+ const require_services = require("./services-CtVt5CJq.cjs");
3
+ const require_bundler = require("./bundler-BBi45M7f.cjs");
4
+ const require_bundlerOptions = require("./bundlerOptions-BBvSNHFj.cjs");
5
+ require("./build-D0eiANsp.cjs");
6
6
  // src/deploy/base.ts
7
- var Deployer = class extends require_bundler_index.Bundler {
7
+ var Deployer = class extends require_bundler.Bundler {
8
8
  deps = new require_services.DepsService();
9
9
  constructor(args) {
10
10
  super(args.name, "DEPLOYER");
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["Bundler","DepsService","FileService","extractMastraOption"],"sources":["../src/deploy/base.ts","../src/build/deployer.ts"],"sourcesContent":["import type { IDeployer } from '@mastra/core/deployer';\n\nimport { Bundler } from '../bundler';\nimport { DepsService } from '../services/deps.js';\nimport { FileService } from '../services/fs.js';\n\nexport abstract class Deployer extends Bundler implements IDeployer {\n deps: DepsService = new DepsService();\n\n constructor(args: { name: string }) {\n super(args.name, 'DEPLOYER');\n\n this.deps.__setLogger(this.logger);\n }\n\n getEnvFiles(): Promise<string[]> {\n return Promise.resolve(new FileService().getExistingFiles(['.env', '.env.local', '.env.production']));\n }\n\n abstract deploy(outputDirectory: string): Promise<void>;\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\n\nexport function getDeployerBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('deployer', entryFile, result);\n}\n\nexport async function getDeployer(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['deployer'] | null> {\n const result = await extractMastraOption('deployer', entryFile, outputDir, logger);\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"],"mappings":";;;;;;AAMA,IAAsB,WAAtB,cAAuCA,sBAAAA,QAA6B;CAClE,OAAoB,IAAIC,iBAAAA,YAAY;CAEpC,YAAY,MAAwB;EAClC,MAAM,KAAK,MAAM,UAAU;EAE3B,KAAK,KAAK,YAAY,KAAK,MAAM;CACnC;CAEA,cAAiC;EAC/B,OAAO,QAAQ,QAAQ,IAAIC,iBAAAA,YAAY,CAAC,CAAC,iBAAiB;GAAC;GAAQ;GAAc;EAAiB,CAAC,CAAC;CACtG;AAGF;;ACPA,eAAsB,YACpB,WACA,WACA,QACoC;CACpC,MAAM,SAAS,MAAMC,uBAAAA,oBAAoB,YAAY,WAAW,WAAW,MAAM;CACjF,IAAI,CAAC,QACH,OAAO;CAGT,OAAO,OAAO,UAAU;AAC1B"}
1
+ {"version":3,"file":"index.cjs","names":["Bundler","DepsService","FileService","extractMastraOption"],"sources":["../src/deploy/base.ts","../src/build/deployer.ts"],"sourcesContent":["import type { IDeployer } from '@internal/deployer';\n\nimport { Bundler } from '../bundler';\nimport { DepsService } from '../services/deps.js';\nimport { FileService } from '../services/fs.js';\n\nexport abstract class Deployer extends Bundler implements IDeployer {\n deps: DepsService = new DepsService();\n\n constructor(args: { name: string }) {\n super(args.name, 'DEPLOYER');\n\n this.deps.__setLogger(this.logger);\n }\n\n getEnvFiles(): Promise<string[]> {\n return Promise.resolve(new FileService().getExistingFiles(['.env', '.env.local', '.env.production']));\n }\n\n abstract deploy(outputDirectory: string): Promise<void>;\n}\n","import type { IMastraLogger } from '@internal/core/logger';\nimport type { IDeployer } from '@internal/deployer';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\n\nexport function getDeployerBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('deployer', entryFile, result);\n}\n\nexport async function getDeployer(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<IDeployer | undefined | null> {\n const result = await extractMastraOption('deployer', entryFile, outputDir, logger);\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"],"mappings":";;;;;;AAMA,IAAsB,WAAtB,cAAuCA,gBAAAA,QAA6B;CAClE,OAAoB,IAAIC,iBAAAA,YAAY;CAEpC,YAAY,MAAwB;EAClC,MAAM,KAAK,MAAM,UAAU;EAE3B,KAAK,KAAK,YAAY,KAAK,MAAM;CACnC;CAEA,cAAiC;EAC/B,OAAO,QAAQ,QAAQ,IAAIC,iBAAAA,YAAY,CAAC,CAAC,iBAAiB;GAAC;GAAQ;GAAc;EAAiB,CAAC,CAAC;CACtG;AAGF;;ACPA,eAAsB,YACpB,WACA,WACA,QACuC;CACvC,MAAM,SAAS,MAAMC,uBAAAA,oBAAoB,YAAY,WAAW,WAAW,MAAM;CACjF,IAAI,CAAC,QACH,OAAO;CAGT,OAAO,OAAO,UAAU;AAC1B"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { c as createPinoStream, i as DepsService, r as Deps, s as createChildProcessLogger, t as FileService } from "./services-BJQJLQs9.js";
2
- import { n as extractMastraOption } from "./bundlerOptions-BtDsaIgs.js";
3
- import { Bundler } from "./bundler/index.js";
4
- import "./build-BlmomwDs.js";
1
+ import { c as createPinoStream, i as DepsService, r as Deps, s as createChildProcessLogger, t as FileService } from "./services-CXZJN9er.js";
2
+ import { t as Bundler } from "./bundler-CNgW1Vui.js";
3
+ import { n as extractMastraOption } from "./bundlerOptions-BlUHmPBE.js";
4
+ import "./build-CkZ0xUid.js";
5
5
  // src/deploy/base.ts
6
6
  var Deployer = class extends Bundler {
7
7
  deps = new DepsService();
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/deploy/base.ts","../src/build/deployer.ts"],"sourcesContent":["import type { IDeployer } from '@mastra/core/deployer';\n\nimport { Bundler } from '../bundler';\nimport { DepsService } from '../services/deps.js';\nimport { FileService } from '../services/fs.js';\n\nexport abstract class Deployer extends Bundler implements IDeployer {\n deps: DepsService = new DepsService();\n\n constructor(args: { name: string }) {\n super(args.name, 'DEPLOYER');\n\n this.deps.__setLogger(this.logger);\n }\n\n getEnvFiles(): Promise<string[]> {\n return Promise.resolve(new FileService().getExistingFiles(['.env', '.env.local', '.env.production']));\n }\n\n abstract deploy(outputDirectory: string): Promise<void>;\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\n\nexport function getDeployerBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('deployer', entryFile, result);\n}\n\nexport async function getDeployer(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['deployer'] | null> {\n const result = await extractMastraOption('deployer', entryFile, outputDir, logger);\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"],"mappings":";;;;;AAMA,IAAsB,WAAtB,cAAuC,QAA6B;CAClE,OAAoB,IAAI,YAAY;CAEpC,YAAY,MAAwB;EAClC,MAAM,KAAK,MAAM,UAAU;EAE3B,KAAK,KAAK,YAAY,KAAK,MAAM;CACnC;CAEA,cAAiC;EAC/B,OAAO,QAAQ,QAAQ,IAAI,YAAY,CAAC,CAAC,iBAAiB;GAAC;GAAQ;GAAc;EAAiB,CAAC,CAAC;CACtG;AAGF;;ACPA,eAAsB,YACpB,WACA,WACA,QACoC;CACpC,MAAM,SAAS,MAAM,oBAAoB,YAAY,WAAW,WAAW,MAAM;CACjF,IAAI,CAAC,QACH,OAAO;CAGT,OAAO,OAAO,UAAU;AAC1B"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/deploy/base.ts","../src/build/deployer.ts"],"sourcesContent":["import type { IDeployer } from '@internal/deployer';\n\nimport { Bundler } from '../bundler';\nimport { DepsService } from '../services/deps.js';\nimport { FileService } from '../services/fs.js';\n\nexport abstract class Deployer extends Bundler implements IDeployer {\n deps: DepsService = new DepsService();\n\n constructor(args: { name: string }) {\n super(args.name, 'DEPLOYER');\n\n this.deps.__setLogger(this.logger);\n }\n\n getEnvFiles(): Promise<string[]> {\n return Promise.resolve(new FileService().getExistingFiles(['.env', '.env.local', '.env.production']));\n }\n\n abstract deploy(outputDirectory: string): Promise<void>;\n}\n","import type { IMastraLogger } from '@internal/core/logger';\nimport type { IDeployer } from '@internal/deployer';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\n\nexport function getDeployerBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('deployer', entryFile, result);\n}\n\nexport async function getDeployer(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<IDeployer | undefined | null> {\n const result = await extractMastraOption('deployer', entryFile, outputDir, logger);\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"],"mappings":";;;;;AAMA,IAAsB,WAAtB,cAAuC,QAA6B;CAClE,OAAoB,IAAI,YAAY;CAEpC,YAAY,MAAwB;EAClC,MAAM,KAAK,MAAM,UAAU;EAE3B,KAAK,KAAK,YAAY,KAAK,MAAM;CACnC;CAEA,cAAiC;EAC/B,OAAO,QAAQ,QAAQ,IAAI,YAAY,CAAC,CAAC,iBAAiB;GAAC;GAAQ;GAAc;EAAiB,CAAC,CAAC;CACtG;AAGF;;ACPA,eAAsB,YACpB,WACA,WACA,QACuC;CACvC,MAAM,SAAS,MAAM,oBAAoB,YAAY,WAAW,WAAW,MAAM;CACjF,IAAI,CAAC,QACH,OAAO;CAGT,OAAO,OAAO,UAAU;AAC1B"}
@@ -1,34 +1,29 @@
1
1
  import type { Context } from 'hono';
2
2
  export declare function getAgentCardByIdHandler(c: Context): Promise<(Response & import("hono").TypedResponse<{
3
- error: {
4
- message: string;
5
- code: string;
6
- };
7
- }, 400, "json">) | (Response & import("hono").TypedResponse<{
8
3
  additionalInterfaces?: {
9
4
  transport: string;
10
5
  url: string;
11
6
  }[] | undefined;
12
7
  capabilities: {
13
8
  extensions?: {
14
- description?: string | undefined;
9
+ description?: string;
15
10
  params?: {
16
11
  [x: string]: import("hono/utils/types").JSONValue;
17
12
  } | undefined;
18
- required?: boolean | undefined;
13
+ required?: boolean;
19
14
  uri: string;
20
15
  }[] | undefined;
21
- pushNotifications?: boolean | undefined;
22
- stateTransitionHistory?: boolean | undefined;
23
- streaming?: boolean | undefined;
16
+ pushNotifications?: boolean;
17
+ stateTransitionHistory?: boolean;
18
+ streaming?: boolean;
24
19
  };
25
20
  defaultInputModes: string[];
26
21
  defaultOutputModes: string[];
27
22
  description: string;
28
- documentationUrl?: string | undefined;
29
- iconUrl?: string | undefined;
23
+ documentationUrl?: string;
24
+ iconUrl?: string;
30
25
  name: string;
31
- preferredTransport?: string | undefined;
26
+ preferredTransport?: string;
32
27
  protocolVersion: string;
33
28
  provider?: {
34
29
  organization: string;
@@ -39,28 +34,31 @@ export declare function getAgentCardByIdHandler(c: Context): Promise<(Response &
39
34
  }[] | undefined;
40
35
  securitySchemes?: {
41
36
  [x: string]: {
42
- description?: string | undefined;
37
+ description?: string;
43
38
  in: "cookie" | "header" | "query";
44
39
  name: string;
45
40
  type: "apiKey";
46
41
  } | {
47
- bearerFormat?: string | undefined;
48
- description?: string | undefined;
42
+ bearerFormat?: string;
43
+ description?: string;
49
44
  scheme: string;
50
45
  type: "http";
51
46
  } | {
52
- description?: string | undefined;
47
+ description?: string;
48
+ type: "mutualTLS";
49
+ } | {
50
+ description?: string;
53
51
  flows: {
54
52
  authorizationCode?: {
55
53
  authorizationUrl: string;
56
- refreshUrl?: string | undefined;
54
+ refreshUrl?: string;
57
55
  scopes: {
58
56
  [x: string]: string;
59
57
  };
60
58
  tokenUrl: string;
61
59
  } | undefined;
62
60
  clientCredentials?: {
63
- refreshUrl?: string | undefined;
61
+ refreshUrl?: string;
64
62
  scopes: {
65
63
  [x: string]: string;
66
64
  };
@@ -68,28 +66,25 @@ export declare function getAgentCardByIdHandler(c: Context): Promise<(Response &
68
66
  } | undefined;
69
67
  implicit?: {
70
68
  authorizationUrl: string;
71
- refreshUrl?: string | undefined;
69
+ refreshUrl?: string;
72
70
  scopes: {
73
71
  [x: string]: string;
74
72
  };
75
73
  } | undefined;
76
74
  password?: {
77
- refreshUrl?: string | undefined;
75
+ refreshUrl?: string;
78
76
  scopes: {
79
77
  [x: string]: string;
80
78
  };
81
79
  tokenUrl: string;
82
80
  } | undefined;
83
81
  };
84
- oauth2MetadataUrl?: string | undefined;
82
+ oauth2MetadataUrl?: string;
85
83
  type: "oauth2";
86
84
  } | {
87
- description?: string | undefined;
85
+ description?: string;
88
86
  openIdConnectUrl: string;
89
87
  type: "openIdConnect";
90
- } | {
91
- description?: string | undefined;
92
- type: "mutualTLS";
93
88
  };
94
89
  } | undefined;
95
90
  signatures?: {
@@ -101,19 +96,24 @@ export declare function getAgentCardByIdHandler(c: Context): Promise<(Response &
101
96
  }[] | undefined;
102
97
  skills: {
103
98
  description: string;
104
- examples?: string[] | undefined;
99
+ examples?: string[];
105
100
  id: string;
106
- inputModes?: string[] | undefined;
101
+ inputModes?: string[];
107
102
  name: string;
108
- outputModes?: string[] | undefined;
103
+ outputModes?: string[];
109
104
  security?: {
110
105
  [x: string]: string[];
111
106
  }[] | undefined;
112
107
  tags: string[];
113
108
  }[];
114
- supportsAuthenticatedExtendedCard?: boolean | undefined;
109
+ supportsAuthenticatedExtendedCard?: boolean;
115
110
  url: string;
116
111
  version: string;
117
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">)>;
112
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
113
+ error: {
114
+ message: string;
115
+ code: string;
116
+ };
117
+ }, 400, "json">)>;
118
118
  export declare function getAgentExecutionHandler(c: Context): Promise<Response>;
119
119
  //# sourceMappingURL=a2a.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/a2a.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,wBAAsB,uBAAuB,CAAC,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oEAevD;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,qBAoDxD"}
1
+ {"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/a2a.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,wBAAsB,uBAAuB,CAAC,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAI3B,OAAO;QAAyC,IAAI;;kBAWhF;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,qBAoDxD"}