bitfab 0.54.4 → 0.54.6
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-UJRT3MLT.js → chunk-5FRFNRFA.js} +2 -2
- package/dist/{chunk-UJRT3MLT.js.map → chunk-5FRFNRFA.js.map} +1 -1
- package/dist/{chunk-YO332W7L.js → chunk-EBDVWYCV.js} +2 -2
- package/dist/{chunk-WFNCKWDC.js → chunk-FCJHKGEE.js} +50 -46
- package/dist/chunk-FCJHKGEE.js.map +1 -0
- package/dist/{chunk-KDLFM5FD.js → chunk-IKNIY7JV.js} +2 -2
- package/dist/{chunk-KDLFM5FD.js.map → chunk-IKNIY7JV.js.map} +1 -1
- package/dist/{chunk-UARR7MGL.js → chunk-WWE3W6HF.js} +3 -3
- package/dist/{http-LSUY52PX.js → http-DRPXLTJS.js} +2 -2
- package/dist/{http-72OO3GAV.js → http-EMAHQQ4A.js} +2 -2
- package/dist/index.cjs +44 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +93 -64
- package/dist/index.d.ts +93 -64
- package/dist/index.js +3 -3
- package/dist/node.cjs +44 -40
- 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 +3 -3
- package/dist/{replay-2VG6C4O4.js → replay-XG6LNUN4.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-WFNCKWDC.js.map +0 -1
- /package/dist/{chunk-YO332W7L.js.map → chunk-EBDVWYCV.js.map} +0 -0
- /package/dist/{chunk-UARR7MGL.js.map → chunk-WWE3W6HF.js.map} +0 -0
- /package/dist/{http-72OO3GAV.js.map → http-DRPXLTJS.js.map} +0 -0
- /package/dist/{http-LSUY52PX.js.map → http-EMAHQQ4A.js.map} +0 -0
- /package/dist/{replay-2VG6C4O4.js.map → replay-XG6LNUN4.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
replayContextReady,
|
|
7
7
|
runWithReplayContext,
|
|
8
8
|
warnOnce
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5FRFNRFA.js";
|
|
10
10
|
import {
|
|
11
11
|
runWithCaptureSuppressed
|
|
12
12
|
} from "./chunk-VCRFFCLY.js";
|
|
@@ -1212,4 +1212,4 @@ export {
|
|
|
1212
1212
|
sleepForReplayPersistence,
|
|
1213
1213
|
replay
|
|
1214
1214
|
};
|
|
1215
|
-
//# sourceMappingURL=chunk-
|
|
1215
|
+
//# sourceMappingURL=chunk-EBDVWYCV.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
serializeValue,
|
|
19
19
|
toJsonSafe,
|
|
20
20
|
toJsonSafeReport
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EBDVWYCV.js";
|
|
22
22
|
import {
|
|
23
23
|
BitfabError,
|
|
24
24
|
DEFAULT_SERVICE_URL,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
recordCallerTraceMetadata,
|
|
36
36
|
retireTraceMetadata,
|
|
37
37
|
warnOnce
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5FRFNRFA.js";
|
|
39
39
|
import {
|
|
40
40
|
__privateAdd,
|
|
41
41
|
__privateGet,
|
|
@@ -76,45 +76,6 @@ var AssertionCategoriesClient = class {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
// src/assertions.ts
|
|
80
|
-
var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
|
|
81
|
-
function traceAssertionsPath(traceId, suffix = "") {
|
|
82
|
-
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
83
|
-
}
|
|
84
|
-
var TracesClient = class {
|
|
85
|
-
constructor(httpClient) {
|
|
86
|
-
this.httpClient = httpClient;
|
|
87
|
-
}
|
|
88
|
-
async getAssertions(traceId) {
|
|
89
|
-
return this.httpClient.get(
|
|
90
|
-
traceAssertionsPath(traceId)
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
async saveAssertions(params) {
|
|
94
|
-
return this.saveAssertionsAll({
|
|
95
|
-
updates: [{ traceId: params.traceId, assertions: params.assertions }],
|
|
96
|
-
source: params.source
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
async saveAssertionsAll(params) {
|
|
100
|
-
if (params.updates.length === 0) {
|
|
101
|
-
return [];
|
|
102
|
-
}
|
|
103
|
-
const response = await this.httpClient.request(ASSERTIONS_PATH, {
|
|
104
|
-
updates: params.updates,
|
|
105
|
-
source: params.source ?? "agent"
|
|
106
|
-
});
|
|
107
|
-
return response.assertions;
|
|
108
|
-
}
|
|
109
|
-
async archiveAssertions(params) {
|
|
110
|
-
const response = await this.httpClient.request(
|
|
111
|
-
traceAssertionsPath(params.traceId, "/archive"),
|
|
112
|
-
{ assertionIds: params.assertionIds }
|
|
113
|
-
);
|
|
114
|
-
return response.archived;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
79
|
// src/processorPayload.ts
|
|
119
80
|
var SERIALIZATION_DEGRADED_STEP = "serialization_degraded";
|
|
120
81
|
function degradedError(dropped) {
|
|
@@ -2545,6 +2506,49 @@ var StreamFinalizationError = class extends Error {
|
|
|
2545
2506
|
}
|
|
2546
2507
|
};
|
|
2547
2508
|
|
|
2509
|
+
// src/traces.ts
|
|
2510
|
+
var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
|
|
2511
|
+
var SEARCH_PATH = "/api/sdk/traces/search";
|
|
2512
|
+
function traceAssertionsPath(traceId, suffix = "") {
|
|
2513
|
+
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
2514
|
+
}
|
|
2515
|
+
var TracesClient = class {
|
|
2516
|
+
constructor(httpClient) {
|
|
2517
|
+
this.httpClient = httpClient;
|
|
2518
|
+
}
|
|
2519
|
+
async search(params) {
|
|
2520
|
+
return this.httpClient.request(SEARCH_PATH, params);
|
|
2521
|
+
}
|
|
2522
|
+
async getAssertions(traceId) {
|
|
2523
|
+
return this.httpClient.get(
|
|
2524
|
+
traceAssertionsPath(traceId)
|
|
2525
|
+
);
|
|
2526
|
+
}
|
|
2527
|
+
async saveAssertions(params) {
|
|
2528
|
+
return this.saveAssertionsAll({
|
|
2529
|
+
updates: [{ traceId: params.traceId, assertions: params.assertions }],
|
|
2530
|
+
source: params.source
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
async saveAssertionsAll(params) {
|
|
2534
|
+
if (params.updates.length === 0) {
|
|
2535
|
+
return [];
|
|
2536
|
+
}
|
|
2537
|
+
const response = await this.httpClient.request(ASSERTIONS_PATH, {
|
|
2538
|
+
updates: params.updates,
|
|
2539
|
+
source: params.source ?? "agent"
|
|
2540
|
+
});
|
|
2541
|
+
return response.assertions;
|
|
2542
|
+
}
|
|
2543
|
+
async archiveAssertions(params) {
|
|
2544
|
+
const response = await this.httpClient.request(
|
|
2545
|
+
traceAssertionsPath(params.traceId, "/archive"),
|
|
2546
|
+
{ assertionIds: params.assertionIds }
|
|
2547
|
+
);
|
|
2548
|
+
return response.archived;
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2548
2552
|
// src/tracing.ts
|
|
2549
2553
|
var BitfabOpenAITracingProcessor = class {
|
|
2550
2554
|
/**
|
|
@@ -5167,7 +5171,7 @@ var Bitfab = class {
|
|
|
5167
5171
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
5168
5172
|
} finally {
|
|
5169
5173
|
try {
|
|
5170
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
5174
|
+
const { flushTraces: flushTraces2 } = await import("./http-EMAHQQ4A.js");
|
|
5171
5175
|
await flushTraces2(3e4);
|
|
5172
5176
|
} finally {
|
|
5173
5177
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -5226,7 +5230,7 @@ var Bitfab = class {
|
|
|
5226
5230
|
`Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
|
|
5227
5231
|
);
|
|
5228
5232
|
}
|
|
5229
|
-
const { replay: doReplay } = await import("./replay-
|
|
5233
|
+
const { replay: doReplay } = await import("./replay-XG6LNUN4.js");
|
|
5230
5234
|
return doReplay(
|
|
5231
5235
|
this.httpClient,
|
|
5232
5236
|
this.serviceUrl,
|
|
@@ -5510,7 +5514,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
5510
5514
|
sessionId: seedCase.sessionId
|
|
5511
5515
|
})
|
|
5512
5516
|
);
|
|
5513
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
5517
|
+
const { flushTraces: flushTraces2 } = await import("./http-EMAHQQ4A.js");
|
|
5514
5518
|
await flushTraces2(3e4);
|
|
5515
5519
|
return { pipeline, traceFunctionKey, traceIds };
|
|
5516
5520
|
}
|
|
@@ -5527,7 +5531,6 @@ function resolveTraceFunctionKey(registration) {
|
|
|
5527
5531
|
|
|
5528
5532
|
export {
|
|
5529
5533
|
AssertionCategoriesClient,
|
|
5530
|
-
TracesClient,
|
|
5531
5534
|
BitfabClaudeAgentHandler,
|
|
5532
5535
|
DatasetsClient,
|
|
5533
5536
|
SUPPORTED_PROVIDERS,
|
|
@@ -5536,6 +5539,7 @@ export {
|
|
|
5536
5539
|
BitfabLangGraphCallbackHandler,
|
|
5537
5540
|
BitfabLangGraphIntegration,
|
|
5538
5541
|
BitfabOpenAIAgentHandler,
|
|
5542
|
+
TracesClient,
|
|
5539
5543
|
BitfabOpenAITracingProcessor,
|
|
5540
5544
|
BitfabVercelAiHandler,
|
|
5541
5545
|
getCurrentSpan,
|
|
@@ -5548,4 +5552,4 @@ export {
|
|
|
5548
5552
|
reseedFromRegistry,
|
|
5549
5553
|
seedFromRegistry
|
|
5550
5554
|
};
|
|
5551
|
-
//# sourceMappingURL=chunk-
|
|
5555
|
+
//# sourceMappingURL=chunk-FCJHKGEE.js.map
|