bitfab 0.54.4 → 0.54.5
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-YO332W7L.js → chunk-3O5MS4XJ.js} +2 -2
- package/dist/{chunk-UJRT3MLT.js → chunk-GVK7AES5.js} +2 -2
- package/dist/{chunk-UJRT3MLT.js.map → chunk-GVK7AES5.js.map} +1 -1
- package/dist/{chunk-WFNCKWDC.js → chunk-NATC7L2W.js} +56 -46
- package/dist/chunk-NATC7L2W.js.map +1 -0
- package/dist/{chunk-KDLFM5FD.js → chunk-RA3J6A6K.js} +2 -2
- package/dist/{chunk-KDLFM5FD.js.map → chunk-RA3J6A6K.js.map} +1 -1
- package/dist/{chunk-UARR7MGL.js → chunk-VAHFHCBT.js} +3 -3
- package/dist/{http-LSUY52PX.js → http-K2H4547F.js} +2 -2
- package/dist/{http-72OO3GAV.js → http-RW2JO6TU.js} +2 -2
- package/dist/index.cjs +50 -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 +50 -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-MHYULXCH.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-3O5MS4XJ.js.map} +0 -0
- /package/dist/{chunk-UARR7MGL.js.map → chunk-VAHFHCBT.js.map} +0 -0
- /package/dist/{http-72OO3GAV.js.map → http-K2H4547F.js.map} +0 -0
- /package/dist/{http-LSUY52PX.js.map → http-RW2JO6TU.js.map} +0 -0
- /package/dist/{replay-2VG6C4O4.js.map → replay-MHYULXCH.js.map} +0 -0
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
serializeValue,
|
|
19
19
|
toJsonSafe,
|
|
20
20
|
toJsonSafeReport
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3O5MS4XJ.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-GVK7AES5.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,55 @@ 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
|
+
/**
|
|
2520
|
+
* Search traces by exact caller metadata.
|
|
2521
|
+
*
|
|
2522
|
+
* Keys and values are matched case-insensitively. Up to 10 supplied pairs
|
|
2523
|
+
* must match. Use `nextCursor` from the result to fetch another page.
|
|
2524
|
+
*/
|
|
2525
|
+
async search(params) {
|
|
2526
|
+
return this.httpClient.request(SEARCH_PATH, params);
|
|
2527
|
+
}
|
|
2528
|
+
async getAssertions(traceId) {
|
|
2529
|
+
return this.httpClient.get(
|
|
2530
|
+
traceAssertionsPath(traceId)
|
|
2531
|
+
);
|
|
2532
|
+
}
|
|
2533
|
+
async saveAssertions(params) {
|
|
2534
|
+
return this.saveAssertionsAll({
|
|
2535
|
+
updates: [{ traceId: params.traceId, assertions: params.assertions }],
|
|
2536
|
+
source: params.source
|
|
2537
|
+
});
|
|
2538
|
+
}
|
|
2539
|
+
async saveAssertionsAll(params) {
|
|
2540
|
+
if (params.updates.length === 0) {
|
|
2541
|
+
return [];
|
|
2542
|
+
}
|
|
2543
|
+
const response = await this.httpClient.request(ASSERTIONS_PATH, {
|
|
2544
|
+
updates: params.updates,
|
|
2545
|
+
source: params.source ?? "agent"
|
|
2546
|
+
});
|
|
2547
|
+
return response.assertions;
|
|
2548
|
+
}
|
|
2549
|
+
async archiveAssertions(params) {
|
|
2550
|
+
const response = await this.httpClient.request(
|
|
2551
|
+
traceAssertionsPath(params.traceId, "/archive"),
|
|
2552
|
+
{ assertionIds: params.assertionIds }
|
|
2553
|
+
);
|
|
2554
|
+
return response.archived;
|
|
2555
|
+
}
|
|
2556
|
+
};
|
|
2557
|
+
|
|
2548
2558
|
// src/tracing.ts
|
|
2549
2559
|
var BitfabOpenAITracingProcessor = class {
|
|
2550
2560
|
/**
|
|
@@ -5167,7 +5177,7 @@ var Bitfab = class {
|
|
|
5167
5177
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
5168
5178
|
} finally {
|
|
5169
5179
|
try {
|
|
5170
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
5180
|
+
const { flushTraces: flushTraces2 } = await import("./http-RW2JO6TU.js");
|
|
5171
5181
|
await flushTraces2(3e4);
|
|
5172
5182
|
} finally {
|
|
5173
5183
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -5226,7 +5236,7 @@ var Bitfab = class {
|
|
|
5226
5236
|
`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
5237
|
);
|
|
5228
5238
|
}
|
|
5229
|
-
const { replay: doReplay } = await import("./replay-
|
|
5239
|
+
const { replay: doReplay } = await import("./replay-MHYULXCH.js");
|
|
5230
5240
|
return doReplay(
|
|
5231
5241
|
this.httpClient,
|
|
5232
5242
|
this.serviceUrl,
|
|
@@ -5510,7 +5520,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
5510
5520
|
sessionId: seedCase.sessionId
|
|
5511
5521
|
})
|
|
5512
5522
|
);
|
|
5513
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
5523
|
+
const { flushTraces: flushTraces2 } = await import("./http-RW2JO6TU.js");
|
|
5514
5524
|
await flushTraces2(3e4);
|
|
5515
5525
|
return { pipeline, traceFunctionKey, traceIds };
|
|
5516
5526
|
}
|
|
@@ -5527,7 +5537,6 @@ function resolveTraceFunctionKey(registration) {
|
|
|
5527
5537
|
|
|
5528
5538
|
export {
|
|
5529
5539
|
AssertionCategoriesClient,
|
|
5530
|
-
TracesClient,
|
|
5531
5540
|
BitfabClaudeAgentHandler,
|
|
5532
5541
|
DatasetsClient,
|
|
5533
5542
|
SUPPORTED_PROVIDERS,
|
|
@@ -5536,6 +5545,7 @@ export {
|
|
|
5536
5545
|
BitfabLangGraphCallbackHandler,
|
|
5537
5546
|
BitfabLangGraphIntegration,
|
|
5538
5547
|
BitfabOpenAIAgentHandler,
|
|
5548
|
+
TracesClient,
|
|
5539
5549
|
BitfabOpenAITracingProcessor,
|
|
5540
5550
|
BitfabVercelAiHandler,
|
|
5541
5551
|
getCurrentSpan,
|
|
@@ -5548,4 +5558,4 @@ export {
|
|
|
5548
5558
|
reseedFromRegistry,
|
|
5549
5559
|
seedFromRegistry
|
|
5550
5560
|
};
|
|
5551
|
-
//# sourceMappingURL=chunk-
|
|
5561
|
+
//# sourceMappingURL=chunk-NATC7L2W.js.map
|