@runtypelabs/sdk 4.21.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -60,7 +60,6 @@ __export(index_exports, {
60
60
  ProductDriftError: () => ProductDriftError,
61
61
  ProductEnsureConflictError: () => ProductEnsureConflictError,
62
62
  ProductsNamespace: () => ProductsNamespace,
63
- PromptRunner: () => PromptRunner,
64
63
  PromptsEndpoint: () => PromptsEndpoint,
65
64
  PromptsNamespace: () => PromptsNamespace,
66
65
  ProviderKeysEndpoint: () => ProviderKeysEndpoint,
@@ -951,7 +950,7 @@ var FlowResult = class {
951
950
  /**
952
951
  * @param options.unified - The response is a unified-vocabulary SSE stream
953
952
  * (`/dispatch` since the unified-SSE cutover). Set by dispatch call sites;
954
- * left unset by still-legacy producers (`/prompts/{id}/run`, eval stream).
953
+ * left unset by the still-legacy eval stream producer.
955
954
  */
956
955
  constructor(response, summary, options = {}) {
957
956
  this.consumed = false;
@@ -1034,6 +1033,7 @@ var FlowResult = class {
1034
1033
  * const analysis = await result.getResult('analyze screenshot') // ✗ undefined
1035
1034
  * ```
1036
1035
  */
1036
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK step results are intentionally untyped (FlowSummary.results is Map<string, any>); consumers narrow at the use site
1037
1037
  async getResult(stepName) {
1038
1038
  const summary = await this.ensureSummary();
1039
1039
  if (summary.results.has(stepName)) {
@@ -1054,6 +1054,7 @@ var FlowResult = class {
1054
1054
  * }
1055
1055
  * ```
1056
1056
  */
1057
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK step results are intentionally untyped (FlowSummary.results is Map<string, any>); consumers narrow at the use site
1057
1058
  async getAllResults() {
1058
1059
  const summary = await this.ensureSummary();
1059
1060
  return summary.results;
@@ -3615,138 +3616,10 @@ var EvalsNamespace = class {
3615
3616
  };
3616
3617
 
3617
3618
  // src/prompts-namespace.ts
3618
- var PromptRunner = class {
3619
- constructor(getClient, promptId, options) {
3620
- this.getClient = getClient;
3621
- this.promptId = promptId;
3622
- this.options = options;
3623
- }
3624
- /**
3625
- * Execute the prompt with streaming response
3626
- *
3627
- * Streams the prompt response as it's generated.
3628
- *
3629
- * @example
3630
- * ```typescript
3631
- * const result = await Runtype.prompts.run('prompt_123', {
3632
- * recordId: 'rec_456'
3633
- * }).stream()
3634
- *
3635
- * // Process with callbacks
3636
- * await result.stream({
3637
- * onStepDelta: (text) => process.stdout.write(text),
3638
- * onFlowComplete: () => console.log('Done!'),
3639
- * })
3640
- * ```
3641
- */
3642
- async stream(callbacks) {
3643
- const client = this.getClient();
3644
- const payload = this.buildPayload();
3645
- payload.stream = true;
3646
- const response = await client.requestStream(`/prompts/${this.promptId}/run`, {
3647
- method: "POST",
3648
- body: JSON.stringify(payload)
3649
- });
3650
- const result = new FlowResult(response);
3651
- if (callbacks) {
3652
- await result.stream(callbacks);
3653
- }
3654
- return result;
3655
- }
3656
- /**
3657
- * Execute the prompt and wait for complete result
3658
- *
3659
- * Waits for the entire response before returning.
3660
- *
3661
- * @example
3662
- * ```typescript
3663
- * const result = await Runtype.prompts.run('prompt_123', {
3664
- * recordId: 'rec_456'
3665
- * }).result()
3666
- *
3667
- * const output = await result.getResult('prompt')
3668
- * console.log(output)
3669
- * ```
3670
- */
3671
- async result() {
3672
- const client = this.getClient();
3673
- const payload = this.buildPayload();
3674
- payload.stream = true;
3675
- const response = await client.requestStream(`/prompts/${this.promptId}/run`, {
3676
- method: "POST",
3677
- body: JSON.stringify(payload)
3678
- });
3679
- const result = new FlowResult(response);
3680
- await result.getSummary();
3681
- return result;
3682
- }
3683
- /**
3684
- * Build the run payload
3685
- */
3686
- buildPayload() {
3687
- const payload = {};
3688
- if (this.options.recordId) {
3689
- payload.recordId = this.options.recordId;
3690
- } else if (this.options.record) {
3691
- payload.record = this.options.record;
3692
- }
3693
- if (this.options.modelOverride) {
3694
- payload.modelOverride = this.options.modelOverride;
3695
- }
3696
- if (this.options.temperature !== void 0) {
3697
- payload.temperature = this.options.temperature;
3698
- }
3699
- if (this.options.topP !== void 0) {
3700
- payload.topP = this.options.topP;
3701
- }
3702
- if (this.options.topK !== void 0) {
3703
- payload.topK = this.options.topK;
3704
- }
3705
- if (this.options.frequencyPenalty !== void 0) {
3706
- payload.frequencyPenalty = this.options.frequencyPenalty;
3707
- }
3708
- if (this.options.presencePenalty !== void 0) {
3709
- payload.presencePenalty = this.options.presencePenalty;
3710
- }
3711
- if (this.options.seed !== void 0) {
3712
- payload.seed = this.options.seed;
3713
- }
3714
- if (this.options.maxTokens !== void 0) {
3715
- payload.maxTokens = this.options.maxTokens;
3716
- }
3717
- if (this.options.storeResult !== void 0) {
3718
- payload.storeResult = this.options.storeResult;
3719
- }
3720
- return payload;
3721
- }
3722
- };
3723
3619
  var PromptsNamespace = class {
3724
3620
  constructor(getClient) {
3725
3621
  this.getClient = getClient;
3726
3622
  }
3727
- /**
3728
- * Run a prompt
3729
- *
3730
- * Returns a PromptRunner with terminal methods:
3731
- * - .stream() - Execute and stream results
3732
- * - .result() - Execute and wait for complete result
3733
- *
3734
- * @example
3735
- * ```typescript
3736
- * // Stream the response
3737
- * const result = await Runtype.prompts.run('prompt_123', {
3738
- * recordId: 'rec_456'
3739
- * }).stream()
3740
- *
3741
- * // Get complete result
3742
- * const result = await Runtype.prompts.run('prompt_123', {
3743
- * record: { name: 'Test', metadata: { input: 'Hello' } }
3744
- * }).result()
3745
- * ```
3746
- */
3747
- run(promptId, options = {}) {
3748
- return new PromptRunner(this.getClient, promptId, options);
3749
- }
3750
3623
  /**
3751
3624
  * Create a new prompt
3752
3625
  *
@@ -5797,7 +5670,7 @@ var Runtype = class {
5797
5670
 
5798
5671
  // src/version.ts
5799
5672
  var FALLBACK_VERSION = "0.0.0";
5800
- var SDK_VERSION = "4.21.0".length > 0 ? "4.21.0" : FALLBACK_VERSION;
5673
+ var SDK_VERSION = "5.0.0".length > 0 ? "5.0.0" : FALLBACK_VERSION;
5801
5674
  var RUNTYPE_CLIENT_KIND = "sdk";
5802
5675
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
5803
5676
 
@@ -7920,12 +7793,6 @@ var PromptsEndpoint = class {
7920
7793
  async delete(id) {
7921
7794
  return this.client.delete(`/prompts/${id}`);
7922
7795
  }
7923
- /**
7924
- * Run a prompt on a specific record
7925
- */
7926
- async runOnRecord(id, recordId) {
7927
- return this.client.post(`/prompts/${id}/run-on-record`, { recordId });
7928
- }
7929
7796
  /**
7930
7797
  * Get flows using this prompt
7931
7798
  */
@@ -13477,7 +13344,6 @@ var STEP_TYPE_TO_METHOD = {
13477
13344
  ProductDriftError,
13478
13345
  ProductEnsureConflictError,
13479
13346
  ProductsNamespace,
13480
- PromptRunner,
13481
13347
  PromptsEndpoint,
13482
13348
  PromptsNamespace,
13483
13349
  ProviderKeysEndpoint,
package/dist/index.d.cts CHANGED
@@ -37148,8 +37148,8 @@ type StreamEventOf<U, T extends string> = Extract<U, {
37148
37148
  * as unified (an execution stream always leads with `execution_start`).
37149
37149
  * This makes the public `streamEvents(response)` / `processStream(response,
37150
37150
  * cb)` pattern correct on a `dispatch()` response without the caller knowing
37151
- * the wire format, and keeps a still-legacy stream (`/prompts/{id}/run`,
37152
- * eval) flowing through untouched.
37151
+ * the wire format, and keeps a still-legacy stream (the eval stream)
37152
+ * flowing through untouched.
37153
37153
  * - `true`: force translation (internal callers that KNOW the route is unified).
37154
37154
  * - `false`: force legacy passthrough (never translate).
37155
37155
  * The non-streaming JSON branch always stays legacy — the api only translates
@@ -37249,7 +37249,7 @@ declare class FlowResult {
37249
37249
  /**
37250
37250
  * @param options.unified - The response is a unified-vocabulary SSE stream
37251
37251
  * (`/dispatch` since the unified-SSE cutover). Set by dispatch call sites;
37252
- * left unset by still-legacy producers (`/prompts/{id}/run`, eval stream).
37252
+ * left unset by the still-legacy eval stream producer.
37253
37253
  */
37254
37254
  constructor(response: Response, summary?: FlowSummary, options?: StreamConsumeOptions);
37255
37255
  /**
@@ -40342,34 +40342,6 @@ interface Prompt {
40342
40342
  createdAt: string;
40343
40343
  updatedAt: string;
40344
40344
  }
40345
- interface PromptRunOptions {
40346
- /** Record ID to run the prompt against */
40347
- recordId?: string;
40348
- /** Record data (alternative to recordId) */
40349
- record?: {
40350
- name?: string;
40351
- type?: string;
40352
- metadata?: Record<string, unknown>;
40353
- };
40354
- /** Model override */
40355
- modelOverride?: string;
40356
- /** Temperature override */
40357
- temperature?: number;
40358
- /** Top-p (nucleus) sampling override */
40359
- topP?: number;
40360
- /** Top-k sampling override */
40361
- topK?: number;
40362
- /** Frequency penalty override */
40363
- frequencyPenalty?: number;
40364
- /** Presence penalty override */
40365
- presencePenalty?: number;
40366
- /** Seed override */
40367
- seed?: number;
40368
- /** Max tokens override */
40369
- maxTokens?: number;
40370
- /** Store the result */
40371
- storeResult?: boolean;
40372
- }
40373
40345
  interface PromptListParams {
40374
40346
  /** Filter by flow ID */
40375
40347
  flowId?: string;
@@ -40380,82 +40352,9 @@ interface PromptListParams {
40380
40352
  /** Pagination offset */
40381
40353
  offset?: number;
40382
40354
  }
40383
- /**
40384
- * PromptRunner - Builder returned by Runtype.prompts.run()
40385
- *
40386
- * Provides terminal methods for executing prompts:
40387
- * - .stream() - Execute and stream results in real-time
40388
- * - .result() - Execute and wait for complete result
40389
- */
40390
- declare class PromptRunner {
40391
- private getClient;
40392
- private promptId;
40393
- private options;
40394
- constructor(getClient: () => RuntypeClient$1, promptId: string, options: PromptRunOptions);
40395
- /**
40396
- * Execute the prompt with streaming response
40397
- *
40398
- * Streams the prompt response as it's generated.
40399
- *
40400
- * @example
40401
- * ```typescript
40402
- * const result = await Runtype.prompts.run('prompt_123', {
40403
- * recordId: 'rec_456'
40404
- * }).stream()
40405
- *
40406
- * // Process with callbacks
40407
- * await result.stream({
40408
- * onStepDelta: (text) => process.stdout.write(text),
40409
- * onFlowComplete: () => console.log('Done!'),
40410
- * })
40411
- * ```
40412
- */
40413
- stream(callbacks?: StreamCallbacks): Promise<FlowResult>;
40414
- /**
40415
- * Execute the prompt and wait for complete result
40416
- *
40417
- * Waits for the entire response before returning.
40418
- *
40419
- * @example
40420
- * ```typescript
40421
- * const result = await Runtype.prompts.run('prompt_123', {
40422
- * recordId: 'rec_456'
40423
- * }).result()
40424
- *
40425
- * const output = await result.getResult('prompt')
40426
- * console.log(output)
40427
- * ```
40428
- */
40429
- result(): Promise<FlowResult>;
40430
- /**
40431
- * Build the run payload
40432
- */
40433
- private buildPayload;
40434
- }
40435
40355
  declare class PromptsNamespace {
40436
40356
  private getClient;
40437
40357
  constructor(getClient: () => RuntypeClient$1);
40438
- /**
40439
- * Run a prompt
40440
- *
40441
- * Returns a PromptRunner with terminal methods:
40442
- * - .stream() - Execute and stream results
40443
- * - .result() - Execute and wait for complete result
40444
- *
40445
- * @example
40446
- * ```typescript
40447
- * // Stream the response
40448
- * const result = await Runtype.prompts.run('prompt_123', {
40449
- * recordId: 'rec_456'
40450
- * }).stream()
40451
- *
40452
- * // Get complete result
40453
- * const result = await Runtype.prompts.run('prompt_123', {
40454
- * record: { name: 'Test', metadata: { input: 'Hello' } }
40455
- * }).result()
40456
- * ```
40457
- */
40458
- run(promptId: string, options?: PromptRunOptions): PromptRunner;
40459
40358
  /**
40460
40359
  * Create a new prompt
40461
40360
  *
@@ -42874,10 +42773,6 @@ declare class PromptsEndpoint {
42874
42773
  * Delete a prompt
42875
42774
  */
42876
42775
  delete(id: string): Promise<void>;
42877
- /**
42878
- * Run a prompt on a specific record
42879
- */
42880
- runOnRecord(id: string, recordId: string): Promise<any>;
42881
42776
  /**
42882
42777
  * Get flows using this prompt
42883
42778
  */
@@ -46954,4 +46849,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
46954
46849
  declare function getDefaultPlanPath(taskName: string): string;
46955
46850
  declare function sanitizeTaskSlug(taskName: string): string;
46956
46851
 
46957
- export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type App, type AppManifest, type AppVersion, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, AppsEndpoint, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, 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 ClientToolDefinition, type ClientWidgetTheme, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateConversationRequest, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DefineAgentInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, 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 ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, 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 FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, 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, type AgentSkillBinding as RuntypeAgentSkillBinding, 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 Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, 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 SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UnifiedStreamEvent, type UpdateAppRequest, type UpdateClientTokenRequest, type UpdateConversationRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, compileWorkflowConfig, computeAgentContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, listWorkflowHooks, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullFpo, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, streamEvents, unregisterWorkflowHook, withUnifiedEvents };
46852
+ export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type App, type AppManifest, type AppVersion, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, AppsEndpoint, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, 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 ClientToolDefinition, type ClientWidgetTheme, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateConversationRequest, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DefineAgentInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, 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 ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, 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 FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, 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, type AgentSkillBinding as RuntypeAgentSkillBinding, 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 Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, 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 SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UnifiedStreamEvent, type UpdateAppRequest, type UpdateClientTokenRequest, type UpdateConversationRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, compileWorkflowConfig, computeAgentContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, listWorkflowHooks, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullFpo, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, streamEvents, unregisterWorkflowHook, withUnifiedEvents };
package/dist/index.d.ts CHANGED
@@ -37148,8 +37148,8 @@ type StreamEventOf<U, T extends string> = Extract<U, {
37148
37148
  * as unified (an execution stream always leads with `execution_start`).
37149
37149
  * This makes the public `streamEvents(response)` / `processStream(response,
37150
37150
  * cb)` pattern correct on a `dispatch()` response without the caller knowing
37151
- * the wire format, and keeps a still-legacy stream (`/prompts/{id}/run`,
37152
- * eval) flowing through untouched.
37151
+ * the wire format, and keeps a still-legacy stream (the eval stream)
37152
+ * flowing through untouched.
37153
37153
  * - `true`: force translation (internal callers that KNOW the route is unified).
37154
37154
  * - `false`: force legacy passthrough (never translate).
37155
37155
  * The non-streaming JSON branch always stays legacy — the api only translates
@@ -37249,7 +37249,7 @@ declare class FlowResult {
37249
37249
  /**
37250
37250
  * @param options.unified - The response is a unified-vocabulary SSE stream
37251
37251
  * (`/dispatch` since the unified-SSE cutover). Set by dispatch call sites;
37252
- * left unset by still-legacy producers (`/prompts/{id}/run`, eval stream).
37252
+ * left unset by the still-legacy eval stream producer.
37253
37253
  */
37254
37254
  constructor(response: Response, summary?: FlowSummary, options?: StreamConsumeOptions);
37255
37255
  /**
@@ -40342,34 +40342,6 @@ interface Prompt {
40342
40342
  createdAt: string;
40343
40343
  updatedAt: string;
40344
40344
  }
40345
- interface PromptRunOptions {
40346
- /** Record ID to run the prompt against */
40347
- recordId?: string;
40348
- /** Record data (alternative to recordId) */
40349
- record?: {
40350
- name?: string;
40351
- type?: string;
40352
- metadata?: Record<string, unknown>;
40353
- };
40354
- /** Model override */
40355
- modelOverride?: string;
40356
- /** Temperature override */
40357
- temperature?: number;
40358
- /** Top-p (nucleus) sampling override */
40359
- topP?: number;
40360
- /** Top-k sampling override */
40361
- topK?: number;
40362
- /** Frequency penalty override */
40363
- frequencyPenalty?: number;
40364
- /** Presence penalty override */
40365
- presencePenalty?: number;
40366
- /** Seed override */
40367
- seed?: number;
40368
- /** Max tokens override */
40369
- maxTokens?: number;
40370
- /** Store the result */
40371
- storeResult?: boolean;
40372
- }
40373
40345
  interface PromptListParams {
40374
40346
  /** Filter by flow ID */
40375
40347
  flowId?: string;
@@ -40380,82 +40352,9 @@ interface PromptListParams {
40380
40352
  /** Pagination offset */
40381
40353
  offset?: number;
40382
40354
  }
40383
- /**
40384
- * PromptRunner - Builder returned by Runtype.prompts.run()
40385
- *
40386
- * Provides terminal methods for executing prompts:
40387
- * - .stream() - Execute and stream results in real-time
40388
- * - .result() - Execute and wait for complete result
40389
- */
40390
- declare class PromptRunner {
40391
- private getClient;
40392
- private promptId;
40393
- private options;
40394
- constructor(getClient: () => RuntypeClient$1, promptId: string, options: PromptRunOptions);
40395
- /**
40396
- * Execute the prompt with streaming response
40397
- *
40398
- * Streams the prompt response as it's generated.
40399
- *
40400
- * @example
40401
- * ```typescript
40402
- * const result = await Runtype.prompts.run('prompt_123', {
40403
- * recordId: 'rec_456'
40404
- * }).stream()
40405
- *
40406
- * // Process with callbacks
40407
- * await result.stream({
40408
- * onStepDelta: (text) => process.stdout.write(text),
40409
- * onFlowComplete: () => console.log('Done!'),
40410
- * })
40411
- * ```
40412
- */
40413
- stream(callbacks?: StreamCallbacks): Promise<FlowResult>;
40414
- /**
40415
- * Execute the prompt and wait for complete result
40416
- *
40417
- * Waits for the entire response before returning.
40418
- *
40419
- * @example
40420
- * ```typescript
40421
- * const result = await Runtype.prompts.run('prompt_123', {
40422
- * recordId: 'rec_456'
40423
- * }).result()
40424
- *
40425
- * const output = await result.getResult('prompt')
40426
- * console.log(output)
40427
- * ```
40428
- */
40429
- result(): Promise<FlowResult>;
40430
- /**
40431
- * Build the run payload
40432
- */
40433
- private buildPayload;
40434
- }
40435
40355
  declare class PromptsNamespace {
40436
40356
  private getClient;
40437
40357
  constructor(getClient: () => RuntypeClient$1);
40438
- /**
40439
- * Run a prompt
40440
- *
40441
- * Returns a PromptRunner with terminal methods:
40442
- * - .stream() - Execute and stream results
40443
- * - .result() - Execute and wait for complete result
40444
- *
40445
- * @example
40446
- * ```typescript
40447
- * // Stream the response
40448
- * const result = await Runtype.prompts.run('prompt_123', {
40449
- * recordId: 'rec_456'
40450
- * }).stream()
40451
- *
40452
- * // Get complete result
40453
- * const result = await Runtype.prompts.run('prompt_123', {
40454
- * record: { name: 'Test', metadata: { input: 'Hello' } }
40455
- * }).result()
40456
- * ```
40457
- */
40458
- run(promptId: string, options?: PromptRunOptions): PromptRunner;
40459
40358
  /**
40460
40359
  * Create a new prompt
40461
40360
  *
@@ -42874,10 +42773,6 @@ declare class PromptsEndpoint {
42874
42773
  * Delete a prompt
42875
42774
  */
42876
42775
  delete(id: string): Promise<void>;
42877
- /**
42878
- * Run a prompt on a specific record
42879
- */
42880
- runOnRecord(id: string, recordId: string): Promise<any>;
42881
42776
  /**
42882
42777
  * Get flows using this prompt
42883
42778
  */
@@ -46954,4 +46849,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
46954
46849
  declare function getDefaultPlanPath(taskName: string): string;
46955
46850
  declare function sanitizeTaskSlug(taskName: string): string;
46956
46851
 
46957
- export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type App, type AppManifest, type AppVersion, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, AppsEndpoint, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, 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 ClientToolDefinition, type ClientWidgetTheme, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateConversationRequest, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DefineAgentInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, 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 ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, 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 FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, 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, type AgentSkillBinding as RuntypeAgentSkillBinding, 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 Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, 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 SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UnifiedStreamEvent, type UpdateAppRequest, type UpdateClientTokenRequest, type UpdateConversationRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, compileWorkflowConfig, computeAgentContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, listWorkflowHooks, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullFpo, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, streamEvents, unregisterWorkflowHook, withUnifiedEvents };
46852
+ export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type App, type AppManifest, type AppVersion, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, AppsEndpoint, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, 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 ClientToolDefinition, type ClientWidgetTheme, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateConversationRequest, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DefineAgentInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, 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 ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, 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 FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, 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, type AgentSkillBinding as RuntypeAgentSkillBinding, 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 Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, 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 SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UnifiedStreamEvent, type UpdateAppRequest, type UpdateClientTokenRequest, type UpdateConversationRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, compileWorkflowConfig, computeAgentContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, listWorkflowHooks, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullFpo, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, streamEvents, unregisterWorkflowHook, withUnifiedEvents };
package/dist/index.mjs CHANGED
@@ -789,7 +789,7 @@ var FlowResult = class {
789
789
  /**
790
790
  * @param options.unified - The response is a unified-vocabulary SSE stream
791
791
  * (`/dispatch` since the unified-SSE cutover). Set by dispatch call sites;
792
- * left unset by still-legacy producers (`/prompts/{id}/run`, eval stream).
792
+ * left unset by the still-legacy eval stream producer.
793
793
  */
794
794
  constructor(response, summary, options = {}) {
795
795
  this.consumed = false;
@@ -872,6 +872,7 @@ var FlowResult = class {
872
872
  * const analysis = await result.getResult('analyze screenshot') // ✗ undefined
873
873
  * ```
874
874
  */
875
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK step results are intentionally untyped (FlowSummary.results is Map<string, any>); consumers narrow at the use site
875
876
  async getResult(stepName) {
876
877
  const summary = await this.ensureSummary();
877
878
  if (summary.results.has(stepName)) {
@@ -892,6 +893,7 @@ var FlowResult = class {
892
893
  * }
893
894
  * ```
894
895
  */
896
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK step results are intentionally untyped (FlowSummary.results is Map<string, any>); consumers narrow at the use site
895
897
  async getAllResults() {
896
898
  const summary = await this.ensureSummary();
897
899
  return summary.results;
@@ -3453,138 +3455,10 @@ var EvalsNamespace = class {
3453
3455
  };
3454
3456
 
3455
3457
  // src/prompts-namespace.ts
3456
- var PromptRunner = class {
3457
- constructor(getClient, promptId, options) {
3458
- this.getClient = getClient;
3459
- this.promptId = promptId;
3460
- this.options = options;
3461
- }
3462
- /**
3463
- * Execute the prompt with streaming response
3464
- *
3465
- * Streams the prompt response as it's generated.
3466
- *
3467
- * @example
3468
- * ```typescript
3469
- * const result = await Runtype.prompts.run('prompt_123', {
3470
- * recordId: 'rec_456'
3471
- * }).stream()
3472
- *
3473
- * // Process with callbacks
3474
- * await result.stream({
3475
- * onStepDelta: (text) => process.stdout.write(text),
3476
- * onFlowComplete: () => console.log('Done!'),
3477
- * })
3478
- * ```
3479
- */
3480
- async stream(callbacks) {
3481
- const client = this.getClient();
3482
- const payload = this.buildPayload();
3483
- payload.stream = true;
3484
- const response = await client.requestStream(`/prompts/${this.promptId}/run`, {
3485
- method: "POST",
3486
- body: JSON.stringify(payload)
3487
- });
3488
- const result = new FlowResult(response);
3489
- if (callbacks) {
3490
- await result.stream(callbacks);
3491
- }
3492
- return result;
3493
- }
3494
- /**
3495
- * Execute the prompt and wait for complete result
3496
- *
3497
- * Waits for the entire response before returning.
3498
- *
3499
- * @example
3500
- * ```typescript
3501
- * const result = await Runtype.prompts.run('prompt_123', {
3502
- * recordId: 'rec_456'
3503
- * }).result()
3504
- *
3505
- * const output = await result.getResult('prompt')
3506
- * console.log(output)
3507
- * ```
3508
- */
3509
- async result() {
3510
- const client = this.getClient();
3511
- const payload = this.buildPayload();
3512
- payload.stream = true;
3513
- const response = await client.requestStream(`/prompts/${this.promptId}/run`, {
3514
- method: "POST",
3515
- body: JSON.stringify(payload)
3516
- });
3517
- const result = new FlowResult(response);
3518
- await result.getSummary();
3519
- return result;
3520
- }
3521
- /**
3522
- * Build the run payload
3523
- */
3524
- buildPayload() {
3525
- const payload = {};
3526
- if (this.options.recordId) {
3527
- payload.recordId = this.options.recordId;
3528
- } else if (this.options.record) {
3529
- payload.record = this.options.record;
3530
- }
3531
- if (this.options.modelOverride) {
3532
- payload.modelOverride = this.options.modelOverride;
3533
- }
3534
- if (this.options.temperature !== void 0) {
3535
- payload.temperature = this.options.temperature;
3536
- }
3537
- if (this.options.topP !== void 0) {
3538
- payload.topP = this.options.topP;
3539
- }
3540
- if (this.options.topK !== void 0) {
3541
- payload.topK = this.options.topK;
3542
- }
3543
- if (this.options.frequencyPenalty !== void 0) {
3544
- payload.frequencyPenalty = this.options.frequencyPenalty;
3545
- }
3546
- if (this.options.presencePenalty !== void 0) {
3547
- payload.presencePenalty = this.options.presencePenalty;
3548
- }
3549
- if (this.options.seed !== void 0) {
3550
- payload.seed = this.options.seed;
3551
- }
3552
- if (this.options.maxTokens !== void 0) {
3553
- payload.maxTokens = this.options.maxTokens;
3554
- }
3555
- if (this.options.storeResult !== void 0) {
3556
- payload.storeResult = this.options.storeResult;
3557
- }
3558
- return payload;
3559
- }
3560
- };
3561
3458
  var PromptsNamespace = class {
3562
3459
  constructor(getClient) {
3563
3460
  this.getClient = getClient;
3564
3461
  }
3565
- /**
3566
- * Run a prompt
3567
- *
3568
- * Returns a PromptRunner with terminal methods:
3569
- * - .stream() - Execute and stream results
3570
- * - .result() - Execute and wait for complete result
3571
- *
3572
- * @example
3573
- * ```typescript
3574
- * // Stream the response
3575
- * const result = await Runtype.prompts.run('prompt_123', {
3576
- * recordId: 'rec_456'
3577
- * }).stream()
3578
- *
3579
- * // Get complete result
3580
- * const result = await Runtype.prompts.run('prompt_123', {
3581
- * record: { name: 'Test', metadata: { input: 'Hello' } }
3582
- * }).result()
3583
- * ```
3584
- */
3585
- run(promptId, options = {}) {
3586
- return new PromptRunner(this.getClient, promptId, options);
3587
- }
3588
3462
  /**
3589
3463
  * Create a new prompt
3590
3464
  *
@@ -5635,7 +5509,7 @@ var Runtype = class {
5635
5509
 
5636
5510
  // src/version.ts
5637
5511
  var FALLBACK_VERSION = "0.0.0";
5638
- var SDK_VERSION = "4.21.0".length > 0 ? "4.21.0" : FALLBACK_VERSION;
5512
+ var SDK_VERSION = "5.0.0".length > 0 ? "5.0.0" : FALLBACK_VERSION;
5639
5513
  var RUNTYPE_CLIENT_KIND = "sdk";
5640
5514
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
5641
5515
 
@@ -7758,12 +7632,6 @@ var PromptsEndpoint = class {
7758
7632
  async delete(id) {
7759
7633
  return this.client.delete(`/prompts/${id}`);
7760
7634
  }
7761
- /**
7762
- * Run a prompt on a specific record
7763
- */
7764
- async runOnRecord(id, recordId) {
7765
- return this.client.post(`/prompts/${id}/run-on-record`, { recordId });
7766
- }
7767
7635
  /**
7768
7636
  * Get flows using this prompt
7769
7637
  */
@@ -13314,7 +13182,6 @@ export {
13314
13182
  ProductDriftError,
13315
13183
  ProductEnsureConflictError,
13316
13184
  ProductsNamespace,
13317
- PromptRunner,
13318
13185
  PromptsEndpoint,
13319
13186
  PromptsNamespace,
13320
13187
  ProviderKeysEndpoint,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "4.21.0",
3
+ "version": "5.0.0",
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",