@mastra/braintrust 0.0.0-remove-unused-import-20250909212718 → 0.0.0-remove-ai-peer-dep-from-evals-20260105220639

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/braintrust",
3
- "version": "0.0.0-remove-unused-import-20250909212718",
4
- "description": "Braintrust observability provider for Mastra - includes AI tracing and future observability features",
3
+ "version": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
4
+ "description": "Braintrust observability provider for Mastra - includes tracing and future observability features",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -24,21 +24,23 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "braintrust": "^0.3.6"
27
+ "braintrust": "^1.1.0",
28
+ "@mastra/observability": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
28
29
  },
29
30
  "devDependencies": {
30
- "@microsoft/api-extractor": "^7.52.8",
31
- "@types/node": "^20.19.0",
32
- "eslint": "^9.30.1",
31
+ "@types/node": "22.13.17",
32
+ "@vitest/coverage-v8": "4.0.12",
33
+ "@vitest/ui": "4.0.12",
34
+ "eslint": "^9.37.0",
33
35
  "tsup": "^8.5.0",
34
- "typescript": "^5.8.3",
35
- "vitest": "^3.2.4",
36
- "@internal/lint": "0.0.0-remove-unused-import-20250909212718",
37
- "@internal/types-builder": "0.0.0-remove-unused-import-20250909212718",
38
- "@mastra/core": "0.0.0-remove-unused-import-20250909212718"
36
+ "typescript": "^5.9.3",
37
+ "vitest": "4.0.16",
38
+ "@internal/lint": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
39
+ "@internal/types-builder": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
40
+ "@mastra/core": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
39
41
  },
40
42
  "peerDependencies": {
41
- "@mastra/core": "0.0.0-remove-unused-import-20250909212718"
43
+ "@mastra/core": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
42
44
  },
43
45
  "homepage": "https://mastra.ai",
44
46
  "repository": {
@@ -49,11 +51,17 @@
49
51
  "bugs": {
50
52
  "url": "https://github.com/mastra-ai/mastra/issues"
51
53
  },
54
+ "engines": {
55
+ "node": ">=22.13.0"
56
+ },
52
57
  "scripts": {
53
58
  "build": "tsup --silent --config tsup.config.ts",
54
59
  "build:watch": "pnpm build --watch",
55
60
  "test": "vitest run",
56
61
  "test:watch": "vitest watch",
57
- "lint": "eslint ."
62
+ "lint": "eslint .",
63
+ "example:basic": "tsx examples/basic.ts",
64
+ "example:traced": "tsx examples/with-logger-traced.ts",
65
+ "example:eval": "tsx examples/with-eval.ts"
58
66
  }
59
67
  }
@@ -1,37 +0,0 @@
1
- /**
2
- * Braintrust Exporter for Mastra AI Tracing
3
- *
4
- * This exporter sends tracing data to Braintrust for AI observability.
5
- * Root spans become top-level Braintrust spans (no trace wrapper).
6
- * Events are handled as zero-duration spans with matching start/end times.
7
- */
8
- import type { AITracingExporter, AITracingEvent } from '@mastra/core/ai-tracing';
9
- export interface BraintrustExporterConfig {
10
- /** Braintrust API key */
11
- apiKey?: string;
12
- /** Optional custom endpoint */
13
- endpoint?: string;
14
- /** Braintrust project name (default: 'mastra-tracing') */
15
- projectName?: string;
16
- /** Logger level for diagnostic messages (default: 'warn') */
17
- logLevel?: 'debug' | 'info' | 'warn' | 'error';
18
- /** Support tuning parameters */
19
- tuningParameters?: Record<string, any>;
20
- }
21
- export declare class BraintrustExporter implements AITracingExporter {
22
- name: string;
23
- private traceMap;
24
- private logger;
25
- private config;
26
- constructor(config: BraintrustExporterConfig);
27
- exportEvent(event: AITracingEvent): Promise<void>;
28
- private handleSpanStarted;
29
- private handleSpanUpdateOrEnd;
30
- private handleEventSpan;
31
- private initLogger;
32
- private getSpanData;
33
- private getBraintrustParent;
34
- private buildSpanPayload;
35
- shutdown(): Promise<void>;
36
- }
37
- //# sourceMappingURL=ai-tracing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-tracing.d.ts","sourceRoot":"","sources":["../src/ai-tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAsC,MAAM,yBAAyB,CAAC;AAOrH,MAAM,WAAW,wBAAwB;IACvC,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxC;AAyBD,qBAAa,kBAAmB,YAAW,iBAAiB;IAC1D,IAAI,SAAgB;IACpB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAA2B;gBAE7B,MAAM,EAAE,wBAAwB;IActC,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;YAuBzC,iBAAiB;YA2BjB,qBAAqB;YAsCrB,eAAe;YAoCf,UAAU;IAWxB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,gBAAgB;IAsElB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAchC"}