@mastra/core 1.5.0 → 1.6.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 +193 -0
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/adapters/AIV5Adapter.d.ts.map +1 -1
- package/dist/agent/message-list/conversion/output-converter.d.ts.map +1 -1
- package/dist/agent/message-list/index.cjs +18 -18
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +7 -7
- package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +7 -7
- package/dist/agent/workflows/prepare-stream/schema.d.ts +11 -11
- package/dist/{chunk-7WC7ALDW.cjs → chunk-2CQN7RXY.cjs} +6 -6
- package/dist/{chunk-7WC7ALDW.cjs.map → chunk-2CQN7RXY.cjs.map} +1 -1
- package/dist/{chunk-7S6LA43E.cjs → chunk-365DUMWC.cjs} +275 -248
- package/dist/chunk-365DUMWC.cjs.map +1 -0
- package/dist/{chunk-OQ5LZ6OV.cjs → chunk-5FGY4X3I.cjs} +149 -61
- package/dist/chunk-5FGY4X3I.cjs.map +1 -0
- package/dist/{chunk-UZFGMMKU.js → chunk-5K45E5VE.js} +37 -3
- package/dist/chunk-5K45E5VE.js.map +1 -0
- package/dist/{chunk-MZIMV2BB.js → chunk-5QSHNUVD.js} +241 -213
- package/dist/chunk-5QSHNUVD.js.map +1 -0
- package/dist/{chunk-AIRMLZ43.js → chunk-7EXW4AAG.js} +4 -4
- package/dist/{chunk-AIRMLZ43.js.map → chunk-7EXW4AAG.js.map} +1 -1
- package/dist/{chunk-S4VVZI4E.cjs → chunk-AYHSPIT6.cjs} +326 -5
- package/dist/chunk-AYHSPIT6.cjs.map +1 -0
- package/dist/{chunk-CQ4Z6ZAV.cjs → chunk-DA4DHOEO.cjs} +7 -7
- package/dist/{chunk-CQ4Z6ZAV.cjs.map → chunk-DA4DHOEO.cjs.map} +1 -1
- package/dist/{chunk-R3364RAL.js → chunk-DA4UPMBS.js} +4 -4
- package/dist/{chunk-R3364RAL.js.map → chunk-DA4UPMBS.js.map} +1 -1
- package/dist/{chunk-YW54RH77.cjs → chunk-DB7U2C5B.cjs} +12 -5
- package/dist/chunk-DB7U2C5B.cjs.map +1 -0
- package/dist/{chunk-YIN5F7VO.js → chunk-EEU5NHHU.js} +4254 -3958
- package/dist/chunk-EEU5NHHU.js.map +1 -0
- package/dist/{chunk-NUV3BLRH.cjs → chunk-FNDCXBTA.cjs} +17 -16
- package/dist/chunk-FNDCXBTA.cjs.map +1 -0
- package/dist/{chunk-A6EWCOGA.cjs → chunk-H5S4PS44.cjs} +197 -27
- package/dist/chunk-H5S4PS44.cjs.map +1 -0
- package/dist/{chunk-3YMDR4OL.cjs → chunk-HTAUP7ER.cjs} +4 -4
- package/dist/{chunk-3YMDR4OL.cjs.map → chunk-HTAUP7ER.cjs.map} +1 -1
- package/dist/{chunk-OHLVZVIK.js → chunk-IC5OUWKJ.js} +12 -5
- package/dist/chunk-IC5OUWKJ.js.map +1 -0
- package/dist/{chunk-3KJW4EMO.js → chunk-IHEYJDJP.js} +3 -3
- package/dist/{chunk-3KJW4EMO.js.map → chunk-IHEYJDJP.js.map} +1 -1
- package/dist/{chunk-CXVMDV2B.js → chunk-IOY7Y5GV.js} +197 -27
- package/dist/chunk-IOY7Y5GV.js.map +1 -0
- package/dist/{chunk-YV2YGQRY.js → chunk-K6U5VMYO.js} +101 -13
- package/dist/chunk-K6U5VMYO.js.map +1 -0
- package/dist/{chunk-MDC6VYA6.cjs → chunk-KAVAKMOQ.cjs} +4 -8
- package/dist/chunk-KAVAKMOQ.cjs.map +1 -0
- package/dist/{chunk-4GB2GS4S.js → chunk-NBFTXYHC.js} +5 -5
- package/dist/{chunk-4GB2GS4S.js.map → chunk-NBFTXYHC.js.map} +1 -1
- package/dist/{chunk-QSN5KQXZ.cjs → chunk-O7PZ4VOO.cjs} +11 -11
- package/dist/{chunk-QSN5KQXZ.cjs.map → chunk-O7PZ4VOO.cjs.map} +1 -1
- package/dist/chunk-OQDRPRKM.cjs +46 -0
- package/dist/chunk-OQDRPRKM.cjs.map +1 -0
- package/dist/{chunk-DST75PA4.js → chunk-OS4QY6KR.js} +4 -4
- package/dist/{chunk-DST75PA4.js.map → chunk-OS4QY6KR.js.map} +1 -1
- package/dist/{chunk-TPDMP7OD.js → chunk-RHYZ6CQN.js} +4 -8
- package/dist/chunk-RHYZ6CQN.js.map +1 -0
- package/dist/{chunk-D57U4II4.js → chunk-RV37PJZI.js} +9 -8
- package/dist/chunk-RV37PJZI.js.map +1 -0
- package/dist/{chunk-JZ6TH4HQ.cjs → chunk-TL2TTA4X.cjs} +4260 -3962
- package/dist/chunk-TL2TTA4X.cjs.map +1 -0
- package/dist/{chunk-KNXZ7KYL.cjs → chunk-TVPANHLE.cjs} +40 -2
- package/dist/chunk-TVPANHLE.cjs.map +1 -0
- package/dist/{chunk-G5JVVFIG.cjs → chunk-VJCBZPB4.cjs} +9 -9
- package/dist/{chunk-G5JVVFIG.cjs.map → chunk-VJCBZPB4.cjs.map} +1 -1
- package/dist/chunk-X2HAI3OX.js +39 -0
- package/dist/chunk-X2HAI3OX.js.map +1 -0
- package/dist/{chunk-FZ5DRHKE.js → chunk-XB3DA67Q.js} +325 -5
- package/dist/chunk-XB3DA67Q.js.map +1 -0
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +2 -1
- package/dist/docs/assets/SOURCE_MAP.json +417 -391
- package/dist/docs/references/docs-memory-observational-memory.md +2 -0
- package/dist/docs/references/docs-streaming-tool-streaming.md +6 -0
- package/dist/docs/references/docs-workspace-filesystem.md +21 -1
- package/dist/docs/references/reference-harness-harness-class.md +645 -0
- package/dist/docs/references/reference-memory-memory-class.md +1 -1
- package/dist/docs/references/reference-memory-observational-memory.md +1 -0
- package/dist/docs/references/reference-workspace-local-filesystem.md +25 -0
- package/dist/docs/references/reference-workspace-workspace-class.md +1 -24
- package/dist/docs/references/reference.md +1 -0
- package/dist/editor/types.d.ts +20 -1
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/evals/base.d.ts.map +1 -1
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/events/index.cjs +6 -2
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +1 -1
- package/dist/harness/harness.d.ts +105 -35
- package/dist/harness/harness.d.ts.map +1 -1
- package/dist/harness/index.cjs +472 -64
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.d.ts +2 -1
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +468 -62
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/tools.d.ts +38 -0
- package/dist/harness/tools.d.ts.map +1 -1
- package/dist/harness/types.d.ts +64 -9
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +12 -12
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +6 -6
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +21 -21
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +14 -14
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +7 -7
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +21 -21
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/loop/workflows/schema.d.ts +30 -30
- package/dist/loop/workflows/stream.d.ts +0 -13
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-6P4CM74H.js +3 -0
- package/dist/{models-dev-MDI5E2YA.js.map → models-dev-6P4CM74H.js.map} +1 -1
- package/dist/models-dev-CLLSNT5L.cjs +12 -0
- package/dist/{models-dev-BW2GAM3K.cjs.map → models-dev-CLLSNT5L.cjs.map} +1 -1
- package/dist/processor-provider/index.cjs +256 -0
- package/dist/processor-provider/index.cjs.map +1 -0
- package/dist/processor-provider/index.d.ts +5 -0
- package/dist/processor-provider/index.d.ts.map +1 -0
- package/dist/processor-provider/index.js +243 -0
- package/dist/processor-provider/index.js.map +1 -0
- package/dist/processor-provider/phase-filtered-processor.d.ts +22 -0
- package/dist/processor-provider/phase-filtered-processor.d.ts.map +1 -0
- package/dist/processor-provider/providers/index.d.ts +12 -0
- package/dist/processor-provider/providers/index.d.ts.map +1 -0
- package/dist/processor-provider/types.d.ts +65 -0
- package/dist/processor-provider/types.d.ts.map +1 -0
- package/dist/processors/index.cjs +41 -41
- package/dist/processors/index.js +1 -1
- package/dist/processors/step-schema.d.ts +14 -14
- package/dist/provider-registry-HMTFO5FV.cjs +40 -0
- package/dist/{provider-registry-4PH2JPIA.cjs.map → provider-registry-HMTFO5FV.cjs.map} +1 -1
- package/dist/provider-registry-TTZ2WN2P.js +3 -0
- package/dist/{provider-registry-VEJ3PN4S.js.map → provider-registry-TTZ2WN2P.js.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/base.d.ts +2 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.cjs +68 -52
- package/dist/storage/constants.d.ts +6 -2
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/index.d.ts +1 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +4 -1
- package/dist/storage/domains/inmemory-db.d.ts.map +1 -1
- package/dist/storage/domains/mcp-servers/base.d.ts +47 -0
- package/dist/storage/domains/mcp-servers/base.d.ts.map +1 -0
- package/dist/storage/domains/mcp-servers/index.d.ts +3 -0
- package/dist/storage/domains/mcp-servers/index.d.ts.map +1 -0
- package/dist/storage/domains/mcp-servers/inmemory.d.ts +31 -0
- package/dist/storage/domains/mcp-servers/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/observability/types.d.ts +44 -44
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +178 -154
- package/dist/storage/index.js +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +220 -6
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/MastraAgentNetworkStream.d.ts +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts +1 -1
- package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
- package/dist/stream/base/input.d.ts +19 -0
- package/dist/stream/base/input.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/vector/index.cjs +9 -9
- package/dist/vector/index.js +2 -2
- package/dist/workflows/evented/execution-engine.d.ts.map +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/step-executor.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts.map +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workspace/constants/index.d.ts +1 -0
- package/dist/workspace/constants/index.d.ts.map +1 -1
- package/dist/workspace/index.cjs +64 -64
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/tools/ast-edit.d.ts +97 -0
- package/dist/workspace/tools/ast-edit.d.ts.map +1 -0
- package/dist/workspace/tools/search.d.ts +1 -1
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/package.json +6 -5
- package/processor-provider.d.ts +1 -0
- package/dist/chunk-4D4KB75Y.cjs +0 -9
- package/dist/chunk-4D4KB75Y.cjs.map +0 -1
- package/dist/chunk-7S6LA43E.cjs.map +0 -1
- package/dist/chunk-A6EWCOGA.cjs.map +0 -1
- package/dist/chunk-BVUMKER5.js +0 -7
- package/dist/chunk-BVUMKER5.js.map +0 -1
- package/dist/chunk-CXVMDV2B.js.map +0 -1
- package/dist/chunk-D57U4II4.js.map +0 -1
- package/dist/chunk-FZ5DRHKE.js.map +0 -1
- package/dist/chunk-JZ6TH4HQ.cjs.map +0 -1
- package/dist/chunk-KNXZ7KYL.cjs.map +0 -1
- package/dist/chunk-MDC6VYA6.cjs.map +0 -1
- package/dist/chunk-MZIMV2BB.js.map +0 -1
- package/dist/chunk-NUV3BLRH.cjs.map +0 -1
- package/dist/chunk-OHLVZVIK.js.map +0 -1
- package/dist/chunk-OQ5LZ6OV.cjs.map +0 -1
- package/dist/chunk-S4VVZI4E.cjs.map +0 -1
- package/dist/chunk-TPDMP7OD.js.map +0 -1
- package/dist/chunk-UZFGMMKU.js.map +0 -1
- package/dist/chunk-YIN5F7VO.js.map +0 -1
- package/dist/chunk-YV2YGQRY.js.map +0 -1
- package/dist/chunk-YW54RH77.cjs.map +0 -1
- package/dist/models-dev-BW2GAM3K.cjs +0 -12
- package/dist/models-dev-MDI5E2YA.js +0 -3
- package/dist/provider-registry-4PH2JPIA.cjs +0 -40
- package/dist/provider-registry-VEJ3PN4S.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,198 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.6.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added Processor Providers — a new system for configuring and hydrating processors on stored agents. Define custom processor types with config schemas, available phases, and a factory method, then compose them into serializable processor graphs that support sequential, parallel, and conditional execution. ([#13219](https://github.com/mastra-ai/mastra/pull/13219))
|
|
8
|
+
|
|
9
|
+
**Example — custom processor provider:**
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { MastraEditor } from '@mastra/editor';
|
|
13
|
+
|
|
14
|
+
// Built-in processors (token-limiter, unicode-normalizer, etc.) are registered automatically.
|
|
15
|
+
// Only register custom providers for your own processors:
|
|
16
|
+
const editor = new MastraEditor({
|
|
17
|
+
processorProviders: {
|
|
18
|
+
'my-custom-filter': myCustomFilterProvider,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Example — stored agent with a processor graph:**
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
const agentConfig = {
|
|
27
|
+
inputProcessors: {
|
|
28
|
+
steps: [
|
|
29
|
+
{
|
|
30
|
+
type: 'step',
|
|
31
|
+
step: { id: 'norm', providerId: 'unicode-normalizer', config: {}, enabledPhases: ['processInput'] },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'step',
|
|
35
|
+
step: {
|
|
36
|
+
id: 'limit',
|
|
37
|
+
providerId: 'token-limiter',
|
|
38
|
+
config: { limit: 4000 },
|
|
39
|
+
enabledPhases: ['processInput', 'processOutputStream'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Added AST edit tool (`workspace_ast_edit`) for intelligent code transformations using AST analysis. Supports renaming identifiers, adding/removing/merging imports, and pattern-based find-and-replace with metavariable substitution. Automatically available when `@ast-grep/napi` is installed in the project. ([#13233](https://github.com/mastra-ai/mastra/pull/13233))
|
|
48
|
+
|
|
49
|
+
**Example:**
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const workspace = new Workspace({
|
|
53
|
+
filesystem: new LocalFilesystem({ basePath: '/my/project' }),
|
|
54
|
+
});
|
|
55
|
+
const tools = createWorkspaceTools(workspace);
|
|
56
|
+
|
|
57
|
+
// Rename all occurrences of an identifier
|
|
58
|
+
await tools['mastra_workspace_ast_edit'].execute({
|
|
59
|
+
path: '/src/utils.ts',
|
|
60
|
+
transform: 'rename',
|
|
61
|
+
targetName: 'oldName',
|
|
62
|
+
newName: 'newName',
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Add an import (merges into existing imports from the same module)
|
|
66
|
+
await tools['mastra_workspace_ast_edit'].execute({
|
|
67
|
+
path: '/src/app.ts',
|
|
68
|
+
transform: 'add-import',
|
|
69
|
+
importSpec: { module: 'react', names: ['useState', 'useEffect'] },
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Pattern-based replacement with metavariables
|
|
73
|
+
await tools['mastra_workspace_ast_edit'].execute({
|
|
74
|
+
path: '/src/app.ts',
|
|
75
|
+
pattern: 'console.log($ARG)',
|
|
76
|
+
replacement: 'logger.debug($ARG)',
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- Added streaming tool argument previews across all tool renderers. Tool names, file paths, and commands now appear immediately as the model generates them, rather than waiting for the complete tool call. ([#13328](https://github.com/mastra-ai/mastra/pull/13328))
|
|
81
|
+
- **Generic tools** show live key/value argument previews as args stream in
|
|
82
|
+
- **Edit tool** renders a bordered diff preview as soon as `old_str` and `new_str` are available, even before the tool result arrives
|
|
83
|
+
- **Write tool** streams syntax-highlighted file content in a bordered box while args arrive
|
|
84
|
+
- **Find files** shows the glob pattern in the pending header
|
|
85
|
+
- **Task write** streams items directly into the pinned task list component in real-time
|
|
86
|
+
|
|
87
|
+
All tools use partial JSON parsing to progressively display argument information. This is enabled automatically for all Harness-based agents — no configuration required.
|
|
88
|
+
|
|
89
|
+
- Added MCP server storage and editor support. MCP server configurations can now be persisted in storage and managed through the editor CMS. The editor's `mcpServer` namespace provides full CRUD operations and automatically hydrates stored configs into running `MCPServer` instances by resolving tool, agent, and workflow references from the Mastra registry. ([#13285](https://github.com/mastra-ai/mastra/pull/13285))
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
const editor = new MastraEditor();
|
|
93
|
+
const mastra = new Mastra({
|
|
94
|
+
tools: { getWeather: weatherTool, calculate: calculatorTool },
|
|
95
|
+
storage: new LibSQLStore({ url: ':memory:' }),
|
|
96
|
+
editor,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// Store an MCP server config referencing tools by ID
|
|
100
|
+
const server = await editor.mcpServer.create({
|
|
101
|
+
id: 'my-server',
|
|
102
|
+
name: 'My MCP Server',
|
|
103
|
+
version: '1.0.0',
|
|
104
|
+
tools: { getWeather: {}, calculate: { description: 'Custom description' } },
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Retrieve — automatically hydrates into a real MCPServer with resolved tools
|
|
108
|
+
const mcp = await editor.mcpServer.getById('my-server');
|
|
109
|
+
const tools = mcp.tools(); // { getWeather: ..., calculate: ... }
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- **@mastra/core:** Added optional `threadLock` callbacks to `HarnessConfig` for preventing concurrent thread access across processes. The Harness calls `acquire`/`release` during `selectOrCreateThread`, `createThread`, and `switchThread` when configured. Locking is opt-in — when `threadLock` is not provided, behavior is unchanged. ([#13334](https://github.com/mastra-ai/mastra/pull/13334))
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
const harness = new Harness({
|
|
116
|
+
id: 'my-harness',
|
|
117
|
+
storage: myStore,
|
|
118
|
+
modes: [{ id: 'default', agent: myAgent }],
|
|
119
|
+
threadLock: {
|
|
120
|
+
acquire: threadId => acquireThreadLock(threadId),
|
|
121
|
+
release: threadId => releaseThreadLock(threadId),
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**mastracode:** Wires the existing filesystem-based thread lock (`thread-lock.ts`) into the new `threadLock` config, restoring the concurrent access protection that was lost during the monorepo migration.
|
|
127
|
+
|
|
128
|
+
- Refactored all Harness class methods to accept object parameters instead of positional arguments, and standardized method naming. ([#13353](https://github.com/mastra-ai/mastra/pull/13353))
|
|
129
|
+
|
|
130
|
+
**Why:** Positional arguments make call sites harder to read, especially for methods with optional middle parameters or multiple string arguments. Object parameters are self-documenting and easier to extend without breaking changes.
|
|
131
|
+
- Methods returning arrays use `list` prefix (`listModes`, `listAvailableModels`, `listMessages`, `listMessagesForThread`)
|
|
132
|
+
- `persistThreadSetting` → `setThreadSetting`
|
|
133
|
+
- `resolveToolApprovalDecision` → `respondToToolApproval` (consistent with `respondToQuestion` / `respondToPlanApproval`)
|
|
134
|
+
- `setPermissionCategory` → `setPermissionForCategory`
|
|
135
|
+
- `setPermissionTool` → `setPermissionForTool`
|
|
136
|
+
|
|
137
|
+
**Before:**
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
await harness.switchMode('build');
|
|
141
|
+
await harness.sendMessage('Hello', { images });
|
|
142
|
+
const modes = harness.getModes();
|
|
143
|
+
const models = await harness.getAvailableModels();
|
|
144
|
+
harness.resolveToolApprovalDecision('approve');
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**After:**
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
await harness.switchMode({ modeId: 'build' });
|
|
151
|
+
await harness.sendMessage({ content: 'Hello', images });
|
|
152
|
+
const modes = harness.listModes();
|
|
153
|
+
const models = await harness.listAvailableModels();
|
|
154
|
+
harness.respondToToolApproval({ decision: 'approve' });
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The `HarnessRequestContext` interface methods (`registerQuestion`, `registerPlanApproval`, `getSubagentModelId`) are also updated to use object parameters.
|
|
158
|
+
|
|
159
|
+
- Added `task_write` and `task_check` as built-in Harness tools. These tools are automatically injected into every agent call, allowing agents to track structured task lists without manual tool registration. ([#13344](https://github.com/mastra-ai/mastra/pull/13344))
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
// Agents can call task_write to create/update a task list
|
|
163
|
+
await tools['task_write'].execute({
|
|
164
|
+
tasks: [
|
|
165
|
+
{ content: 'Fix authentication bug', status: 'in_progress', activeForm: 'Fixing authentication bug' },
|
|
166
|
+
{ content: 'Add unit tests', status: 'pending', activeForm: 'Adding unit tests' },
|
|
167
|
+
],
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// Agents can call task_check to verify all tasks are complete before finishing
|
|
171
|
+
await tools['task_check'].execute({});
|
|
172
|
+
// Returns: { completed: 1, inProgress: 0, pending: 1, allDone: false, incomplete: [...] }
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Fixed duplicate Vercel AI Gateway configuration that could cause incorrect API key resolution. Removed a redundant override that conflicted with the upstream models.dev registry. ([#13291](https://github.com/mastra-ai/mastra/pull/13291))
|
|
178
|
+
|
|
179
|
+
- Fixed Vercel AI Gateway failing when using the model router string format (e.g. `vercel/openai/gpt-oss-120b`). The provider registry was overriding `createGateway`'s base URL with an incorrect value, causing API requests to hit the wrong endpoint. Removed the URL override so the AI SDK uses its own correct default. Closes #13280. ([#13287](https://github.com/mastra-ai/mastra/pull/13287))
|
|
180
|
+
|
|
181
|
+
- Fixed recursive schema warnings for processor graph entries by unrolling to a fixed depth of 3 levels, matching the existing rule group pattern ([#13292](https://github.com/mastra-ai/mastra/pull/13292))
|
|
182
|
+
|
|
183
|
+
- Fixed Observational Memory status not updating during conversations. The harness was missing streaming handlers for OM data chunks (status, observation start/end, buffering, activation), so the TUI never received real-time OM progress updates. Also added switchObserverModel and switchReflectorModel methods so changing OM models properly emits events to subscribers. ([#13330](https://github.com/mastra-ai/mastra/pull/13330))
|
|
184
|
+
|
|
185
|
+
- Fixed thread resuming in git worktrees. Previously, starting mastracode in a new worktree would resume a thread from another worktree of the same repo. Threads are now auto-tagged with the project path and filtered on resume so each worktree gets its own thread scope. ([#13343](https://github.com/mastra-ai/mastra/pull/13343))
|
|
186
|
+
|
|
187
|
+
- Fixed a crash where the Node.js process would terminate with an unhandled TypeError when an LLM stream encountered an error. The ReadableStreamDefaultController would throw "Controller is already closed" when chunks were enqueued after a downstream consumer cancelled or terminated the stream. All controller.enqueue(), controller.close(), and controller.error() calls now check if the controller is still open before attempting operations. (https://github.com/mastra-ai/mastra/issues/13107) ([#13142](https://github.com/mastra-ai/mastra/pull/13142))
|
|
188
|
+
|
|
189
|
+
- Added `suggestedContinuation` and `currentTask` fields to the in-memory storage adapter's Observational Memory activation result, aligning it with the persistent storage implementations. ([#13354](https://github.com/mastra-ai/mastra/pull/13354))
|
|
190
|
+
|
|
191
|
+
- Fixed provider-executed tools (e.g. Anthropic web_search) causing stream bail when called in parallel with regular tools. The tool-call-step now provides a fallback result for provider-executed tools whose output was not propagated, preventing the mapping step from misidentifying them as pending HITL interactions. Fixes #13125. ([#13126](https://github.com/mastra-ai/mastra/pull/13126))
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [[`7184d87`](https://github.com/mastra-ai/mastra/commit/7184d87c9237d26862f500ccfd0c9f9eadd38ddf)]:
|
|
194
|
+
- @mastra/schema-compat@1.1.2-alpha.0
|
|
195
|
+
|
|
3
196
|
## 1.5.0
|
|
4
197
|
|
|
5
198
|
### Minor Changes
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk365DUMWC_cjs = require('../chunk-365DUMWC.cjs');
|
|
4
|
+
var chunkDB7U2C5B_cjs = require('../chunk-DB7U2C5B.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Agent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk365DUMWC_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk365DUMWC_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isSupportedLanguageModel", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk365DUMWC_cjs.isSupportedLanguageModel; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk365DUMWC_cjs.resolveThreadIdFromArgs; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk365DUMWC_cjs.supportedLanguageModelSpecifications; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk365DUMWC_cjs.tryGenerateWithJsonFallback; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk365DUMWC_cjs.tryStreamWithJsonFallback; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MessageList", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkDB7U2C5B_cjs.MessageList; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "TypeDetector", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkDB7U2C5B_cjs.TypeDetector; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "aiV5ModelMessageToV2PromptMessage", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkDB7U2C5B_cjs.aiV5ModelMessageToV2PromptMessage; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "convertMessages", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkDB7U2C5B_cjs.convertMessages; }
|
|
51
51
|
});
|
|
52
52
|
//# sourceMappingURL=index.cjs.map
|
|
53
53
|
//# sourceMappingURL=index.cjs.map
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
2
|
-
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-
|
|
1
|
+
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-5QSHNUVD.js';
|
|
2
|
+
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-IC5OUWKJ.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIV5Adapter.d.ts","sourceRoot":"","sources":["../../../../src/agent/message-list/adapters/AIV5Adapter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAA6C,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAChH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAqDzC,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9D,YAAY,CAAC,IAAI,MAAM,CAAC;IACxB,iBAAiB,CAAC,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzE;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,QAAQ,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"AIV5Adapter.d.ts","sourceRoot":"","sources":["../../../../src/agent/message-list/adapters/AIV5Adapter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAA6C,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAChH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAqDzC,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9D,YAAY,CAAC,IAAI,MAAM,CAAC;IACxB,iBAAiB,CAAC,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzE;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,QAAQ,CAAC,SAAS;IAgO9D;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,GAAG,eAAe;IAmMhE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAyC5C;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC,EAAE,aAAa,GAAG,eAAe;CAoL1G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-converter.d.ts","sourceRoot":"","sources":["../../../../src/agent/message-list/conversion/output-converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CA6B7E;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,EAC9B,yBAAyB,UAAQ,GAChC,QAAQ,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"output-converter.d.ts","sourceRoot":"","sources":["../../../../src/agent/message-list/conversion/output-converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CA6B7E;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,EAC9B,yBAAyB,UAAQ,GAChC,QAAQ,CAAC,SAAS,EAAE,CAoEtB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,CAe7F;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,aAAa,EAAE,CAEzF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,EAC9B,UAAU,EAAE,eAAe,EAAE,EAC7B,yBAAyB,UAAQ,GAChC,QAAQ,CAAC,YAAY,EAAE,CAmEzB;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,aAAa,EAAE,EACzB,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,eAAe,EAAE,GAC5B,QAAQ,CAAC,YAAY,EAAE,CAKzB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAAC,YAAY,GAAG,eAAe,GAAG,MAAM,GACxE,aAAa,CAef"}
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDB7U2C5B_cjs = require('../../chunk-DB7U2C5B.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "AIV4Adapter", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkDB7U2C5B_cjs.AIV4Adapter; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "AIV5Adapter", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkDB7U2C5B_cjs.AIV5Adapter; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "CacheKeyGenerator", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkDB7U2C5B_cjs.CacheKeyGenerator; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "MessageList", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkDB7U2C5B_cjs.MessageList; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "MessageMerger", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkDB7U2C5B_cjs.MessageMerger; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "MessageStateManager", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkDB7U2C5B_cjs.MessageStateManager; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "TypeDetector", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkDB7U2C5B_cjs.TypeDetector; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "aiV4CoreMessageToV1PromptMessage", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkDB7U2C5B_cjs.aiV4CoreMessageToV1PromptMessage; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "aiV5ModelMessageToV2PromptMessage", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkDB7U2C5B_cjs.aiV5ModelMessageToV2PromptMessage; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "convertMessages", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkDB7U2C5B_cjs.convertMessages; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "coreContentToString", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkDB7U2C5B_cjs.coreContentToString; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "ensureAnthropicCompatibleMessages", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkDB7U2C5B_cjs.ensureAnthropicCompatibleMessages; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ensureGeminiCompatibleMessages", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkDB7U2C5B_cjs.ensureGeminiCompatibleMessages; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "findToolCallArgs", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkDB7U2C5B_cjs.findToolCallArgs; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "getOpenAIReasoningItemId", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkDB7U2C5B_cjs.getOpenAIReasoningItemId; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "hasOpenAIReasoningItemId", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkDB7U2C5B_cjs.hasOpenAIReasoningItemId; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "messagesAreEqual", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkDB7U2C5B_cjs.messagesAreEqual; }
|
|
74
74
|
});
|
|
75
75
|
//# sourceMappingURL=index.cjs.map
|
|
76
76
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AIV4Adapter, AIV5Adapter, CacheKeyGenerator, MessageList, MessageMerger, MessageStateManager, TypeDetector, aiV4CoreMessageToV1PromptMessage, aiV5ModelMessageToV2PromptMessage, convertMessages, coreContentToString, ensureAnthropicCompatibleMessages, ensureGeminiCompatibleMessages, findToolCallArgs, getOpenAIReasoningItemId, hasOpenAIReasoningItemId, messagesAreEqual } from '../../chunk-
|
|
1
|
+
export { AIV4Adapter, AIV5Adapter, CacheKeyGenerator, MessageList, MessageMerger, MessageStateManager, TypeDetector, aiV4CoreMessageToV1PromptMessage, aiV5ModelMessageToV2PromptMessage, convertMessages, coreContentToString, ensureAnthropicCompatibleMessages, ensureGeminiCompatibleMessages, findToolCallArgs, getOpenAIReasoningItemId, hasOpenAIReasoningItemId, messagesAreEqual } from '../../chunk-IC5OUWKJ.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -48,15 +48,9 @@ export declare function createPrepareStreamWorkflow<OUTPUT = undefined>({ capabi
|
|
|
48
48
|
parameters?: any;
|
|
49
49
|
}>;
|
|
50
50
|
}, unknown, unknown, import("../../../workflows").DefaultEngineType, unknown> | import("../../../workflows").Step<"prepare-memory-step", any, {}, {
|
|
51
|
+
threadExists: boolean;
|
|
51
52
|
messageList: import("../..").MessageList;
|
|
52
53
|
processorStates: Map<string, import("../../../processors").ProcessorState<undefined>>;
|
|
53
|
-
threadExists: boolean;
|
|
54
|
-
tripwire?: {
|
|
55
|
-
reason: string;
|
|
56
|
-
metadata?: unknown;
|
|
57
|
-
retry?: boolean | undefined;
|
|
58
|
-
processorId?: string | undefined;
|
|
59
|
-
} | undefined;
|
|
60
54
|
thread?: {
|
|
61
55
|
resourceId: string;
|
|
62
56
|
id: string;
|
|
@@ -65,6 +59,12 @@ export declare function createPrepareStreamWorkflow<OUTPUT = undefined>({ capabi
|
|
|
65
59
|
metadata?: Record<string, any> | undefined;
|
|
66
60
|
title?: string | undefined;
|
|
67
61
|
} | undefined;
|
|
62
|
+
tripwire?: {
|
|
63
|
+
reason: string;
|
|
64
|
+
metadata?: unknown;
|
|
65
|
+
retry?: boolean | undefined;
|
|
66
|
+
processorId?: string | undefined;
|
|
67
|
+
} | undefined;
|
|
68
68
|
}, unknown, unknown, import("../../../workflows").DefaultEngineType, unknown> | import("../../../workflows").Step<"stream-text-step", any, any, MastraModelOutput<undefined>, unknown, unknown, import("../../../workflows").DefaultEngineType, unknown>)[], "execution-workflow", unknown, {}, MastraModelOutput<OUTPUT>, MastraModelOutput<OUTPUT>, unknown>;
|
|
69
69
|
export {};
|
|
70
70
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -24,15 +24,9 @@ interface PrepareMemoryStepOptions<OUTPUT = undefined> {
|
|
|
24
24
|
memory?: MastraMemory;
|
|
25
25
|
}
|
|
26
26
|
export declare function createPrepareMemoryStep<OUTPUT = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, requestContext, instructions, memoryConfig, memory, }: PrepareMemoryStepOptions<OUTPUT>): import("../../../workflows").Step<"prepare-memory-step", any, {}, {
|
|
27
|
+
threadExists: boolean;
|
|
27
28
|
messageList: MessageList;
|
|
28
29
|
processorStates: Map<string, ProcessorState<undefined>>;
|
|
29
|
-
threadExists: boolean;
|
|
30
|
-
tripwire?: {
|
|
31
|
-
reason: string;
|
|
32
|
-
metadata?: unknown;
|
|
33
|
-
retry?: boolean | undefined;
|
|
34
|
-
processorId?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
30
|
thread?: {
|
|
37
31
|
resourceId: string;
|
|
38
32
|
id: string;
|
|
@@ -41,6 +35,12 @@ export declare function createPrepareMemoryStep<OUTPUT = undefined>({ capabiliti
|
|
|
41
35
|
metadata?: Record<string, any> | undefined;
|
|
42
36
|
title?: string | undefined;
|
|
43
37
|
} | undefined;
|
|
38
|
+
tripwire?: {
|
|
39
|
+
reason: string;
|
|
40
|
+
metadata?: unknown;
|
|
41
|
+
retry?: boolean | undefined;
|
|
42
|
+
processorId?: string | undefined;
|
|
43
|
+
} | undefined;
|
|
44
44
|
}, unknown, unknown, import("../../../workflows").DefaultEngineType, unknown>;
|
|
45
45
|
export {};
|
|
46
46
|
//# sourceMappingURL=prepare-memory-step.d.ts.map
|
|
@@ -176,15 +176,9 @@ export declare const prepareMemoryStepOutputSchema: z.ZodObject<{
|
|
|
176
176
|
processorId?: string | undefined;
|
|
177
177
|
}>>;
|
|
178
178
|
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
threadExists: boolean;
|
|
179
180
|
messageList: MessageList;
|
|
180
181
|
processorStates: Map<string, ProcessorState<undefined>>;
|
|
181
|
-
threadExists: boolean;
|
|
182
|
-
tripwire?: {
|
|
183
|
-
reason: string;
|
|
184
|
-
metadata?: unknown;
|
|
185
|
-
retry?: boolean | undefined;
|
|
186
|
-
processorId?: string | undefined;
|
|
187
|
-
} | undefined;
|
|
188
182
|
thread?: {
|
|
189
183
|
resourceId: string;
|
|
190
184
|
id: string;
|
|
@@ -193,16 +187,16 @@ export declare const prepareMemoryStepOutputSchema: z.ZodObject<{
|
|
|
193
187
|
metadata?: Record<string, any> | undefined;
|
|
194
188
|
title?: string | undefined;
|
|
195
189
|
} | undefined;
|
|
196
|
-
}, {
|
|
197
|
-
messageList: MessageList;
|
|
198
|
-
processorStates: Map<string, ProcessorState<undefined>>;
|
|
199
|
-
threadExists: boolean;
|
|
200
190
|
tripwire?: {
|
|
201
191
|
reason: string;
|
|
202
192
|
metadata?: unknown;
|
|
203
193
|
retry?: boolean | undefined;
|
|
204
194
|
processorId?: string | undefined;
|
|
205
195
|
} | undefined;
|
|
196
|
+
}, {
|
|
197
|
+
threadExists: boolean;
|
|
198
|
+
messageList: MessageList;
|
|
199
|
+
processorStates: Map<string, ProcessorState<undefined>>;
|
|
206
200
|
thread?: {
|
|
207
201
|
resourceId: string;
|
|
208
202
|
id: string;
|
|
@@ -211,6 +205,12 @@ export declare const prepareMemoryStepOutputSchema: z.ZodObject<{
|
|
|
211
205
|
metadata?: Record<string, any> | undefined;
|
|
212
206
|
title?: string | undefined;
|
|
213
207
|
} | undefined;
|
|
208
|
+
tripwire?: {
|
|
209
|
+
reason: string;
|
|
210
|
+
metadata?: unknown;
|
|
211
|
+
retry?: boolean | undefined;
|
|
212
|
+
processorId?: string | undefined;
|
|
213
|
+
} | undefined;
|
|
214
214
|
}>;
|
|
215
215
|
export type PrepareMemoryStepOutput = z.infer<typeof prepareMemoryStepOutputSchema>;
|
|
216
216
|
export type PrepareToolsStepOutput = z.infer<typeof prepareToolsStepOutputSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDA4DHOEO_cjs = require('./chunk-DA4DHOEO.cjs');
|
|
4
|
+
var chunk365DUMWC_cjs = require('./chunk-365DUMWC.cjs');
|
|
5
5
|
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
6
6
|
var schemaCompat = require('@mastra/schema-compat');
|
|
7
7
|
var zodToJson = require('@mastra/schema-compat/zod-to-json');
|
|
@@ -95,7 +95,7 @@ function raceWithSignal(promise, signal) {
|
|
|
95
95
|
async function executeAgent(agent, item, signal) {
|
|
96
96
|
const model = await agent.getModel();
|
|
97
97
|
const input = item.input;
|
|
98
|
-
const rawResult =
|
|
98
|
+
const rawResult = chunk365DUMWC_cjs.isSupportedLanguageModel(model) ? await agent.generate(input, {
|
|
99
99
|
scorers: {},
|
|
100
100
|
returnScorerData: true,
|
|
101
101
|
abortSignal: signal
|
|
@@ -189,7 +189,7 @@ async function runScorersForItem(scorers, item, output, storage, runId, targetTy
|
|
|
189
189
|
const result = await runScorerSafe(scorer, item, output, scorerInput, scorerOutput);
|
|
190
190
|
if (storage && result.score !== null) {
|
|
191
191
|
try {
|
|
192
|
-
await
|
|
192
|
+
await chunkDA4DHOEO_cjs.validateAndSaveScore(storage, {
|
|
193
193
|
scorerId: scorer.id,
|
|
194
194
|
score: result.score,
|
|
195
195
|
reason: result.reason ?? void 0,
|
|
@@ -1214,5 +1214,5 @@ exports.isRegression = isRegression;
|
|
|
1214
1214
|
exports.resolveScorers = resolveScorers;
|
|
1215
1215
|
exports.runExperiment = runExperiment;
|
|
1216
1216
|
exports.runScorersForItem = runScorersForItem;
|
|
1217
|
-
//# sourceMappingURL=chunk-
|
|
1218
|
-
//# sourceMappingURL=chunk-
|
|
1217
|
+
//# sourceMappingURL=chunk-2CQN7RXY.cjs.map
|
|
1218
|
+
//# sourceMappingURL=chunk-2CQN7RXY.cjs.map
|