@mastra/core 1.0.0-beta.6 → 1.0.0-beta.8
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 +195 -0
- package/dist/agent/agent-legacy.d.ts.map +1 -1
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +9 -9
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +3 -3
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
- package/dist/{chunk-NHNXIYDG.cjs → chunk-3EYBRHB2.cjs} +2 -2
- package/dist/chunk-3EYBRHB2.cjs.map +1 -0
- package/dist/{chunk-AQAIS7FH.cjs → chunk-3JA6VPNM.cjs} +2 -2
- package/dist/chunk-3JA6VPNM.cjs.map +1 -0
- package/dist/{chunk-WDRA4WKG.js → chunk-4GTU7MB2.js} +5 -5
- package/dist/{chunk-WDRA4WKG.js.map → chunk-4GTU7MB2.js.map} +1 -1
- package/dist/{chunk-S5FPOCQF.cjs → chunk-6BYHQ52F.cjs} +24 -24
- package/dist/{chunk-S5FPOCQF.cjs.map → chunk-6BYHQ52F.cjs.map} +1 -1
- package/dist/{chunk-RTROJFEU.cjs → chunk-6C2PU6J4.cjs} +8 -8
- package/dist/{chunk-RTROJFEU.cjs.map → chunk-6C2PU6J4.cjs.map} +1 -1
- package/dist/{chunk-6GOLI2EY.js → chunk-7PXCGGMO.js} +8 -12
- package/dist/chunk-7PXCGGMO.js.map +1 -0
- package/dist/chunk-AZQMPE7G.cjs +4981 -0
- package/dist/chunk-AZQMPE7G.cjs.map +1 -0
- package/dist/{chunk-HNHZGFZY.cjs → chunk-CZEJQSWB.cjs} +10 -2
- package/dist/chunk-CZEJQSWB.cjs.map +1 -0
- package/dist/{chunk-APMPOYPI.js → chunk-DMPHPHMU.js} +3 -3
- package/dist/{chunk-APMPOYPI.js.map → chunk-DMPHPHMU.js.map} +1 -1
- package/dist/{chunk-45NA5ZD3.js → chunk-EDNHZZUP.js} +160 -60
- package/dist/chunk-EDNHZZUP.js.map +1 -0
- package/dist/{chunk-LEZIKVRQ.js → chunk-F54IK3GJ.js} +2 -2
- package/dist/chunk-F54IK3GJ.js.map +1 -0
- package/dist/{chunk-FYP3AT6W.js → chunk-FNSFXWDN.js} +2 -2
- package/dist/chunk-FNSFXWDN.js.map +1 -0
- package/dist/{chunk-XY337TTF.js → chunk-GW7BNMGA.js} +4 -4
- package/dist/{chunk-XY337TTF.js.map → chunk-GW7BNMGA.js.map} +1 -1
- package/dist/{chunk-OPALPWAM.js → chunk-HDMH5IDV.js} +42 -5
- package/dist/chunk-HDMH5IDV.js.map +1 -0
- package/dist/{chunk-NN3NOFRU.cjs → chunk-HP6TRJ2Q.cjs} +207 -106
- package/dist/chunk-HP6TRJ2Q.cjs.map +1 -0
- package/dist/{chunk-3TKNXJES.cjs → chunk-KBXFAF37.cjs} +46 -6
- package/dist/chunk-KBXFAF37.cjs.map +1 -0
- package/dist/{chunk-7ZADRRDW.js → chunk-PK2A5WBG.js} +3 -3
- package/dist/chunk-PK2A5WBG.js.map +1 -0
- package/dist/{chunk-DXMSVGJ6.js → chunk-QDIYYAA4.js} +28 -59
- package/dist/chunk-QDIYYAA4.js.map +1 -0
- package/dist/{chunk-TARWUQG6.js → chunk-QHJ7YVNX.js} +8 -8
- package/dist/{chunk-TARWUQG6.js.map → chunk-QHJ7YVNX.js.map} +1 -1
- package/dist/{chunk-IWTMMUQY.cjs → chunk-QYNZAPFE.cjs} +4 -4
- package/dist/{chunk-IWTMMUQY.cjs.map → chunk-QYNZAPFE.cjs.map} +1 -1
- package/dist/{chunk-TS7B26US.js → chunk-RWT3XPKO.js} +3 -3
- package/dist/{chunk-TS7B26US.js.map → chunk-RWT3XPKO.js.map} +1 -1
- package/dist/{chunk-LDWBLENZ.cjs → chunk-SD2BDUJ6.cjs} +28 -32
- package/dist/chunk-SD2BDUJ6.cjs.map +1 -0
- package/dist/{chunk-NIUEWICQ.js → chunk-SPIUKQDK.js} +8 -8
- package/dist/{chunk-NIUEWICQ.js.map → chunk-SPIUKQDK.js.map} +1 -1
- package/dist/chunk-TLLXRG2Z.js +4959 -0
- package/dist/chunk-TLLXRG2Z.js.map +1 -0
- package/dist/{chunk-SVLMF4UZ.cjs → chunk-TQB2HMEC.cjs} +45 -44
- package/dist/chunk-TQB2HMEC.cjs.map +1 -0
- package/dist/{chunk-KZLP6TPJ.js → chunk-URBPEE67.js} +4 -4
- package/dist/{chunk-KZLP6TPJ.js.map → chunk-URBPEE67.js.map} +1 -1
- package/dist/{chunk-6J4NRNT2.cjs → chunk-VWC5AUOQ.cjs} +29 -60
- package/dist/chunk-VWC5AUOQ.cjs.map +1 -0
- package/dist/{chunk-4KUOSXJ7.cjs → chunk-Y5SFNZUK.cjs} +11 -11
- package/dist/{chunk-4KUOSXJ7.cjs.map → chunk-Y5SFNZUK.cjs.map} +1 -1
- package/dist/{chunk-OIMB2SNZ.cjs → chunk-Y7YCQDML.cjs} +14 -14
- package/dist/{chunk-OIMB2SNZ.cjs.map → chunk-Y7YCQDML.cjs.map} +1 -1
- package/dist/{chunk-VRFSEZBA.cjs → chunk-YBEW5YWC.cjs} +6 -6
- package/dist/{chunk-VRFSEZBA.cjs.map → chunk-YBEW5YWC.cjs.map} +1 -1
- package/dist/{chunk-SQAX4OW6.cjs → chunk-YUXTDKYN.cjs} +15 -15
- package/dist/{chunk-SQAX4OW6.cjs.map → chunk-YUXTDKYN.cjs.map} +1 -1
- package/dist/{chunk-RHTV5C5D.cjs → chunk-YWMMBIOM.cjs} +9 -9
- package/dist/{chunk-RHTV5C5D.cjs.map → chunk-YWMMBIOM.cjs.map} +1 -1
- package/dist/{chunk-WMAMOYRR.js → chunk-Z57R5WS4.js} +4 -4
- package/dist/{chunk-WMAMOYRR.js.map → chunk-Z57R5WS4.js.map} +1 -1
- package/dist/{chunk-QM5SRDJX.js → chunk-ZUWJCGLM.js} +5 -4
- package/dist/chunk-ZUWJCGLM.js.map +1 -0
- package/dist/evals/index.cjs +9 -9
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/evals/types.d.ts +19 -18
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +15 -15
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/gateways/constants.d.ts.map +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/provider-options.d.ts +4 -1
- package/dist/llm/model/provider-options.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +12 -22
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- 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 +6 -6
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-6GD3644V.js +3 -0
- package/dist/{models-dev-F6MTIYTO.js.map → models-dev-6GD3644V.js.map} +1 -1
- package/dist/models-dev-IUQBXJSS.cjs +12 -0
- package/dist/{models-dev-XIVR5EJV.cjs.map → models-dev-IUQBXJSS.cjs.map} +1 -1
- package/dist/netlify-GXJ5D5DD.js +3 -0
- package/dist/{netlify-C2YBIK7A.js.map → netlify-GXJ5D5DD.js.map} +1 -1
- package/dist/netlify-KJLY3GFS.cjs +12 -0
- package/dist/{netlify-XWROOTP4.cjs.map → netlify-KJLY3GFS.cjs.map} +1 -1
- package/dist/observability/index.cjs +10 -10
- package/dist/observability/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +18 -0
- package/dist/observability/types/tracing.d.ts.map +1 -1
- package/dist/processors/index.cjs +17 -17
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-A5QZFI2X.js +3 -0
- package/dist/{provider-registry-GRYJWVEM.js.map → provider-registry-A5QZFI2X.js.map} +1 -1
- package/dist/provider-registry-V32PGH6F.cjs +40 -0
- package/dist/{provider-registry-BXX7CA3H.cjs.map → provider-registry-V32PGH6F.cjs.map} +1 -1
- package/dist/provider-registry.json +24 -55
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +1 -1
- package/dist/storage/base.d.ts +22 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/base.d.ts +2 -2
- package/dist/storage/domains/scores/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/inmemory.d.ts +2 -2
- package/dist/storage/domains/scores/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +43 -31
- package/dist/storage/index.js +1 -1
- package/dist/storage/mock.d.ts +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/storageWithInit.d.ts.map +1 -1
- package/dist/storage/utils.d.ts +38 -0
- package/dist/storage/utils.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +3 -2
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/input.d.ts +4 -1
- package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- package/dist/test-utils/llm-mock.cjs +13 -13
- package/dist/test-utils/llm-mock.cjs.map +1 -1
- package/dist/test-utils/llm-mock.js +6 -6
- package/dist/test-utils/llm-mock.js.map +1 -1
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.js +1 -1
- package/dist/tools/stream.d.ts +17 -1
- package/dist/tools/stream.d.ts.map +1 -1
- package/dist/tools/types.d.ts +2 -2
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils.cjs +22 -22
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.js +1 -1
- package/dist/workflows/default.d.ts +2 -2
- package/dist/workflows/default.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/handlers/control-flow.d.ts.map +1 -1
- package/dist/workflows/handlers/step.d.ts.map +1 -1
- package/dist/workflows/index.cjs +24 -20
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts +5 -5
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +1 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +10 -1
- package/dist/workflows/utils.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +1 -1
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/llm/model/provider-types.generated.d.ts +12 -22
- package/dist/chunk-3TKNXJES.cjs.map +0 -1
- package/dist/chunk-45NA5ZD3.js.map +0 -1
- package/dist/chunk-6GOLI2EY.js.map +0 -1
- package/dist/chunk-6J4NRNT2.cjs.map +0 -1
- package/dist/chunk-7ZADRRDW.js.map +0 -1
- package/dist/chunk-AQAIS7FH.cjs.map +0 -1
- package/dist/chunk-DXMSVGJ6.js.map +0 -1
- package/dist/chunk-FYP3AT6W.js.map +0 -1
- package/dist/chunk-HNHZGFZY.cjs.map +0 -1
- package/dist/chunk-LDWBLENZ.cjs.map +0 -1
- package/dist/chunk-LEZIKVRQ.js.map +0 -1
- package/dist/chunk-NHNXIYDG.cjs.map +0 -1
- package/dist/chunk-NN3NOFRU.cjs.map +0 -1
- package/dist/chunk-OPALPWAM.js.map +0 -1
- package/dist/chunk-QGWNF2QJ.cjs +0 -1697
- package/dist/chunk-QGWNF2QJ.cjs.map +0 -1
- package/dist/chunk-QM5SRDJX.js.map +0 -1
- package/dist/chunk-SVLMF4UZ.cjs.map +0 -1
- package/dist/chunk-T2UNO766.js +0 -1694
- package/dist/chunk-T2UNO766.js.map +0 -1
- package/dist/models-dev-F6MTIYTO.js +0 -3
- package/dist/models-dev-XIVR5EJV.cjs +0 -12
- package/dist/netlify-C2YBIK7A.js +0 -3
- package/dist/netlify-XWROOTP4.cjs +0 -12
- package/dist/provider-registry-BXX7CA3H.cjs +0 -40
- package/dist/provider-registry-GRYJWVEM.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,200 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix saveScore not persisting ID correctly, breaking getScoreById retrieval ([#10915](https://github.com/mastra-ai/mastra/pull/10915))
|
|
8
|
+
|
|
9
|
+
**What Changed**
|
|
10
|
+
- saveScore now correctly returns scores that can be retrieved with getScoreById
|
|
11
|
+
- Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
|
|
12
|
+
|
|
13
|
+
**Impact**
|
|
14
|
+
Previously, calling getScoreById after saveScore would return null because the generated ID wasn't persisted to the database. This is now fixed across all store implementations, ensuring consistent behavior and data integrity.
|
|
15
|
+
|
|
16
|
+
- `setState` is now async ([#10944](https://github.com/mastra-ai/mastra/pull/10944))
|
|
17
|
+
- `setState` must now be awaited: `await setState({ key: value })`
|
|
18
|
+
- State updates are merged automatically—no need to spread the previous state
|
|
19
|
+
- State data is validated against the step's `stateSchema` when `validateInputs` is enabled (default: `true`)
|
|
20
|
+
|
|
21
|
+
- Add human-in-the-loop support for workflows used in agent ([#10871](https://github.com/mastra-ai/mastra/pull/10871))
|
|
22
|
+
|
|
23
|
+
## 1.0.0-beta.7
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
|
|
28
|
+
|
|
29
|
+
Adds a new `disableInit` config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with `disableInit: true` so it doesn't attempt schema changes at runtime.
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// CI/CD script - run migrations
|
|
33
|
+
const storage = new PostgresStore({
|
|
34
|
+
connectionString: DATABASE_URL,
|
|
35
|
+
id: 'pg-storage',
|
|
36
|
+
});
|
|
37
|
+
await storage.init();
|
|
38
|
+
|
|
39
|
+
// Runtime - skip auto-init
|
|
40
|
+
const storage = new PostgresStore({
|
|
41
|
+
connectionString: DATABASE_URL,
|
|
42
|
+
id: 'pg-storage',
|
|
43
|
+
disableInit: true,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Add time-to-first-token (TTFT) support for Langfuse integration ([#10781](https://github.com/mastra-ai/mastra/pull/10781))
|
|
50
|
+
|
|
51
|
+
Adds `completionStartTime` to model generation spans, which Langfuse uses to calculate TTFT metrics. The timestamp is automatically captured when the first content chunk arrives during streaming.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// completionStartTime is now automatically captured and sent to Langfuse
|
|
55
|
+
// enabling TTFT metrics in your Langfuse dashboard
|
|
56
|
+
const result = await agent.stream('Hello');
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- Updated OtelExporters, Bridge, and Arize packages to better implement GenAI v1.38.0 Otel Semantic Conventions. See: ([#10591](https://github.com/mastra-ai/mastra/pull/10591))
|
|
60
|
+
https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
|
|
61
|
+
|
|
62
|
+
- Standardize error IDs across all storage and vector stores using centralized helper functions (`createStorageErrorId` and `createVectorErrorId`). This ensures consistent error ID patterns (`MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS}` and `MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}`) across the codebase for better error tracking and debugging. ([#10913](https://github.com/mastra-ai/mastra/pull/10913))
|
|
63
|
+
|
|
64
|
+
- fix: generate unique text IDs for Anthropic/Google providers ([#10740](https://github.com/mastra-ai/mastra/pull/10740))
|
|
65
|
+
|
|
66
|
+
Workaround for duplicate text-start/text-end IDs in multi-step agentic flows.
|
|
67
|
+
|
|
68
|
+
The `@ai-sdk/anthropic` and `@ai-sdk/google` providers use numeric indices ("0", "1", etc.) for text block IDs that reset for each LLM call. This caused duplicate IDs when an agent does TEXT → TOOL → TEXT, breaking message ordering and storage.
|
|
69
|
+
|
|
70
|
+
The fix replaces numeric IDs with UUIDs, maintaining a map per step so text-start, text-delta, and text-end chunks for the same block share the same UUID. OpenAI's UUIDs pass through unchanged.
|
|
71
|
+
|
|
72
|
+
Related: #9909
|
|
73
|
+
|
|
74
|
+
- Fix sub-agent requestContext propagation in listAgentTools ([#10844](https://github.com/mastra-ai/mastra/pull/10844))
|
|
75
|
+
|
|
76
|
+
Sub-agents with dynamic model configurations were broken because `requestContext` was not being passed to `getModel()` when creating agent tools. This caused sub-agents using function-based model configurations to receive an empty context instead of the parent's context.
|
|
77
|
+
|
|
78
|
+
No code changes required for consumers - this fix restores expected behavior for dynamic model configurations in sub-agents.
|
|
79
|
+
|
|
80
|
+
- Fix ToolStream type error when piping streams with different types ([#10845](https://github.com/mastra-ai/mastra/pull/10845))
|
|
81
|
+
|
|
82
|
+
Changes `ToolStream` to extend `WritableStream<unknown>` instead of `WritableStream<T>`. This fixes the TypeScript error when piping `objectStream` or `fullStream` to `writer` in workflow steps.
|
|
83
|
+
|
|
84
|
+
Before:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
// TypeError: ToolStream<ChunkType> is not assignable to WritableStream<Partial<StoryPlan>>
|
|
88
|
+
await response.objectStream.pipeTo(writer);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
After:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
// Works without type errors
|
|
95
|
+
await response.objectStream.pipeTo(writer);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- feat: add native Perplexity provider support ([#10885](https://github.com/mastra-ai/mastra/pull/10885))
|
|
99
|
+
|
|
100
|
+
- When sending the first message to a new thread with PostgresStore, users would get a "Thread not found" error. This happened because the thread was created in memory but not persisted to the database before the MessageHistory output processor tried to save messages. ([#10881](https://github.com/mastra-ai/mastra/pull/10881))
|
|
101
|
+
|
|
102
|
+
**Before:**
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
threadObject = await memory.createThread({
|
|
106
|
+
// ...
|
|
107
|
+
saveThread: false, // thread not in DB yet
|
|
108
|
+
});
|
|
109
|
+
// Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**After:**
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
threadObject = await memory.createThread({
|
|
116
|
+
// ...
|
|
117
|
+
saveThread: true, // thread persisted immediately
|
|
118
|
+
});
|
|
119
|
+
// MessageHistory can now save messages without error
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- Emit error chunk and call onError when agent workflow step fails ([#10907](https://github.com/mastra-ai/mastra/pull/10907))
|
|
123
|
+
|
|
124
|
+
When a workflow step fails (e.g., tool not found), the error is now properly emitted as an error chunk to the stream and the onError callback is called. This fixes the issue where agent.generate() would throw "promise 'text' was not resolved or rejected" instead of the actual error message.
|
|
125
|
+
|
|
126
|
+
- fix(core): use agent description when converting agent to tool ([#10879](https://github.com/mastra-ai/mastra/pull/10879))
|
|
127
|
+
|
|
128
|
+
- Adds native @ai-sdk/deepseek provider support instead of using the OpenAI-compatible fallback. ([#10822](https://github.com/mastra-ai/mastra/pull/10822))
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
const agent = new Agent({
|
|
132
|
+
model: 'deepseek/deepseek-reasoner',
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// With provider options for reasoning
|
|
136
|
+
const response = await agent.generate('Solve this problem', {
|
|
137
|
+
providerOptions: {
|
|
138
|
+
deepseek: {
|
|
139
|
+
thinking: { type: 'enabled' },
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Also updates the doc generation scripts so DeepSeek provider options show up in the generated docs.
|
|
146
|
+
|
|
147
|
+
- Return state too if `includeState: true` is in `outputOptions` and workflow run is not successful ([#10806](https://github.com/mastra-ai/mastra/pull/10806))
|
|
148
|
+
|
|
149
|
+
- feat: Add partial response support for agent and workflow list endpoints ([#10886](https://github.com/mastra-ai/mastra/pull/10886))
|
|
150
|
+
|
|
151
|
+
Add optional `partial` query parameter to `/api/agents` and `/api/workflows` endpoints to return minimal data without schemas, reducing payload size for list views:
|
|
152
|
+
- When `partial=true`: tool schemas (inputSchema, outputSchema) are omitted
|
|
153
|
+
- When `partial=true`: workflow steps are replaced with stepCount integer
|
|
154
|
+
- When `partial=true`: workflow root schemas (inputSchema, outputSchema) are omitted
|
|
155
|
+
- Maintains backward compatibility when partial parameter is not provided
|
|
156
|
+
|
|
157
|
+
## Server Endpoint Usage
|
|
158
|
+
|
|
159
|
+
```http
|
|
160
|
+
# Get partial agent data (no tool schemas)
|
|
161
|
+
GET /api/agents?partial=true
|
|
162
|
+
|
|
163
|
+
# Get full agent data (default behavior)
|
|
164
|
+
GET /api/agents
|
|
165
|
+
|
|
166
|
+
# Get partial workflow data (stepCount instead of steps, no schemas)
|
|
167
|
+
GET /api/workflows?partial=true
|
|
168
|
+
|
|
169
|
+
# Get full workflow data (default behavior)
|
|
170
|
+
GET /api/workflows
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Client SDK Usage
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import { MastraClient } from '@mastra/client-js';
|
|
177
|
+
|
|
178
|
+
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
|
|
179
|
+
|
|
180
|
+
// Get partial agent list (smaller payload)
|
|
181
|
+
const partialAgents = await client.listAgents({ partial: true });
|
|
182
|
+
|
|
183
|
+
// Get full agent list with tool schemas
|
|
184
|
+
const fullAgents = await client.listAgents();
|
|
185
|
+
|
|
186
|
+
// Get partial workflow list (smaller payload)
|
|
187
|
+
const partialWorkflows = await client.listWorkflows({ partial: true });
|
|
188
|
+
|
|
189
|
+
// Get full workflow list with steps and schemas
|
|
190
|
+
const fullWorkflows = await client.listWorkflows();
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
- Fix processInputStep so it runs correctly. ([#10909](https://github.com/mastra-ai/mastra/pull/10909))
|
|
194
|
+
|
|
195
|
+
- Updated dependencies [[`6c59a40`](https://github.com/mastra-ai/mastra/commit/6c59a40e0ad160467bd13d63a8a287028d75b02d), [`3076c67`](https://github.com/mastra-ai/mastra/commit/3076c6778b18988ae7d5c4c5c466366974b2d63f), [`0bada2f`](https://github.com/mastra-ai/mastra/commit/0bada2f2c1234932cf30c1c47a719ffb64b801c5), [`cc60ff6`](https://github.com/mastra-ai/mastra/commit/cc60ff616541a3b0fb531a7e469bf9ae7bb90528)]:
|
|
196
|
+
- @mastra/observability@1.0.0-beta.3
|
|
197
|
+
|
|
3
198
|
## 1.0.0-beta.6
|
|
4
199
|
|
|
5
200
|
### Major Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-legacy.d.ts","sourceRoot":"","sources":["../../src/agent/agent-legacy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAe,SAAS,EAAQ,MAAM,qBAAqB,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,KAAK,EA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
+
var chunkYBEW5YWC_cjs = require('../chunk-YBEW5YWC.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 chunkHP6TRJ2Q_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkHP6TRJ2Q_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkHP6TRJ2Q_cjs.resolveThreadIdFromArgs; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkHP6TRJ2Q_cjs.tryGenerateWithJsonFallback; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkHP6TRJ2Q_cjs.tryStreamWithJsonFallback; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "MessageList", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkYBEW5YWC_cjs.MessageList; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "convertMessages", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkYBEW5YWC_cjs.convertMessages; }
|
|
35
35
|
});
|
|
36
36
|
//# sourceMappingURL=index.cjs.map
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Agent, TripWire, resolveThreadIdFromArgs, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
2
|
-
export { MessageList, convertMessages } from '../chunk-
|
|
1
|
+
export { Agent, TripWire, resolveThreadIdFromArgs, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-EDNHZZUP.js';
|
|
2
|
+
export { MessageList, convertMessages } from '../chunk-DMPHPHMU.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYBEW5YWC_cjs = require('../../chunk-YBEW5YWC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MessageList", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkYBEW5YWC_cjs.MessageList; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "convertMessages", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkYBEW5YWC_cjs.convertMessages; }
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=index.cjs.map
|
|
16
16
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-results-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/map-results-step.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAmB,MAAM,qCAAqC,CAAC;AAChG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE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IAC5B,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,wBAAgB,oBAAoB,CAClC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,UAAU,EACV,KAAK,EACL,cAAc,EACd,MAAM,EACN,YAAY,EACZ,SAAS,EACT,OAAO,EACP,UAAU,GACX,EAAE,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,IACxB,sCAIX;IACD,SAAS,EAAE;QACT,oBAAoB,EAAE,sBAAsB,CAAC;QAC7C,qBAAqB,EAAE,uBAAuB,CAAC;KAChD,CAAC;IACF,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;CAChC,qGAgLF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-memory-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/prepare-memory-step.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,0B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,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,EAAE,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,wBAAgB,uBAAuB,CACrC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,MAAM,GACP,EAAE,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0HAgI1C"}
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { MastraBase } from '../../../base.js';
|
|
3
3
|
import type { MastraLLMVNext } from '../../../llm/model/model.loop.js';
|
|
4
4
|
import type { Mastra } from '../../../mastra/index.js';
|
|
5
|
-
import type { OutputProcessor } from '../../../processors/index.js';
|
|
5
|
+
import type { InputProcessor, OutputProcessor } from '../../../processors/index.js';
|
|
6
6
|
import type { DynamicArgument } from '../../../types/index.js';
|
|
7
7
|
import type { Agent } from '../../agent.js';
|
|
8
8
|
import { MessageList } from '../../message-list/index.js';
|
|
@@ -18,6 +18,7 @@ export type AgentCapabilities = {
|
|
|
18
18
|
convertTools: Agent['convertTools'];
|
|
19
19
|
runInputProcessors: Agent['__runInputProcessors'];
|
|
20
20
|
executeOnFinish: (args: AgentExecuteOnFinishOptions) => Promise<void>;
|
|
21
|
+
inputProcessors?: DynamicArgument<InputProcessor[]>;
|
|
21
22
|
outputProcessors?: DynamicArgument<OutputProcessor[]>;
|
|
22
23
|
llm: MastraLLMVNext;
|
|
23
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC5C,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACpC,kBAAkB,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAClD,eAAe,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,eAAe,CAAC,EAAE,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC;IACpD,gBAAgB,CAAC,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC;IACtD,GAAG,EAAE,cAAc,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;EAWlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEvC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -285,5 +285,5 @@ exports.executeWithContext = executeWithContext;
|
|
|
285
285
|
exports.executeWithContextSync = executeWithContextSync;
|
|
286
286
|
exports.getOrCreateSpan = getOrCreateSpan;
|
|
287
287
|
exports.wrapMastra = wrapMastra;
|
|
288
|
-
//# sourceMappingURL=chunk-
|
|
289
|
-
//# sourceMappingURL=chunk-
|
|
288
|
+
//# sourceMappingURL=chunk-3EYBRHB2.cjs.map
|
|
289
|
+
//# sourceMappingURL=chunk-3EYBRHB2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/observability/types/tracing.ts","../src/observability/no-op.ts","../src/observability/utils.ts","../src/observability/context.ts"],"names":["SpanType","InternalSpans","SamplingStrategyType","TracingEventType"],"mappings":";;;AAgBO,IAAK,QAAA,qBAAAA,SAAAA,KAAL;AAEL,EAAAA,UAAA,WAAA,CAAA,GAAY,WAAA;AAEZ,EAAAA,UAAA,SAAA,CAAA,GAAU,SAAA;AAEV,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AAEnB,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AAEb,EAAAA,UAAA,aAAA,CAAA,GAAc,aAAA;AAEd,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,WAAA,CAAA,GAAY,WAAA;AAEZ,EAAAA,UAAA,cAAA,CAAA,GAAe,cAAA;AAEf,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,sBAAA,CAAA,GAAuB,sBAAA;AAEvB,EAAAA,UAAA,2BAAA,CAAA,GAA4B,2BAAA;AAE5B,EAAAA,UAAA,mBAAA,CAAA,GAAoB,mBAAA;AAEpB,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,gBAAA,CAAA,GAAiB,gBAAA;AAEjB,EAAAA,UAAA,qBAAA,CAAA,GAAsB,qBAAA;AAhCZ,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,IAAA,EAAA;AA+sBL,IAAK,aAAA,qBAAAC,cAAAA,KAAL;AAEL,EAAAA,cAAAA,CAAAA,cAAAA,CAAA,UAAO,CAAA,CAAA,GAAP,MAAA;AAEA,EAAAA,cAAAA,CAAAA,cAAAA,CAAA,cAAW,CAAA,CAA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AgE,KAAK,CAAA;AAClF,IAAA,OAAO,GAAA;AAAA,EACT;AACF","file":"chunk-3EYBRHB2.cjs","sourcesContent":["/**\n * Tracing interfaces\n */\nimport type { MastraError } from '../../error';\nimport type { IMastraLogger } from '../../logger';\nimport type { Mastra } from '../../mastra';\nimport type { RequestContext } from '../../request-context';\nimport type { WorkflowRunStatus, WorkflowStepStatus } from '../../workflows';\n\n// ============================================================================\n// Span Types\n// ============================================================================\n\n/**\n * AI-specific span types with their associated metadata\n */\nexport enum SpanType {\n /** Agent run - root span for agent processes */\n AGENT_RUN = 'agent_run',\n /** Generic span for custom operations */\n GENERIC = 'generic',\n /** Model generation with model calls, token usage, prompts, completions */\n MODEL_GENERATION = 'model_generation',\n /** Single model execution step within a generation (one API call) */\n MODEL_STEP = 'model_step',\n /** Individual model streaming chunk/event */\n MODEL_CHUNK = 'model_chunk',\n /** MCP (Model Context Protocol) tool execution */\n MCP_TOOL_CALL = 'mcp_tool_call',\n /** Input or Output Processor execution */\n PROCESSOR_RUN = 'processor_run',\n /** Function/tool execution with inputs, outputs, errors */\n TOOL_CALL = 'tool_call',\n /** Workflow run - root span for workflow processes */\n WORKFLOW_RUN = 'workflow_run',\n /** Workflow step execution with step status, data flow */\n WORKFLOW_STEP = 'workflow_step',\n /** Workflow conditional execution with condition evaluation */\n WORKFLOW_CONDITIONAL = 'workflow_conditional',\n /** Individual condition evaluation within conditional */\n WORKFLOW_CONDITIONAL_EVAL = 'workflow_conditional_eval',\n /** Workflow parallel execution */\n WORKFLOW_PARALLEL = 'workflow_parallel',\n /** Workflow loop execution */\n WORKFLOW_LOOP = 'workflow_loop',\n /** Workflow sleep operation */\n WORKFLOW_SLEEP = 'workflow_sleep',\n /** Workflow wait for event operation */\n WORKFLOW_WAIT_EVENT = 'workflow_wait_event',\n}\n\n// ============================================================================\n// Type-Specific Attributes Interfaces\n// ============================================================================\n\n/**\n * Base attributes that all spans can have\n */\nexport interface AIBaseAttributes {}\n\n/**\n * Agent Run attributes\n */\nexport interface AgentRunAttributes extends AIBaseAttributes {\n /** Agent identifier */\n agentId: string;\n /** Human-readable agent name */\n agentName?: string;\n /** Conversation/thread/session identifier for multi-turn interactions */\n conversationId?: string;\n /** Agent Instructions **/\n instructions?: string;\n /** Agent Prompt **/\n prompt?: string;\n /** Available tools for this execution */\n availableTools?: string[];\n /** Maximum steps allowed */\n maxSteps?: number;\n}\n\n/** Token usage statistics - supports both v5 and legacy formats */\nexport interface UsageStats {\n // VNext paths\n inputTokens?: number;\n outputTokens?: number;\n // Legacy format (for backward compatibility)\n promptTokens?: number;\n completionTokens?: number;\n // Common fields\n totalTokens?: number;\n reasoningTokens?: number;\n cachedInputTokens?: number;\n promptCacheHitTokens?: number;\n promptCacheMissTokens?: number;\n}\n\n/**\n * Model Generation attributes\n */\nexport interface ModelGenerationAttributes extends AIBaseAttributes {\n /** Model name (e.g., 'gpt-4', 'claude-3') */\n model?: string;\n /** Model provider (e.g., 'openai', 'anthropic') */\n provider?: string;\n /** Type of result/output this LLM call produced */\n resultType?: 'tool_selection' | 'response_generation' | 'reasoning' | 'planning';\n /** Token usage statistics - supports both v5 and legacy formats */\n usage?: UsageStats;\n /** Model parameters */\n parameters?: {\n maxOutputTokens?: number;\n temperature?: number;\n topP?: number;\n topK?: number;\n presencePenalty?: number;\n frequencyPenalty?: number;\n stopSequences?: string[];\n seed?: number;\n maxRetries?: number;\n abortSignal?: any;\n headers?: Record<string, string | undefined>;\n };\n /** Whether this was a streaming response */\n streaming?: boolean;\n /** Reason the generation finished */\n finishReason?: string;\n /**\n * When the first token/chunk of the completion was received.\n * Used to calculate time-to-first-token (TTFT) metrics.\n * Only applicable for streaming responses.\n */\n completionStartTime?: Date;\n /** Actual model used in the response (may differ from request model) */\n responseModel?: string;\n /** Unique identifier for the response */\n responseId?: string;\n /** Server address for the model endpoint */\n serverAddress?: string;\n /** Server port for the model endpoint */\n serverPort?: number;\n}\n\n/**\n * Model Step attributes - for a single model execution within a generation\n */\nexport interface ModelStepAttributes extends AIBaseAttributes {\n /** Index of this step in the generation (0, 1, 2, ...) */\n stepIndex?: number;\n /** Token usage statistics */\n usage?: UsageStats;\n /** Reason this step finished (stop, tool-calls, length, etc.) */\n finishReason?: string;\n /** Should execution continue */\n isContinued?: boolean;\n /** Result warnings */\n warnings?: Record<string, any>;\n}\n\n/**\n * Model Chunk attributes - for individual streaming chunks/events\n */\nexport interface ModelChunkAttributes extends AIBaseAttributes {\n /** Type of chunk (text-delta, reasoning-delta, tool-call, etc.) */\n chunkType?: string;\n /** Sequence number of this chunk in the stream */\n sequenceNumber?: number;\n}\n\n/**\n * Tool Call attributes\n */\nexport interface ToolCallAttributes extends AIBaseAttributes {\n toolId?: string;\n toolType?: string;\n toolDescription?: string;\n success?: boolean;\n}\n\n/**\n * MCP Tool Call attributes\n */\nexport interface MCPToolCallAttributes extends AIBaseAttributes {\n /** Id of the MCP tool/function */\n toolId: string;\n /** MCP server identifier */\n mcpServer: string;\n /** MCP server version */\n serverVersion?: string;\n /** Whether tool execution was successful */\n success?: boolean;\n}\n\n/**\n * Processor attributes\n */\nexport interface ProcessorRunAttributes extends AIBaseAttributes {\n /** Name of the Processor */\n processorName: string;\n /** Processor type (input or output) */\n processorType: 'input' | 'output';\n /** Processor index in the agent */\n processorIndex?: number;\n /** MessageList mutations performed by this processor */\n messageListMutations?: Array<{\n type: 'add' | 'addSystem' | 'removeByIds' | 'clear';\n source?: string;\n count?: number;\n ids?: string[];\n text?: string;\n tag?: string;\n message?: any;\n }>;\n}\n\n/**\n * Workflow Run attributes\n */\nexport interface WorkflowRunAttributes extends AIBaseAttributes {\n /** Workflow identifier */\n workflowId: string;\n /** Workflow status */\n status?: WorkflowRunStatus;\n}\n\n/**\n * Workflow Step attributes\n */\nexport interface WorkflowStepAttributes extends AIBaseAttributes {\n /** Step identifier */\n stepId: string;\n /** Step status */\n status?: WorkflowStepStatus;\n}\n\n/**\n * Workflow Conditional attributes\n */\nexport interface WorkflowConditionalAttributes extends AIBaseAttributes {\n /** Number of conditions evaluated */\n conditionCount: number;\n /** Which condition indexes evaluated to true */\n truthyIndexes?: number[];\n /** Which steps will be executed */\n selectedSteps?: string[];\n}\n\n/**\n * Workflow Conditional Evaluation attributes\n */\nexport interface WorkflowConditionalEvalAttributes extends AIBaseAttributes {\n /** Index of this condition in the conditional */\n conditionIndex: number;\n /** Result of condition evaluation */\n result?: boolean;\n}\n\n/**\n * Workflow Parallel attributes\n */\nexport interface WorkflowParallelAttributes extends AIBaseAttributes {\n /** Number of parallel branches */\n branchCount: number;\n /** Step IDs being executed in parallel */\n parallelSteps?: string[];\n}\n\n/**\n * Workflow Loop attributes\n */\nexport interface WorkflowLoopAttributes extends AIBaseAttributes {\n /** Type of loop (foreach, dowhile, dountil) */\n loopType?: 'foreach' | 'dowhile' | 'dountil';\n /** Current iteration number (for individual iterations) */\n iteration?: number;\n /** Total iterations (if known) */\n totalIterations?: number;\n /** Number of steps to run concurrently in foreach loop */\n concurrency?: number;\n}\n\n/**\n * Workflow Sleep attributes\n */\nexport interface WorkflowSleepAttributes extends AIBaseAttributes {\n /** Sleep duration in milliseconds */\n durationMs?: number;\n /** Sleep until date */\n untilDate?: Date;\n /** Sleep type */\n sleepType?: 'fixed' | 'dynamic';\n}\n\n/**\n * Workflow Wait Event attributes\n */\nexport interface WorkflowWaitEventAttributes extends AIBaseAttributes {\n /** Event name being waited for */\n eventName?: string;\n /** Timeout in milliseconds */\n timeoutMs?: number;\n /** Whether event was received or timed out */\n eventReceived?: boolean;\n /** Wait duration in milliseconds */\n waitDurationMs?: number;\n}\n\n/**\n * AI-specific span types mapped to their attributes\n */\nexport interface SpanTypeMap {\n [SpanType.AGENT_RUN]: AgentRunAttributes;\n [SpanType.WORKFLOW_RUN]: WorkflowRunAttributes;\n [SpanType.MODEL_GENERATION]: ModelGenerationAttributes;\n [SpanType.MODEL_STEP]: ModelStepAttributes;\n [SpanType.MODEL_CHUNK]: ModelChunkAttributes;\n [SpanType.TOOL_CALL]: ToolCallAttributes;\n [SpanType.MCP_TOOL_CALL]: MCPToolCallAttributes;\n [SpanType.PROCESSOR_RUN]: ProcessorRunAttributes;\n [SpanType.WORKFLOW_STEP]: WorkflowStepAttributes;\n [SpanType.WORKFLOW_CONDITIONAL]: WorkflowConditionalAttributes;\n [SpanType.WORKFLOW_CONDITIONAL_EVAL]: WorkflowConditionalEvalAttributes;\n [SpanType.WORKFLOW_PARALLEL]: WorkflowParallelAttributes;\n [SpanType.WORKFLOW_LOOP]: WorkflowLoopAttributes;\n [SpanType.WORKFLOW_SLEEP]: WorkflowSleepAttributes;\n [SpanType.WORKFLOW_WAIT_EVENT]: WorkflowWaitEventAttributes;\n [SpanType.GENERIC]: AIBaseAttributes;\n}\n\n/**\n * Union type for cases that need to handle any span type\n */\nexport type AnySpanAttributes = SpanTypeMap[keyof SpanTypeMap];\n\n// ============================================================================\n// Span Interfaces\n// ============================================================================\n\n/**\n * Base Span interface\n */\ninterface BaseSpan<TType extends SpanType> {\n /** Unique span identifier */\n id: string;\n /** OpenTelemetry-compatible trace ID (32 hex chars) - present on all spans */\n traceId: string;\n /** Name of the span */\n name: string;\n /** Type of the span */\n type: TType;\n /** When span started */\n startTime: Date;\n /** When span ended */\n endTime?: Date;\n /** Span-type specific attributes */\n attributes?: SpanTypeMap[TType];\n /** User-defined metadata */\n metadata?: Record<string, any>;\n /** Labels used to categorize and filter traces. Only valid on root spans. */\n tags?: string[];\n /** Input passed at the start of the span */\n input?: any;\n /** Output generated at the end of the span */\n output?: any;\n /** Error information if span failed */\n errorInfo?: {\n message: string;\n id?: string;\n domain?: string;\n category?: string;\n details?: Record<string, any>;\n };\n /** Is an event span? (event occurs at startTime, has no endTime) */\n isEvent: boolean;\n}\n\n/**\n * Span interface, used internally for tracing\n */\nexport interface Span<TType extends SpanType> extends BaseSpan<TType> {\n /** Is an internal span? (spans internal to the operation of mastra) */\n isInternal: boolean;\n /** Parent span reference (undefined for root spans) */\n parent?: AnySpan;\n /** Pointer to the ObservabilityInstance instance */\n observabilityInstance: ObservabilityInstance;\n /** Trace-level state shared across all spans in this trace */\n traceState?: TraceState;\n\n // Methods for span lifecycle\n /** End the span */\n end(options?: EndSpanOptions<TType>): void;\n\n /** Record an error for the span, optionally end the span as well */\n error(options: ErrorSpanOptions<TType>): void;\n\n /** Update span attributes */\n update(options: UpdateSpanOptions<TType>): void;\n\n /** Create child span - can be any span type independent of parent */\n createChildSpan(options: ChildSpanOptions<SpanType.MODEL_GENERATION>): AIModelGenerationSpan;\n createChildSpan<TChildType extends SpanType>(options: ChildSpanOptions<TChildType>): Span<TChildType>;\n\n /** Create event span - can be any span type independent of parent */\n createEventSpan<TChildType extends SpanType>(options: ChildEventOptions<TChildType>): Span<TChildType>;\n\n /** Returns `TRUE` if the span is the root span of a trace */\n get isRootSpan(): boolean;\n\n /** Returns `TRUE` if the span is a valid span (not a NO-OP Span) */\n get isValid(): boolean;\n\n /** Get the closest parent spanId that isn't an internal span */\n getParentSpanId(includeInternalSpans?: boolean): string | undefined;\n\n /** Find the closest parent span of a specific type by walking up the parent chain */\n findParent<T extends SpanType>(spanType: T): Span<T> | undefined;\n\n /** Returns a lightweight span ready for export */\n exportSpan(includeInternalSpans?: boolean): ExportedSpan<TType> | undefined;\n\n /** Returns the traceId on span, unless NoOpSpan, then undefined */\n get externalTraceId(): string | undefined;\n\n /**\n * Execute an async function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The async function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await modelSpan.executeInContext(async () => {\n * return model.generateText(...);\n * });\n * ```\n */\n executeInContext<T>(fn: () => Promise<T>): Promise<T>;\n\n /**\n * Execute a synchronous function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The synchronous function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = modelSpan.executeInContextSync(() => {\n * return model.streamText(...);\n * });\n * ```\n */\n executeInContextSync<T>(fn: () => T): T;\n}\n\nexport interface BridgeSpanContext {\n /**\n * Execute an async function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The async function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await modelSpan.executeInContext(async () => {\n * return model.generateText(...);\n * });\n * ```\n */\n executeInContext<T>(fn: () => Promise<T>): Promise<T>;\n\n /**\n * Execute a synchronous function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The synchronous function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = modelSpan.executeInContextSync(() => {\n * return model.streamText(...);\n * });\n * ```\n */\n executeInContextSync<T>(fn: () => T): T;\n}\n\n/**\n * Specialized span interface for MODEL_GENERATION spans\n * Provides access to creating a ModelSpanTracker for tracking MODEL_STEP and MODEL_CHUNK spans\n */\nexport interface AIModelGenerationSpan extends Span<SpanType.MODEL_GENERATION> {\n /** Create a ModelSpanTracker for tracking model execution steps and chunks */\n createTracker(): IModelSpanTracker | undefined;\n}\n\n/**\n * Exported Span interface, used for tracing exporters\n */\nexport interface ExportedSpan<TType extends SpanType> extends BaseSpan<TType> {\n /** Parent span id reference (undefined for root spans) */\n parentSpanId?: string;\n /** `TRUE` if the span is the root span of a trace */\n isRootSpan: boolean;\n /**\n * Tags for this trace (only present on root spans).\n * Tags are string labels used to categorize and filter traces.\n */\n tags?: string[];\n}\n\nexport interface IModelSpanTracker {\n getTracingContext(): TracingContext;\n reportGenerationError(options: ErrorSpanOptions<SpanType.MODEL_GENERATION>): void;\n endGeneration(options?: EndSpanOptions<SpanType.MODEL_GENERATION>): void;\n wrapStream<T extends { pipeThrough: Function }>(stream: T): T;\n}\n\n/**\n * Union type for cases that need to handle any span\n */\nexport type AnySpan = Span<keyof SpanTypeMap>;\n\n/**\n * Union type for cases that need to handle any exported span\n */\nexport type AnyExportedSpan = ExportedSpan<keyof SpanTypeMap>;\n\n// ============================================================================\n// Tracing Interfaces\n// ============================================================================\n\n/**\n * Primary interface for Observability\n */\nexport interface ObservabilityInstance {\n /**\n * Get current configuration\n */\n getConfig(): Readonly<ObservabilityInstanceConfig>;\n\n /**\n * Get all exporters\n */\n getExporters(): readonly ObservabilityExporter[];\n\n /**\n * Get all span output processors\n */\n getSpanOutputProcessors(): readonly SpanOutputProcessor[];\n\n /**\n * Get the logger instance (for exporters and other components)\n */\n getLogger(): IMastraLogger;\n\n /**\n * Get the bridge instance if configured\n */\n getBridge(): ObservabilityBridge | undefined;\n\n /**\n * Start a new span of a specific SpanType\n */\n startSpan<TType extends SpanType>(options: StartSpanOptions<TType>): Span<TType>;\n\n /**\n * Shutdown tracing and clean up resources\n */\n shutdown(): Promise<void>;\n\n /**\n * Override setLogger to add tracing specific initialization log\n */\n __setLogger(logger: IMastraLogger): void;\n}\n\n// ============================================================================\n// Span Create/Update/Error Option Types\n// ============================================================================\n\ninterface CreateBaseOptions<TType extends SpanType> {\n /** Span attributes */\n attributes?: SpanTypeMap[TType];\n /** Span metadata */\n metadata?: Record<string, any>;\n /** Span name */\n name: string;\n /** Span type */\n type: TType;\n /** Policy-level tracing configuration */\n tracingPolicy?: TracingPolicy;\n /** Request Context for metadata extraction */\n requestContext?: RequestContext;\n}\n\n/**\n * Options for creating new spans\n */\nexport interface CreateSpanOptions<TType extends SpanType> extends CreateBaseOptions<TType> {\n /** Input data */\n input?: any;\n /** Output data (for event spans) */\n output?: any;\n /** Labels used to categorize and filter traces. Only valid on root spans. */\n tags?: string[];\n /** Parent span */\n parent?: AnySpan;\n /** Is an event span? */\n isEvent?: boolean;\n /**\n * Trace ID to use for this span (1-32 hexadecimal characters).\n * Only used for root spans without a parent.\n */\n traceId?: string;\n /**\n * Parent span ID to use for this span (1-16 hexadecimal characters).\n * Only used for root spans without a parent.\n */\n parentSpanId?: string;\n /** Trace-level state shared across all spans in this trace */\n traceState?: TraceState;\n}\n\n/**\n * Options for starting new spans\n */\nexport interface StartSpanOptions<TType extends SpanType> extends CreateSpanOptions<TType> {\n /**\n * Options passed when using a custom sampler strategy\n */\n customSamplerOptions?: CustomSamplerOptions;\n /** Tracing options for this execution */\n tracingOptions?: TracingOptions;\n}\n\n/**\n * Options for new child spans\n */\nexport interface ChildSpanOptions<TType extends SpanType> extends CreateBaseOptions<TType> {\n /** Input data */\n input?: any;\n}\n\n/**\n * Options for new child events\n * Event spans have no input, and no endTime\n */\nexport interface ChildEventOptions<TType extends SpanType> extends CreateBaseOptions<TType> {\n /** Output data */\n output?: any;\n}\n\ninterface UpdateBaseOptions<TType extends SpanType> {\n /** Span attributes */\n attributes?: Partial<SpanTypeMap[TType]>;\n /** Span metadata */\n metadata?: Record<string, any>;\n}\n\nexport interface EndSpanOptions<TType extends SpanType> extends UpdateBaseOptions<TType> {\n /** Output data */\n output?: any;\n}\n\nexport interface UpdateSpanOptions<TType extends SpanType> extends UpdateBaseOptions<TType> {\n /** Input data */\n input?: any;\n /** Output data */\n output?: any;\n}\n\nexport interface ErrorSpanOptions<TType extends SpanType> extends UpdateBaseOptions<TType> {\n /** The error associated with the issue */\n error: MastraError | Error;\n /** End the span when true */\n endSpan?: boolean;\n}\n\nexport interface GetOrCreateSpanOptions<TType extends SpanType> {\n type: TType;\n name: string;\n input?: any;\n attributes?: SpanTypeMap[TType];\n metadata?: Record<string, any>;\n tracingPolicy?: TracingPolicy;\n tracingOptions?: TracingOptions;\n tracingContext?: TracingContext;\n requestContext?: RequestContext;\n mastra?: Mastra;\n}\n\n// ============================================================================\n// Lifecycle Types\n// ============================================================================\n\nexport interface ObservabilityEntrypoint {\n shutdown(): Promise<void>;\n\n setMastraContext(options: { mastra: Mastra }): void;\n\n setLogger(options: { logger: IMastraLogger }): void;\n\n getSelectedInstance(options: ConfigSelectorOptions): ObservabilityInstance | undefined;\n\n // Registry management methods\n registerInstance(name: string, instance: ObservabilityInstance, isDefault?: boolean): void;\n getInstance(name: string): ObservabilityInstance | undefined;\n getDefaultInstance(): ObservabilityInstance | undefined;\n listInstances(): ReadonlyMap<string, ObservabilityInstance>;\n unregisterInstance(name: string): boolean;\n hasInstance(name: string): boolean;\n setConfigSelector(selector: ConfigSelector): void;\n clear(): void;\n}\n\n/**\n * Bitwise options to set different types of spans as internal in\n * a workflow or agent execution.\n */\nexport enum InternalSpans {\n /** No spans are marked internal */\n NONE = 0,\n /** Workflow spans are marked internal */\n WORKFLOW = 1 << 0, // 0001\n /** Agent spans are marked internal */\n AGENT = 1 << 1, // 0010\n /** Tool spans are marked internal */\n TOOL = 1 << 2, // 0100\n /** Model spans are marked internal */\n MODEL = 1 << 3, // 1000\n\n /** All spans are marked internal */\n ALL = (1 << 4) - 1, // 1111 (all bits set up to 3)\n}\n\n/**\n * Policy-level tracing configuration applied when creating\n * a workflow or agent. Unlike TracingOptions, which are\n * provided at execution time, policies define persistent rules\n * for how spans are treated across all executions of the\n * workflow/agent.\n */\nexport interface TracingPolicy {\n /**\n * Bitwise options to set different types of spans as Internal in\n * a workflow or agent execution. Internal spans are hidden by\n * default in exported traces.\n */\n internal?: InternalSpans;\n}\n\n/**\n * Trace-level state computed once at the start of a trace\n * and shared by all spans within that trace.\n */\nexport interface TraceState {\n /**\n * RequestContext keys to extract as metadata for all spans in this trace.\n * Computed by merging the tracing config's requestContextKeys\n * with the per-request requestContextKeys.\n */\n requestContextKeys: string[];\n}\n\n/**\n * Options passed when starting a new agent or workflow execution\n */\nexport interface TracingOptions {\n /** Metadata to add to the root trace span */\n metadata?: Record<string, any>;\n /**\n * Additional RequestContext keys to extract as metadata for this trace.\n * These keys are added to the requestContextKeys config.\n * Supports dot notation for nested values (e.g., 'user.id', 'session.data.experimentId').\n */\n requestContextKeys?: string[];\n /**\n * Trace ID to use for this execution (1-32 hexadecimal characters).\n * If provided, this trace will be part of the specified trace rather than starting a new one.\n */\n traceId?: string;\n /**\n * Parent span ID to use for this execution (1-16 hexadecimal characters).\n * If provided, the root span will be created as a child of this span.\n */\n parentSpanId?: string;\n /**\n * Tags to apply to this trace.\n * Tags are string labels that can be used to categorize and filter traces\n * Note: Tags are only applied to the root span of a trace.\n */\n tags?: string[];\n}\n\nexport interface SpanIds {\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n}\n\n/**\n * Context for tracing that flows through workflow and agent execution\n */\nexport interface TracingContext {\n /** Current Span for creating child spans and adding metadata */\n currentSpan?: AnySpan;\n}\n\n/**\n * Properties returned to the user for working with traces externally.\n */\nexport type TracingProperties = {\n /** Trace ID used on the execution (if the execution was traced). */\n traceId?: string;\n};\n\n// ============================================================================\n// Registry Config Interfaces\n// ============================================================================\n\n/**\n * Configuration for a single observability instance\n */\nexport interface ObservabilityInstanceConfig {\n /** Unique identifier for this config in the observability registry */\n name: string;\n /** Service name for observability */\n serviceName: string;\n /** Sampling strategy - controls whether tracing is collected (defaults to ALWAYS) */\n sampling?: SamplingStrategy;\n /** Custom exporters */\n exporters?: ObservabilityExporter[];\n /** Custom processors */\n spanOutputProcessors?: SpanOutputProcessor[];\n /** OpenTelemetry bridge for integration with existing OTEL infrastructure */\n bridge?: ObservabilityBridge;\n /** Set to `true` if you want to see spans internal to the operation of mastra */\n includeInternalSpans?: boolean;\n /**\n * RequestContext keys to automatically extract as metadata for all spans\n * created with this observablity configuration.\n * Supports dot notation for nested values.\n */\n requestContextKeys?: string[];\n}\n\n/**\n * Complete Observability registry configuration\n */\nexport interface ObservabilityRegistryConfig {\n /** Enables default exporters, with sampling: always, and sensitive data filtering */\n default?: {\n enabled?: boolean;\n };\n /** Map of tracing instance names to their configurations or pre-instantiated instances */\n configs?: Record<string, Omit<ObservabilityInstanceConfig, 'name'> | ObservabilityInstance>;\n /** Optional selector function to choose which tracing instance to use */\n configSelector?: ConfigSelector;\n}\n\n// ============================================================================\n// Sampling Strategy Interfaces\n// ============================================================================\n\n/**\n * Sampling strategy types\n */\nexport enum SamplingStrategyType {\n ALWAYS = 'always',\n NEVER = 'never',\n RATIO = 'ratio',\n CUSTOM = 'custom',\n}\n\n/**\n * Sampling strategy configuration\n */\nexport type SamplingStrategy =\n | { type: SamplingStrategyType.ALWAYS }\n | { type: SamplingStrategyType.NEVER }\n | { type: SamplingStrategyType.RATIO; probability: number }\n | { type: SamplingStrategyType.CUSTOM; sampler: (options?: CustomSamplerOptions) => boolean };\n\n/**\n * Options passed when using a custom sampler strategy\n */\nexport interface CustomSamplerOptions {\n requestContext?: RequestContext;\n metadata?: Record<string, any>;\n}\n\n// ============================================================================\n// Exporter and Processor Interfaces\n// ============================================================================\n\n/**\n * Tracing event types\n */\nexport enum TracingEventType {\n SPAN_STARTED = 'span_started',\n SPAN_UPDATED = 'span_updated',\n SPAN_ENDED = 'span_ended',\n}\n\n/**\n * Tracing events that can be exported\n */\nexport type TracingEvent =\n | { type: TracingEventType.SPAN_STARTED; exportedSpan: AnyExportedSpan }\n | { type: TracingEventType.SPAN_UPDATED; exportedSpan: AnyExportedSpan }\n | { type: TracingEventType.SPAN_ENDED; exportedSpan: AnyExportedSpan };\n\nexport interface InitExporterOptions {\n mastra?: Mastra;\n config?: ObservabilityInstanceConfig;\n}\n\nexport interface InitBridgeOptions {\n mastra?: Mastra;\n config?: ObservabilityInstanceConfig;\n}\n\n/**\n * Interface for tracing exporters\n */\nexport interface ObservabilityExporter {\n /** Exporter name */\n name: string;\n\n /** Initialize exporter with tracing configuration and/or access to Mastra */\n init?(options: InitExporterOptions): void;\n\n /** Sets logger instance on the exporter. */\n __setLogger?(logger: IMastraLogger): void;\n\n /** Export tracing events */\n exportTracingEvent(event: TracingEvent): Promise<void>;\n\n addScoreToTrace?({\n traceId,\n spanId,\n score,\n reason,\n scorerName,\n metadata,\n }: {\n traceId: string;\n spanId?: string;\n score: number;\n reason?: string;\n scorerName: string;\n metadata?: Record<string, any>;\n }): Promise<void>;\n\n /** Shutdown exporter */\n shutdown(): Promise<void>;\n}\n\n/**\n * Interface for observability bridges\n */\nexport interface ObservabilityBridge {\n /** Bridge name */\n name: string;\n\n /** Initialize bridge with observability configuration and/or access to Mastra */\n init?(options: InitBridgeOptions): void;\n\n /** Sets logger instance on the bridge */\n __setLogger?(logger: IMastraLogger): void;\n\n /**\n * Export Mastra tracing events to OTEL infrastructure\n * Called for SPAN_STARTED, SPAN_UPDATED, SPAN_ENDED events\n *\n * @param event - Tracing event with exported span\n */\n exportTracingEvent(event: TracingEvent): Promise<void>;\n\n /**\n * Execute an async function within the tracing context of a Mastra span.\n * This enables auto-instrumented operations (HTTP, DB) to have correct parent spans\n * in the external tracing system (e.g., OpenTelemetry, DataDog, etc.).\n *\n * @param spanId - The ID of the Mastra span to use as context\n * @param fn - The async function to execute within the span context\n * @returns The result of the function execution\n */\n executeInContext?<T>(spanId: string, fn: () => Promise<T>): Promise<T>;\n\n /**\n * Execute a synchronous function within the tracing context of a Mastra span.\n * This enables auto-instrumented operations (HTTP, DB) to have correct parent spans\n * in the external tracing system (e.g., OpenTelemetry, DataDog, etc.).\n *\n * @param spanId - The ID of the Mastra span to use as context\n * @param fn - The synchronous function to execute within the span context\n * @returns The result of the function execution\n */\n executeInContextSync?<T>(spanId: string, fn: () => T): T;\n\n /**\n * Create a span in the bridge's tracing system.\n * Called during Mastra span construction to get bridge-generated identifiers.\n *\n * @param options - Span creation options from Mastra\n * @returns Span identifiers (spanId, traceId, parentSpanId) from bridge, or undefined if creation fails\n */\n createSpan(options: CreateSpanOptions<SpanType>): SpanIds | undefined;\n\n /** Shutdown bridge and cleanup resources */\n shutdown(): Promise<void>;\n}\n\n/**\n * Interface for span processors\n */\nexport interface SpanOutputProcessor {\n /** Processor name */\n name: string;\n /** Process span before export */\n process(span?: AnySpan): AnySpan | undefined;\n /** Shutdown processor */\n shutdown(): Promise<void>;\n}\n\n// ============================================================================\n// Tracing Config Selector Interfaces\n// ============================================================================\n\n/**\n * Options passed when using a custom tracing config selector\n */\nexport interface ConfigSelectorOptions {\n /** Request Context */\n requestContext?: RequestContext;\n}\n\n/**\n * Function to select which tracing instance to use for a given span\n * Returns the name of the tracing instance, or undefined to use default\n */\nexport type ConfigSelector = (\n options: ConfigSelectorOptions,\n availableConfigs: ReadonlyMap<string, ObservabilityInstance>,\n) => string | undefined;\n\n// ============================================================================\n// Tracing Storage Interfaces\n// ============================================================================\n\nexport type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only';\n","import type { Mastra } from '..';\nimport type { IMastraLogger } from '../logger';\nimport type { ObservabilityInstance, ConfigSelectorOptions, ObservabilityEntrypoint, ConfigSelector } from './types';\n\nexport class NoOpObservability implements ObservabilityEntrypoint {\n setMastraContext(_options: { mastra: Mastra }): void {\n return;\n }\n\n setLogger(_options: { logger: IMastraLogger }): void {\n return;\n }\n\n getSelectedInstance(_options: ConfigSelectorOptions): ObservabilityInstance | undefined {\n return;\n }\n\n registerInstance(_name: string, _instance: ObservabilityInstance, _isDefault = false): void {\n return;\n }\n\n getInstance(_name: string): ObservabilityInstance | undefined {\n return;\n }\n\n getDefaultInstance(): ObservabilityInstance | undefined {\n return;\n }\n\n listInstances(): ReadonlyMap<string, ObservabilityInstance> {\n return new Map();\n }\n\n unregisterInstance(_name: string): boolean {\n return false;\n }\n\n hasInstance(_name: string): boolean {\n return false;\n }\n\n setConfigSelector(_selector: ConfigSelector): void {\n return;\n }\n\n clear(): void {\n return;\n }\n\n async shutdown(): Promise<void> {\n return;\n }\n}\n","import type { Span, SpanType, GetOrCreateSpanOptions, AnySpan } from './types';\n\n/**\n * Creates or gets a child span from existing tracing context or starts a new trace.\n * This helper consolidates the common pattern of creating spans that can either be:\n * 1. Children of an existing span (when tracingContext.currentSpan exists)\n * 2. New root spans (when no current span exists)\n *\n * @param options - Configuration object for span creation\n * @returns The created Span or undefined if tracing is disabled\n */\nexport function getOrCreateSpan<T extends SpanType>(options: GetOrCreateSpanOptions<T>): Span<T> | undefined {\n const { type, attributes, tracingContext, requestContext, tracingOptions, ...rest } = options;\n\n const metadata = {\n ...(rest.metadata ?? {}),\n ...(tracingOptions?.metadata ?? {}),\n };\n\n // If we have a current span, create a child span\n if (tracingContext?.currentSpan) {\n return tracingContext.currentSpan.createChildSpan({\n type,\n attributes,\n ...rest,\n metadata,\n });\n }\n\n // Otherwise, try to create a new root span\n const instance = options.mastra?.observability?.getSelectedInstance({ requestContext });\n\n return instance?.startSpan<T>({\n type,\n attributes,\n ...rest,\n metadata,\n requestContext,\n tracingOptions,\n traceId: tracingOptions?.traceId,\n parentSpanId: tracingOptions?.parentSpanId,\n customSamplerOptions: {\n requestContext,\n metadata,\n },\n });\n}\n\n/**\n * Execute an async function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The async function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await executeWithContext(llmSpan, async () =>\n * model.generateText(args)\n * );\n * ```\n */\nexport async function executeWithContext<T>(params: { span?: AnySpan; fn: () => Promise<T> }): Promise<T> {\n const { span, fn } = params;\n\n if (span?.executeInContext) {\n return span.executeInContext(fn);\n }\n\n return fn();\n}\n\n/**\n * Execute a synchronous function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The synchronous function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = executeWithContextSync(llmSpan, () =>\n * model.streamText(args)\n * );\n * ```\n */\nexport function executeWithContextSync<T>(params: { span?: AnySpan; fn: () => T }): T {\n const { span, fn } = params;\n\n if (span?.executeInContextSync) {\n return span.executeInContextSync(fn);\n }\n\n return fn();\n}\n","/**\n * Tracing Context Integration\n *\n * This module provides automatic tracing context propagation throughout Mastra's execution contexts.\n * It uses JavaScript Proxies to transparently wrap Mastra, Agent, and Workflow instances so that\n * tracing context is automatically injected without requiring manual passing by users.\n */\n\nimport type { MastraPrimitives } from '../action';\nimport type { Agent } from '../agent';\nimport type { Mastra } from '../mastra';\nimport type { Workflow } from '../workflows';\nimport type { TracingContext, AnySpan } from './types';\n\nconst AGENT_GETTERS = ['getAgent', 'getAgentById'];\nconst AGENT_METHODS_TO_WRAP = ['generate', 'stream', 'generateLegacy', 'streamLegacy'];\n\nconst WORKFLOW_GETTERS = ['getWorkflow', 'getWorkflowById'];\nconst WORKFLOW_METHODS_TO_WRAP = ['execute', 'createRun', 'createRun'];\n\n/**\n * Helper function to detect NoOp spans to avoid unnecessary wrapping\n */\nfunction isNoOpSpan(span: AnySpan): boolean {\n // Check if this is a NoOp span implementation\n return span.constructor.name === 'NoOpSpan' || (span as any).__isNoOp === true;\n}\n\n/**\n * Checks to see if a passed object is an actual instance of Mastra\n * (for the purposes of wrapping it for Tracing)\n */\nexport function isMastra<T extends Mastra | (Mastra & MastraPrimitives) | MastraPrimitives>(mastra: T): boolean {\n const hasAgentGetters = AGENT_GETTERS.every(method => typeof (mastra as any)?.[method] === 'function');\n const hasWorkflowGetters = WORKFLOW_GETTERS.every(method => typeof (mastra as any)?.[method] === 'function');\n\n return hasAgentGetters && hasWorkflowGetters;\n}\n\n/**\n * Creates a tracing-aware Mastra proxy that automatically injects\n * tracing context into agent and workflow method calls\n */\nexport function wrapMastra<T extends Mastra | (Mastra & MastraPrimitives) | MastraPrimitives>(\n mastra: T,\n tracingContext: TracingContext,\n): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return mastra;\n }\n\n // Check if this object has the methods we want to wrap - if not, return as is\n if (!isMastra(mastra)) {\n return mastra;\n }\n\n try {\n return new Proxy(mastra, {\n get(target, prop) {\n try {\n if (AGENT_GETTERS.includes(prop as string)) {\n return (...args: any[]) => {\n const agent = (target as any)[prop](...args);\n return wrapAgent(agent, tracingContext);\n };\n }\n\n // Wrap workflow getters\n if (WORKFLOW_GETTERS.includes(prop as string)) {\n return (...args: any[]) => {\n const workflow = (target as any)[prop](...args);\n return wrapWorkflow(workflow, tracingContext);\n };\n }\n\n // Pass through all other methods unchanged - bind functions to preserve 'this' context\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create proxy, using original Mastra instance', error);\n return mastra;\n }\n}\n\n/**\n * Creates a tracing-aware Agent proxy that automatically injects\n * tracing context into generation method calls\n */\nfunction wrapAgent<T extends Agent>(agent: T, tracingContext: TracingContext): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return agent;\n }\n\n try {\n return new Proxy(agent, {\n get(target, prop) {\n try {\n if (AGENT_METHODS_TO_WRAP.includes(prop as string)) {\n return (input: any, options: any = {}) => {\n return (target as any)[prop](input, {\n ...options,\n tracingContext,\n });\n };\n }\n\n // Bind functions to preserve 'this' context for private member access\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap agent method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create agent proxy, using original instance', error);\n return agent;\n }\n}\n\n/**\n * Creates a tracing-aware Workflow proxy that automatically injects\n * tracing context into execution method calls\n */\nfunction wrapWorkflow<T extends Workflow>(workflow: T, tracingContext: TracingContext): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return workflow;\n }\n\n try {\n return new Proxy(workflow, {\n get(target, prop) {\n try {\n // Wrap workflow execution methods with tracing context\n if (WORKFLOW_METHODS_TO_WRAP.includes(prop as string)) {\n // Handle createRun and createRun methods differently\n if (prop === 'createRun' || prop === 'createRun') {\n return async (options: any = {}) => {\n const run = await (target as any)[prop](options);\n return run ? wrapRun(run, tracingContext) : run;\n };\n }\n\n // Handle other methods like execute\n return (input: any, options: any = {}) => {\n return (target as any)[prop](input, {\n ...options,\n tracingContext,\n });\n };\n }\n\n // Bind functions to preserve 'this' context for private member access\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap workflow method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create workflow proxy, using original instance', error);\n return workflow;\n }\n}\n\n/**\n * Creates a tracing-aware Run proxy that automatically injects\n * tracing context into start method calls\n */\nfunction wrapRun<T extends object>(run: T, tracingContext: TracingContext): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return run;\n }\n\n try {\n return new Proxy(run, {\n get(target, prop) {\n try {\n if (prop === 'start') {\n return (startOptions: any = {}) => {\n return (target as any).start({\n ...startOptions,\n tracingContext: startOptions.tracingContext ?? tracingContext,\n });\n };\n }\n\n // Pass through all other properties and methods unchanged\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap run method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create run proxy, using original instance', error);\n return run;\n }\n}\n"]}
|
|
@@ -63,5 +63,5 @@ var ToolStream = class extends web.WritableStream {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
exports.ToolStream = ToolStream;
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
67
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-3JA6VPNM.cjs.map
|
|
67
|
+
//# sourceMappingURL=chunk-3JA6VPNM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/stream.ts"],"names":["WritableStream"],"mappings":";;;;;AAmBO,IAAM,UAAA,GAAN,cAAyBA,kBAAA,CAAwB;AAAA,EACtD,cAAA;AAAA,EACQ,UAAA,GAA4B,QAAQ,OAAA,EAAQ;AAAA,EAEpD,WAAA,CACE;AAAA,IACE,MAAA;AAAA,IACA,MAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,KAOF,cAAA,EACA;AACA,IAAA,KAAA,CAAM;AAAA,MACJ,MAAM,MAAM,KAAA,EAAY;AACtB,QAAA,MAAM,MAAA,GAAS,gBAAgB,SAAA,EAAU;AAEzC,QAAA,IAAI;AACF,UAAA,MAAM,QAAQ,KAAA,CAAM;AAAA,YAClB,IAAA,EAAM,GAAG,MAAM,CAAA,OAAA,CAAA;AAAA,YACf,KAAA;AAAA,YACA,IAAA,EAAM,MAAA;AAAA,YACN,OAAA,EAAS;AAAA,cACP,MAAA,EAAQ,KAAA;AAAA,cACR,GAAI,WAAW,eAAA,GACX;AAAA,gBACE,KAAA;AAAA,gBACA,QAAA,EAAU;AAAA,eACZ,GACA;AAAA,gBACE,CAAC,CAAA,EAAG,MAAM,CAAA,MAAA,CAAQ,GAAG,MAAA;AAAA,gBACrB,CAAC,CAAA,EAAG,MAAM,CAAA,IAAA,CAAM,GAAG;AAAA;AACrB;AACN,WACD,CAAA;AAAA,QACH,CAAA,SAAE;AACA,UAAA,MAAA,EAAQ,WAAA,EAAY;AAAA,QACtB;AAAA,MACF;AAAA,KACD,CAAA;AACD,IAAA,IAAA,CAAK,cAAA,GAAiB,cAAA;AAAA,EACxB;AAAA,EAEA,MAAM,MAAM,IAAA,EAAW;AACrB,IAAA,MAAM,MAAA,GAAS,KAAK,SAAA,EAAU;AAE9B,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,MAAM,IAAI,CAAA;AAAA,IACzB,CAAA,SAAE;AACA,MAAA,MAAA,CAAO,WAAA,EAAY;AAAA,IACrB;AAAA,EACF;AAAA,EAEA,MAAM,OAAmC,IAAA,EAAgE;AAEvG,IAAA,IAAA,CAAK,UAAA,GAAa,IAAA,CAAK,UAAA,CAAW,IAAA,CAAK,YAAY;AACjD,MAAA,IAAI,CAAC,KAAK,cAAA,EAAgB;AACxB,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAAS,IAAA,CAAK,cAAA,CAAe,SAAA,EAAU;AAC7C,MAAA,IAAI;AACF,QAAA,MAAM,MAAA,CAAO,MAAM,IAAI,CAAA;AAAA,MACzB,CAAA,SAAE;AACA,QAAA,MAAA,CAAO,WAAA,EAAY;AAAA,MACrB;AAAA,IACF,CAAC,CAAA;AAED,IAAA,OAAO,IAAA,CAAK,UAAA;AAAA,EACd;AACF","file":"chunk-3JA6VPNM.cjs","sourcesContent":["import { WritableStream } from 'node:stream/web';\nimport type { DataChunkType } from '../stream/types';\n\n/**\n * ToolStream is a WritableStream that wraps chunks with metadata before writing to an underlying stream.\n *\n * It extends `WritableStream<unknown>` to allow piping from any ReadableStream type.\n * This is necessary because WritableStream is contravariant in its type parameter -\n * a WritableStream<unknown> can accept writes of any type, making it compatible\n * with ReadableStream<T> for any T.\n *\n * @example\n * ```typescript\n * // In a tool's execute function:\n * const stream = await agent.stream(prompt);\n * await stream.fullStream.pipeTo(context.writer);\n * ```\n *\n */\nexport class ToolStream extends WritableStream<unknown> {\n originalStream?: WritableStream;\n private writeQueue: Promise<void> = Promise.resolve();\n\n constructor(\n {\n prefix,\n callId,\n name,\n runId,\n }: {\n prefix: string;\n callId: string;\n name: string;\n runId: string;\n },\n originalStream?: WritableStream,\n ) {\n super({\n async write(chunk: any) {\n const writer = originalStream?.getWriter();\n\n try {\n await writer?.write({\n type: `${prefix}-output`,\n runId,\n from: 'USER',\n payload: {\n output: chunk,\n ...(prefix === 'workflow-step'\n ? {\n runId,\n stepName: name,\n }\n : {\n [`${prefix}CallId`]: callId,\n [`${prefix}Name`]: name,\n }),\n },\n });\n } finally {\n writer?.releaseLock();\n }\n },\n });\n this.originalStream = originalStream;\n }\n\n async write(data: any) {\n const writer = this.getWriter();\n\n try {\n await writer.write(data);\n } finally {\n writer.releaseLock();\n }\n }\n\n async custom<T extends { type: string }>(data: T extends { type: `data-${string}` } ? DataChunkType : T) {\n // Queue the write operation to prevent concurrent access to the writer\n this.writeQueue = this.writeQueue.then(async () => {\n if (!this.originalStream) {\n return;\n }\n\n const writer = this.originalStream.getWriter();\n try {\n await writer.write(data);\n } finally {\n writer.releaseLock();\n }\n });\n\n return this.writeQueue;\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { output_exports, generateText, generateObject, streamText, streamObject } from './chunk-
|
|
2
|
-
import { isZodType, delay } from './chunk-
|
|
3
|
-
import { executeWithContext, executeWithContextSync } from './chunk-
|
|
1
|
+
import { output_exports, generateText, generateObject, streamText, streamObject } from './chunk-ZUWJCGLM.js';
|
|
2
|
+
import { isZodType, delay } from './chunk-URBPEE67.js';
|
|
3
|
+
import { executeWithContext, executeWithContextSync } from './chunk-FNSFXWDN.js';
|
|
4
4
|
import { MastraError } from './chunk-JJ5O45LH.js';
|
|
5
5
|
import { MastraBase } from './chunk-LSHPJWM5.js';
|
|
6
6
|
import { OpenAIReasoningSchemaCompatLayer, OpenAISchemaCompatLayer, GoogleSchemaCompatLayer, AnthropicSchemaCompatLayer, DeepSeekSchemaCompatLayer, MetaSchemaCompatLayer, applyCompatLayer, jsonSchema } from '@mastra/schema-compat';
|
|
@@ -901,5 +901,5 @@ var AISDKV5LanguageModel = class {
|
|
|
901
901
|
};
|
|
902
902
|
|
|
903
903
|
export { AISDKV5LanguageModel, MastraLLMV1 };
|
|
904
|
-
//# sourceMappingURL=chunk-
|
|
905
|
-
//# sourceMappingURL=chunk-
|
|
904
|
+
//# sourceMappingURL=chunk-4GTU7MB2.js.map
|
|
905
|
+
//# sourceMappingURL=chunk-4GTU7MB2.js.map
|