@mastra/core 1.15.0-alpha.2 → 1.15.0-alpha.3

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 (120) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/{chunk-MHTWFVXK.js → chunk-3QVIGF2C.js} +3 -3
  5. package/dist/{chunk-MHTWFVXK.js.map → chunk-3QVIGF2C.js.map} +1 -1
  6. package/dist/{chunk-ORHPD25N.cjs → chunk-4HBFSEH5.cjs} +7 -7
  7. package/dist/{chunk-ORHPD25N.cjs.map → chunk-4HBFSEH5.cjs.map} +1 -1
  8. package/dist/{chunk-Q64Z437G.cjs → chunk-5TR3QHRW.cjs} +15 -15
  9. package/dist/{chunk-Q64Z437G.cjs.map → chunk-5TR3QHRW.cjs.map} +1 -1
  10. package/dist/{chunk-OX63O3QG.cjs → chunk-6H4DIT5W.cjs} +5 -5
  11. package/dist/{chunk-OX63O3QG.cjs.map → chunk-6H4DIT5W.cjs.map} +1 -1
  12. package/dist/{chunk-4YKZNIK6.js → chunk-6OM5P63S.js} +4 -4
  13. package/dist/{chunk-4YKZNIK6.js.map → chunk-6OM5P63S.js.map} +1 -1
  14. package/dist/{chunk-YV5UMIRV.cjs → chunk-7FCDSKDP.cjs} +3 -3
  15. package/dist/{chunk-YV5UMIRV.cjs.map → chunk-7FCDSKDP.cjs.map} +1 -1
  16. package/dist/{chunk-7BM5LQHF.cjs → chunk-A5IWSJLJ.cjs} +75 -75
  17. package/dist/{chunk-7BM5LQHF.cjs.map → chunk-A5IWSJLJ.cjs.map} +1 -1
  18. package/dist/{chunk-KCZ3R5SF.js → chunk-AVLD4VHQ.js} +3 -3
  19. package/dist/{chunk-KCZ3R5SF.js.map → chunk-AVLD4VHQ.js.map} +1 -1
  20. package/dist/{chunk-ECAVJWAH.js → chunk-B5M72XCG.js} +4 -4
  21. package/dist/{chunk-ECAVJWAH.js.map → chunk-B5M72XCG.js.map} +1 -1
  22. package/dist/{chunk-X4RVX77L.cjs → chunk-BAUAKBM6.cjs} +185 -185
  23. package/dist/{chunk-X4RVX77L.cjs.map → chunk-BAUAKBM6.cjs.map} +1 -1
  24. package/dist/{chunk-ASVFCNLS.js → chunk-CJHZXD3U.js} +6 -6
  25. package/dist/{chunk-ASVFCNLS.js.map → chunk-CJHZXD3U.js.map} +1 -1
  26. package/dist/{chunk-NWC75FLU.cjs → chunk-CTFO2ENI.cjs} +53 -20
  27. package/dist/chunk-CTFO2ENI.cjs.map +1 -0
  28. package/dist/{chunk-EFYYAFWD.cjs → chunk-DYFEJA5J.cjs} +17 -17
  29. package/dist/{chunk-EFYYAFWD.cjs.map → chunk-DYFEJA5J.cjs.map} +1 -1
  30. package/dist/{chunk-SHQKQEG2.js → chunk-JEF7ZU43.js} +50 -18
  31. package/dist/chunk-JEF7ZU43.js.map +1 -0
  32. package/dist/{chunk-M5BDH7B4.cjs → chunk-K5NREJ7B.cjs} +6 -6
  33. package/dist/{chunk-M5BDH7B4.cjs.map → chunk-K5NREJ7B.cjs.map} +1 -1
  34. package/dist/{chunk-FNOAF2SZ.js → chunk-K6EF74Q4.js} +3 -3
  35. package/dist/{chunk-FNOAF2SZ.js.map → chunk-K6EF74Q4.js.map} +1 -1
  36. package/dist/{chunk-CTJLKJMO.js → chunk-M4AJQGAW.js} +5 -5
  37. package/dist/{chunk-CTJLKJMO.js.map → chunk-M4AJQGAW.js.map} +1 -1
  38. package/dist/{chunk-Z76WT6W3.js → chunk-MFB7BS3L.js} +4 -4
  39. package/dist/{chunk-Z76WT6W3.js.map → chunk-MFB7BS3L.js.map} +1 -1
  40. package/dist/{chunk-EAWVRIHS.js → chunk-O5KUYSYB.js} +3 -3
  41. package/dist/{chunk-EAWVRIHS.js.map → chunk-O5KUYSYB.js.map} +1 -1
  42. package/dist/{chunk-NWPRZZ2K.cjs → chunk-OFY7LQSG.cjs} +48 -48
  43. package/dist/{chunk-NWPRZZ2K.cjs.map → chunk-OFY7LQSG.cjs.map} +1 -1
  44. package/dist/{chunk-JIBMK2QP.js → chunk-SVHGG25E.js} +8 -8
  45. package/dist/{chunk-JIBMK2QP.js.map → chunk-SVHGG25E.js.map} +1 -1
  46. package/dist/{chunk-TJB7IK7N.cjs → chunk-TRLOXCPX.cjs} +5 -5
  47. package/dist/{chunk-TJB7IK7N.cjs.map → chunk-TRLOXCPX.cjs.map} +1 -1
  48. package/dist/{chunk-HIZDAENF.js → chunk-VPN66PYF.js} +3 -3
  49. package/dist/{chunk-HIZDAENF.js.map → chunk-VPN66PYF.js.map} +1 -1
  50. package/dist/{chunk-RFZB2PQE.cjs → chunk-XOBYVWML.cjs} +9 -9
  51. package/dist/{chunk-RFZB2PQE.cjs.map → chunk-XOBYVWML.cjs.map} +1 -1
  52. package/dist/datasets/index.cjs +11 -11
  53. package/dist/datasets/index.js +1 -1
  54. package/dist/docs/SKILL.md +1 -1
  55. package/dist/docs/assets/SOURCE_MAP.json +119 -119
  56. package/dist/docs/references/docs-workspace-overview.md +15 -0
  57. package/dist/docs/references/reference-workspace-filesystem.md +2 -0
  58. package/dist/docs/references/reference-workspace-local-filesystem.md +2 -0
  59. package/dist/evals/index.cjs +5 -5
  60. package/dist/evals/index.js +2 -2
  61. package/dist/evals/scoreTraces/index.cjs +3 -3
  62. package/dist/evals/scoreTraces/index.js +1 -1
  63. package/dist/harness/index.cjs +11 -11
  64. package/dist/harness/index.js +6 -6
  65. package/dist/index.cjs +2 -2
  66. package/dist/index.js +1 -1
  67. package/dist/llm/index.cjs +16 -16
  68. package/dist/llm/index.js +5 -5
  69. package/dist/loop/index.cjs +14 -14
  70. package/dist/loop/index.js +1 -1
  71. package/dist/mastra/index.cjs +2 -2
  72. package/dist/mastra/index.js +1 -1
  73. package/dist/memory/index.cjs +14 -14
  74. package/dist/memory/index.js +1 -1
  75. package/dist/models-dev-KSUL2WSE.js +3 -0
  76. package/dist/{models-dev-E6FRPGHV.js.map → models-dev-KSUL2WSE.js.map} +1 -1
  77. package/dist/models-dev-N3BB7QC6.cjs +12 -0
  78. package/dist/{models-dev-WIROJ2IM.cjs.map → models-dev-N3BB7QC6.cjs.map} +1 -1
  79. package/dist/netlify-5FZZLF2V.cjs +12 -0
  80. package/dist/{netlify-7IRBQ2BY.cjs.map → netlify-5FZZLF2V.cjs.map} +1 -1
  81. package/dist/netlify-YHUBX5AX.js +3 -0
  82. package/dist/{netlify-OAGRP6WY.js.map → netlify-YHUBX5AX.js.map} +1 -1
  83. package/dist/processor-provider/index.cjs +10 -10
  84. package/dist/processor-provider/index.js +1 -1
  85. package/dist/processors/index.cjs +42 -42
  86. package/dist/processors/index.js +1 -1
  87. package/dist/provider-registry-52PKE45P.js +3 -0
  88. package/dist/{provider-registry-2MHU2NP6.js.map → provider-registry-52PKE45P.js.map} +1 -1
  89. package/dist/provider-registry-YH7WKSYN.cjs +40 -0
  90. package/dist/{provider-registry-FINEGQHE.cjs.map → provider-registry-YH7WKSYN.cjs.map} +1 -1
  91. package/dist/relevance/index.cjs +3 -3
  92. package/dist/relevance/index.js +1 -1
  93. package/dist/stream/index.cjs +8 -8
  94. package/dist/stream/index.js +1 -1
  95. package/dist/tool-loop-agent/index.cjs +4 -4
  96. package/dist/tool-loop-agent/index.js +1 -1
  97. package/dist/workflows/evented/index.cjs +10 -10
  98. package/dist/workflows/evented/index.js +1 -1
  99. package/dist/workflows/index.cjs +24 -24
  100. package/dist/workflows/index.js +1 -1
  101. package/dist/workspace/errors.d.ts +5 -0
  102. package/dist/workspace/errors.d.ts.map +1 -1
  103. package/dist/workspace/filesystem/filesystem.d.ts +6 -0
  104. package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
  105. package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
  106. package/dist/workspace/index.cjs +71 -67
  107. package/dist/workspace/index.js +1 -1
  108. package/dist/workspace/tools/ast-edit.d.ts.map +1 -1
  109. package/dist/workspace/tools/edit-file.d.ts.map +1 -1
  110. package/dist/workspace/tools/tools.d.ts.map +1 -1
  111. package/dist/workspace/tools/write-file.d.ts.map +1 -1
  112. package/package.json +5 -5
  113. package/dist/chunk-NWC75FLU.cjs.map +0 -1
  114. package/dist/chunk-SHQKQEG2.js.map +0 -1
  115. package/dist/models-dev-E6FRPGHV.js +0 -3
  116. package/dist/models-dev-WIROJ2IM.cjs +0 -12
  117. package/dist/netlify-7IRBQ2BY.cjs +0 -12
  118. package/dist/netlify-OAGRP6WY.js +0 -3
  119. package/dist/provider-registry-2MHU2NP6.js +0 -3
  120. package/dist/provider-registry-FINEGQHE.cjs +0 -40
