bitfab 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
@@ -35,7 +35,7 @@ import {
35
35
  getCurrentTrace,
36
36
  reseedFromRegistry,
37
37
  seedFromRegistry
38
- } from "./chunk-NVOQ7YMI.js";
38
+ } from "./chunk-EKTLX7JA.js";
39
39
  import "./chunk-5DNB7EN7.js";
40
40
  import {
41
41
  BITFAB_PROGRESS_PREFIX,
@@ -44,7 +44,7 @@ import {
44
44
  ReplayError,
45
45
  reportReplayProgress,
46
46
  serializeReplayResult
47
- } from "./chunk-3D5EEY47.js";
47
+ } from "./chunk-GXLULQMK.js";
48
48
  import {
49
49
  BitfabError,
50
50
  DEFAULT_SERVICE_URL,
@@ -52,7 +52,7 @@ import {
52
52
  MixedTracingError,
53
53
  __version__,
54
54
  flushTraces
55
- } from "./chunk-GJCZABUC.js";
55
+ } from "./chunk-BIDUQ6J7.js";
56
56
  import "./chunk-BAOIRE5T.js";
57
57
  export {
58
58
  AssertionCategoriesClient,
package/dist/node.cjs CHANGED
@@ -97,7 +97,7 @@ var __version__, __packageName__;
97
97
  var init_version_generated = __esm({
98
98
  "src/version.generated.ts"() {
99
99
  "use strict";
100
- __version__ = "0.59.1";
100
+ __version__ = "0.60.1";
101
101
  __packageName__ = "bitfab";
102
102
  }
103
103
  });
@@ -10403,9 +10403,6 @@ var Bitfab = class {
10403
10403
  return {
10404
10404
  traceId,
10405
10405
  addContext: (context) => {
10406
- if (!this.shouldRecord()) {
10407
- return Promise.resolve();
10408
- }
10409
10406
  if (typeof context !== "object" || context === null) {
10410
10407
  return Promise.resolve();
10411
10408
  }
@@ -10414,27 +10411,18 @@ var Bitfab = class {
10414
10411
  });
10415
10412
  },
10416
10413
  setMetadata: (metadata) => {
10417
- if (!this.shouldRecord()) {
10418
- return Promise.resolve();
10419
- }
10420
10414
  if (typeof metadata !== "object" || metadata === null) {
10421
10415
  return Promise.resolve();
10422
10416
  }
10423
10417
  return this.httpClient.patchTrace(traceId, { mergeMetadata: metadata });
10424
10418
  },
10425
10419
  setSessionId: (sessionId) => {
10426
- if (!this.shouldRecord()) {
10427
- return Promise.resolve();
10428
- }
10429
10420
  if (typeof sessionId !== "string" || sessionId.length === 0) {
10430
10421
  return Promise.resolve();
10431
10422
  }
10432
10423
  return this.httpClient.patchTrace(traceId, { setSessionId: sessionId });
10433
10424
  },
10434
10425
  setName: (name) => {
10435
- if (!this.shouldRecord()) {
10436
- return Promise.resolve();
10437
- }
10438
10426
  if (typeof name !== "string" || name.length === 0) {
10439
10427
  return Promise.resolve();
10440
10428
  }