@bitfab/sdk 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-AXFICSPS.js → chunk-2YYVO4RI.js} +11 -5
- package/dist/{chunk-AXFICSPS.js.map → chunk-2YYVO4RI.js.map} +1 -1
- package/dist/{chunk-OYTAKT5B.js → chunk-BDPDIXLA.js} +16 -7
- package/dist/chunk-BDPDIXLA.js.map +1 -0
- package/dist/{chunk-HTRMFABJ.js → chunk-CBF3YILJ.js} +6 -3
- package/dist/{chunk-HTRMFABJ.js.map → chunk-CBF3YILJ.js.map} +1 -1
- package/dist/{chunk-FOAYPDCS.js → chunk-KDYML76E.js} +9 -2
- package/dist/chunk-KDYML76E.js.map +1 -0
- package/dist/{chunk-DWQ36HBO.js → chunk-Q74E5WXG.js} +6 -3
- package/dist/{chunk-DWQ36HBO.js.map → chunk-Q74E5WXG.js.map} +1 -1
- package/dist/{chunk-MROIROUR.js → chunk-UIDS5FUO.js} +9 -2
- package/dist/chunk-UIDS5FUO.js.map +1 -0
- package/dist/{http-DUDJA3SE.js → http-7AS2BELK.js} +2 -2
- package/dist/{http-2ZLYPJ27.js → http-CTG3RWQO.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-JYRJ443I.js → replay-FSWT222C.js} +3 -3
- package/dist/{replay-2S663YTX.js → replay-JV22WC77.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-FOAYPDCS.js.map +0 -1
- package/dist/chunk-MROIROUR.js.map +0 -1
- package/dist/chunk-OYTAKT5B.js.map +0 -1
- /package/dist/{http-2ZLYPJ27.js.map → http-7AS2BELK.js.map} +0 -0
- /package/dist/{http-DUDJA3SE.js.map → http-CTG3RWQO.js.map} +0 -0
- /package/dist/{replay-2S663YTX.js.map → replay-FSWT222C.js.map} +0 -0
- /package/dist/{replay-JYRJ443I.js.map → replay-JV22WC77.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
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getCurrentTrace,
|
|
29
29
|
reseedFromRegistry,
|
|
30
30
|
seedFromRegistry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BDPDIXLA.js";
|
|
32
32
|
import "./chunk-YWXQM6J3.js";
|
|
33
33
|
import {
|
|
34
34
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
ReplayError,
|
|
38
38
|
reportReplayProgress,
|
|
39
39
|
serializeReplayResult
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UIDS5FUO.js";
|
|
41
41
|
import {
|
|
42
42
|
BitfabError,
|
|
43
43
|
DEFAULT_SERVICE_URL,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
MixedTracingError,
|
|
46
46
|
__version__,
|
|
47
47
|
flushTraces
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-CBF3YILJ.js";
|
|
49
49
|
import "./chunk-MT36GJMW.js";
|
|
50
50
|
export {
|
|
51
51
|
AssertionCategoriesClient,
|
package/dist/node.cjs
CHANGED
|
@@ -88,7 +88,7 @@ var __version__, __packageName__;
|
|
|
88
88
|
var init_version_generated = __esm({
|
|
89
89
|
"src/version.generated.ts"() {
|
|
90
90
|
"use strict";
|
|
91
|
-
__version__ = "0.64.
|
|
91
|
+
__version__ = "0.64.29";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -2926,7 +2926,7 @@ var init_http = __esm({
|
|
|
2926
2926
|
* Start a replay session by fetching historical traces.
|
|
2927
2927
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
2928
2928
|
*/
|
|
2929
|
-
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, invocation) {
|
|
2929
|
+
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata, dryRun, experimentGroupName, invocation) {
|
|
2930
2930
|
const payload = { traceFunctionKey };
|
|
2931
2931
|
if (experimentalSelectiveReplay !== void 0) {
|
|
2932
2932
|
payload.experimentalSelectiveReplay = experimentalSelectiveReplay;
|
|
@@ -2959,6 +2959,9 @@ var init_http = __esm({
|
|
|
2959
2959
|
if (experimentGroupId !== void 0) {
|
|
2960
2960
|
payload.experimentGroupId = experimentGroupId;
|
|
2961
2961
|
}
|
|
2962
|
+
if (experimentGroupName !== void 0) {
|
|
2963
|
+
payload.experimentGroupName = experimentGroupName;
|
|
2964
|
+
}
|
|
2962
2965
|
if (datasetIds !== void 0) {
|
|
2963
2966
|
if (datasetIds.length === 1) {
|
|
2964
2967
|
payload.datasetId = datasetIds[0];
|
|
@@ -4778,6 +4781,11 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4778
4781
|
"force only applies when resuming an experiment. Pass it together with resume."
|
|
4779
4782
|
);
|
|
4780
4783
|
}
|
|
4784
|
+
if (options?.experimentGroupName !== void 0 && options.experimentGroupId === void 0) {
|
|
4785
|
+
throw new BitfabError(
|
|
4786
|
+
"experimentGroupName only applies with experimentGroupId. Pass it together with experimentGroupId."
|
|
4787
|
+
);
|
|
4788
|
+
}
|
|
4781
4789
|
if (options?.experimentalSelectiveReplay !== void 0) {
|
|
4782
4790
|
validateSelectiveReplayOptions(options.experimentalSelectiveReplay);
|
|
4783
4791
|
if ((options.mock ?? "marked") !== "marked" || normalizeMockOverrides(options.mockOverride).length > 0 || registeredOverrides.length > 0) {
|
|
@@ -4852,6 +4860,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4852
4860
|
options?.notes,
|
|
4853
4861
|
options?.metadata,
|
|
4854
4862
|
options?.dryRun === true,
|
|
4863
|
+
options?.experimentGroupName,
|
|
4855
4864
|
safeReplayInvocation(
|
|
4856
4865
|
() => buildReplayInvocation(
|
|
4857
4866
|
Object.entries(cliFlags(options) ?? explicitReplayOptions(options))
|
|
@@ -5304,6 +5313,7 @@ var init_replay = __esm({
|
|
|
5304
5313
|
"mockOverride",
|
|
5305
5314
|
"dbBranch",
|
|
5306
5315
|
"experimentGroupId",
|
|
5316
|
+
"experimentGroupName",
|
|
5307
5317
|
"datasetId",
|
|
5308
5318
|
"datasetIds",
|
|
5309
5319
|
"graderIds",
|
|
@@ -7153,7 +7163,7 @@ function assertEveryVerdictNamesAnAssertion(updates) {
|
|
|
7153
7163
|
(update) => update.traceId ?? update.originalTraceId
|
|
7154
7164
|
);
|
|
7155
7165
|
throw new BitfabError(
|
|
7156
|
-
`Agent verdicts must name an assertion: ${targets.join(", ")}. Pass the assertionId of the assertion each verdict scores to labels.save, saveAll, and
|
|
7166
|
+
`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.`
|
|
7157
7167
|
);
|
|
7158
7168
|
}
|
|
7159
7169
|
}
|
|
@@ -7193,6 +7203,15 @@ var LabelsClient = class {
|
|
|
7193
7203
|
async skip(target, experimentId) {
|
|
7194
7204
|
return this.save({ ...target, skip: true }, experimentId);
|
|
7195
7205
|
}
|
|
7206
|
+
/**
|
|
7207
|
+
* Record that the evidence does not show the part of the run this assertion
|
|
7208
|
+
* checks, so there was nothing to judge. Counted as a fail in every pass
|
|
7209
|
+
* rate, but stored and read back as an abstention, apart from a fail. Pass
|
|
7210
|
+
* `annotation` to say what the evidence would have had to show.
|
|
7211
|
+
*/
|
|
7212
|
+
async abstain(target, experimentId) {
|
|
7213
|
+
return this.save({ ...target, abstain: true }, experimentId);
|
|
7214
|
+
}
|
|
7196
7215
|
async archive(target, experimentId) {
|
|
7197
7216
|
return this.save({ ...target, archive: true }, experimentId);
|
|
7198
7217
|
}
|