@visibe.ai/node 0.1.15 → 0.1.16
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/esm/client.js +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/integrations/anthropic.js +3 -3
- package/dist/esm/integrations/bedrock.js +3 -3
- package/dist/esm/integrations/langchain.js +1 -1
- package/dist/esm/integrations/langgraph.js +1 -1
- package/dist/esm/integrations/openai.js +3 -3
- package/dist/esm/integrations/vercel-ai.js +2 -2
- package/package.json +2 -2
package/dist/esm/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { APIClient, SpanBatcher } from './api';
|
|
3
|
-
import { activeGroupTraceStorage } from './integrations/group-context';
|
|
4
|
-
import { calculateCost, detectProvider, truncate, LLM_CONTENT_LIMIT } from './utils';
|
|
2
|
+
import { APIClient, SpanBatcher } from './api.js';
|
|
3
|
+
import { activeGroupTraceStorage } from './integrations/group-context.js';
|
|
4
|
+
import { calculateCost, detectProvider, truncate, LLM_CONTENT_LIMIT } from './utils.js';
|
|
5
5
|
export class Visibe {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
// Map of instrumented clients to their cleanup functions.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Visibe } from './client';
|
|
1
|
+
import { Visibe } from './client.js';
|
|
2
2
|
// ---------------------------------------------------------------------------
|
|
3
3
|
// Global state
|
|
4
4
|
// ---------------------------------------------------------------------------
|
|
@@ -225,4 +225,4 @@ export async function shutdown() {
|
|
|
225
225
|
// ---------------------------------------------------------------------------
|
|
226
226
|
// Re-export public surface
|
|
227
227
|
// ---------------------------------------------------------------------------
|
|
228
|
-
export { Visibe } from './client';
|
|
228
|
+
export { Visibe } from './client.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { BaseIntegration } from './base';
|
|
3
|
-
import { activeGroupTraceStorage } from './group-context';
|
|
4
|
-
import { calculateCost } from '../utils';
|
|
2
|
+
import { BaseIntegration } from './base.js';
|
|
3
|
+
import { activeGroupTraceStorage } from './group-context.js';
|
|
4
|
+
import { calculateCost } from '../utils.js';
|
|
5
5
|
export class AnthropicIntegration extends BaseIntegration {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { BaseIntegration } from './base';
|
|
3
|
-
import { activeGroupTraceStorage } from './group-context';
|
|
4
|
-
import { calculateCost, detectProvider } from '../utils';
|
|
2
|
+
import { BaseIntegration } from './base.js';
|
|
3
|
+
import { activeGroupTraceStorage } from './group-context.js';
|
|
4
|
+
import { calculateCost, detectProvider } from '../utils.js';
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
6
|
function parseInvokeAnthropic(req, res) {
|
|
7
7
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { calculateCost } from '../utils';
|
|
3
|
+
import { calculateCost } from '../utils.js';
|
|
4
4
|
// Re-export the storage so openai.ts and langgraph.ts can share the same instance.
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
6
|
export const activeLangChainStorage = new AsyncLocalStorage();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { LangChainCallback, activeLangChainStorage } from './langchain';
|
|
2
|
+
import { LangChainCallback, activeLangChainStorage } from './langchain.js';
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
// LangGraphCallback
|
|
5
5
|
// Extends LangChainCallback and adds node-level agent_start spans.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { BaseIntegration } from './base';
|
|
4
|
-
import { activeGroupTraceStorage } from './group-context';
|
|
5
|
-
import { calculateCost } from '../utils';
|
|
3
|
+
import { BaseIntegration } from './base.js';
|
|
4
|
+
import { activeGroupTraceStorage } from './group-context.js';
|
|
5
|
+
import { calculateCost } from '../utils.js';
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
7
7
|
// AsyncLocalStorage — used to prevent double-tracing when LangChain/LangGraph
|
|
8
8
|
// is the outer trace owner. The OpenAI wrapper checks this store at the start
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { activeGroupTraceStorage } from './group-context';
|
|
3
|
-
import { calculateCost } from '../utils';
|
|
2
|
+
import { activeGroupTraceStorage } from './group-context.js';
|
|
3
|
+
import { calculateCost } from '../utils.js';
|
|
4
4
|
// ---------------------------------------------------------------------------
|
|
5
5
|
// Provider detection — Vercel AI SDK exposes model.provider as e.g.
|
|
6
6
|
// "openai.chat", "anthropic.messages". Strip the suffix to get a clean name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visibe.ai/node",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "AI Agent Observability — Track OpenAI, LangChain, LangGraph, Bedrock, Vercel AI, Anthropic",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "tsc -p tsconfig.json && tsc -p tsconfig.esm.json",
|
|
22
|
+
"build": "tsc -p tsconfig.json && tsc -p tsconfig.esm.json && node scripts/fix-esm-imports.cjs",
|
|
23
23
|
"test": "jest tests/unit",
|
|
24
24
|
"prepare": "npm run build",
|
|
25
25
|
"test:all": "jest"
|