@runtypelabs/sdk 1.21.1 → 1.21.2

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 (3) hide show
  1. package/dist/index.d.cts +152 -342
  2. package/dist/index.d.ts +152 -342
  3. package/package.json +2 -1
package/dist/index.d.cts CHANGED
@@ -287,7 +287,7 @@ type MessageContent = string | Array<TextContentPart | ImageContentPart | FileCo
287
287
  /**
288
288
  * Options for upsert mode - controls conflict detection and versioning
289
289
  */
290
- interface UpsertOptions$2 {
290
+ interface UpsertOptions$1 {
291
291
  /** Whether to create a version snapshot before updating (default: true) */
292
292
  createVersionOnChange?: boolean;
293
293
  /** Allow overwriting changes made via dashboard/API (default: false) */
@@ -329,7 +329,7 @@ interface DispatchRequest {
329
329
  versionLabel?: string;
330
330
  versionNotes?: string;
331
331
  flowVersionId?: string;
332
- upsertOptions?: UpsertOptions$2;
332
+ upsertOptions?: UpsertOptions$1;
333
333
  flowTimeoutMs?: number;
334
334
  stepTimeoutMs?: number;
335
335
  };
@@ -682,6 +682,123 @@ interface ContextErrorHandling {
682
682
  fallbacks?: ContextFallback[];
683
683
  }
684
684
 
685
+ /**
686
+ * FlowResult - Wrapper for streaming flow execution responses
687
+ *
688
+ * Provides convenient methods for processing streaming responses
689
+ * from the Runtype API dispatch endpoint.
690
+ */
691
+
692
+ /**
693
+ * Result wrapper for flow execution
694
+ *
695
+ * Provides multiple ways to consume the streaming response:
696
+ * - `.stream(callbacks)` - Process with callbacks
697
+ * - `.getResult(stepName)` - Get result from a specific step
698
+ * - `.getAllResults()` - Get all step results
699
+ * - `.raw` - Access the raw Response for manual handling
700
+ *
701
+ * @example
702
+ * ```typescript
703
+ * const result = await flow.run(apiClient, options)
704
+ *
705
+ * // Option 1: Process with callbacks
706
+ * const summary = await result.stream({
707
+ * onStepDelta: (text) => process.stdout.write(text),
708
+ * })
709
+ *
710
+ * // Option 2: Just get a specific step's result
711
+ * const analysis = await result.getResult('Analyze Data')
712
+ *
713
+ * // Option 3: Get all results
714
+ * const allResults = await result.getAllResults()
715
+ * ```
716
+ */
717
+ declare class FlowResult {
718
+ private response;
719
+ private consumed;
720
+ private cachedSummary;
721
+ constructor(response: Response, summary?: FlowSummary);
722
+ /**
723
+ * Get the raw Response object for manual handling
724
+ *
725
+ * Note: The response body can only be consumed once.
726
+ * Using this will prevent using other methods like stream() or getResult().
727
+ */
728
+ get raw(): Response;
729
+ /**
730
+ * Check if the response has already been consumed
731
+ */
732
+ get isConsumed(): boolean;
733
+ /**
734
+ * Process the streaming response with callbacks
735
+ *
736
+ * @param callbacks - Callbacks for different event types
737
+ * @returns Promise resolving to FlowSummary when complete
738
+ *
739
+ * @example
740
+ * ```typescript
741
+ * const summary = await result.stream({
742
+ * onStepStart: (event) => console.log('Starting:', event.name),
743
+ * onStepDelta: (text) => process.stdout.write(text),
744
+ * onStepComplete: (result, event) => console.log('Done:', event.name),
745
+ * onFlowComplete: (event) => console.log('Flow complete!'),
746
+ * })
747
+ * ```
748
+ */
749
+ stream(callbacks?: StreamCallbacks): Promise<FlowSummary>;
750
+ /**
751
+ * Get the result from a specific step by its name
752
+ *
753
+ * Matches against the `name` property you set when creating the step.
754
+ * - **Case-sensitive**: `'Analyze'` ≠ `'analyze'`
755
+ * - **Exact match only**: no partial or fuzzy matching
756
+ * - Returns `undefined` if no step with that name is found
757
+ *
758
+ * @param stepName - The exact step name (from the `name` property when creating the step)
759
+ * @returns The step's result, or undefined if not found
760
+ *
761
+ * @example
762
+ * ```typescript
763
+ * // When building:
764
+ * .prompt({ name: 'Analyze Screenshot', model: 'gpt-4', ... })
765
+ *
766
+ * // When retrieving (must match exactly):
767
+ * const analysis = await result.getResult('Analyze Screenshot') // ✓ Works
768
+ * const analysis = await result.getResult('analyze screenshot') // ✗ undefined
769
+ * ```
770
+ */
771
+ getResult(stepName: string): Promise<any>;
772
+ /**
773
+ * Get all step results as a Map
774
+ *
775
+ * @returns Map of step name to result
776
+ *
777
+ * @example
778
+ * ```typescript
779
+ * const allResults = await result.getAllResults()
780
+ * for (const [stepName, result] of allResults) {
781
+ * console.log(stepName, result)
782
+ * }
783
+ * ```
784
+ */
785
+ getAllResults(): Promise<Map<string, any>>;
786
+ /**
787
+ * Get the flow summary after processing
788
+ *
789
+ * @returns FlowSummary with execution details
790
+ */
791
+ getSummary(): Promise<FlowSummary>;
792
+ /**
793
+ * Ensure the stream has been processed and return the summary
794
+ */
795
+ private ensureSummary;
796
+ /**
797
+ * Ensure the response hasn't been consumed yet
798
+ */
799
+ private ensureNotConsumed;
800
+ }
801
+
685
802
  /**
686
803
  * FlowBuilder - Fluent builder for constructing dispatch configurations
687
804
  *
@@ -1005,7 +1122,7 @@ interface RecordConfig$1 {
1005
1122
  /**
1006
1123
  * Options for upsert mode - controls conflict detection and versioning
1007
1124
  */
1008
- interface UpsertOptions$1 {
1125
+ interface UpsertOptions {
1009
1126
  /** Whether to create a version snapshot before updating (default: true) */
1010
1127
  createVersionOnChange?: boolean;
1011
1128
  /** Allow overwriting changes made via dashboard/API (default: false) */
@@ -1025,7 +1142,7 @@ interface DispatchOptions$1 {
1025
1142
  versionNotes?: string;
1026
1143
  flowVersionId?: string;
1027
1144
  /** Options for upsert mode (only used when flowMode is 'upsert') */
1028
- upsertOptions?: UpsertOptions$1;
1145
+ upsertOptions?: UpsertOptions;
1029
1146
  flowTimeoutMs?: number;
1030
1147
  stepTimeoutMs?: number;
1031
1148
  }
@@ -1562,123 +1679,6 @@ declare function createExternalTool(config: {
1562
1679
  body?: string;
1563
1680
  }): RuntimeTool;
1564
1681
 
1565
- /**
1566
- * FlowResult - Wrapper for streaming flow execution responses
1567
- *
1568
- * Provides convenient methods for processing streaming responses
1569
- * from the Runtype API dispatch endpoint.
1570
- */
1571
-
1572
- /**
1573
- * Result wrapper for flow execution
1574
- *
1575
- * Provides multiple ways to consume the streaming response:
1576
- * - `.stream(callbacks)` - Process with callbacks
1577
- * - `.getResult(stepName)` - Get result from a specific step
1578
- * - `.getAllResults()` - Get all step results
1579
- * - `.raw` - Access the raw Response for manual handling
1580
- *
1581
- * @example
1582
- * ```typescript
1583
- * const result = await flow.run(apiClient, options)
1584
- *
1585
- * // Option 1: Process with callbacks
1586
- * const summary = await result.stream({
1587
- * onStepDelta: (text) => process.stdout.write(text),
1588
- * })
1589
- *
1590
- * // Option 2: Just get a specific step's result
1591
- * const analysis = await result.getResult('Analyze Data')
1592
- *
1593
- * // Option 3: Get all results
1594
- * const allResults = await result.getAllResults()
1595
- * ```
1596
- */
1597
- declare class FlowResult {
1598
- private response;
1599
- private consumed;
1600
- private cachedSummary;
1601
- constructor(response: Response, summary?: FlowSummary);
1602
- /**
1603
- * Get the raw Response object for manual handling
1604
- *
1605
- * Note: The response body can only be consumed once.
1606
- * Using this will prevent using other methods like stream() or getResult().
1607
- */
1608
- get raw(): Response;
1609
- /**
1610
- * Check if the response has already been consumed
1611
- */
1612
- get isConsumed(): boolean;
1613
- /**
1614
- * Process the streaming response with callbacks
1615
- *
1616
- * @param callbacks - Callbacks for different event types
1617
- * @returns Promise resolving to FlowSummary when complete
1618
- *
1619
- * @example
1620
- * ```typescript
1621
- * const summary = await result.stream({
1622
- * onStepStart: (event) => console.log('Starting:', event.name),
1623
- * onStepDelta: (text) => process.stdout.write(text),
1624
- * onStepComplete: (result, event) => console.log('Done:', event.name),
1625
- * onFlowComplete: (event) => console.log('Flow complete!'),
1626
- * })
1627
- * ```
1628
- */
1629
- stream(callbacks?: StreamCallbacks): Promise<FlowSummary>;
1630
- /**
1631
- * Get the result from a specific step by its name
1632
- *
1633
- * Matches against the `name` property you set when creating the step.
1634
- * - **Case-sensitive**: `'Analyze'` ≠ `'analyze'`
1635
- * - **Exact match only**: no partial or fuzzy matching
1636
- * - Returns `undefined` if no step with that name is found
1637
- *
1638
- * @param stepName - The exact step name (from the `name` property when creating the step)
1639
- * @returns The step's result, or undefined if not found
1640
- *
1641
- * @example
1642
- * ```typescript
1643
- * // When building:
1644
- * .prompt({ name: 'Analyze Screenshot', model: 'gpt-4', ... })
1645
- *
1646
- * // When retrieving (must match exactly):
1647
- * const analysis = await result.getResult('Analyze Screenshot') // ✓ Works
1648
- * const analysis = await result.getResult('analyze screenshot') // ✗ undefined
1649
- * ```
1650
- */
1651
- getResult(stepName: string): Promise<any>;
1652
- /**
1653
- * Get all step results as a Map
1654
- *
1655
- * @returns Map of step name to result
1656
- *
1657
- * @example
1658
- * ```typescript
1659
- * const allResults = await result.getAllResults()
1660
- * for (const [stepName, result] of allResults) {
1661
- * console.log(stepName, result)
1662
- * }
1663
- * ```
1664
- */
1665
- getAllResults(): Promise<Map<string, any>>;
1666
- /**
1667
- * Get the flow summary after processing
1668
- *
1669
- * @returns FlowSummary with execution details
1670
- */
1671
- getSummary(): Promise<FlowSummary>;
1672
- /**
1673
- * Ensure the stream has been processed and return the summary
1674
- */
1675
- private ensureSummary;
1676
- /**
1677
- * Ensure the response hasn't been consumed yet
1678
- */
1679
- private ensureNotConsumed;
1680
- }
1681
-
1682
1682
  /**
1683
1683
  * FlowsNamespace - Static namespace for flow operations
1684
1684
  *
@@ -1691,234 +1691,44 @@ declare class FlowResult {
1691
1691
  interface LocalToolsOptions {
1692
1692
  localTools?: Record<string, (args: unknown) => Promise<unknown>>;
1693
1693
  }
1694
- interface FlowConfig {
1695
- name: string;
1696
- description?: string;
1697
- }
1698
- interface UpsertFlowConfig extends FlowConfig {
1699
- /** Whether to create a version snapshot before updating (default: true) */
1700
- createVersionOnChange?: boolean;
1701
- /** Allow overwriting changes made via dashboard/API (default: false) */
1702
- allowOverwriteExternalChanges?: boolean;
1703
- }
1704
- interface RecordConfig {
1705
- id?: number | string;
1706
- name?: string;
1707
- type?: string;
1694
+ type FlowConfig = FlowConfig$1;
1695
+ type UpsertFlowConfig = UpsertFlowConfig$1;
1696
+ type RecordConfig = Omit<RecordConfig$1, 'metadata'> & {
1708
1697
  metadata?: JsonObject;
1709
- }
1710
- interface Message {
1711
- role: 'system' | 'user' | 'assistant';
1712
- content: MessageContent;
1713
- }
1714
- interface PromptStepConfig {
1715
- name: string;
1716
- model: string;
1717
- userPrompt: string;
1718
- systemPrompt?: string;
1719
- previousMessages?: string | Array<{
1720
- role: string;
1721
- content: string;
1722
- }>;
1723
- outputVariable?: string;
1724
- responseFormat?: 'text' | 'json';
1725
- temperature?: number;
1726
- topP?: number;
1727
- topK?: number;
1728
- frequencyPenalty?: number;
1729
- presencePenalty?: number;
1730
- seed?: number;
1731
- maxTokens?: number;
1732
- /** Enable reasoning/extended thinking. Use `true` for defaults or `ReasoningConfig` for fine-grained control */
1733
- reasoning?: boolean | ReasoningConfig;
1734
- streamOutput?: boolean;
1735
- tools?: {
1736
- toolIds?: string[];
1737
- [key: string]: unknown;
1738
- };
1739
- /** Error handling configuration - supports simple mode or fallback chains */
1740
- errorHandling?: ErrorHandlingMode | PromptErrorHandling;
1741
- enabled?: boolean;
1742
- }
1743
- interface FetchUrlStepConfig {
1744
- name: string;
1745
- url: string;
1746
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
1747
- headers?: Record<string, string>;
1748
- body?: string;
1749
- responseType?: 'json' | 'text' | 'xml';
1750
- markdownIfAvailable?: boolean;
1751
- outputVariable?: string;
1752
- fetchMethod?: 'http' | 'firecrawl';
1698
+ };
1699
+ type Message = Message$1;
1700
+ type NamespaceStepConfig<T> = Omit<T, 'when'>;
1701
+ type FetchUrlNamespaceConfig = NamespaceStepConfig<FetchUrlStepConfig$1>;
1702
+ type ConditionalNamespaceConfig = NamespaceStepConfig<ConditionalStepConfig$1>;
1703
+ type SendEventNamespaceConfig = NamespaceStepConfig<SendEventStepConfig$1>;
1704
+ type PromptStepConfig = NamespaceStepConfig<PromptStepConfig$1>;
1705
+ type FetchUrlStepConfig = Omit<FetchUrlNamespaceConfig, 'firecrawl'> & {
1753
1706
  firecrawl?: {
1754
1707
  formats?: string[];
1755
1708
  [key: string]: unknown;
1756
1709
  };
1757
- /** Error handling configuration - supports simple mode or fallback chains */
1758
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1759
- streamOutput?: boolean;
1760
- enabled?: boolean;
1761
- }
1762
- interface TransformDataStepConfig {
1763
- name: string;
1764
- script: string;
1765
- outputVariable?: string;
1766
- streamOutput?: boolean;
1767
- enabled?: boolean;
1768
- }
1769
- interface SetVariableStepConfig {
1770
- name: string;
1771
- variableName: string;
1772
- value: string | number | boolean | object;
1773
- enabled?: boolean;
1774
- }
1775
- interface ConditionalStepConfig {
1776
- name: string;
1777
- condition: string;
1710
+ };
1711
+ type TransformDataStepConfig = Omit<NamespaceStepConfig<TransformDataStepConfig$1>, 'sandboxProvider'>;
1712
+ type SetVariableStepConfig = NamespaceStepConfig<SetVariableStepConfig$1>;
1713
+ type ConditionalStepConfig = Omit<ConditionalNamespaceConfig, 'trueSteps' | 'falseSteps'> & {
1778
1714
  trueSteps?: unknown[];
1779
1715
  falseSteps?: unknown[];
1780
- enabled?: boolean;
1781
- }
1782
- interface SearchStepConfig {
1783
- name: string;
1784
- provider: string;
1785
- query: string;
1786
- maxResults?: number;
1787
- outputVariable?: string;
1788
- returnCitations?: boolean;
1789
- /** Error handling configuration - supports simple mode or fallback chains */
1790
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1791
- streamOutput?: boolean;
1792
- enabled?: boolean;
1793
- }
1794
- interface SendEmailStepConfig {
1795
- name: string;
1796
- to: string;
1797
- from?: string;
1798
- subject: string;
1799
- html: string;
1800
- outputVariable?: string;
1801
- /** Error handling configuration - supports simple mode or fallback chains */
1802
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1803
- streamOutput?: boolean;
1804
- enabled?: boolean;
1805
- }
1806
- interface SendStreamStepConfig {
1807
- name: string;
1808
- message: string;
1809
- enabled?: boolean;
1810
- }
1811
-
1812
- interface RetrieveRecordStepConfig {
1813
- name: string;
1814
- recordType?: string;
1815
- recordName?: string;
1816
- /** Chip-style filter (metadata + top-level columns). See flow-builder.ts. */
1817
- recordFilter?: RecordFilter;
1818
- fieldsToInclude?: string[];
1819
- fieldsToExclude?: string[];
1820
- outputVariable?: string;
1821
- streamOutput?: boolean;
1822
- enabled?: boolean;
1823
- }
1824
- interface UpsertRecordStepConfig {
1825
- name: string;
1826
- recordType: string;
1827
- recordName?: string;
1828
- sourceVariable?: string;
1829
- mergeStrategy?: 'merge' | 'replace';
1830
- outputVariable?: string;
1831
- /** Error handling configuration - supports simple mode or fallback chains */
1832
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1833
- streamOutput?: boolean;
1834
- enabled?: boolean;
1835
- }
1836
- interface VectorSearchStepConfig {
1837
- name: string;
1838
- query: string;
1839
- recordType?: string;
1840
- embeddingModel?: string;
1841
- limit?: number;
1842
- threshold?: number;
1843
- outputVariable?: string;
1844
- streamOutput?: boolean;
1845
- enabled?: boolean;
1846
- }
1847
- interface GenerateEmbeddingStepConfig {
1848
- name: string;
1849
- text: string;
1850
- embeddingModel?: string;
1851
- maxLength?: number;
1852
- outputVariable?: string;
1853
- streamOutput?: boolean;
1854
- enabled?: boolean;
1855
- }
1856
- interface WaitUntilStepConfig {
1857
- name: string;
1858
- delayMs?: number;
1859
- continueOnTimeout?: boolean;
1860
- poll?: {
1861
- enabled: boolean;
1862
- intervalMs?: number;
1863
- maxAttempts?: number;
1864
- condition?: string;
1865
- };
1866
- outputVariable?: string;
1867
- /** Error handling configuration - supports simple mode or fallback chains */
1868
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1869
- streamOutput?: boolean;
1870
- enabled?: boolean;
1871
- }
1872
- interface SendEventStepConfig {
1873
- name: string;
1874
- provider: string;
1875
- eventName: string;
1716
+ };
1717
+ type SearchStepConfig = NamespaceStepConfig<SearchStepConfig$1>;
1718
+ type SendEmailStepConfig = NamespaceStepConfig<SendEmailStepConfig$1>;
1719
+ type SendStreamStepConfig = NamespaceStepConfig<SendStreamStepConfig$1>;
1720
+ type RetrieveRecordStepConfig = NamespaceStepConfig<RetrieveRecordStepConfig$1>;
1721
+ type UpsertRecordStepConfig = NamespaceStepConfig<UpsertRecordStepConfig$1>;
1722
+ type VectorSearchStepConfig = NamespaceStepConfig<VectorSearchStepConfig$1>;
1723
+ type GenerateEmbeddingStepConfig = NamespaceStepConfig<GenerateEmbeddingStepConfig$1>;
1724
+ type WaitUntilStepConfig = NamespaceStepConfig<WaitUntilStepConfig$1>;
1725
+ type SendEventStepConfig = Omit<SendEventNamespaceConfig, 'properties'> & {
1876
1726
  properties?: Record<string, unknown>;
1877
- outputVariable?: string;
1878
- /** Error handling configuration - supports simple mode or fallback chains */
1879
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1880
- streamOutput?: boolean;
1881
- enabled?: boolean;
1882
- }
1883
- interface SendTextStepConfig {
1884
- name: string;
1885
- to: string;
1886
- from?: string;
1887
- message: string;
1888
- outputVariable?: string;
1889
- /** Error handling configuration - supports simple mode or fallback chains */
1890
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1891
- streamOutput?: boolean;
1892
- enabled?: boolean;
1893
- }
1894
- interface FetchGitHubStepConfig {
1895
- name: string;
1896
- repository: string;
1897
- branch?: string;
1898
- path?: string;
1899
- outputVariable?: string;
1900
- streamOutput?: boolean;
1901
- enabled?: boolean;
1902
- }
1903
- interface UpsertOptions {
1904
- createVersionOnChange?: boolean;
1905
- allowOverwriteExternalChanges?: boolean;
1906
- }
1907
- interface DispatchOptions {
1908
- streamResponse?: boolean;
1909
- modelOverride?: string;
1910
- recordMode?: 'existing' | 'create' | 'virtual';
1911
- flowMode?: 'existing' | 'create' | 'virtual' | 'upsert';
1912
- storeResults?: boolean;
1913
- autoAppendMetadata?: boolean;
1914
- debugMode?: boolean;
1915
- createVersion?: boolean;
1916
- versionType?: 'published' | 'draft' | 'test' | 'virtual';
1917
- versionLabel?: string;
1918
- versionNotes?: string;
1919
- flowVersionId?: string;
1920
- upsertOptions?: UpsertOptions;
1921
- }
1727
+ };
1728
+ type SendTextStepConfig = NamespaceStepConfig<SendTextStepConfig$1>;
1729
+ type FetchGitHubStepConfig = NamespaceStepConfig<FetchGitHubStepConfig$1>;
1730
+
1731
+ type DispatchOptions = Omit<DispatchOptions$1, 'flowTimeoutMs' | 'stepTimeoutMs'>;
1922
1732
  declare class FlowsNamespace {
1923
1733
  private getClient;
1924
1734
  constructor(getClient: () => RuntypeClient$1);
@@ -5621,4 +5431,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
5621
5431
  declare function getDefaultPlanPath(taskName: string): string;
5622
5432
  declare function sanitizeTaskSlug(taskName: string): string;
5623
5433
 
5624
- export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$2 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
5434
+ export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$1 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
package/dist/index.d.ts CHANGED
@@ -287,7 +287,7 @@ type MessageContent = string | Array<TextContentPart | ImageContentPart | FileCo
287
287
  /**
288
288
  * Options for upsert mode - controls conflict detection and versioning
289
289
  */
290
- interface UpsertOptions$2 {
290
+ interface UpsertOptions$1 {
291
291
  /** Whether to create a version snapshot before updating (default: true) */
292
292
  createVersionOnChange?: boolean;
293
293
  /** Allow overwriting changes made via dashboard/API (default: false) */
@@ -329,7 +329,7 @@ interface DispatchRequest {
329
329
  versionLabel?: string;
330
330
  versionNotes?: string;
331
331
  flowVersionId?: string;
332
- upsertOptions?: UpsertOptions$2;
332
+ upsertOptions?: UpsertOptions$1;
333
333
  flowTimeoutMs?: number;
334
334
  stepTimeoutMs?: number;
335
335
  };
@@ -682,6 +682,123 @@ interface ContextErrorHandling {
682
682
  fallbacks?: ContextFallback[];
683
683
  }
684
684
 
685
+ /**
686
+ * FlowResult - Wrapper for streaming flow execution responses
687
+ *
688
+ * Provides convenient methods for processing streaming responses
689
+ * from the Runtype API dispatch endpoint.
690
+ */
691
+
692
+ /**
693
+ * Result wrapper for flow execution
694
+ *
695
+ * Provides multiple ways to consume the streaming response:
696
+ * - `.stream(callbacks)` - Process with callbacks
697
+ * - `.getResult(stepName)` - Get result from a specific step
698
+ * - `.getAllResults()` - Get all step results
699
+ * - `.raw` - Access the raw Response for manual handling
700
+ *
701
+ * @example
702
+ * ```typescript
703
+ * const result = await flow.run(apiClient, options)
704
+ *
705
+ * // Option 1: Process with callbacks
706
+ * const summary = await result.stream({
707
+ * onStepDelta: (text) => process.stdout.write(text),
708
+ * })
709
+ *
710
+ * // Option 2: Just get a specific step's result
711
+ * const analysis = await result.getResult('Analyze Data')
712
+ *
713
+ * // Option 3: Get all results
714
+ * const allResults = await result.getAllResults()
715
+ * ```
716
+ */
717
+ declare class FlowResult {
718
+ private response;
719
+ private consumed;
720
+ private cachedSummary;
721
+ constructor(response: Response, summary?: FlowSummary);
722
+ /**
723
+ * Get the raw Response object for manual handling
724
+ *
725
+ * Note: The response body can only be consumed once.
726
+ * Using this will prevent using other methods like stream() or getResult().
727
+ */
728
+ get raw(): Response;
729
+ /**
730
+ * Check if the response has already been consumed
731
+ */
732
+ get isConsumed(): boolean;
733
+ /**
734
+ * Process the streaming response with callbacks
735
+ *
736
+ * @param callbacks - Callbacks for different event types
737
+ * @returns Promise resolving to FlowSummary when complete
738
+ *
739
+ * @example
740
+ * ```typescript
741
+ * const summary = await result.stream({
742
+ * onStepStart: (event) => console.log('Starting:', event.name),
743
+ * onStepDelta: (text) => process.stdout.write(text),
744
+ * onStepComplete: (result, event) => console.log('Done:', event.name),
745
+ * onFlowComplete: (event) => console.log('Flow complete!'),
746
+ * })
747
+ * ```
748
+ */
749
+ stream(callbacks?: StreamCallbacks): Promise<FlowSummary>;
750
+ /**
751
+ * Get the result from a specific step by its name
752
+ *
753
+ * Matches against the `name` property you set when creating the step.
754
+ * - **Case-sensitive**: `'Analyze'` ≠ `'analyze'`
755
+ * - **Exact match only**: no partial or fuzzy matching
756
+ * - Returns `undefined` if no step with that name is found
757
+ *
758
+ * @param stepName - The exact step name (from the `name` property when creating the step)
759
+ * @returns The step's result, or undefined if not found
760
+ *
761
+ * @example
762
+ * ```typescript
763
+ * // When building:
764
+ * .prompt({ name: 'Analyze Screenshot', model: 'gpt-4', ... })
765
+ *
766
+ * // When retrieving (must match exactly):
767
+ * const analysis = await result.getResult('Analyze Screenshot') // ✓ Works
768
+ * const analysis = await result.getResult('analyze screenshot') // ✗ undefined
769
+ * ```
770
+ */
771
+ getResult(stepName: string): Promise<any>;
772
+ /**
773
+ * Get all step results as a Map
774
+ *
775
+ * @returns Map of step name to result
776
+ *
777
+ * @example
778
+ * ```typescript
779
+ * const allResults = await result.getAllResults()
780
+ * for (const [stepName, result] of allResults) {
781
+ * console.log(stepName, result)
782
+ * }
783
+ * ```
784
+ */
785
+ getAllResults(): Promise<Map<string, any>>;
786
+ /**
787
+ * Get the flow summary after processing
788
+ *
789
+ * @returns FlowSummary with execution details
790
+ */
791
+ getSummary(): Promise<FlowSummary>;
792
+ /**
793
+ * Ensure the stream has been processed and return the summary
794
+ */
795
+ private ensureSummary;
796
+ /**
797
+ * Ensure the response hasn't been consumed yet
798
+ */
799
+ private ensureNotConsumed;
800
+ }
801
+
685
802
  /**
686
803
  * FlowBuilder - Fluent builder for constructing dispatch configurations
687
804
  *
@@ -1005,7 +1122,7 @@ interface RecordConfig$1 {
1005
1122
  /**
1006
1123
  * Options for upsert mode - controls conflict detection and versioning
1007
1124
  */
1008
- interface UpsertOptions$1 {
1125
+ interface UpsertOptions {
1009
1126
  /** Whether to create a version snapshot before updating (default: true) */
1010
1127
  createVersionOnChange?: boolean;
1011
1128
  /** Allow overwriting changes made via dashboard/API (default: false) */
@@ -1025,7 +1142,7 @@ interface DispatchOptions$1 {
1025
1142
  versionNotes?: string;
1026
1143
  flowVersionId?: string;
1027
1144
  /** Options for upsert mode (only used when flowMode is 'upsert') */
1028
- upsertOptions?: UpsertOptions$1;
1145
+ upsertOptions?: UpsertOptions;
1029
1146
  flowTimeoutMs?: number;
1030
1147
  stepTimeoutMs?: number;
1031
1148
  }
@@ -1562,123 +1679,6 @@ declare function createExternalTool(config: {
1562
1679
  body?: string;
1563
1680
  }): RuntimeTool;
1564
1681
 
1565
- /**
1566
- * FlowResult - Wrapper for streaming flow execution responses
1567
- *
1568
- * Provides convenient methods for processing streaming responses
1569
- * from the Runtype API dispatch endpoint.
1570
- */
1571
-
1572
- /**
1573
- * Result wrapper for flow execution
1574
- *
1575
- * Provides multiple ways to consume the streaming response:
1576
- * - `.stream(callbacks)` - Process with callbacks
1577
- * - `.getResult(stepName)` - Get result from a specific step
1578
- * - `.getAllResults()` - Get all step results
1579
- * - `.raw` - Access the raw Response for manual handling
1580
- *
1581
- * @example
1582
- * ```typescript
1583
- * const result = await flow.run(apiClient, options)
1584
- *
1585
- * // Option 1: Process with callbacks
1586
- * const summary = await result.stream({
1587
- * onStepDelta: (text) => process.stdout.write(text),
1588
- * })
1589
- *
1590
- * // Option 2: Just get a specific step's result
1591
- * const analysis = await result.getResult('Analyze Data')
1592
- *
1593
- * // Option 3: Get all results
1594
- * const allResults = await result.getAllResults()
1595
- * ```
1596
- */
1597
- declare class FlowResult {
1598
- private response;
1599
- private consumed;
1600
- private cachedSummary;
1601
- constructor(response: Response, summary?: FlowSummary);
1602
- /**
1603
- * Get the raw Response object for manual handling
1604
- *
1605
- * Note: The response body can only be consumed once.
1606
- * Using this will prevent using other methods like stream() or getResult().
1607
- */
1608
- get raw(): Response;
1609
- /**
1610
- * Check if the response has already been consumed
1611
- */
1612
- get isConsumed(): boolean;
1613
- /**
1614
- * Process the streaming response with callbacks
1615
- *
1616
- * @param callbacks - Callbacks for different event types
1617
- * @returns Promise resolving to FlowSummary when complete
1618
- *
1619
- * @example
1620
- * ```typescript
1621
- * const summary = await result.stream({
1622
- * onStepStart: (event) => console.log('Starting:', event.name),
1623
- * onStepDelta: (text) => process.stdout.write(text),
1624
- * onStepComplete: (result, event) => console.log('Done:', event.name),
1625
- * onFlowComplete: (event) => console.log('Flow complete!'),
1626
- * })
1627
- * ```
1628
- */
1629
- stream(callbacks?: StreamCallbacks): Promise<FlowSummary>;
1630
- /**
1631
- * Get the result from a specific step by its name
1632
- *
1633
- * Matches against the `name` property you set when creating the step.
1634
- * - **Case-sensitive**: `'Analyze'` ≠ `'analyze'`
1635
- * - **Exact match only**: no partial or fuzzy matching
1636
- * - Returns `undefined` if no step with that name is found
1637
- *
1638
- * @param stepName - The exact step name (from the `name` property when creating the step)
1639
- * @returns The step's result, or undefined if not found
1640
- *
1641
- * @example
1642
- * ```typescript
1643
- * // When building:
1644
- * .prompt({ name: 'Analyze Screenshot', model: 'gpt-4', ... })
1645
- *
1646
- * // When retrieving (must match exactly):
1647
- * const analysis = await result.getResult('Analyze Screenshot') // ✓ Works
1648
- * const analysis = await result.getResult('analyze screenshot') // ✗ undefined
1649
- * ```
1650
- */
1651
- getResult(stepName: string): Promise<any>;
1652
- /**
1653
- * Get all step results as a Map
1654
- *
1655
- * @returns Map of step name to result
1656
- *
1657
- * @example
1658
- * ```typescript
1659
- * const allResults = await result.getAllResults()
1660
- * for (const [stepName, result] of allResults) {
1661
- * console.log(stepName, result)
1662
- * }
1663
- * ```
1664
- */
1665
- getAllResults(): Promise<Map<string, any>>;
1666
- /**
1667
- * Get the flow summary after processing
1668
- *
1669
- * @returns FlowSummary with execution details
1670
- */
1671
- getSummary(): Promise<FlowSummary>;
1672
- /**
1673
- * Ensure the stream has been processed and return the summary
1674
- */
1675
- private ensureSummary;
1676
- /**
1677
- * Ensure the response hasn't been consumed yet
1678
- */
1679
- private ensureNotConsumed;
1680
- }
1681
-
1682
1682
  /**
1683
1683
  * FlowsNamespace - Static namespace for flow operations
1684
1684
  *
@@ -1691,234 +1691,44 @@ declare class FlowResult {
1691
1691
  interface LocalToolsOptions {
1692
1692
  localTools?: Record<string, (args: unknown) => Promise<unknown>>;
1693
1693
  }
1694
- interface FlowConfig {
1695
- name: string;
1696
- description?: string;
1697
- }
1698
- interface UpsertFlowConfig extends FlowConfig {
1699
- /** Whether to create a version snapshot before updating (default: true) */
1700
- createVersionOnChange?: boolean;
1701
- /** Allow overwriting changes made via dashboard/API (default: false) */
1702
- allowOverwriteExternalChanges?: boolean;
1703
- }
1704
- interface RecordConfig {
1705
- id?: number | string;
1706
- name?: string;
1707
- type?: string;
1694
+ type FlowConfig = FlowConfig$1;
1695
+ type UpsertFlowConfig = UpsertFlowConfig$1;
1696
+ type RecordConfig = Omit<RecordConfig$1, 'metadata'> & {
1708
1697
  metadata?: JsonObject;
1709
- }
1710
- interface Message {
1711
- role: 'system' | 'user' | 'assistant';
1712
- content: MessageContent;
1713
- }
1714
- interface PromptStepConfig {
1715
- name: string;
1716
- model: string;
1717
- userPrompt: string;
1718
- systemPrompt?: string;
1719
- previousMessages?: string | Array<{
1720
- role: string;
1721
- content: string;
1722
- }>;
1723
- outputVariable?: string;
1724
- responseFormat?: 'text' | 'json';
1725
- temperature?: number;
1726
- topP?: number;
1727
- topK?: number;
1728
- frequencyPenalty?: number;
1729
- presencePenalty?: number;
1730
- seed?: number;
1731
- maxTokens?: number;
1732
- /** Enable reasoning/extended thinking. Use `true` for defaults or `ReasoningConfig` for fine-grained control */
1733
- reasoning?: boolean | ReasoningConfig;
1734
- streamOutput?: boolean;
1735
- tools?: {
1736
- toolIds?: string[];
1737
- [key: string]: unknown;
1738
- };
1739
- /** Error handling configuration - supports simple mode or fallback chains */
1740
- errorHandling?: ErrorHandlingMode | PromptErrorHandling;
1741
- enabled?: boolean;
1742
- }
1743
- interface FetchUrlStepConfig {
1744
- name: string;
1745
- url: string;
1746
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
1747
- headers?: Record<string, string>;
1748
- body?: string;
1749
- responseType?: 'json' | 'text' | 'xml';
1750
- markdownIfAvailable?: boolean;
1751
- outputVariable?: string;
1752
- fetchMethod?: 'http' | 'firecrawl';
1698
+ };
1699
+ type Message = Message$1;
1700
+ type NamespaceStepConfig<T> = Omit<T, 'when'>;
1701
+ type FetchUrlNamespaceConfig = NamespaceStepConfig<FetchUrlStepConfig$1>;
1702
+ type ConditionalNamespaceConfig = NamespaceStepConfig<ConditionalStepConfig$1>;
1703
+ type SendEventNamespaceConfig = NamespaceStepConfig<SendEventStepConfig$1>;
1704
+ type PromptStepConfig = NamespaceStepConfig<PromptStepConfig$1>;
1705
+ type FetchUrlStepConfig = Omit<FetchUrlNamespaceConfig, 'firecrawl'> & {
1753
1706
  firecrawl?: {
1754
1707
  formats?: string[];
1755
1708
  [key: string]: unknown;
1756
1709
  };
1757
- /** Error handling configuration - supports simple mode or fallback chains */
1758
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1759
- streamOutput?: boolean;
1760
- enabled?: boolean;
1761
- }
1762
- interface TransformDataStepConfig {
1763
- name: string;
1764
- script: string;
1765
- outputVariable?: string;
1766
- streamOutput?: boolean;
1767
- enabled?: boolean;
1768
- }
1769
- interface SetVariableStepConfig {
1770
- name: string;
1771
- variableName: string;
1772
- value: string | number | boolean | object;
1773
- enabled?: boolean;
1774
- }
1775
- interface ConditionalStepConfig {
1776
- name: string;
1777
- condition: string;
1710
+ };
1711
+ type TransformDataStepConfig = Omit<NamespaceStepConfig<TransformDataStepConfig$1>, 'sandboxProvider'>;
1712
+ type SetVariableStepConfig = NamespaceStepConfig<SetVariableStepConfig$1>;
1713
+ type ConditionalStepConfig = Omit<ConditionalNamespaceConfig, 'trueSteps' | 'falseSteps'> & {
1778
1714
  trueSteps?: unknown[];
1779
1715
  falseSteps?: unknown[];
1780
- enabled?: boolean;
1781
- }
1782
- interface SearchStepConfig {
1783
- name: string;
1784
- provider: string;
1785
- query: string;
1786
- maxResults?: number;
1787
- outputVariable?: string;
1788
- returnCitations?: boolean;
1789
- /** Error handling configuration - supports simple mode or fallback chains */
1790
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1791
- streamOutput?: boolean;
1792
- enabled?: boolean;
1793
- }
1794
- interface SendEmailStepConfig {
1795
- name: string;
1796
- to: string;
1797
- from?: string;
1798
- subject: string;
1799
- html: string;
1800
- outputVariable?: string;
1801
- /** Error handling configuration - supports simple mode or fallback chains */
1802
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1803
- streamOutput?: boolean;
1804
- enabled?: boolean;
1805
- }
1806
- interface SendStreamStepConfig {
1807
- name: string;
1808
- message: string;
1809
- enabled?: boolean;
1810
- }
1811
-
1812
- interface RetrieveRecordStepConfig {
1813
- name: string;
1814
- recordType?: string;
1815
- recordName?: string;
1816
- /** Chip-style filter (metadata + top-level columns). See flow-builder.ts. */
1817
- recordFilter?: RecordFilter;
1818
- fieldsToInclude?: string[];
1819
- fieldsToExclude?: string[];
1820
- outputVariable?: string;
1821
- streamOutput?: boolean;
1822
- enabled?: boolean;
1823
- }
1824
- interface UpsertRecordStepConfig {
1825
- name: string;
1826
- recordType: string;
1827
- recordName?: string;
1828
- sourceVariable?: string;
1829
- mergeStrategy?: 'merge' | 'replace';
1830
- outputVariable?: string;
1831
- /** Error handling configuration - supports simple mode or fallback chains */
1832
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1833
- streamOutput?: boolean;
1834
- enabled?: boolean;
1835
- }
1836
- interface VectorSearchStepConfig {
1837
- name: string;
1838
- query: string;
1839
- recordType?: string;
1840
- embeddingModel?: string;
1841
- limit?: number;
1842
- threshold?: number;
1843
- outputVariable?: string;
1844
- streamOutput?: boolean;
1845
- enabled?: boolean;
1846
- }
1847
- interface GenerateEmbeddingStepConfig {
1848
- name: string;
1849
- text: string;
1850
- embeddingModel?: string;
1851
- maxLength?: number;
1852
- outputVariable?: string;
1853
- streamOutput?: boolean;
1854
- enabled?: boolean;
1855
- }
1856
- interface WaitUntilStepConfig {
1857
- name: string;
1858
- delayMs?: number;
1859
- continueOnTimeout?: boolean;
1860
- poll?: {
1861
- enabled: boolean;
1862
- intervalMs?: number;
1863
- maxAttempts?: number;
1864
- condition?: string;
1865
- };
1866
- outputVariable?: string;
1867
- /** Error handling configuration - supports simple mode or fallback chains */
1868
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1869
- streamOutput?: boolean;
1870
- enabled?: boolean;
1871
- }
1872
- interface SendEventStepConfig {
1873
- name: string;
1874
- provider: string;
1875
- eventName: string;
1716
+ };
1717
+ type SearchStepConfig = NamespaceStepConfig<SearchStepConfig$1>;
1718
+ type SendEmailStepConfig = NamespaceStepConfig<SendEmailStepConfig$1>;
1719
+ type SendStreamStepConfig = NamespaceStepConfig<SendStreamStepConfig$1>;
1720
+ type RetrieveRecordStepConfig = NamespaceStepConfig<RetrieveRecordStepConfig$1>;
1721
+ type UpsertRecordStepConfig = NamespaceStepConfig<UpsertRecordStepConfig$1>;
1722
+ type VectorSearchStepConfig = NamespaceStepConfig<VectorSearchStepConfig$1>;
1723
+ type GenerateEmbeddingStepConfig = NamespaceStepConfig<GenerateEmbeddingStepConfig$1>;
1724
+ type WaitUntilStepConfig = NamespaceStepConfig<WaitUntilStepConfig$1>;
1725
+ type SendEventStepConfig = Omit<SendEventNamespaceConfig, 'properties'> & {
1876
1726
  properties?: Record<string, unknown>;
1877
- outputVariable?: string;
1878
- /** Error handling configuration - supports simple mode or fallback chains */
1879
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1880
- streamOutput?: boolean;
1881
- enabled?: boolean;
1882
- }
1883
- interface SendTextStepConfig {
1884
- name: string;
1885
- to: string;
1886
- from?: string;
1887
- message: string;
1888
- outputVariable?: string;
1889
- /** Error handling configuration - supports simple mode or fallback chains */
1890
- errorHandling?: ErrorHandlingMode | ContextErrorHandling;
1891
- streamOutput?: boolean;
1892
- enabled?: boolean;
1893
- }
1894
- interface FetchGitHubStepConfig {
1895
- name: string;
1896
- repository: string;
1897
- branch?: string;
1898
- path?: string;
1899
- outputVariable?: string;
1900
- streamOutput?: boolean;
1901
- enabled?: boolean;
1902
- }
1903
- interface UpsertOptions {
1904
- createVersionOnChange?: boolean;
1905
- allowOverwriteExternalChanges?: boolean;
1906
- }
1907
- interface DispatchOptions {
1908
- streamResponse?: boolean;
1909
- modelOverride?: string;
1910
- recordMode?: 'existing' | 'create' | 'virtual';
1911
- flowMode?: 'existing' | 'create' | 'virtual' | 'upsert';
1912
- storeResults?: boolean;
1913
- autoAppendMetadata?: boolean;
1914
- debugMode?: boolean;
1915
- createVersion?: boolean;
1916
- versionType?: 'published' | 'draft' | 'test' | 'virtual';
1917
- versionLabel?: string;
1918
- versionNotes?: string;
1919
- flowVersionId?: string;
1920
- upsertOptions?: UpsertOptions;
1921
- }
1727
+ };
1728
+ type SendTextStepConfig = NamespaceStepConfig<SendTextStepConfig$1>;
1729
+ type FetchGitHubStepConfig = NamespaceStepConfig<FetchGitHubStepConfig$1>;
1730
+
1731
+ type DispatchOptions = Omit<DispatchOptions$1, 'flowTimeoutMs' | 'stepTimeoutMs'>;
1922
1732
  declare class FlowsNamespace {
1923
1733
  private getClient;
1924
1734
  constructor(getClient: () => RuntypeClient$1);
@@ -5621,4 +5431,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
5621
5431
  declare function getDefaultPlanPath(taskName: string): string;
5622
5432
  declare function sanitizeTaskSlug(taskName: string): string;
5623
5433
 
5624
- export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$2 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
5434
+ export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$1 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "1.21.1",
3
+ "version": "1.21.2",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",
@@ -61,6 +61,7 @@
61
61
  "scripts": {
62
62
  "build": "tsup",
63
63
  "dev": "tsup --watch",
64
+ "typecheck": "tsc --noEmit",
64
65
  "clean": "rm -rf dist",
65
66
  "test": "vitest run",
66
67
  "test:watch": "vitest watch"