@bitfab/sdk 0.53.5 → 0.54.0

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.
Files changed (31) hide show
  1. package/dist/{chunk-BOXLWX73.js → chunk-EPWQ43SC.js} +2 -2
  2. package/dist/{chunk-BOXLWX73.js.map → chunk-EPWQ43SC.js.map} +1 -1
  3. package/dist/{chunk-IDQBDBNS.js → chunk-IDUFXDV6.js} +3 -3
  4. package/dist/{chunk-PAL7VIWM.js → chunk-MZ42HQ7N.js} +2 -2
  5. package/dist/{chunk-Q7IB5VFZ.js → chunk-SOYIEIGU.js} +38 -6
  6. package/dist/chunk-SOYIEIGU.js.map +1 -0
  7. package/dist/{chunk-RMATODGT.js → chunk-X2FL37KB.js} +2 -2
  8. package/dist/{chunk-RMATODGT.js.map → chunk-X2FL37KB.js.map} +1 -1
  9. package/dist/{http-6F3OLGWX.js → http-EQ4PDMDO.js} +2 -2
  10. package/dist/{http-3WOABXYN.js → http-WTRCGTCE.js} +2 -2
  11. package/dist/index.cjs +34 -1
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +38 -4
  14. package/dist/index.d.ts +38 -4
  15. package/dist/index.js +5 -3
  16. package/dist/node.cjs +34 -1
  17. package/dist/node.cjs.map +1 -1
  18. package/dist/node.d.cts +1 -1
  19. package/dist/node.d.ts +1 -1
  20. package/dist/node.js +5 -3
  21. package/dist/node.js.map +1 -1
  22. package/dist/{replay-HVLPMPVQ.js → replay-5ZF55JZX.js} +3 -3
  23. package/dist/replayCli.js +2 -2
  24. package/dist/seedCli.js +2 -2
  25. package/package.json +1 -1
  26. package/dist/chunk-Q7IB5VFZ.js.map +0 -1
  27. /package/dist/{chunk-IDQBDBNS.js.map → chunk-IDUFXDV6.js.map} +0 -0
  28. /package/dist/{chunk-PAL7VIWM.js.map → chunk-MZ42HQ7N.js.map} +0 -0
  29. /package/dist/{http-3WOABXYN.js.map → http-EQ4PDMDO.js.map} +0 -0
  30. /package/dist/{http-6F3OLGWX.js.map → http-WTRCGTCE.js.map} +0 -0
  31. /package/dist/{replay-HVLPMPVQ.js.map → replay-5ZF55JZX.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BitfabError
3
- } from "./chunk-RMATODGT.js";
3
+ } from "./chunk-X2FL37KB.js";
4
4
 
5
5
  // src/codeChange.ts
6
6
  var NUL = String.fromCharCode(0);
@@ -207,7 +207,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
207
207
  sessionId: seedCase.sessionId
208
208
  })
209
209
  );
210
- const { flushTraces: flushTraces2 } = await import("./http-6F3OLGWX.js");
210
+ const { flushTraces: flushTraces2 } = await import("./http-EQ4PDMDO.js");
211
211
  await flushTraces2(3e4);
212
212
  return { pipeline, traceFunctionKey, traceIds };
213
213
  }
@@ -744,4 +744,4 @@ export {
744
744
  runRegistryMain,
745
745
  runIfEntrypoint
746
746
  };
747
- //# sourceMappingURL=chunk-IDQBDBNS.js.map
747
+ //# sourceMappingURL=chunk-IDUFXDV6.js.map
@@ -5,7 +5,7 @@ import {
5
5
  replayContextReady,
6
6
  runWithReplayContext,
7
7
  warnOnce
8
- } from "./chunk-BOXLWX73.js";
8
+ } from "./chunk-EPWQ43SC.js";
9
9
  import {
10
10
  runWithCaptureSuppressed
11
11
  } from "./chunk-VCRFFCLY.js";
@@ -1312,4 +1312,4 @@ export {
1312
1312
  sleepForReplayPersistence,
1313
1313
  replay
1314
1314
  };
