@bitfab/sdk 0.64.14 → 0.64.16

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.
Files changed (32) hide show
  1. package/cloudReplay.py +250 -55
  2. package/dist/{chunk-F5ZFL5W6.js → chunk-AXFKZYIY.js} +25 -6
  3. package/dist/chunk-AXFKZYIY.js.map +1 -0
  4. package/dist/{chunk-GURR5AWG.js → chunk-I4TFQZCW.js} +2 -2
  5. package/dist/{chunk-GURR5AWG.js.map → chunk-I4TFQZCW.js.map} +1 -1
  6. package/dist/{chunk-2EWCNKQL.js → chunk-LOIVELPI.js} +10 -5
  7. package/dist/{chunk-2EWCNKQL.js.map → chunk-LOIVELPI.js.map} +1 -1
  8. package/dist/{chunk-PXNFY22G.js → chunk-NNZAQSTW.js} +2 -2
  9. package/dist/{chunk-A7NX4OKG.js → chunk-PAWBCEI7.js} +2 -2
  10. package/dist/{chunk-A7NX4OKG.js.map → chunk-PAWBCEI7.js.map} +1 -1
  11. package/dist/{http-QX6O4EDS.js → http-LV7OUBKA.js} +2 -2
  12. package/dist/{http-C44ETCJK.js → http-QQ6VVHUZ.js} +2 -2
  13. package/dist/index.cjs +20 -1
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +99 -2
  16. package/dist/index.d.ts +99 -2
  17. package/dist/index.js +3 -3
  18. package/dist/node.cjs +20 -1
  19. package/dist/node.cjs.map +1 -1
  20. package/dist/node.d.cts +1 -1
  21. package/dist/node.d.ts +1 -1
  22. package/dist/node.js +3 -3
  23. package/dist/{replay-MFZF4SY7.js → replay-JNKXZPY7.js} +3 -3
  24. package/dist/replayCli.js +13 -2
  25. package/dist/replayCli.js.map +1 -1
  26. package/dist/seedCli.js +2 -2
  27. package/package.json +1 -1
  28. package/dist/chunk-F5ZFL5W6.js.map +0 -1
  29. /package/dist/{chunk-PXNFY22G.js.map → chunk-NNZAQSTW.js.map} +0 -0
  30. /package/dist/{http-C44ETCJK.js.map → http-LV7OUBKA.js.map} +0 -0
  31. /package/dist/{http-QX6O4EDS.js.map → http-QQ6VVHUZ.js.map} +0 -0
  32. /package/dist/{replay-MFZF4SY7.js.map → replay-JNKXZPY7.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.14";
4098
+ declare const __version__ = "0.64.16";
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.14";
4098
+ declare const __version__ = "0.64.16";
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-F5ZFL5W6.js";
30
+ } from "./chunk-AXFKZYIY.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-PXNFY22G.js";
39
+ } from "./chunk-NNZAQSTW.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-A7NX4OKG.js";
47
+ } from "./chunk-PAWBCEI7.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.14";
91
+ __version__ = "0.64.16";
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