@@ -249,6 +249,21 @@ When `requireReadBeforeWrite` is enabled on write tools, agents must read a file
249
249
  - **Existing files**: Must be read first
250
250
  - **Externally modified files**: If a file changed since the agent read it, the write fails
251
251
 
252
+ File write safety is enforced at two layers:
253
+
254
+ 1. **Tool layer**: Before a write tool runs, the read tracker checks whether the file was modified since it was last read. If it was, the tool throws a `FileReadRequiredError`.
255
+ 2. **Filesystem layer**: At write time, `writeFile()` compares the file's current modification time against the expected value (passed via `expectedMtime` in write options). If they don't match, it throws a `StaleFileError`. This catches external modifications (for example, an editor saving the file) that happen between the tool-level check and the actual write.
256
+
257
+ When `requireReadBeforeWrite` is enabled, workspace tools pass the recorded modification time through automatically. You can also use `expectedMtime` directly when calling `filesystem.writeFile()` outside of tools:
258
+
259
+ ```typescript
260
+ const stat = await filesystem.stat('/docs/file.md')
261
+ // ... later ...
262
+ await filesystem.writeFile('/docs/file.md', newContent, {
263
+ expectedMtime: stat.modifiedAt,
264
+ })
265
+ ```
266
+
252
267
  ## Initialization
