bitfab 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.
- package/dist/{chunk-KPALXSAF.js → chunk-3FL22BEM.js} +37 -7
- package/dist/chunk-3FL22BEM.js.map +1 -0
- package/dist/{chunk-VW7MA7DS.js → chunk-N7ZNDZLR.js} +21 -9
- package/dist/chunk-N7ZNDZLR.js.map +1 -0
- package/dist/{chunk-YKOD4GWI.js → chunk-NIGVK5V7.js} +22 -9
- package/dist/chunk-NIGVK5V7.js.map +1 -0
- package/dist/{chunk-Q7HDNYYY.js → chunk-SV5FYJQ4.js} +28 -16
- package/dist/chunk-SV5FYJQ4.js.map +1 -0
- package/dist/{chunk-FZNRSEMN.js → chunk-X6JOFMNV.js} +9 -3
- package/dist/chunk-X6JOFMNV.js.map +1 -0
- package/dist/{http-42KAFBUN.js → http-HM2SNB6L.js} +2 -2
- package/dist/{http-7PF6XCJR.js → http-ZXMIZQV5.js} +2 -2
- package/dist/index.cjs +50 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +3 -3
- package/dist/node.cjs +50 -21
- 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 +3 -3
- package/dist/{replay-5RHBDIEK.js → replay-XCXNPWMC.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-FZNRSEMN.js.map +0 -1
- package/dist/chunk-KPALXSAF.js.map +0 -1
- package/dist/chunk-Q7HDNYYY.js.map +0 -1
- package/dist/chunk-VW7MA7DS.js.map +0 -1
- package/dist/chunk-YKOD4GWI.js.map +0 -1
- /package/dist/{http-42KAFBUN.js.map → http-HM2SNB6L.js.map} +0 -0
- /package/dist/{http-7PF6XCJR.js.map → http-ZXMIZQV5.js.map} +0 -0
- /package/dist/{replay-5RHBDIEK.js.map → replay-XCXNPWMC.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
|
-
/**
|
|
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.
|
|
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
|
-
/**
|
|
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.
|
|
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
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getCurrentTrace,
|
|
31
31
|
reseedFromRegistry,
|
|
32
32
|
seedFromRegistry
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SV5FYJQ4.js";
|
|
34
34
|
import "./chunk-RCHSYWKI.js";
|
|
35
35
|
import {
|
|
36
36
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
ReplayError,
|
|
40
40
|
reportReplayProgress,
|
|
41
41
|
serializeReplayResult
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-X6JOFMNV.js";
|
|
43
43
|
import {
|
|
44
44
|
BitfabError,
|
|
45
45
|
DEFAULT_SERVICE_URL,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
MixedTracingError,
|
|
48
48
|
__version__,
|
|
49
49
|
flushTraces
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-NIGVK5V7.js";
|
|
51
51
|
import "./chunk-VCRFFCLY.js";
|
|
52
52
|
export {
|
|
53
53
|
AssertionCategoriesClient,
|
package/dist/node.cjs
CHANGED
|
@@ -97,7 +97,7 @@ var __version__, __packageName__;
|
|
|
97
97
|
var init_version_generated = __esm({
|
|
98
98
|
"src/version.generated.ts"() {
|
|
99
99
|
"use strict";
|
|
100
|
-
__version__ = "0.54.
|
|
100
|
+
__version__ = "0.54.14";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -1272,6 +1272,7 @@ var init_simulationPlan = __esm({
|
|
|
1272
1272
|
}
|
|
1273
1273
|
this.warnNeverLoaded();
|
|
1274
1274
|
this.warnDropped();
|
|
1275
|
+
return this.held.length === 0;
|
|
1275
1276
|
}
|
|
1276
1277
|
waitForFirstLoad(timeoutMs) {
|
|
1277
1278
|
const firstLoad = this.firstLoad();
|
|
@@ -2094,9 +2095,14 @@ __export(http_exports, {
|
|
|
2094
2095
|
});
|
|
2095
2096
|
async function releaseHeldExternalSpans(timeoutMs) {
|
|
2096
2097
|
const deadline = Date.now() + Math.max(timeoutMs, 0);
|
|
2098
|
+
let released = true;
|
|
2097
2099
|
for (const client of [...liveHttpClients]) {
|
|
2098
|
-
await client.releaseHeldExternalSpans?.(
|
|
2100
|
+
const result = await client.releaseHeldExternalSpans?.(
|
|
2101
|
+
Math.max(0, deadline - Date.now())
|
|
2102
|
+
);
|
|
2103
|
+
released = result !== false && released;
|
|
2099
2104
|
}
|
|
2105
|
+
return released;
|
|
2100
2106
|
}
|
|
2101
2107
|
function stopSimulationPlans() {
|
|
2102
2108
|
for (const client of [...liveHttpClients]) {
|
|
@@ -2113,14 +2119,15 @@ function awaitOnExit(promise) {
|
|
|
2113
2119
|
}
|
|
2114
2120
|
async function flushTraces(timeoutMs = 5e3) {
|
|
2115
2121
|
const deadline = Date.now() + Math.max(timeoutMs, 0);
|
|
2116
|
-
await releaseHeldExternalSpans(planWaitSliceMs(timeoutMs));
|
|
2122
|
+
const released = await releaseHeldExternalSpans(planWaitSliceMs(timeoutMs));
|
|
2117
2123
|
const requestsFlushed = await awaitPendingRequests(
|
|
2118
2124
|
Math.max(0, deadline - Date.now())
|
|
2119
2125
|
);
|
|
2126
|
+
const releasedAfterDeferred = await releaseHeldExternalSpans(0);
|
|
2120
2127
|
const transportsFlushed = await flushTraceTransports(
|
|
2121
2128
|
Math.max(0, deadline - Date.now())
|
|
2122
2129
|
);
|
|
2123
|
-
return requestsFlushed && transportsFlushed;
|
|
2130
|
+
return released && releasedAfterDeferred && requestsFlushed && transportsFlushed;
|
|
2124
2131
|
}
|
|
2125
2132
|
async function awaitPendingRequests(timeoutMs = DEFAULT_LIFECYCLE_TIMEOUT_MS2) {
|
|
2126
2133
|
await replayContextReady.catch(() => {
|
|
@@ -2530,13 +2537,17 @@ var init_http = __esm({
|
|
|
2530
2537
|
*/
|
|
2531
2538
|
async settleDeferredWork(timeoutMs = DEFAULT_LIFECYCLE_TIMEOUT_MS2) {
|
|
2532
2539
|
const deadline = Date.now() + Math.max(timeoutMs, 0);
|
|
2533
|
-
await this.releaseHeldExternalSpans?.(
|
|
2540
|
+
const released = await this.releaseHeldExternalSpans?.(
|
|
2541
|
+
planWaitSliceMs(timeoutMs)
|
|
2542
|
+
);
|
|
2534
2543
|
await replayContextReady.catch(() => {
|
|
2535
2544
|
});
|
|
2536
|
-
|
|
2545
|
+
const settled2 = await waitForPromises(
|
|
2537
2546
|
Array.from(this.deferredWork),
|
|
2538
2547
|
Math.max(0, deadline - Date.now())
|
|
2539
2548
|
);
|
|
2549
|
+
const releasedAfterDeferred = await this.releaseHeldExternalSpans?.(0);
|
|
2550
|
+
return released !== false && releasedAfterDeferred !== false && settled2;
|
|
2540
2551
|
}
|
|
2541
2552
|
/**
|
|
2542
2553
|
* Wait for spans queued by this client to be delivered, within one deadline.
|
|
@@ -2561,7 +2572,9 @@ var init_http = __esm({
|
|
|
2561
2572
|
}
|
|
2562
2573
|
const deadline = Date.now() + Math.max(timeoutMs, 0);
|
|
2563
2574
|
this.closing = (async () => {
|
|
2564
|
-
await this.releaseHeldExternalSpans?.(
|
|
2575
|
+
const released = await this.releaseHeldExternalSpans?.(
|
|
2576
|
+
planWaitSliceMs(timeoutMs)
|
|
2577
|
+
);
|
|
2565
2578
|
this.stopSimulationPlan?.();
|
|
2566
2579
|
this.externalSpanTransform = void 0;
|
|
2567
2580
|
this.externalTraceTransform = void 0;
|
|
@@ -2575,7 +2588,7 @@ var init_http = __esm({
|
|
|
2575
2588
|
const transport = this.traceTransport;
|
|
2576
2589
|
this.traceTransport = void 0;
|
|
2577
2590
|
const shutdownOk = await transport?.shutdown(Math.max(0, deadline - Date.now())) ?? true;
|
|
2578
|
-
return settled2 && shutdownOk;
|
|
2591
|
+
return released !== false && settled2 && shutdownOk;
|
|
2579
2592
|
})();
|
|
2580
2593
|
return this.closing;
|
|
2581
2594
|
}
|
|
@@ -4009,6 +4022,12 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4009
4022
|
}
|
|
4010
4023
|
}
|
|
4011
4024
|
const attempts = resolveAttempts(options?.attempts);
|
|
4025
|
+
const maxConcurrency = options?.maxConcurrency ?? 10;
|
|
4026
|
+
if (!Number.isInteger(maxConcurrency) || maxConcurrency < 1) {
|
|
4027
|
+
throw new BitfabError(
|
|
4028
|
+
`maxConcurrency must be a positive integer (got ${maxConcurrency}).`
|
|
4029
|
+
);
|
|
4030
|
+
}
|
|
4012
4031
|
await replayContextReady;
|
|
4013
4032
|
let codeChangeDescription = options?.codeChangeDescription;
|
|
4014
4033
|
let codeChangeFiles = options?.codeChangeFiles;
|
|
@@ -4055,7 +4074,6 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4055
4074
|
}
|
|
4056
4075
|
}
|
|
4057
4076
|
const mockStrategy = options?.mock ?? "marked";
|
|
4058
|
-
const maxConcurrency = options?.maxConcurrency ?? 10;
|
|
4059
4077
|
const fullTestRunUrl = `${serviceUrl}${testRunUrl}`;
|
|
4060
4078
|
const resolvedOverrides = [
|
|
4061
4079
|
...normalizeMockOverrides(options?.mockOverride),
|
|
@@ -4152,6 +4170,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4152
4170
|
originalDurationMs: item.originalDurationMs,
|
|
4153
4171
|
originalTokens: item.originalTokens,
|
|
4154
4172
|
originalModel: item.originalModel,
|
|
4173
|
+
ingestionType: item.ingestionType,
|
|
4155
4174
|
tokens: item.tokens,
|
|
4156
4175
|
model: item.model,
|
|
4157
4176
|
dbSnapshotRef: item.dbSnapshotRef,
|
|
@@ -5992,6 +6011,14 @@ var LabelsClient = class {
|
|
|
5992
6011
|
);
|
|
5993
6012
|
return response.labels;
|
|
5994
6013
|
}
|
|
6014
|
+
/** Withhold a verdict for a trace or replay attempt whose check did not run. */
|
|
6015
|
+
async skip(target, testRunId) {
|
|
6016
|
+
return this.save({ ...target, skip: true }, testRunId);
|
|
6017
|
+
}
|
|
6018
|
+
/** Clear a previous verdict for a trace, replay attempt, or assertion. */
|
|
6019
|
+
async archive(target, testRunId) {
|
|
6020
|
+
return this.save({ ...target, archive: true }, testRunId);
|
|
6021
|
+
}
|
|
5995
6022
|
async saveHuman(update) {
|
|
5996
6023
|
const [outcome] = await this.saveHumanAll([update]);
|
|
5997
6024
|
return outcome;
|
|
@@ -6910,6 +6937,15 @@ var BitfabLangGraphIntegration = class {
|
|
|
6910
6937
|
// src/client.ts
|
|
6911
6938
|
init_mockOverride();
|
|
6912
6939
|
|
|
6940
|
+
// src/streamFinalizationError.ts
|
|
6941
|
+
var StreamFinalizationError = class extends Error {
|
|
6942
|
+
constructor(message, output) {
|
|
6943
|
+
super(message);
|
|
6944
|
+
this.output = output;
|
|
6945
|
+
this.name = "StreamFinalizationError";
|
|
6946
|
+
}
|
|
6947
|
+
};
|
|
6948
|
+
|
|
6913
6949
|
// src/openaiAgentSdk.ts
|
|
6914
6950
|
var BitfabOpenAIAgentHandler = class {
|
|
6915
6951
|
constructor(config) {
|
|
@@ -6949,7 +6985,11 @@ var BitfabOpenAIAgentHandler = class {
|
|
|
6949
6985
|
if (isStreaming && res?.completed) {
|
|
6950
6986
|
try {
|
|
6951
6987
|
await res.completed;
|
|
6952
|
-
} catch {
|
|
6988
|
+
} catch (error) {
|
|
6989
|
+
throw new StreamFinalizationError(
|
|
6990
|
+
error instanceof Error ? error.message : String(error),
|
|
6991
|
+
res.finalOutput
|
|
6992
|
+
);
|
|
6953
6993
|
}
|
|
6954
6994
|
}
|
|
6955
6995
|
return res?.finalOutput;
|
|
@@ -7707,17 +7747,6 @@ function runWithSeedContext(ctx, fn) {
|
|
|
7707
7747
|
init_serialize();
|
|
7708
7748
|
init_simulationPlan();
|
|
7709
7749
|
init_spanOrigin();
|
|
7710
|
-
|
|
7711
|
-
// src/streamFinalizationError.ts
|
|
7712
|
-
var StreamFinalizationError = class extends Error {
|
|
7713
|
-
constructor(message, output) {
|
|
7714
|
-
super(message);
|
|
7715
|
-
this.output = output;
|
|
7716
|
-
this.name = "StreamFinalizationError";
|
|
7717
|
-
}
|
|
7718
|
-
};
|
|
7719
|
-
|
|
7720
|
-
// src/client.ts
|
|
7721
7750
|
init_traceMetadata();
|
|
7722
7751
|
|
|
7723
7752
|
// src/traces.ts
|