@bitfab/sdk 0.59.1 → 0.60.1

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/index.d.cts CHANGED
@@ -1379,6 +1379,7 @@ type SaveAssertion = {
1379
1379
  category_assertion_id?: string | null;
1380
1380
  id?: string;
1381
1381
  assertion: string;
1382
+ humanNote?: string | null;
1382
1383
  passCriteria?: string | null;
1383
1384
  failCriteria?: string | null;
1384
1385
  targetOnEvaluatedTrace?: TraceTarget | null;
@@ -1475,6 +1476,7 @@ type LabelVerdict = {
1475
1476
  evidence?: Justification | null;
1476
1477
  } | {
1477
1478
  skip: true;
1479
+ annotation?: string;
1478
1480
  } | {
1479
1481
  archive: true;
1480
1482
  };
@@ -1526,7 +1528,9 @@ declare class LabelsClient {
1526
1528
  save(update: LabelUpdate, experimentId?: string): Promise<LabelOutcome>;
1527
1529
  saveAll(updates: LabelUpdate[], experimentId?: string): Promise<LabelOutcome[]>;
1528
1530
  /** Withhold a verdict for a trace or replay attempt whose check did not run. */
1529
- skip(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
1531
+ skip(target: LabelTarget & {
1532
+ annotation?: string;
1533
+ }, experimentId?: string): Promise<LabelOutcome>;
1530
1534
  /** Clear a previous verdict for a trace, replay attempt, or assertion. */
1531
1535
  archive(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
1532
1536
  saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
@@ -2696,7 +2700,8 @@ interface CurrentSpan {
2696
2700
  * Unlike `getCurrentTrace()`, this handle is not tied to AsyncLocalStorage -
2697
2701
  * each method sends to the server immediately. Useful for adding context
2698
2702
  * to a trace from a different process, request, or thread (e.g. a forked
2699
- * agent that wants to annotate the original conversation's trace).
2703
+ * agent that wants to annotate the original conversation's trace). Its methods
2704
+ * write whether or not capture is on.
2700
2705
  */
2701
2706
  interface DetachedTrace {
2702
2707
  /** The canonical Bitfab trace ID this handle resolves. */
@@ -3714,7 +3719,7 @@ interface CommitRef {
3714
3719
  /**
3715
3720
  * SDK version from package.json (injected at build time)
3716
3721
  */
3717
- declare const __version__ = "0.59.1";
3722
+ declare const __version__ = "0.60.1";
3718
3723
 
3719
3724
  /**
3720
3725
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -1379,6 +1379,7 @@ type SaveAssertion = {
1379
1379
  category_assertion_id?: string | null;
1380
1380
  id?: string;
1381
1381
  assertion: string;
1382
+ humanNote?: string | null;
1382
1383
  passCriteria?: string | null;
1383
1384
  failCriteria?: string | null;
1384
1385
  targetOnEvaluatedTrace?: TraceTarget | null;
@@ -1475,6 +1476,7 @@ type LabelVerdict = {
1475
1476
  evidence?: Justification | null;
1476
1477
  } | {
1477
1478
  skip: true;
1479
+ annotation?: string;
1478
1480
  } | {
1479
1481
  archive: true;
1480
1482
  };
@@ -1526,7 +1528,9 @@ declare class LabelsClient {
1526
1528
  save(update: LabelUpdate, experimentId?: string): Promise<LabelOutcome>;
1527
1529
  saveAll(updates: LabelUpdate[], experimentId?: string): Promise<LabelOutcome[]>;
1528
1530
  /** Withhold a verdict for a trace or replay attempt whose check did not run. */
1529
- skip(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
1531
+ skip(target: LabelTarget & {
1532
+ annotation?: string;
1533
+ }, experimentId?: string): Promise<LabelOutcome>;
1530
1534
  /** Clear a previous verdict for a trace, replay attempt, or assertion. */
1531
1535
  archive(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
1532
1536
  saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
@@ -2696,7 +2700,8 @@ interface CurrentSpan {
2696
2700
  * Unlike `getCurrentTrace()`, this handle is not tied to AsyncLocalStorage -
2697
2701
  * each method sends to the server immediately. Useful for adding context
2698
2702
  * to a trace from a different process, request, or thread (e.g. a forked
2699
- * agent that wants to annotate the original conversation's trace).
2703
+ * agent that wants to annotate the original conversation's trace). Its methods
2704
+ * write whether or not capture is on.
2700
2705
  */
2701
2706
  interface DetachedTrace {
2702
2707
  /** The canonical Bitfab trace ID this handle resolves. */
@@ -3714,7 +3719,7 @@ interface CommitRef {
3714
3719
  /**
3715
3720
  * SDK version from package.json (injected at build time)
3716
3721
  */
3717
- declare const __version__ = "0.59.1";
3722
+ declare const __version__ = "0.60.1";
3718
3723
 
3719
3724
  /**
3720
3725
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  getCurrentTrace,
27
27
  reseedFromRegistry,
28
28
  seedFromRegistry
29
- } from "./chunk-AYSXJGAZ.js";
29
+ } from "./chunk-XPIWASNP.js";
30
30
  import "./chunk-5DNB7EN7.js";
31
31
  import {
32
32
  BITFAB_PROGRESS_PREFIX,
@@ -35,7 +35,7 @@ import {
35
35
  ReplayError,
36
36
  reportReplayProgress,
37
37
  serializeReplayResult
38
- } from "./chunk-MK756TJL.js";
38
+ } from "./chunk-AZYUW3CU.js";
39
39
  import {
40
40
  BitfabError,
41
41
  DEFAULT_SERVICE_URL,
@@ -43,7 +43,7 @@ import {
43
43
  MixedTracingError,
44
44
  __version__,
45
45
  flushTraces
46
- } from "./chunk-5IQ3KQLI.js";
46
+ } from "./chunk-Q6EHVHYH.js";
47
47
  import "./chunk-BAOIRE5T.js";
48
48
  export {
49
49
  AssertionCategoriesClient,
package/dist/node.cjs CHANGED
@@ -88,7 +88,7 @@ var __version__, __packageName__;
88
88
  var init_version_generated = __esm({
89
89
  "src/version.generated.ts"() {
90
90
  "use strict";
91
- __version__ = "0.59.1";
91
+ __version__ = "0.60.1";
92
92
  __packageName__ = "@bitfab/sdk";
93
93
  }
94
94
  });
@@ -10394,9 +10394,6 @@ var Bitfab = class {
10394
10394
  return {
10395
10395
  traceId,
10396
10396
  addContext: (context) => {
10397
- if (!this.shouldRecord()) {
10398
- return Promise.resolve();
10399
- }
10400
10397
  if (typeof context !== "object" || context === null) {
10401
10398
  return Promise.resolve();
10402
10399
  }
@@ -10405,27 +10402,18 @@ var Bitfab = class {
10405
10402
  });
10406
10403
  },
10407
10404
  setMetadata: (metadata) => {
10408
- if (!this.shouldRecord()) {
10409
- return Promise.resolve();
10410
- }
10411
10405
  if (typeof metadata !== "object" || metadata === null) {
10412
10406
  return Promise.resolve();
10413
10407
  }
10414
10408
  return this.httpClient.patchTrace(traceId, { mergeMetadata: metadata });
10415
10409
  },
10416
10410
  setSessionId: (sessionId) => {
10417
- if (!this.shouldRecord()) {
10418
- return Promise.resolve();
10419
- }
10420
10411
  if (typeof sessionId !== "string" || sessionId.length === 0) {
10421
10412
  return Promise.resolve();
10422
10413
  }
10423
10414
  return this.httpClient.patchTrace(traceId, { setSessionId: sessionId });
10424
10415
  },
10425
10416
  setName: (name) => {
10426
- if (!this.shouldRecord()) {
10427
- return Promise.resolve();
10428
- }
10429
10417
  if (typeof name !== "string" || name.length === 0) {
10430
10418
  return Promise.resolve();
10431
10419
  }