@bitfab/sdk 0.64.15 → 0.64.17
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/cloudReplay.py +282 -24
- package/dist/{chunk-NYLVYTBO.js → chunk-G5BYSZLD.js} +30 -6
- package/dist/chunk-G5BYSZLD.js.map +1 -0
- package/dist/{chunk-Z4DIFZTO.js → chunk-I3LSDFMN.js} +2 -2
- package/dist/{chunk-Z4DIFZTO.js.map → chunk-I3LSDFMN.js.map} +1 -1
- package/dist/chunk-PQ6ABBRQ.js +1905 -0
- package/dist/chunk-PQ6ABBRQ.js.map +1 -0
- package/dist/{chunk-7ZJ7KXEV.js → chunk-QZFVHNQE.js} +2 -2
- package/dist/{chunk-2MHRNZH5.js → chunk-WLGH45CM.js} +204 -89
- package/dist/chunk-WLGH45CM.js.map +1 -0
- package/dist/{chunk-KVGRTCIE.js → chunk-YHKFC7XZ.js} +16 -2
- package/dist/{chunk-KVGRTCIE.js.map → chunk-YHKFC7XZ.js.map} +1 -1
- package/dist/{http-36VJ3FFM.js → http-AYZZNM2L.js} +2 -2
- package/dist/{http-IQ2AC36B.js → http-DAQLSTUN.js} +2 -2
- package/dist/index.cjs +25 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +99 -2
- package/dist/index.d.ts +99 -2
- package/dist/index.js +3 -3
- package/dist/node.cjs +25 -1
- 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-ARKSPOVK.js +28 -0
- package/dist/{replay-2QFPGFS7.js → replay-FFNEMPGO.js} +3 -3
- package/dist/replay-FFNEMPGO.js.map +1 -0
- package/dist/replayCli.js +3 -2
- package/dist/replayCli.js.map +1 -1
- package/dist/seedCli.js +3 -2
- package/dist/seedCli.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2MHRNZH5.js.map +0 -1
- package/dist/chunk-NYLVYTBO.js.map +0 -1
- /package/dist/{chunk-7ZJ7KXEV.js.map → chunk-QZFVHNQE.js.map} +0 -0
- /package/dist/{http-36VJ3FFM.js.map → http-AYZZNM2L.js.map} +0 -0
- /package/dist/{http-IQ2AC36B.js.map → http-DAQLSTUN.js.map} +0 -0
- /package/dist/{replay-2QFPGFS7.js.map → replay-ARKSPOVK.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1617,6 +1617,101 @@ type SaveAssertion = {
|
|
|
1617
1617
|
*/
|
|
1618
1618
|
assigneeEmail?: string | null;
|
|
1619
1619
|
};
|
|
1620
|
+
type ScenarioSource = {
|
|
1621
|
+
spanId: string;
|
|
1622
|
+
sourceField: "input" | "output";
|
|
1623
|
+
text: string;
|
|
1624
|
+
};
|
|
1625
|
+
type ScenarioTrigger = {
|
|
1626
|
+
inputId: number | null;
|
|
1627
|
+
inputType: string;
|
|
1628
|
+
channel: string;
|
|
1629
|
+
from: string;
|
|
1630
|
+
to: string | null;
|
|
1631
|
+
cc: string | null;
|
|
1632
|
+
subject: string | null;
|
|
1633
|
+
type: string;
|
|
1634
|
+
eventTime: string;
|
|
1635
|
+
eventTimeSource: "message date" | "run start";
|
|
1636
|
+
source: "request" | "run instructions";
|
|
1637
|
+
content: string;
|
|
1638
|
+
contentPassages: string[];
|
|
1639
|
+
contentIsWholeMessage: boolean;
|
|
1640
|
+
sources: ScenarioSource[];
|
|
1641
|
+
};
|
|
1642
|
+
type ScenarioDataOrigin = {
|
|
1643
|
+
section: string;
|
|
1644
|
+
channel: string | null;
|
|
1645
|
+
from: string | null;
|
|
1646
|
+
to: string | null;
|
|
1647
|
+
cc: string | null;
|
|
1648
|
+
subject: string | null;
|
|
1649
|
+
sentAtText: string | null;
|
|
1650
|
+
};
|
|
1651
|
+
type ScenarioHistoryEntry = {
|
|
1652
|
+
role: "thread start" | "fact";
|
|
1653
|
+
kind: string;
|
|
1654
|
+
quote: string;
|
|
1655
|
+
summary: string | null;
|
|
1656
|
+
origin: ScenarioDataOrigin | null;
|
|
1657
|
+
sentAt: string | null;
|
|
1658
|
+
weekday: string | null;
|
|
1659
|
+
sincePrevious: string | null;
|
|
1660
|
+
source: ScenarioSource | null;
|
|
1661
|
+
};
|
|
1662
|
+
type ScenarioData = {
|
|
1663
|
+
hasHistory: boolean;
|
|
1664
|
+
topic: string;
|
|
1665
|
+
history: ScenarioHistoryEntry[];
|
|
1666
|
+
missing: string[];
|
|
1667
|
+
};
|
|
1668
|
+
type Scenario = {
|
|
1669
|
+
id: string;
|
|
1670
|
+
createdAt: string;
|
|
1671
|
+
updatedAt: string;
|
|
1672
|
+
organizationId: string;
|
|
1673
|
+
traceFunctionId: string;
|
|
1674
|
+
sourceTraceId: string;
|
|
1675
|
+
extractor: "noah";
|
|
1676
|
+
name: string;
|
|
1677
|
+
description: string;
|
|
1678
|
+
trigger: ScenarioTrigger;
|
|
1679
|
+
data: ScenarioData;
|
|
1680
|
+
triggerSummary: string;
|
|
1681
|
+
dataSummary: string;
|
|
1682
|
+
};
|
|
1683
|
+
type SaveScenarioHistoryEntry = Omit<ScenarioHistoryEntry, "source"> & {
|
|
1684
|
+
source?: ScenarioSource | null;
|
|
1685
|
+
};
|
|
1686
|
+
type SaveScenarioData = Omit<ScenarioData, "history"> & {
|
|
1687
|
+
history: SaveScenarioHistoryEntry[];
|
|
1688
|
+
};
|
|
1689
|
+
type ScenarioDataAppend = {
|
|
1690
|
+
history?: SaveScenarioHistoryEntry[];
|
|
1691
|
+
missing?: string[];
|
|
1692
|
+
};
|
|
1693
|
+
type SaveScenarioParams = {
|
|
1694
|
+
traceId: string;
|
|
1695
|
+
name?: string;
|
|
1696
|
+
description?: string;
|
|
1697
|
+
trigger?: ScenarioTrigger;
|
|
1698
|
+
} & ({
|
|
1699
|
+
data?: SaveScenarioData;
|
|
1700
|
+
appendData?: never;
|
|
1701
|
+
} | {
|
|
1702
|
+
appendData: ScenarioDataAppend;
|
|
1703
|
+
data?: never;
|
|
1704
|
+
}) & ({
|
|
1705
|
+
name: string;
|
|
1706
|
+
} | {
|
|
1707
|
+
description: string;
|
|
1708
|
+
} | {
|
|
1709
|
+
trigger: ScenarioTrigger;
|
|
1710
|
+
} | {
|
|
1711
|
+
data: SaveScenarioData;
|
|
1712
|
+
} | {
|
|
1713
|
+
appendData: ScenarioDataAppend;
|
|
1714
|
+
});
|
|
1620
1715
|
type AssertionGenerationStatus = "running" | "completed" | "failed";
|
|
1621
1716
|
type AssertionGeneration = {
|
|
1622
1717
|
status: AssertionGenerationStatus;
|
|
@@ -1669,6 +1764,8 @@ declare class TracesClient {
|
|
|
1669
1764
|
saveAssertionsAll(params: SaveAssertionsAllParams): Promise<TraceAssertion[]>;
|
|
1670
1765
|
generateAssertions(traceId: string, options?: GenerateAssertionsOptions): Promise<TraceAssertion[]>;
|
|
1671
1766
|
archiveAssertions(params: ArchiveAssertionsParams): Promise<string[]>;
|
|
1767
|
+
getScenario(traceId: string): Promise<Scenario>;
|
|
1768
|
+
saveScenario({ traceId, ...edit }: SaveScenarioParams): Promise<Scenario>;
|
|
1672
1769
|
}
|
|
1673
1770
|
|
|
1674
1771
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
@@ -3998,7 +4095,7 @@ interface CommitRef {
|
|
|
3998
4095
|
/**
|
|
3999
4096
|
* SDK version from package.json (injected at build time)
|
|
4000
4097
|
*/
|
|
4001
|
-
declare const __version__ = "0.64.
|
|
4098
|
+
declare const __version__ = "0.64.17";
|
|
4002
4099
|
|
|
4003
4100
|
/**
|
|
4004
4101
|
* Constants for the Bitfab SDK.
|
|
@@ -4137,4 +4234,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
4137
4234
|
run?: boolean;
|
|
4138
4235
|
}): Promise<SeedResult>;
|
|
4139
4236
|
|
|
4140
|
-
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, 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 SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, 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 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 };
|
|
4237
|
+
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, 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 SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type Scenario, 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 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 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
|
@@ -1617,6 +1617,101 @@ type SaveAssertion = {
|
|
|
1617
1617
|
*/
|
|
1618
1618
|
assigneeEmail?: string | null;
|
|
1619
1619
|
};
|
|
1620
|
+
type ScenarioSource = {
|
|
1621
|
+
spanId: string;
|
|
1622
|
+
sourceField: "input" | "output";
|
|
1623
|
+
text: string;
|
|
1624
|
+
};
|
|
1625
|
+
type ScenarioTrigger = {
|
|
1626
|
+
inputId: number | null;
|
|
1627
|
+
inputType: string;
|
|
1628
|
+
channel: string;
|
|
1629
|
+
from: string;
|
|
1630
|
+
to: string | null;
|
|
1631
|
+
cc: string | null;
|
|
1632
|
+
subject: string | null;
|
|
1633
|
+
type: string;
|
|
1634
|
+
eventTime: string;
|
|
1635
|
+
eventTimeSource: "message date" | "run start";
|
|
1636
|
+
source: "request" | "run instructions";
|
|
1637
|
+
content: string;
|
|
1638
|
+
contentPassages: string[];
|
|
1639
|
+
contentIsWholeMessage: boolean;
|
|
1640
|
+
sources: ScenarioSource[];
|
|
1641
|
+
};
|
|
1642
|
+
type ScenarioDataOrigin = {
|
|
1643
|
+
section: string;
|
|
1644
|
+
channel: string | null;
|
|
1645
|
+
from: string | null;
|
|
1646
|
+
to: string | null;
|
|
1647
|
+
cc: string | null;
|
|
1648
|
+
subject: string | null;
|
|
1649
|
+
sentAtText: string | null;
|
|
1650
|
+
};
|
|
1651
|
+
type ScenarioHistoryEntry = {
|
|
1652
|
+
role: "thread start" | "fact";
|
|
1653
|
+
kind: string;
|
|
1654
|
+
quote: string;
|
|
1655
|
+
summary: string | null;
|
|
1656
|
+
origin: ScenarioDataOrigin | null;
|
|
1657
|
+
sentAt: string | null;
|
|
1658
|
+
weekday: string | null;
|
|
1659
|
+
sincePrevious: string | null;
|
|
1660
|
+
source: ScenarioSource | null;
|
|
1661
|
+
};
|
|
1662
|
+
type ScenarioData = {
|
|
1663
|
+
hasHistory: boolean;
|
|
1664
|
+
topic: string;
|
|
1665
|
+
history: ScenarioHistoryEntry[];
|
|
1666
|
+
missing: string[];
|
|
1667
|
+
};
|
|
1668
|
+
type Scenario = {
|
|
1669
|
+
id: string;
|
|
1670
|
+
createdAt: string;
|
|
1671
|
+
updatedAt: string;
|
|
1672
|
+
organizationId: string;
|
|
1673
|
+
traceFunctionId: string;
|
|
1674
|
+
sourceTraceId: string;
|
|
1675
|
+
extractor: "noah";
|
|
1676
|
+
name: string;
|
|
1677
|
+
description: string;
|
|
1678
|
+
trigger: ScenarioTrigger;
|
|
1679
|
+
data: ScenarioData;
|
|
1680
|
+
triggerSummary: string;
|
|
1681
|
+
dataSummary: string;
|
|
1682
|
+
};
|
|
1683
|
+
type SaveScenarioHistoryEntry = Omit<ScenarioHistoryEntry, "source"> & {
|
|
1684
|
+
source?: ScenarioSource | null;
|
|
1685
|
+
};
|
|
1686
|
+
type SaveScenarioData = Omit<ScenarioData, "history"> & {
|
|
1687
|
+
history: SaveScenarioHistoryEntry[];
|
|
1688
|
+
};
|
|
1689
|
+
type ScenarioDataAppend = {
|
|
1690
|
+
history?: SaveScenarioHistoryEntry[];
|
|
1691
|
+
missing?: string[];
|
|
1692
|
+
};
|
|
1693
|
+
type SaveScenarioParams = {
|
|
1694
|
+
traceId: string;
|
|
1695
|
+
name?: string;
|
|
1696
|
+
description?: string;
|
|
1697
|
+
trigger?: ScenarioTrigger;
|
|
1698
|
+
} & ({
|
|
1699
|
+
data?: SaveScenarioData;
|
|
1700
|
+
appendData?: never;
|
|
1701
|
+
} | {
|
|
1702
|
+
appendData: ScenarioDataAppend;
|
|
1703
|
+
data?: never;
|
|
1704
|
+
}) & ({
|
|
1705
|
+
name: string;
|
|
1706
|
+
} | {
|
|
1707
|
+
description: string;
|
|
1708
|
+
} | {
|
|
1709
|
+
trigger: ScenarioTrigger;
|
|
1710
|
+
} | {
|
|
1711
|
+
data: SaveScenarioData;
|
|
1712
|
+
} | {
|
|
1713
|
+
appendData: ScenarioDataAppend;
|
|
1714
|
+
});
|
|
1620
1715
|
type AssertionGenerationStatus = "running" | "completed" | "failed";
|
|
1621
1716
|
type AssertionGeneration = {
|
|
1622
1717
|
status: AssertionGenerationStatus;
|
|
@@ -1669,6 +1764,8 @@ declare class TracesClient {
|
|
|
1669
1764
|
saveAssertionsAll(params: SaveAssertionsAllParams): Promise<TraceAssertion[]>;
|
|
1670
1765
|
generateAssertions(traceId: string, options?: GenerateAssertionsOptions): Promise<TraceAssertion[]>;
|
|
1671
1766
|
archiveAssertions(params: ArchiveAssertionsParams): Promise<string[]>;
|
|
1767
|
+
getScenario(traceId: string): Promise<Scenario>;
|
|
1768
|
+
saveScenario({ traceId, ...edit }: SaveScenarioParams): Promise<Scenario>;
|
|
1672
1769
|
}
|
|
1673
1770
|
|
|
1674
1771
|
type LabelConfidence = "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh";
|
|
@@ -3998,7 +4095,7 @@ interface CommitRef {
|
|
|
3998
4095
|
/**
|
|
3999
4096
|
* SDK version from package.json (injected at build time)
|
|
4000
4097
|
*/
|
|
4001
|
-
declare const __version__ = "0.64.
|
|
4098
|
+
declare const __version__ = "0.64.17";
|
|
4002
4099
|
|
|
4003
4100
|
/**
|
|
4004
4101
|
* Constants for the Bitfab SDK.
|
|
@@ -4137,4 +4234,4 @@ declare function seedFromRegistry(registry: ReplayRegistry, pipeline: string, ca
|
|
|
4137
4234
|
run?: boolean;
|
|
4138
4235
|
}): Promise<SeedResult>;
|
|
4139
4236
|
|
|
4140
|
-
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, 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 SeedCase, type SeedCaseOptions, type SeedResult, type SeedRunOptions, type SelectiveReplayDecision, type SelectiveReplayOptions, type SelectiveReplayReport, 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 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 };
|
|
4237
|
+
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, 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 SaveScenarioData, type SaveScenarioHistoryEntry, type SaveScenarioParams, type Scenario, 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 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 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
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
getCurrentTrace,
|
|
28
28
|
reseedFromRegistry,
|
|
29
29
|
seedFromRegistry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-G5BYSZLD.js";
|
|
31
31
|
import "./chunk-YWXQM6J3.js";
|
|
32
32
|
import {
|
|
33
33
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
ReplayError,
|
|
37
37
|
reportReplayProgress,
|
|
38
38
|
serializeReplayResult
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-QZFVHNQE.js";
|
|
40
40
|
import {
|
|
41
41
|
BitfabError,
|
|
42
42
|
DEFAULT_SERVICE_URL,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
MixedTracingError,
|
|
45
45
|
__version__,
|
|
46
46
|
flushTraces
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-I3LSDFMN.js";
|
|
48
48
|
import "./chunk-MT36GJMW.js";
|
|
49
49
|
export {
|
|
50
50
|
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.17";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -8943,6 +8943,9 @@ function draftsInGenerationOrder(assertions, assertionIds) {
|
|
|
8943
8943
|
function traceAssertionsPath(traceId, suffix = "") {
|
|
8944
8944
|
return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
|
|
8945
8945
|
}
|
|
8946
|
+
function traceScenarioPath(traceId) {
|
|
8947
|
+
return `/api/sdk/traces/${encodeURIComponent(traceId)}/scenario`;
|
|
8948
|
+
}
|
|
8946
8949
|
var TracesClient = class {
|
|
8947
8950
|
constructor(httpClient) {
|
|
8948
8951
|
this.httpClient = httpClient;
|
|
@@ -9006,6 +9009,22 @@ var TracesClient = class {
|
|
|
9006
9009
|
);
|
|
9007
9010
|
return response.archived;
|
|
9008
9011
|
}
|
|
9012
|
+
async getScenario(traceId) {
|
|
9013
|
+
const response = await this.httpClient.get(
|
|
9014
|
+
traceScenarioPath(traceId)
|
|
9015
|
+
);
|
|
9016
|
+
return response.scenario;
|
|
9017
|
+
}
|
|
9018
|
+
async saveScenario({
|
|
9019
|
+
traceId,
|
|
9020
|
+
...edit
|
|
9021
|
+
}) {
|
|
9022
|
+
const response = await this.httpClient.request(
|
|
9023
|
+
traceScenarioPath(traceId),
|
|
9024
|
+
edit
|
|
9025
|
+
);
|
|
9026
|
+
return response.scenario;
|
|
9027
|
+
}
|
|
9009
9028
|
};
|
|
9010
9029
|
|
|
9011
9030
|
// src/tracing.ts
|
|
@@ -9897,6 +9916,7 @@ function readEnv2(name) {
|
|
|
9897
9916
|
return void 0;
|
|
9898
9917
|
}
|
|
9899
9918
|
var CAPTURE_ENABLED_ENV = "BITFAB_CAPTURE_ENABLED";
|
|
9919
|
+
var REPLAY_API_KEY_ENV = "BITFAB_REPLAY_BITFAB_API_KEY";
|
|
9900
9920
|
var TRUE_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes"]);
|
|
9901
9921
|
var FALSE_ENV_VALUES = /* @__PURE__ */ new Set(["0", "false", "no"]);
|
|
9902
9922
|
function readBooleanEnv(name) {
|
|
@@ -10411,6 +10431,10 @@ var Bitfab = class {
|
|
|
10411
10431
|
* early resolve that found nothing never poisons a later one.
|
|
10412
10432
|
*/
|
|
10413
10433
|
findApiKey(callsKeyFunction) {
|
|
10434
|
+
const replayKey = readEnv2(REPLAY_API_KEY_ENV);
|
|
10435
|
+
if (replayKey && replayKey.trim() !== "") {
|
|
10436
|
+
return replayKey;
|
|
10437
|
+
}
|
|
10414
10438
|
if (this.resolvedApiKey !== void 0) {
|
|
10415
10439
|
return this.resolvedApiKey;
|
|
10416
10440
|
}
|