@mastra/core 0.21.0-alpha.0 → 0.21.0-alpha.1
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 +28 -0
- package/README.md +30 -121
- package/dist/agent/agent.d.ts +1 -1
- package/dist/agent/agent.types.d.ts +4 -1
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.js +2 -2
- package/dist/agent/input-processor/index.cjs +6 -6
- package/dist/agent/input-processor/index.js +1 -1
- package/dist/agent/utils.d.ts.map +1 -1
- package/dist/ai-tracing/index.cjs +32 -32
- package/dist/ai-tracing/index.js +1 -1
- package/dist/ai-tracing/spans/base.d.ts +2 -0
- package/dist/ai-tracing/spans/base.d.ts.map +1 -1
- package/dist/ai-tracing/types.d.ts +16 -0
- package/dist/ai-tracing/types.d.ts.map +1 -1
- package/dist/{chunk-HY7VW2VD.js → chunk-24L3LVID.js} +4 -4
- package/dist/{chunk-HY7VW2VD.js.map → chunk-24L3LVID.js.map} +1 -1
- package/dist/{chunk-CHGLK2EE.cjs → chunk-2BTTHMDJ.cjs} +14 -2
- package/dist/chunk-2BTTHMDJ.cjs.map +1 -0
- package/dist/chunk-33JJWAVI.js +2077 -0
- package/dist/chunk-33JJWAVI.js.map +1 -0
- package/dist/{chunk-CMEDBCQI.cjs → chunk-3ZEJSGTJ.cjs} +7975 -12424
- package/dist/chunk-3ZEJSGTJ.cjs.map +1 -0
- package/dist/{chunk-UAU56I6S.js → chunk-624FF2ZG.js} +14 -2
- package/dist/chunk-624FF2ZG.js.map +1 -0
- package/dist/{chunk-37ZKH5YV.cjs → chunk-6OJROHMC.cjs} +11 -11
- package/dist/{chunk-37ZKH5YV.cjs.map → chunk-6OJROHMC.cjs.map} +1 -1
- package/dist/{chunk-6E3YXNS2.cjs → chunk-74P72XBM.cjs} +4 -4
- package/dist/{chunk-6E3YXNS2.cjs.map → chunk-74P72XBM.cjs.map} +1 -1
- package/dist/chunk-75CDUY5G.js +158 -0
- package/dist/chunk-75CDUY5G.js.map +1 -0
- package/dist/chunk-BLPOOPRL.js +3164 -0
- package/dist/chunk-BLPOOPRL.js.map +1 -0
- package/dist/{chunk-46URAIGN.cjs → chunk-DUMAWQ7I.cjs} +4 -4
- package/dist/{chunk-46URAIGN.cjs.map → chunk-DUMAWQ7I.cjs.map} +1 -1
- package/dist/chunk-EQV7XSTY.cjs +2090 -0
- package/dist/chunk-EQV7XSTY.cjs.map +1 -0
- package/dist/{chunk-CN3DPBSR.js → chunk-ILZI4MEU.js} +7810 -12260
- package/dist/chunk-ILZI4MEU.js.map +1 -0
- package/dist/{chunk-UJXD5L66.js → chunk-ONHTH5RH.js} +3 -3
- package/dist/{chunk-UJXD5L66.js.map → chunk-ONHTH5RH.js.map} +1 -1
- package/dist/{chunk-ACQCDLM5.js → chunk-PPW3SAWO.js} +5 -9
- package/dist/{chunk-ACQCDLM5.js.map → chunk-PPW3SAWO.js.map} +1 -1
- package/dist/{chunk-TUEJ2F25.js → chunk-Q4YVANA4.js} +5 -5
- package/dist/{chunk-TUEJ2F25.js.map → chunk-Q4YVANA4.js.map} +1 -1
- package/dist/chunk-QMKBXESK.cjs +3186 -0
- package/dist/chunk-QMKBXESK.cjs.map +1 -0
- package/dist/{chunk-WYJFP2MU.js → chunk-R3W5CNKP.js} +56 -41
- package/dist/chunk-R3W5CNKP.js.map +1 -0
- package/dist/{chunk-W6OYSIHF.cjs → chunk-RXGL66T6.cjs} +92 -74
- package/dist/chunk-RXGL66T6.cjs.map +1 -0
- package/dist/{chunk-IWYVLIYC.cjs → chunk-SL534RIL.cjs} +12 -12
- package/dist/{chunk-IWYVLIYC.cjs.map → chunk-SL534RIL.cjs.map} +1 -1
- package/dist/{chunk-LPXWG36P.cjs → chunk-SQXKJWFX.cjs} +12 -12
- package/dist/{chunk-LPXWG36P.cjs.map → chunk-SQXKJWFX.cjs.map} +1 -1
- package/dist/{chunk-5SQ4LGZX.cjs → chunk-SSDFGDFJ.cjs} +4 -4
- package/dist/{chunk-5SQ4LGZX.cjs.map → chunk-SSDFGDFJ.cjs.map} +1 -1
- package/dist/{chunk-W5SR3JVW.cjs → chunk-TTJM3STK.cjs} +7 -11
- package/dist/{chunk-W5SR3JVW.cjs.map → chunk-TTJM3STK.cjs.map} +1 -1
- package/dist/{chunk-U27VX7MI.cjs → chunk-UPRLKS2E.cjs} +6 -6
- package/dist/{chunk-U27VX7MI.cjs.map → chunk-UPRLKS2E.cjs.map} +1 -1
- package/dist/{chunk-PVVDB5IT.js → chunk-UQCUAYWV.js} +3 -3
- package/dist/{chunk-PVVDB5IT.js.map → chunk-UQCUAYWV.js.map} +1 -1
- package/dist/{chunk-RLLLUDY3.js → chunk-XL5MZTLP.js} +3 -3
- package/dist/{chunk-RLLLUDY3.js.map → chunk-XL5MZTLP.js.map} +1 -1
- package/dist/{chunk-7G7VIPVE.js → chunk-XQ5A3ISB.js} +3 -3
- package/dist/{chunk-7G7VIPVE.js.map → chunk-XQ5A3ISB.js.map} +1 -1
- package/dist/chunk-Y2PKC5BX.cjs +160 -0
- package/dist/chunk-Y2PKC5BX.cjs.map +1 -0
- package/dist/{chunk-O2WF4GIK.js → chunk-YUV3LZMY.js} +3 -3
- package/dist/{chunk-O2WF4GIK.js.map → chunk-YUV3LZMY.js.map} +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.js +8 -8
- package/dist/llm/index.cjs +6 -6
- package/dist/llm/index.d.ts +1 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/gateways/netlify.d.ts.map +1 -1
- package/dist/llm/model/index.d.ts +1 -1
- package/dist/llm/model/index.d.ts.map +1 -1
- package/dist/llm/model/provider-registry.d.ts +98 -0
- package/dist/llm/model/provider-registry.d.ts.map +1 -0
- package/dist/llm/model/provider-types.generated.d.ts +679 -0
- package/dist/llm/model/registry-generator.d.ts +29 -0
- package/dist/llm/model/registry-generator.d.ts.map +1 -0
- package/dist/llm/model/router.d.ts +1 -1
- package/dist/llm/model/router.d.ts.map +1 -1
- package/dist/llm/model/shared.types.d.ts +1 -1
- package/dist/llm/model/shared.types.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +1 -1
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/models-dev-A334FF64.js +3 -0
- package/dist/models-dev-A334FF64.js.map +1 -0
- package/dist/models-dev-ECOIQLLK.cjs +12 -0
- package/dist/models-dev-ECOIQLLK.cjs.map +1 -0
- package/dist/netlify-CEYZ5O54.js +3 -0
- package/dist/netlify-CEYZ5O54.js.map +1 -0
- package/dist/netlify-WFAL2AA4.cjs +12 -0
- package/dist/netlify-WFAL2AA4.cjs.map +1 -0
- package/dist/processors/index.cjs +11 -11
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/language-detector.d.ts +2 -0
- package/dist/processors/processors/language-detector.d.ts.map +1 -1
- package/dist/processors/processors/moderation.d.ts.map +1 -1
- package/dist/processors/processors/pii-detector.d.ts +2 -1
- package/dist/processors/processors/pii-detector.d.ts.map +1 -1
- package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
- package/dist/processors/processors/structured-output.d.ts +2 -0
- package/dist/processors/processors/structured-output.d.ts.map +1 -1
- package/dist/processors/processors/system-prompt-scrubber.d.ts +2 -1
- package/dist/processors/processors/system-prompt-scrubber.d.ts.map +1 -1
- package/dist/processors/runner.d.ts +8 -2
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/provider-registry.json +1625 -0
- package/dist/registry-generator-7XDUEFUT.cjs +111 -0
- package/dist/registry-generator-7XDUEFUT.cjs.map +1 -0
- package/dist/registry-generator-ZKIT6I3E.js +103 -0
- package/dist/registry-generator-ZKIT6I3E.js.map +1 -0
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/scores/index.cjs +9 -9
- package/dist/scores/index.js +2 -2
- package/dist/scores/scoreTraces/index.cjs +10 -10
- package/dist/scores/scoreTraces/index.cjs.map +1 -1
- package/dist/scores/scoreTraces/index.js +5 -5
- package/dist/scores/scoreTraces/index.js.map +1 -1
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
- package/dist/stream/base/output-format-handlers.d.ts +3 -1
- package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +13 -9
- package/dist/stream/index.d.ts +1 -0
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +7 -0
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +2 -2
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/utils.cjs +17 -17
- package/dist/utils.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +12 -12
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +22 -22
- package/dist/workflows/legacy/index.js +1 -1
- package/dist/workflows/workflow.d.ts +20 -1
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/llm/model/provider-types.generated.d.ts +679 -0
- package/dist/chunk-CHGLK2EE.cjs.map +0 -1
- package/dist/chunk-CMEDBCQI.cjs.map +0 -1
- package/dist/chunk-CN3DPBSR.js.map +0 -1
- package/dist/chunk-UAU56I6S.js.map +0 -1
- package/dist/chunk-W6OYSIHF.cjs.map +0 -1
- package/dist/chunk-WYJFP2MU.js.map +0 -1
- package/dist/llm/model/provider-registry.generated.d.ts +0 -99
- package/dist/llm/model/provider-registry.generated.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 0.21.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix aisdk format in workflow breaking stream ([#8716](https://github.com/mastra-ai/mastra/pull/8716))
|
|
8
|
+
|
|
9
|
+
- improve error propagation in agent stream failures ([#8733](https://github.com/mastra-ai/mastra/pull/8733))
|
|
10
|
+
|
|
11
|
+
- Create unified Sidebar component to use on Playground and Cloud ([#8655](https://github.com/mastra-ai/mastra/pull/8655))
|
|
12
|
+
|
|
13
|
+
- Added tracing of input & output processors (this includes using structuredOutput) ([#8623](https://github.com/mastra-ai/mastra/pull/8623))
|
|
14
|
+
|
|
15
|
+
- ai-sdk workflow route, agent network route ([#8672](https://github.com/mastra-ai/mastra/pull/8672))
|
|
16
|
+
|
|
17
|
+
- Handle maxRetries in agent.generate/stream properly. Add deprecation warning to top level abortSignal in AgentExecuteOptions as that property is duplicated inside of modelSettings as well. ([#8729](https://github.com/mastra-ai/mastra/pull/8729))
|
|
18
|
+
|
|
19
|
+
- Added deprecation warnings for stream and observeStream. We will switch the implementation to streamVNext/observeStreamVNext in the future. ([#8701](https://github.com/mastra-ai/mastra/pull/8701))
|
|
20
|
+
|
|
21
|
+
- Add div wrapper around entity tables to fix table vertical position ([#8758](https://github.com/mastra-ai/mastra/pull/8758))
|
|
22
|
+
|
|
23
|
+
- Customize AITraces type to seamlessly work on Cloud too ([#8759](https://github.com/mastra-ai/mastra/pull/8759))
|
|
24
|
+
|
|
25
|
+
- Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
26
|
+
|
|
27
|
+
- Fix broken `generateTitle` behaviour #8726, make `generateTitle: true` default memory setting ([#8800](https://github.com/mastra-ai/mastra/pull/8800))
|
|
28
|
+
|
|
29
|
+
- Improve README ([#8819](https://github.com/mastra-ai/mastra/pull/8819))
|
|
30
|
+
|
|
3
31
|
## 0.21.0-alpha.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,146 +1,55 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
-
Mastra is
|
|
3
|
+
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It includes everything you need to go from early prototypes to production-ready applications. Mastra integrates with frontend and backend frameworks like React, Next.js, and Node, or you can deploy it anywhere as a standalone server. It's the easiest way to build, tune, and scale reliable AI products.
|
|
6
|
+
|
|
7
|
+
This is the `@mastra/core` package, which includes the main functionality of Mastra, including agents, workflows, tools, memory, and tracing.
|
|
6
8
|
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
11
|
+
`@mastra/core` is an essential building block for a Mastra application and you most likely don't want to use it as a standalone package. Therefore we recommend following the [installation guide](https://mastra.ai/docs/getting-started/installation) to get started with Mastra.
|
|
12
|
+
|
|
13
|
+
You can install the package like so:
|
|
14
|
+
|
|
9
15
|
```bash
|
|
10
16
|
npm install @mastra/core
|
|
11
17
|
```
|
|
12
18
|
|
|
13
19
|
## Core Components
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Mastra agents are autonomous AI entities that can understand instructions, use tools, and complete tasks. They encapsulate LLM interactions and can maintain conversation history, use provided tools, and follow specific behavioral guidelines through instructions.
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import { Agent } from '@mastra/core/agent';
|
|
21
|
-
import { openai } from '@ai-sdk/openai';
|
|
22
|
-
|
|
23
|
-
const agent = new Agent({
|
|
24
|
-
name: 'my-agent',
|
|
25
|
-
instructions: 'Your task-specific instructions',
|
|
26
|
-
model: openai('gpt-4o-mini'),
|
|
27
|
-
tools: {}, // Optional tools
|
|
28
|
-
});
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
[Agent documentation →](https://mastra.ai/docs/agents/overview)
|
|
32
|
-
|
|
33
|
-
### Workflows (`/workflows`)
|
|
34
|
-
|
|
35
|
-
Mastra workflows are a graph-based execution engine allowing you to chain, branch, and parallelize LLM calls. You can orchestrate complex AI tasks by combining multiple actions. Workflows handle state management, error recovery, and can include conditional logic.
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
import { createWorkflow } from '@mastra/core/workflows';
|
|
39
|
-
import z from 'zod'
|
|
40
|
-
|
|
41
|
-
const workflow = createWorkflow({
|
|
42
|
-
id: 'my-workflow',
|
|
43
|
-
inputSchema: z.object({}),
|
|
44
|
-
outputSchema: z.object({})
|
|
45
|
-
steps: [
|
|
46
|
-
// Workflow steps
|
|
47
|
-
],
|
|
48
|
-
});
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
[Workflow documentation →](https://mastra.ai/docs/workflows/overview)
|
|
52
|
-
|
|
53
|
-
### Tools (`/tools`)
|
|
21
|
+
- **Mastra** (`/mastra`) - Central orchestration class that initializes and coordinates all Mastra components. Provides dependency injection for agents, workflows, tools,
|
|
22
|
+
memory, storage, and other services through a unified configuration interface. [Learn more about Mastra](https://mastra.ai/docs/getting-started/installation)
|
|
54
23
|
|
|
55
|
-
|
|
24
|
+
- **Agents** (`/agent`) - Autonomous AI entities that understand instructions, use tools, and complete tasks. Encapsulate LLM interactions with conversation history, tool
|
|
25
|
+
execution, memory integration, and behavioral guidelines. [Learn more about Agents](https://mastra.ai/docs/agents/overview)
|
|
56
26
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
import { z } from 'zod';
|
|
27
|
+
- **Workflows** (`/workflows`) - Graph-based execution engine for chaining, branching, and parallelizing LLM calls. Orchestrates complex AI tasks with state management,
|
|
28
|
+
error recovery, and conditional logic. [Learn more about Workflows](https://mastra.ai/docs/workflows/overview)
|
|
60
29
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
inputSchema: z.object({
|
|
64
|
-
city: z.string(),
|
|
65
|
-
}),
|
|
66
|
-
description: 'Fetches the current weather information for a given city',
|
|
67
|
-
execute: async ({ context: { city } }) => {
|
|
68
|
-
// Tool implementation
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
[Tools documentation →](https://mastra.ai/docs/agents/adding-tools)
|
|
74
|
-
|
|
75
|
-
### Evals (`/eval`)
|
|
76
|
-
|
|
77
|
-
The evaluation system enables quantitative assessment of AI outputs. Create custom metrics to measure specific aspects of AI performance, from response quality to task completion accuracy.
|
|
30
|
+
- **Tools** (`/tools`) - Functions that agents can invoke to interact with external systems. Each tool has a schema and description enabling AI to understand and use them
|
|
31
|
+
effectively. Supports custom tools, toolsets, and runtime context. [Learn more about Tools](https://mastra.ai/docs/tools-mcp/overview)
|
|
78
32
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
import { openai } from '@ai-sdk/openai';
|
|
82
|
-
import { SummarizationMetric } from '@mastra/evals/llm';
|
|
83
|
-
import { ContentSimilarityMetric, ToneConsistencyMetric } from '@mastra/evals/nlp';
|
|
33
|
+
- **Memory** (`/memory`) - Thread-based conversation persistence with semantic recall and working memory capabilities. Stores conversation history, retrieves contextually
|
|
34
|
+
relevant information, and maintains agent state across interactions. [Learn more about Memory](https://mastra.ai/docs/memory/overview)
|
|
84
35
|
|
|
85
|
-
|
|
36
|
+
- **MCP** (`/mcp`) - Model Context Protocol integration enabling external tool sources. Supports SSE, HTTP, and Hono-based MCP servers with automatic tool conversion and
|
|
37
|
+
registration. [Learn more about MCP](https://mastra.ai/docs/tools-mcp/mcp-overview)
|
|
86
38
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
instructions: 'You are a content writer that creates accurate summaries',
|
|
90
|
-
model,
|
|
91
|
-
evals: {
|
|
92
|
-
summarization: new SummarizationMetric(model),
|
|
93
|
-
contentSimilarity: new ContentSimilarityMetric(),
|
|
94
|
-
tone: new ToneConsistencyMetric(),
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
[More evals documentation →](https://mastra.ai/docs/evals/overview)
|
|
39
|
+
- **AI Tracing** (`/ai-tracing`) - Type-safe observability system tracking AI operations through spans. Provides OpenTelemetry-compatible tracing with event-driven exports,
|
|
40
|
+
flexible sampling, and pluggable processors for real-time monitoring. [Learn more about AI Tracing](https://mastra.ai/docs/observability/ai-tracing/overview)
|
|
100
41
|
|
|
101
|
-
|
|
42
|
+
- **Storage** (`/storage`) - Pluggable storage layer with standardized interfaces for multiple backends. Supports PostgreSQL, LibSQL, MongoDB, and other databases for
|
|
43
|
+
persisting agent data, memory, and workflow state. [Learn more about Storage](https://mastra.ai/docs/server-db/storage)
|
|
102
44
|
|
|
103
|
-
|
|
45
|
+
- **Vector** (`/vector`) - Vector operations and embedding management for semantic search. Provides unified interface for vector stores with filtering capabilities and
|
|
46
|
+
similarity search. [Learn more about Vector](https://mastra.ai/docs/rag/vector-databases)
|
|
104
47
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
import { PinoLogger } from '@mastra/loggers';
|
|
108
|
-
|
|
109
|
-
const logger = new PinoLogger({
|
|
110
|
-
name: 'MyApp',
|
|
111
|
-
level: LogLevel.INFO,
|
|
112
|
-
});
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
[More logging documentation →](https://mastra.ai/reference/observability/logging)
|
|
116
|
-
|
|
117
|
-
### Telemetry (`/telemetry`)
|
|
118
|
-
|
|
119
|
-
Note: Telemetry is deprecated and will be removed on the Nov 4th release. Instead use AI Tracing.
|
|
120
|
-
More info can be found here: https://github.com/mastra-ai/mastra/issues/8577 and here: https://mastra.ai/en/docs/observability/ai-tracing/overview
|
|
121
|
-
|
|
122
|
-
Telemetry provides OpenTelemetry (Otel) integration for comprehensive monitoring of your AI systems. Track latency, success rates, and system health with distributed tracing and metrics collection.
|
|
123
|
-
|
|
124
|
-
```typescript
|
|
125
|
-
import { Mastra } from '@mastra/core';
|
|
126
|
-
|
|
127
|
-
const mastra = new Mastra({
|
|
128
|
-
telemetry: {
|
|
129
|
-
serviceName: 'my-service',
|
|
130
|
-
enabled: true,
|
|
131
|
-
sampling: {
|
|
132
|
-
type: 'ratio',
|
|
133
|
-
probability: 0.5,
|
|
134
|
-
},
|
|
135
|
-
export: {
|
|
136
|
-
type: 'otlp',
|
|
137
|
-
endpoint: 'https://otel-collector.example.com/v1/traces',
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
```
|
|
48
|
+
- **Server** (`/server`) - HTTP server implementation built on Hono with OpenAPI support. Provides custom API routes, middleware, authentication, and runtime context for
|
|
49
|
+
deploying Mastra as a standalone service. [Learn more about Server](https://mastra.ai/docs/server-db/production-server)
|
|
142
50
|
|
|
143
|
-
|
|
51
|
+
- **Voice** (`/voice`) - Voice interaction capabilities with text-to-speech and speech-to-text integration. Supports multiple voice providers and real-time voice
|
|
52
|
+
communication for agents. [Learn more about Voice](https://mastra.ai/docs/voice/overview)
|
|
144
53
|
|
|
145
54
|
## Additional Resources
|
|
146
55
|
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -527,7 +527,7 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
527
527
|
* }
|
|
528
528
|
* ```
|
|
529
529
|
*/
|
|
530
|
-
network(messages: MessageListInput, options?: MultiPrimitiveExecutionOptions): Promise<import("../stream
|
|
530
|
+
network(messages: MessageListInput, options?: MultiPrimitiveExecutionOptions): Promise<import("../stream").MastraAgentNetworkStream>;
|
|
531
531
|
/**
|
|
532
532
|
* @deprecated `generateVNext()` has been renamed to `generate()`. Please use `generate()` instead.
|
|
533
533
|
*/
|
|
@@ -71,7 +71,10 @@ export type AgentExecutionOptions<OUTPUT extends OutputSchema = undefined, FORMA
|
|
|
71
71
|
onAbort?: LoopConfig['onAbort'];
|
|
72
72
|
/** Tools that are active for this execution */
|
|
73
73
|
activeTools?: LoopConfig['activeTools'];
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Signal to abort the streaming operation
|
|
76
|
+
* @deprecated Use `modelSettings.abortSignal` instead. This top-level option will be removed in a future version.
|
|
77
|
+
*/
|
|
75
78
|
abortSignal?: LoopConfig['abortSignal'];
|
|
76
79
|
/** Input processors to use for this execution (overrides agent's default) */
|
|
77
80
|
inputProcessors?: InputProcessor[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.types.d.ts","sourceRoot":"","sources":["../../src/agent/agent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAA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,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,IACvD,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IAC1C,cAAc,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAC3C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,gBAAgB,GAAG,cAAc,CAAC;IACtE,uFAAuF;IACvF,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,kDAAkD;IAClD,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC"}
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkRXGL66T6_cjs = require('../chunk-RXGL66T6.cjs');
|
|
4
|
+
var chunkSSDFGDFJ_cjs = require('../chunk-SSDFGDFJ.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 chunkRXGL66T6_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "LanguageDetectorInputProcessor", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkRXGL66T6_cjs.LanguageDetectorInputProcessor; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ModerationInputProcessor", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkRXGL66T6_cjs.ModerationInputProcessor; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "PIIDetectorInputProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkRXGL66T6_cjs.PIIDetectorInputProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "PromptInjectionDetectorInputProcessor", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkRXGL66T6_cjs.PromptInjectionDetectorInputProcessor; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "TripWire", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkRXGL66T6_cjs.TripWire; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "UnicodeNormalizerInputProcessor", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkRXGL66T6_cjs.UnicodeNormalizerInputProcessor; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkRXGL66T6_cjs.tryGenerateWithJsonFallback; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkRXGL66T6_cjs.tryStreamWithJsonFallback; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "MessageList", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkSSDFGDFJ_cjs.MessageList; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "convertMessages", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkSSDFGDFJ_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, LanguageDetectorInputProcessor, ModerationInputProcessor, PIIDetectorInputProcessor, PromptInjectionDetectorInputProcessor, TripWire, UnicodeNormalizerInputProcessor, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
2
|
-
export { MessageList, convertMessages } from '../chunk-
|
|
1
|
+
export { Agent, LanguageDetectorInputProcessor, ModerationInputProcessor, PIIDetectorInputProcessor, PromptInjectionDetectorInputProcessor, TripWire, UnicodeNormalizerInputProcessor, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-R3W5CNKP.js';
|
|
2
|
+
export { MessageList, convertMessages } from '../chunk-YUV3LZMY.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRXGL66T6_cjs = require('../../chunk-RXGL66T6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "LanguageDetectorInputProcessor", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkRXGL66T6_cjs.LanguageDetectorInputProcessor; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "ModerationInputProcessor", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkRXGL66T6_cjs.ModerationInputProcessor; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "PIIDetectorInputProcessor", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkRXGL66T6_cjs.PIIDetectorInputProcessor; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "PromptInjectionDetectorInputProcessor", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkRXGL66T6_cjs.PromptInjectionDetectorInputProcessor; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "UnicodeNormalizerInputProcessor", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkRXGL66T6_cjs.UnicodeNormalizerInputProcessor; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=index.cjs.map
|
|
28
28
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { LanguageDetectorInputProcessor, ModerationInputProcessor, PIIDetectorInputProcessor, PromptInjectionDetectorInputProcessor, UnicodeNormalizerInputProcessor } from '../../chunk-
|
|
1
|
+
export { LanguageDetectorInputProcessor, ModerationInputProcessor, PIIDetectorInputProcessor, PromptInjectionDetectorInputProcessor, UnicodeNormalizerInputProcessor } from '../../chunk-R3W5CNKP.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/agent/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,wBAAsB,2BAA2B,CAC/C,MAAM,SAAS,YAAY,GAAG,SAAS,EACvC,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,QAAQ,EAC5C,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/agent/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,wBAAsB,2BAA2B,CAC/C,MAAM,SAAS,YAAY,GAAG,SAAS,EACvC,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,QAAQ,EAC5C,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;mBAsD4qe,yDAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAhC,yDAAgC;;;;;;;;;;;;;;;;GAnCnye;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,SAAS,YAAY,GAAG,SAAS,EACvC,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,QAAQ,EAC5C,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,qIA6BvF"}
|
|
@@ -1,132 +1,132 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2BTTHMDJ_cjs = require('../chunk-2BTTHMDJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "AISpanType", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk2BTTHMDJ_cjs.AISpanType; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "AITracingEventType", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk2BTTHMDJ_cjs.AITracingEventType; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "BaseAISpan", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk2BTTHMDJ_cjs.BaseAISpan; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "BaseAITracing", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk2BTTHMDJ_cjs.BaseAITracing; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "CloudExporter", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk2BTTHMDJ_cjs.CloudExporter; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "ConsoleExporter", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk2BTTHMDJ_cjs.ConsoleExporter; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "DefaultAISpan", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk2BTTHMDJ_cjs.DefaultAISpan; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "DefaultAITracing", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk2BTTHMDJ_cjs.DefaultAITracing; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "DefaultExporter", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk2BTTHMDJ_cjs.DefaultExporter; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "InternalSpans", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk2BTTHMDJ_cjs.InternalSpans; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "NoOpAISpan", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunk2BTTHMDJ_cjs.NoOpAISpan; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "SamplingStrategyType", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk2BTTHMDJ_cjs.SamplingStrategyType; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "SensitiveDataFilter", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk2BTTHMDJ_cjs.SensitiveDataFilter; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "clearAITracingRegistry", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk2BTTHMDJ_cjs.clearAITracingRegistry; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "deepClean", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk2BTTHMDJ_cjs.deepClean; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "getAITracing", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunk2BTTHMDJ_cjs.getAITracing; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "getAllAITracing", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk2BTTHMDJ_cjs.getAllAITracing; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "getDefaultAITracing", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunk2BTTHMDJ_cjs.getDefaultAITracing; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "getOrCreateSpan", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk2BTTHMDJ_cjs.getOrCreateSpan; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "getSelectedAITracing", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunk2BTTHMDJ_cjs.getSelectedAITracing; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "getValidTraceId", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunk2BTTHMDJ_cjs.getValidTraceId; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "hasAITracing", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunk2BTTHMDJ_cjs.hasAITracing; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "isMastra", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunk2BTTHMDJ_cjs.isMastra; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "omitKeys", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunk2BTTHMDJ_cjs.omitKeys; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "registerAITracing", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunk2BTTHMDJ_cjs.registerAITracing; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "selectFields", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk2BTTHMDJ_cjs.selectFields; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "setSelector", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunk2BTTHMDJ_cjs.setSelector; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "setupAITracing", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunk2BTTHMDJ_cjs.setupAITracing; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "shutdownAITracingRegistry", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunk2BTTHMDJ_cjs.shutdownAITracingRegistry; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "unregisterAITracing", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunk2BTTHMDJ_cjs.unregisterAITracing; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "wrapMastra", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunk2BTTHMDJ_cjs.wrapMastra; }
|
|
130
130
|
});
|
|
131
131
|
//# sourceMappingURL=index.cjs.map
|
|
132
132
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai-tracing/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AISpanType, AITracingEventType, BaseAISpan, BaseAITracing, CloudExporter, ConsoleExporter, DefaultAISpan, DefaultAITracing, DefaultExporter, InternalSpans, NoOpAISpan, SamplingStrategyType, SensitiveDataFilter, clearAITracingRegistry, deepClean, getAITracing, getAllAITracing, getDefaultAITracing, getOrCreateSpan, getSelectedAITracing, getValidTraceId, hasAITracing, isMastra, omitKeys, registerAITracing, selectFields, setSelector, setupAITracing, shutdownAITracingRegistry, unregisterAITracing, wrapMastra } from '../chunk-
|
|
1
|
+
export { AISpanType, AITracingEventType, BaseAISpan, BaseAITracing, CloudExporter, ConsoleExporter, DefaultAISpan, DefaultAITracing, DefaultExporter, InternalSpans, NoOpAISpan, SamplingStrategyType, SensitiveDataFilter, clearAITracingRegistry, deepClean, getAITracing, getAllAITracing, getDefaultAITracing, getOrCreateSpan, getSelectedAITracing, getValidTraceId, hasAITracing, isMastra, omitKeys, registerAITracing, selectFields, setSelector, setupAITracing, shutdownAITracingRegistry, unregisterAITracing, wrapMastra } from '../chunk-624FF2ZG.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -37,6 +37,8 @@ export declare abstract class BaseAISpan<TType extends AISpanType = any> impleme
|
|
|
37
37
|
abstract get isValid(): boolean;
|
|
38
38
|
/** Get the closest parent spanId that isn't an internal span */
|
|
39
39
|
getParentSpanId(includeInternalSpans?: boolean): string | undefined;
|
|
40
|
+
/** Find the closest parent span of a specific type by walking up the parent chain */
|
|
41
|
+
findParent<T extends AISpanType>(spanType: T): AISpan<T> | undefined;
|
|
40
42
|
/** Returns a lightweight span ready for export */
|
|
41
43
|
exportSpan(includeInternalSpans?: boolean): ExportedAISpan<TType>;
|
|
42
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/ai-tracing/spans/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AA2CrD,8BAAsB,UAAU,CAAC,KAAK,SAAS,UAAU,GAAG,GAAG,CAAE,YAAW,MAAM,CAAC,KAAK,CAAC;IACvF,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,OAAO,EAAE,MAAM,CAAC;IAEzB,IAAI,EAAE,MAA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O,IAAI,OAAO,CAAC;IAEhC,gEAAgE;IACzD,eAAe,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAQ1E,qFAAqF;IAC9E,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS;IAa3E,kDAAkD;IAC3C,UAAU,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC;CAkBzE;AASD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,GAAG,EACV,OAAO,GAAE,gBAAqB,EAC9B,KAAK,GAAE,OAAO,CAAC,GAAG,CAAiB,EACnC,MAAM,GAAE,MAAU,GACjB,GAAG,CAwCL"}
|
|
@@ -19,6 +19,8 @@ export declare enum AISpanType {
|
|
|
19
19
|
LLM_CHUNK = "llm_chunk",
|
|
20
20
|
/** MCP (Model Context Protocol) tool execution */
|
|
21
21
|
MCP_TOOL_CALL = "mcp_tool_call",
|
|
22
|
+
/** Input or Output Processor execution */
|
|
23
|
+
PROCESSOR_RUN = "processor_run",
|
|
22
24
|
/** Function/tool execution with inputs, outputs, errors */
|
|
23
25
|
TOOL_CALL = "tool_call",
|
|
24
26
|
/** Workflow run - root span for workflow processes */
|
|
@@ -130,6 +132,17 @@ export interface MCPToolCallAttributes extends AIBaseAttributes {
|
|
|
130
132
|
/** Whether tool execution was successful */
|
|
131
133
|
success?: boolean;
|
|
132
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Processor attributes
|
|
137
|
+
*/
|
|
138
|
+
export interface ProcessorRunAttributes extends AIBaseAttributes {
|
|
139
|
+
/** Name of the Processor */
|
|
140
|
+
processorName: string;
|
|
141
|
+
/** Processor type (input or output) */
|
|
142
|
+
processorType: 'input' | 'output';
|
|
143
|
+
/** Processor index in the agent */
|
|
144
|
+
processorIndex?: number;
|
|
145
|
+
}
|
|
133
146
|
/**
|
|
134
147
|
* Workflow Run attributes
|
|
135
148
|
*/
|
|
@@ -224,6 +237,7 @@ export interface AISpanTypeMap {
|
|
|
224
237
|
[AISpanType.LLM_CHUNK]: LLMChunkAttributes;
|
|
225
238
|
[AISpanType.TOOL_CALL]: ToolCallAttributes;
|
|
226
239
|
[AISpanType.MCP_TOOL_CALL]: MCPToolCallAttributes;
|
|
240
|
+
[AISpanType.PROCESSOR_RUN]: ProcessorRunAttributes;
|
|
227
241
|
[AISpanType.WORKFLOW_STEP]: WorkflowStepAttributes;
|
|
228
242
|
[AISpanType.WORKFLOW_CONDITIONAL]: WorkflowConditionalAttributes;
|
|
229
243
|
[AISpanType.WORKFLOW_CONDITIONAL_EVAL]: WorkflowConditionalEvalAttributes;
|
|
@@ -298,6 +312,8 @@ export interface AISpan<TType extends AISpanType> extends BaseSpan<TType> {
|
|
|
298
312
|
get isValid(): boolean;
|
|
299
313
|
/** Get the closest parent spanId that isn't an internal span */
|
|
300
314
|
getParentSpanId(includeInternalSpans?: boolean): string | undefined;
|
|
315
|
+
/** Find the closest parent span of a specific type by walking up the parent chain */
|
|
316
|
+
findParent<T extends AISpanType>(spanType: T): AISpan<T> | undefined;
|
|
301
317
|
/** Returns a lightweight span ready for export */
|
|
302
318
|
exportSpan(includeInternalSpans?: boolean): ExportedAISpan<TType> | undefined;
|
|
303
319
|
}
|