bitfab 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-A67P4IPJ.js → chunk-CLYCJGJE.js} +2 -2
  2. package/dist/{chunk-A67P4IPJ.js.map → chunk-CLYCJGJE.js.map} +1 -1
  3. package/dist/{chunk-JMZSZD22.js → chunk-JAXMD6AP.js} +38 -6
  4. package/dist/chunk-JAXMD6AP.js.map +1 -0
  5. package/dist/{chunk-HIWCN36R.js → chunk-O2OJIGL3.js} +2 -2
  6. package/dist/{chunk-I6HABUAU.js → chunk-SEHWHFUY.js} +2 -2
  7. package/dist/{chunk-I6HABUAU.js.map → chunk-SEHWHFUY.js.map} +1 -1
  8. package/dist/{chunk-7UOWGJFK.js → chunk-VQB5RCFD.js} +3 -3
  9. package/dist/{http-7G364U2F.js → http-G43RIR7E.js} +2 -2
  10. package/dist/{http-VZG3GUGE.js → http-RXH2N5BB.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-2PZ7OOTJ.js → replay-XQITDIRJ.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-JMZSZD22.js.map +0 -1
  27. /package/dist/{chunk-HIWCN36R.js.map → chunk-O2OJIGL3.js.map} +0 -0
  28. /package/dist/{chunk-7UOWGJFK.js.map → chunk-VQB5RCFD.js.map} +0 -0
  29. /package/dist/{http-7G364U2F.js.map → http-G43RIR7E.js.map} +0 -0
  30. /package/dist/{http-VZG3GUGE.js.map → http-RXH2N5BB.js.map} +0 -0
  31. /package/dist/{replay-2PZ7OOTJ.js.map → replay-XQITDIRJ.js.map} +0 -0
@@ -19,7 +19,7 @@ import {
19
19
  serializeValue,
20
20
  toJsonSafe,
21
21
  toJsonSafeReport
22
- } from "./chunk-HIWCN36R.js";
22
+ } from "./chunk-O2OJIGL3.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-I6HABUAU.js";
38
+ } from "./chunk-SEHWHFUY.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-VZG3GUGE.js");
5110
+ const { flushTraces: flushTraces2 } = await import("./http-RXH2N5BB.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-2PZ7OOTJ.js");
5169
+ const { replay: doReplay } = await import("./replay-XQITDIRJ.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-VZG3GUGE.js");
5453
+ const { flushTraces: flushTraces2 } = await import("./http-RXH2N5BB.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-JMZSZD22.js.map
5491
+ //# sourceMappingURL=chunk-JAXMD6AP.js.map