bitfab 0.57.2 → 0.57.4

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
@@ -3,9 +3,9 @@ type JustificationSpan = {
3
3
  spanId: string;
4
4
  text: string;
5
5
  };
6
- /** Evidence for an assertion or a category: one entry per span relied on. */
6
+ /** Evidence for an assertion decision: one entry per span relied on. */
7
7
  type Justification = JustificationSpan[];
8
- /** Whether a person has reviewed an assertion or a category. */
8
+ /** Whether a person has reviewed an assertion decision. */
9
9
  type ApprovalState = "pending" | "approved" | "rejected";
10
10
  type Approver = {
11
11
  id: string;
@@ -839,20 +839,13 @@ type AssertionCategorySummary = {
839
839
  };
840
840
  type AssertionCategory = AssertionCategorySummary & {
841
841
  organizationId: string;
842
- /** Why this category is worth having, span by span. */
843
- justification: Justification | null;
844
842
  createdAt: string;
845
843
  updatedAt: string;
846
- } & ApprovalFields;
844
+ };
847
845
  type SaveAssertionCategoryParams = {
848
846
  id?: string;
849
847
  title: string;
850
848
  description?: string;
851
- /**
852
- * Why this category is worth having, one entry per span it rests on. Any span
853
- * in the organization may be cited. Omit on an edit to preserve it.
854
- */
855
- justification?: Justification | null;
856
849
  };
857
850
  /** Organization-scoped groupings for assertions. */
