@mastra/core 1.3.0 → 1.4.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 +231 -0
- package/datasets.d.ts +1 -0
- package/dist/agent/agent.d.ts +1 -1
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/adapters/AIV4Adapter.d.ts.map +1 -1
- package/dist/agent/message-list/adapters/AIV5Adapter.d.ts.map +1 -1
- package/dist/agent/message-list/conversion/output-converter.d.ts +2 -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 +1 -1
- package/dist/{chunk-WL3AW3YA.js → chunk-3X3CZUXI.js} +4070 -3983
- package/dist/chunk-3X3CZUXI.js.map +1 -0
- package/dist/{chunk-2GWTJFVM.js → chunk-4EHGOATH.js} +46 -14
- package/dist/chunk-4EHGOATH.js.map +1 -0
- package/dist/{chunk-CGPH7CMG.cjs → chunk-4KFEMXTV.cjs} +46 -14
- package/dist/chunk-4KFEMXTV.cjs.map +1 -0
- package/dist/{chunk-SIZEIYNH.js → chunk-4X2YMIAC.js} +254 -18
- package/dist/chunk-4X2YMIAC.js.map +1 -0
- package/dist/{chunk-OOCEAC6U.cjs → chunk-65PHUUMF.cjs} +3 -3
- package/dist/{chunk-OOCEAC6U.cjs.map → chunk-65PHUUMF.cjs.map} +1 -1
- package/dist/{chunk-57QAF2ZQ.js → chunk-6BAACGEW.js} +4 -4
- package/dist/{chunk-57QAF2ZQ.js.map → chunk-6BAACGEW.js.map} +1 -1
- package/dist/{chunk-JNE2ABVB.js → chunk-7NKUSQEV.js} +1094 -10
- package/dist/chunk-7NKUSQEV.js.map +1 -0
- package/dist/{chunk-ZHFM7HCQ.js → chunk-AXHBJ4GX.js} +3 -3
- package/dist/{chunk-ZHFM7HCQ.js.map → chunk-AXHBJ4GX.js.map} +1 -1
- package/dist/{chunk-ILQXPZCD.js → chunk-AY6DBRS3.js} +37 -21
- package/dist/chunk-AY6DBRS3.js.map +1 -0
- package/dist/{chunk-TERSHTY5.cjs → chunk-BP7VYTOP.cjs} +1116 -21
- package/dist/chunk-BP7VYTOP.cjs.map +1 -0
- package/dist/{chunk-UE2G2LRP.cjs → chunk-CZ4NQANZ.cjs} +37 -21
- package/dist/chunk-CZ4NQANZ.cjs.map +1 -0
- package/dist/{chunk-EUG4AON3.cjs → chunk-EFLVACWV.cjs} +8 -7
- package/dist/{chunk-EUG4AON3.cjs.map → chunk-EFLVACWV.cjs.map} +1 -1
- package/dist/{chunk-BXLLXTT4.js → chunk-FLPEGTEK.js} +4 -4
- package/dist/{chunk-BXLLXTT4.js.map → chunk-FLPEGTEK.js.map} +1 -1
- package/dist/{chunk-ON2KVIUJ.cjs → chunk-HYRYTTMT.cjs} +7 -7
- package/dist/{chunk-ON2KVIUJ.cjs.map → chunk-HYRYTTMT.cjs.map} +1 -1
- package/dist/chunk-NY5XBRWW.cjs +1207 -0
- package/dist/chunk-NY5XBRWW.cjs.map +1 -0
- package/dist/{chunk-44SUGDBR.js → chunk-PS5ONCXY.js} +109 -5
- package/dist/chunk-PS5ONCXY.js.map +1 -0
- package/dist/{chunk-KUTU2YZF.js → chunk-RNID4D45.js} +5 -5
- package/dist/{chunk-KUTU2YZF.js.map → chunk-RNID4D45.js.map} +1 -1
- package/dist/{chunk-VM25PDSW.js → chunk-RZ4CIIZR.js} +4 -4
- package/dist/{chunk-VM25PDSW.js.map → chunk-RZ4CIIZR.js.map} +1 -1
- package/dist/{chunk-PHYJYZ32.js → chunk-SK72J5NQ.js} +16 -8
- package/dist/chunk-SK72J5NQ.js.map +1 -0
- package/dist/{chunk-C3XU7ZDC.cjs → chunk-SU5APAM6.cjs} +123 -4
- package/dist/chunk-SU5APAM6.cjs.map +1 -0
- package/dist/{chunk-EH6SAGEO.cjs → chunk-U4YBKYRI.cjs} +72 -53
- package/dist/{chunk-EH6SAGEO.cjs.map → chunk-U4YBKYRI.cjs.map} +1 -1
- package/dist/{chunk-YNXIGRQE.cjs → chunk-UQ4SRS66.cjs} +319 -83
- package/dist/chunk-UQ4SRS66.cjs.map +1 -0
- package/dist/chunk-UZYMZNKB.js +1196 -0
- package/dist/chunk-UZYMZNKB.js.map +1 -0
- package/dist/{chunk-GCTAD6B7.cjs → chunk-VD5YA6RH.cjs} +12 -12
- package/dist/{chunk-GCTAD6B7.cjs.map → chunk-VD5YA6RH.cjs.map} +1 -1
- package/dist/{chunk-NCC45KOB.cjs → chunk-VJIWSASE.cjs} +7 -7
- package/dist/{chunk-NCC45KOB.cjs.map → chunk-VJIWSASE.cjs.map} +1 -1
- package/dist/{chunk-UHVG25VW.cjs → chunk-XXZUUDP4.cjs} +23 -15
- package/dist/chunk-XXZUUDP4.cjs.map +1 -0
- package/dist/{chunk-KAJNBNWP.cjs → chunk-YNNJLLFN.cjs} +4071 -3984
- package/dist/chunk-YNNJLLFN.cjs.map +1 -0
- package/dist/{chunk-3MJCJLZS.js → chunk-ZGSYSUIG.js} +24 -5
- package/dist/{chunk-3MJCJLZS.js.map → chunk-ZGSYSUIG.js.map} +1 -1
- package/dist/datasets/dataset.d.ts +153 -0
- package/dist/datasets/dataset.d.ts.map +1 -0
- package/dist/datasets/experiment/analytics/aggregate.d.ts +46 -0
- package/dist/datasets/experiment/analytics/aggregate.d.ts.map +1 -0
- package/dist/datasets/experiment/analytics/compare.d.ts +33 -0
- package/dist/datasets/experiment/analytics/compare.d.ts.map +1 -0
- package/dist/datasets/experiment/analytics/index.d.ts +9 -0
- package/dist/datasets/experiment/analytics/index.d.ts.map +1 -0
- package/dist/datasets/experiment/analytics/types.d.ts +103 -0
- package/dist/datasets/experiment/analytics/types.d.ts.map +1 -0
- package/dist/datasets/experiment/executor.d.ts +40 -0
- package/dist/datasets/experiment/executor.d.ts.map +1 -0
- package/dist/datasets/experiment/index.d.ts +31 -0
- package/dist/datasets/experiment/index.d.ts.map +1 -0
- package/dist/datasets/experiment/scorer.d.ts +21 -0
- package/dist/datasets/experiment/scorer.d.ts.map +1 -0
- package/dist/datasets/experiment/types.d.ts +140 -0
- package/dist/datasets/experiment/types.d.ts.map +1 -0
- package/dist/datasets/index.cjs +69 -0
- package/dist/datasets/index.cjs.map +1 -0
- package/dist/datasets/index.d.ts +6 -0
- package/dist/datasets/index.d.ts.map +1 -0
- package/dist/datasets/index.js +4 -0
- package/dist/datasets/index.js.map +1 -0
- package/dist/datasets/manager.d.ts +73 -0
- package/dist/datasets/manager.d.ts.map +1 -0
- package/dist/datasets/validation/errors.d.ts +44 -0
- package/dist/datasets/validation/errors.d.ts.map +1 -0
- package/dist/datasets/validation/index.d.ts +3 -0
- package/dist/datasets/validation/index.d.ts.map +1 -0
- package/dist/datasets/validation/validator.d.ts +24 -0
- package/dist/datasets/validation/validator.d.ts.map +1 -0
- package/dist/docs/SKILL.md +1 -3
- package/dist/docs/assets/SOURCE_MAP.json +436 -346
- package/dist/docs/references/docs-memory-observational-memory.md +86 -11
- package/dist/docs/references/docs-streaming-events.md +23 -0
- package/dist/docs/references/docs-workspace-filesystem.md +72 -1
- package/dist/docs/references/docs-workspace-overview.md +95 -12
- package/dist/docs/references/docs-workspace-sandbox.md +2 -0
- package/dist/docs/references/guides-agent-frameworks-ai-sdk.md +6 -2
- package/dist/docs/references/reference-ai-sdk-with-mastra.md +1 -1
- package/dist/docs/references/reference-memory-observational-memory.md +318 -9
- package/dist/docs/references/reference-streaming-workflows-stream.md +1 -0
- package/dist/docs/references/reference-workflows-workflow-methods-foreach.md +30 -0
- package/dist/docs/references/reference.md +3 -0
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/types.d.ts +21 -3
- package/dist/editor/types.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/features/index.cjs +1 -1
- package/dist/features/index.cjs.map +1 -1
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +1 -1
- package/dist/features/index.js.map +1 -1
- package/dist/index.cjs +2 -7
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/llm/index.cjs +10 -10
- package/dist/llm/index.js +2 -2
- package/dist/llm/model/provider-types.generated.d.ts +1694 -1659
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +1 -1
- 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.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 +1 -1
- package/dist/loop/workflows/errors.d.ts +4 -0
- package/dist/loop/workflows/errors.d.ts.map +1 -0
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +2 -0
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +5 -0
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/memory/types.d.ts +56 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/processors/index.cjs +41 -41
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/skills.d.ts +1 -1
- package/dist/processors/processors/skills.d.ts.map +1 -1
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/processors/trailing-assistant-guard.d.ts +34 -0
- package/dist/processors/trailing-assistant-guard.d.ts.map +1 -0
- package/dist/provider-registry-6LZAGQET.cjs +40 -0
- package/dist/{provider-registry-C6XCYX44.cjs.map → provider-registry-6LZAGQET.cjs.map} +1 -1
- package/dist/provider-registry-QUNT7S55.js +3 -0
- package/dist/{provider-registry-NWU4YFQW.js.map → provider-registry-QUNT7S55.js.map} +1 -1
- package/dist/provider-registry.json +4068 -3981
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/base.d.ts +4 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.cjs +87 -27
- package/dist/storage/constants.d.ts +21 -2
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/datasets/base.d.ts +83 -0
- package/dist/storage/domains/datasets/base.d.ts.map +1 -0
- package/dist/storage/domains/datasets/index.d.ts +3 -0
- package/dist/storage/domains/datasets/index.d.ts.map +1 -0
- package/dist/storage/domains/datasets/inmemory.d.ts +40 -0
- package/dist/storage/domains/datasets/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/experiments/base.d.ts +28 -0
- package/dist/storage/domains/experiments/base.d.ts.map +1 -0
- package/dist/storage/domains/experiments/index.d.ts +3 -0
- package/dist/storage/domains/experiments/index.d.ts.map +1 -0
- package/dist/storage/domains/experiments/inmemory.d.ts +28 -0
- package/dist/storage/domains/experiments/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/index.d.ts +3 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +9 -1
- package/dist/storage/domains/inmemory-db.d.ts.map +1 -1
- package/dist/storage/domains/mcp-clients/base.d.ts +47 -0
- package/dist/storage/domains/mcp-clients/base.d.ts.map +1 -0
- package/dist/storage/domains/mcp-clients/index.d.ts +3 -0
- package/dist/storage/domains/mcp-clients/index.d.ts.map +1 -0
- package/dist/storage/domains/mcp-clients/inmemory.d.ts +31 -0
- package/dist/storage/domains/mcp-clients/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +201 -117
- package/dist/storage/index.js +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +338 -3
- package/dist/storage/types.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/stream/types.d.ts +15 -0
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tool-provider/index.cjs +4 -0
- package/dist/tool-provider/index.cjs.map +1 -0
- package/dist/tool-provider/index.d.ts +2 -0
- package/dist/tool-provider/index.d.ts.map +1 -0
- package/dist/tool-provider/index.js +3 -0
- package/dist/tool-provider/index.js.map +1 -0
- package/dist/tool-provider/types.d.ts +113 -0
- package/dist/tool-provider/types.d.ts.map +1 -0
- package/dist/utils.cjs +23 -23
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts.map +1 -1
- package/dist/workflows/handlers/control-flow.d.ts.map +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/workflow.d.ts +2 -2
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/workspace/filesystem/filesystem.d.ts +5 -15
- package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts +18 -2
- package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/mastra-filesystem.d.ts +21 -1
- package/dist/workspace/filesystem/mastra-filesystem.d.ts.map +1 -1
- package/dist/workspace/index.cjs +41 -41
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/lifecycle.d.ts +49 -53
- package/dist/workspace/lifecycle.d.ts.map +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/mastra-sandbox.d.ts +3 -2
- package/dist/workspace/sandbox/mastra-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/sandbox.d.ts +3 -4
- package/dist/workspace/sandbox/sandbox.d.ts.map +1 -1
- package/dist/workspace/workspace.d.ts +2 -15
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/llm/model/provider-types.generated.d.ts +1694 -1659
- package/tool-provider.d.ts +1 -0
- package/dist/chunk-2GWTJFVM.js.map +0 -1
- package/dist/chunk-44SUGDBR.js.map +0 -1
- package/dist/chunk-C3XU7ZDC.cjs.map +0 -1
- package/dist/chunk-CGPH7CMG.cjs.map +0 -1
- package/dist/chunk-ILQXPZCD.js.map +0 -1
- package/dist/chunk-JNE2ABVB.js.map +0 -1
- package/dist/chunk-KAJNBNWP.cjs.map +0 -1
- package/dist/chunk-PHYJYZ32.js.map +0 -1
- package/dist/chunk-SIZEIYNH.js.map +0 -1
- package/dist/chunk-TERSHTY5.cjs.map +0 -1
- package/dist/chunk-UE2G2LRP.cjs.map +0 -1
- package/dist/chunk-UHVG25VW.cjs.map +0 -1
- package/dist/chunk-WL3AW3YA.js.map +0 -1
- package/dist/chunk-YNXIGRQE.cjs.map +0 -1
- package/dist/docs/references/reference-cli-mastra.md +0 -336
- package/dist/docs/references/reference-deployer-cloudflare.md +0 -56
- package/dist/provider-registry-C6XCYX44.cjs +0 -40
- package/dist/provider-registry-NWU4YFQW.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,236 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.4.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added Datasets and Experiments to core. Datasets let you store and version collections of test inputs with JSON Schema validation. Experiments let you run AI outputs against dataset items with configurable scorers to track quality over time. ([#12747](https://github.com/mastra-ai/mastra/pull/12747))
|
|
8
|
+
|
|
9
|
+
**New exports from `@mastra/core/datasets`:**
|
|
10
|
+
- `DatasetsManager` — orchestrates dataset CRUD, item versioning (SCD-2), and experiment execution
|
|
11
|
+
- `Dataset` — single-dataset handle for adding items and running experiments
|
|
12
|
+
|
|
13
|
+
**New storage domains:**
|
|
14
|
+
- `DatasetsStorage` — abstract base class for dataset persistence (datasets, items, versions)
|
|
15
|
+
- `ExperimentsStorage` — abstract base class for experiment lifecycle and result tracking
|
|
16
|
+
|
|
17
|
+
**Example:**
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { Mastra } from '@mastra/core';
|
|
21
|
+
|
|
22
|
+
const mastra = new Mastra({
|
|
23
|
+
/* ... */
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const dataset = await mastra.datasets.create({ name: 'my-eval-set' });
|
|
27
|
+
await dataset.addItems([{ input: { query: 'What is 2+2?' }, groundTruth: { answer: '4' } }]);
|
|
28
|
+
|
|
29
|
+
const result = await dataset.runExperiment({
|
|
30
|
+
targetType: 'agent',
|
|
31
|
+
targetId: 'my-agent',
|
|
32
|
+
scorerIds: ['accuracy'],
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- Fix LocalFilesystem.resolvePath handling of absolute paths and improve filesystem info. ([#12971](https://github.com/mastra-ai/mastra/pull/12971))
|
|
37
|
+
- Fix absolute path resolution: paths were incorrectly stripped of leading slashes and resolved relative to basePath, causing PermissionError for valid paths (e.g. skills processor accessing project-local skills directories).
|
|
38
|
+
- Make `FilesystemInfo` generic (`FilesystemInfo<TMetadata>`) so providers can type their metadata.
|
|
39
|
+
- Move provider-specific fields (`basePath`, `contained`) to metadata in LocalFilesystem.getInfo().
|
|
40
|
+
- Update LocalFilesystem.getInstructions() for uncontained filesystems to warn agents against listing /.
|
|
41
|
+
- Use FilesystemInfo type in WorkspaceInfo instead of duplicated inline shape.
|
|
42
|
+
|
|
43
|
+
- Add `workflow-step-progress` stream event for foreach workflow steps. Each iteration emits a progress event with `completedCount`, `totalCount`, `currentIndex`, `iterationStatus` (`success` | `failed` | `suspended`), and optional `iterationOutput`. Both the default and evented execution engines emit these events. ([#12838](https://github.com/mastra-ai/mastra/pull/12838))
|
|
44
|
+
|
|
45
|
+
The Mastra Studio UI now renders a progress bar with an N/total counter on foreach nodes, updating in real time as iterations complete:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
// Consuming progress events from the workflow stream
|
|
49
|
+
const run = workflow.createRun();
|
|
50
|
+
const result = await run.start({ inputData });
|
|
51
|
+
const stream = result.stream;
|
|
52
|
+
|
|
53
|
+
for await (const chunk of stream) {
|
|
54
|
+
if (chunk.type === 'workflow-step-progress') {
|
|
55
|
+
console.log(`${chunk.payload.completedCount}/${chunk.payload.totalCount} - ${chunk.payload.iterationStatus}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`@mastra/react`: The `mapWorkflowStreamChunkToWatchResult` reducer now accumulates `foreachProgress` from `workflow-step-progress` events into step state, making progress data available to React consumers via the existing workflow watch hooks.
|
|
61
|
+
|
|
62
|
+
- Added observational memory configuration support for stored agents. When creating or editing a stored agent in the playground, you can now enable observational memory and configure its settings including model provider/name, scope (thread or resource), share token budget, and detailed observer/reflector parameters like token limits, buffer settings, and blocking thresholds. The configuration is serialized as part of the agent's memory config and round-trips through storage. ([#12962](https://github.com/mastra-ai/mastra/pull/12962))
|
|
63
|
+
|
|
64
|
+
**Example usage in the playground:**
|
|
65
|
+
|
|
66
|
+
Enable the Observational Memory toggle in the Memory section, then configure:
|
|
67
|
+
- Top-level model (provider + model) used by both observer and reflector
|
|
68
|
+
- Scope: `thread` (per-conversation) or `resource` (shared across threads)
|
|
69
|
+
- Expand **Observer** or **Reflector** sections to override models and tune token budgets
|
|
70
|
+
|
|
71
|
+
**Programmatic usage via client SDK:**
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
await client.createStoredAgent({
|
|
75
|
+
name: 'My Agent',
|
|
76
|
+
// ...other config
|
|
77
|
+
memory: {
|
|
78
|
+
observationalMemory: true, // enable with defaults
|
|
79
|
+
options: { lastMessages: 40 },
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// Or with custom configuration:
|
|
84
|
+
await client.createStoredAgent({
|
|
85
|
+
name: 'My Agent',
|
|
86
|
+
memory: {
|
|
87
|
+
observationalMemory: {
|
|
88
|
+
model: 'google/gemini-2.5-flash',
|
|
89
|
+
scope: 'resource',
|
|
90
|
+
shareTokenBudget: true,
|
|
91
|
+
observation: { messageTokens: 50000 },
|
|
92
|
+
reflection: { observationTokens: 60000 },
|
|
93
|
+
},
|
|
94
|
+
options: { lastMessages: 40 },
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Programmatic usage via editor:**
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
await editor.agent.create({
|
|
103
|
+
name: 'My Agent',
|
|
104
|
+
// ...other config
|
|
105
|
+
memory: {
|
|
106
|
+
observationalMemory: true, // enable with defaults
|
|
107
|
+
options: { lastMessages: 40 },
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Or with custom configuration:
|
|
112
|
+
await editor.agent.create({
|
|
113
|
+
name: 'My Agent',
|
|
114
|
+
memory: {
|
|
115
|
+
observationalMemory: {
|
|
116
|
+
model: 'google/gemini-2.5-flash',
|
|
117
|
+
scope: 'resource',
|
|
118
|
+
shareTokenBudget: true,
|
|
119
|
+
observation: { messageTokens: 50000 },
|
|
120
|
+
reflection: { observationTokens: 60000 },
|
|
121
|
+
},
|
|
122
|
+
options: { lastMessages: 40 },
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- Added MCP client storage domain and ToolProvider interface for integrating external tool catalogs with stored agents. ([#12974](https://github.com/mastra-ai/mastra/pull/12974))
|
|
128
|
+
|
|
129
|
+
**MCP Client Storage**
|
|
130
|
+
|
|
131
|
+
New storage domain for persisting MCP client configurations with CRUD operations. Each MCP client can contain multiple servers with independent tool selection:
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
// Store an MCP client with multiple servers
|
|
135
|
+
await storage.mcpClients.create({
|
|
136
|
+
id: 'my-mcp',
|
|
137
|
+
name: 'My MCP Client',
|
|
138
|
+
servers: {
|
|
139
|
+
'github-server': { url: 'https://mcp.github.com/sse' },
|
|
140
|
+
'slack-server': { url: 'https://mcp.slack.com/sse' },
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
LibSQL, PostgreSQL, and MongoDB storage adapters all implement the new MCP client domain.
|
|
146
|
+
|
|
147
|
+
**ToolProvider Interface**
|
|
148
|
+
|
|
149
|
+
New `ToolProvider` interface at `@mastra/core/tool-provider` enables third-party tool catalog integration (e.g., Composio, Arcade AI):
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import type { ToolProvider } from '@mastra/core/tool-provider';
|
|
153
|
+
|
|
154
|
+
# Providers implement: listToolkits(), listTools(), getToolSchema(), resolveTools()
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`resolveTools()` receives `requestContext` from the current request, enabling per-user API keys and credentials in multi-tenant setups:
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
const tools = await provider.resolveTools(slugs, configs, {
|
|
161
|
+
requestContext: { apiKey: 'user-specific-key', userId: 'tenant-123' },
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Tool Selection Semantics**
|
|
166
|
+
|
|
167
|
+
Both `mcpClients` and `integrationTools` on stored agents follow consistent three-state selection:
|
|
168
|
+
- `{ tools: undefined }` — provider registered, no tools selected
|
|
169
|
+
- `{ tools: {} }` — all tools from provider included
|
|
170
|
+
- `{ tools: { 'TOOL_SLUG': { description: '...' } } }` — specific tools with optional overrides
|
|
171
|
+
|
|
172
|
+
- **Added** ([#12764](https://github.com/mastra-ai/mastra/pull/12764))
|
|
173
|
+
Added a `suppressFeedback` option to hide internal completion‑check messages from the stream. This keeps the conversation history clean while leaving existing behavior unchanged by default.
|
|
174
|
+
|
|
175
|
+
**Example**
|
|
176
|
+
Before:
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
const agent = await mastra.createAgent({
|
|
180
|
+
completion: { validate: true },
|
|
181
|
+
});
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
After:
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
const agent = await mastra.createAgent({
|
|
188
|
+
completion: { validate: true, suppressFeedback: true },
|
|
189
|
+
});
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
- **Split workspace lifecycle interfaces** ([#12978](https://github.com/mastra-ai/mastra/pull/12978))
|
|
193
|
+
|
|
194
|
+
The shared `Lifecycle` interface has been split into provider-specific types that match actual usage:
|
|
195
|
+
- `FilesystemLifecycle` — two-phase: `init()` → `destroy()`
|
|
196
|
+
- `SandboxLifecycle` — three-phase: `start()` → `stop()` → `destroy()`
|
|
197
|
+
|
|
198
|
+
The base `Lifecycle` type is still exported for backward compatibility.
|
|
199
|
+
|
|
200
|
+
**Added `onInit` / `onDestroy` callbacks to `MastraFilesystem`**
|
|
201
|
+
|
|
202
|
+
The `MastraFilesystem` base class now accepts optional lifecycle callbacks via `MastraFilesystemOptions`, matching the existing `onStart` / `onStop` / `onDestroy` callbacks on `MastraSandbox`.
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const fs = new LocalFilesystem({
|
|
206
|
+
basePath: './data',
|
|
207
|
+
onInit: ({ filesystem }) => {
|
|
208
|
+
console.log('Filesystem ready:', filesystem.status);
|
|
209
|
+
},
|
|
210
|
+
onDestroy: ({ filesystem }) => {
|
|
211
|
+
console.log('Cleaning up...');
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
`onInit` fires after the filesystem reaches `ready` status (non-fatal on failure). `onDestroy` fires before the filesystem is torn down.
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- Update provider registry and model documentation with latest models and providers ([`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b))
|
|
221
|
+
|
|
222
|
+
- Fixed agent version storage to persist the requestContextSchema field. Previously, requestContextSchema was defined on the agent snapshot type but was not included in the database schema, INSERT statements, or row parsing logic, causing it to be silently dropped when saving and loading agent versions. ([#13003](https://github.com/mastra-ai/mastra/pull/13003))
|
|
223
|
+
|
|
224
|
+
- Fixed Anthropic API rejection errors caused by empty text content blocks in assistant messages. During streaming with web search citations, empty text parts could be persisted to the database and then rejected by Anthropic's API with 'text content blocks must be non-empty' errors. The fix filters out these empty text blocks before persistence, ensuring stored conversation history remains valid for Anthropic models. Fixes `#12553`. ([#12711](https://github.com/mastra-ai/mastra/pull/12711))
|
|
225
|
+
|
|
226
|
+
- Improve error messages when processor workflows or model fallback retries fail. ([#12970](https://github.com/mastra-ai/mastra/pull/12970))
|
|
227
|
+
- Include the last error message and cause when all fallback models are exhausted, instead of the generic "Exhausted all fallback models" message.
|
|
228
|
+
- Extract error details from failed workflow results and individual step failures when a processor workflow fails, instead of just reporting "failed with status: failed".
|
|
229
|
+
|
|
230
|
+
- Fixed tool-not-found errors crashing the agentic loop. When a model hallucinates a tool name (e.g., Gemini 3 Flash adding prefixes like `creating:view` instead of `view`), the error is now returned to the model as a tool result instead of throwing. This allows the model to self-correct and retry with the correct tool name on the next turn. The error message includes available tool names to help the model recover. Fixes #12895. ([#12961](https://github.com/mastra-ai/mastra/pull/12961))
|
|
231
|
+
|
|
232
|
+
- Fixed structured output failing with Anthropic models when memory is enabled. The error "assistant message in the final position" occurred because the prompt sent to Anthropic ended with an assistant-role message, which is not supported when using output format. Resolves https://github.com/mastra-ai/mastra/issues/12800 ([#12835](https://github.com/mastra-ai/mastra/pull/12835))
|
|
233
|
+
|
|
3
234
|
## 1.3.0
|
|
4
235
|
|
|
5
236
|
### Minor Changes
|
package/datasets.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/datasets';
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
81
|
constructor(config: AgentConfig<TAgentId, TTools, TOutput, TRequestContext>);
|
|
82
|
-
getMastraInstance(): Mastra<Record<string, Agent<any, ToolsInput, undefined, unknown>>, Record<string, AnyWorkflow>, Record<string, import("
|
|
82
|
+
getMastraInstance(): Mastra<Record<string, Agent<any, ToolsInput, undefined, unknown>>, Record<string, AnyWorkflow>, Record<string, import("../vector").MastraVector<any>>, Record<string, import("../tts").MastraTTS>, import("../logger").IMastraLogger, Record<string, import("../mcp").MCPServerBase<any>>, Record<string, MastraScorer<any, any, any, any>>, Record<string, import("../tools").ToolAction<any, any, any, any, any, any, unknown>>, Record<string, Processor<any, unknown>>, Record<string, MastraMemory>> | undefined;
|
|
83
83
|
/**
|
|
84
84
|
* Gets the skills processors to add to input processors when workspace has skills.
|
|
85
85
|
* @internal
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkUQ4SRS66_cjs = require('../chunk-UQ4SRS66.cjs');
|
|
4
|
+
var chunkCZ4NQANZ_cjs = require('../chunk-CZ4NQANZ.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 chunkUQ4SRS66_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkUQ4SRS66_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isSupportedLanguageModel", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkUQ4SRS66_cjs.isSupportedLanguageModel; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkUQ4SRS66_cjs.resolveThreadIdFromArgs; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkUQ4SRS66_cjs.supportedLanguageModelSpecifications; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkUQ4SRS66_cjs.tryGenerateWithJsonFallback; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkUQ4SRS66_cjs.tryStreamWithJsonFallback; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MessageList", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkCZ4NQANZ_cjs.MessageList; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "TypeDetector", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkCZ4NQANZ_cjs.TypeDetector; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "aiV5ModelMessageToV2PromptMessage", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkCZ4NQANZ_cjs.aiV5ModelMessageToV2PromptMessage; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "convertMessages", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkCZ4NQANZ_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-4X2YMIAC.js';
|
|
2
|
+
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-AY6DBRS3.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIV4Adapter.d.ts","sourceRoot":"","sources":["../../../../src/agent/message-list/adapters/AIV4Adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,IAAI,WAAW,EACxB,WAAW,IAAI,aAAa,EAE7B,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EACV,eAAe,EAIf,aAAa,EACb,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AIV4Adapter.d.ts","sourceRoot":"","sources":["../../../../src/agent/message-list/adapters/AIV4Adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,IAAI,WAAW,EACxB,WAAW,IAAI,aAAa,EAE7B,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EACV,eAAe,EAIf,aAAa,EACb,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AA8BxB,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9D,YAAY,IAAI,MAAM,CAAC;IACvB,iBAAiB,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvE,mDAAmD;IACnD,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,eAAe,GAAG,qBAAqB;IAiJ7D;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa;IAsB9D;;OAEG;IACH,MAAM,CAAC,aAAa,CAClB,OAAO,EAAE,WAAW,GAAG,qBAAqB,EAC5C,GAAG,EAAE,kBAAkB,EACvB,aAAa,EAAE,aAAa,GAC3B,eAAe;IA8BlB;;OAEG;IACH,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,aAAa,EAC1B,GAAG,EAAE,kBAAkB,EACvB,aAAa,EAAE,aAAa,GAC3B,eAAe;CAkPnB"}
|
|
@@ -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,
|
|
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;IA8N9D;;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"}
|
|
@@ -8,7 +8,8 @@ import type { AIV5Type } from '../types.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function sanitizeAIV4UIMessages(messages: UIMessageV4[]): UIMessageV4[];
|
|
10
10
|
/**
|
|
11
|
-
* Sanitizes AIV5 UI messages by filtering out streaming states, data-* parts, and optionally incomplete tool calls.
|
|
11
|
+
* Sanitizes AIV5 UI messages by filtering out streaming states, data-* parts, empty text parts, and optionally incomplete tool calls.
|
|
12
|
+
* Handles legacy data by filtering empty text parts that may exist in pre-existing DB records.
|
|
12
13
|
*/
|
|
13
14
|
export declare function sanitizeV5UIMessages(messages: AIV5Type.UIMessage[], filterIncompleteToolCalls?: boolean): AIV5Type.UIMessage[];
|
|
14
15
|
/**
|
|
@@ -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
|
|
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,CA0DtB;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,CA2BzB;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 chunkCZ4NQANZ_cjs = require('../../chunk-CZ4NQANZ.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 chunkCZ4NQANZ_cjs.AIV4Adapter; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "AIV5Adapter", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkCZ4NQANZ_cjs.AIV5Adapter; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "CacheKeyGenerator", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkCZ4NQANZ_cjs.CacheKeyGenerator; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "MessageList", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkCZ4NQANZ_cjs.MessageList; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "MessageMerger", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkCZ4NQANZ_cjs.MessageMerger; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "MessageStateManager", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkCZ4NQANZ_cjs.MessageStateManager; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "TypeDetector", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkCZ4NQANZ_cjs.TypeDetector; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "aiV4CoreMessageToV1PromptMessage", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkCZ4NQANZ_cjs.aiV4CoreMessageToV1PromptMessage; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "aiV5ModelMessageToV2PromptMessage", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkCZ4NQANZ_cjs.aiV5ModelMessageToV2PromptMessage; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "convertMessages", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkCZ4NQANZ_cjs.convertMessages; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "coreContentToString", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkCZ4NQANZ_cjs.coreContentToString; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "ensureAnthropicCompatibleMessages", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkCZ4NQANZ_cjs.ensureAnthropicCompatibleMessages; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ensureGeminiCompatibleMessages", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkCZ4NQANZ_cjs.ensureGeminiCompatibleMessages; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "findToolCallArgs", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkCZ4NQANZ_cjs.findToolCallArgs; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "getOpenAIReasoningItemId", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkCZ4NQANZ_cjs.getOpenAIReasoningItemId; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "hasOpenAIReasoningItemId", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkCZ4NQANZ_cjs.hasOpenAIReasoningItemId; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "messagesAreEqual", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkCZ4NQANZ_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-AY6DBRS3.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -36,7 +36,7 @@ interface CreatePrepareStreamWorkflowOptions<OUTPUT = undefined> {
|
|
|
36
36
|
toolCallId?: string;
|
|
37
37
|
workspace?: Workspace;
|
|
38
38
|
}
|
|
39
|
-
export declare function createPrepareStreamWorkflow<OUTPUT = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, requestContext, agentSpan, methodType, instructions, memoryConfig, memory, returnScorerData, saveQueueManager, requireToolApproval, toolCallConcurrency, resumeContext, agentId, agentName, toolCallId, workspace, }: CreatePrepareStreamWorkflowOptions<OUTPUT>): import("
|
|
39
|
+
export declare function createPrepareStreamWorkflow<OUTPUT = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, requestContext, agentSpan, methodType, instructions, memoryConfig, memory, returnScorerData, saveQueueManager, requireToolApproval, toolCallConcurrency, resumeContext, agentId, agentName, toolCallId, workspace, }: CreatePrepareStreamWorkflowOptions<OUTPUT>): import("../../../workflows").Workflow<import("../../../workflows").DefaultEngineType, (import("../../../workflows").Step<"prepare-tools-step", any, {}, {
|
|
40
40
|
convertedTools: Record<string, {
|
|
41
41
|
args?: Record<string, any> | undefined;
|
|
42
42
|
type?: "function" | "provider-defined" | undefined;
|