bitfab 0.59.0 → 0.59.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/autoTrace.cjs.map +1 -1
- package/dist/autoTrace.d.cts +2 -0
- package/dist/autoTrace.d.ts +2 -0
- package/dist/autoTrace.js +1 -1
- package/dist/{chunk-FHEEAPG2.js → chunk-3D5EEY47.js} +54 -38
- package/dist/chunk-3D5EEY47.js.map +1 -0
- package/dist/{chunk-Y6FVWJKU.js → chunk-4F46OBRG.js} +18 -10
- package/dist/chunk-4F46OBRG.js.map +1 -0
- package/dist/{chunk-ETZUSSF6.js → chunk-5DNB7EN7.js} +1 -1
- package/dist/chunk-5DNB7EN7.js.map +1 -0
- package/dist/{chunk-R5MUOBRK.js → chunk-5MN6WIMW.js} +29 -14
- package/dist/chunk-5MN6WIMW.js.map +1 -0
- package/dist/{chunk-KFZ5OIN5.js → chunk-GJCZABUC.js} +29 -14
- package/dist/chunk-GJCZABUC.js.map +1 -0
- package/dist/{chunk-RYSCYPHQ.js → chunk-NVOQ7YMI.js} +37 -26
- package/dist/chunk-NVOQ7YMI.js.map +1 -0
- package/dist/{http-D7P4JL6C.js → http-2QEMP27E.js} +4 -2
- package/dist/{http-7WLON2BH.js → http-OXKVRA3E.js} +4 -2
- package/dist/index.cjs +109 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -35
- package/dist/index.d.ts +68 -35
- package/dist/index.js +4 -4
- package/dist/node.cjs +109 -67
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +4 -4
- package/dist/{replay-5TZNJ2DL.js → replay-WYPFFXSU.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ETZUSSF6.js.map +0 -1
- package/dist/chunk-FHEEAPG2.js.map +0 -1
- package/dist/chunk-KFZ5OIN5.js.map +0 -1
- package/dist/chunk-R5MUOBRK.js.map +0 -1
- package/dist/chunk-RYSCYPHQ.js.map +0 -1
- package/dist/chunk-Y6FVWJKU.js.map +0 -1
- /package/dist/{http-7WLON2BH.js.map → http-2QEMP27E.js.map} +0 -0
- /package/dist/{http-D7P4JL6C.js.map → http-OXKVRA3E.js.map} +0 -0
- /package/dist/{replay-5TZNJ2DL.js.map → replay-WYPFFXSU.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -196,8 +196,8 @@ type MockOverrideInput = MockOverride | MockOverrideResolver;
|
|
|
196
196
|
/**
|
|
197
197
|
* Replay context propagation via AsyncLocalStorage.
|
|
198
198
|
*
|
|
199
|
-
* When set, the withSpan wrapper injects
|
|
200
|
-
* so that new spans created during replay are linked to the
|
|
199
|
+
* When set, the withSpan wrapper injects experimentId into the span payload
|
|
200
|
+
* so that new spans created during replay are linked to the experiment.
|
|
201
201
|
* Optionally carries a mock tree so child spans can return historical
|
|
202
202
|
* outputs instead of executing.
|
|
203
203
|
*/
|
|
@@ -299,7 +299,7 @@ interface MockTree {
|
|
|
299
299
|
spans: Map<string, MockSpan>;
|
|
300
300
|
}
|
|
301
301
|
interface ReplayContext {
|
|
302
|
-
|
|
302
|
+
experimentId: string;
|
|
303
303
|
traceId?: string;
|
|
304
304
|
inputSourceSpanId?: string;
|
|
305
305
|
/**
|
|
@@ -600,7 +600,7 @@ declare class HttpClient {
|
|
|
600
600
|
}): Promise<void>;
|
|
601
601
|
/**
|
|
602
602
|
* Start a replay session by fetching historical traces.
|
|
603
|
-
* Blocking call - creates
|
|
603
|
+
* Blocking call - creates an experiment and returns lightweight item references.
|
|
604
604
|
*/
|
|
605
605
|
startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, judgeAssertions?: boolean): Promise<StartReplayResponse>;
|
|
606
606
|
/**
|
|
@@ -631,12 +631,12 @@ declare class HttpClient {
|
|
|
631
631
|
* has a final status AND at least that many persisted spans, which is what
|
|
632
632
|
* makes this a real barrier rather than a "the row exists" check.
|
|
633
633
|
*/
|
|
634
|
-
getReplayStatus(
|
|
634
|
+
getReplayStatus(experimentId: string, expectedSpanCounts: Record<string, number>): Promise<ReplayStatusResponse>;
|
|
635
635
|
/**
|
|
636
|
-
* Mark a replay
|
|
636
|
+
* Mark a replay experiment as completed.
|
|
637
637
|
* Blocking call.
|
|
638
638
|
*/
|
|
639
|
-
completeReplay(
|
|
639
|
+
completeReplay(experimentId: string): Promise<CompleteReplayResponse>;
|
|
640
640
|
getReseedSource(traceId: string): Promise<ReseedSourceResponse>;
|
|
641
641
|
reseedTrace(traceId: string, runTraceId: string): Promise<ReseedTraceResponse>;
|
|
642
642
|
/**
|
|
@@ -645,7 +645,7 @@ declare class HttpClient {
|
|
|
645
645
|
* snapshot + preview branch and polls operations to readiness, which
|
|
646
646
|
* can take seconds.
|
|
647
647
|
*/
|
|
648
|
-
resolveDbBranchLease(
|
|
648
|
+
resolveDbBranchLease(experimentId: string, traceId: string, dbBranchSettings?: DbBranchSettings, attempt?: number): Promise<{
|
|
649
649
|
dbSnapshotRef: DbSnapshotRef | null;
|
|
650
650
|
lease: DbBranchLease | null;
|
|
651
651
|
leaseError: {
|
|
@@ -702,8 +702,8 @@ interface CodeChangeFile {
|
|
|
702
702
|
after: string;
|
|
703
703
|
}
|
|
704
704
|
interface StartReplayResponse {
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
experimentId: string;
|
|
706
|
+
experimentUrl: string;
|
|
707
707
|
attempts?: number;
|
|
708
708
|
items: Array<{
|
|
709
709
|
/** Bitfab trace ID of the original (historical) trace being replayed. */
|
|
@@ -791,7 +791,7 @@ interface CompleteReplayResponse {
|
|
|
791
791
|
traceOutlines?: Record<string, TraceOutline>;
|
|
792
792
|
originalTraceOutlines?: Record<string, TraceOutline>;
|
|
793
793
|
/**
|
|
794
|
-
* Number of traces the server has persisted for this
|
|
794
|
+
* Number of traces the server has persisted for this experiment at
|
|
795
795
|
* completion time. Lets the SDK distinguish "uploads failed" from
|
|
796
796
|
* "server never saw them" when the trace-ID mapping is incomplete.
|
|
797
797
|
*/
|
|
@@ -1523,12 +1523,12 @@ type TraceLabels = {
|
|
|
1523
1523
|
declare class LabelsClient {
|
|
1524
1524
|
private readonly httpClient;
|
|
1525
1525
|
constructor(httpClient: HttpClient);
|
|
1526
|
-
save(update: LabelUpdate,
|
|
1527
|
-
saveAll(updates: LabelUpdate[],
|
|
1526
|
+
save(update: LabelUpdate, experimentId?: string): Promise<LabelOutcome>;
|
|
1527
|
+
saveAll(updates: LabelUpdate[], experimentId?: string): Promise<LabelOutcome[]>;
|
|
1528
1528
|
/** Withhold a verdict for a trace or replay attempt whose check did not run. */
|
|
1529
|
-
skip(target: LabelTarget,
|
|
1529
|
+
skip(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
|
|
1530
1530
|
/** Clear a previous verdict for a trace, replay attempt, or assertion. */
|
|
1531
|
-
archive(target: LabelTarget,
|
|
1531
|
+
archive(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
|
|
1532
1532
|
saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
|
|
1533
1533
|
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
1534
1534
|
get(traceId: string): Promise<TraceLabels | null>;
|
|
@@ -1829,12 +1829,12 @@ declare class OrganizationMembersClient {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
|
|
1831
1831
|
/**
|
|
1832
|
-
* Replay historical traces through a function and create
|
|
1832
|
+
* Replay historical traces through a function and create an experiment.
|
|
1833
1833
|
*
|
|
1834
1834
|
* The replay flow has three phases:
|
|
1835
|
-
* 1. Start: fetches historical traces from the server and creates
|
|
1835
|
+
* 1. Start: fetches historical traces from the server and creates an experiment
|
|
1836
1836
|
* 2. Execute: re-runs each trace's inputs through the provided function locally
|
|
1837
|
-
* 3. Complete: marks the
|
|
1837
|
+
* 3. Complete: marks the experiment as completed on the server
|
|
1838
1838
|
*/
|
|
1839
1839
|
|
|
1840
1840
|
type MockStrategy = "none" | "all" | "marked";
|
|
@@ -1886,7 +1886,7 @@ interface ReplayOptions {
|
|
|
1886
1886
|
* it selects by ID with no dataset attribution.
|
|
1887
1887
|
*/
|
|
1888
1888
|
traceIds?: string[];
|
|
1889
|
-
/** Optional display name for the resulting experiment
|
|
1889
|
+
/** Optional display name for the resulting experiment. */
|
|
1890
1890
|
name?: string;
|
|
1891
1891
|
/** Positive integer limiting parallel items. Set to 1 for sequential. Default 10. */
|
|
1892
1892
|
maxConcurrency?: number;
|
|
@@ -1944,14 +1944,14 @@ interface ReplayOptions {
|
|
|
1944
1944
|
* Dataset this replay runs against. Mutually exclusive with `datasetIds`.
|
|
1945
1945
|
* Alone it replays the dataset's full membership, and with `traceIds` it
|
|
1946
1946
|
* replays only those members. When set, the resulting experiment is
|
|
1947
|
-
* durably attributed to the dataset (stored on the
|
|
1947
|
+
* durably attributed to the dataset (stored on the experiment), so it appears
|
|
1948
1948
|
* under the dataset's experiments even if the trace lineage can't be
|
|
1949
1949
|
* reconstructed. Validated server-side against the org.
|
|
1950
1950
|
*/
|
|
1951
1951
|
datasetId?: string;
|
|
1952
1952
|
datasetIds?: string[];
|
|
1953
1953
|
/**
|
|
1954
|
-
* Graders to attach directly to this experiment
|
|
1954
|
+
* Graders to attach directly to this experiment, independent of any
|
|
1955
1955
|
* graders already on the dataset. The resulting experiment is graded by the
|
|
1956
1956
|
* union of these and the dataset's runnable graders at completion, so use this
|
|
1957
1957
|
* to grade a single run with a check you don't want to add to the dataset
|
|
@@ -2035,11 +2035,27 @@ interface ReplayOptions {
|
|
|
2035
2035
|
* are still in flight. A throwing callback never crashes the run.
|
|
2036
2036
|
*/
|
|
2037
2037
|
onItemStart?: (progress: ReplayItemStartProgress) => void;
|
|
2038
|
+
/**
|
|
2039
|
+
* Called once, right after the server creates the experiment and before any
|
|
2040
|
+
* item runs, with the experiment ID and its dashboard URL. Use it to show
|
|
2041
|
+
* where results will appear while the replay is still running. A throwing
|
|
2042
|
+
* callback never crashes the run.
|
|
2043
|
+
*/
|
|
2044
|
+
onExperimentStart?: (experiment: ReplayExperiment) => void;
|
|
2045
|
+
}
|
|
2046
|
+
/** The experiment a replay records into, passed to {@link ReplayOptions.onExperimentStart}. */
|
|
2047
|
+
interface ReplayExperiment {
|
|
2048
|
+
/** Experiment ID created for this replay. */
|
|
2049
|
+
experimentId: string;
|
|
2050
|
+
/** Full URL to view the experiment in the dashboard. */
|
|
2051
|
+
experimentUrl: string;
|
|
2038
2052
|
}
|
|
2039
2053
|
/** Emitted through {@link ReplayOptions.onItemStart} when a worker starts an item. */
|
|
2040
2054
|
interface ReplayItemStartProgress {
|
|
2041
2055
|
type: "started";
|
|
2042
|
-
/**
|
|
2056
|
+
/** Experiment ID created for this replay. */
|
|
2057
|
+
experimentId: string;
|
|
2058
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2043
2059
|
testRunId: string;
|
|
2044
2060
|
/** Items whose processing has started so far. */
|
|
2045
2061
|
started: number;
|
|
@@ -2066,7 +2082,9 @@ interface ReplayItemStartProgress {
|
|
|
2066
2082
|
interface ReplayItemFinishProgress {
|
|
2067
2083
|
/** Event kind, omitted for backward-compatible per-item events. */
|
|
2068
2084
|
type?: "item";
|
|
2069
|
-
/**
|
|
2085
|
+
/** Experiment ID created for this replay. */
|
|
2086
|
+
experimentId: string;
|
|
2087
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2070
2088
|
testRunId: string;
|
|
2071
2089
|
/** Items that have finished so far, whether they succeeded or errored. */
|
|
2072
2090
|
completed: number;
|
|
@@ -2136,6 +2154,8 @@ interface ReplayProgressItem {
|
|
|
2136
2154
|
interface ReplayProgress {
|
|
2137
2155
|
type?: "item" | "complete";
|
|
2138
2156
|
result?: ReplayResult<unknown>;
|
|
2157
|
+
experimentId?: string;
|
|
2158
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2139
2159
|
testRunId?: string;
|
|
2140
2160
|
completed: number;
|
|
2141
2161
|
total: number;
|
|
@@ -2202,7 +2222,7 @@ interface ReplayItem<T> {
|
|
|
2202
2222
|
* trace row; the client-side id used to correlate spans during the run is
|
|
2203
2223
|
* never surfaced here. Null until completion, on older servers that omit the
|
|
2204
2224
|
* mapping, or if the item produced no trace. Not the verdict-persistence key:
|
|
2205
|
-
* that is the original-trace lineage (`originalTraceId` + `
|
|
2225
|
+
* that is the original-trace lineage (`originalTraceId` + `experimentId`).
|
|
2206
2226
|
*/
|
|
2207
2227
|
traceId: string | null;
|
|
2208
2228
|
/** Bitfab trace ID of the original (historical) trace being replayed. */
|
|
@@ -2285,9 +2305,13 @@ interface ReplayItem<T> {
|
|
|
2285
2305
|
interface ReplayResult<T> {
|
|
2286
2306
|
/** Individual replay items with inputs, results, and comparison data. */
|
|
2287
2307
|
items: ReplayItem<T>[];
|
|
2288
|
-
/** The
|
|
2308
|
+
/** The experiment ID created on the server. */
|
|
2309
|
+
experimentId: string;
|
|
2310
|
+
/** Full URL to view the experiment in the dashboard. */
|
|
2311
|
+
experimentUrl: string;
|
|
2312
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2289
2313
|
testRunId: string;
|
|
2290
|
-
/**
|
|
2314
|
+
/** @deprecated Use {@link experimentUrl}. Same value. */
|
|
2291
2315
|
testRunUrl: string;
|
|
2292
2316
|
attempts: number;
|
|
2293
2317
|
}
|
|
@@ -2297,10 +2321,14 @@ interface ReplayResult<T> {
|
|
|
2297
2321
|
*/
|
|
2298
2322
|
declare class ReplayError<T = unknown> extends BitfabError {
|
|
2299
2323
|
readonly items: ReplayItem<T>[];
|
|
2324
|
+
readonly experimentId: string;
|
|
2325
|
+
readonly experimentUrl: string;
|
|
2326
|
+
readonly cause: unknown;
|
|
2327
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2300
2328
|
readonly testRunId: string;
|
|
2329
|
+
/** @deprecated Use {@link experimentUrl}. Same value. */
|
|
2301
2330
|
readonly testRunUrl: string;
|
|
2302
|
-
|
|
2303
|
-
constructor(message: string, items: ReplayItem<T>[], testRunId: string, testRunUrl: string, cause: unknown);
|
|
2331
|
+
constructor(message: string, items: ReplayItem<T>[], experimentId: string, experimentUrl: string, cause: unknown);
|
|
2304
2332
|
}
|
|
2305
2333
|
/**
|
|
2306
2334
|
* A database branch requested for one replay item could not be resolved.
|
|
@@ -2875,7 +2903,12 @@ interface SpanOptions {
|
|
|
2875
2903
|
* real child.
|
|
2876
2904
|
*/
|
|
2877
2905
|
mockOnReplay?: boolean;
|
|
2878
|
-
/** Optional
|
|
2906
|
+
/** Optional experiment ID included on the span and on the trace it starts. */
|
|
2907
|
+
experimentId?: string;
|
|
2908
|
+
/**
|
|
2909
|
+
* @deprecated Use {@link experimentId}. Same meaning. Passing both with
|
|
2910
|
+
* different values throws.
|
|
2911
|
+
*/
|
|
2879
2912
|
testRunId?: string;
|
|
2880
2913
|
/**
|
|
2881
2914
|
* Record a serializable view of a non-serializable result (e.g. a live
|
|
@@ -3404,14 +3437,14 @@ declare class Bitfab {
|
|
|
3404
3437
|
*/
|
|
3405
3438
|
private sendWrapperSpan;
|
|
3406
3439
|
/**
|
|
3407
|
-
* Replay historical traces through a function and create
|
|
3440
|
+
* Replay historical traces through a function and create an experiment.
|
|
3408
3441
|
*
|
|
3409
3442
|
* Fetches the last N traces for the given trace function key, re-runs each
|
|
3410
3443
|
* through the provided function, and returns comparison data.
|
|
3411
3444
|
*
|
|
3412
3445
|
* Accepts either a `withSpan`-wrapped function (under the same key) or any
|
|
3413
3446
|
* plain callable: plain callables are wrapped internally so each replayed
|
|
3414
|
-
* invocation records a trace tied to the
|
|
3447
|
+
* invocation records a trace tied to the experiment. The plain-callable form
|
|
3415
3448
|
* is how handler-instrumented workflows (LangGraph/LangChain, Claude Agent
|
|
3416
3449
|
* SDK) replay - those record traces under a key with no `withSpan`-wrapped
|
|
3417
3450
|
* root in the app.
|
|
@@ -3421,7 +3454,7 @@ declare class Bitfab {
|
|
|
3421
3454
|
* @param options - Optional replay options. When `traceIds` is passed,
|
|
3422
3455
|
* `limit` is ignored (with a warning): an explicit ID list already
|
|
3423
3456
|
* determines how many traces replay.
|
|
3424
|
-
* @returns ReplayResult with items,
|
|
3457
|
+
* @returns ReplayResult with items, experimentId, and experimentUrl
|
|
3425
3458
|
*/
|
|
3426
3459
|
/**
|
|
3427
3460
|
* Register a mock override applied to every subsequent `replay` on this
|
|
@@ -3681,7 +3714,7 @@ interface CommitRef {
|
|
|
3681
3714
|
/**
|
|
3682
3715
|
* SDK version from package.json (injected at build time)
|
|
3683
3716
|
*/
|
|
3684
|
-
declare const __version__ = "0.59.
|
|
3717
|
+
declare const __version__ = "0.59.1";
|
|
3685
3718
|
|
|
3686
3719
|
/**
|
|
3687
3720
|
* Constants for the Bitfab SDK.
|
|
@@ -3750,7 +3783,7 @@ declare const finalizers: {
|
|
|
3750
3783
|
};
|
|
3751
3784
|
|
|
3752
3785
|
type ReplayFunction = (...args: any[]) => unknown | Promise<unknown>;
|
|
3753
|
-
type ReplayRegistryOptions = Omit<ReplayOptions, "onItemStart" | "onItemFinish" | "onProgress">;
|
|
3786
|
+
type ReplayRegistryOptions = Omit<ReplayOptions, "onItemStart" | "onItemFinish" | "onProgress" | "onExperimentStart">;
|
|
3754
3787
|
interface ReplayRegistryContext {
|
|
3755
3788
|
/** Values supplied through `--params` and repeated `--param name=value`. */
|
|
3756
3789
|
params: Readonly<Record<string, unknown>>;
|
|
@@ -3820,4 +3853,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3820
3853
|
run?: boolean;
|
|
3821
3854
|
}): Promise<SeedResult>;
|
|
3822
3855
|
|
|
3823
|
-
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 GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, 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, 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 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 };
|
|
3856
|
+
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 GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, 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, 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 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
|
@@ -196,8 +196,8 @@ type MockOverrideInput = MockOverride | MockOverrideResolver;
|
|
|
196
196
|
/**
|
|
197
197
|
* Replay context propagation via AsyncLocalStorage.
|
|
198
198
|
*
|
|
199
|
-
* When set, the withSpan wrapper injects
|
|
200
|
-
* so that new spans created during replay are linked to the
|
|
199
|
+
* When set, the withSpan wrapper injects experimentId into the span payload
|
|
200
|
+
* so that new spans created during replay are linked to the experiment.
|
|
201
201
|
* Optionally carries a mock tree so child spans can return historical
|
|
202
202
|
* outputs instead of executing.
|
|
203
203
|
*/
|
|
@@ -299,7 +299,7 @@ interface MockTree {
|
|
|
299
299
|
spans: Map<string, MockSpan>;
|
|
300
300
|
}
|
|
301
301
|
interface ReplayContext {
|
|
302
|
-
|
|
302
|
+
experimentId: string;
|
|
303
303
|
traceId?: string;
|
|
304
304
|
inputSourceSpanId?: string;
|
|
305
305
|
/**
|
|
@@ -600,7 +600,7 @@ declare class HttpClient {
|
|
|
600
600
|
}): Promise<void>;
|
|
601
601
|
/**
|
|
602
602
|
* Start a replay session by fetching historical traces.
|
|
603
|
-
* Blocking call - creates
|
|
603
|
+
* Blocking call - creates an experiment and returns lightweight item references.
|
|
604
604
|
*/
|
|
605
605
|
startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, judgeAssertions?: boolean): Promise<StartReplayResponse>;
|
|
606
606
|
/**
|
|
@@ -631,12 +631,12 @@ declare class HttpClient {
|
|
|
631
631
|
* has a final status AND at least that many persisted spans, which is what
|
|
632
632
|
* makes this a real barrier rather than a "the row exists" check.
|
|
633
633
|
*/
|
|
634
|
-
getReplayStatus(
|
|
634
|
+
getReplayStatus(experimentId: string, expectedSpanCounts: Record<string, number>): Promise<ReplayStatusResponse>;
|
|
635
635
|
/**
|
|
636
|
-
* Mark a replay
|
|
636
|
+
* Mark a replay experiment as completed.
|
|
637
637
|
* Blocking call.
|
|
638
638
|
*/
|
|
639
|
-
completeReplay(
|
|
639
|
+
completeReplay(experimentId: string): Promise<CompleteReplayResponse>;
|
|
640
640
|
getReseedSource(traceId: string): Promise<ReseedSourceResponse>;
|
|
641
641
|
reseedTrace(traceId: string, runTraceId: string): Promise<ReseedTraceResponse>;
|
|
642
642
|
/**
|
|
@@ -645,7 +645,7 @@ declare class HttpClient {
|
|
|
645
645
|
* snapshot + preview branch and polls operations to readiness, which
|
|
646
646
|
* can take seconds.
|
|
647
647
|
*/
|
|
648
|
-
resolveDbBranchLease(
|
|
648
|
+
resolveDbBranchLease(experimentId: string, traceId: string, dbBranchSettings?: DbBranchSettings, attempt?: number): Promise<{
|
|
649
649
|
dbSnapshotRef: DbSnapshotRef | null;
|
|
650
650
|
lease: DbBranchLease | null;
|
|
651
651
|
leaseError: {
|
|
@@ -702,8 +702,8 @@ interface CodeChangeFile {
|
|
|
702
702
|
after: string;
|
|
703
703
|
}
|
|
704
704
|
interface StartReplayResponse {
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
experimentId: string;
|
|
706
|
+
experimentUrl: string;
|
|
707
707
|
attempts?: number;
|
|
708
708
|
items: Array<{
|
|
709
709
|
/** Bitfab trace ID of the original (historical) trace being replayed. */
|
|
@@ -791,7 +791,7 @@ interface CompleteReplayResponse {
|
|
|
791
791
|
traceOutlines?: Record<string, TraceOutline>;
|
|
792
792
|
originalTraceOutlines?: Record<string, TraceOutline>;
|
|
793
793
|
/**
|
|
794
|
-
* Number of traces the server has persisted for this
|
|
794
|
+
* Number of traces the server has persisted for this experiment at
|
|
795
795
|
* completion time. Lets the SDK distinguish "uploads failed" from
|
|
796
796
|
* "server never saw them" when the trace-ID mapping is incomplete.
|
|
797
797
|
*/
|
|
@@ -1523,12 +1523,12 @@ type TraceLabels = {
|
|
|
1523
1523
|
declare class LabelsClient {
|
|
1524
1524
|
private readonly httpClient;
|
|
1525
1525
|
constructor(httpClient: HttpClient);
|
|
1526
|
-
save(update: LabelUpdate,
|
|
1527
|
-
saveAll(updates: LabelUpdate[],
|
|
1526
|
+
save(update: LabelUpdate, experimentId?: string): Promise<LabelOutcome>;
|
|
1527
|
+
saveAll(updates: LabelUpdate[], experimentId?: string): Promise<LabelOutcome[]>;
|
|
1528
1528
|
/** Withhold a verdict for a trace or replay attempt whose check did not run. */
|
|
1529
|
-
skip(target: LabelTarget,
|
|
1529
|
+
skip(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
|
|
1530
1530
|
/** Clear a previous verdict for a trace, replay attempt, or assertion. */
|
|
1531
|
-
archive(target: LabelTarget,
|
|
1531
|
+
archive(target: LabelTarget, experimentId?: string): Promise<LabelOutcome>;
|
|
1532
1532
|
saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
|
|
1533
1533
|
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
1534
1534
|
get(traceId: string): Promise<TraceLabels | null>;
|
|
@@ -1829,12 +1829,12 @@ declare class OrganizationMembersClient {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
|
|
1831
1831
|
/**
|
|
1832
|
-
* Replay historical traces through a function and create
|
|
1832
|
+
* Replay historical traces through a function and create an experiment.
|
|
1833
1833
|
*
|
|
1834
1834
|
* The replay flow has three phases:
|
|
1835
|
-
* 1. Start: fetches historical traces from the server and creates
|
|
1835
|
+
* 1. Start: fetches historical traces from the server and creates an experiment
|
|
1836
1836
|
* 2. Execute: re-runs each trace's inputs through the provided function locally
|
|
1837
|
-
* 3. Complete: marks the
|
|
1837
|
+
* 3. Complete: marks the experiment as completed on the server
|
|
1838
1838
|
*/
|
|
1839
1839
|
|
|
1840
1840
|
type MockStrategy = "none" | "all" | "marked";
|
|
@@ -1886,7 +1886,7 @@ interface ReplayOptions {
|
|
|
1886
1886
|
* it selects by ID with no dataset attribution.
|
|
1887
1887
|
*/
|
|
1888
1888
|
traceIds?: string[];
|
|
1889
|
-
/** Optional display name for the resulting experiment
|
|
1889
|
+
/** Optional display name for the resulting experiment. */
|
|
1890
1890
|
name?: string;
|
|
1891
1891
|
/** Positive integer limiting parallel items. Set to 1 for sequential. Default 10. */
|
|
1892
1892
|
maxConcurrency?: number;
|
|
@@ -1944,14 +1944,14 @@ interface ReplayOptions {
|
|
|
1944
1944
|
* Dataset this replay runs against. Mutually exclusive with `datasetIds`.
|
|
1945
1945
|
* Alone it replays the dataset's full membership, and with `traceIds` it
|
|
1946
1946
|
* replays only those members. When set, the resulting experiment is
|
|
1947
|
-
* durably attributed to the dataset (stored on the
|
|
1947
|
+
* durably attributed to the dataset (stored on the experiment), so it appears
|
|
1948
1948
|
* under the dataset's experiments even if the trace lineage can't be
|
|
1949
1949
|
* reconstructed. Validated server-side against the org.
|
|
1950
1950
|
*/
|
|
1951
1951
|
datasetId?: string;
|
|
1952
1952
|
datasetIds?: string[];
|
|
1953
1953
|
/**
|
|
1954
|
-
* Graders to attach directly to this experiment
|
|
1954
|
+
* Graders to attach directly to this experiment, independent of any
|
|
1955
1955
|
* graders already on the dataset. The resulting experiment is graded by the
|
|
1956
1956
|
* union of these and the dataset's runnable graders at completion, so use this
|
|
1957
1957
|
* to grade a single run with a check you don't want to add to the dataset
|
|
@@ -2035,11 +2035,27 @@ interface ReplayOptions {
|
|
|
2035
2035
|
* are still in flight. A throwing callback never crashes the run.
|
|
2036
2036
|
*/
|
|
2037
2037
|
onItemStart?: (progress: ReplayItemStartProgress) => void;
|
|
2038
|
+
/**
|
|
2039
|
+
* Called once, right after the server creates the experiment and before any
|
|
2040
|
+
* item runs, with the experiment ID and its dashboard URL. Use it to show
|
|
2041
|
+
* where results will appear while the replay is still running. A throwing
|
|
2042
|
+
* callback never crashes the run.
|
|
2043
|
+
*/
|
|
2044
|
+
onExperimentStart?: (experiment: ReplayExperiment) => void;
|
|
2045
|
+
}
|
|
2046
|
+
/** The experiment a replay records into, passed to {@link ReplayOptions.onExperimentStart}. */
|
|
2047
|
+
interface ReplayExperiment {
|
|
2048
|
+
/** Experiment ID created for this replay. */
|
|
2049
|
+
experimentId: string;
|
|
2050
|
+
/** Full URL to view the experiment in the dashboard. */
|
|
2051
|
+
experimentUrl: string;
|
|
2038
2052
|
}
|
|
2039
2053
|
/** Emitted through {@link ReplayOptions.onItemStart} when a worker starts an item. */
|
|
2040
2054
|
interface ReplayItemStartProgress {
|
|
2041
2055
|
type: "started";
|
|
2042
|
-
/**
|
|
2056
|
+
/** Experiment ID created for this replay. */
|
|
2057
|
+
experimentId: string;
|
|
2058
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2043
2059
|
testRunId: string;
|
|
2044
2060
|
/** Items whose processing has started so far. */
|
|
2045
2061
|
started: number;
|
|
@@ -2066,7 +2082,9 @@ interface ReplayItemStartProgress {
|
|
|
2066
2082
|
interface ReplayItemFinishProgress {
|
|
2067
2083
|
/** Event kind, omitted for backward-compatible per-item events. */
|
|
2068
2084
|
type?: "item";
|
|
2069
|
-
/**
|
|
2085
|
+
/** Experiment ID created for this replay. */
|
|
2086
|
+
experimentId: string;
|
|
2087
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2070
2088
|
testRunId: string;
|
|
2071
2089
|
/** Items that have finished so far, whether they succeeded or errored. */
|
|
2072
2090
|
completed: number;
|
|
@@ -2136,6 +2154,8 @@ interface ReplayProgressItem {
|
|
|
2136
2154
|
interface ReplayProgress {
|
|
2137
2155
|
type?: "item" | "complete";
|
|
2138
2156
|
result?: ReplayResult<unknown>;
|
|
2157
|
+
experimentId?: string;
|
|
2158
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2139
2159
|
testRunId?: string;
|
|
2140
2160
|
completed: number;
|
|
2141
2161
|
total: number;
|
|
@@ -2202,7 +2222,7 @@ interface ReplayItem<T> {
|
|
|
2202
2222
|
* trace row; the client-side id used to correlate spans during the run is
|
|
2203
2223
|
* never surfaced here. Null until completion, on older servers that omit the
|
|
2204
2224
|
* mapping, or if the item produced no trace. Not the verdict-persistence key:
|
|
2205
|
-
* that is the original-trace lineage (`originalTraceId` + `
|
|
2225
|
+
* that is the original-trace lineage (`originalTraceId` + `experimentId`).
|
|
2206
2226
|
*/
|
|
2207
2227
|
traceId: string | null;
|
|
2208
2228
|
/** Bitfab trace ID of the original (historical) trace being replayed. */
|
|
@@ -2285,9 +2305,13 @@ interface ReplayItem<T> {
|
|
|
2285
2305
|
interface ReplayResult<T> {
|
|
2286
2306
|
/** Individual replay items with inputs, results, and comparison data. */
|
|
2287
2307
|
items: ReplayItem<T>[];
|
|
2288
|
-
/** The
|
|
2308
|
+
/** The experiment ID created on the server. */
|
|
2309
|
+
experimentId: string;
|
|
2310
|
+
/** Full URL to view the experiment in the dashboard. */
|
|
2311
|
+
experimentUrl: string;
|
|
2312
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2289
2313
|
testRunId: string;
|
|
2290
|
-
/**
|
|
2314
|
+
/** @deprecated Use {@link experimentUrl}. Same value. */
|
|
2291
2315
|
testRunUrl: string;
|
|
2292
2316
|
attempts: number;
|
|
2293
2317
|
}
|
|
@@ -2297,10 +2321,14 @@ interface ReplayResult<T> {
|
|
|
2297
2321
|
*/
|
|
2298
2322
|
declare class ReplayError<T = unknown> extends BitfabError {
|
|
2299
2323
|
readonly items: ReplayItem<T>[];
|
|
2324
|
+
readonly experimentId: string;
|
|
2325
|
+
readonly experimentUrl: string;
|
|
2326
|
+
readonly cause: unknown;
|
|
2327
|
+
/** @deprecated Use {@link experimentId}. Same value. */
|
|
2300
2328
|
readonly testRunId: string;
|
|
2329
|
+
/** @deprecated Use {@link experimentUrl}. Same value. */
|
|
2301
2330
|
readonly testRunUrl: string;
|
|
2302
|
-
|
|
2303
|
-
constructor(message: string, items: ReplayItem<T>[], testRunId: string, testRunUrl: string, cause: unknown);
|
|
2331
|
+
constructor(message: string, items: ReplayItem<T>[], experimentId: string, experimentUrl: string, cause: unknown);
|
|
2304
2332
|
}
|
|
2305
2333
|
/**
|
|
2306
2334
|
* A database branch requested for one replay item could not be resolved.
|
|
@@ -2875,7 +2903,12 @@ interface SpanOptions {
|
|
|
2875
2903
|
* real child.
|
|
2876
2904
|
*/
|
|
2877
2905
|
mockOnReplay?: boolean;
|
|
2878
|
-
/** Optional
|
|
2906
|
+
/** Optional experiment ID included on the span and on the trace it starts. */
|
|
2907
|
+
experimentId?: string;
|
|
2908
|
+
/**
|
|
2909
|
+
* @deprecated Use {@link experimentId}. Same meaning. Passing both with
|
|
2910
|
+
* different values throws.
|
|
2911
|
+
*/
|
|
2879
2912
|
testRunId?: string;
|
|
2880
2913
|
/**
|
|
2881
2914
|
* Record a serializable view of a non-serializable result (e.g. a live
|
|
@@ -3404,14 +3437,14 @@ declare class Bitfab {
|
|
|
3404
3437
|
*/
|
|
3405
3438
|
private sendWrapperSpan;
|
|
3406
3439
|
/**
|
|
3407
|
-
* Replay historical traces through a function and create
|
|
3440
|
+
* Replay historical traces through a function and create an experiment.
|
|
3408
3441
|
*
|
|
3409
3442
|
* Fetches the last N traces for the given trace function key, re-runs each
|
|
3410
3443
|
* through the provided function, and returns comparison data.
|
|
3411
3444
|
*
|
|
3412
3445
|
* Accepts either a `withSpan`-wrapped function (under the same key) or any
|
|
3413
3446
|
* plain callable: plain callables are wrapped internally so each replayed
|
|
3414
|
-
* invocation records a trace tied to the
|
|
3447
|
+
* invocation records a trace tied to the experiment. The plain-callable form
|
|
3415
3448
|
* is how handler-instrumented workflows (LangGraph/LangChain, Claude Agent
|
|
3416
3449
|
* SDK) replay - those record traces under a key with no `withSpan`-wrapped
|
|
3417
3450
|
* root in the app.
|
|
@@ -3421,7 +3454,7 @@ declare class Bitfab {
|
|
|
3421
3454
|
* @param options - Optional replay options. When `traceIds` is passed,
|
|
3422
3455
|
* `limit` is ignored (with a warning): an explicit ID list already
|
|
3423
3456
|
* determines how many traces replay.
|
|
3424
|
-
* @returns ReplayResult with items,
|
|
3457
|
+
* @returns ReplayResult with items, experimentId, and experimentUrl
|
|
3425
3458
|
*/
|
|
3426
3459
|
/**
|
|
3427
3460
|
* Register a mock override applied to every subsequent `replay` on this
|
|
@@ -3681,7 +3714,7 @@ interface CommitRef {
|
|
|
3681
3714
|
/**
|
|
3682
3715
|
* SDK version from package.json (injected at build time)
|
|
3683
3716
|
*/
|
|
3684
|
-
declare const __version__ = "0.59.
|
|
3717
|
+
declare const __version__ = "0.59.1";
|
|
3685
3718
|
|
|
3686
3719
|
/**
|
|
3687
3720
|
* Constants for the Bitfab SDK.
|
|
@@ -3750,7 +3783,7 @@ declare const finalizers: {
|
|
|
3750
3783
|
};
|
|
3751
3784
|
|
|
3752
3785
|
type ReplayFunction = (...args: any[]) => unknown | Promise<unknown>;
|
|
3753
|
-
type ReplayRegistryOptions = Omit<ReplayOptions, "onItemStart" | "onItemFinish" | "onProgress">;
|
|
3786
|
+
type ReplayRegistryOptions = Omit<ReplayOptions, "onItemStart" | "onItemFinish" | "onProgress" | "onExperimentStart">;
|
|
3754
3787
|
interface ReplayRegistryContext {
|
|
3755
3788
|
/** Values supplied through `--params` and repeated `--param name=value`. */
|
|
3756
3789
|
params: Readonly<Record<string, unknown>>;
|
|
@@ -3820,4 +3853,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
3820
3853
|
run?: boolean;
|
|
3821
3854
|
}): Promise<SeedResult>;
|
|
3822
3855
|
|
|
3823
|
-
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 GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, 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, 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 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 };
|
|
3856
|
+
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 GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelSource, 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, 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 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
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
getCurrentTrace,
|
|
36
36
|
reseedFromRegistry,
|
|
37
37
|
seedFromRegistry
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-NVOQ7YMI.js";
|
|
39
|
+
import "./chunk-5DNB7EN7.js";
|
|
40
40
|
import {
|
|
41
41
|
BITFAB_PROGRESS_PREFIX,
|
|
42
42
|
DbBranchReplayError,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
ReplayError,
|
|
45
45
|
reportReplayProgress,
|
|
46
46
|
serializeReplayResult
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-3D5EEY47.js";
|
|
48
48
|
import {
|
|
49
49
|
BitfabError,
|
|
50
50
|
DEFAULT_SERVICE_URL,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
MixedTracingError,
|
|
53
53
|
__version__,
|
|
54
54
|
flushTraces
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-GJCZABUC.js";
|
|
56
56
|
import "./chunk-BAOIRE5T.js";
|
|
57
57
|
export {
|
|
58
58
|
AssertionCategoriesClient,
|