858
851
  declare class AssertionCategoriesClient {
@@ -1329,6 +1322,7 @@ type LabelVerdict = {
1329
1322
  label: boolean;
1330
1323
  annotation: string;
1331
1324
  confidence?: LabelConfidence;
1325
+ evidence?: Justification | null;
1332
1326
  } | {
1333
1327
  skip: true;
1334
1328
  } | {
@@ -1346,6 +1340,7 @@ type HumanLabelUpdate = {
1346
1340
  label: boolean;
1347
1341
  annotation: string;
1348
1342
  confidence?: LabelConfidence;
1343
+ evidence?: Justification | null;
1349
1344
  };
1350
1345
  type HumanLabelOutcome = {
1351
1346
  traceId: string;
@@ -1359,6 +1354,7 @@ type AssertionVerdict = {
1359
1354
  labelStatus: LabelStatus;
1360
1355
  label: boolean | null;
1361
1356
  annotation: string | null;
1357
+ evidence: Justification | null;
1362
1358
  confidence: LabelConfidence | null;
1363
1359
  labelSource: LabelSource;
1364
1360
  approved: boolean;
@@ -1368,6 +1364,7 @@ type TraceLabels = {
1368
1364
  labelStatus: LabelStatus;
1369
1365
  label: boolean | null;
1370
1366
  annotation: string | null;
1367
+ evidence: Justification | null;
1371
1368
  approved: boolean;
1372
1369
  passed: number;
1373
1370
  failed: number;
@@ -1386,6 +1383,8 @@ declare class LabelsClient {
1386
1383
  saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
1387
1384
  get(traceId: string): Promise<TraceLabels | null>;
1388
1385
  getAll(traceIds: string[]): Promise<TraceLabels[]>;
1386
+ /** Suggest evidence for a whole-trace or assertion label. Currently returns an empty list. */
1387
+ getLabelEvidence(traceId: string, assertionId?: string): Promise<Justification>;
1389
1388
  }
1390
1389
 
1391
1390
  type GraderLabelSource = "human" | "live_grader";
@@ -3611,7 +3610,7 @@ interface CommitRef {
3611
3610
  /**
3612
3611
  * SDK version from package.json (injected at build time)
3613
3612
  */
3614
- declare const __version__ = "0.57.2";
3613
+ declare const __version__ = "0.57.4";
3615
3614
 
3616
3615
  /**
3617
3616
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@ type JustificationSpan = {
3
3
  spanId: string;
4
4
  text: string;
5
5
  };
6
- /** Evidence for an assertion or a category: one entry per span relied on. */
6
+ /** Evidence for an assertion decision: one entry per span relied on. */
7
7
  type Justification = JustificationSpan[];
8
- /** Whether a person has reviewed an assertion or a category. */
8
+ /** Whether a person has reviewed an assertion decision. */
9
9
  type ApprovalState = "pending" | "approved" | "rejected";
10
10
  type Approver = {
11
11
  id: string;
@@ -839,20 +839,13 @@ type AssertionCategorySummary = {
839
839
  };
840
840
  type AssertionCategory = AssertionCategorySummary & {
841
841
  organizationId: string;
842
- /** Why this category is worth having, span by span. */
843
- justification: Justification | null;
844
842
  createdAt: string;
845
843
  updatedAt: string;
846
- } & ApprovalFields;
844
+ };
847
845
  type SaveAssertionCategoryParams = {
848
846
  id?: string;
849
847
  title: string;
850
848
  description?: string;
851
- /**
852
- * Why this category is worth having, one entry per span it rests on. Any span
853
- * in the organization may be cited. Omit on an edit to preserve it.
854
- */
855
- justification?: Justification | null;
856
849
  };
857
850
  /** Organization-scoped groupings for assertions. */
858
851
  declare class AssertionCategoriesClient {
@@ -1329,6 +1322,7 @@ type LabelVerdict = {
1329
1322
  label: boolean;
1330
1323
  annotation: string;
1331
1324
  confidence?: LabelConfidence;
1325
+ evidence?: Justification | null;
1332
1326
  } | {
1333
1327
  skip: true;
1334
1328
  } | {
@@ -1346,6 +1340,7 @@ type HumanLabelUpdate = {
1346
1340
  label: boolean;
1347
1341
  annotation: string;
1348
1342
  confidence?: LabelConfidence;
1343
+ evidence?: Justification | null;
1349
1344
  };
1350
1345
  type HumanLabelOutcome = {
1351
1346
  traceId: string;
@@ -1359,6 +1354,7 @@ type AssertionVerdict = {
1359
1354
  labelStatus: LabelStatus;
1360
1355
  label: boolean | null;
1361
1356
  annotation: string | null;
1357
+ evidence: Justification | null;
1362
1358
  confidence: LabelConfidence | null;
1363
1359
  labelSource: LabelSource;
1364
1360
  approved: boolean;
@@ -1368,6 +1364,7 @@ type TraceLabels = {
1368
1364
  labelStatus: LabelStatus;
1369
1365
  label: boolean | null;
1370
1366
  annotation: string | null;
1367
+ evidence: Justification | null;
1371
1368
  approved: boolean;
1372
1369
  passed: number;
1373
1370
  failed: number;
@@ -1386,6 +1383,8 @@ declare class LabelsClient {
1386
1383
  saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
1387
1384
  get(traceId: string): Promise<TraceLabels | null>;
1388
1385
  getAll(traceIds: string[]): Promise<TraceLabels[]>;
1386
+ /** Suggest evidence for a whole-trace or assertion label. Currently returns an empty list. */
1387
+ getLabelEvidence(traceId: string, assertionId?: string): Promise<Justification>;
1389
1388
  }
1390
1389
 
1391
1390
  type GraderLabelSource = "human" | "live_grader";
@@ -3611,7 +3610,7 @@ interface CommitRef {
3611
3610
  /**
3612
3611
  * SDK version from package.json (injected at build time)
3613
3612
  */
3614
- declare const __version__ = "0.57.2";
3613
+ declare const __version__ = "0.57.4";
3615
3614
 
3616
3615
  /**
3617
3616
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  getCurrentTrace,
31
31
  reseedFromRegistry,
32
32
  seedFromRegistry
33
- } from "./chunk-L3EY4NBD.js";
33
+ } from "./chunk-JRGN2HRU.js";
34
34
  import "./chunk-RCHSYWKI.js";
35
35
  import {
36
36
  BITFAB_PROGRESS_PREFIX,
@@ -39,7 +39,7 @@ import {
39
39
  ReplayError,
40
40
  reportReplayProgress,
41
41
  serializeReplayResult
42
- } from "./chunk-FFRCEMPU.js";
42
+ } from "./chunk-FWTA2X72.js";
43
43
  import {
44
44
  BitfabError,
45
45
  DEFAULT_SERVICE_URL,
@@ -47,7 +47,7 @@ import {
47
47
  MixedTracingError,
48
48
  __version__,
49
49
  flushTraces
50
- } from "./chunk-AF3KSYCS.js";
50
+ } from "./chunk-DAXBPYIY.js";
51
51
  import "./chunk-VCRFFCLY.js";
52
52
  export {
53
53
  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.57.2";
100
+ __version__ = "0.57.4";
101
101
  __packageName__ = "bitfab";
102
102
  }
103
103
  });
@@ -6001,6 +6001,7 @@ init_http();
6001
6001
  // src/labels.ts
6002
6002
  var LABELS_PATH = "/api/sdk/traces/labels";
6003
6003
  var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
6004
+ var LABEL_EVIDENCE_PATH = "/api/sdk/traces/labels/label-evidence";
6004
6005
  var LabelsClient = class {
6005
6006
  constructor(httpClient) {
6006
6007
  this.httpClient = httpClient;
@@ -6049,6 +6050,17 @@ var LabelsClient = class {
6049
6050
  );
6050
6051
  return response.labels;
6051
6052
  }
6053
+ /** Suggest evidence for a whole-trace or assertion label. Currently returns an empty list. */
6054
+ async getLabelEvidence(traceId, assertionId) {
6055
+ const query = new URLSearchParams({ traceId });
6056
+ if (assertionId !== void 0) {
6057
+ query.set("assertionId", assertionId);
6058
+ }
6059
+ const response = await this.httpClient.get(
6060
+ `${LABEL_EVIDENCE_PATH}?${query.toString()}`
6061
+ );
6062
+ return response.evidence;
6063
+ }
6052
6064
  };
6053
6065
 
6054
6066
  // src/langgraph.ts