bitfab 0.64.7 → 0.64.8

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
@@ -1672,7 +1672,7 @@ type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
1672
1672
  type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
1673
1673
  type LabelStatus = "labeled" | "skipped" | "unlabeled";
1674
1674
  type LabelSource = "human" | "agent";
1675
- type LabelTarget = ({
1675
+ type LabelAddress = {
1676
1676
  traceId: string;
1677
1677
  originalTraceId?: never;
1678
1678
  attempt?: never;
@@ -1680,7 +1680,11 @@ type LabelTarget = ({
1680
1680
  originalTraceId: string;
1681
1681
  attempt?: number;
1682
1682
  traceId?: never;
1683
- }) & {
1683
+ };
1684
+ type LabelTarget = LabelAddress & {
1685
+ assertionId: string;
1686
+ };
1687
+ type ArchiveLabelTarget = LabelAddress & {
1684
1688
  assertionId?: string;
1685
1689
  };
1686
1690
  type LabelVerdict = {
@@ -1691,10 +1695,10 @@ type LabelVerdict = {
1691
1695
  } | {
1692
1696
  skip: true;
1693
1697
  annotation?: string;
1694
- } | {
1695
- archive: true;
1696
1698
  };
1697
- type LabelUpdate = LabelTarget & LabelVerdict;
1699
+ type LabelUpdate = (LabelTarget & LabelVerdict) | (ArchiveLabelTarget & {
1700
+ archive: true;
1701
+ });
1698
1702
  type LabelOutcome = {
1699
1703
  key: string;
1700
1704
  traceId: string;
@@ -1702,7 +1706,7 @@ type LabelOutcome = {
1702
1706
  };
1703
1707
  type HumanLabelUpdate = {
1704
1708
  traceId: string;
1705
- assertionId?: string;
1709
+ assertionId: string;
1706
1710
  label: boolean;
1707
1711
  annotation: string;
1708
1712
  confidence?: LabelConfidence;
@@ -1741,12 +1745,10 @@ declare class LabelsClient {
1741
1745
  constructor(httpClient: HttpClient);
1742
1746
  save(update: LabelUpdate, experimentId?: string): Promise<LabelOutcome>;
1743
1747
  saveAll(updates: LabelUpdate[], experimentId?: string): Promise<LabelOutcome[]>;
1744
- /** Withhold a verdict for a trace or replay attempt whose check did not run. */
1745
1748
  skip(target: LabelTarget & {
1746
1749
  annotation?: string;
1747
1750
  }, experimentId?: string): Promise<LabelOutcome>;
1748
- /** Clear a previous verdict for a trace, replay attempt, or assertion. */
1749
- archive(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
1751
+ archive(target: ArchiveLabelTarget, experimentId?: string): Promise<LabelOutcome>;
1750
1752
  saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
1751
1753
  saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
1752
1754
  get(traceId: string): Promise<TraceLabels | null>;
@@ -3992,7 +3994,7 @@ interface CommitRef {
3992
3994
  /**
3993
3995
  * SDK version from package.json (injected at build time)
3994
3996
  */
3995
- declare const __version__ = "0.64.7";
3997
+ declare const __version__ = "0.64.8";
3996
3998
 
3997
3999
  /**
3998
4000
  * Constants for the Bitfab SDK.
@@ -4131,4 +4133,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
4131
4133
  run?: boolean;
4132
4134
  }): Promise<SeedResult>;
4133
4135
 
4134
- export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
4136
+ export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
package/dist/index.d.ts CHANGED
@@ -1672,7 +1672,7 @@ type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
1672
1672
  type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
1673
1673
  type LabelStatus = "labeled" | "skipped" | "unlabeled";
1674
1674
  type LabelSource = "human" | "agent";
1675
- type LabelTarget = ({
1675
+ type LabelAddress = {
1676
1676
  traceId: string;
1677
1677
  originalTraceId?: never;
1678
1678
  attempt?: never;
@@ -1680,7 +1680,11 @@ type LabelTarget = ({
1680
1680
  originalTraceId: string;
1681
1681
  attempt?: number;
1682
1682
  traceId?: never;
1683
- }) & {
1683
+ };
1684
+ type LabelTarget = LabelAddress & {
1685
+ assertionId: string;
1686
+ };
1687
+ type ArchiveLabelTarget = LabelAddress & {
1684
1688
  assertionId?: string;
1685
1689
  };
1686
1690
  type LabelVerdict = {
@@ -1691,10 +1695,10 @@ type LabelVerdict = {
1691
1695
  } | {
1692
1696
  skip: true;
1693
1697
  annotation?: string;
1694
- } | {
1695
- archive: true;
1696
1698
  };
1697
- type LabelUpdate = LabelTarget & LabelVerdict;
1699
+ type LabelUpdate = (LabelTarget & LabelVerdict) | (ArchiveLabelTarget & {
1700
+ archive: true;
1701
+ });
1698
1702
  type LabelOutcome = {
1699
1703
  key: string;
1700
1704
  traceId: string;
@@ -1702,7 +1706,7 @@ type LabelOutcome = {
1702
1706
  };
1703
1707
  type HumanLabelUpdate = {
1704
1708
  traceId: string;
1705
- assertionId?: string;
1709
+ assertionId: string;
1706
1710
  label: boolean;
1707
1711
  annotation: string;
1708
1712
  confidence?: LabelConfidence;
@@ -1741,12 +1745,10 @@ declare class LabelsClient {
1741
1745
  constructor(httpClient: HttpClient);
1742
1746
  save(update: LabelUpdate, experimentId?: string): Promise<LabelOutcome>;
1743
1747
  saveAll(updates: LabelUpdate[], experimentId?: string): Promise<LabelOutcome[]>;
1744
- /** Withhold a verdict for a trace or replay attempt whose check did not run. */
1745
1748
  skip(target: LabelTarget & {
1746
1749
  annotation?: string;
1747
1750
  }, experimentId?: string): Promise<LabelOutcome>;
1748
- /** Clear a previous verdict for a trace, replay attempt, or assertion. */
1749
- archive(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
1751
+ archive(target: ArchiveLabelTarget, experimentId?: string): Promise<LabelOutcome>;
1750
1752
  saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
1751
1753
  saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
1752
1754
  get(traceId: string): Promise<TraceLabels | null>;
@@ -3992,7 +3994,7 @@ interface CommitRef {
3992
3994
  /**
3993
3995
  * SDK version from package.json (injected at build time)
3994
3996
  */
3995
- declare const __version__ = "0.64.7";
3997
+ declare const __version__ = "0.64.8";
3996
3998
 
3997
3999
  /**
3998
4000
  * Constants for the Bitfab SDK.
@@ -4131,4 +4133,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
4131
4133
  run?: boolean;
4132
4134
  }): Promise<SeedResult>;
4133
4135
 
4134
- export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
4136
+ export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  getCurrentTrace,
37
37
  reseedFromRegistry,
38
38
  seedFromRegistry
39
- } from "./chunk-DIOPUOV3.js";
39
+ } from "./chunk-2UDEQITO.js";
40
40
  import "./chunk-YWXQM6J3.js";
41
41
  import {
42
42
  BITFAB_PROGRESS_PREFIX,
@@ -45,7 +45,7 @@ import {
45
45
  ReplayError,
46
46
  reportReplayProgress,
47
47
  serializeReplayResult
48
- } from "./chunk-SZVZU3F6.js";
48
+ } from "./chunk-2U4Y5FHT.js";
49
49
  import {
50
50
  BitfabError,
51
51
  DEFAULT_SERVICE_URL,
@@ -53,7 +53,7 @@ import {
53
53
  MixedTracingError,
54
54
  __version__,
55
55
  flushTraces
56
- } from "./chunk-TAGNRN6F.js";
56
+ } from "./chunk-YGDXDDTX.js";
57
57
  import "./chunk-MT36GJMW.js";
58
58
  export {
59
59
  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.64.7";
100
+ __version__ = "0.64.8";
101
101
  __packageName__ = "bitfab";
102
102
  }
103
103
  });
@@ -7069,9 +7069,34 @@ var GradersClient = class {
7069
7069
  init_http();
7070
7070
 
7071
7071
  // src/labels.ts
7072
+ init_errors();
7072
7073
  init_http();
7073
7074
  var LABELS_PATH = "/api/sdk/traces/labels";
7074
7075
  var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
7076
+ function assertEveryVerdictNamesAnAssertion(updates) {
7077
+ const unscoped = updates.filter(
7078
+ (update) => !("archive" in update && update.archive === true) && (typeof update.assertionId !== "string" || update.assertionId === "")
7079
+ );
7080
+ if (unscoped.length > 0) {
7081
+ const targets = unscoped.map(
7082
+ (update) => update.traceId ?? update.originalTraceId
7083
+ );
7084
+ throw new BitfabError(
7085
+ `Agent verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.save, saveAll, and skip. Only archive may omit it, to clear an old whole-trace verdict.`
7086
+ );
7087
+ }
7088
+ }
7089
+ function assertEveryHumanVerdictNamesAnAssertion(updates) {
7090
+ const unscoped = updates.filter(
7091
+ (update) => typeof update.assertionId !== "string" || update.assertionId === ""
7092
+ );
7093
+ if (unscoped.length > 0) {
7094
+ const targets = unscoped.map((update) => update.traceId);
7095
+ throw new BitfabError(
7096
+ `Human verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.saveHuman and saveHumanAll.`
7097
+ );
7098
+ }
7099
+ }
7075
7100
  function labelEvidencePath(traceId, assertionId) {
7076
7101
  return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions/${encodeURIComponent(assertionId)}/evidence`;
7077
7102
  }
@@ -7084,6 +7109,7 @@ var LabelsClient = class {
7084
7109
  return outcome;
7085
7110
  }
7086
7111
  async saveAll(updates, experimentId) {
7112
+ assertEveryVerdictNamesAnAssertion(updates);
7087
7113
  const response = await this.httpClient.request(
7088
7114
  LABELS_PATH,
7089
7115
  {
@@ -7093,11 +7119,9 @@ var LabelsClient = class {
7093
7119
  );
7094
7120
  return response.labels;
7095
7121
  }
7096
- /** Withhold a verdict for a trace or replay attempt whose check did not run. */
7097
7122
  async skip(target, experimentId) {
7098
7123
  return this.save({ ...target, skip: true }, experimentId);
7099
7124
  }
7100
- /** Clear a previous verdict for a trace, replay attempt, or assertion. */
7101
7125
  async archive(target, experimentId) {
7102
7126
  return this.save({ ...target, archive: true }, experimentId);
7103
7127
  }
@@ -7106,6 +7130,7 @@ var LabelsClient = class {
7106
7130
  return outcome;
7107
7131
  }
7108
7132
  async saveHumanAll(updates) {
7133
+ assertEveryHumanVerdictNamesAnAssertion(updates);
7109
7134
  const response = await this.httpClient.request(HUMAN_LABELS_PATH, { labels: updates });
7110
7135
  return response.labels;
7111
7136
  }