bitfab 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
|
@@ -326,9 +326,12 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
if (options?.limit !== void 0 && options?.traceIds !== void 0) {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
329
|
+
try {
|
|
330
|
+
console.warn(
|
|
331
|
+
"Bitfab: limit is ignored when traceIds is passed: the explicit trace ID list already determines how many traces replay."
|
|
332
|
+
);
|
|
333
|
+
} catch {
|
|
334
|
+
}
|
|
332
335
|
}
|
|
333
336
|
await replayContextReady;
|
|
334
337
|
const {
|
|
@@ -425,6 +428,7 @@ __export(index_exports, {
|
|
|
425
428
|
BitfabClaudeAgentHandler: () => BitfabClaudeAgentHandler,
|
|
426
429
|
BitfabError: () => BitfabError,
|
|
427
430
|
BitfabFunction: () => BitfabFunction,
|
|
431
|
+
BitfabLangChainCallbackHandler: () => BitfabLangGraphCallbackHandler,
|
|
428
432
|
BitfabLangGraphCallbackHandler: () => BitfabLangGraphCallbackHandler,
|
|
429
433
|
BitfabOpenAITracingProcessor: () => BitfabOpenAITracingProcessor,
|
|
430
434
|
DEFAULT_SERVICE_URL: () => DEFAULT_SERVICE_URL,
|
|
@@ -438,7 +442,7 @@ __export(index_exports, {
|
|
|
438
442
|
module.exports = __toCommonJS(index_exports);
|
|
439
443
|
|
|
440
444
|
// src/version.generated.ts
|
|
441
|
-
var __version__ = "0.16.
|
|
445
|
+
var __version__ = "0.16.2";
|
|
442
446
|
|
|
443
447
|
// src/constants.ts
|
|
444
448
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
@@ -2725,6 +2729,24 @@ var Bitfab = class {
|
|
|
2725
2729
|
}
|
|
2726
2730
|
});
|
|
2727
2731
|
}
|
|
2732
|
+
/**
|
|
2733
|
+
* Get a LangChain callback handler for tracing.
|
|
2734
|
+
*
|
|
2735
|
+
* Alias of {@link getLangGraphCallbackHandler}: LangChain chains and
|
|
2736
|
+
* LangGraph graphs share the same callback system, so one handler serves
|
|
2737
|
+
* both.
|
|
2738
|
+
*
|
|
2739
|
+
* ```typescript
|
|
2740
|
+
* const handler = client.getLangChainCallbackHandler("my-chain");
|
|
2741
|
+
* const result = await chain.invoke(input, { callbacks: [handler] });
|
|
2742
|
+
* ```
|
|
2743
|
+
*
|
|
2744
|
+
* @param traceFunctionKey - Groups traces under this key in Bitfab
|
|
2745
|
+
* @returns A BitfabLangGraphCallbackHandler configured for this client
|
|
2746
|
+
*/
|
|
2747
|
+
getLangChainCallbackHandler(traceFunctionKey) {
|
|
2748
|
+
return this.getLangGraphCallbackHandler(traceFunctionKey);
|
|
2749
|
+
}
|
|
2728
2750
|
/**
|
|
2729
2751
|
* Get a Claude Agent SDK handler for tracing.
|
|
2730
2752
|
*
|
|
@@ -3228,9 +3250,9 @@ var Bitfab = class {
|
|
|
3228
3250
|
*
|
|
3229
3251
|
* @param traceFunctionKey - The trace function key to replay
|
|
3230
3252
|
* @param fn - The function to replay (must be the return value of `withSpan`)
|
|
3231
|
-
* @param options - Optional replay options.
|
|
3232
|
-
*
|
|
3233
|
-
*
|
|
3253
|
+
* @param options - Optional replay options. When `traceIds` is passed,
|
|
3254
|
+
* `limit` is ignored (with a warning): an explicit ID list already
|
|
3255
|
+
* determines how many traces replay.
|
|
3234
3256
|
* @returns ReplayResult with items, testRunId, and testRunUrl
|
|
3235
3257
|
*/
|
|
3236
3258
|
async replay(traceFunctionKey, fn, options) {
|
|
@@ -3304,6 +3326,7 @@ var BitfabFunction = class {
|
|
|
3304
3326
|
BitfabClaudeAgentHandler,
|
|
3305
3327
|
BitfabError,
|
|
3306
3328
|
BitfabFunction,
|
|
3329
|
+
BitfabLangChainCallbackHandler,
|
|
3307
3330
|
BitfabLangGraphCallbackHandler,
|
|
3308
3331
|
BitfabOpenAITracingProcessor,
|
|
3309
3332
|
DEFAULT_SERVICE_URL,
|