1315
- //# sourceMappingURL=chunk-PAL7VIWM.js.map
1315
+ //# sourceMappingURL=chunk-MZ42HQ7N.js.map
@@ -19,7 +19,7 @@ import {
19
19
  serializeValue,
20
20
  toJsonSafe,
21
21
  toJsonSafeReport
22
- } from "./chunk-PAL7VIWM.js";
22
+ } from "./chunk-MZ42HQ7N.js";
23
23
  import {
24
24
  BitfabError,
25
25
  DEFAULT_SERVICE_URL,
@@ -35,7 +35,7 @@ import {
35
35
  recordCallerTraceMetadata,
36
36
  retireTraceMetadata,
37
37
  warnOnce
38
- } from "./chunk-BOXLWX73.js";
38
+ } from "./chunk-EPWQ43SC.js";
39
39
  import {
40
40
  __privateAdd,
41
41
  __privateGet,
@@ -46,6 +46,36 @@ import {
46
46
  isCaptureSuppressed
47
47
  } from "./chunk-VCRFFCLY.js";
48
48
 
49
+ // src/assertionCategories.ts
50
+ var CATEGORIES_PATH = "/api/sdk/assertionCategories";
51
+ var AssertionCategoriesClient = class {
52
+ constructor(httpClient) {
53
+ this.httpClient = httpClient;
54
+ }
55
+ /** Create a category, or update it by ID. Omitted descriptions are preserved. */
56
+ async save(params) {
57
+ const response = await this.httpClient.request(CATEGORIES_PATH, params);
58
+ return response.category;
59
+ }
60
+ /** Read one category in the API key's organization. */
61
+ async get(id) {
62
+ const response = await this.httpClient.get(
63
+ `${CATEGORIES_PATH}/${encodeURIComponent(id)}`
64
+ );
65
+ return response.category;
66
+ }
67
+ /** List the organization's categories ordered by title. */
68
+ async list() {
69
+ const response = await this.httpClient.get(CATEGORIES_PATH);
70
+ return response.categories;
71
+ }
72
+ /** Delete a category and clear its assignments, preserving assertions and verdicts. */
73
+ async delete(id) {
74
+ const response = await this.httpClient.request(`${CATEGORIES_PATH}/${encodeURIComponent(id)}`, {}, { method: "DELETE" });
75
+ return response.category;
76
+ }
77
+ };
78
+
49
79
  // src/assertions.ts
50
80
  var ASSERTIONS_PATH = "/api/sdk/traces/assertions";
51
81
  function traceAssertionsPath(traceId, suffix = "") {
@@ -3374,6 +3404,7 @@ var Bitfab = class {
3374
3404
  this.httpClient.releaseHeldExternalSpans = (timeoutMs) => this.simulationPlan.release(timeoutMs);
3375
3405
  this.httpClient.stopSimulationPlan = () => this.simulationPlan.stop();
3376
3406
  this.datasets = new DatasetsClient(this.httpClient);
3407
+ this.assertionCategories = new AssertionCategoriesClient(this.httpClient);
3377
3408
  this.traces = new TracesClient(this.httpClient);
3378
3409
  this.labels = new LabelsClient(this.httpClient);
3379
3410
  this.graders = new GradersClient(this.httpClient);
@@ -5076,7 +5107,7 @@ var Bitfab = class {
5076
5107
  await runWithSeedContext({ traceId }, async () => target(...args));
5077
5108
  } finally {
5078
5109
  try {
5079
- const { flushTraces: flushTraces2 } = await import("./http-3WOABXYN.js");
5110
+ const { flushTraces: flushTraces2 } = await import("./http-WTRCGTCE.js");
5080
5111
  await flushTraces2(3e4);
5081
5112
  } finally {
5082
5113
  unrecorded = activeTraceStates.delete(traceId);
@@ -5135,7 +5166,7 @@ var Bitfab = class {
5135
5166
  `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.`
5136
5167
  );
5137
5168
  }
5138
- const { replay: doReplay } = await import("./replay-HVLPMPVQ.js");
5169
+ const { replay: doReplay } = await import("./replay-5ZF55JZX.js");
5139
5170
  return doReplay(
5140
5171
  this.httpClient,
5141
5172
  this.serviceUrl,
@@ -5419,7 +5450,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
5419
5450
  sessionId: seedCase.sessionId
5420
5451
  })
5421
5452
  );
5422
- const { flushTraces: flushTraces2 } = await import("./http-3WOABXYN.js");
5453
+ const { flushTraces: flushTraces2 } = await import("./http-WTRCGTCE.js");
5423
5454
  await flushTraces2(3e4);
5424
5455
  return { pipeline, traceFunctionKey, traceIds };
5425
5456
  }
@@ -5435,6 +5466,7 @@ function resolveTraceFunctionKey(registration) {
5435
5466
  }
5436
5467
 
5437
5468
  export {
5469
+ AssertionCategoriesClient,
5438
5470
  TracesClient,
5439
5471
  BitfabClaudeAgentHandler,
5440
5472
  DatasetsClient,
@@ -5456,4 +5488,4 @@ export {
5456
5488
  reseedFromRegistry,
5457
5489
  seedFromRegistry
5458
5490
  };
5459
- //# sourceMappingURL=chunk-Q7IB5VFZ.js.map
5491
+ //# sourceMappingURL=chunk-SOYIEIGU.js.map