@bitfab/sdk 0.16.0 → 0.16.2
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-53G5GR7B.js → chunk-4WJPQT2X.js} +24 -6
- package/dist/{chunk-53G5GR7B.js.map → chunk-4WJPQT2X.js.map} +1 -1
- package/dist/index.cjs +30 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -8
- package/dist/index.d.ts +24 -8
- package/dist/index.js +2 -1
- package/dist/node.cjs +30 -7
- 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 +2 -1
- package/dist/{replay-WIBKB3BK.js → replay-BIPIDXX6.js} +7 -4
- package/dist/replay-BIPIDXX6.js.map +1 -0
- package/package.json +1 -1
- package/dist/replay-WIBKB3BK.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -317,9 +317,12 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
if (options?.limit !== void 0 && options?.traceIds !== void 0) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
try {
|
|
321
|
+
console.warn(
|
|
322
|
+
"Bitfab: limit is ignored when traceIds is passed: the explicit trace ID list already determines how many traces replay."
|
|
323
|
+
);
|
|
324
|
+
} catch {
|
|
325
|
+
}
|
|
323
326
|
}
|
|
324
327
|
await replayContextReady;
|
|
325
328
|
const {
|
|
@@ -416,6 +419,7 @@ __export(index_exports, {
|
|
|
416
419
|
BitfabClaudeAgentHandler: () => BitfabClaudeAgentHandler,
|
|
417
420
|
BitfabError: () => BitfabError,
|
|
418
421
|
BitfabFunction: () => BitfabFunction,
|
|
422
|
+
BitfabLangChainCallbackHandler: () => BitfabLangGraphCallbackHandler,
|
|
419
423
|
BitfabLangGraphCallbackHandler: () => BitfabLangGraphCallbackHandler,
|
|
420
424
|
BitfabOpenAITracingProcessor: () => BitfabOpenAITracingProcessor,
|
|
421
425
|
DEFAULT_SERVICE_URL: () => DEFAULT_SERVICE_URL,
|
|
@@ -429,7 +433,7 @@ __export(index_exports, {
|
|
|
429
433
|
module.exports = __toCommonJS(index_exports);
|
|
430
434
|
|
|
431
435
|
// src/version.generated.ts
|
|
432
|
-
var __version__ = "0.16.
|
|
436
|
+
var __version__ = "0.16.2";
|
|
433
437
|
|
|
434
438
|
// src/constants.ts
|
|
435
439
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
@@ -2716,6 +2720,24 @@ var Bitfab = class {
|
|
|
2716
2720
|
}
|
|
2717
2721
|
});
|
|
2718
2722
|
}
|
|
2723
|
+
/**
|
|
2724
|
+
* Get a LangChain callback handler for tracing.
|
|
2725
|
+
*
|
|
2726
|
+
* Alias of {@link getLangGraphCallbackHandler}: LangChain chains and
|
|
2727
|
+
* LangGraph graphs share the same callback system, so one handler serves
|
|
2728
|
+
* both.
|
|
2729
|
+
*
|
|
2730
|
+
* ```typescript
|
|
2731
|
+
* const handler = client.getLangChainCallbackHandler("my-chain");
|
|
2732
|
+
* const result = await chain.invoke(input, { callbacks: [handler] });
|
|
2733
|
+
* ```
|
|
2734
|
+
*
|
|
2735
|
+
* @param traceFunctionKey - Groups traces under this key in Bitfab
|
|
2736
|
+
* @returns A BitfabLangGraphCallbackHandler configured for this client
|
|
2737
|
+
*/
|
|
2738
|
+
getLangChainCallbackHandler(traceFunctionKey) {
|
|
2739
|
+
return this.getLangGraphCallbackHandler(traceFunctionKey);
|
|
2740
|
+
}
|
|
2719
2741
|
/**
|
|
2720
2742
|
* Get a Claude Agent SDK handler for tracing.
|
|
2721
2743
|
*
|
|
@@ -3219,9 +3241,9 @@ var Bitfab = class {
|
|
|
3219
3241
|
*
|
|
3220
3242
|
* @param traceFunctionKey - The trace function key to replay
|
|
3221
3243
|
* @param fn - The function to replay (must be the return value of `withSpan`)
|
|
3222
|
-
* @param options - Optional replay options.
|
|
3223
|
-
*
|
|
3224
|
-
*
|
|
3244
|
+
* @param options - Optional replay options. When `traceIds` is passed,
|
|
3245
|
+
* `limit` is ignored (with a warning): an explicit ID list already
|
|
3246
|
+
* determines how many traces replay.
|
|
3225
3247
|
* @returns ReplayResult with items, testRunId, and testRunUrl
|
|
3226
3248
|
*/
|
|
3227
3249
|
async replay(traceFunctionKey, fn, options) {
|
|
@@ -3295,6 +3317,7 @@ var BitfabFunction = class {
|
|
|
3295
3317
|
BitfabClaudeAgentHandler,
|
|
3296
3318
|
BitfabError,
|
|
3297
3319
|
BitfabFunction,
|
|
3320
|
+
BitfabLangChainCallbackHandler,
|
|
3298
3321
|
BitfabLangGraphCallbackHandler,
|
|
3299
3322
|
BitfabOpenAITracingProcessor,
|
|
3300
3323
|
DEFAULT_SERVICE_URL,
|