@paid-ai/paid-node 1.0.1-alpha8 → 1.0.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.
@@ -1,11 +1,15 @@
1
1
  import type { Tracer } from "@opentelemetry/api";
2
+ import type { SpanProcessor } from "@opentelemetry/sdk-trace-base";
2
3
  import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
3
- import winston from "winston";
4
- export declare const logger: winston.Logger;
4
+ export interface InitializeTracingOptions {
5
+ collectorEndpoint?: string;
6
+ registerGlobal?: boolean;
7
+ }
5
8
  export declare function getToken(): string | undefined;
6
9
  export declare function getPaidTracerProvider(): NodeTracerProvider | undefined;
7
10
  export declare function getPaidTracer(): Tracer | undefined;
8
- export declare function initializeTracing(apiKey?: string, collectorEndpoint?: string): void;
11
+ export declare function createPaidSpanProcessors(apiKey: string, collectorEndpoint?: string): SpanProcessor[];
12
+ export declare function initializeTracing(apiKey?: string, options?: InitializeTracingOptions): void;
9
13
  export declare function trace<F extends (...args: any[]) => any>(options: {
10
14
  externalCustomerId: string;
11
15
  externalProductId?: string;
@@ -7,23 +7,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { SpanStatusCode } from "@opentelemetry/api";
10
+ import { SpanStatusCode, context } from "@opentelemetry/api";
11
+ import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";
11
12
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
12
- import { NodeSDK } from "@opentelemetry/sdk-node";
13
13
  import { NodeTracerProvider, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";
14
- import winston from "winston";
15
14
  import { runWithTracingContext } from "./tracingContext.mjs";
16
15
  import { PaidSpanProcessor } from "./spanProcessor.mjs";
17
16
  import { AISDKSpanProcessor } from "./aiSdkSpanProcessor.mjs";
18
- export const logger = winston.createLogger({
19
- level: "silent", // Default to 'silent' to avoid logging unless set via environment variable
20
- format: winston.format.simple(),
21
- transports: [new winston.transports.Console()],
22
- });
23
- const logLevel = process.env.PAID_LOG_LEVEL;
24
- if (logLevel) {
25
- logger.level = logLevel;
26
- }
27
17
  const DEFAULT_COLLECTOR_ENDPOINT = process.env["PAID_OTEL_COLLECTOR_ENDPOINT"] || "https://collector.agentpaid.io:4318/v1/traces";
28
18
  let paidApiToken = undefined;
29
19
  export function getToken() {
@@ -47,26 +37,31 @@ const setupGracefulShutdown = (shuttable) => {
47
37
  _isShuttingDown = true;
48
38
  shuttable
49
39
  .shutdown()
50
- .then(() => logger.info(`Paid tracing SDK shut down from signal: ${signal}`))
51
- .catch((error) => logger.error(`Error shutting down Paid tracing SDK ${error}`));
40
+ .then(() => console.info(`Paid tracing SDK shut down from signal: ${signal}`))
41
+ .catch((error) => console.error(`Error shutting down Paid tracing SDK ${error}`));
52
42
  });
53
43
  });
54
44
  };
