bitfab 0.44.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -647,6 +647,32 @@ interface TokenUsage {
647
647
  cached: number | null;
648
648
  total: number | null;
649
649
  }
650
+ interface TraceOutlineSpanError {
651
+ source: string;
652
+ error: string;
653
+ step?: string;
654
+ }
655
+ interface TraceOutlineSpan {
656
+ spanId: string;
657
+ name: string | null;
658
+ type: string;
659
+ traceFunctionKey: string | null;
660
+ durationMs: number | null;
661
+ tokens: TokenUsage | null;
662
+ model: string | null;
663
+ errors: TraceOutlineSpanError[] | null;
664
+ mocked: boolean;
665
+ children: TraceOutlineSpan[];
666
+ }
667
+ interface TraceOutline {
668
+ traceId: string;
669
+ name: string | null;
670
+ status: string;
671
+ traceFunctionKey: string | null;
672
+ durationMs: number | null;
673
+ spanCount: number;
674
+ spans: TraceOutlineSpan[];
675
+ }
650
676
  /**
651
677
  * Describes a single file edited as part of a code change.
652
678
  *
@@ -746,6 +772,8 @@ interface CompleteReplayResponse {
746
772
  * `ReplayItem.tokens`. Absent on servers that predate this field.
747
773
  */
748
774
  tokens?: Record<string, TokenUsage | null>;
775
+ traceOutlines?: Record<string, TraceOutline>;
776
+ originalTraceOutlines?: Record<string, TraceOutline>;
749
777
  /**
750
778
  * Number of traces the server has persisted for this test run at
751
779
  * completion time. Lets the SDK distinguish "uploads failed" from
@@ -1693,6 +1721,8 @@ interface ReplayProgressItem {
1693
1721
  model?: string | null;
1694
1722
  dbSnapshotRef?: DbSnapshotRef | null;
1695
1723
  dbBranchTimings?: DbBranchTimings | null;
1724
+ traceOutline?: TraceOutline | null;
1725
+ originalTraceOutline?: TraceOutline | null;
1696
1726
  }
1697
1727
  /**
1698
1728
  * @deprecated Use {@link ReplayItemFinishProgress}. This legacy shape also
@@ -1844,6 +1874,8 @@ interface ReplayItem<T> {
1844
1874
  * no snapshot ref, or against a server that predates timings.
1845
1875
  */
1846
1876
  dbBranchTimings: DbBranchTimings | null;
1877
+ traceOutline: TraceOutline | null;
1878
+ originalTraceOutline: TraceOutline | null;
1847
1879
  }
1848
1880
 