253
268
 
254
269
  Calling `init()` is optional in most cases—some providers initialize on first operation. Call `init()` manually when using a workspace outside of Mastra (standalone scripts, tests) or when you need to pre-provision resources before the first agent interaction.
@@ -46,6 +46,8 @@ await filesystem.writeFile('/nested/path/file.md', content, { recursive: true })
46
46
 
47
47
  **options.overwrite** (`boolean`): Overwrite existing file
48
48
 
49
+ **options.expectedMtime** (`Date`): If provided, the write fails with a StaleFileError when the file's current modification time doesn't match. Use this for optimistic concurrency control to detect external modifications between read and write.
50
+
49
51
  ### `deleteFile(path, options?)`
50
52
 
51
53
  Delete a file.
@@ -141,6 +141,8 @@ await filesystem.writeFile('/nested/path/file.md', content, { recursive: true })
141
141
 
142
142
  **options.overwrite** (`boolean`): Overwrite existing file
143
143
 
144
+ **options.expectedMtime** (`Date`): If provided, the write fails with a StaleFileError when the file's current modification time doesn't match. Use this for optimistic concurrency control to detect external modifications between read and write.
145
+
144
146
  ### `appendFile(path, content)`
145
147
 
146
148
  Append content to an existing file.
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var chunkOX63O3QG_cjs = require('../chunk-OX63O3QG.cjs');
4
- var chunkEFYYAFWD_cjs = require('../chunk-EFYYAFWD.cjs');
3
+ var chunk6H4DIT5W_cjs = require('../chunk-6H4DIT5W.cjs');
4
+ var chunkDYFEJA5J_cjs = require('../chunk-DYFEJA5J.cjs');
5
5
  var chunkZHWQKPUV_cjs = require('../chunk-ZHWQKPUV.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "runEvals", {
10
10
  enumerable: true,
11
- get: function () { return chunkOX63O3QG_cjs.runEvals; }
11
+ get: function () { return chunk6H4DIT5W_cjs.runEvals; }
12
12
  });
13
13
  Object.defineProperty(exports, "MastraScorer", {
14
14
  enumerable: true,
15
- get: function () { return chunkEFYYAFWD_cjs.MastraScorer; }
15
+ get: function () { return chunkDYFEJA5J_cjs.MastraScorer; }
16
16
  });
17
17
  Object.defineProperty(exports, "createScorer", {
18
18
  enumerable: true,
19
- get: function () { return chunkEFYYAFWD_cjs.createScorer; }
19
+ get: function () { return chunkDYFEJA5J_cjs.createScorer; }
20
20
  });
