@bitfab/sdk 0.38.6 → 0.38.8
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/{chunk-P2MYK27A.js → chunk-CKOOG3TW.js} +307 -7
- package/dist/chunk-CKOOG3TW.js.map +1 -0
- package/dist/{chunk-QTTKZMHM.js → chunk-VCGFTX2G.js} +2 -2
- package/dist/{chunk-QTTKZMHM.js.map → chunk-VCGFTX2G.js.map} +1 -1
- package/dist/index.cjs +311 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +101 -5
- package/dist/index.d.ts +101 -5
- package/dist/index.js +4 -2
- package/dist/node.cjs +311 -8
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +4 -2
- package/dist/node.js.map +1 -1
- package/dist/{replay-H3AS4IF2.js → replay-L2OSAP6N.js} +2 -2
- package/package.json +11 -1
- package/dist/chunk-P2MYK27A.js.map +0 -1
- /package/dist/{replay-H3AS4IF2.js.map → replay-L2OSAP6N.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1072,6 +1072,7 @@ declare class BitfabLangGraphCallbackHandler {
|
|
|
1072
1072
|
private readonly ownsHttpClient;
|
|
1073
1073
|
private readonly traceFunctionKey;
|
|
1074
1074
|
private readonly getActiveSpanContext;
|
|
1075
|
+
private readonly captureTools;
|
|
1075
1076
|
private runToSpan;
|
|
1076
1077
|
private invocations;
|
|
1077
1078
|
constructor(config: {
|
|
@@ -1080,6 +1081,8 @@ declare class BitfabLangGraphCallbackHandler {
|
|
|
1080
1081
|
serviceUrl?: string;
|
|
1081
1082
|
timeout?: number;
|
|
1082
1083
|
getActiveSpanContext?: () => ActiveSpanContext$1 | null;
|
|
1084
|
+
/** Whether callback tool events should emit spans. Defaults to true. */
|
|
1085
|
+
captureTools?: boolean;
|
|
1083
1086
|
/**
|
|
1084
1087
|
* The owning `Bitfab` client's HTTP client. Supplied by
|
|
1085
1088
|
* `getLangGraphCallbackHandler()` so this handler shares that client's
|
|
@@ -1115,6 +1118,79 @@ declare class BitfabLangGraphCallbackHandler {
|
|
|
1115
1118
|
handleRetrieverError(error: unknown, runId: string): Promise<void>;
|
|
1116
1119
|
}
|
|
1117
1120
|
|
|
1121
|
+
interface SpanClient {
|
|
1122
|
+
withSpan<TArgs extends unknown[], TReturn>(traceFunctionKey: string, options: {
|
|
1123
|
+
name?: string;
|
|
1124
|
+
type?: "agent" | "function";
|
|
1125
|
+
captureWhen?: "always" | "nested";
|
|
1126
|
+
mockOnReplay?: boolean;
|
|
1127
|
+
finalize?: (result: unknown) => unknown | Promise<unknown>;
|
|
1128
|
+
}, fn: (...args: TArgs) => TReturn): (...args: TArgs) => TReturn;
|
|
1129
|
+
}
|
|
1130
|
+
interface LangGraphTool {
|
|
1131
|
+
readonly name?: string;
|
|
1132
|
+
invoke(input: unknown, ...rest: unknown[]): unknown;
|
|
1133
|
+
}
|
|
1134
|
+
interface ConfiguredLangGraphRunnable<TInput, TConfig, TReturn> {
|
|
1135
|
+
invoke(input: TInput, config?: TConfig): TReturn;
|
|
1136
|
+
}
|
|
1137
|
+
interface LangGraphRunnable<TInput, TConfig, TReturn> {
|
|
1138
|
+
withConfig(config: {
|
|
1139
|
+
callbacks: unknown[];
|
|
1140
|
+
}): ConfiguredLangGraphRunnable<TInput, TConfig, TReturn>;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Options for first-class LangGraph ToolNode replay interception.
|
|
1144
|
+
*
|
|
1145
|
+
* @experimental This API may change before it is stable.
|
|
1146
|
+
*/
|
|
1147
|
+
interface LangGraphIntegrationOptions {
|
|
1148
|
+
/**
|
|
1149
|
+
* Tools marked for recorded-output mocking under replay's default
|
|
1150
|
+
* `mock: "marked"` strategy. Defaults to every wrapped tool. Pass a list to
|
|
1151
|
+
* mark only those tool names, or `false` to require `mock: "all"` or an
|
|
1152
|
+
* override.
|
|
1153
|
+
*/
|
|
1154
|
+
mockToolsOnReplay?: boolean | readonly string[];
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* First-class LangGraph integration for callback tracing and replayable
|
|
1158
|
+
* `ToolNode` tools.
|
|
1159
|
+
*
|
|
1160
|
+
* @experimental This API may change before it is stable.
|
|
1161
|
+
*/
|
|
1162
|
+
declare class BitfabLangGraphIntegration {
|
|
1163
|
+
/** Callback handler for the compiled graph's invocation config. */
|
|
1164
|
+
readonly callbackHandler: any;
|
|
1165
|
+
private readonly client;
|
|
1166
|
+
private readonly traceFunctionKey;
|
|
1167
|
+
private readonly mockToolsOnReplay;
|
|
1168
|
+
constructor(config: {
|
|
1169
|
+
client: SpanClient;
|
|
1170
|
+
traceFunctionKey: string;
|
|
1171
|
+
callbackHandler: BitfabLangGraphCallbackHandler;
|
|
1172
|
+
options?: LangGraphIntegrationOptions;
|
|
1173
|
+
});
|
|
1174
|
+
/**
|
|
1175
|
+
* Wrap tools before passing the same returned array to both
|
|
1176
|
+
* `model.bindTools()` and `new ToolNode()`. Each invocation becomes an
|
|
1177
|
+
* independently mockable child span.
|
|
1178
|
+
*/
|
|
1179
|
+
wrapTools<T extends readonly LangGraphTool[]>(tools: T): T;
|
|
1180
|
+
/**
|
|
1181
|
+
* Create the normal graph entry point. The returned function adds Bitfab's
|
|
1182
|
+
* callback handler, preserves invocation config, and records only the graph
|
|
1183
|
+
* input as the replayable root input.
|
|
1184
|
+
*
|
|
1185
|
+
* @experimental This API may change before it is stable.
|
|
1186
|
+
*/
|
|
1187
|
+
createInvoker<TInput, TConfig, TReturn>(graph: LangGraphRunnable<TInput, TConfig, TReturn>): (input: TInput, config?: TConfig) => TReturn;
|
|
1188
|
+
private wrapTool;
|
|
1189
|
+
private assertReplayToolResultExists;
|
|
1190
|
+
/** Wrap the function that invokes the compiled graph as the replay root. */
|
|
1191
|
+
wrapInvoke<TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => TReturn): (...args: TArgs) => TReturn;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1118
1194
|
/**
|
|
1119
1195
|
* OpenAI Agents SDK handler for Bitfab tracing.
|
|
1120
1196
|
*
|
|
@@ -1805,13 +1881,14 @@ declare class BitfabOpenAITracingProcessor implements TracingProcessor {
|
|
|
1805
1881
|
*/
|
|
1806
1882
|
onTraceEnd(trace: Trace): Promise<void>;
|
|
1807
1883
|
/**
|
|
1808
|
-
* Called when a span is started.
|
|
1884
|
+
* Called when a span is started. Span payloads are authoritative completed
|
|
1885
|
+
* snapshots, so start notifications do not cross the transport boundary.
|
|
1809
1886
|
*/
|
|
1810
|
-
onSpanStart(
|
|
1887
|
+
onSpanStart(_span: Span<any>): Promise<void>;
|
|
1811
1888
|
/**
|
|
1812
1889
|
* Called when a span is ended.
|
|
1813
1890
|
*
|
|
1814
|
-
* Send
|
|
1891
|
+
* Send the finalized span snapshot to Bitfab for complete trace capture.
|
|
1815
1892
|
*/
|
|
1816
1893
|
onSpanEnd(span: Span<any>): Promise<void>;
|
|
1817
1894
|
/**
|
|
@@ -2372,6 +2449,19 @@ declare class Bitfab {
|
|
|
2372
2449
|
* @returns A BitfabLangGraphCallbackHandler configured for this client
|
|
2373
2450
|
*/
|
|
2374
2451
|
getLangChainCallbackHandler(traceFunctionKey: string): BitfabLangGraphCallbackHandler;
|
|
2452
|
+
/**
|
|
2453
|
+
* Get the first-class LangGraph integration for tracing and replaying tools
|
|
2454
|
+
* executed by `ToolNode`.
|
|
2455
|
+
*
|
|
2456
|
+
* The integration combines `wrapTools()` for per-tool replay interception
|
|
2457
|
+
* with `createInvoker()` for a callback-configured replayable graph entry
|
|
2458
|
+
* point. Lower-level callback and root wrappers remain available.
|
|
2459
|
+
*
|
|
2460
|
+
* @param traceFunctionKey - Groups traces under this key in Bitfab
|
|
2461
|
+
* @param options - Controls which tools are marked for replay mocking
|
|
2462
|
+
* @experimental This API may change before it is stable.
|
|
2463
|
+
*/
|
|
2464
|
+
getLangGraphIntegration(traceFunctionKey: string, options?: LangGraphIntegrationOptions): BitfabLangGraphIntegration;
|
|
2375
2465
|
/**
|
|
2376
2466
|
* Get a Claude Agent SDK handler for tracing.
|
|
2377
2467
|
*
|
|
@@ -2763,6 +2853,12 @@ declare class BitfabFunction {
|
|
|
2763
2853
|
* @returns A LangChain callback handler for this client and key
|
|
2764
2854
|
*/
|
|
2765
2855
|
getLangChainCallbackHandler(): BitfabLangGraphCallbackHandler;
|
|
2856
|
+
/**
|
|
2857
|
+
* Get the first-class LangGraph tool replay integration bound to this key.
|
|
2858
|
+
*
|
|
2859
|
+
* @experimental This API may change before it is stable.
|
|
2860
|
+
*/
|
|
2861
|
+
getLangGraphIntegration(options?: LangGraphIntegrationOptions): BitfabLangGraphIntegration;
|
|
2766
2862
|
/**
|
|
2767
2863
|
* Wrap a BAML client method to automatically capture prompt and LLM metadata.
|
|
2768
2864
|
* Delegates to the parent client's wrapBAML method.
|
|
@@ -2789,7 +2885,7 @@ declare class BitfabFunction {
|
|
|
2789
2885
|
/**
|
|
2790
2886
|
* SDK version from package.json (injected at build time)
|
|
2791
2887
|
*/
|
|
2792
|
-
declare const __version__ = "0.38.
|
|
2888
|
+
declare const __version__ = "0.38.8";
|
|
2793
2889
|
|
|
2794
2890
|
/**
|
|
2795
2891
|
* Constants for the Bitfab SDK.
|
|
@@ -2892,4 +2988,4 @@ type ReplayRegistry = Record<string, ReplayRegistration>;
|
|
|
2892
2988
|
*/
|
|
2893
2989
|
declare function defineReplayRegistry<TRegistry extends ReplayRegistry>(registry: TRegistry): TRegistry;
|
|
2894
2990
|
|
|
2895
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, HttpClient, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, SUPPORTED_PROVIDERS, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, serializeReplayResult };
|
|
2991
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, HttpClient, type LangGraphIntegrationOptions, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, SUPPORTED_PROVIDERS, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, serializeReplayResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -1072,6 +1072,7 @@ declare class BitfabLangGraphCallbackHandler {
|
|
|
1072
1072
|
private readonly ownsHttpClient;
|
|
1073
1073
|
private readonly traceFunctionKey;
|
|
1074
1074
|
private readonly getActiveSpanContext;
|
|
1075
|
+
private readonly captureTools;
|
|
1075
1076
|
private runToSpan;
|
|
1076
1077
|
private invocations;
|
|
1077
1078
|
constructor(config: {
|
|
@@ -1080,6 +1081,8 @@ declare class BitfabLangGraphCallbackHandler {
|
|
|
1080
1081
|
serviceUrl?: string;
|
|
1081
1082
|
timeout?: number;
|
|
1082
1083
|
getActiveSpanContext?: () => ActiveSpanContext$1 | null;
|
|
1084
|
+
/** Whether callback tool events should emit spans. Defaults to true. */
|
|
1085
|
+
captureTools?: boolean;
|
|
1083
1086
|
/**
|
|
1084
1087
|
* The owning `Bitfab` client's HTTP client. Supplied by
|
|
1085
1088
|
* `getLangGraphCallbackHandler()` so this handler shares that client's
|
|
@@ -1115,6 +1118,79 @@ declare class BitfabLangGraphCallbackHandler {
|
|
|
1115
1118
|
handleRetrieverError(error: unknown, runId: string): Promise<void>;
|
|
1116
1119
|
}
|
|
1117
1120
|
|
|
1121
|
+
interface SpanClient {
|
|
1122
|
+
withSpan<TArgs extends unknown[], TReturn>(traceFunctionKey: string, options: {
|
|
1123
|
+
name?: string;
|
|
1124
|
+
type?: "agent" | "function";
|
|
1125
|
+
captureWhen?: "always" | "nested";
|
|
1126
|
+
mockOnReplay?: boolean;
|
|
1127
|
+
finalize?: (result: unknown) => unknown | Promise<unknown>;
|
|
1128
|
+
}, fn: (...args: TArgs) => TReturn): (...args: TArgs) => TReturn;
|
|
1129
|
+
}
|
|
1130
|
+
interface LangGraphTool {
|
|
1131
|
+
readonly name?: string;
|
|
1132
|
+
invoke(input: unknown, ...rest: unknown[]): unknown;
|
|
1133
|
+
}
|
|
1134
|
+
interface ConfiguredLangGraphRunnable<TInput, TConfig, TReturn> {
|
|
1135
|
+
invoke(input: TInput, config?: TConfig): TReturn;
|
|
1136
|
+
}
|
|
1137
|
+
interface LangGraphRunnable<TInput, TConfig, TReturn> {
|
|
1138
|
+
withConfig(config: {
|
|
1139
|
+
callbacks: unknown[];
|
|
1140
|
+
}): ConfiguredLangGraphRunnable<TInput, TConfig, TReturn>;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Options for first-class LangGraph ToolNode replay interception.
|
|
1144
|
+
*
|
|
1145
|
+
* @experimental This API may change before it is stable.
|
|
1146
|
+
*/
|
|
1147
|
+
interface LangGraphIntegrationOptions {
|
|
1148
|
+
/**
|
|
1149
|
+
* Tools marked for recorded-output mocking under replay's default
|
|
1150
|
+
* `mock: "marked"` strategy. Defaults to every wrapped tool. Pass a list to
|
|
1151
|
+
* mark only those tool names, or `false` to require `mock: "all"` or an
|
|
1152
|
+
* override.
|
|
1153
|
+
*/
|
|
1154
|
+
mockToolsOnReplay?: boolean | readonly string[];
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* First-class LangGraph integration for callback tracing and replayable
|
|
1158
|
+
* `ToolNode` tools.
|
|
1159
|
+
*
|
|
1160
|
+
* @experimental This API may change before it is stable.
|
|
1161
|
+
*/
|
|
1162
|
+
declare class BitfabLangGraphIntegration {
|
|
1163
|
+
/** Callback handler for the compiled graph's invocation config. */
|
|
1164
|
+
readonly callbackHandler: any;
|
|
1165
|
+
private readonly client;
|
|
1166
|
+
private readonly traceFunctionKey;
|
|
1167
|
+
private readonly mockToolsOnReplay;
|
|
1168
|
+
constructor(config: {
|
|
1169
|
+
client: SpanClient;
|
|
1170
|
+
traceFunctionKey: string;
|
|
1171
|
+
callbackHandler: BitfabLangGraphCallbackHandler;
|
|
1172
|
+
options?: LangGraphIntegrationOptions;
|
|
1173
|
+
});
|
|
1174
|
+
/**
|
|
1175
|
+
* Wrap tools before passing the same returned array to both
|
|
1176
|
+
* `model.bindTools()` and `new ToolNode()`. Each invocation becomes an
|
|
1177
|
+
* independently mockable child span.
|
|
1178
|
+
*/
|
|
1179
|
+
wrapTools<T extends readonly LangGraphTool[]>(tools: T): T;
|
|
1180
|
+
/**
|
|
1181
|
+
* Create the normal graph entry point. The returned function adds Bitfab's
|
|
1182
|
+
* callback handler, preserves invocation config, and records only the graph
|
|
1183
|
+
* input as the replayable root input.
|
|
1184
|
+
*
|
|
1185
|
+
* @experimental This API may change before it is stable.
|
|
1186
|
+
*/
|
|
1187
|
+
createInvoker<TInput, TConfig, TReturn>(graph: LangGraphRunnable<TInput, TConfig, TReturn>): (input: TInput, config?: TConfig) => TReturn;
|
|
1188
|
+
private wrapTool;
|
|
1189
|
+
private assertReplayToolResultExists;
|
|
1190
|
+
/** Wrap the function that invokes the compiled graph as the replay root. */
|
|
1191
|
+
wrapInvoke<TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => TReturn): (...args: TArgs) => TReturn;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1118
1194
|
/**
|
|
1119
1195
|
* OpenAI Agents SDK handler for Bitfab tracing.
|
|
1120
1196
|
*
|
|
@@ -1805,13 +1881,14 @@ declare class BitfabOpenAITracingProcessor implements TracingProcessor {
|
|
|
1805
1881
|
*/
|
|
1806
1882
|
onTraceEnd(trace: Trace): Promise<void>;
|
|
1807
1883
|
/**
|
|
1808
|
-
* Called when a span is started.
|
|
1884
|
+
* Called when a span is started. Span payloads are authoritative completed
|
|
1885
|
+
* snapshots, so start notifications do not cross the transport boundary.
|
|
1809
1886
|
*/
|
|
1810
|
-
onSpanStart(
|
|
1887
|
+
onSpanStart(_span: Span<any>): Promise<void>;
|
|
1811
1888
|
/**
|
|
1812
1889
|
* Called when a span is ended.
|
|
1813
1890
|
*
|
|
1814
|
-
* Send
|
|
1891
|
+
* Send the finalized span snapshot to Bitfab for complete trace capture.
|
|
1815
1892
|
*/
|
|
1816
1893
|
onSpanEnd(span: Span<any>): Promise<void>;
|
|
1817
1894
|
/**
|
|
@@ -2372,6 +2449,19 @@ declare class Bitfab {
|
|
|
2372
2449
|
* @returns A BitfabLangGraphCallbackHandler configured for this client
|
|
2373
2450
|
*/
|
|
2374
2451
|
getLangChainCallbackHandler(traceFunctionKey: string): BitfabLangGraphCallbackHandler;
|
|
2452
|
+
/**
|
|
2453
|
+
* Get the first-class LangGraph integration for tracing and replaying tools
|
|
2454
|
+
* executed by `ToolNode`.
|
|
2455
|
+
*
|
|
2456
|
+
* The integration combines `wrapTools()` for per-tool replay interception
|
|
2457
|
+
* with `createInvoker()` for a callback-configured replayable graph entry
|
|
2458
|
+
* point. Lower-level callback and root wrappers remain available.
|
|
2459
|
+
*
|
|
2460
|
+
* @param traceFunctionKey - Groups traces under this key in Bitfab
|
|
2461
|
+
* @param options - Controls which tools are marked for replay mocking
|
|
2462
|
+
* @experimental This API may change before it is stable.
|
|
2463
|
+
*/
|
|
2464
|
+
getLangGraphIntegration(traceFunctionKey: string, options?: LangGraphIntegrationOptions): BitfabLangGraphIntegration;
|
|
2375
2465
|
/**
|
|
2376
2466
|
* Get a Claude Agent SDK handler for tracing.
|
|
2377
2467
|
*
|
|
@@ -2763,6 +2853,12 @@ declare class BitfabFunction {
|
|
|
2763
2853
|
* @returns A LangChain callback handler for this client and key
|
|
2764
2854
|
*/
|
|
2765
2855
|
getLangChainCallbackHandler(): BitfabLangGraphCallbackHandler;
|
|
2856
|
+
/**
|
|
2857
|
+
* Get the first-class LangGraph tool replay integration bound to this key.
|
|
2858
|
+
*
|
|
2859
|
+
* @experimental This API may change before it is stable.
|
|
2860
|
+
*/
|
|
2861
|
+
getLangGraphIntegration(options?: LangGraphIntegrationOptions): BitfabLangGraphIntegration;
|
|
2766
2862
|
/**
|
|
2767
2863
|
* Wrap a BAML client method to automatically capture prompt and LLM metadata.
|
|
2768
2864
|
* Delegates to the parent client's wrapBAML method.
|
|
@@ -2789,7 +2885,7 @@ declare class BitfabFunction {
|
|
|
2789
2885
|
/**
|
|
2790
2886
|
* SDK version from package.json (injected at build time)
|
|
2791
2887
|
*/
|
|
2792
|
-
declare const __version__ = "0.38.
|
|
2888
|
+
declare const __version__ = "0.38.8";
|
|
2793
2889
|
|
|
2794
2890
|
/**
|
|
2795
2891
|
* Constants for the Bitfab SDK.
|
|
@@ -2892,4 +2988,4 @@ type ReplayRegistry = Record<string, ReplayRegistration>;
|
|
|
2892
2988
|
*/
|
|
2893
2989
|
declare function defineReplayRegistry<TRegistry extends ReplayRegistry>(registry: TRegistry): TRegistry;
|
|
2894
2990
|
|
|
2895
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, HttpClient, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, SUPPORTED_PROVIDERS, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, serializeReplayResult };
|
|
2991
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, HttpClient, type LangGraphIntegrationOptions, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, SUPPORTED_PROVIDERS, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, serializeReplayResult };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
BitfabClaudeAgentHandler,
|
|
4
4
|
BitfabFunction,
|
|
5
5
|
BitfabLangGraphCallbackHandler,
|
|
6
|
+
BitfabLangGraphIntegration,
|
|
6
7
|
BitfabOpenAIAgentHandler,
|
|
7
8
|
BitfabOpenAITracingProcessor,
|
|
8
9
|
BitfabVercelAiHandler,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
getCurrentReplayBranch,
|
|
13
14
|
getCurrentSpan,
|
|
14
15
|
getCurrentTrace
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CKOOG3TW.js";
|
|
16
17
|
import "./chunk-ZUD7OFYB.js";
|
|
17
18
|
import {
|
|
18
19
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
flushTraces,
|
|
27
28
|
reportReplayProgress,
|
|
28
29
|
serializeReplayResult
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VCGFTX2G.js";
|
|
30
31
|
import "./chunk-H6LZRFMN.js";
|
|
31
32
|
export {
|
|
32
33
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
BitfabFunction,
|
|
37
38
|
BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler,
|
|
38
39
|
BitfabLangGraphCallbackHandler,
|
|
40
|
+
BitfabLangGraphIntegration,
|
|
39
41
|
BitfabOpenAIAgentHandler,
|
|
40
42
|
BitfabOpenAITracingProcessor,
|
|
41
43
|
BitfabVercelAiHandler,
|