@runtypelabs/sdk 10.5.0 → 10.5.1

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
@@ -14365,7 +14365,7 @@ function transformQueryParams(params) {
14365
14365
 
14366
14366
  // src/version.ts
14367
14367
  var FALLBACK_VERSION = "0.0.0";
14368
- var SDK_VERSION = "10.5.0".length > 0 ? "10.5.0" : FALLBACK_VERSION;
14368
+ var SDK_VERSION = "10.5.1".length > 0 ? "10.5.1" : FALLBACK_VERSION;
14369
14369
  var RUNTYPE_CLIENT_KIND = "sdk";
14370
14370
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
14371
14371
 
package/dist/index.d.cts CHANGED
@@ -206,6 +206,95 @@ interface paths {
206
206
  patch?: never;
207
207
  trace?: never;
208
208
  };
209
+ "/v1/agent-feedback": {
210
+ parameters: {
211
+ query?: never;
212
+ header?: never;
213
+ path?: never;
214
+ cookie?: never;
215
+ };
216
+ get?: never;
217
+ put?: never;
218
+ /**
219
+ * Report a problem
220
+ * @description Report a problem with the Runtype API, MCP tools, documentation, SDKs, CLI, or dashboard. Built for coding agents: include a category, a short note, and the affected request ID or URL. Any API key can submit, and submitting costs no credits. Secret-looking values in the note are redacted before storage.
221
+ */
222
+ post: {
223
+ parameters: {
224
+ query?: never;
225
+ header?: never;
226
+ path?: never;
227
+ cookie?: never;
228
+ };
229
+ requestBody?: {
230
+ content: {
231
+ "application/json": {
232
+ /**
233
+ * @description Which part of Runtype the problem is in.
234
+ * @enum {string}
235
+ */
236
+ category: "api" | "mcp" | "documentation" | "sdk" | "cli" | "dashboard" | "other";
237
+ /** @description Short description of the problem: what you tried, what you expected, and what happened. */
238
+ note: string;
239
+ /** @description The affected request, execution, or record ID, when there is one. */
240
+ requestId?: string;
241
+ /** @description The MCP tool, SDK method, or CLI command involved, when there is one. */
242
+ toolName?: string;
243
+ /** @description The affected endpoint path or documentation URL, when there is one. */
244
+ url?: string;
245
+ };
246
+ };
247
+ };
248
+ responses: {
249
+ /** @description Feedback received */
250
+ 202: {
251
+ headers: {
252
+ [name: string]: unknown;
253
+ };
254
+ content: {
255
+ "application/json": {
256
+ /** @description Receipt ID for this report (agfb_...). Quote it in follow-ups. */
257
+ id: string;
258
+ /** @enum {string} */
259
+ status: "received";
260
+ };
261
+ };
262
+ };
263
+ /** @description Invalid parameters */
264
+ 400: {
265
+ headers: {
266
+ [name: string]: unknown;
267
+ };
268
+ content: {
269
+ "application/json": components["schemas"]["Error"];
270
+ };
271
+ };
272
+ /** @description Unauthorized */
273
+ 401: {
274
+ headers: {
275
+ [name: string]: unknown;
276
+ };
277
+ content: {
278
+ "application/json": components["schemas"]["Error"];
279
+ };
280
+ };
281
+ /** @description Too many reports in a short window */
282
+ 429: {
283
+ headers: {
284
+ [name: string]: unknown;
285
+ };
286
+ content: {
287
+ "application/json": components["schemas"]["Error"];
288
+ };
289
+ };
290
+ };
291
+ };
292
+ delete?: never;
293
+ options?: never;
294
+ head?: never;
295
+ patch?: never;
296
+ trace?: never;
297
+ };
209
298
  "/v1/agent-versions/{agentId}": {
210
299
  parameters: {
211
300
  query?: never;
@@ -5946,6 +6035,105 @@ interface paths {
5946
6035
  patch?: never;
5947
6036
  trace?: never;
5948
6037
  };
6038
+ "/v1/agents/{id}/voice/drafts": {
6039
+ parameters: {
6040
+ query?: never;
6041
+ header?: never;
6042
+ path?: never;
6043
+ cookie?: never;
6044
+ };
6045
+ get?: never;
6046
+ put?: never;
6047
+ /**
6048
+ * Create a voice test draft
6049
+ * @description Hold an unsaved agent definition for about 15 minutes so a browser voice call can run it instead of the saved agent, without saving or publishing. The body is merged onto the saved agent exactly as `PUT /agents/{id}` would merge it, and nothing is written to the agent. Runtype agents only; the merged config must have voice enabled.
6050
+ */
6051
+ post: {
6052
+ parameters: {
6053
+ query?: never;
6054
+ header?: never;
6055
+ path: {
6056
+ id: string;
6057
+ };
6058
+ cookie?: never;
6059
+ };
6060
+ requestBody?: {
6061
+ content: {
6062
+ "application/json": components["schemas"]["CreateVoiceAgentDraftRequest"];
6063
+ };
6064
+ };
6065
+ responses: {
6066
+ /** @description Draft created */
6067
+ 201: {
6068
+ headers: {
6069
+ [name: string]: unknown;
6070
+ };
6071
+ content: {
6072
+ "application/json": components["schemas"]["CreateVoiceAgentDraftResponse"];
6073
+ };
6074
+ };
6075
+ /** @description Invalid agent ID or draft configuration */
6076
+ 400: {
6077
+ headers: {
6078
+ [name: string]: unknown;
6079
+ };
6080
+ content: {
6081
+ "application/json": components["schemas"]["Error"];
6082
+ };
6083
+ };
6084
+ /** @description Unauthorized */
6085
+ 401: {
6086
+ headers: {
6087
+ [name: string]: unknown;
6088
+ };
6089
+ content: {
6090
+ "application/json": components["schemas"]["Error"];
6091
+ };
6092
+ };
6093
+ /** @description Insufficient permissions */
6094
+ 403: {
6095
+ headers: {
6096
+ [name: string]: unknown;
6097
+ };
6098
+ content: {
6099
+ "application/json": components["schemas"]["Error"];
6100
+ };
6101
+ };
6102
+ /** @description Agent not found */
6103
+ 404: {
6104
+ headers: {
6105
+ [name: string]: unknown;
6106
+ };
6107
+ content: {
6108
+ "application/json": components["schemas"]["Error"];
6109
+ };
6110
+ };
6111
+ /** @description The agent is not a Runtype agent, or the draft has voice disabled */
6112
+ 422: {
6113
+ headers: {
6114
+ [name: string]: unknown;
6115
+ };
6116
+ content: {
6117
+ "application/json": components["schemas"]["Error"];
6118
+ };
6119
+ };
6120
+ /** @description Draft storage is unavailable in this environment */
6121
+ 503: {
6122
+ headers: {
6123
+ [name: string]: unknown;
6124
+ };
6125
+ content: {
6126
+ "application/json": components["schemas"]["Error"];
6127
+ };
6128
+ };
6129
+ };
6130
+ };
6131
+ delete?: never;
6132
+ options?: never;
6133
+ head?: never;
6134
+ patch?: never;
6135
+ trace?: never;
6136
+ };
5949
6137
  "/v1/analytics/end-user-usage": {
5950
6138
  parameters: {
5951
6139
  query?: never;
@@ -14676,6 +14864,8 @@ interface paths {
14676
14864
  content: {
14677
14865
  "application/json": {
14678
14866
  description?: string;
14867
+ /** @description Comma-separated build-product focus areas whose full guides are inlined, e.g. "embed,agent-design". */
14868
+ focus?: string;
14679
14869
  name?: string;
14680
14870
  /** @description One of: build-product, generate-flow, explain-capabilities */
14681
14871
  task?: string;
@@ -30241,7 +30431,7 @@ interface paths {
30241
30431
  put?: never;
30242
30432
  /**
30243
30433
  * Assemble product from FPO
30244
- * @description Assemble a product from a validated Full Product Object (FPO). API keys must carry PRODUCTS:WRITE (or PRODUCTS:CREATE) and SECRETS:WRITE, plus the write scope for every entity kind the FPO materializes (FLOWS:WRITE, AGENTS:WRITE, SCHEDULES:WRITE, RECORDS:WRITE, EVALS:WRITE, SKILLS:WRITE), and SECRETS:READ when an inline HTTP step references a managed secret.
30434
+ * @description Assemble a product from a validated Full Product Object (FPO). API keys must carry PRODUCTS:WRITE (or PRODUCTS:CREATE) and SECRETS:WRITE, plus the write scope for every entity kind the FPO materializes (FLOWS:WRITE, AGENTS:WRITE, PRODUCTS:SURFACES:WRITE, SCHEDULES:WRITE, RECORDS:WRITE, EVALS:WRITE, SKILLS:WRITE), and SECRETS:READ when an inline HTTP step references a managed secret.
30245
30435
  */
30246
30436
  post: {
30247
30437
  parameters: {
@@ -31260,6 +31450,8 @@ interface paths {
31260
31450
  reasoningTokens?: number | null;
31261
31451
  /** @description Record this run processed. */
31262
31452
  recordId: string | null;
31453
+ /** @description The flow.id an inline /v1/dispatch named when the caller's organization does not own a flow with that id. Such a run executes as the "virtual" flow, so flowId reads "virtual" and this field carries the caller's id (control characters stripped, cut to 128 characters) so the caller can still recognise its runs. It is a label only: it grants nothing, is never used as a sender or resume identity, and is not a list filter; filter with flowId=virtual and match on this field. Absent when the run executed under the id it named. */
31454
+ requestedFlowId?: string | null;
31263
31455
  /** @description Retention removed the spans; the run still lists and reads as completed. */
31264
31456
  retentionElided?: boolean;
31265
31457
  /** @description Outermost run of the tree. */
@@ -42250,6 +42442,7 @@ interface paths {
42250
42442
  cc?: string[];
42251
42443
  from?: string;
42252
42444
  html?: string;
42445
+ /** @description Managed sender local part. Must be an identity the account owns: its user id, `virtual`, or an owned `flow_`/`agent_` id; anything else is refused. Defaults to the caller's user id. */
42253
42446
  managedLocalPart?: string;
42254
42447
  rawFrom?: string;
42255
42448
  replyTo?: string;
@@ -51211,6 +51404,304 @@ interface components {
51211
51404
  /** @description What the body names with `@`: `assistant`, or a teammate as their name was inserted */
51212
51405
  mentions?: string[];
51213
51406
  };
51407
+ CreateVoiceAgentDraftRequest: {
51408
+ config?: {
51409
+ advisor?: {
51410
+ model: string;
51411
+ systemPrompt?: string;
51412
+ } | null;
51413
+ artifacts?: {
51414
+ /** @enum {boolean} */
51415
+ enabled: true;
51416
+ types: ("markdown" | "component")[];
51417
+ };
51418
+ contextManagement?: {
51419
+ compaction?: {
51420
+ enabled?: boolean;
51421
+ instructions?: string;
51422
+ model?: string;
51423
+ retainRecentTokens?: number;
51424
+ /** @enum {string} */
51425
+ strategy?: "auto" | "provider_native" | "summary";
51426
+ thresholdRatio?: number;
51427
+ thresholdTokens?: number;
51428
+ };
51429
+ toolResults?: {
51430
+ /**
51431
+ * @deprecated
51432
+ * @description Deprecated and ignored. Tool results are never spilled.
51433
+ */
51434
+ inlineThresholdChars?: number;
51435
+ pruneHotWindowTokens?: number;
51436
+ /** @enum {string} */
51437
+ pruneMode?: "mask" | "off";
51438
+ };
51439
+ };
51440
+ durability?: {
51441
+ /** @enum {string} */
51442
+ forced?: "durable" | "in_process";
51443
+ maxBudgetMs?: number | null;
51444
+ watchLeaseMs?: number | null;
51445
+ };
51446
+ errorHandling?: {
51447
+ fallbacks?: ({
51448
+ delay?: number;
51449
+ /** @enum {string} */
51450
+ type: "retry";
51451
+ } | {
51452
+ delay?: number;
51453
+ maxTokens?: number;
51454
+ model: string;
51455
+ temperature?: number;
51456
+ /** @enum {string} */
51457
+ type: "model";
51458
+ } | {
51459
+ delay?: number;
51460
+ message: string;
51461
+ /** @enum {string} */
51462
+ type: "message";
51463
+ })[];
51464
+ /** @enum {string} */
51465
+ onError: "fail" | "continue" | "fallback";
51466
+ triggers?: {
51467
+ /** @enum {string} */
51468
+ type: "error" | "empty-output";
51469
+ }[];
51470
+ };
51471
+ frequencyPenalty?: number;
51472
+ /** @enum {string} */
51473
+ loggingPolicy?: "default" | "on" | "off";
51474
+ loopConfig?: {
51475
+ enableReflection?: boolean;
51476
+ maxCost?: number;
51477
+ maxTurns?: number;
51478
+ reflectionInterval?: number;
51479
+ treatLengthCutoffAsFailure?: boolean;
51480
+ };
51481
+ maxTokens?: number | null;
51482
+ memory?: {
51483
+ enabled: boolean;
51484
+ injectSummary?: boolean;
51485
+ /** @enum {string} */
51486
+ pointerScope?: "shared" | "alias" | "version";
51487
+ profileTemplate?: string;
51488
+ };
51489
+ model?: string;
51490
+ /** @enum {string} */
51491
+ piiRedaction?: "default" | "off" | "redact";
51492
+ presencePenalty?: number;
51493
+ reasoning?: boolean | {
51494
+ budgetTokens?: number;
51495
+ effort?: string;
51496
+ enabled: boolean;
51497
+ includeThoughts?: boolean;
51498
+ /** @enum {string} */
51499
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
51500
+ /** @enum {string} */
51501
+ reasoningSummary?: "auto" | "detailed";
51502
+ thinkingBudget?: number;
51503
+ thinkingLevel?: string;
51504
+ };
51505
+ sandbox?: {
51506
+ /** @description Coding agents the Sandbox can run as typed sessions. Non-empty adds the agent_session_* tools; empty or absent adds none. */
51507
+ codingAgents?: "opencode"[];
51508
+ enabled: boolean;
51509
+ /**
51510
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
51511
+ * @enum {string}
51512
+ */
51513
+ instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
51514
+ networkAccess?: ("none" | "essentials" | "open") | {
51515
+ allow?: string[];
51516
+ /** @enum {string} */
51517
+ profile?: "none" | "essentials" | "open";
51518
+ };
51519
+ /**
51520
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
51521
+ * @enum {string}
51522
+ */
51523
+ persistence?: "ephemeral" | "conversation" | "named";
51524
+ /**
51525
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
51526
+ * @enum {string}
51527
+ */
51528
+ provider?: "runtype-sandbox" | "daytona";
51529
+ secretEnv?: {
51530
+ [key: string]: string;
51531
+ };
51532
+ setupCommands?: string[];
51533
+ /** @enum {string} */
51534
+ sleepAfter?: "5m" | "15m" | "30m" | "1h";
51535
+ /** @enum {string} */
51536
+ ttl?: "5m" | "1h" | "24h" | "unlimited";
51537
+ };
51538
+ seed?: number;
51539
+ state?: {
51540
+ initial?: {
51541
+ [key: string]: unknown;
51542
+ };
51543
+ /**
51544
+ * @default merge
51545
+ * @enum {string}
51546
+ */
51547
+ mergeStrategy: "replace" | "merge";
51548
+ predictState?: {
51549
+ stateKey: string;
51550
+ tool: string;
51551
+ toolArgument: string;
51552
+ }[];
51553
+ schema?: {
51554
+ [key: string]: unknown;
51555
+ };
51556
+ };
51557
+ systemPrompt?: string;
51558
+ temperature?: number;
51559
+ temporal?: {
51560
+ elapsedThresholdSeconds?: number;
51561
+ groundNow?: boolean;
51562
+ injectElapsed?: boolean;
51563
+ timezone?: string;
51564
+ };
51565
+ tenancyStrategy?: {
51566
+ assuranceFloor?: {
51567
+ /** @enum {string} */
51568
+ endUser?: "asserted" | "verified";
51569
+ /** @enum {string} */
51570
+ tenant?: "asserted" | "verified";
51571
+ };
51572
+ /** @enum {string} */
51573
+ preset: "internal" | "tenant-isolated" | "end-user-isolated";
51574
+ };
51575
+ tools?: {
51576
+ approval?: {
51577
+ choices?: {
51578
+ alwaysAllow?: boolean;
51579
+ alwaysDeny?: boolean;
51580
+ };
51581
+ requestReason?: boolean;
51582
+ require: string[] | boolean;
51583
+ timeout?: number;
51584
+ };
51585
+ codeModeConfig?: {
51586
+ description?: string;
51587
+ timeoutMs?: number;
51588
+ toolPool: string[];
51589
+ } | null;
51590
+ maxToolCalls?: number;
51591
+ mcpServers?: {
51592
+ allowedTools?: string[];
51593
+ auth?: {
51594
+ headerName?: string;
51595
+ headers?: {
51596
+ [key: string]: string;
51597
+ };
51598
+ password?: string;
51599
+ token?: string;
51600
+ /** @enum {string} */
51601
+ type: "api_key" | "bearer" | "basic" | "custom_header" | "headers" | "none";
51602
+ username?: string;
51603
+ };
51604
+ enabled?: boolean;
51605
+ id: string;
51606
+ name?: string;
51607
+ timeout?: number;
51608
+ /** @enum {string} */
51609
+ transport?: "streamable_http" | "rest";
51610
+ url: string;
51611
+ }[];
51612
+ perToolLimits?: {
51613
+ [key: string]: {
51614
+ maxCalls?: number;
51615
+ required?: boolean;
51616
+ };
51617
+ };
51618
+ runtimeTools?: {
51619
+ config: {
51620
+ [key: string]: unknown;
51621
+ };
51622
+ description: string;
51623
+ hiddenParameterNames?: string[];
51624
+ idempotent?: boolean;
51625
+ name: string;
51626
+ parametersSchema: {
51627
+ [key: string]: unknown;
51628
+ };
51629
+ /** @enum {string} */
51630
+ toolType: "flow" | "custom" | "external" | "local" | "advisor" | "subagent" | "search";
51631
+ }[];
51632
+ subagentConfig?: {
51633
+ allowNesting?: boolean;
51634
+ /** @enum {string} */
51635
+ defaultExecutionMode?: "attached" | "detached";
51636
+ defaultMaxTurns?: number;
51637
+ defaultModel?: string;
51638
+ /** @enum {string} */
51639
+ defaultNotify?: "none" | "narrate" | "react";
51640
+ defaultTimeoutMs?: number;
51641
+ detachedMaxBudgetMs?: number;
51642
+ detachedNoProgressBudgetMs?: number;
51643
+ executionModes?: ("attached" | "detached")[];
51644
+ maxSpawnsPerRun?: number;
51645
+ maxTurnsLimit?: number;
51646
+ toolPool: string[];
51647
+ } | null;
51648
+ /** @enum {string} */
51649
+ toolCallStrategy?: "auto" | "required" | "none";
51650
+ toolConfigs?: {
51651
+ [key: string]: {
51652
+ [key: string]: unknown;
51653
+ };
51654
+ };
51655
+ toolIds?: string[];
51656
+ };
51657
+ topK?: number;
51658
+ topP?: number;
51659
+ voice?: {
51660
+ elevenLabs?: {
51661
+ modelId?: string;
51662
+ similarity?: number;
51663
+ stability?: number;
51664
+ voiceId?: string;
51665
+ };
51666
+ enabled?: boolean;
51667
+ endpointing?: {
51668
+ silenceMs?: number;
51669
+ /** @enum {string} */
51670
+ strategy: "provider_vad" | "server_vad" | "client_commit" | "manual";
51671
+ };
51672
+ greeting?: string;
51673
+ /** @enum {string} */
51674
+ interruptionMode?: "none" | "cancel" | "barge-in";
51675
+ language?: string;
51676
+ provider?: string;
51677
+ speech?: {
51678
+ /** @enum {string} */
51679
+ mode: "pipeline" | "speech_to_speech" | "provider_managed";
51680
+ synthesizer: {
51681
+ model?: string;
51682
+ provider: string;
51683
+ settings?: {
51684
+ similarity?: number;
51685
+ stability?: number;
51686
+ };
51687
+ voiceId?: string;
51688
+ };
51689
+ transcriber: {
51690
+ model?: string;
51691
+ provider: string;
51692
+ };
51693
+ };
51694
+ };
51695
+ };
51696
+ description?: string;
51697
+ name?: string;
51698
+ };
51699
+ CreateVoiceAgentDraftResponse: {
51700
+ /** @description Pass as the `agentDraftId` query parameter when opening `/ws/agents/{id}/voice` to run this draft. */
51701
+ draftId: string;
51702
+ /** @description After this time the draft can no longer start a call. A call already running keeps it. */
51703
+ expiresAt: string;
51704
+ };
51214
51705
  DailyUsageResponse: {
51215
51706
  daily?: {
51216
51707
  atSpendLimit: boolean;
@@ -53227,6 +53718,8 @@ interface components {
53227
53718
  reasoningTokens?: number | null;
53228
53719
  /** @description Record this run processed. */
53229
53720
  recordId: string | null;
53721
+ /** @description The flow.id an inline /v1/dispatch named when the caller's organization does not own a flow with that id. Such a run executes as the "virtual" flow, so flowId reads "virtual" and this field carries the caller's id (control characters stripped, cut to 128 characters) so the caller can still recognise its runs. It is a label only: it grants nothing, is never used as a sender or resume identity, and is not a list filter; filter with flowId=virtual and match on this field. Absent when the run executed under the id it named. */
53722
+ requestedFlowId?: string | null;
53230
53723
  /** @description Retention removed the spans; the run still lists and reads as completed. */
53231
53724
  retentionElided?: boolean;
53232
53725
  /** @description Outermost run of the tree. */
@@ -60246,6 +60739,12 @@ interface RunListRow {
60246
60739
  * saved definition by reference. NULL when the header states nothing.
60247
60740
  */
60248
60741
  inlineDefinition: boolean | null;
60742
+ /**
60743
+ * The `flow.id` an inline dispatch named when your organization owns no flow with
60744
+ * that id. The run executes as the `virtual` flow, so `flowId` reads `virtual`;
60745
+ * match on this label to find those runs. A label only, never an identity.
60746
+ */
60747
+ requestedFlowId?: string | null;
60249
60748
  /**
60250
60749
  * True when the run came from the dashboard (`origin === 'dashboard'`), such
60251
60750
  * as an editor test.
package/dist/index.d.ts CHANGED
@@ -206,6 +206,95 @@ interface paths {
206
206
  patch?: never;
207
207
  trace?: never;
208
208
  };
209
+ "/v1/agent-feedback": {
210
+ parameters: {
211
+ query?: never;
212
+ header?: never;
213
+ path?: never;
214
+ cookie?: never;
215
+ };
216
+ get?: never;
217
+ put?: never;
218
+ /**
219
+ * Report a problem
220
+ * @description Report a problem with the Runtype API, MCP tools, documentation, SDKs, CLI, or dashboard. Built for coding agents: include a category, a short note, and the affected request ID or URL. Any API key can submit, and submitting costs no credits. Secret-looking values in the note are redacted before storage.
221
+ */
222
+ post: {
223
+ parameters: {
224
+ query?: never;
225
+ header?: never;
226
+ path?: never;
227
+ cookie?: never;
228
+ };
229
+ requestBody?: {
230
+ content: {
231
+ "application/json": {
232
+ /**
233
+ * @description Which part of Runtype the problem is in.
234
+ * @enum {string}
235
+ */
236
+ category: "api" | "mcp" | "documentation" | "sdk" | "cli" | "dashboard" | "other";
237
+ /** @description Short description of the problem: what you tried, what you expected, and what happened. */
238
+ note: string;
239
+ /** @description The affected request, execution, or record ID, when there is one. */
240
+ requestId?: string;
241
+ /** @description The MCP tool, SDK method, or CLI command involved, when there is one. */
242
+ toolName?: string;
243
+ /** @description The affected endpoint path or documentation URL, when there is one. */
244
+ url?: string;
245
+ };
246
+ };
247
+ };
248
+ responses: {
249
+ /** @description Feedback received */
250
+ 202: {
251
+ headers: {
252
+ [name: string]: unknown;
253
+ };
254
+ content: {
255
+ "application/json": {
256
+ /** @description Receipt ID for this report (agfb_...). Quote it in follow-ups. */
257
+ id: string;
258
+ /** @enum {string} */
259
+ status: "received";
260
+ };
261
+ };
262
+ };
263
+ /** @description Invalid parameters */
264
+ 400: {
265
+ headers: {
266
+ [name: string]: unknown;
267
+ };
268
+ content: {
269
+ "application/json": components["schemas"]["Error"];
270
+ };
271
+ };
272
+ /** @description Unauthorized */
273
+ 401: {
274
+ headers: {
275
+ [name: string]: unknown;
276
+ };
277
+ content: {
278
+ "application/json": components["schemas"]["Error"];
279
+ };
280
+ };
281
+ /** @description Too many reports in a short window */
282
+ 429: {
283
+ headers: {
284
+ [name: string]: unknown;
285
+ };
286
+ content: {
287
+ "application/json": components["schemas"]["Error"];
288
+ };
289
+ };
290
+ };
291
+ };
292
+ delete?: never;
293
+ options?: never;
294
+ head?: never;
295
+ patch?: never;
296
+ trace?: never;
297
+ };
209
298
  "/v1/agent-versions/{agentId}": {
210
299
  parameters: {
211
300
  query?: never;
@@ -5946,6 +6035,105 @@ interface paths {
5946
6035
  patch?: never;
5947
6036
  trace?: never;
5948
6037
  };
6038
+ "/v1/agents/{id}/voice/drafts": {
6039
+ parameters: {
6040
+ query?: never;
6041
+ header?: never;
6042
+ path?: never;
6043
+ cookie?: never;
6044
+ };
6045
+ get?: never;
6046
+ put?: never;
6047
+ /**
6048
+ * Create a voice test draft
6049
+ * @description Hold an unsaved agent definition for about 15 minutes so a browser voice call can run it instead of the saved agent, without saving or publishing. The body is merged onto the saved agent exactly as `PUT /agents/{id}` would merge it, and nothing is written to the agent. Runtype agents only; the merged config must have voice enabled.
6050
+ */
6051
+ post: {
6052
+ parameters: {
6053
+ query?: never;
6054
+ header?: never;
6055
+ path: {
6056
+ id: string;
6057
+ };
6058
+ cookie?: never;
6059
+ };
6060
+ requestBody?: {
6061
+ content: {
6062
+ "application/json": components["schemas"]["CreateVoiceAgentDraftRequest"];
6063
+ };
6064
+ };
6065
+ responses: {
6066
+ /** @description Draft created */
6067
+ 201: {
6068
+ headers: {
6069
+ [name: string]: unknown;
6070
+ };
6071
+ content: {
6072
+ "application/json": components["schemas"]["CreateVoiceAgentDraftResponse"];
6073
+ };
6074
+ };
6075
+ /** @description Invalid agent ID or draft configuration */
6076
+ 400: {
6077
+ headers: {
6078
+ [name: string]: unknown;
6079
+ };
6080
+ content: {
6081
+ "application/json": components["schemas"]["Error"];
6082
+ };
6083
+ };
6084
+ /** @description Unauthorized */
6085
+ 401: {
6086
+ headers: {
6087
+ [name: string]: unknown;
6088
+ };
6089
+ content: {
6090
+ "application/json": components["schemas"]["Error"];
6091
+ };
6092
+ };
6093
+ /** @description Insufficient permissions */
6094
+ 403: {
6095
+ headers: {
6096
+ [name: string]: unknown;
6097
+ };
6098
+ content: {
6099
+ "application/json": components["schemas"]["Error"];
6100
+ };
6101
+ };
6102
+ /** @description Agent not found */
6103
+ 404: {
6104
+ headers: {
6105
+ [name: string]: unknown;
6106
+ };
6107
+ content: {
6108
+ "application/json": components["schemas"]["Error"];
6109
+ };
6110
+ };
6111
+ /** @description The agent is not a Runtype agent, or the draft has voice disabled */
6112
+ 422: {
6113
+ headers: {
6114
+ [name: string]: unknown;
6115
+ };
6116
+ content: {
6117
+ "application/json": components["schemas"]["Error"];
6118
+ };
6119
+ };
6120
+ /** @description Draft storage is unavailable in this environment */
6121
+ 503: {
6122
+ headers: {
6123
+ [name: string]: unknown;
6124
+ };
6125
+ content: {
6126
+ "application/json": components["schemas"]["Error"];
6127
+ };
6128
+ };
6129
+ };
6130
+ };
6131
+ delete?: never;
6132
+ options?: never;
6133
+ head?: never;
6134
+ patch?: never;
6135
+ trace?: never;
6136
+ };
5949
6137
  "/v1/analytics/end-user-usage": {
5950
6138
  parameters: {
5951
6139
  query?: never;
@@ -14676,6 +14864,8 @@ interface paths {
14676
14864
  content: {
14677
14865
  "application/json": {
14678
14866
  description?: string;
14867
+ /** @description Comma-separated build-product focus areas whose full guides are inlined, e.g. "embed,agent-design". */
14868
+ focus?: string;
14679
14869
  name?: string;
14680
14870
  /** @description One of: build-product, generate-flow, explain-capabilities */
14681
14871
  task?: string;
@@ -30241,7 +30431,7 @@ interface paths {
30241
30431
  put?: never;
30242
30432
  /**
30243
30433
  * Assemble product from FPO
30244
- * @description Assemble a product from a validated Full Product Object (FPO). API keys must carry PRODUCTS:WRITE (or PRODUCTS:CREATE) and SECRETS:WRITE, plus the write scope for every entity kind the FPO materializes (FLOWS:WRITE, AGENTS:WRITE, SCHEDULES:WRITE, RECORDS:WRITE, EVALS:WRITE, SKILLS:WRITE), and SECRETS:READ when an inline HTTP step references a managed secret.
30434
+ * @description Assemble a product from a validated Full Product Object (FPO). API keys must carry PRODUCTS:WRITE (or PRODUCTS:CREATE) and SECRETS:WRITE, plus the write scope for every entity kind the FPO materializes (FLOWS:WRITE, AGENTS:WRITE, PRODUCTS:SURFACES:WRITE, SCHEDULES:WRITE, RECORDS:WRITE, EVALS:WRITE, SKILLS:WRITE), and SECRETS:READ when an inline HTTP step references a managed secret.
30245
30435
  */
30246
30436
  post: {
30247
30437
  parameters: {
@@ -31260,6 +31450,8 @@ interface paths {
31260
31450
  reasoningTokens?: number | null;
31261
31451
  /** @description Record this run processed. */
31262
31452
  recordId: string | null;
31453
+ /** @description The flow.id an inline /v1/dispatch named when the caller's organization does not own a flow with that id. Such a run executes as the "virtual" flow, so flowId reads "virtual" and this field carries the caller's id (control characters stripped, cut to 128 characters) so the caller can still recognise its runs. It is a label only: it grants nothing, is never used as a sender or resume identity, and is not a list filter; filter with flowId=virtual and match on this field. Absent when the run executed under the id it named. */
31454
+ requestedFlowId?: string | null;
31263
31455
  /** @description Retention removed the spans; the run still lists and reads as completed. */
31264
31456
  retentionElided?: boolean;
31265
31457
  /** @description Outermost run of the tree. */
@@ -42250,6 +42442,7 @@ interface paths {
42250
42442
  cc?: string[];
42251
42443
  from?: string;
42252
42444
  html?: string;
42445
+ /** @description Managed sender local part. Must be an identity the account owns: its user id, `virtual`, or an owned `flow_`/`agent_` id; anything else is refused. Defaults to the caller's user id. */
42253
42446
  managedLocalPart?: string;
42254
42447
  rawFrom?: string;
42255
42448
  replyTo?: string;
@@ -51211,6 +51404,304 @@ interface components {
51211
51404
  /** @description What the body names with `@`: `assistant`, or a teammate as their name was inserted */
51212
51405
  mentions?: string[];
51213
51406
  };
51407
+ CreateVoiceAgentDraftRequest: {
51408
+ config?: {
51409
+ advisor?: {
51410
+ model: string;
51411
+ systemPrompt?: string;
51412
+ } | null;
51413
+ artifacts?: {
51414
+ /** @enum {boolean} */
51415
+ enabled: true;
51416
+ types: ("markdown" | "component")[];
51417
+ };
51418
+ contextManagement?: {
51419
+ compaction?: {
51420
+ enabled?: boolean;
51421
+ instructions?: string;
51422
+ model?: string;
51423
+ retainRecentTokens?: number;
51424
+ /** @enum {string} */
51425
+ strategy?: "auto" | "provider_native" | "summary";
51426
+ thresholdRatio?: number;
51427
+ thresholdTokens?: number;
51428
+ };
51429
+ toolResults?: {
51430
+ /**
51431
+ * @deprecated
51432
+ * @description Deprecated and ignored. Tool results are never spilled.
51433
+ */
51434
+ inlineThresholdChars?: number;
51435
+ pruneHotWindowTokens?: number;
51436
+ /** @enum {string} */
51437
+ pruneMode?: "mask" | "off";
51438
+ };
51439
+ };
51440
+ durability?: {
51441
+ /** @enum {string} */
51442
+ forced?: "durable" | "in_process";
51443
+ maxBudgetMs?: number | null;
51444
+ watchLeaseMs?: number | null;
51445
+ };
51446
+ errorHandling?: {
51447
+ fallbacks?: ({
51448
+ delay?: number;
51449
+ /** @enum {string} */
51450
+ type: "retry";
51451
+ } | {
51452
+ delay?: number;
51453
+ maxTokens?: number;
51454
+ model: string;
51455
+ temperature?: number;
51456
+ /** @enum {string} */
51457
+ type: "model";
51458
+ } | {
51459
+ delay?: number;
51460
+ message: string;
51461
+ /** @enum {string} */
51462
+ type: "message";
51463
+ })[];
51464
+ /** @enum {string} */
51465
+ onError: "fail" | "continue" | "fallback";
51466
+ triggers?: {
51467
+ /** @enum {string} */
51468
+ type: "error" | "empty-output";
51469
+ }[];
51470
+ };
51471
+ frequencyPenalty?: number;
51472
+ /** @enum {string} */
51473
+ loggingPolicy?: "default" | "on" | "off";
51474
+ loopConfig?: {
51475
+ enableReflection?: boolean;
51476
+ maxCost?: number;
51477
+ maxTurns?: number;
51478
+ reflectionInterval?: number;
51479
+ treatLengthCutoffAsFailure?: boolean;
51480
+ };
51481
+ maxTokens?: number | null;
51482
+ memory?: {
51483
+ enabled: boolean;
51484
+ injectSummary?: boolean;
51485
+ /** @enum {string} */
51486
+ pointerScope?: "shared" | "alias" | "version";
51487
+ profileTemplate?: string;
51488
+ };
51489
+ model?: string;
51490
+ /** @enum {string} */
51491
+ piiRedaction?: "default" | "off" | "redact";
51492
+ presencePenalty?: number;
51493
+ reasoning?: boolean | {
51494
+ budgetTokens?: number;
51495
+ effort?: string;
51496
+ enabled: boolean;
51497
+ includeThoughts?: boolean;
51498
+ /** @enum {string} */
51499
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
51500
+ /** @enum {string} */
51501
+ reasoningSummary?: "auto" | "detailed";
51502
+ thinkingBudget?: number;
51503
+ thinkingLevel?: string;
51504
+ };
51505
+ sandbox?: {
51506
+ /** @description Coding agents the Sandbox can run as typed sessions. Non-empty adds the agent_session_* tools; empty or absent adds none. */
51507
+ codingAgents?: "opencode"[];
51508
+ enabled: boolean;
51509
+ /**
51510
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
51511
+ * @enum {string}
51512
+ */
51513
+ instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
51514
+ networkAccess?: ("none" | "essentials" | "open") | {
51515
+ allow?: string[];
51516
+ /** @enum {string} */
51517
+ profile?: "none" | "essentials" | "open";
51518
+ };
51519
+ /**
51520
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
51521
+ * @enum {string}
51522
+ */
51523
+ persistence?: "ephemeral" | "conversation" | "named";
51524
+ /**
51525
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
51526
+ * @enum {string}
51527
+ */
51528
+ provider?: "runtype-sandbox" | "daytona";
51529
+ secretEnv?: {
51530
+ [key: string]: string;
51531
+ };
51532
+ setupCommands?: string[];
51533
+ /** @enum {string} */
51534
+ sleepAfter?: "5m" | "15m" | "30m" | "1h";
51535
+ /** @enum {string} */
51536
+ ttl?: "5m" | "1h" | "24h" | "unlimited";
51537
+ };
51538
+ seed?: number;
51539
+ state?: {
51540
+ initial?: {
51541
+ [key: string]: unknown;
51542
+ };
51543
+ /**
51544
+ * @default merge
51545
+ * @enum {string}
51546
+ */
51547
+ mergeStrategy: "replace" | "merge";
51548
+ predictState?: {
51549
+ stateKey: string;
51550
+ tool: string;
51551
+ toolArgument: string;
51552
+ }[];
51553
+ schema?: {
51554
+ [key: string]: unknown;
51555
+ };
51556
+ };
51557
+ systemPrompt?: string;
51558
+ temperature?: number;
51559
+ temporal?: {
51560
+ elapsedThresholdSeconds?: number;
51561
+ groundNow?: boolean;
51562
+ injectElapsed?: boolean;
51563
+ timezone?: string;
51564
+ };
51565
+ tenancyStrategy?: {
51566
+ assuranceFloor?: {
51567
+ /** @enum {string} */
51568
+ endUser?: "asserted" | "verified";
51569
+ /** @enum {string} */
51570
+ tenant?: "asserted" | "verified";
51571
+ };
51572
+ /** @enum {string} */
51573
+ preset: "internal" | "tenant-isolated" | "end-user-isolated";
51574
+ };
51575
+ tools?: {
51576
+ approval?: {
51577
+ choices?: {
51578
+ alwaysAllow?: boolean;
51579
+ alwaysDeny?: boolean;
51580
+ };
51581
+ requestReason?: boolean;
51582
+ require: string[] | boolean;
51583
+ timeout?: number;
51584
+ };
51585
+ codeModeConfig?: {
51586
+ description?: string;
51587
+ timeoutMs?: number;
51588
+ toolPool: string[];
51589
+ } | null;
51590
+ maxToolCalls?: number;
51591
+ mcpServers?: {
51592
+ allowedTools?: string[];
51593
+ auth?: {
51594
+ headerName?: string;
51595
+ headers?: {
51596
+ [key: string]: string;
51597
+ };
51598
+ password?: string;
51599
+ token?: string;
51600
+ /** @enum {string} */
51601
+ type: "api_key" | "bearer" | "basic" | "custom_header" | "headers" | "none";
51602
+ username?: string;
51603
+ };
51604
+ enabled?: boolean;
51605
+ id: string;
51606
+ name?: string;
51607
+ timeout?: number;
51608
+ /** @enum {string} */
51609
+ transport?: "streamable_http" | "rest";
51610
+ url: string;
51611
+ }[];
51612
+ perToolLimits?: {
51613
+ [key: string]: {
51614
+ maxCalls?: number;
51615
+ required?: boolean;
51616
+ };
51617
+ };
51618
+ runtimeTools?: {
51619
+ config: {
51620
+ [key: string]: unknown;
51621
+ };
51622
+ description: string;
51623
+ hiddenParameterNames?: string[];
51624
+ idempotent?: boolean;
51625
+ name: string;
51626
+ parametersSchema: {
51627
+ [key: string]: unknown;
51628
+ };
51629
+ /** @enum {string} */
51630
+ toolType: "flow" | "custom" | "external" | "local" | "advisor" | "subagent" | "search";
51631
+ }[];
51632
+ subagentConfig?: {
51633
+ allowNesting?: boolean;
51634
+ /** @enum {string} */
51635
+ defaultExecutionMode?: "attached" | "detached";
51636
+ defaultMaxTurns?: number;
51637
+ defaultModel?: string;
51638
+ /** @enum {string} */
51639
+ defaultNotify?: "none" | "narrate" | "react";
51640
+ defaultTimeoutMs?: number;
51641
+ detachedMaxBudgetMs?: number;
51642
+ detachedNoProgressBudgetMs?: number;
51643
+ executionModes?: ("attached" | "detached")[];
51644
+ maxSpawnsPerRun?: number;
51645
+ maxTurnsLimit?: number;
51646
+ toolPool: string[];
51647
+ } | null;
51648
+ /** @enum {string} */
51649
+ toolCallStrategy?: "auto" | "required" | "none";
51650
+ toolConfigs?: {
51651
+ [key: string]: {
51652
+ [key: string]: unknown;
51653
+ };
51654
+ };
51655
+ toolIds?: string[];
51656
+ };
51657
+ topK?: number;
51658
+ topP?: number;
51659
+ voice?: {
51660
+ elevenLabs?: {
51661
+ modelId?: string;
51662
+ similarity?: number;
51663
+ stability?: number;
51664
+ voiceId?: string;
51665
+ };
51666
+ enabled?: boolean;
51667
+ endpointing?: {
51668
+ silenceMs?: number;
51669
+ /** @enum {string} */
51670
+ strategy: "provider_vad" | "server_vad" | "client_commit" | "manual";
51671
+ };
51672
+ greeting?: string;
51673
+ /** @enum {string} */
51674
+ interruptionMode?: "none" | "cancel" | "barge-in";
51675
+ language?: string;
51676
+ provider?: string;
51677
+ speech?: {
51678
+ /** @enum {string} */
51679
+ mode: "pipeline" | "speech_to_speech" | "provider_managed";
51680
+ synthesizer: {
51681
+ model?: string;
51682
+ provider: string;
51683
+ settings?: {
51684
+ similarity?: number;
51685
+ stability?: number;
51686
+ };
51687
+ voiceId?: string;
51688
+ };
51689
+ transcriber: {
51690
+ model?: string;
51691
+ provider: string;
51692
+ };
51693
+ };
51694
+ };
51695
+ };
51696
+ description?: string;
51697
+ name?: string;
51698
+ };
51699
+ CreateVoiceAgentDraftResponse: {
51700
+ /** @description Pass as the `agentDraftId` query parameter when opening `/ws/agents/{id}/voice` to run this draft. */
51701
+ draftId: string;
51702
+ /** @description After this time the draft can no longer start a call. A call already running keeps it. */
51703
+ expiresAt: string;
51704
+ };
51214
51705
  DailyUsageResponse: {
51215
51706
  daily?: {
51216
51707
  atSpendLimit: boolean;
@@ -53227,6 +53718,8 @@ interface components {
53227
53718
  reasoningTokens?: number | null;
53228
53719
  /** @description Record this run processed. */
53229
53720
  recordId: string | null;
53721
+ /** @description The flow.id an inline /v1/dispatch named when the caller's organization does not own a flow with that id. Such a run executes as the "virtual" flow, so flowId reads "virtual" and this field carries the caller's id (control characters stripped, cut to 128 characters) so the caller can still recognise its runs. It is a label only: it grants nothing, is never used as a sender or resume identity, and is not a list filter; filter with flowId=virtual and match on this field. Absent when the run executed under the id it named. */
53722
+ requestedFlowId?: string | null;
53230
53723
  /** @description Retention removed the spans; the run still lists and reads as completed. */
53231
53724
  retentionElided?: boolean;
53232
53725
  /** @description Outermost run of the tree. */
@@ -60246,6 +60739,12 @@ interface RunListRow {
60246
60739
  * saved definition by reference. NULL when the header states nothing.
60247
60740
  */
60248
60741
  inlineDefinition: boolean | null;
60742
+ /**
60743
+ * The `flow.id` an inline dispatch named when your organization owns no flow with
60744
+ * that id. The run executes as the `virtual` flow, so `flowId` reads `virtual`;
60745
+ * match on this label to find those runs. A label only, never an identity.
60746
+ */
60747
+ requestedFlowId?: string | null;
60249
60748
  /**
60250
60749
  * True when the run came from the dashboard (`origin === 'dashboard'`), such
60251
60750
  * as an editor test.
package/dist/index.mjs CHANGED
@@ -14146,7 +14146,7 @@ function transformQueryParams(params) {
14146
14146
 
14147
14147
  // src/version.ts
14148
14148
  var FALLBACK_VERSION = "0.0.0";
14149
- var SDK_VERSION = "10.5.0".length > 0 ? "10.5.0" : FALLBACK_VERSION;
14149
+ var SDK_VERSION = "10.5.1".length > 0 ? "10.5.1" : FALLBACK_VERSION;
14150
14150
  var RUNTYPE_CLIENT_KIND = "sdk";
14151
14151
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
14152
14152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "10.5.0",
3
+ "version": "10.5.1",
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",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {},
26
26
  "devDependencies": {
27
- "@runtypelabs/shared": "3.63.0",
27
+ "@runtypelabs/shared": "3.64.0",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsup": "^8.0.2",
30
30
  "typescript": "^6.0.3",