1849
1881
  interface ReplayResult<T> {
@@ -3082,7 +3114,7 @@ declare class BitfabFunction {
3082
3114
  /**
3083
3115
  * SDK version from package.json (injected at build time)
3084
3116
  */
3085
- declare const __version__ = "0.44.0";
3117
+ declare const __version__ = "0.44.1";
3086
3118
 
3087
3119
  /**
3088
3120
  * Constants for the Bitfab SDK.
@@ -3212,4 +3244,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
3212
3244
  run?: boolean;
3213
3245
  }): Promise<SeedResult>;
3214
3246
 
3215
- export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, 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 GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, HttpClient, 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, SUPPORTED_PROVIDERS, 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 TraceIngestionType, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
3247
+ export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, 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 GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, HttpClient, 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, SUPPORTED_PROVIDERS, 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 TraceIngestionType, type TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
package/dist/index.d.ts CHANGED
@@ -647,6 +647,32 @@ interface TokenUsage {
647
647
  cached: number | null;
648
648
  total: number | null;
649
649
  }
650
+ interface TraceOutlineSpanError {
651
+ source: string;
652
+ error: string;
653
+ step?: string;
654
+ }
655
+ interface TraceOutlineSpan {
656
+ spanId: string;
657
+ name: string | null;
658
+ type: string;
659
+ traceFunctionKey: string | null;
660
+ durationMs: number | null;
661
+ tokens: TokenUsage | null;
662
+ model: string | null;
663
+ errors: TraceOutlineSpanError[] | null;
664
+ mocked: boolean;
665
+ children: TraceOutlineSpan[];
666
+ }
667
+ interface TraceOutline {
668
+ traceId: string;
669
+ name: string | null;
670
+ status: string;
671
+ traceFunctionKey: string | null;
672
+ durationMs: number | null;
673
+ spanCount: number;
674
+ spans: TraceOutlineSpan[];
675
+ }
650
676
  /**
651
677
  * Describes a single file edited as part of a code change.
652
678
  *
@@ -746,6 +772,8 @@ interface CompleteReplayResponse {
746
772
  * `ReplayItem.tokens`. Absent on servers that predate this field.
747
773
  */
748
774
  tokens?: Record<string, TokenUsage | null>;
775
+ traceOutlines?: Record<string, TraceOutline>;
776
+ originalTraceOutlines?: Record<string, TraceOutline>;
749
777
  /**
750
778
  * Number of traces the server has persisted for this test run at
751
779
  * completion time. Lets the SDK distinguish "uploads failed" from
@@ -1693,6 +1721,8 @@ interface ReplayProgressItem {
1693
1721
  model?: string | null;
1694
1722
  dbSnapshotRef?: DbSnapshotRef | null;
1695
1723
  dbBranchTimings?: DbBranchTimings | null;
1724
+ traceOutline?: TraceOutline | null;
1725
+ originalTraceOutline?: TraceOutline | null;
1696
1726
  }
1697
1727
  /**
1698
1728
  * @deprecated Use {@link ReplayItemFinishProgress}. This legacy shape also
@@ -1844,6 +1874,8 @@ interface ReplayItem<T> {
1844
1874
  * no snapshot ref, or against a server that predates timings.
1845
1875
  */
1846
1876
  dbBranchTimings: DbBranchTimings | null;
1877
+ traceOutline: TraceOutline | null;
1878
+ originalTraceOutline: TraceOutline | null;
1847
1879
  }
1848
1880
 
1849
1881
  interface ReplayResult<T> {
@@ -3082,7 +3114,7 @@ declare class BitfabFunction {
3082
3114
  /**
3083
3115
  * SDK version from package.json (injected at build time)
3084
3116
  */
3085
- declare const __version__ = "0.44.0";
3117
+ declare const __version__ = "0.44.1";
3086
3118
 
3087
3119
  /**
3088
3120
  * Constants for the Bitfab SDK.
@@ -3212,4 +3244,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
3212
3244
  run?: boolean;
3213
3245
  }): Promise<SeedResult>;
3214
3246
 
3215
- export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, 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 GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, HttpClient, 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, SUPPORTED_PROVIDERS, 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 TraceIngestionType, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
3247
+ export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, 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 GraderRerun, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, HttpClient, 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, SUPPORTED_PROVIDERS, 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 TraceIngestionType, type TraceOutline, type TraceOutlineSpan, type TraceOutlineSpanError, type TraceResponse, type TracingProcessor, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, seedFromRegistry, serializeReplayResult };
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  getCurrentSpan,
25
25
  getCurrentTrace,
26
26
  seedFromRegistry
27
- } from "./chunk-WKGQM7HI.js";
27
+ } from "./chunk-BPVYNFCE.js";
28
28
  import "./chunk-ZUD7OFYB.js";
29
29
  import {
30
30
  BITFAB_PROGRESS_PREFIX,
@@ -33,7 +33,7 @@ import {
33
33
  ReplayError,
34
34
  reportReplayProgress,
35
35
  serializeReplayResult
36
- } from "./chunk-J25AP452.js";
36
+ } from "./chunk-PUHN4E2S.js";
37
37
  import {
38
38
  BitfabError,
39
39
  DEFAULT_SERVICE_URL,
@@ -41,7 +41,7 @@ import {
41
41
  MixedTracingError,
42
42
  __version__,
43
43
  flushTraces
44
- } from "./chunk-DCF7NJK7.js";
44
+ } from "./chunk-6K7ZEU4B.js";
45
45
  import "./chunk-H6LZRFMN.js";
46
46
  export {
47
47
  BITFAB_PROGRESS_PREFIX,
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.44.0";
100
+ __version__ = "0.44.1";
101
101
  __packageName__ = "bitfab";
102
102
  }
103
103
  });
@@ -2735,7 +2735,9 @@ async function processItem(httpClient, serverItem, fn, testRunId, mockStrategy,
2735
2735
  tokens: null,
2736
2736
  model: serverItem.originalModel ?? serverItem.model ?? null,
2737
2737
  dbSnapshotRef: dbSnapshotRef ?? null,
2738
- dbBranchTimings: dbBranchTimings ?? null
2738
+ dbBranchTimings: dbBranchTimings ?? null,
2739
+ traceOutline: null,
2740
+ originalTraceOutline: null
2739
2741
  };
2740
2742
  }
2741
2743
  try {
@@ -2819,7 +2821,9 @@ async function processItem(httpClient, serverItem, fn, testRunId, mockStrategy,
2819
2821
  tokens: null,
2820
2822
  model: originalModel,
2821
2823
  dbSnapshotRef: dbSnapshotRef ?? null,
2822
- dbBranchTimings: dbBranchTimings ?? null
2824
+ dbBranchTimings: dbBranchTimings ?? null,
2825
+ traceOutline: null,
2826
+ originalTraceOutline: null
2823
2827
  };
2824
2828
  }
2825
2829
  async function waitForReplayPersistence(httpClient, testRunId, replayedTraceIds) {
@@ -3074,7 +3078,9 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
3074
3078
  tokens: item.tokens,
3075
3079
  model: item.model,
3076
3080
  dbSnapshotRef: item.dbSnapshotRef,
3077
- dbBranchTimings: item.dbBranchTimings
3081
+ dbBranchTimings: item.dbBranchTimings,
3082
+ traceOutline: item.traceOutline,
3083
+ originalTraceOutline: item.originalTraceOutline
3078
3084
  }
3079
3085
  });
3080
3086
  } catch {
@@ -3154,7 +3160,9 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
3154
3160
  }
3155
3161
  if (mapped !== void 0) {
3156
3162
  item.tokens = replayTokens?.[mapped] ?? null;
3163
+ item.traceOutline = completeResult.traceOutlines?.[mapped] ?? null;
3157
3164
  }
3165
+ item.originalTraceOutline = completeResult.originalTraceOutlines?.[item.originalTraceId] ?? null;
3158
3166
  }
3159
3167
  if (completedCount > 0 && missing.length === completedCount) {
3160
3168
  const serverCount = completeResult.traceCount !== void 0 ? ` The server persisted ${completeResult.traceCount} trace(s) for this run.` : "";