@bitfab/sdk 0.64.7 → 0.64.9

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/cloudReplay.py +121 -12
  2. package/dist/{chunk-QJGDYXNC.js → chunk-5VAPDLCY.js} +32 -8
  3. package/dist/chunk-5VAPDLCY.js.map +1 -0
  4. package/dist/{chunk-54JYZXMF.js → chunk-FGGLYMZD.js} +2 -2
  5. package/dist/{chunk-54JYZXMF.js.map → chunk-FGGLYMZD.js.map} +1 -1
  6. package/dist/{chunk-MIRJGPJE.js → chunk-GGS5YCPE.js} +2 -2
  7. package/dist/{chunk-MIRJGPJE.js.map → chunk-GGS5YCPE.js.map} +1 -1
  8. package/dist/{chunk-G3KS5PSV.js → chunk-MGQ6V3CE.js} +2 -2
  9. package/dist/{chunk-GASCMFJR.js → chunk-Z3C5PXTK.js} +3 -3
  10. package/dist/{http-BBVZZ35K.js → http-7K4MGDNE.js} +2 -2
  11. package/dist/{http-LRU3UOPD.js → http-WXBCXZ33.js} +2 -2
  12. package/dist/index.cjs +28 -3
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +13 -11
  15. package/dist/index.d.ts +13 -11
  16. package/dist/index.js +3 -3
  17. package/dist/node.cjs +28 -3
  18. package/dist/node.cjs.map +1 -1
  19. package/dist/node.d.cts +1 -1
  20. package/dist/node.d.ts +1 -1
  21. package/dist/node.js +3 -3
  22. package/dist/{replay-52GEIAYO.js → replay-Q5W67C7L.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-QJGDYXNC.js.map +0 -1
  27. /package/dist/{chunk-G3KS5PSV.js.map → chunk-MGQ6V3CE.js.map} +0 -0
  28. /package/dist/{chunk-GASCMFJR.js.map → chunk-Z3C5PXTK.js.map} +0 -0
  29. /package/dist/{http-BBVZZ35K.js.map → http-7K4MGDNE.js.map} +0 -0
  30. /package/dist/{http-LRU3UOPD.js.map → http-WXBCXZ33.js.map} +0 -0
  31. /package/dist/{replay-52GEIAYO.js.map → replay-Q5W67C7L.js.map} +0 -0
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.9";
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.9";
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
@@ -27,7 +27,7 @@ import {
27
27
  getCurrentTrace,
28
28
  reseedFromRegistry,
29
29
  seedFromRegistry
30
- } from "./chunk-QJGDYXNC.js";
30
+ } from "./chunk-5VAPDLCY.js";
31
31
  import "./chunk-YWXQM6J3.js";
32
32
  import {
33
33
  BITFAB_PROGRESS_PREFIX,
@@ -36,7 +36,7 @@ import {
36
36
  ReplayError,
37
37
  reportReplayProgress,
38
38
  serializeReplayResult
39
- } from "./chunk-G3KS5PSV.js";
39
+ } from "./chunk-MGQ6V3CE.js";
40
40
  import {
41
41
  BitfabError,
42
42
  DEFAULT_SERVICE_URL,
@@ -44,7 +44,7 @@ import {
44
44
  MixedTracingError,
45
45
  __version__,
46
46
  flushTraces
47
- } from "./chunk-54JYZXMF.js";
47
+ } from "./chunk-FGGLYMZD.js";
48
48
  import "./chunk-MT36GJMW.js";
49
49
  export {
50
50
  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.64.7";
91
+ __version__ = "0.64.9";
92
92
  __packageName__ = "@bitfab/sdk";
93
93
  }
94
94
  });
@@ -7060,9 +7060,34 @@ var GradersClient = class {
7060
7060
  init_http();
7061
7061
 
7062
7062
  // src/labels.ts
7063
+ init_errors();
7063
7064
  init_http();
7064
7065
  var LABELS_PATH = "/api/sdk/traces/labels";
7065
7066
  var HUMAN_LABELS_PATH = "/api/sdk/traces/labels/human";
7067
+ function assertEveryVerdictNamesAnAssertion(updates) {
7068
+ const unscoped = updates.filter(
7069
+ (update) => !("archive" in update && update.archive === true) && (typeof update.assertionId !== "string" || update.assertionId === "")
7070
+ );
7071
+ if (unscoped.length > 0) {
7072
+ const targets = unscoped.map(
7073
+ (update) => update.traceId ?? update.originalTraceId
7074
+ );
7075
+ throw new BitfabError(
7076
+ `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.`
7077
+ );
7078
+ }
7079
+ }
7080
+ function assertEveryHumanVerdictNamesAnAssertion(updates) {
7081
+ const unscoped = updates.filter(
7082
+ (update) => typeof update.assertionId !== "string" || update.assertionId === ""
7083
+ );
7084
+ if (unscoped.length > 0) {
7085
+ const targets = unscoped.map((update) => update.traceId);
7086
+ throw new BitfabError(
7087
+ `Human verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.saveHuman and saveHumanAll.`
7088
+ );
7089
+ }
7090
+ }
7066
7091
  function labelEvidencePath(traceId, assertionId) {
7067
7092
  return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions/${encodeURIComponent(assertionId)}/evidence`;
7068
7093
  }
@@ -7075,6 +7100,7 @@ var LabelsClient = class {
7075
7100
  return outcome;
7076
7101
  }
7077
7102
  async saveAll(updates, experimentId) {
7103
+ assertEveryVerdictNamesAnAssertion(updates);
7078
7104
  const response = await this.httpClient.request(
7079
7105
  LABELS_PATH,
7080
7106
  {
@@ -7084,11 +7110,9 @@ var LabelsClient = class {
7084
7110
  );
7085
7111
  return response.labels;
7086
7112
  }
7087
- /** Withhold a verdict for a trace or replay attempt whose check did not run. */
7088
7113
  async skip(target, experimentId) {
7089
7114
  return this.save({ ...target, skip: true }, experimentId);
7090
7115
  }
7091
- /** Clear a previous verdict for a trace, replay attempt, or assertion. */
7092
7116
  async archive(target, experimentId) {
7093
7117
  return this.save({ ...target, archive: true }, experimentId);
7094
7118
  }
@@ -7097,6 +7121,7 @@ var LabelsClient = class {
7097
7121
  return outcome;
7098
7122
  }
7099
7123
  async saveHumanAll(updates) {
7124
+ assertEveryHumanVerdictNamesAnAssertion(updates);
7100
7125
  const response = await this.httpClient.request(HUMAN_LABELS_PATH, { labels: updates });
7101
7126
  return response.labels;
7102
7127
  }