@mastra/core 1.32.0-alpha.3 → 1.32.0
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.
- package/CHANGELOG.md +206 -0
- package/dist/agent/durable/index.cjs +22 -22
- package/dist/agent/durable/index.js +4 -4
- package/dist/agent/index.cjs +9 -9
- package/dist/agent/index.js +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/channels/index.cjs +4 -4
- package/dist/channels/index.js +1 -1
- package/dist/{chunk-CRMUTN3A.js → chunk-2RXMQLX7.js} +4 -4
- package/dist/{chunk-CRMUTN3A.js.map → chunk-2RXMQLX7.js.map} +1 -1
- package/dist/{chunk-PQRH3PWI.cjs → chunk-3DIJ3TQS.cjs} +30 -20
- package/dist/chunk-3DIJ3TQS.cjs.map +1 -0
- package/dist/{chunk-XGYB6VEV.js → chunk-4FQ5HEEG.js} +21 -11
- package/dist/chunk-4FQ5HEEG.js.map +1 -0
- package/dist/{chunk-KMPDWFMV.js → chunk-5VJTKVXF.js} +3 -3
- package/dist/chunk-5VJTKVXF.js.map +1 -0
- package/dist/{chunk-52UBCOSR.js → chunk-AF3BGEBT.js} +68 -60
- package/dist/chunk-AF3BGEBT.js.map +1 -0
- package/dist/{chunk-MCOBK6VA.cjs → chunk-CTWPJGFQ.cjs} +9 -9
- package/dist/{chunk-MCOBK6VA.cjs.map → chunk-CTWPJGFQ.cjs.map} +1 -1
- package/dist/{chunk-ESBDVN5F.cjs → chunk-F3PTR2CN.cjs} +7 -7
- package/dist/{chunk-ESBDVN5F.cjs.map → chunk-F3PTR2CN.cjs.map} +1 -1
- package/dist/{chunk-4VYOBEPT.cjs → chunk-K6PAVEJM.cjs} +29 -22
- package/dist/chunk-K6PAVEJM.cjs.map +1 -0
- package/dist/{chunk-AYDHVBUD.cjs → chunk-NNV6BI2Y.cjs} +7 -7
- package/dist/{chunk-AYDHVBUD.cjs.map → chunk-NNV6BI2Y.cjs.map} +1 -1
- package/dist/{chunk-6A76JI5S.js → chunk-PQYP7GQ5.js} +3 -3
- package/dist/{chunk-6A76JI5S.js.map → chunk-PQYP7GQ5.js.map} +1 -1
- package/dist/{chunk-HSAITG44.js → chunk-PX7T4PC6.js} +3 -3
- package/dist/{chunk-HSAITG44.js.map → chunk-PX7T4PC6.js.map} +1 -1
- package/dist/{chunk-SAIICI7H.cjs → chunk-RSDFW5HF.cjs} +389 -389
- package/dist/{chunk-SAIICI7H.cjs.map → chunk-RSDFW5HF.cjs.map} +1 -1
- package/dist/{chunk-SMR6DHFJ.js → chunk-RVIBAGE6.js} +3 -3
- package/dist/{chunk-SMR6DHFJ.js.map → chunk-RVIBAGE6.js.map} +1 -1
- package/dist/{chunk-LEGBLENH.js → chunk-SHGUKDQZ.js} +6 -6
- package/dist/{chunk-LEGBLENH.js.map → chunk-SHGUKDQZ.js.map} +1 -1
- package/dist/{chunk-CG6L7CTT.js → chunk-UDNQPUQT.js} +16 -9
- package/dist/chunk-UDNQPUQT.js.map +1 -0
- package/dist/{chunk-FAELCC5F.cjs → chunk-UHNI2YJT.cjs} +59 -59
- package/dist/{chunk-FAELCC5F.cjs.map → chunk-UHNI2YJT.cjs.map} +1 -1
- package/dist/{chunk-L53QFD2S.cjs → chunk-W6CUCCSU.cjs} +224 -224
- package/dist/{chunk-L53QFD2S.cjs.map → chunk-W6CUCCSU.cjs.map} +1 -1
- package/dist/{chunk-EST7RKR7.cjs → chunk-X3QQBZTZ.cjs} +3 -3
- package/dist/chunk-X3QQBZTZ.cjs.map +1 -0
- package/dist/{chunk-KEDXZSM5.cjs → chunk-X6QCOFLV.cjs} +5 -5
- package/dist/{chunk-KEDXZSM5.cjs.map → chunk-X6QCOFLV.cjs.map} +1 -1
- package/dist/{chunk-APBJDSFX.cjs → chunk-XCHWDKHQ.cjs} +80 -72
- package/dist/chunk-XCHWDKHQ.cjs.map +1 -0
- package/dist/{chunk-IFKB6ZQS.js → chunk-Y54HBV7I.js} +4 -4
- package/dist/{chunk-IFKB6ZQS.js.map → chunk-Y54HBV7I.js.map} +1 -1
- package/dist/{chunk-GPT5SQXO.js → chunk-ZJC3HACG.js} +3 -3
- package/dist/{chunk-GPT5SQXO.js.map → chunk-ZJC3HACG.js.map} +1 -1
- package/dist/datasets/index.cjs +11 -11
- package/dist/datasets/index.js +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +177 -177
- package/dist/docs/references/docs-memory-observational-memory.md +3 -3
- package/dist/docs/references/reference-tools-mcp-client.md +32 -0
- package/dist/docs/references/reference-tools-mcp-server.md +64 -0
- package/dist/evals/index.cjs +6 -6
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +9 -9
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.js +7 -7
- package/dist/harness/index.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/provider-types.generated.d.ts +19 -15
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-CENQLMA6.js +3 -0
- package/dist/{mastra-P7D6XEYW.js.map → mastra-CENQLMA6.js.map} +1 -1
- package/dist/mastra-PJ7PYLZ6.cjs +12 -0
- package/dist/{mastra-INQ6GNG4.cjs.map → mastra-PJ7PYLZ6.cjs.map} +1 -1
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.d.ts +33 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/memory/index.cjs +19 -19
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-5SC3L3PB.js +3 -0
- package/dist/{models-dev-BLHW7AM7.js.map → models-dev-5SC3L3PB.js.map} +1 -1
- package/dist/models-dev-WOAKARBQ.cjs +12 -0
- package/dist/{models-dev-4MLGR5B2.cjs.map → models-dev-WOAKARBQ.cjs.map} +1 -1
- package/dist/netlify-ILOH4ELW.cjs +12 -0
- package/dist/{netlify-CVSZUJTB.cjs.map → netlify-ILOH4ELW.cjs.map} +1 -1
- package/dist/netlify-MWWN7KT6.js +3 -0
- package/dist/{netlify-O33IHBMM.js.map → netlify-MWWN7KT6.js.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +51 -51
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-4SRAXFDR.cjs +44 -0
- package/dist/{provider-registry-JFMEYRW2.cjs.map → provider-registry-4SRAXFDR.cjs.map} +1 -1
- package/dist/provider-registry-F6SO6FHQ.js +3 -0
- package/dist/{provider-registry-QNY4B7KD.js.map → provider-registry-F6SO6FHQ.js.map} +1 -1
- package/dist/provider-registry.json +60 -52
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/runner-AUMIO4LP.cjs +16 -0
- package/dist/{runner-QFYUIEKV.cjs.map → runner-AUMIO4LP.cjs.map} +1 -1
- package/dist/runner-XMNVMZFT.js +3 -0
- package/dist/{runner-CLVA3GWS.js.map → runner-XMNVMZFT.js.map} +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/handlers/entry.d.ts.map +1 -1
- package/dist/workflows/index.cjs +28 -28
- package/dist/workflows/index.js +1 -1
- package/package.json +10 -10
- package/src/llm/model/provider-types.generated.d.ts +19 -15
- package/dist/chunk-4VYOBEPT.cjs.map +0 -1
- package/dist/chunk-52UBCOSR.js.map +0 -1
- package/dist/chunk-APBJDSFX.cjs.map +0 -1
- package/dist/chunk-CG6L7CTT.js.map +0 -1
- package/dist/chunk-EST7RKR7.cjs.map +0 -1
- package/dist/chunk-KMPDWFMV.js.map +0 -1
- package/dist/chunk-PQRH3PWI.cjs.map +0 -1
- package/dist/chunk-XGYB6VEV.js.map +0 -1
- package/dist/mastra-INQ6GNG4.cjs +0 -12
- package/dist/mastra-P7D6XEYW.js +0 -3
- package/dist/models-dev-4MLGR5B2.cjs +0 -12
- package/dist/models-dev-BLHW7AM7.js +0 -3
- package/dist/netlify-CVSZUJTB.cjs +0 -12
- package/dist/netlify-O33IHBMM.js +0 -3
- package/dist/provider-registry-JFMEYRW2.cjs +0 -44
- package/dist/provider-registry-QNY4B7KD.js +0 -3
- package/dist/runner-CLVA3GWS.js +0 -3
- package/dist/runner-QFYUIEKV.cjs +0 -16
|
@@ -24,7 +24,7 @@ export const agent = new Agent({
|
|
|
24
24
|
})
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
That's it. The agent now has humanlike long-term memory that persists across conversations. Setting `observationalMemory: true` uses `google/gemini-2.5-flash` by default.
|
|
27
|
+
That's it. The agent now has humanlike long-term memory that persists across conversations. Setting `observationalMemory: true` uses `google/gemini-2.5-flash` by default. Config objects also use this model unless you set a different one. To use a different model, pass it in the config object:
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
30
|
const memory = new Memory({
|
|
@@ -44,7 +44,7 @@ See [configuration options](https://mastra.ai/reference/memory/observational-mem
|
|
|
44
44
|
>
|
|
45
45
|
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/guides/build-your-ui/ai-sdk-ui).
|
|
46
46
|
|
|
47
|
-
> **Note:** OM currently only supports `@mastra/pg`, `@mastra/libsql`, and `@mastra/mongodb` storage adapters. It uses background agents for managing memory. When
|
|
47
|
+
> **Note:** OM currently only supports `@mastra/pg`, `@mastra/libsql`, and `@mastra/mongodb` storage adapters. It uses background agents for managing memory. When no model is set, the default model is `google/gemini-2.5-flash`.
|
|
48
48
|
|
|
49
49
|
## Temporal gap markers
|
|
50
50
|
|
|
@@ -212,7 +212,7 @@ The progress bars update live while the agent is observing or reflecting, showin
|
|
|
212
212
|
|
|
213
213
|
## Models
|
|
214
214
|
|
|
215
|
-
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
|
|
215
|
+
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 no model is set, the default model is `google/gemini-2.5-flash`.
|
|
216
216
|
|
|
217
217
|
Generally speaking, we recommend using a model that has a large context window (128K+ tokens) and is fast enough to run in the background without slowing down your actions.
|
|
218
218
|
|
|
@@ -126,6 +126,38 @@ Disconnects from all MCP servers and cleans up resources.
|
|
|
126
126
|
async disconnect(): Promise<void>
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
### `toMCPServerProxies()`
|
|
130
|
+
|
|
131
|
+
Returns a map of `MCPClientServerProxy` instances, one per configured server. Each proxy wraps the underlying client connection as an `MCPServerBase` instance, allowing external (non-Mastra) MCP servers to be registered in `mcpServers` and appear in Studio.
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
async toMCPServerProxies(): Promise<Record<string, MCPClientServerProxy>>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Spread the result into the `mcpServers` config on `Mastra`:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
141
|
+
import { MCPClient } from '@mastra/mcp'
|
|
142
|
+
|
|
143
|
+
const mcpClient = new MCPClient({
|
|
144
|
+
servers: {
|
|
145
|
+
'color-mixer': {
|
|
146
|
+
command: 'node',
|
|
147
|
+
args: ['path/to/color-mixer-server.js'],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
export const mastra = new Mastra({
|
|
153
|
+
mcpServers: {
|
|
154
|
+
...(await mcpClient.toMCPServerProxies()),
|
|
155
|
+
},
|
|
156
|
+
})
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
This is useful for connecting external MCP servers that implement the MCP Apps extension or other features to Studio without wrapping them in a Mastra `MCPServer`.
|
|
160
|
+
|
|
129
161
|
### `resources` Property
|
|
130
162
|
|
|
131
163
|
The `MCPClient` instance has a `resources` property that provides access to resource-related operations.
|
|
@@ -83,6 +83,8 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
|
|
|
83
83
|
|
|
84
84
|
**prompts** (`MCPServerPrompts`): An object defining how the server should handle MCP prompts. See Prompt Handling section for details.
|
|
85
85
|
|
|
86
|
+
**appResources** (`AppResources`): A map of \`ui://\` URIs to app resource configurations. Each entry defines an interactive HTML UI served via the MCP Apps extension (SEP-1865). See the MCP Apps section for details.
|
|
87
|
+
|
|
86
88
|
## Exposing agents as tools
|
|
87
89
|
|
|
88
90
|
A powerful feature of `MCPServer` is its ability to automatically expose your Mastra Agents as callable tools. When you provide agents in the `agents` property of the configuration:
|
|
@@ -1263,6 +1265,68 @@ app.all('/mcp', async (req, res) => {
|
|
|
1263
1265
|
app.listen(3000)
|
|
1264
1266
|
```
|
|
1265
1267
|
|
|
1268
|
+
## MCP Apps (`appResources`)
|
|
1269
|
+
|
|
1270
|
+
The `appResources` option lets you serve interactive HTML UIs from your MCP server via the [MCP Apps extension](https://github.com/modelcontextprotocol/ext-apps). Each entry maps a `ui://` URI to an HTML app that renders in a sandboxed iframe in Mastra Studio.
|
|
1271
|
+
|
|
1272
|
+
### `AppResources` type
|
|
1273
|
+
|
|
1274
|
+
**Key (URI)** (`string`): A \`ui://\` URI that identifies the app resource (e.g., \`ui://calculator/main\`).
|
|
1275
|
+
|
|
1276
|
+
Each value is an `AppResource` object:
|
|
1277
|
+
|
|
1278
|
+
**name** (`string`): Display name for the UI resource.
|
|
1279
|
+
|
|
1280
|
+
**description** (`string`): Optional description of the UI resource.
|
|
1281
|
+
|
|
1282
|
+
**html** (`string`): Inline HTML content for the UI. Provide either \`html\` or \`htmlPath\`.
|
|
1283
|
+
|
|
1284
|
+
**htmlPath** (`string`): Path to an HTML file. Resolved at server startup. Provide either \`html\` or \`htmlPath\`.
|
|
1285
|
+
|
|
1286
|
+
**meta** (`McpUiResourceMeta`): UI resource metadata (CSP, permissions, rendering preferences) from the official ext-apps SDK.
|
|
1287
|
+
|
|
1288
|
+
### Example
|
|
1289
|
+
|
|
1290
|
+
```typescript
|
|
1291
|
+
import { MCPServer } from '@mastra/mcp'
|
|
1292
|
+
import { createTool } from '@mastra/core/tools'
|
|
1293
|
+
import { z } from 'zod'
|
|
1294
|
+
|
|
1295
|
+
const calculatorTool = createTool({
|
|
1296
|
+
id: 'calculatorWithUI',
|
|
1297
|
+
description: 'An interactive calculator',
|
|
1298
|
+
inputSchema: z.object({
|
|
1299
|
+
num1: z.number(),
|
|
1300
|
+
num2: z.number(),
|
|
1301
|
+
operation: z.enum(['add', 'subtract']),
|
|
1302
|
+
}),
|
|
1303
|
+
execute: async ({ num1, num2, operation }) => {
|
|
1304
|
+
const result = operation === 'add' ? num1 + num2 : num1 - num2
|
|
1305
|
+
return {
|
|
1306
|
+
content: [{ type: 'text', text: 'An interactive calculator is displayed.' }],
|
|
1307
|
+
structuredContent: { result },
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
})
|
|
1311
|
+
|
|
1312
|
+
const server = new MCPServer({
|
|
1313
|
+
id: 'app-server',
|
|
1314
|
+
name: 'App Server',
|
|
1315
|
+
version: '1.0.0',
|
|
1316
|
+
tools: { calculatorTool },
|
|
1317
|
+
appResources: {
|
|
1318
|
+
'ui://calculator/main': {
|
|
1319
|
+
name: 'Interactive Calculator',
|
|
1320
|
+
html: '<html><body><h2>Calculator</h2>...</body></html>',
|
|
1321
|
+
},
|
|
1322
|
+
},
|
|
1323
|
+
})
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
Link a tool to its app resource by setting `_meta.ui.resourceUri` on the tool to the matching `ui://` URI. The server auto-normalizes this metadata when registering tools.
|
|
1327
|
+
|
|
1328
|
+
> **Note:** Visit [MCP Apps](https://mastra.ai/docs/mcp/mcp-apps) for the full app bridge API and usage patterns.
|
|
1329
|
+
|
|
1266
1330
|
## Related information
|
|
1267
1331
|
|
|
1268
1332
|
- For connecting to MCP servers in Mastra, see the [MCPClient documentation](https://mastra.ai/reference/tools/mcp-client).
|
package/dist/evals/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkX6QCOFLV_cjs = require('../chunk-X6QCOFLV.cjs');
|
|
4
|
+
var chunk3DIJ3TQS_cjs = require('../chunk-3DIJ3TQS.cjs');
|
|
5
5
|
var chunkXXKOQCB4_cjs = require('../chunk-XXKOQCB4.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "runEvals", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkX6QCOFLV_cjs.runEvals; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "MastraScorer", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk3DIJ3TQS_cjs.MastraScorer; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createScorer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunk3DIJ3TQS_cjs.createScorer; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "filterRun", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunk3DIJ3TQS_cjs.filterRun; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "extractTrajectory", {
|
|
26
26
|
enumerable: true,
|
package/dist/evals/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { runEvals } from '../chunk-
|
|
2
|
-
export { MastraScorer, createScorer, filterRun } from '../chunk-
|
|
1
|
+
export { runEvals } from '../chunk-ZJC3HACG.js';
|
|
2
|
+
export { MastraScorer, createScorer, filterRun } from '../chunk-4FQ5HEEG.js';
|
|
3
3
|
export { extractTrajectory, extractTrajectoryFromTrace, extractWorkflowTrajectory, listScoresResponseSchema, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema } from '../chunk-6HX3NKCA.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
|
|
3
|
+
var chunkUHNI2YJT_cjs = require('../../chunk-UHNI2YJT.cjs');
|
|
4
4
|
var chunkXXKOQCB4_cjs = require('../../chunk-XXKOQCB4.cjs');
|
|
5
5
|
var chunk5IS5R433_cjs = require('../../chunk-5IS5R433.cjs');
|
|
6
6
|
var chunk4U7ZLI36_cjs = require('../../chunk-4U7ZLI36.cjs');
|
|
@@ -234,7 +234,7 @@ function transformTraceToScorerInputAndOutput(trace) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// src/evals/scoreTraces/scoreTracesWorkflow.ts
|
|
237
|
-
var getTraceStep =
|
|
237
|
+
var getTraceStep = chunkUHNI2YJT_cjs.createStep({
|
|
238
238
|
id: "__process-trace-scoring",
|
|
239
239
|
inputSchema: v4.z.object({
|
|
240
240
|
targets: v4.z.array(
|
|
@@ -429,7 +429,7 @@ async function attachScoreToSpan({
|
|
|
429
429
|
} catch {
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
var scoreTracesWorkflow =
|
|
432
|
+
var scoreTracesWorkflow = chunkUHNI2YJT_cjs.createWorkflow({
|
|
433
433
|
id: "__batch-scoring-traces",
|
|
434
434
|
inputSchema: v4.z.object({
|
|
435
435
|
targets: v4.z.array(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createStep, createWorkflow } from '../../chunk-
|
|
1
|
+
import { createStep, createWorkflow } from '../../chunk-PQYP7GQ5.js';
|
|
2
2
|
import { saveScorePayloadSchema } from '../../chunk-6HX3NKCA.js';
|
|
3
3
|
import { getEntityTypeForSpan } from '../../chunk-DCLOP22D.js';
|
|
4
4
|
import { MastraError } from '../../chunk-FJEVLHJT.js';
|
package/dist/harness/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkK6PAVEJM_cjs = require('../chunk-K6PAVEJM.cjs');
|
|
4
|
+
var chunk3DIJ3TQS_cjs = require('../chunk-3DIJ3TQS.cjs');
|
|
5
5
|
var chunk5ANWVE3P_cjs = require('../chunk-5ANWVE3P.cjs');
|
|
6
6
|
var chunkRJK2C4PL_cjs = require('../chunk-RJK2C4PL.cjs');
|
|
7
7
|
var chunkM4KUR53T_cjs = require('../chunk-M4KUR53T.cjs');
|
|
@@ -610,7 +610,7 @@ ${FORKED_SUBAGENT_NESTING_NOTICE}`;
|
|
|
610
610
|
isError: true
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
subagentToRun = new
|
|
613
|
+
subagentToRun = new chunk3DIJ3TQS_cjs.Agent({
|
|
614
614
|
id: `subagent-${definition.id}`,
|
|
615
615
|
name: `${definition.name} Subagent`,
|
|
616
616
|
instructions: definition.instructions,
|
|
@@ -907,7 +907,7 @@ var Harness = class {
|
|
|
907
907
|
*/
|
|
908
908
|
async init() {
|
|
909
909
|
if (this.config.storage) {
|
|
910
|
-
this.#internalMastra = new
|
|
910
|
+
this.#internalMastra = new chunkK6PAVEJM_cjs.Mastra({
|
|
911
911
|
logger: false,
|
|
912
912
|
storage: this.config.storage,
|
|
913
913
|
...this.config.observability ? { observability: this.config.observability } : {}
|
|
@@ -1167,7 +1167,7 @@ var Harness = class {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
try {
|
|
1170
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1170
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-4SRAXFDR.cjs');
|
|
1171
1171
|
const registry = PROVIDER_REGISTRY;
|
|
1172
1172
|
const providerConfig = registry[provider];
|
|
1173
1173
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -1187,7 +1187,7 @@ var Harness = class {
|
|
|
1187
1187
|
*/
|
|
1188
1188
|
async listAvailableModels() {
|
|
1189
1189
|
try {
|
|
1190
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1190
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-4SRAXFDR.cjs');
|
|
1191
1191
|
if (!PROVIDER_REGISTRY) return [];
|
|
1192
1192
|
const registry = PROVIDER_REGISTRY;
|
|
1193
1193
|
const providers = Object.keys(registry);
|
|
@@ -1246,7 +1246,7 @@ var Harness = class {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
async getProviderApiKeyEnvVar(provider) {
|
|
1248
1248
|
try {
|
|
1249
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1249
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-4SRAXFDR.cjs');
|
|
1250
1250
|
const registry = PROVIDER_REGISTRY;
|
|
1251
1251
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
1252
1252
|
return Array.isArray(envVars) ? envVars[0] : envVars;
|
|
@@ -2136,9 +2136,9 @@ ${textContent}
|
|
|
2136
2136
|
case "image": {
|
|
2137
2137
|
const imgData = typeof part.data === "string" ? part.data : typeof part.image === "string" ? part.image : "";
|
|
2138
2138
|
content.push({
|
|
2139
|
-
type: "
|
|
2139
|
+
type: "image",
|
|
2140
2140
|
data: imgData,
|
|
2141
|
-
|
|
2141
|
+
mimeType: part.mimeType ?? part.mediaType ?? "image/png"
|
|
2142
2142
|
});
|
|
2143
2143
|
break;
|
|
2144
2144
|
}
|