21
21
  Object.defineProperty(exports, "listScoresResponseSchema", {
22
22
  enumerable: true,
@@ -1,5 +1,5 @@
1
- export { runEvals } from '../chunk-EAWVRIHS.js';
2
- export { MastraScorer, createScorer } from '../chunk-CTJLKJMO.js';
1
+ export { runEvals } from '../chunk-O5KUYSYB.js';
2
+ export { MastraScorer, createScorer } from '../chunk-M4AJQGAW.js';
3
3
  export { listScoresResponseSchema, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema } from '../chunk-LFMJYWJ7.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkNWPRZZ2K_cjs = require('../../chunk-NWPRZZ2K.cjs');
3
+ var chunkOFY7LQSG_cjs = require('../../chunk-OFY7LQSG.cjs');
4
4
  var chunkZHWQKPUV_cjs = require('../../chunk-ZHWQKPUV.cjs');
5
5
  var chunkJUL4UHWQ_cjs = require('../../chunk-JUL4UHWQ.cjs');
6
6
  var chunk4U7ZLI36_cjs = require('../../chunk-4U7ZLI36.cjs');
@@ -236,7 +236,7 @@ function transformTraceToScorerInputAndOutput(trace) {
236
236
  }
237
237
 
238
238
  // src/evals/scoreTraces/scoreTracesWorkflow.ts
239
- var getTraceStep = chunkNWPRZZ2K_cjs.createStep({
239
+ var getTraceStep = chunkOFY7LQSG_cjs.createStep({
240
240
  id: "__process-trace-scoring",
241
241
  inputSchema: z__default.default.object({
242
242
  targets: z__default.default.array(
@@ -447,7 +447,7 @@ async function attachScoreToSpan({
447
447
  } catch {
448
448
  }
449
449
  }
450
- var scoreTracesWorkflow = chunkNWPRZZ2K_cjs.createWorkflow({
450
+ var scoreTracesWorkflow = chunkOFY7LQSG_cjs.createWorkflow({
451
451
  id: "__batch-scoring-traces",
452
452
  inputSchema: z__default.default.object({
453
453
  targets: z__default.default.array(
@@ -1,4 +1,4 @@
1
- import { createStep, createWorkflow } from '../../chunk-MHTWFVXK.js';
1
+ import { createStep, createWorkflow } from '../../chunk-3QVIGF2C.js';
2
2
  import { saveScorePayloadSchema } from '../../chunk-LFMJYWJ7.js';
3
3
  import { resolveObservabilityContext } from '../../chunk-3PUUIEVX.js';
4
4
  import { MastraError } from '../../chunk-FJEVLHJT.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ64Z437G_cjs = require('../chunk-Q64Z437G.cjs');
4
- var chunkEFYYAFWD_cjs = require('../chunk-EFYYAFWD.cjs');
5
- var chunkNWC75FLU_cjs = require('../chunk-NWC75FLU.cjs');
3
+ var chunk5TR3QHRW_cjs = require('../chunk-5TR3QHRW.cjs');
4
+ var chunkDYFEJA5J_cjs = require('../chunk-DYFEJA5J.cjs');
5
+ var chunkCTFO2ENI_cjs = require('../chunk-CTFO2ENI.cjs');
6
6
  var chunkNQXA2BUF_cjs = require('../chunk-NQXA2BUF.cjs');
7
7
  var chunkVWJ7H3MJ_cjs = require('../chunk-VWJ7H3MJ.cjs');
8
8
  var chunk5WBEMKE2_cjs = require('../chunk-5WBEMKE2.cjs');
@@ -312,7 +312,7 @@ Use this tool when:
312
312
  };
313
313
  }
314
314
  const workspace = context?.workspace;
315
- const subagent = new chunkEFYYAFWD_cjs.Agent({
315
+ const subagent = new chunkDYFEJA5J_cjs.Agent({
316
316
  id: `subagent-${definition.id}`,
317
317
  name: `${definition.name} Subagent`,
318
318
  instructions: definition.instructions,
@@ -320,7 +320,7 @@ Use this tool when:
320
320
  tools: mergedTools,
321
321
  workspace
322
322
  });
323
- const allWorkspaceToolNames = workspace ? new Set(Object.keys(chunkNWC75FLU_cjs.createWorkspaceTools(workspace))) : void 0;
323
+ const allWorkspaceToolNames = workspace ? new Set(Object.keys(chunkCTFO2ENI_cjs.createWorkspaceTools(workspace))) : void 0;
324
324
  const allowedWs = definition.allowedWorkspaceTools ? new Set(definition.allowedWorkspaceTools) : void 0;
325
325
  const startTime = Date.now();
326
326
  emitEvent?.({
@@ -539,7 +539,7 @@ var Harness = class {
539
539
  throw new Error("Harness requires at least one agent mode");
540
540
  }
541
541
  this.currentModeId = defaultMode.id;
542
- if (config.workspace instanceof chunkNWC75FLU_cjs.Workspace) {
542
+ if (config.workspace instanceof chunkCTFO2ENI_cjs.Workspace) {
543
543
  this.workspace = config.workspace;
544
544
  } else if (typeof config.workspace === "function") {
545
545
  this.workspaceFn = config.workspace;
@@ -558,13 +558,13 @@ var Harness = class {
558
558
  */
559
559
  async init() {
560
560
  if (this.config.storage) {
561
- this.#internalMastra = new chunkQ64Z437G_cjs.Mastra({ logger: false, storage: this.config.storage });
561
+ this.#internalMastra = new chunk5TR3QHRW_cjs.Mastra({ logger: false, storage: this.config.storage });
562
562
  await this.#internalMastra.getStorage().init();
563
563
  }
564
564
  if (this.config.workspace && !this.workspaceInitialized && !this.workspaceFn) {
565
565
  try {
566
566
  if (!this.workspace) {
567
- this.workspace = new chunkNWC75FLU_cjs.Workspace(this.config.workspace);
567
+ this.workspace = new chunkCTFO2ENI_cjs.Workspace(this.config.workspace);
568
568
  }
569
569
  this.emit({ type: "workspace_status_changed", status: "initializing" });
570
570
  await this.workspace.init();
@@ -810,7 +810,7 @@ var Harness = class {
810
810
  }
811
811
  }
812
812
  try {
813
- const { PROVIDER_REGISTRY } = await import('../provider-registry-FINEGQHE.cjs');
813
+ const { PROVIDER_REGISTRY } = await import('../provider-registry-YH7WKSYN.cjs');
814
814
  const registry = PROVIDER_REGISTRY;
815
815
  const providerConfig = registry[provider];
816
816
  const envVars = providerConfig?.apiKeyEnvVar;
@@ -830,7 +830,7 @@ var Harness = class {
830
830
  */
831
831
  async listAvailableModels() {
832
832
  try {
833
- const { PROVIDER_REGISTRY } = await import('../provider-registry-FINEGQHE.cjs');
833
+ const { PROVIDER_REGISTRY } = await import('../provider-registry-YH7WKSYN.cjs');
834
834
  if (!PROVIDER_REGISTRY) return [];
835
835
  const registry = PROVIDER_REGISTRY;
836
836
  const providers = Object.keys(registry);
@@ -889,7 +889,7 @@ var Harness = class {
889
889
  }
890
890
  async getProviderApiKeyEnvVar(provider) {
891
891
  try {
892
- const { PROVIDER_REGISTRY } = await import('../provider-registry-FINEGQHE.cjs');
892
+ const { PROVIDER_REGISTRY } = await import('../provider-registry-YH7WKSYN.cjs');
893
893
  const registry = PROVIDER_REGISTRY;
894
894
  const envVars = registry[provider]?.apiKeyEnvVar;
895
895
  return Array.isArray(envVars) ? envVars[0] : envVars;
@@ -1,6 +1,6 @@
1
- import { Mastra } from '../chunk-JIBMK2QP.js';
2
- import { Agent } from '../chunk-CTJLKJMO.js';
3
- import { Workspace, createWorkspaceTools } from '../chunk-SHQKQEG2.js';
1
+ import { Mastra } from '../chunk-SVHGG25E.js';
2
+ import { Agent } from '../chunk-M4AJQGAW.js';
3
+ import { Workspace, createWorkspaceTools } from '../chunk-JEF7ZU43.js';
4
4
  import { createTool } from '../chunk-UPXPPD5L.js';
5
5
  import { toStandardSchema } from '../chunk-6VAVASZ5.js';
6
6
  import { RequestContext } from '../chunk-JGOH7RWL.js';
@@ -808,7 +808,7 @@ var Harness = class {
808
808
  }
809
809
  }
810
810
  try {
811
- const { PROVIDER_REGISTRY } = await import('../provider-registry-2MHU2NP6.js');
811
+ const { PROVIDER_REGISTRY } = await import('../provider-registry-52PKE45P.js');
812
812
  const registry = PROVIDER_REGISTRY;
813
813
  const providerConfig = registry[provider];
814
814
  const envVars = providerConfig?.apiKeyEnvVar;
@@ -828,7 +828,7 @@ var Harness = class {
828
828
  */
829
829
  async listAvailableModels() {
830
830
  try {
831
- const { PROVIDER_REGISTRY } = await import('../provider-registry-2MHU2NP6.js');
831
+ const { PROVIDER_REGISTRY } = await import('../provider-registry-52PKE45P.js');
832
832
  if (!PROVIDER_REGISTRY) return [];
833
833
  const registry = PROVIDER_REGISTRY;
834
834
  const providers = Object.keys(registry);
@@ -887,7 +887,7 @@ var Harness = class {
887
887
  }
888
888
  async getProviderApiKeyEnvVar(provider) {
889
889
  try {
890
- const { PROVIDER_REGISTRY } = await import('../provider-registry-2MHU2NP6.js');
890
+ const { PROVIDER_REGISTRY } = await import('../provider-registry-52PKE45P.js');
891
891
  const registry = PROVIDER_REGISTRY;
892
892
  const envVars = registry[provider]?.apiKeyEnvVar;
893
893
  return Array.isArray(envVars) ? envVars[0] : envVars;
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ64Z437G_cjs = require('./chunk-Q64Z437G.cjs');
3
+ var chunk5TR3QHRW_cjs = require('./chunk-5TR3QHRW.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Mastra", {
8
8
  enumerable: true,
9
- get: function () { return chunkQ64Z437G_cjs.Mastra; }
9
+ get: function () { return chunk5TR3QHRW_cjs.Mastra; }
10
10
  });
11
11
  //# sourceMappingURL=index.cjs.map
12
12
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Mastra } from './chunk-JIBMK2QP.js';
1
+ export { Mastra } from './chunk-SVHGG25E.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,56 +1,56 @@
1
1
  'use strict';
2
2
 
3
- var chunk7BM5LQHF_cjs = require('../chunk-7BM5LQHF.cjs');
4
- var chunkX4RVX77L_cjs = require('../chunk-X4RVX77L.cjs');
5
- var chunkRFZB2PQE_cjs = require('../chunk-RFZB2PQE.cjs');
6
- var chunkYV5UMIRV_cjs = require('../chunk-YV5UMIRV.cjs');
7
- var chunkTJB7IK7N_cjs = require('../chunk-TJB7IK7N.cjs');
3
+ var chunkA5IWSJLJ_cjs = require('../chunk-A5IWSJLJ.cjs');
4
+ var chunkBAUAKBM6_cjs = require('../chunk-BAUAKBM6.cjs');
5
+ var chunkXOBYVWML_cjs = require('../chunk-XOBYVWML.cjs');
6
+ var chunk7FCDSKDP_cjs = require('../chunk-7FCDSKDP.cjs');
7
+ var chunkTRLOXCPX_cjs = require('../chunk-TRLOXCPX.cjs');
8
8
 
9
9
 
10
10
 
11
11
  Object.defineProperty(exports, "AzureOpenAIGateway", {
12
12
  enumerable: true,
13
- get: function () { return chunk7BM5LQHF_cjs.AzureOpenAIGateway; }
13
+ get: function () { return chunkA5IWSJLJ_cjs.AzureOpenAIGateway; }
14
14
  });
15
15
  Object.defineProperty(exports, "EMBEDDING_MODELS", {
16
16
  enumerable: true,
17
- get: function () { return chunk7BM5LQHF_cjs.EMBEDDING_MODELS; }
17
+ get: function () { return chunkA5IWSJLJ_cjs.EMBEDDING_MODELS; }
18
18
  });
19
19
  Object.defineProperty(exports, "ModelRouterEmbeddingModel", {
20
20
  enumerable: true,
21
- get: function () { return chunk7BM5LQHF_cjs.ModelRouterEmbeddingModel; }
21
+ get: function () { return chunkA5IWSJLJ_cjs.ModelRouterEmbeddingModel; }
22
22
  });
23
23
  Object.defineProperty(exports, "ModelRouterLanguageModel", {
24
24
  enumerable: true,
25
- get: function () { return chunk7BM5LQHF_cjs.ModelRouterLanguageModel; }
25
+ get: function () { return chunkA5IWSJLJ_cjs.ModelRouterLanguageModel; }
26
26
  });
27
27
  Object.defineProperty(exports, "resolveModelConfig", {
28
28
  enumerable: true,
29
- get: function () { return chunk7BM5LQHF_cjs.resolveModelConfig; }
29
+ get: function () { return chunkA5IWSJLJ_cjs.resolveModelConfig; }
30
30
  });
31
31
  Object.defineProperty(exports, "ModelsDevGateway", {
32
32
  enumerable: true,
33
- get: function () { return chunkX4RVX77L_cjs.ModelsDevGateway; }
33
+ get: function () { return chunkBAUAKBM6_cjs.ModelsDevGateway; }
34
34
  });
35
35
  Object.defineProperty(exports, "NetlifyGateway", {
36
36
  enumerable: true,
37
- get: function () { return chunkRFZB2PQE_cjs.NetlifyGateway; }
37
+ get: function () { return chunkXOBYVWML_cjs.NetlifyGateway; }
38
38
  });
39
39
  Object.defineProperty(exports, "MastraModelGateway", {
40
40
  enumerable: true,
41
- get: function () { return chunkYV5UMIRV_cjs.MastraModelGateway; }
41
+ get: function () { return chunk7FCDSKDP_cjs.MastraModelGateway; }
42
42
  });
43
43
  Object.defineProperty(exports, "PROVIDER_REGISTRY", {
44
44
  enumerable: true,
45
- get: function () { return chunkTJB7IK7N_cjs.PROVIDER_REGISTRY; }
45
+ get: function () { return chunkTRLOXCPX_cjs.PROVIDER_REGISTRY; }
46
46
  });
47
47
  Object.defineProperty(exports, "getProviderConfig", {
48
48
  enumerable: true,
49
- get: function () { return chunkTJB7IK7N_cjs.getProviderConfig; }
49
+ get: function () { return chunkTRLOXCPX_cjs.getProviderConfig; }
50
50
  });
51
51
  Object.defineProperty(exports, "parseModelString", {
52
52
  enumerable: true,
53
- get: function () { return chunkTJB7IK7N_cjs.parseModelString; }
53
+ get: function () { return chunkTRLOXCPX_cjs.parseModelString; }
54
54
  });
55
55
  //# sourceMappingURL=index.cjs.map
56
56
  //# sourceMappingURL=index.cjs.map
package/dist/llm/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { AzureOpenAIGateway, EMBEDDING_MODELS, ModelRouterEmbeddingModel, ModelRouterLanguageModel, resolveModelConfig } from '../chunk-ASVFCNLS.js';
2
- export { ModelsDevGateway } from '../chunk-HIZDAENF.js';
3
- export { NetlifyGateway } from '../chunk-KCZ3R5SF.js';
4
- export { MastraModelGateway } from '../chunk-FNOAF2SZ.js';
5
- export { PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-Z76WT6W3.js';
1
+ export { AzureOpenAIGateway, EMBEDDING_MODELS, ModelRouterEmbeddingModel, ModelRouterLanguageModel, resolveModelConfig } from '../chunk-CJHZXD3U.js';
2
+ export { ModelsDevGateway } from '../chunk-VPN66PYF.js';
3
+ export { NetlifyGateway } from '../chunk-AVLD4VHQ.js';
4
+ export { MastraModelGateway } from '../chunk-K6EF74Q4.js';
5
+ export { PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-MFB7BS3L.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,60 +1,60 @@
1
1
  'use strict';
2
2
 
3
- var chunkEFYYAFWD_cjs = require('../chunk-EFYYAFWD.cjs');
3
+ var chunkDYFEJA5J_cjs = require('../chunk-DYFEJA5J.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createScorer", {
8
8
  enumerable: true,
9
- get: function () { return chunkEFYYAFWD_cjs.createScorer; }
9
+ get: function () { return chunkDYFEJA5J_cjs.createScorer; }
10
10
  });
11
11
  Object.defineProperty(exports, "formatCheckFeedback", {
12
12
  enumerable: true,
13
- get: function () { return chunkEFYYAFWD_cjs.formatCheckFeedback; }
13
+ get: function () { return chunkDYFEJA5J_cjs.formatCheckFeedback; }
14
14
  });
15
15
  Object.defineProperty(exports, "formatCompletionFeedback", {
16
16
  enumerable: true,
17
- get: function () { return chunkEFYYAFWD_cjs.formatCompletionFeedback; }
17
+ get: function () { return chunkDYFEJA5J_cjs.formatCompletionFeedback; }
18
18
  });
19
19
  Object.defineProperty(exports, "formatStreamCompletionFeedback", {
20
20
  enumerable: true,
21
- get: function () { return chunkEFYYAFWD_cjs.formatStreamCompletionFeedback; }
21
+ get: function () { return chunkDYFEJA5J_cjs.formatStreamCompletionFeedback; }
22
22
  });
23
23
  Object.defineProperty(exports, "formatValidationFeedback", {
24
24
  enumerable: true,
25
- get: function () { return chunkEFYYAFWD_cjs.formatValidationFeedback; }
25
+ get: function () { return chunkDYFEJA5J_cjs.formatValidationFeedback; }
26
26
  });
27
27
  Object.defineProperty(exports, "generateFinalResult", {
28
28
  enumerable: true,
29
- get: function () { return chunkEFYYAFWD_cjs.generateFinalResult; }
29
+ get: function () { return chunkDYFEJA5J_cjs.generateFinalResult; }
30
30
  });
31
31
  Object.defineProperty(exports, "generateStructuredFinalResult", {
32
32
  enumerable: true,
33
- get: function () { return chunkEFYYAFWD_cjs.generateStructuredFinalResult; }
33
+ get: function () { return chunkDYFEJA5J_cjs.generateStructuredFinalResult; }
34
34
  });
35
35
  Object.defineProperty(exports, "loop", {
36
36
  enumerable: true,
37
- get: function () { return chunkEFYYAFWD_cjs.loop; }
37
+ get: function () { return chunkDYFEJA5J_cjs.loop; }
38
38
  });
39
39
  Object.defineProperty(exports, "runChecks", {
40
40
  enumerable: true,
41
- get: function () { return chunkEFYYAFWD_cjs.runChecks; }
41
+ get: function () { return chunkDYFEJA5J_cjs.runChecks; }
42
42
  });
43
43
  Object.defineProperty(exports, "runCompletionScorers", {
44
44
  enumerable: true,
45
- get: function () { return chunkEFYYAFWD_cjs.runCompletionScorers; }
45
+ get: function () { return chunkDYFEJA5J_cjs.runCompletionScorers; }
46
46
  });
47
47
  Object.defineProperty(exports, "runDefaultCompletionCheck", {
48
48
  enumerable: true,
49
- get: function () { return chunkEFYYAFWD_cjs.runDefaultCompletionCheck; }
49
+ get: function () { return chunkDYFEJA5J_cjs.runDefaultCompletionCheck; }
50
50
  });
51
51
  Object.defineProperty(exports, "runStreamCompletionScorers", {
52
52
  enumerable: true,
53
- get: function () { return chunkEFYYAFWD_cjs.runStreamCompletionScorers; }
53
+ get: function () { return chunkDYFEJA5J_cjs.runStreamCompletionScorers; }
54
54
  });
55
55
  Object.defineProperty(exports, "runValidation", {
56
56
  enumerable: true,
57
- get: function () { return chunkEFYYAFWD_cjs.runValidation; }
57
+ get: function () { return chunkDYFEJA5J_cjs.runValidation; }
58
58
  });
59
59
  //# sourceMappingURL=index.cjs.map
60
60
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-CTJLKJMO.js';
1
+ export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-M4AJQGAW.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ64Z437G_cjs = require('../chunk-Q64Z437G.cjs');
3
+ var chunk5TR3QHRW_cjs = require('../chunk-5TR3QHRW.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Mastra", {
8
8
  enumerable: true,
9
- get: function () { return chunkQ64Z437G_cjs.Mastra; }
9
+ get: function () { return chunk5TR3QHRW_cjs.Mastra; }
10
10
  });
11
11
  //# sourceMappingURL=index.cjs.map
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { Mastra } from '../chunk-JIBMK2QP.js';
1
+ export { Mastra } from '../chunk-SVHGG25E.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,60 +1,60 @@
1
1
  'use strict';
2
2
 
3
- var chunkEFYYAFWD_cjs = require('../chunk-EFYYAFWD.cjs');
3
+ var chunkDYFEJA5J_cjs = require('../chunk-DYFEJA5J.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "MastraMemory", {
8
8
  enumerable: true,
9
- get: function () { return chunkEFYYAFWD_cjs.MastraMemory; }
9
+ get: function () { return chunkDYFEJA5J_cjs.MastraMemory; }
10
10
  });
11
11
  Object.defineProperty(exports, "MemoryProcessor", {
12
12
  enumerable: true,
13
- get: function () { return chunkEFYYAFWD_cjs.MemoryProcessor; }
13
+ get: function () { return chunkDYFEJA5J_cjs.MemoryProcessor; }
14
14
  });
15
15
  Object.defineProperty(exports, "MockMemory", {
16
16
  enumerable: true,
17
- get: function () { return chunkEFYYAFWD_cjs.MockMemory; }
17
+ get: function () { return chunkDYFEJA5J_cjs.MockMemory; }
18
18
  });
19
19
  Object.defineProperty(exports, "WORKING_MEMORY_END_TAG", {
20
20
  enumerable: true,
21
- get: function () { return chunkEFYYAFWD_cjs.WORKING_MEMORY_END_TAG; }
21
+ get: function () { return chunkDYFEJA5J_cjs.WORKING_MEMORY_END_TAG; }
22
22
  });
23
23
  Object.defineProperty(exports, "WORKING_MEMORY_START_TAG", {
24
24
  enumerable: true,
25
- get: function () { return chunkEFYYAFWD_cjs.WORKING_MEMORY_START_TAG; }
25
+ get: function () { return chunkDYFEJA5J_cjs.WORKING_MEMORY_START_TAG; }
26
26
  });
27
27
  Object.defineProperty(exports, "extractWorkingMemoryContent", {
28
28
  enumerable: true,
29
- get: function () { return chunkEFYYAFWD_cjs.extractWorkingMemoryContent; }
29
+ get: function () { return chunkDYFEJA5J_cjs.extractWorkingMemoryContent; }
30
30
  });
31
31
  Object.defineProperty(exports, "extractWorkingMemoryTags", {
32
32
  enumerable: true,
33
- get: function () { return chunkEFYYAFWD_cjs.extractWorkingMemoryTags; }
33
+ get: function () { return chunkDYFEJA5J_cjs.extractWorkingMemoryTags; }
34
34
  });
35
35
  Object.defineProperty(exports, "getThreadOMMetadata", {
36
36
  enumerable: true,
37
- get: function () { return chunkEFYYAFWD_cjs.getThreadOMMetadata; }
37
+ get: function () { return chunkDYFEJA5J_cjs.getThreadOMMetadata; }
38
38
  });
39
39
  Object.defineProperty(exports, "isObservationalMemoryEnabled", {
40
40
  enumerable: true,
41
- get: function () { return chunkEFYYAFWD_cjs.isObservationalMemoryEnabled; }
41
+ get: function () { return chunkDYFEJA5J_cjs.isObservationalMemoryEnabled; }
42
42
  });
43
43
  Object.defineProperty(exports, "memoryDefaultOptions", {
44
44
  enumerable: true,
45
- get: function () { return chunkEFYYAFWD_cjs.memoryDefaultOptions; }
45
+ get: function () { return chunkDYFEJA5J_cjs.memoryDefaultOptions; }
46
46
  });
47
47
  Object.defineProperty(exports, "parseMemoryRequestContext", {
48
48
  enumerable: true,
49
- get: function () { return chunkEFYYAFWD_cjs.parseMemoryRequestContext; }
49
+ get: function () { return chunkDYFEJA5J_cjs.parseMemoryRequestContext; }
50
50
  });
51
51
  Object.defineProperty(exports, "removeWorkingMemoryTags", {
52
52
  enumerable: true,
53
- get: function () { return chunkEFYYAFWD_cjs.removeWorkingMemoryTags; }
53
+ get: function () { return chunkDYFEJA5J_cjs.removeWorkingMemoryTags; }
54
54
  });
55
55
  Object.defineProperty(exports, "setThreadOMMetadata", {
56
56
  enumerable: true,
57
- get: function () { return chunkEFYYAFWD_cjs.setThreadOMMetadata; }
57
+ get: function () { return chunkDYFEJA5J_cjs.setThreadOMMetadata; }
58
58
  });
59
59
  //# sourceMappingURL=index.cjs.map
60
60
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { MastraMemory, MemoryProcessor, MockMemory, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, extractWorkingMemoryContent, extractWorkingMemoryTags, getThreadOMMetadata, isObservationalMemoryEnabled, memoryDefaultOptions, parseMemoryRequestContext, removeWorkingMemoryTags, setThreadOMMetadata } from '../chunk-CTJLKJMO.js';
1
+ export { MastraMemory, MemoryProcessor, MockMemory, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, extractWorkingMemoryContent, extractWorkingMemoryTags, getThreadOMMetadata, isObservationalMemoryEnabled, memoryDefaultOptions, parseMemoryRequestContext, removeWorkingMemoryTags, setThreadOMMetadata } from '../chunk-M4AJQGAW.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ export { ModelsDevGateway } from './chunk-VPN66PYF.js';
2
+ //# sourceMappingURL=models-dev-KSUL2WSE.js.map
3
+ //# sourceMappingURL=models-dev-KSUL2WSE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-E6FRPGHV.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-KSUL2WSE.js"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkBAUAKBM6_cjs = require('./chunk-BAUAKBM6.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ModelsDevGateway", {
8
+ enumerable: true,
9
+ get: function () { return chunkBAUAKBM6_cjs.ModelsDevGateway; }
10
+ });
11
+ //# sourceMappingURL=models-dev-N3BB7QC6.cjs.map
12
+ //# sourceMappingURL=models-dev-N3BB7QC6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-WIROJ2IM.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-N3BB7QC6.cjs"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkXOBYVWML_cjs = require('./chunk-XOBYVWML.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "NetlifyGateway", {
8
+ enumerable: true,
9
+ get: function () { return chunkXOBYVWML_cjs.NetlifyGateway; }
10
+ });
11
+ //# sourceMappingURL=netlify-5FZZLF2V.cjs.map
12
+ //# sourceMappingURL=netlify-5FZZLF2V.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-7IRBQ2BY.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-5FZZLF2V.cjs"}
@@ -0,0 +1,3 @@
1
+ export { NetlifyGateway } from './chunk-AVLD4VHQ.js';
2
+ //# sourceMappingURL=netlify-YHUBX5AX.js.map
3
+ //# sourceMappingURL=netlify-YHUBX5AX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-OAGRP6WY.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-YHUBX5AX.js"}