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.
@@ -6,7 +6,7 @@ import {
6
6
  replayContextReady,
7
7
  runWithReplayContext,
8
8
  warnOnce
9
- } from "./chunk-UJRT3MLT.js";
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-YO332W7L.js.map
1215
+ //# sourceMappingURL=chunk-EBDVWYCV.js.map
@@ -18,7 +18,7 @@ import {
18
18
  serializeValue,
19
19
  toJsonSafe,
20
20
  toJsonSafeReport
21
- } from "./chunk-YO332W7L.js";
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-UJRT3MLT.js";
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-72OO3GAV.js");
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-2VG6C4O4.js");
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-72OO3GAV.js");
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-WFNCKWDC.js.map
5555
+ //# sourceMappingURL=chunk-FCJHKGEE.js.map