55
- export function initializeTracing(apiKey, collectorEndpoint) {
45
+ export function createPaidSpanProcessors(apiKey, collectorEndpoint) {
46
+ const url = collectorEndpoint || DEFAULT_COLLECTOR_ENDPOINT;
47
+ const exporter = new OTLPTraceExporter({ url, headers: { Authorization: `Bearer ${apiKey}` } });
48
+ return [new PaidSpanProcessor(), new AISDKSpanProcessor(), new SimpleSpanProcessor(exporter)];
49
+ }
50
+ export function initializeTracing(apiKey, options) {
56
51
  const paidEnabled = (process.env.PAID_ENABLED || "true") !== "false";
57
52
  if (!paidEnabled) {
58
- logger.info("Paid tracing is disabled via PAID_ENABLED environment variable");
53
+ console.info("Paid tracing is disabled via PAID_ENABLED environment variable");
59
54
  return;
60
55
  }
61
56
  const token = getToken();
62
57
  if (!!token) {
63
- logger.info("Tracing is already initialized - skipping re-intialization");
58
+ console.info("Tracing is already initialized - skipping re-intialization");
64
59
  return;
65
60
  }
66
61
  if (!apiKey) {
67
62
  const envKey = process.env.PAID_API_KEY;
68
63
  if (!envKey) {
69
- logger.error("API key must be provided via PAID_API_KEY environment variable");
64
+ console.error("API key must be provided via PAID_API_KEY environment variable");
70
65
  return;
71
66
  }
72
67
  paidApiToken = envKey;
@@ -74,6 +69,7 @@ export function initializeTracing(apiKey, collectorEndpoint) {
74
69
  else {
75
70
  paidApiToken = apiKey;
76
71
  }
72
+ const { collectorEndpoint, registerGlobal = false } = options || {};
77
73
  const url = collectorEndpoint || DEFAULT_COLLECTOR_ENDPOINT;
78
74
  const exporter = new OTLPTraceExporter({ url, headers: { Authorization: `Bearer ${paidApiToken}` } });
79
75
  const spanProcessor = new SimpleSpanProcessor(exporter);
@@ -82,11 +78,25 @@ export function initializeTracing(apiKey, collectorEndpoint) {
82
78
  paidTracerProvider = new NodeTracerProvider({
83
79
  spanProcessors: [new PaidSpanProcessor(), new AISDKSpanProcessor(), spanProcessor],
84
80
  });
85
- // Don't call .register() - we pass the tracerProvider explicitly to instrumentations
86
- // This avoids polluting the global trace provider
81
+ if (registerGlobal) {
82
+ // Register the provider globally so that any tracer (including the AI SDK's
83
+ // `trace.getTracer("ai")`) routes spans through our span processors.
84
+ // This also sets up an AsyncLocalStorageContextManager for context propagation.
85
+ paidTracerProvider.register();
86
+ }
87
+ else {
88
+ // Set up context propagation without registering the provider globally.
89
+ // This gives us async parent-child linking via AsyncLocalStorage
90
+ // without polluting the global trace provider.
91
+ const contextManager = new AsyncLocalStorageContextManager();
92
+ contextManager.enable();
93
+ if (!context.setGlobalContextManager(contextManager)) {
94
+ contextManager.disable();
95
+ }
96
+ }
87
97
  paidTracer = paidTracerProvider.getTracer("paid.node");
88
98
  setupGracefulShutdown(spanProcessor);
89
- logger.info(`Paid tracing SDK initialized with collector endpoint: ${url}`);
99
+ console.info(`Paid tracing SDK initialized with collector endpoint: ${url}`);
90
100
  }
91
101
  export function trace(options, fn, ...args) {
92
102
  return __awaiter(this, void 0, void 0, function* () {
@@ -94,32 +104,34 @@ export function trace(options, fn, ...args) {
94
104
  const tracer = getPaidTracer();
95
105
  if (!token || !tracer) {
96
106
  // don't throw, tracing should not crash user app.
97
- logger.error("Paid tracing is not initialized. Make sure to call initializeTracing() first.");
107
+ console.error("Paid tracing is not initialized. Make sure to call initializeTracing() first.");
98
108
  return yield fn(...args);
99
109
  }
100
110
  const { externalCustomerId, externalProductId: externalAgentId, storePrompt, metadata } = options;
101
- return yield tracer.startActiveSpan("parent_span", (span) => __awaiter(this, void 0, void 0, function* () {
102
- try {
103
- const res = yield runWithTracingContext({
104
- externalCustomerId,
105
- externalProductId: externalAgentId,
106
- storePrompt,
107
- metadata,
108
- }, () => __awaiter(this, void 0, void 0, function* () { return yield fn(...args); }));
109
- span.setStatus({ code: SpanStatusCode.OK });
110
- return res;
111
- }
112
- catch (error) {
113
- span.setStatus({
114
- code: SpanStatusCode.ERROR,
115
- message: error.message,
116
- });
117
- span.recordException(error);
118
- throw error;
119
- }
120
- finally {
121
- span.end();
122
- }
111
+ return yield runWithTracingContext({
112
+ externalCustomerId,
113
+ externalProductId: externalAgentId,
114
+ storePrompt,
115
+ metadata,
116
+ }, () => __awaiter(this, void 0, void 0, function* () {
117
+ return yield tracer.startActiveSpan("parent_span", (span) => __awaiter(this, void 0, void 0, function* () {
118
+ try {
119
+ const res = yield fn(...args);
120
+ span.setStatus({ code: SpanStatusCode.OK });
121
+ return res;
122
+ }
123
+ catch (error) {
124
+ span.setStatus({
125
+ code: SpanStatusCode.ERROR,
126
+ message: error.message,
127
+ });
128
+ span.recordException(error);
129
+ throw error;
130
+ }
131
+ finally {
132
+ span.end();
133
+ }
134
+ }));
123
135
  }));
124
136
  });
125
137
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.1-alpha8";
1
+ export declare const SDK_VERSION = "1.0.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.1-alpha8";
1
+ export const SDK_VERSION = "1.0.1";
package/package.json CHANGED
@@ -1,211 +1,226 @@
1
1
  {
2
- "name": "@paid-ai/paid-node",
3
- "version": "1.0.1-alpha8",
4
- "private": false,
5
- "repository": "github:paid-ai/paid-node",
6
- "type": "commonjs",
7
- "main": "./dist/cjs/index.js",
8
- "module": "./dist/esm/index.mjs",
9
- "types": "./dist/cjs/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/cjs/index.d.ts",
13
- "import": {
14
- "types": "./dist/esm/index.d.mts",
15
- "default": "./dist/esm/index.mjs"
16
- },
17
- "require": {
18
- "types": "./dist/cjs/index.d.ts",
19
- "default": "./dist/cjs/index.js"
20
- },
21
- "default": "./dist/cjs/index.js"
22
- },
23
- "./package.json": "./package.json",
24
- "./openai": {
25
- "types": "./dist/cjs/openai-wrapper/index.d.ts",
26
- "import": {
27
- "types": "./dist/esm/openai-wrapper/index.d.mts",
28
- "default": "./dist/esm/openai-wrapper/index.mjs"
29
- },
30
- "require": {
31
- "types": "./dist/cjs/openai-wrapper/index.d.ts",
32
- "default": "./dist/cjs/openai-wrapper/index.js"
33
- },
34
- "default": "./dist/cjs/openai-wrapper/index.js"
35
- },
36
- "./anthropic": {
37
- "types": "./dist/cjs/anthropic-wrapper/index.d.ts",
38
- "import": {
39
- "types": "./dist/esm/anthropic-wrapper/index.d.mts",
40
- "default": "./dist/esm/anthropic-wrapper/index.mjs"
41
- },
42
- "require": {
43
- "types": "./dist/cjs/anthropic-wrapper/index.d.ts",
44
- "default": "./dist/cjs/anthropic-wrapper/index.js"
45
- },
46
- "default": "./dist/cjs/anthropic-wrapper/index.js"
47
- },
48
- "./mistral": {
49
- "types": "./dist/cjs/mistral-wrapper/index.d.ts",
50
- "import": {
51
- "types": "./dist/esm/mistral-wrapper/index.d.mts",
52
- "default": "./dist/esm/mistral-wrapper/index.mjs"
53
- },
54
- "require": {
55
- "types": "./dist/cjs/mistral-wrapper/index.d.ts",
56
- "default": "./dist/cjs/mistral-wrapper/index.js"
57
- },
58
- "default": "./dist/cjs/mistral-wrapper/index.js"
59
- },
60
- "./langchain": {
61
- "types": "./dist/cjs/langchain-wrapper/index.d.ts",
62
- "import": {
63
- "types": "./dist/esm/langchain-wrapper/index.d.mts",
64
- "default": "./dist/esm/langchain-wrapper/index.mjs"
65
- },
66
- "require": {
67
- "types": "./dist/cjs/langchain-wrapper/index.d.ts",
68
- "default": "./dist/cjs/langchain-wrapper/index.js"
69
- },
70
- "default": "./dist/cjs/langchain-wrapper/index.js"
71
- },
72
- "./vercel": {
73
- "types": "./dist/cjs/vercel-wrapper/index.d.ts",
74
- "import": {
75
- "types": "./dist/esm/vercel-wrapper/index.d.mts",
76
- "default": "./dist/esm/vercel-wrapper/index.mjs"
77
- },
78
- "require": {
79
- "types": "./dist/cjs/vercel-wrapper/index.d.ts",
80
- "default": "./dist/cjs/vercel-wrapper/index.js"
81
- },
82
- "default": "./dist/cjs/vercel-wrapper/index.js"
83
- },
84
- "./tracing": {
85
- "types": "./dist/cjs/tracing/index.d.ts",
86
- "import": {
87
- "types": "./dist/esm/tracing/index.d.mts",
88
- "default": "./dist/esm/tracing/index.mjs"
89
- },
90
- "require": {
91
- "types": "./dist/cjs/tracing/index.d.ts",
92
- "default": "./dist/cjs/tracing/index.js"
93
- },
94
- "default": "./dist/cjs/tracing/index.js"
95
- }
2
+ "name": "@paid-ai/paid-node",
3
+ "version": "1.0.1",
4
+ "private": false,
5
+ "repository": "github:paid-ai/paid-node",
6
+ "type": "commonjs",
7
+ "main": "./dist/cjs/index.js",
8
+ "module": "./dist/esm/index.mjs",
9
+ "types": "./dist/cjs/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/cjs/index.d.ts",
13
+ "import": {
14
+ "types": "./dist/esm/index.d.mts",
15
+ "default": "./dist/esm/index.mjs"
16
+ },
17
+ "require": {
18
+ "types": "./dist/cjs/index.d.ts",
19
+ "default": "./dist/cjs/index.js"
20
+ },
21
+ "default": "./dist/cjs/index.js"
96
22
  },
97
- "files": [
98
- "dist",
99
- "reference.md",
100
- "README.md",
101
- "LICENSE"
102
- ],
103
- "scripts": {
104
- "format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
105
- "format:check": "biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
106
- "lint": "biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
107
- "lint:fix": "biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
108
- "check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
109
- "check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
110
- "build": "pnpm build:cjs && pnpm build:esm",
111
- "build:cjs": "tsc --project ./tsconfig.cjs.json",
112
- "build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
113
- "test": "vitest",
114
- "test:unit": "vitest --project unit",
115
- "test:wire": "vitest --project wire"
23
+ "./package.json": "./package.json",
24
+ "./openai": {
25
+ "types": "./dist/cjs/openai-wrapper/index.d.ts",
26
+ "import": {
27
+ "types": "./dist/esm/openai-wrapper/index.d.mts",
28
+ "default": "./dist/esm/openai-wrapper/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/cjs/openai-wrapper/index.d.ts",
32
+ "default": "./dist/cjs/openai-wrapper/index.js"
33
+ },
34
+ "default": "./dist/cjs/openai-wrapper/index.js"
116
35
  },
117
- "dependencies": {
118
- "@opentelemetry/api": ">=1.9.0",
119
- "@opentelemetry/exporter-trace-otlp-http": ">=0.208.0",
120
- "@opentelemetry/exporter-trace-otlp-proto": ">=0.208.0",
121
- "@opentelemetry/instrumentation": ">=0.208.0",
122
- "@opentelemetry/resources": ">=1.38.0",
123
- "@opentelemetry/sdk-node": ">=0.208.0",
124
- "@opentelemetry/sdk-trace-base": ">=1.38.0",
125
- "@opentelemetry/sdk-trace-node": "^2.2.0",
126
- "@opentelemetry/semantic-conventions": ">=1.38.0",
127
- "@arizeai/openinference-instrumentation-anthropic": ">=0.1.2",
128
- "@arizeai/openinference-instrumentation-openai": ">=4.0.0",
129
- "@arizeai/openinference-semantic-conventions": ">=2.1.2",
130
- "@traceloop/instrumentation-bedrock": ">=0.22.0",
131
- "winston": ">=3.0.0"
36
+ "./anthropic": {
37
+ "types": "./dist/cjs/anthropic-wrapper/index.d.ts",
38
+ "import": {
39
+ "types": "./dist/esm/anthropic-wrapper/index.d.mts",
40
+ "default": "./dist/esm/anthropic-wrapper/index.mjs"
41
+ },
42
+ "require": {
43
+ "types": "./dist/cjs/anthropic-wrapper/index.d.ts",
44
+ "default": "./dist/cjs/anthropic-wrapper/index.js"
45
+ },
46
+ "default": "./dist/cjs/anthropic-wrapper/index.js"
132
47
  },
133
- "peerDependencies": {
134
- "@ai-sdk/openai": ">=1.0.0",
135
- "@anthropic-ai/sdk": ">=0.36.3",
136
- "@langchain/core": ">=0.3.0",
137
- "@mistralai/mistralai": ">=1.0.0",
138
- "ai": ">=5.0.0",
139
- "openai": ">=4.85.4"
48
+ "./mistral": {
49
+ "types": "./dist/cjs/mistral-wrapper/index.d.ts",
50
+ "import": {
51
+ "types": "./dist/esm/mistral-wrapper/index.d.mts",
52
+ "default": "./dist/esm/mistral-wrapper/index.mjs"
53
+ },
54
+ "require": {
55
+ "types": "./dist/cjs/mistral-wrapper/index.d.ts",
56
+ "default": "./dist/cjs/mistral-wrapper/index.js"
57
+ },
58
+ "default": "./dist/cjs/mistral-wrapper/index.js"
140
59
  },
141
- "peerDependenciesMeta": {
142
- "@ai-sdk/openai": {
143
- "optional": true
144
- },
145
- "@anthropic-ai/sdk": {
146
- "optional": true
147
- },
148
- "@langchain/core": {
149
- "optional": true
150
- },
151
- "@mistralai/mistralai": {
152
- "optional": true
153
- },
154
- "ai": {
155
- "optional": true
156
- },
157
- "openai": {
158
- "optional": true
159
- }
60
+ "./langchain": {
61
+ "types": "./dist/cjs/langchain-wrapper/index.d.ts",
62
+ "import": {
63
+ "types": "./dist/esm/langchain-wrapper/index.d.mts",
64
+ "default": "./dist/esm/langchain-wrapper/index.mjs"
65
+ },
66
+ "require": {
67
+ "types": "./dist/cjs/langchain-wrapper/index.d.ts",
68
+ "default": "./dist/cjs/langchain-wrapper/index.js"
69
+ },
70
+ "default": "./dist/cjs/langchain-wrapper/index.js"
160
71
  },
161
- "devDependencies": {
162
- "webpack": "^5.97.1",
163
- "ts-loader": "^9.5.1",
164
- "vitest": "^3.2.4",
165
- "msw": ">=2.0.0",
166
- "@types/node": "^18.19.70",
167
- "typescript": "~5.7.2",
168
- "@biomejs/biome": "2.3.1",
169
- "@ai-sdk/openai": ">=1.0.0",
170
- "@anthropic-ai/sdk": ">=0.36.3",
171
- "@langchain/core": ">=0.3.0",
172
- "@mistralai/mistralai": ">=1.0.0",
173
- "ai": ">=5.0.0",
174
- "openai": ">=4.85.4",
175
- "nock": ">=14.0.0",
176
- "zod": ">=3.0.0"
72
+ "./vercel": {
73
+ "types": "./dist/cjs/vercel-wrapper/index.d.ts",
74
+ "import": {
75
+ "types": "./dist/esm/vercel-wrapper/index.d.mts",
76
+ "default": "./dist/esm/vercel-wrapper/index.mjs"
77
+ },
78
+ "require": {
79
+ "types": "./dist/cjs/vercel-wrapper/index.d.ts",
80
+ "default": "./dist/cjs/vercel-wrapper/index.js"
81
+ },
82
+ "default": "./dist/cjs/vercel-wrapper/index.js"
177
83
  },
178
- "browser": {
179
- "fs": false,
180
- "os": false,
181
- "path": false,
182
- "stream": false
84
+ "./tracing": {
85
+ "types": "./dist/cjs/tracing/index.d.ts",
86
+ "import": {
87
+ "types": "./dist/esm/tracing/index.d.mts",
88
+ "default": "./dist/esm/tracing/index.mjs"
89
+ },
90
+ "require": {
91
+ "types": "./dist/cjs/tracing/index.d.ts",
92
+ "default": "./dist/cjs/tracing/index.js"
93
+ },
94
+ "default": "./dist/cjs/tracing/index.js"
183
95
  },
184
- "packageManager": "pnpm@10.14.0",
185
- "engines": {
186
- "node": ">=18.0.0"
96
+ "./tracing/auto": {
97
+ "types": "./dist/cjs/tracing/autoInstrumentation.d.ts",
98
+ "import": {
99
+ "types": "./dist/esm/tracing/autoInstrumentation.d.mts",
100
+ "default": "./dist/esm/tracing/autoInstrumentation.mjs"
101
+ },
102
+ "require": {
103
+ "types": "./dist/cjs/tracing/autoInstrumentation.d.ts",
104
+ "default": "./dist/cjs/tracing/autoInstrumentation.js"
105
+ },
106
+ "default": "./dist/cjs/tracing/autoInstrumentation.js"
107
+ }
108
+ },
109
+ "files": [
110
+ "dist",
111
+ "reference.md",
112
+ "README.md",
113
+ "LICENSE"
114
+ ],
115
+ "scripts": {
116
+ "format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
117
+ "format:check": "biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
118
+ "lint": "biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
119
+ "lint:fix": "biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
120
+ "check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
121
+ "check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
122
+ "build": "pnpm build:cjs && pnpm build:esm",
123
+ "build:cjs": "tsc --project ./tsconfig.cjs.json",
124
+ "build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
125
+ "test": "vitest",
126
+ "test:unit": "vitest --project unit",
127
+ "test:wire": "vitest --project wire"
128
+ },
129
+ "dependencies": {
130
+ "@opentelemetry/api": ">=1.9.0",
131
+ "@opentelemetry/context-async-hooks": ">=0.208.0",
132
+ "@opentelemetry/exporter-trace-otlp-http": ">=0.208.0",
133
+ "@opentelemetry/exporter-trace-otlp-proto": ">=0.208.0",
134
+ "@opentelemetry/instrumentation": ">=0.208.0",
135
+ "@opentelemetry/resources": ">=1.38.0",
136
+ "@opentelemetry/sdk-node": ">=0.208.0",
137
+ "@opentelemetry/sdk-trace-base": ">=1.38.0",
138
+ "@opentelemetry/sdk-trace-node": "^2.2.0",
139
+ "@opentelemetry/semantic-conventions": ">=1.38.0",
140
+ "@arizeai/openinference-instrumentation-anthropic": ">=0.1.2",
141
+ "@arizeai/openinference-instrumentation-openai": ">=4.0.0",
142
+ "@arizeai/openinference-semantic-conventions": ">=2.1.2",
143
+ "@traceloop/instrumentation-bedrock": ">=0.22.0"
144
+ },
145
+ "peerDependencies": {
146
+ "@ai-sdk/openai": ">=1.0.0",
147
+ "@anthropic-ai/sdk": ">=0.36.3",
148
+ "@langchain/core": ">=0.3.0",
149
+ "@mistralai/mistralai": ">=1.0.0",
150
+ "ai": ">=5.0.0",
151
+ "openai": ">=4.85.4"
152
+ },
153
+ "peerDependenciesMeta": {
154
+ "@ai-sdk/openai": {
155
+ "optional": true
156
+ },
157
+ "@anthropic-ai/sdk": {
158
+ "optional": true
159
+ },
160
+ "@langchain/core": {
161
+ "optional": true
187
162
  },
188
- "sideEffects": false,
189
- "typesVersions": {
190
- "*": {
191
- "openai": [
192
- "./dist/cjs/openai-wrapper/index.d.ts"
193
- ],
194
- "anthropic": [
195
- "./dist/cjs/anthropic-wrapper/index.d.ts"
196
- ],
197
- "mistral": [
198
- "./dist/cjs/mistral-wrapper/index.d.ts"
199
- ],
200
- "langchain": [
201
- "./dist/cjs/langchain-wrapper/index.d.ts"
202
- ],
203
- "vercel": [
204
- "./dist/cjs/vercel-wrapper/index.d.ts"
205
- ],
206
- "tracing": [
207
- "./dist/cjs/tracing/index.d.ts"
208
- ]
209
- }
163
+ "@mistralai/mistralai": {
164
+ "optional": true
165
+ },
166
+ "ai": {
167
+ "optional": true
168
+ },
169
+ "openai": {
170
+ "optional": true
171
+ }
172
+ },
173
+ "devDependencies": {
174
+ "webpack": "^5.97.1",
175
+ "ts-loader": "^9.5.1",
176
+ "vitest": "^3.2.4",
177
+ "msw": ">=2.0.0",
178
+ "@types/node": "^18.19.70",
179
+ "typescript": "~5.7.2",
180
+ "@biomejs/biome": "2.3.1",
181
+ "@ai-sdk/openai": ">=1.0.0",
182
+ "@anthropic-ai/sdk": ">=0.36.3",
183
+ "@langchain/core": ">=0.3.0",
184
+ "@mistralai/mistralai": ">=1.0.0",
185
+ "ai": ">=5.0.0",
186
+ "openai": ">=4.85.4",
187
+ "nock": ">=14.0.0",
188
+ "zod": ">=3.0.0"
189
+ },
190
+ "browser": {
191
+ "fs": false,
192
+ "os": false,
193
+ "path": false,
194
+ "stream": false
195
+ },
196
+ "packageManager": "pnpm@10.14.0",
197
+ "engines": {
198
+ "node": ">=18.0.0"
199
+ },
200
+ "sideEffects": false,
201
+ "typesVersions": {
202
+ "*": {
203
+ "openai": [
204
+ "./dist/cjs/openai-wrapper/index.d.ts"
205
+ ],
206
+ "anthropic": [
207
+ "./dist/cjs/anthropic-wrapper/index.d.ts"
208
+ ],
209
+ "mistral": [
210
+ "./dist/cjs/mistral-wrapper/index.d.ts"
211
+ ],
212
+ "langchain": [
213
+ "./dist/cjs/langchain-wrapper/index.d.ts"
214
+ ],
215
+ "vercel": [
216
+ "./dist/cjs/vercel-wrapper/index.d.ts"
217
+ ],
218
+ "tracing": [
219
+ "./dist/cjs/tracing/index.d.ts"
220
+ ],
221
+ "tracing/auto": [
222
+ "./dist/cjs/tracing/autoInstrumentation.d.ts"
223
+ ]
210
224
  }
225
+ }
211
226
  }