@mastra/core 1.28.0-alpha.2 → 1.28.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 +93 -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-FZMZVECM.cjs → chunk-2ZLG55OF.cjs} +9 -9
- package/dist/{chunk-FZMZVECM.cjs.map → chunk-2ZLG55OF.cjs.map} +1 -1
- package/dist/{chunk-UCKYFOS5.js → chunk-5WTJHNP4.js} +4 -4
- package/dist/{chunk-UCKYFOS5.js.map → chunk-5WTJHNP4.js.map} +1 -1
- package/dist/{chunk-I543JILY.cjs → chunk-AVGHSESJ.cjs} +224 -224
- package/dist/{chunk-I543JILY.cjs.map → chunk-AVGHSESJ.cjs.map} +1 -1
- package/dist/{chunk-Y5NA6WRH.js → chunk-BPT3YHUU.js} +5 -5
- package/dist/{chunk-Y5NA6WRH.js.map → chunk-BPT3YHUU.js.map} +1 -1
- package/dist/{chunk-TZSQJYUS.js → chunk-DE3KHHLV.js} +3 -3
- package/dist/{chunk-TZSQJYUS.js.map → chunk-DE3KHHLV.js.map} +1 -1
- package/dist/{chunk-DBFA5FFU.js → chunk-DPYW3FPY.js} +4 -4
- package/dist/{chunk-DBFA5FFU.js.map → chunk-DPYW3FPY.js.map} +1 -1
- package/dist/{chunk-P3NIJCXP.js → chunk-DUQ3D26E.js} +3 -3
- package/dist/chunk-DUQ3D26E.js.map +1 -0
- package/dist/{chunk-N7CW7X7O.cjs → chunk-FFNSDJOJ.cjs} +57 -57
- package/dist/{chunk-N7CW7X7O.cjs.map → chunk-FFNSDJOJ.cjs.map} +1 -1
- package/dist/{chunk-DMW3LDAI.cjs → chunk-FUY6V2GQ.cjs} +14 -14
- package/dist/{chunk-DMW3LDAI.cjs.map → chunk-FUY6V2GQ.cjs.map} +1 -1
- package/dist/{chunk-SQYHPB7J.js → chunk-G4IXPHSC.js} +6 -6
- package/dist/{chunk-SQYHPB7J.js.map → chunk-G4IXPHSC.js.map} +1 -1
- package/dist/{chunk-LEWSZH4C.cjs → chunk-GCKYB7XS.cjs} +292 -292
- package/dist/{chunk-LEWSZH4C.cjs.map → chunk-GCKYB7XS.cjs.map} +1 -1
- package/dist/{chunk-MROYKU4N.cjs → chunk-GGHNXZKH.cjs} +5 -5
- package/dist/{chunk-MROYKU4N.cjs.map → chunk-GGHNXZKH.cjs.map} +1 -1
- package/dist/{chunk-NPZNOCIW.js → chunk-J7DD4SSC.js} +9 -9
- package/dist/{chunk-NPZNOCIW.js.map → chunk-J7DD4SSC.js.map} +1 -1
- package/dist/{chunk-6BLLC4MN.cjs → chunk-JSOPDGXR.cjs} +17 -17
- package/dist/{chunk-6BLLC4MN.cjs.map → chunk-JSOPDGXR.cjs.map} +1 -1
- package/dist/{chunk-FD4ZS5ZQ.cjs → chunk-MMD73TWG.cjs} +7 -7
- package/dist/{chunk-FD4ZS5ZQ.cjs.map → chunk-MMD73TWG.cjs.map} +1 -1
- package/dist/{chunk-E4RRAOSG.js → chunk-N4RYN7C2.js} +3 -3
- package/dist/{chunk-E4RRAOSG.js.map → chunk-N4RYN7C2.js.map} +1 -1
- package/dist/{chunk-VQFQWMV7.js → chunk-NXLAPKWV.js} +3 -3
- package/dist/{chunk-VQFQWMV7.js.map → chunk-NXLAPKWV.js.map} +1 -1
- package/dist/{chunk-KRYM6L4L.cjs → chunk-OCWTM757.cjs} +3 -3
- package/dist/chunk-OCWTM757.cjs.map +1 -0
- package/dist/{chunk-CHT6QEL4.cjs → chunk-OUPTIIQU.cjs} +20 -20
- package/dist/{chunk-CHT6QEL4.cjs.map → chunk-OUPTIIQU.cjs.map} +1 -1
- package/dist/{chunk-3SZVQUBS.js → chunk-RBWKHHP2.js} +3 -3
- package/dist/{chunk-3SZVQUBS.js.map → chunk-RBWKHHP2.js.map} +1 -1
- package/dist/{chunk-MXEZNKLZ.js → chunk-SMTGW6C5.js} +8 -8
- package/dist/{chunk-MXEZNKLZ.js.map → chunk-SMTGW6C5.js.map} +1 -1
- package/dist/{chunk-2AP476XO.cjs → chunk-VNVKVOCW.cjs} +6 -6
- package/dist/{chunk-2AP476XO.cjs.map → chunk-VNVKVOCW.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 +1 -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-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/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-P52GX7UZ.cjs +12 -0
- package/dist/{mastra-IMLAZTS5.cjs.map → mastra-P52GX7UZ.cjs.map} +1 -1
- package/dist/mastra-XXFWO6KG.js +3 -0
- package/dist/{mastra-EWMYVECQ.js.map → mastra-XXFWO6KG.js.map} +1 -1
- package/dist/memory/index.cjs +19 -19
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-2X5G2DAS.js +3 -0
- package/dist/{models-dev-3WFCNENU.js.map → models-dev-2X5G2DAS.js.map} +1 -1
- package/dist/models-dev-GPPPUPTJ.cjs +12 -0
- package/dist/{models-dev-LKRGA326.cjs.map → models-dev-GPPPUPTJ.cjs.map} +1 -1
- package/dist/netlify-IXWIB5YM.js +3 -0
- package/dist/{netlify-WQY6BKSQ.js.map → netlify-IXWIB5YM.js.map} +1 -1
- package/dist/netlify-XCVMFKJW.cjs +12 -0
- package/dist/{netlify-SUH6DXO2.cjs.map → netlify-XCVMFKJW.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-IEK7YETD.js +3 -0
- package/dist/{provider-registry-JQC6Y3JI.js.map → provider-registry-IEK7YETD.js.map} +1 -1
- package/dist/provider-registry-ZIFHRDXN.cjs +44 -0
- package/dist/{provider-registry-EAGCWXQH.cjs.map → provider-registry-ZIFHRDXN.cjs.map} +1 -1
- 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/dist/chunk-KRYM6L4L.cjs.map +0 -1
- package/dist/chunk-P3NIJCXP.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 chunkGGHNXZKH_cjs = require('../chunk-GGHNXZKH.cjs');
|
|
4
|
+
var chunkFUY6V2GQ_cjs = require('../chunk-FUY6V2GQ.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 chunkGGHNXZKH_cjs.runEvals; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "MastraScorer", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkFUY6V2GQ_cjs.MastraScorer; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createScorer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkFUY6V2GQ_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-RBWKHHP2.js';
|
|
2
|
+
export { MastraScorer, createScorer } from '../chunk-BPT3YHUU.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 chunkFFNSDJOJ_cjs = require('../../chunk-FFNSDJOJ.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 = chunkFFNSDJOJ_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 = chunkFFNSDJOJ_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-N4RYN7C2.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 chunkJSOPDGXR_cjs = require('../chunk-JSOPDGXR.cjs');
|
|
4
|
+
var chunkFUY6V2GQ_cjs = require('../chunk-FUY6V2GQ.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 chunkFUY6V2GQ_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 chunkJSOPDGXR_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-ZIFHRDXN.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-ZIFHRDXN.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-ZIFHRDXN.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-J7DD4SSC.js';
|
|
2
|
+
import { Agent } from '../chunk-BPT3YHUU.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-IEK7YETD.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-IEK7YETD.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-IEK7YETD.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 chunkJSOPDGXR_cjs = require('./chunk-JSOPDGXR.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 chunkJSOPDGXR_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 chunkGCKYB7XS_cjs = require('../chunk-GCKYB7XS.cjs');
|
|
4
|
+
var chunkOUPTIIQU_cjs = require('../chunk-OUPTIIQU.cjs');
|
|
5
|
+
var chunkAVGHSESJ_cjs = require('../chunk-AVGHSESJ.cjs');
|
|
6
|
+
var chunk2ZLG55OF_cjs = require('../chunk-2ZLG55OF.cjs');
|
|
7
|
+
var chunkOCWTM757_cjs = require('../chunk-OCWTM757.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 chunkGCKYB7XS_cjs.AzureOpenAIGateway; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "EMBEDDING_MODELS", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkGCKYB7XS_cjs.EMBEDDING_MODELS; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "ModelRouterEmbeddingModel", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkGCKYB7XS_cjs.ModelRouterEmbeddingModel; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ModelRouterLanguageModel", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkGCKYB7XS_cjs.ModelRouterLanguageModel; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "defaultGateways", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkGCKYB7XS_cjs.defaultGateways; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "resolveModelConfig", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkGCKYB7XS_cjs.resolveModelConfig; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "GatewayRegistry", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkOUPTIIQU_cjs.GatewayRegistry; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "MastraGateway", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkOUPTIIQU_cjs.MastraGateway; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "PROVIDER_REGISTRY", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkOUPTIIQU_cjs.PROVIDER_REGISTRY; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "getProviderConfig", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkOUPTIIQU_cjs.getProviderConfig; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "parseModelString", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkOUPTIIQU_cjs.parseModelString; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ModelsDevGateway", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkAVGHSESJ_cjs.ModelsDevGateway; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "NetlifyGateway", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk2ZLG55OF_cjs.NetlifyGateway; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "GATEWAY_AUTH_HEADER", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkOCWTM757_cjs.GATEWAY_AUTH_HEADER; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "MastraModelGateway", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkOCWTM757_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-G4IXPHSC.js';
|
|
2
|
+
export { GatewayRegistry, MastraGateway, PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-SMTGW6C5.js';
|
|
3
|
+
export { ModelsDevGateway } from '../chunk-DE3KHHLV.js';
|
|
4
|
+
export { NetlifyGateway } from '../chunk-NXLAPKWV.js';
|
|
5
|
+
export { GATEWAY_AUTH_HEADER, MastraModelGateway } from '../chunk-DUQ3D26E.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFUY6V2GQ_cjs = require('../chunk-FUY6V2GQ.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 chunkFUY6V2GQ_cjs.createScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "formatCheckFeedback", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkFUY6V2GQ_cjs.formatCheckFeedback; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "formatCompletionFeedback", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkFUY6V2GQ_cjs.formatCompletionFeedback; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "formatStreamCompletionFeedback", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkFUY6V2GQ_cjs.formatStreamCompletionFeedback; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "formatValidationFeedback", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkFUY6V2GQ_cjs.formatValidationFeedback; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "generateFinalResult", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkFUY6V2GQ_cjs.generateFinalResult; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "generateStructuredFinalResult", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkFUY6V2GQ_cjs.generateStructuredFinalResult; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "loop", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkFUY6V2GQ_cjs.loop; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "runChecks", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkFUY6V2GQ_cjs.runChecks; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "runCompletionScorers", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkFUY6V2GQ_cjs.runCompletionScorers; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "runDefaultCompletionCheck", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkFUY6V2GQ_cjs.runDefaultCompletionCheck; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "runStreamCompletionScorers", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkFUY6V2GQ_cjs.runStreamCompletionScorers; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "runValidation", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkFUY6V2GQ_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-BPT3YHUU.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 chunkJSOPDGXR_cjs = require('../chunk-JSOPDGXR.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 chunkJSOPDGXR_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 chunkOUPTIIQU_cjs = require('./chunk-OUPTIIQU.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "MastraGateway", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkOUPTIIQU_cjs.MastraGateway; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=mastra-P52GX7UZ.cjs.map
|
|
12
|
+
//# sourceMappingURL=mastra-P52GX7UZ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-P52GX7UZ.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-XXFWO6KG.js"}
|