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

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 (136) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/{chunk-ORHPD25N.cjs → chunk-65K5KHEQ.cjs} +7 -7
  5. package/dist/{chunk-ORHPD25N.cjs.map → chunk-65K5KHEQ.cjs.map} +1 -1
  6. package/dist/{chunk-ECAVJWAH.js → chunk-6EG7YHGD.js} +4 -4
  7. package/dist/{chunk-ECAVJWAH.js.map → chunk-6EG7YHGD.js.map} +1 -1
  8. package/dist/{chunk-MHTWFVXK.js → chunk-ALQKGV35.js} +4 -4
  9. package/dist/chunk-ALQKGV35.js.map +1 -0
  10. package/dist/{chunk-HIZDAENF.js → chunk-BJYSPRTD.js} +3 -3
  11. package/dist/{chunk-HIZDAENF.js.map → chunk-BJYSPRTD.js.map} +1 -1
  12. package/dist/{chunk-ASVFCNLS.js → chunk-CGQ7ENXU.js} +6 -6
  13. package/dist/{chunk-ASVFCNLS.js.map → chunk-CGQ7ENXU.js.map} +1 -1
  14. package/dist/{chunk-TJB7IK7N.cjs → chunk-CK5R5ZNR.cjs} +21 -9
  15. package/dist/chunk-CK5R5ZNR.cjs.map +1 -0
  16. package/dist/{chunk-NWC75FLU.cjs → chunk-CTFO2ENI.cjs} +53 -20
  17. package/dist/chunk-CTFO2ENI.cjs.map +1 -0
  18. package/dist/{chunk-RFZB2PQE.cjs → chunk-DIMION2S.cjs} +9 -9
  19. package/dist/{chunk-RFZB2PQE.cjs.map → chunk-DIMION2S.cjs.map} +1 -1
  20. package/dist/{chunk-NWPRZZ2K.cjs → chunk-ELXO2ZGY.cjs} +49 -49
  21. package/dist/chunk-ELXO2ZGY.cjs.map +1 -0
  22. package/dist/{chunk-CTJLKJMO.js → chunk-ERY767HB.js} +13 -10
  23. package/dist/chunk-ERY767HB.js.map +1 -0
  24. package/dist/{chunk-X4RVX77L.cjs → chunk-FRPV7F7E.cjs} +185 -185
  25. package/dist/{chunk-X4RVX77L.cjs.map → chunk-FRPV7F7E.cjs.map} +1 -1
  26. package/dist/{chunk-EAWVRIHS.js → chunk-GU6MTO2I.js} +3 -3
  27. package/dist/{chunk-EAWVRIHS.js.map → chunk-GU6MTO2I.js.map} +1 -1
  28. package/dist/{chunk-SHQKQEG2.js → chunk-JEF7ZU43.js} +50 -18
  29. package/dist/chunk-JEF7ZU43.js.map +1 -0
  30. package/dist/{chunk-Z76WT6W3.js → chunk-LVA4AOT3.js} +20 -8
  31. package/dist/chunk-LVA4AOT3.js.map +1 -0
  32. package/dist/{chunk-KCZ3R5SF.js → chunk-MJKEBUMM.js} +3 -3
  33. package/dist/{chunk-KCZ3R5SF.js.map → chunk-MJKEBUMM.js.map} +1 -1
  34. package/dist/{chunk-EFYYAFWD.cjs → chunk-NI24OP2N.cjs} +25 -22
  35. package/dist/chunk-NI24OP2N.cjs.map +1 -0
  36. package/dist/{chunk-JIBMK2QP.js → chunk-NYOTRFJQ.js} +9 -9
  37. package/dist/{chunk-JIBMK2QP.js.map → chunk-NYOTRFJQ.js.map} +1 -1
  38. package/dist/{chunk-FNOAF2SZ.js → chunk-OY45D5N5.js} +3 -3
  39. package/dist/{chunk-FNOAF2SZ.js.map → chunk-OY45D5N5.js.map} +1 -1
  40. package/dist/{chunk-YV5UMIRV.cjs → chunk-PDAZKZWB.cjs} +3 -3
  41. package/dist/{chunk-YV5UMIRV.cjs.map → chunk-PDAZKZWB.cjs.map} +1 -1
  42. package/dist/{chunk-4YKZNIK6.js → chunk-U3ZKCVTO.js} +4 -4
  43. package/dist/{chunk-4YKZNIK6.js.map → chunk-U3ZKCVTO.js.map} +1 -1
  44. package/dist/{chunk-OX63O3QG.cjs → chunk-VZWFITNF.cjs} +5 -5
  45. package/dist/{chunk-OX63O3QG.cjs.map → chunk-VZWFITNF.cjs.map} +1 -1
  46. package/dist/{chunk-7BM5LQHF.cjs → chunk-W7I3FI2N.cjs} +75 -75
  47. package/dist/{chunk-7BM5LQHF.cjs.map → chunk-W7I3FI2N.cjs.map} +1 -1
  48. package/dist/{chunk-Q64Z437G.cjs → chunk-XQHRNOOO.cjs} +16 -16
  49. package/dist/{chunk-Q64Z437G.cjs.map → chunk-XQHRNOOO.cjs.map} +1 -1
  50. package/dist/{chunk-M5BDH7B4.cjs → chunk-ZFVANSSN.cjs} +6 -6
  51. package/dist/{chunk-M5BDH7B4.cjs.map → chunk-ZFVANSSN.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 +122 -122
  56. package/dist/docs/references/docs-memory-observational-memory.md +28 -0
  57. package/dist/docs/references/docs-workspace-overview.md +15 -0
  58. package/dist/docs/references/reference-memory-observational-memory.md +38 -0
  59. package/dist/docs/references/reference-workspace-filesystem.md +2 -0
  60. package/dist/docs/references/reference-workspace-local-filesystem.md +2 -0
  61. package/dist/evals/index.cjs +5 -5
  62. package/dist/evals/index.js +2 -2
  63. package/dist/evals/scoreTraces/index.cjs +3 -3
  64. package/dist/evals/scoreTraces/index.js +1 -1
  65. package/dist/harness/index.cjs +11 -11
  66. package/dist/harness/index.js +6 -6
  67. package/dist/index.cjs +2 -2
  68. package/dist/index.js +1 -1
  69. package/dist/llm/index.cjs +16 -16
  70. package/dist/llm/index.js +5 -5
  71. package/dist/llm/model/provider-types.generated.d.ts +7 -1
  72. package/dist/loop/index.cjs +14 -14
  73. package/dist/loop/index.js +1 -1
  74. package/dist/mastra/index.cjs +2 -2
  75. package/dist/mastra/index.js +1 -1
  76. package/dist/memory/index.cjs +14 -14
  77. package/dist/memory/index.js +1 -1
  78. package/dist/memory/memory.d.ts.map +1 -1
  79. package/dist/memory/mock.d.ts +3 -2
  80. package/dist/memory/mock.d.ts.map +1 -1
  81. package/dist/memory/types.d.ts +15 -0
  82. package/dist/memory/types.d.ts.map +1 -1
  83. package/dist/models-dev-DJ7R4TZH.cjs +12 -0
  84. package/dist/{models-dev-WIROJ2IM.cjs.map → models-dev-DJ7R4TZH.cjs.map} +1 -1
  85. package/dist/models-dev-WCXTFBNF.js +3 -0
  86. package/dist/{models-dev-E6FRPGHV.js.map → models-dev-WCXTFBNF.js.map} +1 -1
  87. package/dist/netlify-NMYNMNGY.js +3 -0
  88. package/dist/{netlify-OAGRP6WY.js.map → netlify-NMYNMNGY.js.map} +1 -1
  89. package/dist/netlify-YEHOZHML.cjs +12 -0
  90. package/dist/{netlify-7IRBQ2BY.cjs.map → netlify-YEHOZHML.cjs.map} +1 -1
  91. package/dist/processor-provider/index.cjs +10 -10
  92. package/dist/processor-provider/index.js +1 -1
  93. package/dist/processors/index.cjs +42 -42
  94. package/dist/processors/index.js +1 -1
  95. package/dist/provider-registry-7QEVAVHF.cjs +40 -0
  96. package/dist/{provider-registry-FINEGQHE.cjs.map → provider-registry-7QEVAVHF.cjs.map} +1 -1
  97. package/dist/provider-registry-S7PSD7QK.js +3 -0
  98. package/dist/{provider-registry-2MHU2NP6.js.map → provider-registry-S7PSD7QK.js.map} +1 -1
  99. package/dist/provider-registry.json +16 -4
  100. package/dist/relevance/index.cjs +3 -3
  101. package/dist/relevance/index.js +1 -1
  102. package/dist/stream/index.cjs +8 -8
  103. package/dist/stream/index.js +1 -1
  104. package/dist/tool-loop-agent/index.cjs +4 -4
  105. package/dist/tool-loop-agent/index.js +1 -1
  106. package/dist/workflows/evented/index.cjs +10 -10
  107. package/dist/workflows/evented/index.js +1 -1
  108. package/dist/workflows/index.cjs +24 -24
  109. package/dist/workflows/index.js +1 -1
  110. package/dist/workspace/errors.d.ts +5 -0
  111. package/dist/workspace/errors.d.ts.map +1 -1
  112. package/dist/workspace/filesystem/filesystem.d.ts +6 -0
  113. package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
  114. package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
  115. package/dist/workspace/index.cjs +71 -67
  116. package/dist/workspace/index.js +1 -1
  117. package/dist/workspace/tools/ast-edit.d.ts.map +1 -1
  118. package/dist/workspace/tools/edit-file.d.ts.map +1 -1
  119. package/dist/workspace/tools/tools.d.ts.map +1 -1
  120. package/dist/workspace/tools/write-file.d.ts.map +1 -1
  121. package/package.json +3 -3
  122. package/src/llm/model/provider-types.generated.d.ts +7 -1
  123. package/dist/chunk-CTJLKJMO.js.map +0 -1
  124. package/dist/chunk-EFYYAFWD.cjs.map +0 -1
  125. package/dist/chunk-MHTWFVXK.js.map +0 -1
  126. package/dist/chunk-NWC75FLU.cjs.map +0 -1
  127. package/dist/chunk-NWPRZZ2K.cjs.map +0 -1
  128. package/dist/chunk-SHQKQEG2.js.map +0 -1
  129. package/dist/chunk-TJB7IK7N.cjs.map +0 -1
  130. package/dist/chunk-Z76WT6W3.js.map +0 -1
  131. package/dist/models-dev-E6FRPGHV.js +0 -3
  132. package/dist/models-dev-WIROJ2IM.cjs +0 -12
  133. package/dist/netlify-7IRBQ2BY.cjs +0 -12
  134. package/dist/netlify-OAGRP6WY.js +0 -3
  135. package/dist/provider-registry-2MHU2NP6.js +0 -3
  136. package/dist/provider-registry-FINEGQHE.cjs +0 -40
@@ -89,6 +89,34 @@ The result is a three-tier system:
89
89
  2. **Observations**: A log of what the Observer has seen
90
90
  3. **Reflections**: Condensed observations when memory becomes too long
91
91
 
92
+ ### Retrieval mode (experimental)
93
+
94
+ > **Note:** Retrieval mode is experimental. The API may change in future releases.
95
+
96
+ Normal OM compresses messages into observations, which is great for staying on task — but the original wording is gone. Retrieval mode fixes this by keeping each observation group linked to the raw messages that produced it. When the agent needs exact wording, tool output, or chronology that the summary compressed away, it can call a `recall` tool to page through the source messages.
97
+
98
+ ```typescript
99
+ const memory = new Memory({
100
+ options: {
101
+ observationalMemory: {
102
+ model: 'google/gemini-2.5-flash',
103
+ scope: 'thread',
104
+ retrieval: true,
105
+ },
106
+ },
107
+ })
108
+ ```
109
+
110
+ With retrieval mode enabled, OM:
111
+
112
+ - Stores a `range` (e.g. `startId:endId`) on each observation group pointing to the messages it was derived from
113
+ - Keeps range metadata visible in the agent's context so the agent knows which observations map to which messages
114
+ - Registers a `recall` tool the agent can call to page through the raw messages behind any range
115
+
116
+ Retrieval mode is only active for thread-scoped OM. Setting `retrieval: true` with `scope: 'resource'` has no effect — OM keeps resource-scoped behavior but skips retrieval-mode context and does not register the `recall` tool.
117
+
118
+ See the [recall tool reference](https://mastra.ai/reference/memory/observational-memory) for the full API (detail levels, part indexing, pagination, and token limiting).
119
+
92
120
  ## Models
93
121
 
94
122
  The Observer and Reflector run in the background. Any model that works with Mastra's [model routing](https://mastra.ai/models) (`provider/model`) can be used. When using `observationalMemory: true`, the default model is `google/gemini-2.5-flash`. When passing a config object, a `model` must be explicitly set.
@@ -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.
@@ -38,6 +38,8 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
38
38
 
39
39
  **shareTokenBudget** (`boolean`): Share the token budget between messages and observations. When enabled, the total budget is \`observation.messageTokens + reflection.observationTokens\`. Messages can use more space when observations are small, and vice versa. This maximizes context usage through flexible allocation. \`shareTokenBudget\` is not yet compatible with async buffering. You must set \`observation: { bufferTokens: false }\` when using this option (this is a temporary limitation). (Default: `false`)
40
40
 
41
+ **retrieval** (`boolean`): \*\*Experimental.\*\* Enable retrieval-mode observation groups as durable pointers to raw message history. Retrieval mode is only active when \`scope\` is \`'thread'\`. If you set \`retrieval: true\` with \`scope: 'resource'\`, OM keeps resource-scoped memory behavior but skips retrieval-mode context and does not register the \`recall\` tool. (Default: `false`)
42
+
41
43
  **observation** (`ObservationalMemoryObservationConfig`): Configuration for the observation step. Controls when the Observer agent runs and how it behaves.
42
44
 
43
45
  **observation.model** (`string | LanguageModel | DynamicModel | ModelWithRetries[]`): Model for the Observer agent. Cannot be set if a top-level \`model\` is also provided. If neither this nor the top-level \`model\` is set, falls back to \`reflection.model\`.
@@ -574,6 +576,42 @@ The standalone `ObservationalMemory` class accepts all the same options as the `
574
576
 
575
577
  **obscureThreadIds** (`boolean`): When enabled, thread IDs are hashed before being included in observation context. This prevents the LLM from recognizing patterns in thread identifiers. Automatically enabled when using resource scope through the Memory class. (Default: `false`)
576
578
 
579
+ ## Recall tool
580
+
581
+ When `retrieval: true` is set with `scope: 'thread'`, OM registers a `recall` tool that the agent can call to page through the raw messages behind an observation group's `_range`. The tool is automatically added to the agent's tool list — no manual registration is needed.
582
+
583
+ ### Parameters
584
+
585
+ **cursor** (`string`): A message ID to anchor the recall query. Extract the start or end ID from an observation group range (e.g. from \`\_range: \\\`startId:endId\\\`\_\`, use either \`startId\` or \`endId\`). If a range string is passed directly, the tool returns a hint explaining how to extract the correct ID.
586
+
587
+ **page** (`number`): Pagination offset from the cursor. Positive values page forward (messages after the cursor), negative values page backward (messages before the cursor). \`0\` is treated as \`1\`. (Default: `1`)
588
+
589
+ **limit** (`number`): Maximum number of messages per page. (Default: `20`)
590
+
591
+ **detail** (`'low' | 'high'`): Controls how much content is shown per message part. \`'low'\` shows truncated text and tool names with positional indices (\`\[p0]\`, \`\[p1]\`). \`'high'\` shows full content including tool arguments and results, clamped to one part per call with continuation hints. (Default: `'low'`)
592
+
593
+ **partIndex** (`number`): Fetch a single message part at full detail by its positional index. Use this when a low-detail recall shows an interesting part at \`\[p1]\` — call again with \`partIndex: 1\` to see the full content without loading every part.
594
+
595
+ ### Returns
596
+
597
+ **messages** (`string`): Formatted message content. Format depends on the \`detail\` level.
598
+
599
+ **count** (`number`): Number of messages in this page.
600
+
601
+ **cursor** (`string`): The cursor message ID used for this query.
602
+
603
+ **page** (`number`): The page number returned.
604
+
605
+ **limit** (`number`): The limit used for this query.
606
+
607
+ **hasNextPage** (`boolean`): Whether more messages exist after this page.
608
+
609
+ **hasPrevPage** (`boolean`): Whether more messages exist before this page.
610
+
611
+ **truncated** (`boolean`): Present and \`true\` when the output was capped by the token budget. The agent can paginate or use \`partIndex\` to access remaining content.
612
+
613
+ **tokenOffset** (`number`): Approximate number of tokens that were trimmed when \`truncated\` is true.
614
+
577
615
  ### Related
578
616
 
579
617
  - [Observational Memory](https://mastra.ai/docs/memory/observational-memory)
@@ -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 chunkVZWFITNF_cjs = require('../chunk-VZWFITNF.cjs');
4
+ var chunkNI24OP2N_cjs = require('../chunk-NI24OP2N.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 chunkVZWFITNF_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 chunkNI24OP2N_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 chunkNI24OP2N_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-GU6MTO2I.js';
2
+ export { MastraScorer, createScorer } from '../chunk-ERY767HB.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 chunkELXO2ZGY_cjs = require('../../chunk-ELXO2ZGY.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 = chunkELXO2ZGY_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 = chunkELXO2ZGY_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-ALQKGV35.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 chunkXQHRNOOO_cjs = require('../chunk-XQHRNOOO.cjs');
4
+ var chunkNI24OP2N_cjs = require('../chunk-NI24OP2N.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 chunkNI24OP2N_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 chunkXQHRNOOO_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-7QEVAVHF.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-7QEVAVHF.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-7QEVAVHF.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-NYOTRFJQ.js';
2
+ import { Agent } from '../chunk-ERY767HB.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-S7PSD7QK.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-S7PSD7QK.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-S7PSD7QK.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 chunkXQHRNOOO_cjs = require('./chunk-XQHRNOOO.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 chunkXQHRNOOO_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-NYOTRFJQ.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 chunkW7I3FI2N_cjs = require('../chunk-W7I3FI2N.cjs');
4
+ var chunkFRPV7F7E_cjs = require('../chunk-FRPV7F7E.cjs');
5
+ var chunkDIMION2S_cjs = require('../chunk-DIMION2S.cjs');
6
+ var chunkPDAZKZWB_cjs = require('../chunk-PDAZKZWB.cjs');
7
+ var chunkCK5R5ZNR_cjs = require('../chunk-CK5R5ZNR.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 chunkW7I3FI2N_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 chunkW7I3FI2N_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 chunkW7I3FI2N_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 chunkW7I3FI2N_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 chunkW7I3FI2N_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 chunkFRPV7F7E_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 chunkDIMION2S_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 chunkPDAZKZWB_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 chunkCK5R5ZNR_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 chunkCK5R5ZNR_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 chunkCK5R5ZNR_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-CGQ7ENXU.js';
2
+ export { ModelsDevGateway } from '../chunk-BJYSPRTD.js';
3
+ export { NetlifyGateway } from '../chunk-MJKEBUMM.js';
4
+ export { MastraModelGateway } from '../chunk-OY45D5N5.js';
5
+ export { PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-LVA4AOT3.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -318,7 +318,7 @@ export type ProviderModelsMap = {
318
318
  'perplexity/sonar',
319
319
  'xai/grok-4-1-fast-non-reasoning',
320
320
  ];
321
- readonly xiaomi: readonly ['mimo-v2-flash'];
321
+ readonly xiaomi: readonly ['mimo-v2-flash', 'mimo-v2-omni', 'mimo-v2-pro'];
322
322
  readonly synthetic: readonly [
323
323
  'hf:MiniMaxAI/MiniMax-M2',
324
324
  'hf:MiniMaxAI/MiniMax-M2.1',
@@ -514,6 +514,7 @@ export type ProviderModelsMap = {
514
514
  'minimax-m2',
515
515
  'minimax-m2.1',
516
516
  'minimax-m2.5',
517
+ 'minimax-m2.7',
517
518
  'ministral-3:14b',
518
519
  'ministral-3:3b',
519
520
  'ministral-3:8b',
@@ -905,7 +906,9 @@ export type ProviderModelsMap = {
905
906
  '@cf/meta/m2m100-1.2b',
906
907
  '@cf/mistral/mistral-7b-instruct-v0.1',
907
908
  '@cf/mistralai/mistral-small-3.1-24b-instruct',
909
+ '@cf/moonshotai/kimi-k2.5',
908
910
  '@cf/myshell-ai/melotts',
911
+ '@cf/nvidia/nemotron-3-120b-a12b',
909
912
  '@cf/openai/gpt-oss-120b',
910
913
  '@cf/openai/gpt-oss-20b',
911
914
  '@cf/pfnet/plamo-embedding-1b',
@@ -1241,6 +1244,7 @@ export type ProviderModelsMap = {
1241
1244
  'glm-4.6v-flash',
1242
1245
  'glm-4.7',
1243
1246
  'glm-5',
1247
+ 'glm-5-turbo',
1244
1248
  ];
1245
1249
  readonly deepseek: readonly ['deepseek-chat', 'deepseek-reasoner'];
1246
1250
  readonly lmstudio: readonly ['openai/gpt-oss-20b', 'qwen/qwen3-30b-a3b-2507', 'qwen/qwen3-coder-30b'];
@@ -1435,6 +1439,8 @@ export type ProviderModelsMap = {
1435
1439
  'x-ai/grok-4.20-multi-agent-beta',
1436
1440
  'x-ai/grok-code-fast-1',
1437
1441
  'xiaomi/mimo-v2-flash',
1442
+ 'xiaomi/mimo-v2-omni',
1443
+ 'xiaomi/mimo-v2-pro',
1438
1444
  'z-ai/glm-4.5',
1439
1445
  'z-ai/glm-4.5-air',
1440
1446
  'z-ai/glm-4.5-air:free',
@@ -1,60 +1,60 @@
1
1
  'use strict';
2
2
 
3
- var chunkEFYYAFWD_cjs = require('../chunk-EFYYAFWD.cjs');
3
+ var chunkNI24OP2N_cjs = require('../chunk-NI24OP2N.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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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 chunkNI24OP2N_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-ERY767HB.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 chunkXQHRNOOO_cjs = require('../chunk-XQHRNOOO.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 chunkXQHRNOOO_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-NYOTRFJQ.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map