@mastra/core 0.2.0-alpha.99 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +6 -8
- package/dist/agent/index.js +15 -7
- package/dist/{telemetry-oCUM52DG.d.ts → base-BbtPAA6f.d.ts} +50 -8
- package/dist/{index-Cwb-5AzX.d.ts → base-Bpb7Dmwe.d.ts} +367 -320
- package/dist/base.d.ts +3 -43
- package/dist/base.js +3 -3
- package/dist/bundler/index.d.ts +3 -4
- package/dist/bundler/index.js +4 -4
- package/dist/{chunk-MCB4M5W4.js → chunk-22LC46YN.js} +3 -9
- package/dist/{chunk-A7SNFYQB.js → chunk-2JL6DQMZ.js} +20 -28
- package/dist/chunk-2SAHBQEF.js +3 -0
- package/dist/chunk-3HBFW3Q7.js +24 -0
- package/dist/{chunk-KNPBNSJ7.js → chunk-55GTEVHJ.js} +12 -13
- package/dist/chunk-65VPTVVP.js +218 -0
- package/dist/chunk-AWEACB2T.js +66 -0
- package/dist/chunk-C6A6W6XS.js +49 -0
- package/dist/chunk-FGZVE4CM.js +404 -0
- package/dist/{chunk-DHCULRJM.js → chunk-J3W3IHDO.js} +114 -88
- package/dist/chunk-K36NSQWH.js +10 -0
- package/dist/{chunk-EO3TIPGQ.js → chunk-K4DFI76V.js} +382 -370
- package/dist/{chunk-42DYOLDV.js → chunk-MEISIZMP.js} +13 -21
- package/dist/chunk-MLWGYRJR.js +87 -0
- package/dist/{chunk-ICMEXHKD.js → chunk-O2VP5JBC.js} +48 -55
- package/dist/{chunk-ZJOMHCWE.js → chunk-OJ26F3J4.js} +98 -153
- package/dist/chunk-RG66XEJT.js +8 -0
- package/dist/chunk-SB37QG7O.js +1203 -0
- package/dist/chunk-SDBM53G4.js +32 -0
- package/dist/{chunk-4LJFWC2Q.js → chunk-SIFBBGY6.js} +59 -85
- package/dist/chunk-U6J2FOU4.js +624 -0
- package/dist/chunk-VB7CO5ND.js +31 -0
- package/dist/{chunk-C55JWGDU.js → chunk-ZJOXJFJI.js} +43 -15
- package/dist/deployer/index.d.ts +2 -4
- package/dist/deployer/index.js +5 -5
- package/dist/eval/index.d.ts +8 -13
- package/dist/eval/index.js +3 -3
- package/dist/filter/index.js +2 -2
- package/dist/hooks/index.d.ts +13 -18
- package/dist/hooks/index.js +2 -2
- package/dist/{index-CBZ2mk2H.d.ts → index-B2JCcAQt.d.ts} +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.js +43 -69
- package/dist/integration/index.d.ts +8 -10
- package/dist/integration/index.js +6 -3
- package/dist/llm/index.d.ts +6 -8
- package/dist/llm/index.js +1 -1
- package/dist/logger/index.d.ts +1 -1
- package/dist/logger/index.js +2 -2
- package/dist/mastra/index.d.ts +10 -13
- package/dist/mastra/index.js +20 -9
- package/dist/memory/index.d.ts +8 -10
- package/dist/memory/index.js +11 -9
- package/dist/relevance/index.js +16 -8
- package/dist/storage/index.d.ts +21 -10
- package/dist/storage/index.js +8 -7
- package/dist/telemetry/index.d.ts +35 -5
- package/dist/telemetry/index.js +3 -2
- package/dist/telemetry/otel-vendor.d.ts +7 -0
- package/dist/telemetry/otel-vendor.js +8 -0
- package/dist/tools/index.d.ts +6 -8
- package/dist/tools/index.js +2 -2
- package/dist/tts/index.d.ts +2 -4
- package/dist/tts/index.js +6 -5
- package/dist/{metric-BWeQNZt6.d.ts → types-m9RryK9a.d.ts} +6 -1
- package/dist/utils.js +2 -2
- package/dist/vector/index.d.ts +4 -6
- package/dist/vector/index.js +4 -4
- package/dist/vector/libsql/index.d.ts +2 -4
- package/dist/vector/libsql/index.js +6 -6
- package/dist/{workflow-DTtv7_Eq.d.ts → workflow-Cy8UTGCt.d.ts} +3 -6
- package/dist/workflows/index.d.ts +7 -9
- package/dist/workflows/index.js +4 -4
- package/package.json +14 -10
- package/dist/chunk-4ZUSEHLH.js +0 -285
- package/dist/chunk-AJJZUHB4.js +0 -14
- package/dist/chunk-G4MCO7XF.js +0 -70
- package/dist/chunk-HBTQNIAX.js +0 -90
- package/dist/chunk-HPXWJBQK.js +0 -222
- package/dist/chunk-JJ57BXQR.js +0 -16
- package/dist/chunk-JP37ODNX.js +0 -36
- package/dist/chunk-K3N7KJHH.js +0 -52
- package/dist/chunk-MDM2JS2U.js +0 -1288
- package/dist/chunk-VOUPGVRD.js +0 -27
- package/dist/chunk-Z7JFMQZZ.js +0 -551
- /package/dist/{chunk-AE3H2QEY.js → chunk-VDOJTUYY.js} +0 -0
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent } from '../
|
|
5
|
-
import '../base.js';
|
|
6
|
-
import '../
|
|
7
|
-
import '../telemetry-oCUM52DG.js';
|
|
4
|
+
export { A as Agent } from '../base-Bpb7Dmwe.js';
|
|
5
|
+
import '../base-BbtPAA6f.js';
|
|
6
|
+
import '../types-m9RryK9a.js';
|
|
8
7
|
import 'sift';
|
|
9
|
-
import '../index-CBZ2mk2H.js';
|
|
10
|
-
import 'pino';
|
|
11
|
-
import 'stream';
|
|
12
8
|
import '../vector/index.js';
|
|
13
9
|
import '@opentelemetry/api';
|
|
14
|
-
import '
|
|
10
|
+
import '../index-B2JCcAQt.js';
|
|
11
|
+
import 'pino';
|
|
12
|
+
import 'stream';
|
|
15
13
|
import '@opentelemetry/sdk-trace-base';
|
|
16
14
|
import '../tts/index.js';
|
package/dist/agent/index.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
export { Agent } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
export { Agent } from '../chunk-K4DFI76V.js';
|
|
2
|
+
import '../chunk-FGZVE4CM.js';
|
|
3
|
+
import '../chunk-2SAHBQEF.js';
|
|
4
|
+
import '../chunk-65VPTVVP.js';
|
|
5
|
+
import '../chunk-U6J2FOU4.js';
|
|
6
|
+
import '../chunk-RG66XEJT.js';
|
|
7
|
+
import '../chunk-OJ26F3J4.js';
|
|
8
|
+
import '../chunk-ZJOXJFJI.js';
|
|
9
|
+
import '../chunk-55GTEVHJ.js';
|
|
10
|
+
import '../chunk-AWEACB2T.js';
|
|
11
|
+
import '../chunk-O2VP5JBC.js';
|
|
12
|
+
import '../chunk-VB7CO5ND.js';
|
|
13
|
+
import '../chunk-MLWGYRJR.js';
|
|
14
|
+
import '../chunk-SIFBBGY6.js';
|
|
15
|
+
import '../chunk-C6A6W6XS.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
|
+
import { Tracer, Span } from '@opentelemetry/api';
|
|
3
|
+
import { R as RegisteredLogger, L as Logger, a as LogLevel } from './index-B2JCcAQt.js';
|
|
3
4
|
import { SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
4
5
|
|
|
5
6
|
/** Sampling strategy configuration for OpenTelemetry */
|
|
@@ -29,6 +30,8 @@ type OtelConfig = {
|
|
|
29
30
|
serviceName?: string;
|
|
30
31
|
/** Whether telemetry is enabled. Defaults to true */
|
|
31
32
|
enabled?: boolean;
|
|
33
|
+
/** Name of the tracer to use. Defaults to 'mastra-tracer' */
|
|
34
|
+
tracerName?: string;
|
|
32
35
|
/** Sampling configuration to control trace data volume */
|
|
33
36
|
sampling?: SamplingStrategy;
|
|
34
37
|
/** Export configuration for sending telemetry data */
|
|
@@ -44,22 +47,22 @@ type OtelConfig = {
|
|
|
44
47
|
type: 'console';
|
|
45
48
|
} | {
|
|
46
49
|
type: 'custom';
|
|
50
|
+
tracerName?: string;
|
|
47
51
|
exporter: SpanExporter;
|
|
48
52
|
};
|
|
49
53
|
};
|
|
50
54
|
|
|
51
55
|
declare global {
|
|
52
|
-
var __OTEL_SDK__: NodeSDK | undefined;
|
|
53
56
|
var __TELEMETRY__: Telemetry | undefined;
|
|
54
57
|
}
|
|
55
58
|
declare class Telemetry {
|
|
56
|
-
private sdk;
|
|
57
59
|
tracer: Tracer;
|
|
58
60
|
name: string;
|
|
59
|
-
private static isInitialized;
|
|
60
|
-
private getSampler;
|
|
61
61
|
private constructor();
|
|
62
|
-
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated This method does not do anything
|
|
64
|
+
*/
|
|
65
|
+
shutdown(): Promise<void>;
|
|
63
66
|
/**
|
|
64
67
|
* Initialize telemetry with the given configuration
|
|
65
68
|
* @param config - Optional telemetry configuration object
|
|
@@ -98,7 +101,46 @@ declare class Telemetry {
|
|
|
98
101
|
spanName: string;
|
|
99
102
|
attributes?: Record<string, string>;
|
|
100
103
|
skipIfNoTelemetry?: boolean;
|
|
104
|
+
parentSpan?: Span;
|
|
101
105
|
}): TMethod;
|
|
106
|
+
getBaggageTracer(): Tracer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare class MastraBase {
|
|
110
|
+
component: RegisteredLogger;
|
|
111
|
+
protected logger: Logger;
|
|
112
|
+
name?: string;
|
|
113
|
+
telemetry?: Telemetry;
|
|
114
|
+
constructor({ component, name }: {
|
|
115
|
+
component?: RegisteredLogger;
|
|
116
|
+
name?: string;
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Set the logger for the agent
|
|
120
|
+
* @param logger
|
|
121
|
+
*/
|
|
122
|
+
__setLogger(logger: Logger): void;
|
|
123
|
+
/**
|
|
124
|
+
* Internal logging helper that formats and sends logs to the configured logger
|
|
125
|
+
* @param level - Severity level of the log
|
|
126
|
+
* @param message - Main log message
|
|
127
|
+
* @param opts - Optional object for the log
|
|
128
|
+
*/
|
|
129
|
+
log(level: LogLevel, message: string, opts?: Record<string, any>): void;
|
|
130
|
+
/**
|
|
131
|
+
* Set the telemetry for the
|
|
132
|
+
* @param telemetry
|
|
133
|
+
*/
|
|
134
|
+
__setTelemetry(telemetry: Telemetry): void;
|
|
135
|
+
/**
|
|
136
|
+
* Get the telemetry on the vector
|
|
137
|
+
* @returns telemetry
|
|
138
|
+
*/
|
|
139
|
+
__getTelemetry(): Telemetry | undefined;
|
|
140
|
+
get experimental_telemetry(): {
|
|
141
|
+
tracer: _opentelemetry_api.Tracer;
|
|
142
|
+
isEnabled: boolean;
|
|
143
|
+
} | undefined;
|
|
102
144
|
}
|
|
103
145
|
|
|
104
|
-
export { type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
|
|
146
|
+
export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
|