@bitfab/sdk 0.54.13 → 0.54.14

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 (34) hide show
  1. package/dist/{chunk-WDSOB57F.js → chunk-DXBYY5RS.js} +22 -9
  2. package/dist/chunk-DXBYY5RS.js.map +1 -0
  3. package/dist/{chunk-N5T6NDR3.js → chunk-KMSJJOT6.js} +21 -9
  4. package/dist/chunk-KMSJJOT6.js.map +1 -0
  5. package/dist/{chunk-BUGCOUK6.js → chunk-RMJAAI6S.js} +37 -7
  6. package/dist/chunk-RMJAAI6S.js.map +1 -0
  7. package/dist/{chunk-M7HWCJVO.js → chunk-ROQKK6YZ.js} +9 -3
  8. package/dist/chunk-ROQKK6YZ.js.map +1 -0
  9. package/dist/{chunk-IOLVW3PT.js → chunk-V2TWHXTK.js} +28 -16
  10. package/dist/chunk-V2TWHXTK.js.map +1 -0
  11. package/dist/{http-4W2BM7GE.js → http-PNENM32G.js} +2 -2
  12. package/dist/{http-Y6UGNXSO.js → http-X5LJ4GM6.js} +2 -2
  13. package/dist/index.cjs +50 -21
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +9 -4
  16. package/dist/index.d.ts +9 -4
  17. package/dist/index.js +3 -3
  18. package/dist/node.cjs +50 -21
  19. package/dist/node.cjs.map +1 -1
  20. package/dist/node.d.cts +1 -1
  21. package/dist/node.d.ts +1 -1
  22. package/dist/node.js +3 -3
  23. package/dist/{replay-YJBLRMQD.js → replay-BRLNXOAL.js} +3 -3
  24. package/dist/replayCli.js +2 -2
  25. package/dist/seedCli.js +2 -2
  26. package/package.json +1 -1
  27. package/dist/chunk-BUGCOUK6.js.map +0 -1
  28. package/dist/chunk-IOLVW3PT.js.map +0 -1
  29. package/dist/chunk-M7HWCJVO.js.map +0 -1
  30. package/dist/chunk-N5T6NDR3.js.map +0 -1
  31. package/dist/chunk-WDSOB57F.js.map +0 -1
  32. /package/dist/{http-4W2BM7GE.js.map → http-PNENM32G.js.map} +0 -0
  33. /package/dist/{http-Y6UGNXSO.js.map → http-X5LJ4GM6.js.map} +0 -0
  34. /package/dist/{replay-YJBLRMQD.js.map → replay-BRLNXOAL.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -442,7 +442,7 @@ declare class HttpClient {
442
442
  private closing;
443
443
  externalSpanTransform: ((payload: Record<string, unknown>, submit: SimulationPlanSubmit) => void) | undefined;
444
444
  externalTraceTransform: ((payload: Record<string, unknown>, submit: SimulationPlanSubmit) => void) | undefined;
445
- releaseHeldExternalSpans: ((timeoutMs: number) => Promise<void>) | undefined;
445
+ releaseHeldExternalSpans: ((timeoutMs: number) => Promise<boolean> | Promise<void>) | undefined;
446
446
  stopSimulationPlan: (() => void) | undefined;
447
447
  constructor(config: HttpClientConfig);
448
448
  /**
@@ -1378,6 +1378,10 @@ declare class LabelsClient {
1378
1378
  constructor(httpClient: HttpClient);
1379
1379
  save(update: LabelUpdate, testRunId?: string): Promise<LabelOutcome>;
1380
1380
  saveAll(updates: LabelUpdate[], testRunId?: string): Promise<LabelOutcome[]>;
1381
+ /** Withhold a verdict for a trace or replay attempt whose check did not run. */
1382
+ skip(target: LabelTarget, testRunId?: string): Promise<LabelOutcome>;
1383
+ /** Clear a previous verdict for a trace, replay attempt, or assertion. */
1384
+ archive(target: LabelTarget, testRunId?: string): Promise<LabelOutcome>;
1381
1385
  saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
1382
1386
  saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
1383
1387
  get(traceId: string): Promise<TraceLabels | null>;
@@ -1718,7 +1722,7 @@ interface ReplayOptions {
1718
1722
  traceIds?: string[];
1719
1723
  /** Optional display name for the resulting experiment/test run. */
1720
1724
  name?: string;
1721
- /** Maximum number of items to process in parallel. Set to 1 for sequential. Default 10. */
1725
+ /** Positive integer limiting parallel items. Set to 1 for sequential. Default 10. */
1722
1726
  maxConcurrency?: number;
1723
1727
  /**
1724
1728
  * Description of the code change being tested in this replay. Stored on
@@ -1939,6 +1943,7 @@ interface ReplayProgressItem {
1939
1943
  originalDurationMs?: number | null;
1940
1944
  originalTokens?: TokenUsage | null;
1941
1945
  originalModel?: string | null;
1946
+ ingestionType?: TraceIngestionType;
1942
1947
  /** Always null here: the replayed run's usage is only known at completion. */
1943
1948
  tokens?: TokenUsage | null;
1944
1949
  /** @deprecated renamed to `originalModel`. */
@@ -3601,7 +3606,7 @@ interface CommitRef {
3601
3606
  /**
3602
3607
  * SDK version from package.json (injected at build time)
3603
3608
  */
3604
- declare const __version__ = "0.54.13";
3609
+ declare const __version__ = "0.54.14";
3605
3610
 
3606
3611
  /**
3607
3612
  * Constants for the Bitfab SDK.
@@ -3740,4 +3745,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
3740
3745
  run?: boolean;
3741
3746
  }): Promise<SeedResult>;
3742
3747
 
3743
- 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 AssertionVerdict, 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 GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, 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 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 TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, 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 };
3748
+ 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 AssertionVerdict, 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 GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, 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, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, 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 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 TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, 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
@@ -442,7 +442,7 @@ declare class HttpClient {
442
442
  private closing;
443
443
  externalSpanTransform: ((payload: Record<string, unknown>, submit: SimulationPlanSubmit) => void) | undefined;
444
444
  externalTraceTransform: ((payload: Record<string, unknown>, submit: SimulationPlanSubmit) => void) | undefined;
445
- releaseHeldExternalSpans: ((timeoutMs: number) => Promise<void>) | undefined;
445
+ releaseHeldExternalSpans: ((timeoutMs: number) => Promise<boolean> | Promise<void>) | undefined;
446
446
  stopSimulationPlan: (() => void) | undefined;
447
447
  constructor(config: HttpClientConfig);
448
448
  /**
@@ -1378,6 +1378,10 @@ declare class LabelsClient {
1378
1378
  constructor(httpClient: HttpClient);
1379
1379
  save(update: LabelUpdate, testRunId?: string): Promise<LabelOutcome>;
1380
1380
  saveAll(updates: LabelUpdate[], testRunId?: string): Promise<LabelOutcome[]>;
1381
+ /** Withhold a verdict for a trace or replay attempt whose check did not run. */
1382
+ skip(target: LabelTarget, testRunId?: string): Promise<LabelOutcome>;
1383
+ /** Clear a previous verdict for a trace, replay attempt, or assertion. */
1384
+ archive(target: LabelTarget, testRunId?: string): Promise<LabelOutcome>;
1381
1385
  saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
1382
1386
  saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
1383
1387
  get(traceId: string): Promise<TraceLabels | null>;
@@ -1718,7 +1722,7 @@ interface ReplayOptions {
1718
1722
  traceIds?: string[];
1719
1723
  /** Optional display name for the resulting experiment/test run. */
1720
1724
  name?: string;
1721
- /** Maximum number of items to process in parallel. Set to 1 for sequential. Default 10. */
1725
+ /** Positive integer limiting parallel items. Set to 1 for sequential. Default 10. */
1722
1726
  maxConcurrency?: number;
1723
1727
  /**
1724
1728
  * Description of the code change being tested in this replay. Stored on
@@ -1939,6 +1943,7 @@ interface ReplayProgressItem {
1939
1943
  originalDurationMs?: number | null;
1940
1944
  originalTokens?: TokenUsage | null;
1941
1945
  originalModel?: string | null;
1946
+ ingestionType?: TraceIngestionType;
1942
1947
  /** Always null here: the replayed run's usage is only known at completion. */
1943
1948
  tokens?: TokenUsage | null;
1944
1949
  /** @deprecated renamed to `originalModel`. */
@@ -3601,7 +3606,7 @@ interface CommitRef {
3601
3606
  /**
3602
3607
  * SDK version from package.json (injected at build time)
3603
3608
  */
3604
- declare const __version__ = "0.54.13";
3609
+ declare const __version__ = "0.54.14";
3605
3610
 
3606
3611
  /**
3607
3612
  * Constants for the Bitfab SDK.
@@ -3740,4 +3745,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
3740
3745
  run?: boolean;
3741
3746
  }): Promise<SeedResult>;
3742
3747
 
3743
- 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 AssertionVerdict, 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 GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, 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 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 TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, 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 };
3748
+ 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 AssertionVerdict, 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 GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, type GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, 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, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, 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 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 TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, 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
@@ -21,7 +21,7 @@ import {
21
21
  getCurrentTrace,
22
22
  reseedFromRegistry,
23
23
  seedFromRegistry
24
- } from "./chunk-IOLVW3PT.js";
24
+ } from "./chunk-V2TWHXTK.js";
25
25
  import "./chunk-RCHSYWKI.js";
26
26
  import {
27
27
  BITFAB_PROGRESS_PREFIX,
@@ -30,7 +30,7 @@ import {
30
30
  ReplayError,
31
31
  reportReplayProgress,
32
32
  serializeReplayResult
33
- } from "./chunk-M7HWCJVO.js";
33
+ } from "./chunk-ROQKK6YZ.js";
34
34
  import {
35
35
  BitfabError,
36
36
  DEFAULT_SERVICE_URL,
@@ -38,7 +38,7 @@ import {
38
38
  MixedTracingError,
39
39
  __version__,
40
40
  flushTraces
41
- } from "./chunk-WDSOB57F.js";
41
+ } from "./chunk-DXBYY5RS.js";
42
42
  import "./chunk-VCRFFCLY.js";
43
43
  export {
44
44
  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.54.13";
91
+ __version__ = "0.54.14";
92
92
  __packageName__ = "@bitfab/sdk";
93
93
  }
94
94
  });
@@ -1263,6 +1263,7 @@ var init_simulationPlan = __esm({
1263
1263
  }
1264
1264
  this.warnNeverLoaded();
1265
1265
  this.warnDropped();
1266
+ return this.held.length === 0;
1266
1267
  }
1267
1268
  waitForFirstLoad(timeoutMs) {
1268
1269
  const firstLoad = this.firstLoad();
@@ -2085,9 +2086,14 @@ __export(http_exports, {
2085
2086
  });
2086
2087
  async function releaseHeldExternalSpans(timeoutMs) {
2087
2088
  const deadline = Date.now() + Math.max(timeoutMs, 0);
2089
+ let released = true;
2088
2090
  for (const client of [...liveHttpClients]) {
2089
- await client.releaseHeldExternalSpans?.(Math.max(0, deadline - Date.now()));
2091
+ const result = await client.releaseHeldExternalSpans?.(
2092
+ Math.max(0, deadline - Date.now())
2093
+ );
2094
+ released = result !== false && released;
2090
2095
  }
2096
+ return released;
2091
2097
  }
2092
2098
  function stopSimulationPlans() {
2093
2099
  for (const client of [...liveHttpClients]) {
@@ -2104,14 +2110,15 @@ function awaitOnExit(promise) {
2104
2110
  }
2105
2111
  async function flushTraces(timeoutMs = 5e3) {
2106
2112
  const deadline = Date.now() + Math.max(timeoutMs, 0);
2107
- await releaseHeldExternalSpans(planWaitSliceMs(timeoutMs));
2113
+ const released = await releaseHeldExternalSpans(planWaitSliceMs(timeoutMs));
2108
2114
  const requestsFlushed = await awaitPendingRequests(
2109
2115
  Math.max(0, deadline - Date.now())
2110
2116
  );
2117
+ const releasedAfterDeferred = await releaseHeldExternalSpans(0);
2111
2118
  const transportsFlushed = await flushTraceTransports(
2112
2119
  Math.max(0, deadline - Date.now())
2113
2120
  );
2114
- return requestsFlushed && transportsFlushed;
2121
+ return released && releasedAfterDeferred && requestsFlushed && transportsFlushed;
2115
2122
  }
2116
2123
  async function awaitPendingRequests(timeoutMs = DEFAULT_LIFECYCLE_TIMEOUT_MS2) {
2117
2124
  await replayContextReady.catch(() => {
@@ -2521,13 +2528,17 @@ var init_http = __esm({
2521
2528
  */
2522
2529
  async settleDeferredWork(timeoutMs = DEFAULT_LIFECYCLE_TIMEOUT_MS2) {
2523
2530
  const deadline = Date.now() + Math.max(timeoutMs, 0);
2524
- await this.releaseHeldExternalSpans?.(planWaitSliceMs(timeoutMs));
2531
+ const released = await this.releaseHeldExternalSpans?.(
2532
+ planWaitSliceMs(timeoutMs)
2533
+ );
2525
2534
  await replayContextReady.catch(() => {
2526
2535
  });
2527
- return waitForPromises(
2536
+ const settled2 = await waitForPromises(
2528
2537
  Array.from(this.deferredWork),
2529
2538
  Math.max(0, deadline - Date.now())
2530
2539
  );
2540
+ const releasedAfterDeferred = await this.releaseHeldExternalSpans?.(0);
2541
+ return released !== false && releasedAfterDeferred !== false && settled2;
2531
2542
  }
2532
2543
  /**
2533
2544
  * Wait for spans queued by this client to be delivered, within one deadline.
@@ -2552,7 +2563,9 @@ var init_http = __esm({
2552
2563
  }
2553
2564
  const deadline = Date.now() + Math.max(timeoutMs, 0);
2554
2565
  this.closing = (async () => {
2555
- await this.releaseHeldExternalSpans?.(planWaitSliceMs(timeoutMs));
2566
+ const released = await this.releaseHeldExternalSpans?.(
2567
+ planWaitSliceMs(timeoutMs)
2568
+ );
2556
2569
  this.stopSimulationPlan?.();
2557
2570
  this.externalSpanTransform = void 0;
2558
2571
  this.externalTraceTransform = void 0;
@@ -2566,7 +2579,7 @@ var init_http = __esm({
2566
2579
  const transport = this.traceTransport;
2567
2580
  this.traceTransport = void 0;
2568
2581
  const shutdownOk = await transport?.shutdown(Math.max(0, deadline - Date.now())) ?? true;
2569
- return settled2 && shutdownOk;
2582
+ return released !== false && settled2 && shutdownOk;
2570
2583
  })();
2571
2584
  return this.closing;
2572
2585
  }
@@ -4000,6 +4013,12 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4000
4013
  }
4001
4014
  }
4002
4015
  const attempts = resolveAttempts(options?.attempts);
4016
+ const maxConcurrency = options?.maxConcurrency ?? 10;
4017
+ if (!Number.isInteger(maxConcurrency) || maxConcurrency < 1) {
4018
+ throw new BitfabError(
4019
+ `maxConcurrency must be a positive integer (got ${maxConcurrency}).`
4020
+ );
4021
+ }
4003
4022
  await replayContextReady;
4004
4023
  let codeChangeDescription = options?.codeChangeDescription;
4005
4024
  let codeChangeFiles = options?.codeChangeFiles;
@@ -4046,7 +4065,6 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4046
4065
  }
4047
4066
  }
4048
4067
  const mockStrategy = options?.mock ?? "marked";
4049
- const maxConcurrency = options?.maxConcurrency ?? 10;
4050
4068
  const fullTestRunUrl = `${serviceUrl}${testRunUrl}`;
4051
4069
  const resolvedOverrides = [
4052
4070
  ...normalizeMockOverrides(options?.mockOverride),
@@ -4143,6 +4161,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
4143
4161
  originalDurationMs: item.originalDurationMs,
4144
4162
  originalTokens: item.originalTokens,
4145
4163
  originalModel: item.originalModel,
4164
+ ingestionType: item.ingestionType,
4146
4165
  tokens: item.tokens,
4147
4166
  model: item.model,
4148
4167
  dbSnapshotRef: item.dbSnapshotRef,
@@ -5983,6 +6002,14 @@ var LabelsClient = class {
5983
6002
  );
5984
6003
  return response.labels;
5985
6004
  }
6005
+ /** Withhold a verdict for a trace or replay attempt whose check did not run. */
6006
+ async skip(target, testRunId) {
6007
+ return this.save({ ...target, skip: true }, testRunId);
6008
+ }
6009
+ /** Clear a previous verdict for a trace, replay attempt, or assertion. */
6010
+ async archive(target, testRunId) {
6011
+ return this.save({ ...target, archive: true }, testRunId);
6012
+ }
5986
6013
  async saveHuman(update) {
5987
6014
  const [outcome] = await this.saveHumanAll([update]);
5988
6015
  return outcome;
@@ -6901,6 +6928,15 @@ var BitfabLangGraphIntegration = class {
6901
6928
  // src/client.ts
6902
6929
  init_mockOverride();
6903
6930
 
6931
+ // src/streamFinalizationError.ts
6932
+ var StreamFinalizationError = class extends Error {
6933
+ constructor(message, output) {
6934
+ super(message);
6935
+ this.output = output;
6936
+ this.name = "StreamFinalizationError";
6937
+ }
6938
+ };
6939
+
6904
6940
  // src/openaiAgentSdk.ts
6905
6941
  var BitfabOpenAIAgentHandler = class {
6906
6942
  constructor(config) {
@@ -6940,7 +6976,11 @@ var BitfabOpenAIAgentHandler = class {
6940
6976
  if (isStreaming && res?.completed) {
6941
6977
  try {
6942
6978
  await res.completed;
6943
- } catch {
6979
+ } catch (error) {
6980
+ throw new StreamFinalizationError(
6981
+ error instanceof Error ? error.message : String(error),
6982
+ res.finalOutput
6983
+ );
6944
6984
  }
6945
6985
  }
6946
6986
  return res?.finalOutput;
@@ -7698,17 +7738,6 @@ function runWithSeedContext(ctx, fn) {
7698
7738
  init_serialize();
7699
7739
  init_simulationPlan();
7700
7740
  init_spanOrigin();
7701
-
7702
- // src/streamFinalizationError.ts
7703
- var StreamFinalizationError = class extends Error {
7704
- constructor(message, output) {
7705
- super(message);
7706
- this.output = output;
7707
- this.name = "StreamFinalizationError";
7708
- }
7709
- };
7710
-
7711
- // src/client.ts
7712
7741
  init_traceMetadata();
7713
7742
 
7714
7743
  // src/traces.ts