@mastra/observability 0.0.0-fix-persist-session-cache-option-mcp-server-20251031154006 → 0.0.0-fix-9244-clickhouse-metadata-20251104213434
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 +9 -3
- package/README.md +101 -0
- package/dist/default-entrypoint.d.ts +16 -0
- package/dist/default-entrypoint.d.ts.map +1 -0
- package/dist/exporters/base.d.ts +111 -0
- package/dist/exporters/base.d.ts.map +1 -0
- package/dist/exporters/cloud.d.ts +30 -0
- package/dist/exporters/cloud.d.ts.map +1 -0
- package/dist/exporters/console.d.ts +10 -0
- package/dist/exporters/console.d.ts.map +1 -0
- package/dist/exporters/default.d.ts +93 -0
- package/dist/exporters/default.d.ts.map +1 -0
- package/dist/exporters/index.d.ts +9 -0
- package/dist/exporters/index.d.ts.map +1 -0
- package/dist/index.cjs +2052 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2029 -0
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +2 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/model-tracing.d.ts +48 -0
- package/dist/model-tracing.d.ts.map +1 -0
- package/dist/registry.d.ts +51 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/span_processors/index.d.ts +5 -0
- package/dist/span_processors/index.d.ts.map +1 -0
- package/dist/span_processors/sensitive-data-filter.d.ts +85 -0
- package/dist/span_processors/sensitive-data-filter.d.ts.map +1 -0
- package/dist/spans/base.d.ts +71 -0
- package/dist/spans/base.d.ts.map +1 -0
- package/dist/spans/default.d.ts +13 -0
- package/dist/spans/default.d.ts.map +1 -0
- package/dist/spans/index.d.ts +7 -0
- package/dist/spans/index.d.ts.map +1 -0
- package/dist/spans/no-op.d.ts +15 -0
- package/dist/spans/no-op.d.ts.map +1 -0
- package/dist/tracers/base.d.ts +105 -0
- package/dist/tracers/base.d.ts.map +1 -0
- package/dist/tracers/default.d.ts +7 -0
- package/dist/tracers/default.d.ts.map +1 -0
- package/dist/tracers/index.d.ts +6 -0
- package/dist/tracers/index.d.ts.map +1 -0
- package/package.json +8 -6
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { AISpan, AISpanTypeMap, AnyAISpan, ChildSpanOptions, ChildEventOptions, EndSpanOptions, ErrorSpanOptions, UpdateSpanOptions, CreateSpanOptions, AITracing, ExportedAISpan, TraceState, IModelSpanTracker, AIModelGenerationSpan } from '@mastra/core/observability';
|
|
2
|
+
import { AISpanType } from '@mastra/core/observability';
|
|
3
|
+
export declare abstract class BaseAISpan<TType extends AISpanType = any> implements AISpan<TType> {
|
|
4
|
+
abstract id: string;
|
|
5
|
+
abstract traceId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: TType;
|
|
8
|
+
attributes: AISpanTypeMap[TType];
|
|
9
|
+
parent?: AnyAISpan;
|
|
10
|
+
startTime: Date;
|
|
11
|
+
endTime?: Date;
|
|
12
|
+
isEvent: boolean;
|
|
13
|
+
isInternal: boolean;
|
|
14
|
+
aiTracing: AITracing;
|
|
15
|
+
input?: any;
|
|
16
|
+
output?: any;
|
|
17
|
+
errorInfo?: {
|
|
18
|
+
message: string;
|
|
19
|
+
id?: string;
|
|
20
|
+
domain?: string;
|
|
21
|
+
category?: string;
|
|
22
|
+
details?: Record<string, any>;
|
|
23
|
+
};
|
|
24
|
+
metadata?: Record<string, any>;
|
|
25
|
+
traceState?: TraceState;
|
|
26
|
+
/** Parent span ID (for root spans that are children of external spans) */
|
|
27
|
+
protected parentSpanId?: string;
|
|
28
|
+
constructor(options: CreateSpanOptions<TType>, aiTracing: AITracing);
|
|
29
|
+
/** End the span */
|
|
30
|
+
abstract end(options?: EndSpanOptions<TType>): void;
|
|
31
|
+
/** Record an error for the span, optionally end the span as well */
|
|
32
|
+
abstract error(options: ErrorSpanOptions<TType>): void;
|
|
33
|
+
/** Update span attributes */
|
|
34
|
+
abstract update(options: UpdateSpanOptions<TType>): void;
|
|
35
|
+
createChildSpan(options: ChildSpanOptions<AISpanType.MODEL_GENERATION>): AIModelGenerationSpan;
|
|
36
|
+
createEventSpan<TChildType extends AISpanType>(options: ChildEventOptions<TChildType>): AISpan<TChildType>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a ModelSpanTracker for this span (only works if this is a MODEL_GENERATION span)
|
|
39
|
+
* Returns undefined for non-MODEL_GENERATION spans
|
|
40
|
+
*/
|
|
41
|
+
createTracker(): IModelSpanTracker | undefined;
|
|
42
|
+
/** Returns `TRUE` if the span is the root span of a trace */
|
|
43
|
+
get isRootSpan(): boolean;
|
|
44
|
+
/** Returns `TRUE` if the span is a valid span (not a NO-OP Span) */
|
|
45
|
+
abstract get isValid(): boolean;
|
|
46
|
+
/** Get the closest parent spanId that isn't an internal span */
|
|
47
|
+
getParentSpanId(includeInternalSpans?: boolean): string | undefined;
|
|
48
|
+
/** Find the closest parent span of a specific type by walking up the parent chain */
|
|
49
|
+
findParent<T extends AISpanType>(spanType: T): AISpan<T> | undefined;
|
|
50
|
+
/** Returns a lightweight span ready for export */
|
|
51
|
+
exportSpan(includeInternalSpans?: boolean): ExportedAISpan<TType>;
|
|
52
|
+
get externalTraceId(): string | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface DeepCleanOptions {
|
|
55
|
+
keysToStrip?: Set<string>;
|
|
56
|
+
maxDepth?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Recursively cleans a value by removing circular references and stripping problematic or sensitive keys.
|
|
60
|
+
* Circular references are replaced with "[Circular]". Unserializable values are replaced with error messages.
|
|
61
|
+
* Keys like "logger" and "tracingContext" are stripped by default.
|
|
62
|
+
* A maximum recursion depth is enforced to avoid stack overflow or excessive memory usage.
|
|
63
|
+
*
|
|
64
|
+
* @param value - The value to clean (object, array, primitive, etc.)
|
|
65
|
+
* @param options - Optional configuration:
|
|
66
|
+
* - keysToStrip: Set of keys to remove from objects (default: logger, tracingContext)
|
|
67
|
+
* - maxDepth: Maximum recursion depth before values are replaced with "[MaxDepth]" (default: 10)
|
|
68
|
+
* @returns A cleaned version of the input with circular references, specified keys, and overly deep values handled
|
|
69
|
+
*/
|
|
70
|
+
export declare function deepClean(value: any, options?: DeepCleanOptions, _seen?: WeakSet<any>, _depth?: number): any;
|
|
71
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/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,EACd,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAiB,MAAM,4BAA4B,CAAC;AA6CvE,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,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,UAAU,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,SAAS,CAAC,EAAE;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,EAAE,CAAC,EAAE,MAAM,CAAC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CAAC,CAAC,GAAG,SAAS;IAa3E,kDAAkD;IAC3C,UAAU,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC;IAmBxE,IAAI,eAAe,IAAI,MAAM,GAAG,SAAS,CAExC;CACF;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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AISpanType, AITracing, EndSpanOptions, ErrorSpanOptions, UpdateSpanOptions, CreateSpanOptions } from '@mastra/core/observability';
|
|
2
|
+
import { BaseAISpan } from './base.js';
|
|
3
|
+
export declare class DefaultAISpan<TType extends AISpanType> extends BaseAISpan<TType> {
|
|
4
|
+
id: string;
|
|
5
|
+
traceId: string;
|
|
6
|
+
constructor(options: CreateSpanOptions<TType>, aiTracing: AITracing);
|
|
7
|
+
end(options?: EndSpanOptions<TType>): void;
|
|
8
|
+
error(options: ErrorSpanOptions<TType>): void;
|
|
9
|
+
update(options: UpdateSpanOptions<TType>): void;
|
|
10
|
+
get isValid(): boolean;
|
|
11
|
+
export(): Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/spans/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAa,MAAM,QAAQ,CAAC;AAE/C,qBAAa,aAAa,CAAC,KAAK,SAAS,UAAU,CAAE,SAAQ,UAAU,CAAC,KAAK,CAAC;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS;IAmCnE,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI;IAiB1C,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI;IAoC7C,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG,IAAI;IAoB/C,IAAI,OAAO,IAAI,OAAO,CAErB;IAEK,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;CAUhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spans/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NoOpSpan Implementation for Mastra Observability
|
|
3
|
+
*/
|
|
4
|
+
import type { AITracing, AISpanType, CreateSpanOptions, EndSpanOptions, UpdateSpanOptions, ErrorSpanOptions } from '@mastra/core/observability';
|
|
5
|
+
import { BaseAISpan } from './base.js';
|
|
6
|
+
export declare class NoOpAISpan<TType extends AISpanType = any> extends BaseAISpan<TType> {
|
|
7
|
+
id: string;
|
|
8
|
+
traceId: string;
|
|
9
|
+
constructor(options: CreateSpanOptions<TType>, aiTracing: AITracing);
|
|
10
|
+
end(_options?: EndSpanOptions<TType>): void;
|
|
11
|
+
error(_options: ErrorSpanOptions<TType>): void;
|
|
12
|
+
update(_options: UpdateSpanOptions<TType>): void;
|
|
13
|
+
get isValid(): boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=no-op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-op.d.ts","sourceRoot":"","sources":["../../src/spans/no-op.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,qBAAa,UAAU,CAAC,KAAK,SAAS,UAAU,GAAG,GAAG,CAAE,SAAQ,UAAU,CAAC,KAAK,CAAC;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS;IAMnE,GAAG,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI;IAE3C,KAAK,CAAC,QAAQ,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI;IAE9C,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG,IAAI;IAEhD,IAAI,OAAO,IAAI,OAAO,CAErB;CACF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MastraAITracing - Abstract base class for AI Tracing implementations
|
|
3
|
+
*/
|
|
4
|
+
import { MastraBase } from '@mastra/core/base';
|
|
5
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
6
|
+
import type { IMastraLogger } from '@mastra/core/logger';
|
|
7
|
+
import type { TracingConfig, AISpan, AISpanType, AITracingExporter, AISpanProcessor, AITracingEvent, AnyAISpan, StartSpanOptions, CreateSpanOptions, AITracing, CustomSamplerOptions, AnyExportedAISpan, TraceState, TracingOptions } from '@mastra/core/observability';
|
|
8
|
+
/**
|
|
9
|
+
* Abstract base class for all AI Tracing implementations in Mastra.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class BaseAITracing extends MastraBase implements AITracing {
|
|
12
|
+
protected config: Required<TracingConfig>;
|
|
13
|
+
constructor(config: TracingConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Override setLogger to add AI tracing specific initialization log
|
|
16
|
+
* and propagate logger to exporters
|
|
17
|
+
*/
|
|
18
|
+
__setLogger(logger: IMastraLogger): void;
|
|
19
|
+
protected get exporters(): AITracingExporter[];
|
|
20
|
+
protected get processors(): AISpanProcessor[];
|
|
21
|
+
/**
|
|
22
|
+
* Start a new span of a specific AISpanType
|
|
23
|
+
*/
|
|
24
|
+
startSpan<TType extends AISpanType>(options: StartSpanOptions<TType>): AISpan<TType>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a new span (called after sampling)
|
|
27
|
+
*
|
|
28
|
+
* Implementations should:
|
|
29
|
+
* 1. Create a plain span with the provided attributes
|
|
30
|
+
* 2. Return the span - base class handles all tracing lifecycle automatically
|
|
31
|
+
*
|
|
32
|
+
* The base class will automatically:
|
|
33
|
+
* - Set trace relationships
|
|
34
|
+
* - Wire span lifecycle callbacks
|
|
35
|
+
* - Emit span_started event
|
|
36
|
+
*/
|
|
37
|
+
protected abstract createSpan<TType extends AISpanType>(options: CreateSpanOptions<TType>): AISpan<TType>;
|
|
38
|
+
/**
|
|
39
|
+
* Get current configuration
|
|
40
|
+
*/
|
|
41
|
+
getConfig(): Readonly<Required<TracingConfig>>;
|
|
42
|
+
/**
|
|
43
|
+
* Get all exporters
|
|
44
|
+
*/
|
|
45
|
+
getExporters(): readonly AITracingExporter[];
|
|
46
|
+
/**
|
|
47
|
+
* Get all processors
|
|
48
|
+
*/
|
|
49
|
+
getProcessors(): readonly AISpanProcessor[];
|
|
50
|
+
/**
|
|
51
|
+
* Get the logger instance (for exporters and other components)
|
|
52
|
+
*/
|
|
53
|
+
getLogger(): IMastraLogger;
|
|
54
|
+
/**
|
|
55
|
+
* Automatically wires up AI tracing lifecycle events for any span
|
|
56
|
+
* This ensures all spans emit events regardless of implementation
|
|
57
|
+
*/
|
|
58
|
+
private wireSpanLifecycle;
|
|
59
|
+
/**
|
|
60
|
+
* Check if an AI trace should be sampled
|
|
61
|
+
*/
|
|
62
|
+
protected shouldSample(options?: CustomSamplerOptions): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Compute TraceState for a new trace based on configured and per-request keys
|
|
65
|
+
*/
|
|
66
|
+
protected computeTraceState(tracingOptions?: TracingOptions): TraceState | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Extract metadata from RequestContext using TraceState
|
|
69
|
+
*/
|
|
70
|
+
protected extractMetadataFromRequestContext(requestContext: RequestContext | undefined, explicitMetadata: Record<string, any> | undefined, traceState: TraceState | undefined): Record<string, any> | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Extract specific keys from RequestContext
|
|
73
|
+
*/
|
|
74
|
+
protected extractKeys(requestContext: RequestContext, keys: string[]): Record<string, any>;
|
|
75
|
+
/**
|
|
76
|
+
* Process a span through all processors
|
|
77
|
+
*/
|
|
78
|
+
private processSpan;
|
|
79
|
+
getSpanForExport(span: AnyAISpan): AnyExportedAISpan | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Emit a span started event
|
|
82
|
+
*/
|
|
83
|
+
protected emitSpanStarted(span: AnyAISpan): void;
|
|
84
|
+
/**
|
|
85
|
+
* Emit a span ended event (called automatically when spans end)
|
|
86
|
+
*/
|
|
87
|
+
protected emitSpanEnded(span: AnyAISpan): void;
|
|
88
|
+
/**
|
|
89
|
+
* Emit a span updated event
|
|
90
|
+
*/
|
|
91
|
+
protected emitSpanUpdated(span: AnyAISpan): void;
|
|
92
|
+
/**
|
|
93
|
+
* Export tracing event through all exporters (realtime mode)
|
|
94
|
+
*/
|
|
95
|
+
protected exportEvent(event: AITracingEvent): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Initialize AI tracing (called by Mastra during component registration)
|
|
98
|
+
*/
|
|
99
|
+
init(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Shutdown AI tracing and clean up resources
|
|
102
|
+
*/
|
|
103
|
+
shutdown(): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/tracers/base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,SAAS,EAGT,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACf,MAAM,4BAA4B,CAAC;AASpC;;GAEG;AACH,8BAAsB,aAAc,SAAQ,UAAW,YAAW,SAAS;IACzE,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;gBAE9B,MAAM,EAAE,aAAa;IAejC;;;OAGG;IACH,WAAW,CAAC,MAAM,EAAE,aAAa;IAoBjC,SAAS,KAAK,SAAS,IAAI,iBAAiB,EAAE,CAE7C;IAED,SAAS,KAAK,UAAU,IAAI,eAAe,EAAE,CAE5C;IAMD;;OAEG;IACH,SAAS,CAAC,KAAK,SAAS,UAAU,EAAE,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;IA4CpF;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,SAAS,UAAU,EAAE,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG,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EG;IACH,IAAI,IAAI,IAAI;IASZ;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAUhC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AISpanType, AISpan, TracingConfig, CreateSpanOptions } from '@mastra/core/observability';
|
|
2
|
+
import { BaseAITracing } from './base.js';
|
|
3
|
+
export declare class DefaultAITracing extends BaseAITracing {
|
|
4
|
+
constructor(config: TracingConfig);
|
|
5
|
+
protected createSpan<TType extends AISpanType>(options: CreateSpanOptions<TType>): AISpan<TType>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/tracers/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEvG,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,qBAAa,gBAAiB,SAAQ,aAAa;gBACrC,MAAM,EAAE,aAAa;IAIjC,SAAS,CAAC,UAAU,CAAC,KAAK,SAAS,UAAU,EAAE,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;CAIjG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tracers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/observability",
|
|
3
|
-
"version": "0.0.0-fix-
|
|
3
|
+
"version": "0.0.0-fix-9244-clickhouse-metadata-20251104213434",
|
|
4
4
|
"description": "Core observability package for Mastra - includes AI tracing and scoring features",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,20 +23,22 @@
|
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
|
-
"dependencies": {},
|
|
27
26
|
"devDependencies": {
|
|
27
|
+
"ai": "^4.3.19",
|
|
28
|
+
"ai-v5": "npm:ai@5.0.76",
|
|
28
29
|
"@microsoft/api-extractor": "^7.52.8",
|
|
29
30
|
"@types/node": "^20.19.0",
|
|
30
31
|
"eslint": "^9.37.0",
|
|
31
32
|
"tsup": "^8.5.0",
|
|
32
33
|
"typescript": "^5.8.3",
|
|
33
34
|
"vitest": "^3.2.4",
|
|
34
|
-
"
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
35
|
+
"zod": "^3.25.76",
|
|
36
|
+
"@internal/lint": "0.0.0-fix-9244-clickhouse-metadata-20251104213434",
|
|
37
|
+
"@mastra/core": "0.0.0-fix-9244-clickhouse-metadata-20251104213434",
|
|
38
|
+
"@internal/types-builder": "0.0.0-fix-9244-clickhouse-metadata-20251104213434"
|
|
37
39
|
},
|
|
38
40
|
"peerDependencies": {
|
|
39
|
-
"@mastra/core": "0.0.0-fix-
|
|
41
|
+
"@mastra/core": "0.0.0-fix-9244-clickhouse-metadata-20251104213434"
|
|
40
42
|
},
|
|
41
43
|
"homepage": "https://mastra.ai",
|
|
42
44
|
"repository": {
|