@mastra/core 1.28.0-alpha.2 → 1.29.0-alpha.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 +99 -0
- package/dist/agent/index.cjs +8 -8
- 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-DBFA5FFU.js → chunk-2WNYRCWK.js} +4 -4
- package/dist/{chunk-DBFA5FFU.js.map → chunk-2WNYRCWK.js.map} +1 -1
- package/dist/{chunk-P3NIJCXP.js → chunk-5GVFP3V6.js} +3 -3
- package/dist/{chunk-P3NIJCXP.js.map → chunk-5GVFP3V6.js.map} +1 -1
- package/dist/{chunk-VQFQWMV7.js → chunk-6DOVWPAU.js} +3 -3
- package/dist/{chunk-VQFQWMV7.js.map → chunk-6DOVWPAU.js.map} +1 -1
- package/dist/{chunk-DMW3LDAI.cjs → chunk-6ETCJK3W.cjs} +12 -12
- package/dist/{chunk-DMW3LDAI.cjs.map → chunk-6ETCJK3W.cjs.map} +1 -1
- package/dist/{chunk-MXEZNKLZ.js → chunk-B324CLR7.js} +10 -10
- package/dist/chunk-B324CLR7.js.map +1 -0
- package/dist/{chunk-N7CW7X7O.cjs → chunk-B5Q34N4E.cjs} +57 -57
- package/dist/{chunk-N7CW7X7O.cjs.map → chunk-B5Q34N4E.cjs.map} +1 -1
- package/dist/{chunk-3SZVQUBS.js → chunk-BZRB4HM2.js} +3 -3
- package/dist/{chunk-3SZVQUBS.js.map → chunk-BZRB4HM2.js.map} +1 -1
- package/dist/{chunk-E4RRAOSG.js → chunk-CSE22KG6.js} +3 -3
- package/dist/{chunk-E4RRAOSG.js.map → chunk-CSE22KG6.js.map} +1 -1
- package/dist/{chunk-TZSQJYUS.js → chunk-EMZ6DHQM.js} +3 -3
- package/dist/{chunk-TZSQJYUS.js.map → chunk-EMZ6DHQM.js.map} +1 -1
- package/dist/{chunk-Y5NA6WRH.js → chunk-FRRSKGPV.js} +3 -3
- package/dist/{chunk-Y5NA6WRH.js.map → chunk-FRRSKGPV.js.map} +1 -1
- package/dist/{chunk-UCKYFOS5.js → chunk-H5AP7SA5.js} +4 -4
- package/dist/{chunk-UCKYFOS5.js.map → chunk-H5AP7SA5.js.map} +1 -1
- package/dist/{chunk-NPZNOCIW.js → chunk-HEG6Q72X.js} +9 -9
- package/dist/{chunk-NPZNOCIW.js.map → chunk-HEG6Q72X.js.map} +1 -1
- package/dist/{chunk-I543JILY.cjs → chunk-I2S3Y4U7.cjs} +224 -224
- package/dist/{chunk-I543JILY.cjs.map → chunk-I2S3Y4U7.cjs.map} +1 -1
- package/dist/{chunk-6BLLC4MN.cjs → chunk-L5EYDYLZ.cjs} +17 -17
- package/dist/{chunk-6BLLC4MN.cjs.map → chunk-L5EYDYLZ.cjs.map} +1 -1
- package/dist/{chunk-FD4ZS5ZQ.cjs → chunk-MRMZAZQD.cjs} +7 -7
- package/dist/{chunk-FD4ZS5ZQ.cjs.map → chunk-MRMZAZQD.cjs.map} +1 -1
- package/dist/{chunk-SQYHPB7J.js → chunk-NB6W7IEZ.js} +6 -6
- package/dist/{chunk-SQYHPB7J.js.map → chunk-NB6W7IEZ.js.map} +1 -1
- package/dist/{chunk-KRYM6L4L.cjs → chunk-P6467VXB.cjs} +3 -3
- package/dist/{chunk-KRYM6L4L.cjs.map → chunk-P6467VXB.cjs.map} +1 -1
- package/dist/{chunk-2AP476XO.cjs → chunk-R4UVRKHN.cjs} +6 -6
- package/dist/{chunk-2AP476XO.cjs.map → chunk-R4UVRKHN.cjs.map} +1 -1
- package/dist/{chunk-LEWSZH4C.cjs → chunk-RKLQTQOB.cjs} +292 -292
- package/dist/{chunk-LEWSZH4C.cjs.map → chunk-RKLQTQOB.cjs.map} +1 -1
- package/dist/{chunk-FZMZVECM.cjs → chunk-VYPZBFXU.cjs} +9 -9
- package/dist/{chunk-FZMZVECM.cjs.map → chunk-VYPZBFXU.cjs.map} +1 -1
- package/dist/{chunk-CHT6QEL4.cjs → chunk-W4HRUHDQ.cjs} +22 -22
- package/dist/chunk-W4HRUHDQ.cjs.map +1 -0
- package/dist/{chunk-MROYKU4N.cjs → chunk-YDYSKY2G.cjs} +5 -5
- package/dist/{chunk-MROYKU4N.cjs.map → chunk-YDYSKY2G.cjs.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 +131 -131
- package/dist/docs/references/docs-agents-structured-output.md +44 -1
- package/dist/docs/references/docs-agents-using-tools.md +72 -0
- package/dist/docs/references/docs-browser-overview.md +2 -0
- package/dist/docs/references/docs-evals-custom-scorers.md +1 -1
- package/dist/docs/references/docs-evals-datasets-overview.md +1 -1
- package/dist/docs/references/docs-memory-working-memory.md +1 -1
- package/dist/docs/references/docs-server-request-context.md +1 -1
- package/dist/docs/references/docs-workflows-agents-and-tools.md +1 -1
- package/dist/docs/references/docs-workflows-overview.md +105 -4
- package/dist/docs/references/reference-agents-agent.md +1 -1
- package/dist/docs/references/reference-agents-generate.md +1 -1
- package/dist/docs/references/reference-browser-mastra-browser.md +2 -1
- package/dist/docs/references/reference-client-js-agents.md +20 -0
- package/dist/docs/references/reference-datasets-create.md +4 -4
- package/dist/docs/references/reference-datasets-update.md +4 -4
- package/dist/docs/references/reference-evals-create-scorer.md +3 -3
- package/dist/docs/references/reference-harness-harness-class.md +1 -1
- package/dist/docs/references/reference-tools-create-tool.md +77 -5
- package/dist/docs/references/reference-workflows-step.md +88 -7
- package/dist/docs/references/reference-workflows-workflow.md +72 -4
- package/dist/evals/index.cjs +5 -5
- 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 +7 -7
- package/dist/harness/index.js +5 -5
- 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 +1 -1
- 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.js +1 -1
- package/dist/mastra-PHWJK3KT.cjs +12 -0
- package/dist/{mastra-IMLAZTS5.cjs.map → mastra-PHWJK3KT.cjs.map} +1 -1
- package/dist/mastra-QLKW7VLH.js +3 -0
- package/dist/{mastra-EWMYVECQ.js.map → mastra-QLKW7VLH.js.map} +1 -1
- package/dist/memory/index.cjs +19 -19
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-BR33IUXC.cjs +12 -0
- package/dist/{models-dev-LKRGA326.cjs.map → models-dev-BR33IUXC.cjs.map} +1 -1
- package/dist/models-dev-KZPYP6KI.js +3 -0
- package/dist/{models-dev-3WFCNENU.js.map → models-dev-KZPYP6KI.js.map} +1 -1
- package/dist/netlify-MK3ONPAY.js +3 -0
- package/dist/{netlify-WQY6BKSQ.js.map → netlify-MK3ONPAY.js.map} +1 -1
- package/dist/netlify-PWTSQ3KM.cjs +12 -0
- package/dist/{netlify-SUH6DXO2.cjs.map → netlify-PWTSQ3KM.cjs.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +45 -45
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-35PCPXZ4.cjs +44 -0
- package/dist/{provider-registry-EAGCWXQH.cjs.map → provider-registry-35PCPXZ4.cjs.map} +1 -1
- package/dist/provider-registry-PSSGSG2N.js +3 -0
- package/dist/{provider-registry-JQC6Y3JI.js.map → provider-registry-PSSGSG2N.js.map} +1 -1
- package/dist/provider-registry.json +2 -2
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/stream/index.cjs +8 -8
- 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/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/package.json +9 -9
- package/src/llm/model/provider-types.generated.d.ts +1 -1
- package/dist/chunk-CHT6QEL4.cjs.map +0 -1
- package/dist/chunk-MXEZNKLZ.js.map +0 -1
- package/dist/mastra-EWMYVECQ.js +0 -3
- package/dist/mastra-IMLAZTS5.cjs +0 -12
- package/dist/models-dev-3WFCNENU.js +0 -3
- package/dist/models-dev-LKRGA326.cjs +0 -12
- package/dist/netlify-SUH6DXO2.cjs +0 -12
- package/dist/netlify-WQY6BKSQ.js +0 -3
- package/dist/provider-registry-EAGCWXQH.cjs +0 -44
- package/dist/provider-registry-JQC6Y3JI.js +0 -3
|
@@ -26,6 +26,87 @@ const step1 = createStep({
|
|
|
26
26
|
})
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
## Define schemas
|
|
30
|
+
|
|
31
|
+
You can define the step's `inputSchema` and `outputSchema` with any library that supports [Standard JSON Schema](https://standardschema.dev/json-schema). This includes libraries like [Zod](https://zod.dev/), [Valibot](https://valibot.dev/), and [ArkType](https://arktype.io/).
|
|
32
|
+
|
|
33
|
+
**Zod**:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { createStep } from '@mastra/core/workflows'
|
|
37
|
+
import { z } from 'zod'
|
|
38
|
+
|
|
39
|
+
const step1 = createStep({
|
|
40
|
+
id: 'step-1',
|
|
41
|
+
inputSchema: z.object({
|
|
42
|
+
message: z.string(),
|
|
43
|
+
}),
|
|
44
|
+
outputSchema: z.object({
|
|
45
|
+
formatted: z.string(),
|
|
46
|
+
}),
|
|
47
|
+
execute: async ({ inputData }) => {
|
|
48
|
+
const { message } = inputData
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
formatted: message.toUpperCase(),
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Valibot**:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { createStep } from '@mastra/core/workflows'
|
|
61
|
+
import * as v from 'valibot'
|
|
62
|
+
import { toStandardJsonSchema } from '@valibot/to-json-schema'
|
|
63
|
+
|
|
64
|
+
const step1 = createStep({
|
|
65
|
+
id: 'step-1',
|
|
66
|
+
inputSchema: toStandardJsonSchema(
|
|
67
|
+
v.object({
|
|
68
|
+
message: v.string(),
|
|
69
|
+
}),
|
|
70
|
+
),
|
|
71
|
+
outputSchema: toStandardJsonSchema(
|
|
72
|
+
v.object({
|
|
73
|
+
formatted: v.string(),
|
|
74
|
+
}),
|
|
75
|
+
),
|
|
76
|
+
execute: async ({ inputData }) => {
|
|
77
|
+
const { message } = inputData
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
formatted: message.toUpperCase(),
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**ArkType**:
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { createStep } from '@mastra/core/workflows'
|
|
90
|
+
import { type } from 'arktype'
|
|
91
|
+
|
|
92
|
+
const step1 = createStep({
|
|
93
|
+
id: 'step-1',
|
|
94
|
+
inputSchema: type({
|
|
95
|
+
message: 'string',
|
|
96
|
+
}),
|
|
97
|
+
outputSchema: type({
|
|
98
|
+
formatted: 'string',
|
|
99
|
+
}),
|
|
100
|
+
execute: async ({ inputData }) => {
|
|
101
|
+
const { message } = inputData
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
formatted: message.toUpperCase(),
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
})
|
|
108
|
+
```
|
|
109
|
+
|
|
29
110
|
## Creating steps from agents
|
|
30
111
|
|
|
31
112
|
You can create a step directly from an agent. The step will use the agent's name as its ID.
|
|
@@ -60,7 +141,7 @@ const agentStep = createStep(testAgent, {
|
|
|
60
141
|
|
|
61
142
|
### Agent step options
|
|
62
143
|
|
|
63
|
-
**structuredOutput** (`{ schema:
|
|
144
|
+
**structuredOutput** (`{ schema: StandardJSONSchemaV1 }`): When provided, the agent returns structured data matching this schema instead of plain text. The step's outputSchema is set to the provided schema.
|
|
64
145
|
|
|
65
146
|
**onFinish** (`(result: AgentResult) => void`): Callback invoked when the agent completes generation.
|
|
66
147
|
|
|
@@ -70,17 +151,17 @@ const agentStep = createStep(testAgent, {
|
|
|
70
151
|
|
|
71
152
|
**description** (`string`): Optional description of what the step does
|
|
72
153
|
|
|
73
|
-
**inputSchema** (`
|
|
154
|
+
**inputSchema** (`StandardJSONSchemaV1`): Standard JSON Schema defining the input structure
|
|
74
155
|
|
|
75
|
-
**outputSchema** (`
|
|
156
|
+
**outputSchema** (`StandardJSONSchemaV1`): Standard JSON Schema defining the output structure
|
|
76
157
|
|
|
77
|
-
**resumeSchema** (`
|
|
158
|
+
**resumeSchema** (`StandardJSONSchemaV1`): Optional Standard JSON Schema for resuming the step
|
|
78
159
|
|
|
79
|
-
**suspendSchema** (`
|
|
160
|
+
**suspendSchema** (`StandardJSONSchemaV1`): Optional Standard JSON Schema for suspending the step
|
|
80
161
|
|
|
81
|
-
**stateSchema** (`
|
|
162
|
+
**stateSchema** (`StandardJSONSchemaV1`): Optional Standard JSON Schema for the step state. Automatically injected when using Mastra's state system. The stateSchema must be a subset of the workflow's stateSchema. If not specified, type is 'any'.
|
|
82
163
|
|
|
83
|
-
**requestContextSchema** (`
|
|
164
|
+
**requestContextSchema** (`StandardJSONSchemaV1`): Standard JSON Schema for validating request context values. When provided, the context is validated before the step's execute() runs, failing the step if validation fails.
|
|
84
165
|
|
|
85
166
|
**execute** (`(params: ExecuteParams) => Promise<any>`): Async function containing step logic
|
|
86
167
|
|
|
@@ -19,17 +19,85 @@ export const workflow = createWorkflow({
|
|
|
19
19
|
})
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
## Define schemas
|
|
23
|
+
|
|
24
|
+
You can define the workflow's `inputSchema` and `outputSchema` with any library that supports [Standard JSON Schema](https://standardschema.dev/json-schema). This includes libraries like [Zod](https://zod.dev/), [Valibot](https://valibot.dev/), and [ArkType](https://arktype.io/).
|
|
25
|
+
|
|
26
|
+
**Zod**:
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { createWorkflow, createStep } from "@mastra/core/workflows";
|
|
30
|
+
import { z } from "zod";
|
|
31
|
+
|
|
32
|
+
const step1 = createStep({...});
|
|
33
|
+
|
|
34
|
+
export const testWorkflow = createWorkflow({
|
|
35
|
+
id: "test-workflow",
|
|
36
|
+
inputSchema: z.object({
|
|
37
|
+
message: z.string()
|
|
38
|
+
}),
|
|
39
|
+
outputSchema: z.object({
|
|
40
|
+
output: z.string()
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
.then(step1)
|
|
44
|
+
.commit();
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Valibot**:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { createWorkflow, createStep } from "@mastra/core/workflows";
|
|
51
|
+
import * as v from "valibot";
|
|
52
|
+
import { toStandardJsonSchema } from "@valibot/to-json-schema";
|
|
53
|
+
|
|
54
|
+
const step1 = createStep({...});
|
|
55
|
+
|
|
56
|
+
export const testWorkflow = createWorkflow({
|
|
57
|
+
id: "test-workflow",
|
|
58
|
+
inputSchema: toStandardJsonSchema(v.object({
|
|
59
|
+
message: v.string()
|
|
60
|
+
})),
|
|
61
|
+
outputSchema: toStandardJsonSchema(v.object({
|
|
62
|
+
output: v.string()
|
|
63
|
+
}))
|
|
64
|
+
})
|
|
65
|
+
.then(step1)
|
|
66
|
+
.commit();
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**ArkType**:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { createWorkflow, createStep } from "@mastra/core/workflows";
|
|
73
|
+
import { type } from "arktype";
|
|
74
|
+
|
|
75
|
+
const step1 = createStep({...});
|
|
76
|
+
|
|
77
|
+
export const testWorkflow = createWorkflow({
|
|
78
|
+
id: "test-workflow",
|
|
79
|
+
inputSchema: type({
|
|
80
|
+
message: "string"
|
|
81
|
+
}),
|
|
82
|
+
outputSchema: type({
|
|
83
|
+
output: "string"
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
.then(step1)
|
|
87
|
+
.commit();
|
|
88
|
+
```
|
|
89
|
+
|
|
22
90
|
## Constructor parameters
|
|
23
91
|
|
|
24
92
|
**id** (`string`): Unique identifier for the workflow
|
|
25
93
|
|
|
26
|
-
**inputSchema** (`
|
|
94
|
+
**inputSchema** (`StandardJSONSchemaV1`): Standard JSON Schema defining the input structure for the workflow
|
|
27
95
|
|
|
28
|
-
**outputSchema** (`
|
|
96
|
+
**outputSchema** (`StandardJSONSchemaV1`): Standard JSON Schema defining the output structure for the workflow
|
|
29
97
|
|
|
30
|
-
**stateSchema** (`
|
|
98
|
+
**stateSchema** (`StandardJSONSchemaV1`): Optional Standard JSON Schema for the workflow state. Automatically injected when using Mastra's state system. If not specified, type is 'any'.
|
|
31
99
|
|
|
32
|
-
**requestContextSchema** (`
|
|
100
|
+
**requestContextSchema** (`StandardJSONSchemaV1`): Standard JSON Schema for validating request context values. When provided, the context is validated at the start of run.start(), throwing an error if validation fails.
|
|
33
101
|
|
|
34
102
|
**options** (`WorkflowOptions`): Optional options for the workflow
|
|
35
103
|
|
package/dist/evals/index.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkYDYSKY2G_cjs = require('../chunk-YDYSKY2G.cjs');
|
|
4
|
+
var chunk6ETCJK3W_cjs = require('../chunk-6ETCJK3W.cjs');
|
|
5
5
|
var chunkSBWFQ2CA_cjs = require('../chunk-SBWFQ2CA.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 chunkYDYSKY2G_cjs.runEvals; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "MastraScorer", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk6ETCJK3W_cjs.MastraScorer; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createScorer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunk6ETCJK3W_cjs.createScorer; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "extractTrajectory", {
|
|
22
22
|
enumerable: true,
|
package/dist/evals/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { runEvals } from '../chunk-
|
|
2
|
-
export { MastraScorer, createScorer } from '../chunk-
|
|
1
|
+
export { runEvals } from '../chunk-BZRB4HM2.js';
|
|
2
|
+
export { MastraScorer, createScorer } from '../chunk-FRRSKGPV.js';
|
|
3
3
|
export { extractTrajectory, extractTrajectoryFromTrace, extractWorkflowTrajectory, listScoresResponseSchema, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema } from '../chunk-XV2GQXYR.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 chunkB5Q34N4E_cjs = require('../../chunk-B5Q34N4E.cjs');
|
|
4
4
|
var chunkSBWFQ2CA_cjs = require('../../chunk-SBWFQ2CA.cjs');
|
|
5
5
|
var chunk2NAHFM32_cjs = require('../../chunk-2NAHFM32.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 = chunkB5Q34N4E_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 = chunkB5Q34N4E_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-CSE22KG6.js';
|
|
2
2
|
import { saveScorePayloadSchema } from '../../chunk-XV2GQXYR.js';
|
|
3
3
|
import { getEntityTypeForSpan } from '../../chunk-YK76RFQG.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 chunkL5EYDYLZ_cjs = require('../chunk-L5EYDYLZ.cjs');
|
|
4
|
+
var chunk6ETCJK3W_cjs = require('../chunk-6ETCJK3W.cjs');
|
|
5
5
|
var chunk6PAHGAKC_cjs = require('../chunk-6PAHGAKC.cjs');
|
|
6
6
|
var chunk6ZYEOOKL_cjs = require('../chunk-6ZYEOOKL.cjs');
|
|
7
7
|
var chunkU7Z7GCXY_cjs = require('../chunk-U7Z7GCXY.cjs');
|
|
@@ -327,7 +327,7 @@ Use this tool when:
|
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
const workspace = context?.workspace;
|
|
330
|
-
const subagent = new
|
|
330
|
+
const subagent = new chunk6ETCJK3W_cjs.Agent({
|
|
331
331
|
id: `subagent-${definition.id}`,
|
|
332
332
|
name: `${definition.name} Subagent`,
|
|
333
333
|
instructions: definition.instructions,
|
|
@@ -596,7 +596,7 @@ var Harness = class {
|
|
|
596
596
|
*/
|
|
597
597
|
async init() {
|
|
598
598
|
if (this.config.storage) {
|
|
599
|
-
this.#internalMastra = new
|
|
599
|
+
this.#internalMastra = new chunkL5EYDYLZ_cjs.Mastra({ logger: false, storage: this.config.storage });
|
|
600
600
|
await this.#internalMastra.getStorage().init();
|
|
601
601
|
}
|
|
602
602
|
if (this.config.workspace && !this.workspaceInitialized && !this.workspaceFn) {
|
|
@@ -852,7 +852,7 @@ var Harness = class {
|
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
try {
|
|
855
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
855
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-35PCPXZ4.cjs');
|
|
856
856
|
const registry = PROVIDER_REGISTRY;
|
|
857
857
|
const providerConfig = registry[provider];
|
|
858
858
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -872,7 +872,7 @@ var Harness = class {
|
|
|
872
872
|
*/
|
|
873
873
|
async listAvailableModels() {
|
|
874
874
|
try {
|
|
875
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
875
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-35PCPXZ4.cjs');
|
|
876
876
|
if (!PROVIDER_REGISTRY) return [];
|
|
877
877
|
const registry = PROVIDER_REGISTRY;
|
|
878
878
|
const providers = Object.keys(registry);
|
|
@@ -931,7 +931,7 @@ var Harness = class {
|
|
|
931
931
|
}
|
|
932
932
|
async getProviderApiKeyEnvVar(provider) {
|
|
933
933
|
try {
|
|
934
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
934
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-35PCPXZ4.cjs');
|
|
935
935
|
const registry = PROVIDER_REGISTRY;
|
|
936
936
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
937
937
|
return Array.isArray(envVars) ? envVars[0] : envVars;
|
package/dist/harness/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Mastra } from '../chunk-
|
|
2
|
-
import { Agent } from '../chunk-
|
|
1
|
+
import { Mastra } from '../chunk-HEG6Q72X.js';
|
|
2
|
+
import { Agent } from '../chunk-FRRSKGPV.js';
|
|
3
3
|
import { Workspace, createWorkspaceTools } from '../chunk-VWQ2LYM3.js';
|
|
4
4
|
import { safeStringify } from '../chunk-XYWVTGZY.js';
|
|
5
5
|
import { createTool } from '../chunk-O3JJ5ZPY.js';
|
|
@@ -850,7 +850,7 @@ var Harness = class {
|
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
try {
|
|
853
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
853
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-PSSGSG2N.js');
|
|
854
854
|
const registry = PROVIDER_REGISTRY;
|
|
855
855
|
const providerConfig = registry[provider];
|
|
856
856
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -870,7 +870,7 @@ var Harness = class {
|
|
|
870
870
|
*/
|
|
871
871
|
async listAvailableModels() {
|
|
872
872
|
try {
|
|
873
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
873
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-PSSGSG2N.js');
|
|
874
874
|
if (!PROVIDER_REGISTRY) return [];
|
|
875
875
|
const registry = PROVIDER_REGISTRY;
|
|
876
876
|
const providers = Object.keys(registry);
|
|
@@ -929,7 +929,7 @@ var Harness = class {
|
|
|
929
929
|
}
|
|
930
930
|
async getProviderApiKeyEnvVar(provider) {
|
|
931
931
|
try {
|
|
932
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
932
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-PSSGSG2N.js');
|
|
933
933
|
const registry = PROVIDER_REGISTRY;
|
|
934
934
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
935
935
|
return Array.isArray(envVars) ? envVars[0] : envVars;
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkL5EYDYLZ_cjs = require('./chunk-L5EYDYLZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Mastra", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkL5EYDYLZ_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
package/dist/llm/index.cjs
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkRKLQTQOB_cjs = require('../chunk-RKLQTQOB.cjs');
|
|
4
|
+
var chunkW4HRUHDQ_cjs = require('../chunk-W4HRUHDQ.cjs');
|
|
5
|
+
var chunkI2S3Y4U7_cjs = require('../chunk-I2S3Y4U7.cjs');
|
|
6
|
+
var chunkVYPZBFXU_cjs = require('../chunk-VYPZBFXU.cjs');
|
|
7
|
+
var chunkP6467VXB_cjs = require('../chunk-P6467VXB.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "AzureOpenAIGateway", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkRKLQTQOB_cjs.AzureOpenAIGateway; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "EMBEDDING_MODELS", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkRKLQTQOB_cjs.EMBEDDING_MODELS; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "ModelRouterEmbeddingModel", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkRKLQTQOB_cjs.ModelRouterEmbeddingModel; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ModelRouterLanguageModel", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkRKLQTQOB_cjs.ModelRouterLanguageModel; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "defaultGateways", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkRKLQTQOB_cjs.defaultGateways; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "resolveModelConfig", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkRKLQTQOB_cjs.resolveModelConfig; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "GatewayRegistry", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkW4HRUHDQ_cjs.GatewayRegistry; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "MastraGateway", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkW4HRUHDQ_cjs.MastraGateway; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "PROVIDER_REGISTRY", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkW4HRUHDQ_cjs.PROVIDER_REGISTRY; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "getProviderConfig", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkW4HRUHDQ_cjs.getProviderConfig; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "parseModelString", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkW4HRUHDQ_cjs.parseModelString; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ModelsDevGateway", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkI2S3Y4U7_cjs.ModelsDevGateway; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "NetlifyGateway", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkVYPZBFXU_cjs.NetlifyGateway; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "GATEWAY_AUTH_HEADER", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkP6467VXB_cjs.GATEWAY_AUTH_HEADER; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "MastraModelGateway", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkP6467VXB_cjs.MastraModelGateway; }
|
|
70
70
|
});
|
|
71
71
|
//# sourceMappingURL=index.cjs.map
|
|
72
72
|
//# sourceMappingURL=index.cjs.map
|
package/dist/llm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { AzureOpenAIGateway, EMBEDDING_MODELS, ModelRouterEmbeddingModel, ModelRouterLanguageModel, defaultGateways, resolveModelConfig } from '../chunk-
|
|
2
|
-
export { GatewayRegistry, MastraGateway, PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-
|
|
3
|
-
export { ModelsDevGateway } from '../chunk-
|
|
4
|
-
export { NetlifyGateway } from '../chunk-
|
|
5
|
-
export { GATEWAY_AUTH_HEADER, MastraModelGateway } from '../chunk-
|
|
1
|
+
export { AzureOpenAIGateway, EMBEDDING_MODELS, ModelRouterEmbeddingModel, ModelRouterLanguageModel, defaultGateways, resolveModelConfig } from '../chunk-NB6W7IEZ.js';
|
|
2
|
+
export { GatewayRegistry, MastraGateway, PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-B324CLR7.js';
|
|
3
|
+
export { ModelsDevGateway } from '../chunk-EMZ6DHQM.js';
|
|
4
|
+
export { NetlifyGateway } from '../chunk-6DOVWPAU.js';
|
|
5
|
+
export { GATEWAY_AUTH_HEADER, MastraModelGateway } from '../chunk-5GVFP3V6.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -882,7 +882,7 @@ export type ProviderModelsMap = {
|
|
|
882
882
|
'MiniMax-M2.7-highspeed',
|
|
883
883
|
];
|
|
884
884
|
readonly perplexity: readonly ['sonar', 'sonar-deep-research', 'sonar-pro', 'sonar-reasoning-pro'];
|
|
885
|
-
readonly deepseek: readonly ['deepseek-chat', 'deepseek-reasoner'];
|
|
885
|
+
readonly deepseek: readonly ['deepseek-chat', 'deepseek-reasoner', 'deepseek-v4-flash', 'deepseek-v4-pro'];
|
|
886
886
|
readonly llama: readonly [
|
|
887
887
|
'cerebras-llama-4-maverick-17b-128e-instruct',
|
|
888
888
|
'cerebras-llama-4-scout-17b-16e-instruct',
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6ETCJK3W_cjs = require('../chunk-6ETCJK3W.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "createScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk6ETCJK3W_cjs.createScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "formatCheckFeedback", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk6ETCJK3W_cjs.formatCheckFeedback; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "formatCompletionFeedback", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk6ETCJK3W_cjs.formatCompletionFeedback; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "formatStreamCompletionFeedback", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk6ETCJK3W_cjs.formatStreamCompletionFeedback; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "formatValidationFeedback", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk6ETCJK3W_cjs.formatValidationFeedback; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "generateFinalResult", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk6ETCJK3W_cjs.generateFinalResult; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "generateStructuredFinalResult", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk6ETCJK3W_cjs.generateStructuredFinalResult; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "loop", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk6ETCJK3W_cjs.loop; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "runChecks", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk6ETCJK3W_cjs.runChecks; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "runCompletionScorers", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk6ETCJK3W_cjs.runCompletionScorers; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "runDefaultCompletionCheck", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunk6ETCJK3W_cjs.runDefaultCompletionCheck; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "runStreamCompletionScorers", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk6ETCJK3W_cjs.runStreamCompletionScorers; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "runValidation", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk6ETCJK3W_cjs.runValidation; }
|
|
58
58
|
});
|
|
59
59
|
//# sourceMappingURL=index.cjs.map
|
|
60
60
|
//# sourceMappingURL=index.cjs.map
|
package/dist/loop/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-
|
|
1
|
+
export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-FRRSKGPV.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/mastra/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkL5EYDYLZ_cjs = require('../chunk-L5EYDYLZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Mastra", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkL5EYDYLZ_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mastra/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkW4HRUHDQ_cjs = require('./chunk-W4HRUHDQ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "MastraGateway", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkW4HRUHDQ_cjs.MastraGateway; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=mastra-PHWJK3KT.cjs.map
|
|
12
|
+
//# sourceMappingURL=mastra-PHWJK3KT.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-PHWJK3KT.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-QLKW7VLH.js"}
|