bitfab 0.64.27 → 0.64.29
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-A3BOXSQY.js → chunk-24JBL2FV.js} +6 -3
- package/dist/{chunk-A3BOXSQY.js.map → chunk-24JBL2FV.js.map} +1 -1
- package/dist/{chunk-CJRTXQ2W.js → chunk-E2N56K23.js} +9 -2
- package/dist/chunk-E2N56K23.js.map +1 -0
- package/dist/{chunk-LURRKFWC.js → chunk-LOR3CWDQ.js} +11 -5
- package/dist/{chunk-LURRKFWC.js.map → chunk-LOR3CWDQ.js.map} +1 -1
- package/dist/{chunk-FKTXL2GZ.js → chunk-RC6IC2EL.js} +6 -3
- package/dist/{chunk-FKTXL2GZ.js.map → chunk-RC6IC2EL.js.map} +1 -1
- package/dist/{chunk-ZHLRO2UG.js → chunk-W2AQ56UP.js} +16 -7
- package/dist/chunk-W2AQ56UP.js.map +1 -0
- package/dist/{chunk-IVRZ7SCM.js → chunk-W5DDLKC5.js} +9 -2
- package/dist/chunk-W5DDLKC5.js.map +1 -0
- package/dist/{http-EO7TNOR3.js → http-6UJ47MDP.js} +2 -2
- package/dist/{http-N5AVQDKY.js → http-S33OM4NK.js} +2 -2
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -5
- package/dist/index.d.ts +34 -5
- package/dist/index.js +3 -3
- package/dist/node.cjs +22 -3
- 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-WBXXBPW2.js → replay-MBMPKUFX.js} +3 -3
- package/dist/{replay-D75EK727.js → replay-RSAJN6YA.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-CJRTXQ2W.js.map +0 -1
- package/dist/chunk-IVRZ7SCM.js.map +0 -1
- package/dist/chunk-ZHLRO2UG.js.map +0 -1
- /package/dist/{http-EO7TNOR3.js.map → http-6UJ47MDP.js.map} +0 -0
- /package/dist/{http-N5AVQDKY.js.map → http-S33OM4NK.js.map} +0 -0
- /package/dist/{replay-D75EK727.js.map → replay-MBMPKUFX.js.map} +0 -0
- /package/dist/{replay-WBXXBPW2.js.map → replay-RSAJN6YA.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -733,7 +733,7 @@ declare class HttpClient {
|
|
|
733
733
|
* Start a replay session by fetching historical traces.
|
|
734
734
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
735
735
|
*/
|
|
736
|
-
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, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
|
|
736
|
+
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, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, experimentGroupName?: string, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
|
|
737
737
|
resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
|
|
738
738
|
/**
|
|
739
739
|
* Fetch an external span by ID.
|
|
@@ -1511,6 +1511,8 @@ type ExperimentTally = {
|
|
|
1511
1511
|
classified: number;
|
|
1512
1512
|
passing: number;
|
|
1513
1513
|
failing: number;
|
|
1514
|
+
/** Failing verdicts where the judge abstained on every attempt because it could not find the evidence. */
|
|
1515
|
+
abstained: number;
|
|
1514
1516
|
};
|
|
1515
1517
|
type ExperimentTotals = {
|
|
1516
1518
|
total: number;
|
|
@@ -1860,9 +1862,11 @@ declare class TracesClient {
|
|
|
1860
1862
|
}
|
|
1861
1863
|
|
|
1862
1864
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
1863
|
-
type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
|
|
1865
|
+
type LabelAction = "set" | "archived" | "no-active-label" | "skipped" | "abstained";
|
|
1864
1866
|
type LabelStatus = "labeled" | "skipped" | "unlabeled";
|
|
1865
1867
|
type LabelSource = "human" | "agent";
|
|
1868
|
+
/** An assertion verdict. `abstained` means the judge could not find the evidence the assertion needs; it counts as a fail. */
|
|
1869
|
+
type Verdict = "pass" | "fail" | "abstained";
|
|
1866
1870
|
type LabelAddress = {
|
|
1867
1871
|
traceId: string;
|
|
1868
1872
|
originalTraceId?: never;
|
|
@@ -1886,6 +1890,9 @@ type LabelVerdict = {
|
|
|
1886
1890
|
} | {
|
|
1887
1891
|
skip: true;
|
|
1888
1892
|
annotation?: string;
|
|
1893
|
+
} | {
|
|
1894
|
+
abstain: true;
|
|
1895
|
+
annotation?: string;
|
|
1889
1896
|
};
|
|
1890
1897
|
type LabelUpdate = (LabelTarget & LabelVerdict) | (ArchiveLabelTarget & {
|
|
1891
1898
|
archive: true;
|
|
@@ -1914,6 +1921,8 @@ type AssertionVerdict = {
|
|
|
1914
1921
|
assertion: string | null;
|
|
1915
1922
|
labelStatus: LabelStatus;
|
|
1916
1923
|
label: boolean | null;
|
|
1924
|
+
/** The verdict, or null when there is none. `label` carries the same verdict as a boolean, false for both fail and abstained. */
|
|
1925
|
+
verdict: Verdict | null;
|
|
1917
1926
|
annotation: string | null;
|
|
1918
1927
|
evidence: Justification | null;
|
|
1919
1928
|
confidence: LabelConfidence | null;
|
|
@@ -1929,6 +1938,8 @@ type TraceLabels = {
|
|
|
1929
1938
|
approved: boolean;
|
|
1930
1939
|
passed: number;
|
|
1931
1940
|
failed: number;
|
|
1941
|
+
/** How many of the failed assertion verdicts are abstentions, where the judge could not find the evidence. */
|
|
1942
|
+
abstained: number;
|
|
1932
1943
|
assertions: AssertionVerdict[];
|
|
1933
1944
|
};
|
|
1934
1945
|
declare class LabelsClient {
|
|
@@ -1939,6 +1950,15 @@ declare class LabelsClient {
|
|
|
1939
1950
|
skip(target: LabelTarget & {
|
|
1940
1951
|
annotation?: string;
|
|
1941
1952
|
}, experimentId?: string): Promise<LabelOutcome>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Record that the evidence does not show the part of the run this assertion
|
|
1955
|
+
* checks, so there was nothing to judge. Counted as a fail in every pass
|
|
1956
|
+
* rate, but stored and read back as an abstention, apart from a fail. Pass
|
|
1957
|
+
* `annotation` to say what the evidence would have had to show.
|
|
1958
|
+
*/
|
|
1959
|
+
abstain(target: LabelTarget & {
|
|
1960
|
+
annotation?: string;
|
|
1961
|
+
}, experimentId?: string): Promise<LabelOutcome>;
|
|
1942
1962
|
archive(target: ArchiveLabelTarget, experimentId?: string): Promise<LabelOutcome>;
|
|
1943
1963
|
saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
|
|
1944
1964
|
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
@@ -2393,8 +2413,17 @@ interface ReplayOptions {
|
|
|
2393
2413
|
* not use the historical data you asked for.
|
|
2394
2414
|
*/
|
|
2395
2415
|
dbBranch?: DbBranchOptions | boolean;
|
|
2396
|
-
/**
|
|
2416
|
+
/**
|
|
2417
|
+
* Experiment group this replay joins, shown together on the experiments
|
|
2418
|
+
* page. An ID with no group yet creates the group.
|
|
2419
|
+
*/
|
|
2397
2420
|
experimentGroupId?: string;
|
|
2421
|
+
/**
|
|
2422
|
+
* Name for the experiment group in `experimentGroupId`. Applied when this
|
|
2423
|
+
* replay creates the group, or when the group exists without a name. A group
|
|
2424
|
+
* that already has a name keeps it. Requires `experimentGroupId`.
|
|
2425
|
+
*/
|
|
2426
|
+
experimentGroupName?: string;
|
|
2398
2427
|
/**
|
|
2399
2428
|
* Dataset this replay runs against. Mutually exclusive with `datasetIds`.
|
|
2400
2429
|
* Alone it replays the dataset's full membership, and with `traceIds` it
|
|
@@ -4222,7 +4251,7 @@ interface CommitRef {
|
|
|
4222
4251
|
/**
|
|
4223
4252
|
* SDK version from package.json (injected at build time)
|
|
4224
4253
|
*/
|
|
4225
|
-
declare const __version__ = "0.64.
|
|
4254
|
+
declare const __version__ = "0.64.29";
|
|
4226
4255
|
|
|
4227
4256
|
/**
|
|
4228
4257
|
* Constants for the Bitfab SDK.
|
|
@@ -4361,4 +4390,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
4361
4390
|
run?: boolean;
|
|
4362
4391
|
}): Promise<SeedResult>;
|
|
4363
4392
|
|
|
4364
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioHistoryEntry, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
|
4393
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioHistoryEntry, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type Verdict, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -733,7 +733,7 @@ declare class HttpClient {
|
|
|
733
733
|
* Start a replay session by fetching historical traces.
|
|
734
734
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
735
735
|
*/
|
|
736
|
-
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, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
|
|
736
|
+
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, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>, dryRun?: boolean, experimentGroupName?: string, invocation?: ReplayInvocation): Promise<StartReplayResponse>;
|
|
737
737
|
resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
|
|
738
738
|
/**
|
|
739
739
|
* Fetch an external span by ID.
|
|
@@ -1511,6 +1511,8 @@ type ExperimentTally = {
|
|
|
1511
1511
|
classified: number;
|
|
1512
1512
|
passing: number;
|
|
1513
1513
|
failing: number;
|
|
1514
|
+
/** Failing verdicts where the judge abstained on every attempt because it could not find the evidence. */
|
|
1515
|
+
abstained: number;
|
|
1514
1516
|
};
|
|
1515
1517
|
type ExperimentTotals = {
|
|
1516
1518
|
total: number;
|
|
@@ -1860,9 +1862,11 @@ declare class TracesClient {
|
|
|
1860
1862
|
}
|
|
1861
1863
|
|
|
1862
1864
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
1863
|
-
type LabelAction = "set" | "archived" | "no-active-label" | "skipped";
|
|
1865
|
+
type LabelAction = "set" | "archived" | "no-active-label" | "skipped" | "abstained";
|
|
1864
1866
|
type LabelStatus = "labeled" | "skipped" | "unlabeled";
|
|
1865
1867
|
type LabelSource = "human" | "agent";
|
|
1868
|
+
/** An assertion verdict. `abstained` means the judge could not find the evidence the assertion needs; it counts as a fail. */
|
|
1869
|
+
type Verdict = "pass" | "fail" | "abstained";
|
|
1866
1870
|
type LabelAddress = {
|
|
1867
1871
|
traceId: string;
|
|
1868
1872
|
originalTraceId?: never;
|
|
@@ -1886,6 +1890,9 @@ type LabelVerdict = {
|
|
|
1886
1890
|
} | {
|
|
1887
1891
|
skip: true;
|
|
1888
1892
|
annotation?: string;
|
|
1893
|
+
} | {
|
|
1894
|
+
abstain: true;
|
|
1895
|
+
annotation?: string;
|
|
1889
1896
|
};
|
|
1890
1897
|
type LabelUpdate = (LabelTarget & LabelVerdict) | (ArchiveLabelTarget & {
|
|
1891
1898
|
archive: true;
|
|
@@ -1914,6 +1921,8 @@ type AssertionVerdict = {
|
|
|
1914
1921
|
assertion: string | null;
|
|
1915
1922
|
labelStatus: LabelStatus;
|
|
1916
1923
|
label: boolean | null;
|
|
1924
|
+
/** The verdict, or null when there is none. `label` carries the same verdict as a boolean, false for both fail and abstained. */
|
|
1925
|
+
verdict: Verdict | null;
|
|
1917
1926
|
annotation: string | null;
|
|
1918
1927
|
evidence: Justification | null;
|
|
1919
1928
|
confidence: LabelConfidence | null;
|
|
@@ -1929,6 +1938,8 @@ type TraceLabels = {
|
|
|
1929
1938
|
approved: boolean;
|
|
1930
1939
|
passed: number;
|
|
1931
1940
|
failed: number;
|
|
1941
|
+
/** How many of the failed assertion verdicts are abstentions, where the judge could not find the evidence. */
|
|
1942
|
+
abstained: number;
|
|
1932
1943
|
assertions: AssertionVerdict[];
|
|
1933
1944
|
};
|
|
1934
1945
|
declare class LabelsClient {
|
|
@@ -1939,6 +1950,15 @@ declare class LabelsClient {
|
|
|
1939
1950
|
skip(target: LabelTarget & {
|
|
1940
1951
|
annotation?: string;
|
|
1941
1952
|
}, experimentId?: string): Promise<LabelOutcome>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Record that the evidence does not show the part of the run this assertion
|
|
1955
|
+
* checks, so there was nothing to judge. Counted as a fail in every pass
|
|
1956
|
+
* rate, but stored and read back as an abstention, apart from a fail. Pass
|
|
1957
|
+
* `annotation` to say what the evidence would have had to show.
|
|
1958
|
+
*/
|
|
1959
|
+
abstain(target: LabelTarget & {
|
|
1960
|
+
annotation?: string;
|
|
1961
|
+
}, experimentId?: string): Promise<LabelOutcome>;
|
|
1942
1962
|
archive(target: ArchiveLabelTarget, experimentId?: string): Promise<LabelOutcome>;
|
|
1943
1963
|
saveHuman(update: HumanLabelUpdate): Promise<HumanLabelOutcome>;
|
|
1944
1964
|
saveHumanAll(updates: HumanLabelUpdate[]): Promise<HumanLabelOutcome[]>;
|
|
@@ -2393,8 +2413,17 @@ interface ReplayOptions {
|
|
|
2393
2413
|
* not use the historical data you asked for.
|
|
2394
2414
|
*/
|
|
2395
2415
|
dbBranch?: DbBranchOptions | boolean;
|
|
2396
|
-
/**
|
|
2416
|
+
/**
|
|
2417
|
+
* Experiment group this replay joins, shown together on the experiments
|
|
2418
|
+
* page. An ID with no group yet creates the group.
|
|
2419
|
+
*/
|
|
2397
2420
|
experimentGroupId?: string;
|
|
2421
|
+
/**
|
|
2422
|
+
* Name for the experiment group in `experimentGroupId`. Applied when this
|
|
2423
|
+
* replay creates the group, or when the group exists without a name. A group
|
|
2424
|
+
* that already has a name keeps it. Requires `experimentGroupId`.
|
|
2425
|
+
*/
|
|
2426
|
+
experimentGroupName?: string;
|
|
2398
2427
|
/**
|
|
2399
2428
|
* Dataset this replay runs against. Mutually exclusive with `datasetIds`.
|
|
2400
2429
|
* Alone it replays the dataset's full membership, and with `traceIds` it
|
|
@@ -4222,7 +4251,7 @@ interface CommitRef {
|
|
|
4222
4251
|
/**
|
|
4223
4252
|
* SDK version from package.json (injected at build time)
|
|
4224
4253
|
*/
|
|
4225
|
-
declare const __version__ = "0.64.
|
|
4254
|
+
declare const __version__ = "0.64.29";
|
|
4226
4255
|
|
|
4227
4256
|
/**
|
|
4228
4257
|
* Constants for the Bitfab SDK.
|
|
@@ -4361,4 +4390,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
4361
4390
|
run?: boolean;
|
|
4362
4391
|
}): Promise<SeedResult>;
|
|
4363
4392
|
|
|
4364
|
-
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioHistoryEntry, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
|
4393
|
+
export { type ActiveSpanContext, type AdaptContext, type AdaptInputsFn, type AddDatasetGradersResult, type AddDatasetTracesResult, type AllowedEnvVars, type ApprovalFields, type ApprovalState, type Approver, type ArchiveAssertionsParams, type ArchiveLabelTarget, AssertionCategoriesClient, type AssertionCategory, type AssertionCategorySummary, type AssertionEvidenceParameter, type AssertionGeneration, AssertionGenerationError, type AssertionGenerationStatus, AssertionGenerationTimeoutError, type AssertionLabelEvidence, type AssertionVerdict, type Assignee, BITFAB_PROGRESS_PREFIX, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler as BitfabLangChainCallbackHandler, BitfabLangGraphCallbackHandler, BitfabLangGraphIntegration, type BitfabLanguageModelMiddleware, BitfabOpenAIAgentHandler, BitfabOpenAITracingProcessor, BitfabRivetIntegration, BitfabVercelAiHandler, type CaptureSurface, type CaptureWhen, type CapturedSpan, type CodeChangeFile, type CommitRef, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type Dataset, type DatasetGraderRef, type DatasetTraceIds, DatasetsClient, type DbBranchOptions, DbBranchReplayError, type DbBranchTimings, type DbSnapshotConfig, type DbSnapshotProvider, type DbSnapshotRef, type DetachedTrace, type Experiment, type ExperimentCategoryTally, type ExperimentCodeChangeTotals, type ExperimentJitter, type ExperimentPage, type ExperimentRollup, type ExperimentRollupResult, type ExperimentRunBy, type ExperimentStatus, type ExperimentTally, type ExperimentTotals, ExperimentsClient, type GenerateAssertionsOptions, type GetGraderLabelsParams, type GraderLabel, type GraderLabelOutcome, type GraderLabelSource, type GraderLabelUpdate, type GraderRerun, GraderRerunError, type GraderRerunProgress, type GraderRerunResult, type GraderRerunStatus, GraderRerunTimeoutError, GradersClient, HttpClient, type HumanLabelOutcome, type HumanLabelUpdate, type Justification, type JustificationSpan, type LabelAction, type LabelConfidence, type LabelOutcome, type LabelSource, type LabelStatus, type LabelTarget, type LabelUpdate, LabelsClient, type LangGraphIntegrationOptions, type ListDatasetsParams, type ListExperimentsParams, type ListedSpan, MixedTracingError, type MockOverride, type MockOverrideCtx, type MockOverrideInput, type MockOverrideResolver, type MockStrategy, type MockValue, NO_MOCK_OVERRIDE, type NodeMatcher, type NodeMethodDecorator, type NodeOptions, type OrganizationMember, OrganizationMembersClient, type ProviderDefinition, type RemoveDatasetGradersResult, type RemoveDatasetTracesResult, ReplayBranch, ReplayError, type ReplayExperiment, type ReplayInterrupt, type ReplayInterruptSignal, type ReplayItem, type ReplayItemFinishProgress, type ReplayItemStartProgress, type ReplayNodeIdentity, type ReplayOptions, type ReplayOptionsFactory, type ReplayProgress, type ReplayProgressItem, type ReplayRegistration, type ReplayRegistry, type ReplayRegistryContext, type ReplayRegistryOptions, type ReplayResult, type RerunGradersOptions, type RerunGradersResult, type ReseedOptions, type ReseedRegistryResult, type ReseedResult, type RivetContextLike, type RivetEffectType, type RivetIntegrationOptions, SUPPORTED_PROVIDERS, type SaveAssertion, type SaveAssertionCategoryParams, type SaveAssertionsAllParams, type SaveAssertionsParams, type SaveDatasetParams, type SaveDatasetResult, type SaveScenarioActualOutcome, type SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type Scenario, type ScenarioAction, type ScenarioActualOutcome, type ScenarioData, type ScenarioDataAppend, type ScenarioDataOrigin, type ScenarioHistoryEntry, type ScenarioSource, type ScenarioTrigger, type SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, type SpanListField, type SpanListParams, type SpanListResult, type SpanLookup, type SpanMethodDecorator, type SpanMethodDecoratorContext, type SpanNodeMeta, type SpanOccurrence, type SpanOptions, type SpanType, SpansClient, type TokenUsage, type TraceAssertion, type TraceAssertionSource, type TraceAssertionsResult, type TraceAssertionsUpdate, type TraceIngestionType, type TraceLabels, type TraceResponse, type TraceSearchFilters, type TraceSearchParams, type TraceSearchResult, type TraceTarget, type TraceTargetOccurrence, TracesClient, type TracingProcessor, type UpdateDatasetParams, type VercelCallParams, type VercelGenerateResult, type VercelStreamResult, type Verdict, type WrapBAMLOptions, type WrappedBamlFn, __version__, defineReplayRegistry, finalizers, flushTraces, getCurrentReplayBranch, getCurrentSpan, getCurrentTrace, reportReplayProgress, reseedFromRegistry, seedFromRegistry, serializeReplayResult };
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
getCurrentTrace,
|
|
38
38
|
reseedFromRegistry,
|
|
39
39
|
seedFromRegistry
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-W2AQ56UP.js";
|
|
41
41
|
import "./chunk-YWXQM6J3.js";
|
|
42
42
|
import {
|
|
43
43
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
ReplayError,
|
|
47
47
|
reportReplayProgress,
|
|
48
48
|
serializeReplayResult
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-E2N56K23.js";
|
|
50
50
|
import {
|
|
51
51
|
BitfabError,
|
|
52
52
|
DEFAULT_SERVICE_URL,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
MixedTracingError,
|
|
55
55
|
__version__,
|
|
56
56
|
flushTraces
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-24JBL2FV.js";
|
|
58
58
|
import "./chunk-MT36GJMW.js";
|
|
59
59
|
export {
|
|
60
60
|
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.64.
|
|
100
|
+
__version__ = "0.64.29";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -2935,7 +2935,7 @@ var init_http = __esm({
|
|
|
2935
2935
|
* Start a replay session by fetching historical traces.
|
|
2936
2936
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
2937
2937
|
*/
|
|
2938
|
-
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, invocation) {
|
|
2938
|
+
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, experimentGroupName, invocation) {
|
|
2939
2939
|
const payload = { traceFunctionKey };
|
|
2940
2940
|
if (experimentalSelectiveReplay !== void 0) {
|
|
2941
2941
|
payload.experimentalSelectiveReplay = experimentalSelectiveReplay;
|
|
@@ -2968,6 +2968,9 @@ var init_http = __esm({
|
|
|
2968
2968
|
if (experimentGroupId !== void 0) {
|
|
2969
2969
|
payload.experimentGroupId = experimentGroupId;
|
|
2970
2970
|
}
|
|
2971
|
+
if (experimentGroupName !== void 0) {
|
|
2972
|
+
payload.experimentGroupName = experimentGroupName;
|
|
2973
|
+
}
|
|
2971
2974
|
if (datasetIds !== void 0) {
|
|
2972
2975
|
if (datasetIds.length === 1) {
|
|
2973
2976
|
payload.datasetId = datasetIds[0];
|
|
@@ -4787,6 +4790,11 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4787
4790
|
"force only applies when resuming an experiment. Pass it together with resume."
|
|
4788
4791
|
);
|
|
4789
4792
|
}
|
|
4793
|
+
if (options?.experimentGroupName !== void 0 && options.experimentGroupId === void 0) {
|
|
4794
|
+
throw new BitfabError(
|
|
4795
|
+
"experimentGroupName only applies with experimentGroupId. Pass it together with experimentGroupId."
|
|
4796
|
+
);
|
|
4797
|
+
}
|
|
4790
4798
|
if (options?.experimentalSelectiveReplay !== void 0) {
|
|
4791
4799
|
validateSelectiveReplayOptions(options.experimentalSelectiveReplay);
|
|
4792
4800
|
if ((options.mock ?? "marked") !== "marked" || normalizeMockOverrides(options.mockOverride).length > 0 || registeredOverrides.length > 0) {
|
|
@@ -4861,6 +4869,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4861
4869
|
options?.notes,
|
|
4862
4870
|
options?.metadata,
|
|
4863
4871
|
options?.dryRun === true,
|
|
4872
|
+
options?.experimentGroupName,
|
|
4864
4873
|
safeReplayInvocation(
|
|
4865
4874
|
() => buildReplayInvocation(
|
|
4866
4875
|
Object.entries(cliFlags(options) ?? explicitReplayOptions(options))
|
|
@@ -5313,6 +5322,7 @@ var init_replay = __esm({
|
|
|
5313
5322
|
"mockOverride",
|
|
5314
5323
|
"dbBranch",
|
|
5315
5324
|
"experimentGroupId",
|
|
5325
|
+
"experimentGroupName",
|
|
5316
5326
|
"datasetId",
|
|
5317
5327
|
"datasetIds",
|
|
5318
5328
|
"graderIds",
|
|
@@ -7162,7 +7172,7 @@ function assertEveryVerdictNamesAnAssertion(updates) {
|
|
|
7162
7172
|
(update) => update.traceId ?? update.originalTraceId
|
|
7163
7173
|
);
|
|
7164
7174
|
throw new BitfabError(
|
|
7165
|
-
`Agent verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.save, saveAll, and
|
|
7175
|
+
`Agent verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.save, saveAll, skip, and abstain. Only archive may omit it, to clear an old whole-trace verdict.`
|
|
7166
7176
|
);
|
|
7167
7177
|
}
|
|
7168
7178
|
}
|
|
@@ -7202,6 +7212,15 @@ var LabelsClient = class {
|
|
|
7202
7212
|
async skip(target, experimentId) {
|
|
7203
7213
|
return this.save({ ...target, skip: true }, experimentId);
|
|
7204
7214
|
}
|
|
7215
|
+
/**
|
|
7216
|
+
* Record that the evidence does not show the part of the run this assertion
|
|
7217
|
+
* checks, so there was nothing to judge. Counted as a fail in every pass
|
|
7218
|
+
* rate, but stored and read back as an abstention, apart from a fail. Pass
|
|
7219
|
+
* `annotation` to say what the evidence would have had to show.
|
|
7220
|
+
*/
|
|
7221
|
+
async abstain(target, experimentId) {
|
|
7222
|
+
return this.save({ ...target, abstain: true }, experimentId);
|
|
7223
|
+
}
|
|
7205
7224
|
async archive(target, experimentId) {
|
|
7206
7225
|
return this.save({ ...target, archive: true }, experimentId);
|
|
7207
7226
|
}
|