@runtypelabs/sdk 9.9.0 → 9.10.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.d.cts CHANGED
@@ -536,6 +536,8 @@ interface paths {
536
536
  agentType?: "runtype" | "external" | "claude_managed";
537
537
  /** @description Deprecated alias for `agentType`. */
538
538
  agent_type?: "runtype" | "external" | "claude_managed";
539
+ /** @description Filter by code provenance. `true` returns only agents whose `lastModifiedSource` is `sdk` or `terraform`; `false` returns every other agent, including one with no recorded source. */
540
+ managedInCode?: "true" | "false";
539
541
  /** @description Response representation. `full` (default) preserves complete values; `compact` shortens every string value longer than 100 characters to a 100-character preview followed by `…`. */
540
542
  view?: "full" | "compact";
541
543
  };
@@ -562,8 +564,18 @@ interface paths {
562
564
  description: string | null;
563
565
  icon: string | null;
564
566
  id: string;
567
+ /** @description Which surface last wrote this agent (`sdk`, `terraform`, `dashboard`, `api`, `mcp`). `sdk` and `terraform` mean the agent is managed in code. `null` on an agent last written before provenance was recorded. */
568
+ lastModifiedSource: string | null;
565
569
  lastRunAt?: string | null;
566
570
  name: string;
571
+ sandboxCapabilityIssues?: {
572
+ /** @enum {string} */
573
+ code: "unsupported_sandbox_capability";
574
+ message: string;
575
+ path: string;
576
+ requested: string;
577
+ supported: string[];
578
+ }[];
567
579
  status: string;
568
580
  updatedAt: string;
569
581
  }[];
@@ -782,16 +794,25 @@ interface paths {
782
794
  };
783
795
  sandbox?: {
784
796
  enabled: boolean;
785
- /** @enum {string} */
797
+ /**
798
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
799
+ * @enum {string}
800
+ */
786
801
  instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
787
802
  networkAccess?: ("none" | "essentials" | "open") | {
788
803
  allow?: string[];
789
804
  /** @enum {string} */
790
805
  profile?: "none" | "essentials" | "open";
791
806
  };
792
- /** @enum {string} */
807
+ /**
808
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
809
+ * @enum {string}
810
+ */
793
811
  persistence?: "ephemeral" | "conversation" | "named";
794
- /** @enum {string} */
812
+ /**
813
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
814
+ * @enum {string}
815
+ */
795
816
  provider?: "runtype-sandbox" | "daytona";
796
817
  secretEnv?: {
797
818
  [key: string]: string;
@@ -1090,6 +1111,14 @@ interface paths {
1090
1111
  name: string;
1091
1112
  organizationId: string | null;
1092
1113
  publishedVersionId: string | null;
1114
+ sandboxCapabilityIssues?: {
1115
+ /** @enum {string} */
1116
+ code: "unsupported_sandbox_capability";
1117
+ message: string;
1118
+ path: string;
1119
+ requested: string;
1120
+ supported: string[];
1121
+ }[];
1093
1122
  status: string;
1094
1123
  updatedAt: string;
1095
1124
  userId: string;
@@ -1169,7 +1198,7 @@ interface paths {
1169
1198
  put?: never;
1170
1199
  /**
1171
1200
  * Ensure agent (config-as-code converge)
1172
- * @description Idempotently converge a repo-defined agent definition onto the platform. Identity is name + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the agent or append a new version when the canonical content hash differs. Non-executing: never touches the execution pipeline. The response always carries the server-computed canonical hash. Set dryRun to plan without writing (CI drift gate), onConflict: "overwrite" to converge over dashboard/API edits, and release: "publish" to also re-aim the published-version pointer.
1201
+ * @description Idempotently converge a repo-defined agent definition onto the platform. Identity is name + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the agent or append a new version when the canonical content hash differs. Non-executing: never touches the execution pipeline. The response always carries the server-computed canonical hash. Set dryRun to plan without writing (CI drift gate), onConflict: "overwrite" to converge over dashboard/API edits, and deploy: { alias } to atomically save and activate the definition at a release alias (release: "publish" / "none" remain compatibility spellings of deploy live / save-only, and mixing the two is a 400). A non-live deploy is alias-scoped: it appends a candidate version and moves that one pointer, and never writes the agent row, its config hash, its capabilities, its draft pointer or its live pointer, so "unchanged" is decided against the hash stored on the alias rather than against the live row. onConflict, expectedRemoteHash and managed-by-code provenance describe live-row writes and therefore do not apply to a non-live deploy; remoteHash in the response is the hash the alias carried before. The one exception is an agent name that does not exist yet: the create is the live row (there is nothing to preview against), and live is still not aimed. Optional version.label / version.notes stamp provenance (a git SHA, a release tag) on the appended version row.
1173
1202
  */
1174
1203
  post: {
1175
1204
  parameters: {
@@ -1276,16 +1305,25 @@ interface paths {
1276
1305
  };
1277
1306
  sandbox?: {
1278
1307
  enabled: boolean;
1279
- /** @enum {string} */
1308
+ /**
1309
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
1310
+ * @enum {string}
1311
+ */
1280
1312
  instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
1281
1313
  networkAccess?: ("none" | "essentials" | "open") | {
1282
1314
  allow?: string[];
1283
1315
  /** @enum {string} */
1284
1316
  profile?: "none" | "essentials" | "open";
1285
1317
  };
1286
- /** @enum {string} */
1318
+ /**
1319
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
1320
+ * @enum {string}
1321
+ */
1287
1322
  persistence?: "ephemeral" | "conversation" | "named";
1288
- /** @enum {string} */
1323
+ /**
1324
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
1325
+ * @enum {string}
1326
+ */
1289
1327
  provider?: "runtype-sandbox" | "daytona";
1290
1328
  secretEnv?: {
1291
1329
  [key: string]: string;
@@ -1456,13 +1494,18 @@ interface paths {
1456
1494
  icon?: string;
1457
1495
  name: string;
1458
1496
  };
1497
+ deploy?: components["schemas"]["AgentEnsureDeployTarget"];
1459
1498
  dryRun?: boolean;
1460
1499
  expectedRemoteHash?: string;
1461
1500
  name: string;
1462
1501
  /** @enum {string} */
1463
1502
  onConflict?: "error" | "overwrite";
1464
- /** @enum {string} */
1503
+ /**
1504
+ * @description Compatibility input, translated to a deploy: "publish" activates live, "none" saves without activating. Prefer deploy.
1505
+ * @enum {string}
1506
+ */
1465
1507
  release?: "none" | "publish";
1508
+ version?: components["schemas"]["EnsureVersionMetadata"];
1466
1509
  };
1467
1510
  };
1468
1511
  };
@@ -1476,13 +1519,13 @@ interface paths {
1476
1519
  "application/json": components["schemas"]["AgentEnsureResponse"];
1477
1520
  };
1478
1521
  };
1479
- /** @description Validation error (or unsupported agent type for ensure) */
1522
+ /** @description Validation error, unsupported agent type, or code alias_requires_organization when a non-live deploy targets a personal-scope agent */
1480
1523
  400: {
1481
1524
  headers: {
1482
1525
  [name: string]: unknown;
1483
1526
  };
1484
1527
  content: {
1485
- "application/json": components["schemas"]["Error"];
1528
+ "application/json": components["schemas"]["AgentEnsureBadRequest"];
1486
1529
  };
1487
1530
  };
1488
1531
  /** @description Unauthorized */
@@ -1521,13 +1564,13 @@ interface paths {
1521
1564
  "application/json": components["schemas"]["AgentEnsureHashMismatch"];
1522
1565
  };
1523
1566
  };
1524
- /** @description Internal server error */
1567
+ /** @description Internal server error, or code alias_activation_failed when a non-live activation could not be applied (nothing was written) */
1525
1568
  500: {
1526
1569
  headers: {
1527
1570
  [name: string]: unknown;
1528
1571
  };
1529
1572
  content: {
1530
- "application/json": components["schemas"]["Error"];
1573
+ "application/json": components["schemas"]["AgentEnsureServerError"];
1531
1574
  };
1532
1575
  };
1533
1576
  };
@@ -1822,6 +1865,14 @@ interface paths {
1822
1865
  name: string;
1823
1866
  organizationId: string | null;
1824
1867
  publishedVersionId: string | null;
1868
+ sandboxCapabilityIssues?: {
1869
+ /** @enum {string} */
1870
+ code: "unsupported_sandbox_capability";
1871
+ message: string;
1872
+ path: string;
1873
+ requested: string;
1874
+ supported: string[];
1875
+ }[];
1825
1876
  status: string;
1826
1877
  updatedAt: string;
1827
1878
  userId: string;
@@ -1947,6 +1998,24 @@ interface paths {
1947
1998
  enabled: true;
1948
1999
  types: ("markdown" | "component")[];
1949
2000
  };
2001
+ contextManagement?: {
2002
+ compaction?: {
2003
+ enabled?: boolean;
2004
+ instructions?: string;
2005
+ model?: string;
2006
+ retainRecentTokens?: number;
2007
+ /** @enum {string} */
2008
+ strategy?: "auto" | "provider_native" | "summary";
2009
+ thresholdRatio?: number;
2010
+ thresholdTokens?: number;
2011
+ };
2012
+ toolResults?: {
2013
+ inlineThresholdChars?: number;
2014
+ pruneHotWindowTokens?: number;
2015
+ /** @enum {string} */
2016
+ pruneMode?: "mask" | "off";
2017
+ };
2018
+ };
1950
2019
  durability?: {
1951
2020
  /** @enum {string} */
1952
2021
  forced?: "durable" | "in_process";
@@ -2012,16 +2081,25 @@ interface paths {
2012
2081
  };
2013
2082
  sandbox?: {
2014
2083
  enabled: boolean;
2015
- /** @enum {string} */
2084
+ /**
2085
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
2086
+ * @enum {string}
2087
+ */
2016
2088
  instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
2017
2089
  networkAccess?: ("none" | "essentials" | "open") | {
2018
2090
  allow?: string[];
2019
2091
  /** @enum {string} */
2020
2092
  profile?: "none" | "essentials" | "open";
2021
2093
  };
2022
- /** @enum {string} */
2094
+ /**
2095
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
2096
+ * @enum {string}
2097
+ */
2023
2098
  persistence?: "ephemeral" | "conversation" | "named";
2024
- /** @enum {string} */
2099
+ /**
2100
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
2101
+ * @enum {string}
2102
+ */
2025
2103
  provider?: "runtype-sandbox" | "daytona";
2026
2104
  secretEnv?: {
2027
2105
  [key: string]: string;
@@ -2307,6 +2385,14 @@ interface paths {
2307
2385
  name: string;
2308
2386
  organizationId: string | null;
2309
2387
  publishedVersionId: string | null;
2388
+ sandboxCapabilityIssues?: {
2389
+ /** @enum {string} */
2390
+ code: "unsupported_sandbox_capability";
2391
+ message: string;
2392
+ path: string;
2393
+ requested: string;
2394
+ supported: string[];
2395
+ }[];
2310
2396
  status: string;
2311
2397
  updatedAt: string;
2312
2398
  userId: string;
@@ -2448,45 +2534,59 @@ interface paths {
2448
2534
  patch?: never;
2449
2535
  trace?: never;
2450
2536
  };
2451
- "/v1/agents/{id}/approve": {
2537
+ "/v1/agents/{id}/aliases": {
2452
2538
  parameters: {
2453
2539
  query?: never;
2454
2540
  header?: never;
2455
2541
  path?: never;
2456
2542
  cookie?: never;
2457
2543
  };
2458
- get?: never;
2459
- put?: never;
2460
2544
  /**
2461
- * Resolve a pending agent tool approval
2462
- * @description Resolve a pending tool approval on a paused agent execution (approved/denied). Streams a Server-Sent Events response when streamResponse is true (default); otherwise returns a JSON result.
2545
+ * List release aliases for an agent
2546
+ * @description List the named pointers that select which immutable version of this agent runs. `live` sorts first, then the preview aliases by name. Archived aliases are omitted unless `includeArchived=true`. Omitting `limit` returns every pointer; supplying it pages through the same order with `cursor`.
2463
2547
  */
2464
- post: {
2548
+ get: {
2465
2549
  parameters: {
2466
- query?: never;
2550
+ query?: {
2551
+ /** @description Pass `true` to include archived aliases, which never resolve for execution. */
2552
+ includeArchived?: string;
2553
+ /** @description Maximum aliases to return. Omit for the full set. */
2554
+ limit?: string;
2555
+ /** @description The `nextCursor` from a previous page of this same order. */
2556
+ cursor?: string;
2557
+ };
2467
2558
  header?: never;
2468
2559
  path: {
2469
2560
  id: string;
2470
2561
  };
2471
2562
  cookie?: never;
2472
2563
  };
2473
- requestBody?: {
2474
- content: {
2475
- "application/json": components["schemas"]["AgentApproveRequest"];
2476
- };
2477
- };
2564
+ requestBody?: never;
2478
2565
  responses: {
2479
- /** @description Server-Sent Events stream of agent execution events (or a JSON result when streamResponse is false) */
2566
+ /** @description Release aliases */
2480
2567
  200: {
2481
2568
  headers: {
2482
2569
  [name: string]: unknown;
2483
2570
  };
2484
2571
  content: {
2485
- "application/json": components["schemas"]["AgentApproveContinuationJsonResponse"];
2486
- "text/event-stream": unknown;
2572
+ "application/json": {
2573
+ data: {
2574
+ alias: string;
2575
+ archivedAt: string | null;
2576
+ contentHash: string | null;
2577
+ createdAt: string;
2578
+ expiresAt: string | null;
2579
+ label: string | null;
2580
+ revision: number;
2581
+ updatedAt: string;
2582
+ versionId: string;
2583
+ versionNumber: number | null;
2584
+ }[];
2585
+ nextCursor: string | null;
2586
+ };
2487
2587
  };
2488
2588
  };
2489
- /** @description Invalid request body */
2589
+ /** @description Invalid request */
2490
2590
  400: {
2491
2591
  headers: {
2492
2592
  [name: string]: unknown;
@@ -2504,15 +2604,6 @@ interface paths {
2504
2604
  "application/json": components["schemas"]["Error"];
2505
2605
  };
2506
2606
  };
2507
- /** @description Platform-key spend limit exceeded during a buffered continuation */
2508
- 402: {
2509
- headers: {
2510
- [name: string]: unknown;
2511
- };
2512
- content: {
2513
- "application/json": components["schemas"]["AgentApprovalContinuationJsonResponse"];
2514
- };
2515
- };
2516
2607
  /** @description Insufficient permissions */
2517
2608
  403: {
2518
2609
  headers: {
@@ -2522,7 +2613,7 @@ interface paths {
2522
2613
  "application/json": components["schemas"]["Error"];
2523
2614
  };
2524
2615
  };
2525
- /** @description Agent or execution not found */
2616
+ /** @description Agent not found */
2526
2617
  404: {
2527
2618
  headers: {
2528
2619
  [name: string]: unknown;
@@ -2531,24 +2622,6 @@ interface paths {
2531
2622
  "application/json": components["schemas"]["Error"];
2532
2623
  };
2533
2624
  };
2534
- /** @description Execution is not awaiting this approval or cannot be resumed here */
2535
- 409: {
2536
- headers: {
2537
- [name: string]: unknown;
2538
- };
2539
- content: {
2540
- "application/json": components["schemas"]["Error"];
2541
- };
2542
- };
2543
- /** @description The paused execution was armed by the retired legacy flow engine and cannot be resumed (LEGACY_PAUSE_UNRESUMABLE); re-run the flow */
2544
- 410: {
2545
- headers: {
2546
- [name: string]: unknown;
2547
- };
2548
- content: {
2549
- "application/json": components["schemas"]["Error"];
2550
- };
2551
- };
2552
2625
  /** @description Internal server error */
2553
2626
  500: {
2554
2627
  headers: {
@@ -2560,70 +2633,60 @@ interface paths {
2560
2633
  };
2561
2634
  };
2562
2635
  };
2636
+ put?: never;
2637
+ post?: never;
2563
2638
  delete?: never;
2564
2639
  options?: never;
2565
2640
  head?: never;
2566
2641
  patch?: never;
2567
2642
  trace?: never;
2568
2643
  };
2569
- "/v1/agents/{id}/capabilities": {
2644
+ "/v1/agents/{id}/aliases/{alias}": {
2570
2645
  parameters: {
2571
2646
  query?: never;
2572
2647
  header?: never;
2573
2648
  path?: never;
2574
2649
  cookie?: never;
2575
2650
  };
2576
- get?: never;
2577
- put?: never;
2578
2651
  /**
2579
- * Add capability to agent
2580
- * @description Add a capability (flow, sub-agent, or tool binding) to an agent.
2652
+ * Get one release alias
2653
+ * @description Read one pointer. A missing or archived alias answers a structured 404 naming the alias; it never falls back to live.
2581
2654
  */
2582
- post: {
2655
+ get: {
2583
2656
  parameters: {
2584
- query?: never;
2657
+ query?: {
2658
+ includeArchived?: string;
2659
+ };
2585
2660
  header?: never;
2586
2661
  path: {
2587
2662
  id: string;
2663
+ alias: string;
2588
2664
  };
2589
2665
  cookie?: never;
2590
2666
  };
2591
- requestBody?: {
2592
- content: {
2593
- "application/json": {
2594
- enabled?: boolean;
2595
- flowId?: string;
2596
- parametersSchema?: unknown;
2597
- subAgentId?: string;
2598
- toolDescription?: string;
2599
- toolId?: string;
2600
- toolName: string;
2601
- };
2602
- };
2603
- };
2667
+ requestBody?: never;
2604
2668
  responses: {
2605
- /** @description Capability added */
2606
- 201: {
2669
+ /** @description Release alias */
2670
+ 200: {
2607
2671
  headers: {
2608
2672
  [name: string]: unknown;
2609
2673
  };
2610
2674
  content: {
2611
2675
  "application/json": {
2612
- agentId?: string;
2613
- createdAt?: string;
2614
- displayOrder: number | null;
2615
- enabled: boolean;
2616
- flowId: string | null;
2617
- id: string;
2618
- parametersSchema?: unknown;
2619
- subAgentId: string | null;
2620
- toolDescription: string | null;
2621
- toolId: string | null;
2622
- toolName: string;
2676
+ alias: string;
2677
+ archivedAt: string | null;
2678
+ contentHash: string | null;
2679
+ createdAt: string;
2680
+ expiresAt: string | null;
2681
+ label: string | null;
2682
+ revision: number;
2683
+ updatedAt: string;
2684
+ versionId: string;
2685
+ versionNumber: number | null;
2623
2686
  };
2624
2687
  };
2625
2688
  };
2626
- /** @description Validation error */
2689
+ /** @description Invalid request */
2627
2690
  400: {
2628
2691
  headers: {
2629
2692
  [name: string]: unknown;
@@ -2650,22 +2713,18 @@ interface paths {
2650
2713
  "application/json": components["schemas"]["Error"];
2651
2714
  };
2652
2715
  };
2653
- /** @description Agent not found */
2716
+ /** @description Alias or agent not found */
2654
2717
  404: {
2655
2718
  headers: {
2656
2719
  [name: string]: unknown;
2657
2720
  };
2658
2721
  content: {
2659
- "application/json": components["schemas"]["Error"];
2660
- };
2661
- };
2662
- /** @description Tool name already exists for this agent */
2663
- 409: {
2664
- headers: {
2665
- [name: string]: unknown;
2666
- };
2667
- content: {
2668
- "application/json": components["schemas"]["Error"];
2722
+ "application/json": components["schemas"]["Error"] & {
2723
+ agentId: string;
2724
+ alias: string;
2725
+ /** @enum {string} */
2726
+ code: "alias_not_found";
2727
+ };
2669
2728
  };
2670
2729
  };
2671
2730
  /** @description Internal server error */
@@ -2679,138 +2738,887 @@ interface paths {
2679
2738
  };
2680
2739
  };
2681
2740
  };
2682
- delete?: never;
2683
- options?: never;
2684
- head?: never;
2685
- patch?: never;
2686
- trace?: never;
2687
- };
2688
- "/v1/agents/{id}/capabilities/{capabilityId}": {
2689
- parameters: {
2690
- query?: never;
2691
- header?: never;
2692
- path?: never;
2693
- cookie?: never;
2694
- };
2695
- get?: never;
2696
- put?: never;
2697
- post?: never;
2698
2741
  /**
2699
- * Remove capability from agent
2700
- * @description Remove a capability (flow, sub-agent, or tool binding) from an agent.
2742
+ * Activate a version at a release alias
2743
+ * @description Aim one alias at one immutable version of the same agent, appending a deployment receipt in the same transaction. Moving an existing `live` pointer requires the AGENTS:DEPLOY:LIVE scope and an `If-Match` revision; preview aliases require AGENTS:DEPLOY:PREVIEW. Dependency references the version names are fingerprinted first, and an unresolvable reference refuses the activation.
2701
2744
  */
2702
- delete: {
2745
+ put: {
2703
2746
  parameters: {
2704
2747
  query?: never;
2705
- header?: never;
2748
+ header?: {
2749
+ /** @description The alias revision this write expects. Required on a `live` alias that already exists (428 without it) and refused with 412 when the stored revision has moved on. Optional on preview aliases and on the first `live` deployment, which has no revision yet. */
2750
+ "if-match"?: string;
2751
+ /** @description Replay key. Repeating an activation with the same key returns the receipt the first call produced instead of moving the pointer twice. */
2752
+ "idempotency-key"?: string;
2753
+ };
2706
2754
  path: {
2707
2755
  id: string;
2708
- capabilityId: string;
2756
+ alias: string;
2709
2757
  };
2710
2758
  cookie?: never;
2711
2759
  };
2712
- requestBody?: never;
2713
- responses: {
2714
- /** @description Capability removed */
2715
- 200: {
2716
- headers: {
2717
- [name: string]: unknown;
2718
- };
2719
- content: {
2720
- "application/json": {
2721
- success: boolean;
2722
- };
2723
- };
2724
- };
2725
- /** @description Invalid agent or capability ID */
2726
- 400: {
2727
- headers: {
2728
- [name: string]: unknown;
2729
- };
2730
- content: {
2731
- "application/json": components["schemas"]["Error"];
2732
- };
2733
- };
2734
- /** @description Unauthorized */
2735
- 401: {
2736
- headers: {
2737
- [name: string]: unknown;
2738
- };
2739
- content: {
2740
- "application/json": components["schemas"]["Error"];
2741
- };
2742
- };
2743
- /** @description Agent or capability not found */
2744
- 404: {
2745
- headers: {
2746
- [name: string]: unknown;
2747
- };
2748
- content: {
2749
- "application/json": components["schemas"]["Error"];
2750
- };
2751
- };
2752
- /** @description Internal server error */
2753
- 500: {
2754
- headers: {
2755
- [name: string]: unknown;
2756
- };
2757
- content: {
2758
- "application/json": components["schemas"]["Error"];
2760
+ requestBody?: {
2761
+ content: {
2762
+ "application/json": {
2763
+ /** @description Why this deployment happened, recorded on the receipt for humans. Context only: nothing branches on it. */
2764
+ reason?: string;
2765
+ versionId: string;
2759
2766
  };
2760
2767
  };
2761
2768
  };
2762
- };
2763
- options?: never;
2764
- head?: never;
2765
- patch?: never;
2766
- trace?: never;
2767
- };
2768
- "/v1/agents/{id}/conversations/{conversationId}/events": {
2769
- parameters: {
2770
- query?: never;
2771
- header?: never;
2772
- path?: never;
2773
- cookie?: never;
2774
- };
2775
- /**
2776
- * List internal agent conversation events
2777
- * @description List provenance-bearing internal events posted to a saved agent conversation, including detached subagent completion activities. These events are never represented as human messages.
2778
- */
2779
- get: {
2780
- parameters: {
2781
- query?: {
2782
- limit?: string;
2783
- after?: string;
2784
- };
2785
- header?: never;
2786
- path: {
2787
- id: string;
2788
- conversationId: string;
2789
- };
2790
- cookie?: never;
2791
- };
2792
- requestBody?: never;
2793
2769
  responses: {
2794
- /** @description Conversation event list in chronological order */
2770
+ /** @description Alias activated */
2795
2771
  200: {
2796
2772
  headers: {
2797
2773
  [name: string]: unknown;
2798
2774
  };
2799
2775
  content: {
2800
2776
  "application/json": {
2801
- data: {
2802
- consumedAt: string | null;
2803
- createdAt: string;
2804
- eventKind: string;
2805
- eventRevision: number;
2806
- id: string;
2807
- /** @enum {string} */
2808
- notificationMode: "narrate" | "react";
2809
- payload: {
2810
- [key: string]: unknown;
2811
- };
2812
- runId: string;
2813
- }[];
2777
+ alias: string;
2778
+ changed: boolean;
2779
+ receiptId: string;
2780
+ revision: number;
2781
+ versionId: string;
2782
+ versionNumber: number | null;
2783
+ };
2784
+ };
2785
+ };
2786
+ /** @description Invalid request */
2787
+ 400: {
2788
+ headers: {
2789
+ [name: string]: unknown;
2790
+ };
2791
+ content: {
2792
+ "application/json": components["schemas"]["Error"];
2793
+ };
2794
+ };
2795
+ /** @description Unauthorized */
2796
+ 401: {
2797
+ headers: {
2798
+ [name: string]: unknown;
2799
+ };
2800
+ content: {
2801
+ "application/json": components["schemas"]["Error"];
2802
+ };
2803
+ };
2804
+ /** @description Insufficient permissions */
2805
+ 403: {
2806
+ headers: {
2807
+ [name: string]: unknown;
2808
+ };
2809
+ content: {
2810
+ "application/json": components["schemas"]["Error"];
2811
+ };
2812
+ };
2813
+ /** @description Agent or version not found */
2814
+ 404: {
2815
+ headers: {
2816
+ [name: string]: unknown;
2817
+ };
2818
+ content: {
2819
+ "application/json": components["schemas"]["Error"];
2820
+ };
2821
+ };
2822
+ /** @description Idempotency key already used for a different activation */
2823
+ 409: {
2824
+ headers: {
2825
+ [name: string]: unknown;
2826
+ };
2827
+ content: {
2828
+ "application/json": components["schemas"]["Error"] & {
2829
+ /** @enum {string} */
2830
+ code: "idempotency_key_reused";
2831
+ };
2832
+ };
2833
+ };
2834
+ /** @description Alias revision mismatch */
2835
+ 412: {
2836
+ headers: {
2837
+ [name: string]: unknown;
2838
+ };
2839
+ content: {
2840
+ "application/json": components["schemas"]["Error"] & {
2841
+ actual: number | null;
2842
+ /** @enum {string} */
2843
+ code: "alias_revision_mismatch";
2844
+ expected: number;
2845
+ };
2846
+ };
2847
+ };
2848
+ /** @description Version references a dependency that no longer resolves */
2849
+ 422: {
2850
+ headers: {
2851
+ [name: string]: unknown;
2852
+ };
2853
+ content: {
2854
+ "application/json": components["schemas"]["Error"] & {
2855
+ /** @enum {string} */
2856
+ code: "alias_dependency_unresolved";
2857
+ refs: string[];
2858
+ };
2859
+ };
2860
+ };
2861
+ /** @description If-Match required for the live alias */
2862
+ 428: {
2863
+ headers: {
2864
+ [name: string]: unknown;
2865
+ };
2866
+ content: {
2867
+ "application/json": components["schemas"]["Error"];
2868
+ };
2869
+ };
2870
+ /** @description Internal server error */
2871
+ 500: {
2872
+ headers: {
2873
+ [name: string]: unknown;
2874
+ };
2875
+ content: {
2876
+ "application/json": components["schemas"]["Error"];
2877
+ };
2878
+ };
2879
+ };
2880
+ };
2881
+ post?: never;
2882
+ /**
2883
+ * Archive a release alias
2884
+ * @description Archive a preview alias: it stops resolving for new executions, keeps its deployment history, and does not interrupt admitted runs. The row is never deleted, so a later activation revives the same pointer. `live` cannot be archived.
2885
+ */
2886
+ delete: {
2887
+ parameters: {
2888
+ query?: never;
2889
+ header?: {
2890
+ /** @description The alias revision this write expects. Required on a `live` alias that already exists (428 without it) and refused with 412 when the stored revision has moved on. Optional on preview aliases and on the first `live` deployment, which has no revision yet. */
2891
+ "if-match"?: string;
2892
+ /** @description Replay key. Repeating an activation with the same key returns the receipt the first call produced instead of moving the pointer twice. */
2893
+ "idempotency-key"?: string;
2894
+ };
2895
+ path: {
2896
+ id: string;
2897
+ alias: string;
2898
+ };
2899
+ cookie?: never;
2900
+ };
2901
+ requestBody?: never;
2902
+ responses: {
2903
+ /** @description Alias archived */
2904
+ 200: {
2905
+ headers: {
2906
+ [name: string]: unknown;
2907
+ };
2908
+ content: {
2909
+ "application/json": {
2910
+ alias: string;
2911
+ /** @enum {boolean} */
2912
+ archived: true;
2913
+ receiptId: string;
2914
+ revision: number;
2915
+ };
2916
+ };
2917
+ };
2918
+ /** @description Invalid request */
2919
+ 400: {
2920
+ headers: {
2921
+ [name: string]: unknown;
2922
+ };
2923
+ content: {
2924
+ "application/json": components["schemas"]["Error"];
2925
+ };
2926
+ };
2927
+ /** @description Unauthorized */
2928
+ 401: {
2929
+ headers: {
2930
+ [name: string]: unknown;
2931
+ };
2932
+ content: {
2933
+ "application/json": components["schemas"]["Error"];
2934
+ };
2935
+ };
2936
+ /** @description Insufficient permissions */
2937
+ 403: {
2938
+ headers: {
2939
+ [name: string]: unknown;
2940
+ };
2941
+ content: {
2942
+ "application/json": components["schemas"]["Error"];
2943
+ };
2944
+ };
2945
+ /** @description Alias or agent not found */
2946
+ 404: {
2947
+ headers: {
2948
+ [name: string]: unknown;
2949
+ };
2950
+ content: {
2951
+ "application/json": components["schemas"]["Error"] & {
2952
+ agentId: string;
2953
+ alias: string;
2954
+ /** @enum {string} */
2955
+ code: "alias_not_found";
2956
+ };
2957
+ };
2958
+ };
2959
+ /** @description The live alias cannot be archived */
2960
+ 409: {
2961
+ headers: {
2962
+ [name: string]: unknown;
2963
+ };
2964
+ content: {
2965
+ "application/json": components["schemas"]["Error"] & {
2966
+ /** @enum {string} */
2967
+ code: "alias_archive_forbidden";
2968
+ };
2969
+ };
2970
+ };
2971
+ /** @description Alias revision mismatch */
2972
+ 412: {
2973
+ headers: {
2974
+ [name: string]: unknown;
2975
+ };
2976
+ content: {
2977
+ "application/json": components["schemas"]["Error"] & {
2978
+ actual: number | null;
2979
+ /** @enum {string} */
2980
+ code: "alias_revision_mismatch";
2981
+ expected: number;
2982
+ };
2983
+ };
2984
+ };
2985
+ /** @description Internal server error */
2986
+ 500: {
2987
+ headers: {
2988
+ [name: string]: unknown;
2989
+ };
2990
+ content: {
2991
+ "application/json": components["schemas"]["Error"];
2992
+ };
2993
+ };
2994
+ };
2995
+ };
2996
+ options?: never;
2997
+ head?: never;
2998
+ patch?: never;
2999
+ trace?: never;
3000
+ };
3001
+ "/v1/agents/{id}/aliases/{alias}/rollback": {
3002
+ parameters: {
3003
+ query?: never;
3004
+ header?: never;
3005
+ path?: never;
3006
+ cookie?: never;
3007
+ };
3008
+ get?: never;
3009
+ put?: never;
3010
+ /**
3011
+ * Roll a release alias back to its previous version
3012
+ * @description Re-aim an alias at the version recorded as `previousVersionId` on its most recent pointer-moving receipt, walking `steps` receipts back. Writes a `rollback` receipt. Rolling back `live` follows the same scope and `If-Match` rules as activation, and restores configuration only: external data and side effects are not rolled back.
3013
+ */
3014
+ post: {
3015
+ parameters: {
3016
+ query?: never;
3017
+ header?: {
3018
+ /** @description The alias revision this write expects. Required on a `live` alias that already exists (428 without it) and refused with 412 when the stored revision has moved on. Optional on preview aliases and on the first `live` deployment, which has no revision yet. */
3019
+ "if-match"?: string;
3020
+ /** @description Replay key. Repeating an activation with the same key returns the receipt the first call produced instead of moving the pointer twice. */
3021
+ "idempotency-key"?: string;
3022
+ };
3023
+ path: {
3024
+ id: string;
3025
+ alias: string;
3026
+ };
3027
+ cookie?: never;
3028
+ };
3029
+ requestBody?: {
3030
+ content: {
3031
+ "application/json": {
3032
+ reason?: string;
3033
+ /** @default 1 */
3034
+ steps?: number;
3035
+ };
3036
+ };
3037
+ };
3038
+ responses: {
3039
+ /** @description Alias rolled back */
3040
+ 200: {
3041
+ headers: {
3042
+ [name: string]: unknown;
3043
+ };
3044
+ content: {
3045
+ "application/json": {
3046
+ alias: string;
3047
+ changed: boolean;
3048
+ receiptId: string;
3049
+ revision: number;
3050
+ versionId: string;
3051
+ versionNumber: number | null;
3052
+ };
3053
+ };
3054
+ };
3055
+ /** @description Invalid request */
3056
+ 400: {
3057
+ headers: {
3058
+ [name: string]: unknown;
3059
+ };
3060
+ content: {
3061
+ "application/json": components["schemas"]["Error"];
3062
+ };
3063
+ };
3064
+ /** @description Unauthorized */
3065
+ 401: {
3066
+ headers: {
3067
+ [name: string]: unknown;
3068
+ };
3069
+ content: {
3070
+ "application/json": components["schemas"]["Error"];
3071
+ };
3072
+ };
3073
+ /** @description Insufficient permissions */
3074
+ 403: {
3075
+ headers: {
3076
+ [name: string]: unknown;
3077
+ };
3078
+ content: {
3079
+ "application/json": components["schemas"]["Error"];
3080
+ };
3081
+ };
3082
+ /** @description Alias, agent, or rollback target not found */
3083
+ 404: {
3084
+ headers: {
3085
+ [name: string]: unknown;
3086
+ };
3087
+ content: {
3088
+ "application/json": components["schemas"]["Error"] & {
3089
+ agentId: string;
3090
+ alias: string;
3091
+ /** @enum {string} */
3092
+ code: "alias_not_found";
3093
+ };
3094
+ };
3095
+ };
3096
+ /** @description Alias revision mismatch */
3097
+ 412: {
3098
+ headers: {
3099
+ [name: string]: unknown;
3100
+ };
3101
+ content: {
3102
+ "application/json": components["schemas"]["Error"] & {
3103
+ actual: number | null;
3104
+ /** @enum {string} */
3105
+ code: "alias_revision_mismatch";
3106
+ expected: number;
3107
+ };
3108
+ };
3109
+ };
3110
+ /** @description Target version references a dependency that no longer resolves */
3111
+ 422: {
3112
+ headers: {
3113
+ [name: string]: unknown;
3114
+ };
3115
+ content: {
3116
+ "application/json": components["schemas"]["Error"] & {
3117
+ /** @enum {string} */
3118
+ code: "alias_dependency_unresolved";
3119
+ refs: string[];
3120
+ };
3121
+ };
3122
+ };
3123
+ /** @description If-Match required for the live alias */
3124
+ 428: {
3125
+ headers: {
3126
+ [name: string]: unknown;
3127
+ };
3128
+ content: {
3129
+ "application/json": components["schemas"]["Error"];
3130
+ };
3131
+ };
3132
+ /** @description Internal server error */
3133
+ 500: {
3134
+ headers: {
3135
+ [name: string]: unknown;
3136
+ };
3137
+ content: {
3138
+ "application/json": components["schemas"]["Error"];
3139
+ };
3140
+ };
3141
+ };
3142
+ };
3143
+ delete?: never;
3144
+ options?: never;
3145
+ head?: never;
3146
+ patch?: never;
3147
+ trace?: never;
3148
+ };
3149
+ "/v1/agents/{id}/approve": {
3150
+ parameters: {
3151
+ query?: never;
3152
+ header?: never;
3153
+ path?: never;
3154
+ cookie?: never;
3155
+ };
3156
+ get?: never;
3157
+ put?: never;
3158
+ /**
3159
+ * Resolve a pending agent tool approval
3160
+ * @description Resolve a pending tool approval on a paused agent execution (approved/denied). Streams a Server-Sent Events response when streamResponse is true (default); otherwise returns a JSON result.
3161
+ */
3162
+ post: {
3163
+ parameters: {
3164
+ query?: never;
3165
+ header?: never;
3166
+ path: {
3167
+ id: string;
3168
+ };
3169
+ cookie?: never;
3170
+ };
3171
+ requestBody?: {
3172
+ content: {
3173
+ "application/json": components["schemas"]["AgentApproveRequest"];
3174
+ };
3175
+ };
3176
+ responses: {
3177
+ /** @description Server-Sent Events stream of agent execution events (or a JSON result when streamResponse is false) */
3178
+ 200: {
3179
+ headers: {
3180
+ [name: string]: unknown;
3181
+ };
3182
+ content: {
3183
+ "application/json": components["schemas"]["AgentApproveContinuationJsonResponse"];
3184
+ "text/event-stream": unknown;
3185
+ };
3186
+ };
3187
+ /** @description Invalid request body */
3188
+ 400: {
3189
+ headers: {
3190
+ [name: string]: unknown;
3191
+ };
3192
+ content: {
3193
+ "application/json": components["schemas"]["Error"];
3194
+ };
3195
+ };
3196
+ /** @description Unauthorized */
3197
+ 401: {
3198
+ headers: {
3199
+ [name: string]: unknown;
3200
+ };
3201
+ content: {
3202
+ "application/json": components["schemas"]["Error"];
3203
+ };
3204
+ };
3205
+ /** @description Platform-key spend limit exceeded during a buffered continuation */
3206
+ 402: {
3207
+ headers: {
3208
+ [name: string]: unknown;
3209
+ };
3210
+ content: {
3211
+ "application/json": components["schemas"]["AgentApprovalContinuationJsonResponse"];
3212
+ };
3213
+ };
3214
+ /** @description Insufficient permissions */
3215
+ 403: {
3216
+ headers: {
3217
+ [name: string]: unknown;
3218
+ };
3219
+ content: {
3220
+ "application/json": components["schemas"]["Error"];
3221
+ };
3222
+ };
3223
+ /** @description Agent or execution not found */
3224
+ 404: {
3225
+ headers: {
3226
+ [name: string]: unknown;
3227
+ };
3228
+ content: {
3229
+ "application/json": components["schemas"]["Error"];
3230
+ };
3231
+ };
3232
+ /** @description Execution is not awaiting this approval or cannot be resumed here */
3233
+ 409: {
3234
+ headers: {
3235
+ [name: string]: unknown;
3236
+ };
3237
+ content: {
3238
+ "application/json": components["schemas"]["Error"];
3239
+ };
3240
+ };
3241
+ /** @description The paused execution was armed by the retired legacy flow engine and cannot be resumed (LEGACY_PAUSE_UNRESUMABLE); re-run the flow */
3242
+ 410: {
3243
+ headers: {
3244
+ [name: string]: unknown;
3245
+ };
3246
+ content: {
3247
+ "application/json": components["schemas"]["Error"];
3248
+ };
3249
+ };
3250
+ /** @description Internal server error */
3251
+ 500: {
3252
+ headers: {
3253
+ [name: string]: unknown;
3254
+ };
3255
+ content: {
3256
+ "application/json": components["schemas"]["Error"];
3257
+ };
3258
+ };
3259
+ };
3260
+ };
3261
+ delete?: never;
3262
+ options?: never;
3263
+ head?: never;
3264
+ patch?: never;
3265
+ trace?: never;
3266
+ };
3267
+ "/v1/agents/{id}/capabilities": {
3268
+ parameters: {
3269
+ query?: never;
3270
+ header?: never;
3271
+ path?: never;
3272
+ cookie?: never;
3273
+ };
3274
+ get?: never;
3275
+ put?: never;
3276
+ /**
3277
+ * Add capability to agent
3278
+ * @description Add a capability (flow, sub-agent, or tool binding) to an agent.
3279
+ */
3280
+ post: {
3281
+ parameters: {
3282
+ query?: never;
3283
+ header?: never;
3284
+ path: {
3285
+ id: string;
3286
+ };
3287
+ cookie?: never;
3288
+ };
3289
+ requestBody?: {
3290
+ content: {
3291
+ "application/json": {
3292
+ enabled?: boolean;
3293
+ flowId?: string;
3294
+ parametersSchema?: unknown;
3295
+ subAgentId?: string;
3296
+ toolDescription?: string;
3297
+ toolId?: string;
3298
+ toolName: string;
3299
+ };
3300
+ };
3301
+ };
3302
+ responses: {
3303
+ /** @description Capability added */
3304
+ 201: {
3305
+ headers: {
3306
+ [name: string]: unknown;
3307
+ };
3308
+ content: {
3309
+ "application/json": {
3310
+ agentId?: string;
3311
+ createdAt?: string;
3312
+ displayOrder: number | null;
3313
+ enabled: boolean;
3314
+ flowId: string | null;
3315
+ id: string;
3316
+ parametersSchema?: unknown;
3317
+ subAgentId: string | null;
3318
+ toolDescription: string | null;
3319
+ toolId: string | null;
3320
+ toolName: string;
3321
+ };
3322
+ };
3323
+ };
3324
+ /** @description Validation error */
3325
+ 400: {
3326
+ headers: {
3327
+ [name: string]: unknown;
3328
+ };
3329
+ content: {
3330
+ "application/json": components["schemas"]["Error"];
3331
+ };
3332
+ };
3333
+ /** @description Unauthorized */
3334
+ 401: {
3335
+ headers: {
3336
+ [name: string]: unknown;
3337
+ };
3338
+ content: {
3339
+ "application/json": components["schemas"]["Error"];
3340
+ };
3341
+ };
3342
+ /** @description Insufficient permissions */
3343
+ 403: {
3344
+ headers: {
3345
+ [name: string]: unknown;
3346
+ };
3347
+ content: {
3348
+ "application/json": components["schemas"]["Error"];
3349
+ };
3350
+ };
3351
+ /** @description Agent not found */
3352
+ 404: {
3353
+ headers: {
3354
+ [name: string]: unknown;
3355
+ };
3356
+ content: {
3357
+ "application/json": components["schemas"]["Error"];
3358
+ };
3359
+ };
3360
+ /** @description Tool name already exists for this agent */
3361
+ 409: {
3362
+ headers: {
3363
+ [name: string]: unknown;
3364
+ };
3365
+ content: {
3366
+ "application/json": components["schemas"]["Error"];
3367
+ };
3368
+ };
3369
+ /** @description Internal server error */
3370
+ 500: {
3371
+ headers: {
3372
+ [name: string]: unknown;
3373
+ };
3374
+ content: {
3375
+ "application/json": components["schemas"]["Error"];
3376
+ };
3377
+ };
3378
+ };
3379
+ };
3380
+ delete?: never;
3381
+ options?: never;
3382
+ head?: never;
3383
+ patch?: never;
3384
+ trace?: never;
3385
+ };
3386
+ "/v1/agents/{id}/capabilities/{capabilityId}": {
3387
+ parameters: {
3388
+ query?: never;
3389
+ header?: never;
3390
+ path?: never;
3391
+ cookie?: never;
3392
+ };
3393
+ get?: never;
3394
+ put?: never;
3395
+ post?: never;
3396
+ /**
3397
+ * Remove capability from agent
3398
+ * @description Remove a capability (flow, sub-agent, or tool binding) from an agent.
3399
+ */
3400
+ delete: {
3401
+ parameters: {
3402
+ query?: never;
3403
+ header?: never;
3404
+ path: {
3405
+ id: string;
3406
+ capabilityId: string;
3407
+ };
3408
+ cookie?: never;
3409
+ };
3410
+ requestBody?: never;
3411
+ responses: {
3412
+ /** @description Capability removed */
3413
+ 200: {
3414
+ headers: {
3415
+ [name: string]: unknown;
3416
+ };
3417
+ content: {
3418
+ "application/json": {
3419
+ success: boolean;
3420
+ };
3421
+ };
3422
+ };
3423
+ /** @description Invalid agent or capability ID */
3424
+ 400: {
3425
+ headers: {
3426
+ [name: string]: unknown;
3427
+ };
3428
+ content: {
3429
+ "application/json": components["schemas"]["Error"];
3430
+ };
3431
+ };
3432
+ /** @description Unauthorized */
3433
+ 401: {
3434
+ headers: {
3435
+ [name: string]: unknown;
3436
+ };
3437
+ content: {
3438
+ "application/json": components["schemas"]["Error"];
3439
+ };
3440
+ };
3441
+ /** @description Agent or capability not found */
3442
+ 404: {
3443
+ headers: {
3444
+ [name: string]: unknown;
3445
+ };
3446
+ content: {
3447
+ "application/json": components["schemas"]["Error"];
3448
+ };
3449
+ };
3450
+ /** @description Internal server error */
3451
+ 500: {
3452
+ headers: {
3453
+ [name: string]: unknown;
3454
+ };
3455
+ content: {
3456
+ "application/json": components["schemas"]["Error"];
3457
+ };
3458
+ };
3459
+ };
3460
+ };
3461
+ options?: never;
3462
+ head?: never;
3463
+ patch?: never;
3464
+ trace?: never;
3465
+ };
3466
+ "/v1/agents/{id}/conversations/{conversationId}/events": {
3467
+ parameters: {
3468
+ query?: never;
3469
+ header?: never;
3470
+ path?: never;
3471
+ cookie?: never;
3472
+ };
3473
+ /**
3474
+ * List internal agent conversation events
3475
+ * @description List provenance-bearing internal events posted to a saved agent conversation, including detached subagent completion activities. These events are never represented as human messages.
3476
+ */
3477
+ get: {
3478
+ parameters: {
3479
+ query?: {
3480
+ limit?: string;
3481
+ after?: string;
3482
+ };
3483
+ header?: never;
3484
+ path: {
3485
+ id: string;
3486
+ conversationId: string;
3487
+ };
3488
+ cookie?: never;
3489
+ };
3490
+ requestBody?: never;
3491
+ responses: {
3492
+ /** @description Conversation event list in chronological order */
3493
+ 200: {
3494
+ headers: {
3495
+ [name: string]: unknown;
3496
+ };
3497
+ content: {
3498
+ "application/json": {
3499
+ data: {
3500
+ consumedAt: string | null;
3501
+ createdAt: string;
3502
+ eventKind: string;
3503
+ eventRevision: number;
3504
+ id: string;
3505
+ /** @enum {string} */
3506
+ notificationMode: "narrate" | "react";
3507
+ payload: {
3508
+ [key: string]: unknown;
3509
+ };
3510
+ runId: string;
3511
+ }[];
3512
+ };
3513
+ };
3514
+ };
3515
+ /** @description Invalid request */
3516
+ 400: {
3517
+ headers: {
3518
+ [name: string]: unknown;
3519
+ };
3520
+ content: {
3521
+ "application/json": components["schemas"]["Error"];
3522
+ };
3523
+ };
3524
+ /** @description Unauthorized */
3525
+ 401: {
3526
+ headers: {
3527
+ [name: string]: unknown;
3528
+ };
3529
+ content: {
3530
+ "application/json": components["schemas"]["Error"];
3531
+ };
3532
+ };
3533
+ /** @description Insufficient permissions */
3534
+ 403: {
3535
+ headers: {
3536
+ [name: string]: unknown;
3537
+ };
3538
+ content: {
3539
+ "application/json": components["schemas"]["Error"];
3540
+ };
3541
+ };
3542
+ /** @description Agent not found */
3543
+ 404: {
3544
+ headers: {
3545
+ [name: string]: unknown;
3546
+ };
3547
+ content: {
3548
+ "application/json": components["schemas"]["Error"];
3549
+ };
3550
+ };
3551
+ /** @description Internal server error */
3552
+ 500: {
3553
+ headers: {
3554
+ [name: string]: unknown;
3555
+ };
3556
+ content: {
3557
+ "application/json": components["schemas"]["Error"];
3558
+ };
3559
+ };
3560
+ };
3561
+ };
3562
+ put?: never;
3563
+ post?: never;
3564
+ delete?: never;
3565
+ options?: never;
3566
+ head?: never;
3567
+ patch?: never;
3568
+ trace?: never;
3569
+ };
3570
+ "/v1/agents/{id}/deployments": {
3571
+ parameters: {
3572
+ query?: never;
3573
+ header?: never;
3574
+ path?: never;
3575
+ cookie?: never;
3576
+ };
3577
+ /**
3578
+ * List deployment receipts for an agent
3579
+ * @description The append-only deployment history of this agent, newest first, cursor-paginated. Each receipt records the pointer, the previous and new versions, the alias revision, the actor, provenance and the dependency fingerprints checked at activation.
3580
+ */
3581
+ get: {
3582
+ parameters: {
3583
+ query?: {
3584
+ alias?: string;
3585
+ limit?: string;
3586
+ cursor?: string;
3587
+ };
3588
+ header?: never;
3589
+ path: {
3590
+ id: string;
3591
+ };
3592
+ cookie?: never;
3593
+ };
3594
+ requestBody?: never;
3595
+ responses: {
3596
+ /** @description Deployment receipts */
3597
+ 200: {
3598
+ headers: {
3599
+ [name: string]: unknown;
3600
+ };
3601
+ content: {
3602
+ "application/json": {
3603
+ data: {
3604
+ action: string;
3605
+ actorUserId: string | null;
3606
+ alias: string;
3607
+ aliasRevision: number;
3608
+ createdAt: string;
3609
+ dependencies: {
3610
+ [key: string]: unknown;
3611
+ } | null;
3612
+ id: string;
3613
+ previousVersionId: string | null;
3614
+ source: {
3615
+ [key: string]: unknown;
3616
+ };
3617
+ versionId: string;
3618
+ }[];
3619
+ pagination: {
3620
+ [key: string]: unknown;
3621
+ };
2814
3622
  };
2815
3623
  };
2816
3624
  };
@@ -2880,7 +3688,7 @@ interface paths {
2880
3688
  put?: never;
2881
3689
  /**
2882
3690
  * Execute agent
2883
- * @description Execute an agent with a message array. Streams a Server-Sent Events response when streamResponse is true (default); otherwise returns a JSON result. Send the RFC 7240 `Prefer: respond-async` header to receive a durable execution handle immediately, then poll its status URL for completion.
3691
+ * @description Execute an agent with a message array. Streams a Server-Sent Events response when streamResponse is true (default); otherwise returns a JSON result. Send the RFC 7240 `Prefer: respond-async` header to receive a durable execution handle immediately, then poll its status URL for completion. The optional `durability` body field pins the lane for this request (`forced`: `durable` or `in_process`) or bounds its attached watch (`watchLeaseMs`), and outranks the saved agent config.
2884
3692
  */
2885
3693
  post: {
2886
3694
  parameters: {
@@ -3049,6 +3857,19 @@ interface paths {
3049
3857
  agentId: string | null;
3050
3858
  agentSource: string | null;
3051
3859
  agentSpec?: unknown;
3860
+ /**
3861
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row.
3862
+ * @enum {string}
3863
+ */
3864
+ agentTargetResolution: "alias" | "version" | "legacy-live-row";
3865
+ /** @description Version number and label for `agentVersionId`, joined from `agent_versions`. `null` exactly when `agentVersionId` is `null`. */
3866
+ agentVersion: {
3867
+ id: string;
3868
+ label: string | null;
3869
+ versionNumber: number;
3870
+ } | null;
3871
+ /** @description The `agent_versions` row this run was recorded against, or `null`. `null` means the surface that admitted the run stamps no version (A2A, Product API, A2A pause admission and the Product MCP capability path record none today) or the run predates version stamping. It is never a claim that the run executed an unversioned configuration. */
3872
+ agentVersionId: string | null;
3052
3873
  /** @description Whether the agent loop ended by exhausting its `maxTurns` budget. Read this rather than inferring truncation from `stopReason`: a single-turn loop publishes `end_turn` on a budget end to preserve its original payload shape, and several clean success paths publish that same value. `null` means UNKNOWN — a run recorded before this field existed, or one executed by a lane that reports no per-iteration breakdown (external agents, Claude Managed) — and must not be read as `false`. */
3053
3874
  budgetExhausted: boolean | null;
3054
3875
  cancelRequestedAt: string | null;
@@ -3186,6 +4007,19 @@ interface paths {
3186
4007
  agentId: string | null;
3187
4008
  agentSource: string | null;
3188
4009
  agentSpec?: unknown;
4010
+ /**
4011
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row.
4012
+ * @enum {string}
4013
+ */
4014
+ agentTargetResolution: "alias" | "version" | "legacy-live-row";
4015
+ /** @description Version number and label for `agentVersionId`, joined from `agent_versions`. `null` exactly when `agentVersionId` is `null`. */
4016
+ agentVersion: {
4017
+ id: string;
4018
+ label: string | null;
4019
+ versionNumber: number;
4020
+ } | null;
4021
+ /** @description The `agent_versions` row this run was recorded against, or `null`. `null` means the surface that admitted the run stamps no version (A2A, Product API, A2A pause admission and the Product MCP capability path record none today) or the run predates version stamping. It is never a claim that the run executed an unversioned configuration. */
4022
+ agentVersionId: string | null;
3189
4023
  /** @description Whether the agent loop ended by exhausting its `maxTurns` budget. Read this rather than inferring truncation from `stopReason`: a single-turn loop publishes `end_turn` on a budget end to preserve its original payload shape, and several clean success paths publish that same value. `null` means UNKNOWN — a run recorded before this field existed, or one executed by a lane that reports no per-iteration breakdown (external agents, Claude Managed) — and must not be read as `false`. */
3190
4024
  budgetExhausted: boolean | null;
3191
4025
  cancelRequestedAt: string | null;
@@ -4605,11 +5439,16 @@ interface paths {
4605
5439
  results: {
4606
5440
  completionTokens: number | null;
4607
5441
  createdAt: string;
5442
+ /**
5443
+ * @deprecated
5444
+ * @description Deprecated alias for `modelCost`; identical value.
5445
+ */
4608
5446
  estimatedCost: string | null;
4609
5447
  executionTimeMs: number | null;
4610
5448
  flowId: string | null;
4611
5449
  flowName: string | null;
4612
5450
  id: string;
5451
+ modelCost: string | null;
4613
5452
  modelUsed: string | null;
4614
5453
  promptId: string | null;
4615
5454
  promptName: string | null;
@@ -4621,6 +5460,8 @@ interface paths {
4621
5460
  recordType: string;
4622
5461
  result: string | null;
4623
5462
  status: string;
5463
+ /** @description Built-in tool spend for this execution, as a decimal string. `null` means unknown, not zero: rows written before per-run cost was split into model and tool portions carry no tool figure. A run that genuinely used no billable tool records `"0"`. Sum with `modelCost` for the run total, and treat `null` as unknown rather than zero. */
5464
+ toolCost: string | null;
4624
5465
  totalTokens: number | null;
4625
5466
  }[];
4626
5467
  };
@@ -11076,7 +11917,7 @@ interface paths {
11076
11917
  put?: never;
11077
11918
  /**
11078
11919
  * Execute a flow or agent
11079
- * @description Main dispatch endpoint for flow and agent execution with record resolution. Supports streaming via SSE or synchronous JSON responses. Send the RFC 7240 `Prefer: respond-async` header to receive a durable execution handle immediately, then poll its status URL for completion.
11920
+ * @description Main dispatch endpoint for flow and agent execution with record resolution. Supports streaming via SSE or synchronous JSON responses. Send the RFC 7240 `Prefer: respond-async` header to receive a durable execution handle immediately, then poll its status URL for completion. A saved agent may run on the durable session lane; the admission headers `x-runtype-concurrency` (reject, supersede, queue), `x-runtype-coalesce` (true) and `idempotency-key` then apply exactly as on `POST /v1/agents/{id}/execute`, and are ignored for a turn that resolves to the in-process lane.
11080
11921
  */
11081
11922
  post: {
11082
11923
  parameters: {
@@ -11096,6 +11937,7 @@ interface paths {
11096
11937
  agentId?: string;
11097
11938
  /** @enum {string} */
11098
11939
  agentType?: "runtype" | "claude_managed";
11940
+ alias?: string;
11099
11941
  artifacts?: {
11100
11942
  /** @enum {boolean} */
11101
11943
  enabled: true;
@@ -11111,6 +11953,12 @@ interface paths {
11111
11953
  setupMode?: "create" | "connect";
11112
11954
  systemPrompt?: string;
11113
11955
  };
11956
+ durability?: {
11957
+ /** @enum {string} */
11958
+ forced?: "durable" | "in_process";
11959
+ maxBudgetMs?: number | null;
11960
+ watchLeaseMs?: number | null;
11961
+ };
11114
11962
  errorHandling?: {
11115
11963
  fallbacks?: ({
11116
11964
  delay?: number;
@@ -11171,16 +12019,25 @@ interface paths {
11171
12019
  };
11172
12020
  sandbox?: {
11173
12021
  enabled: boolean;
11174
- /** @enum {string} */
12022
+ /**
12023
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
12024
+ * @enum {string}
12025
+ */
11175
12026
  instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
11176
12027
  networkAccess?: ("none" | "essentials" | "open") | {
11177
12028
  allow?: string[];
11178
12029
  /** @enum {string} */
11179
12030
  profile?: "none" | "essentials" | "open";
11180
12031
  };
11181
- /** @enum {string} */
12032
+ /**
12033
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
12034
+ * @enum {string}
12035
+ */
11182
12036
  persistence?: "ephemeral" | "conversation" | "named";
11183
- /** @enum {string} */
12037
+ /**
12038
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
12039
+ * @enum {string}
12040
+ */
11184
12041
  provider?: "runtype-sandbox" | "daytona";
11185
12042
  secretEnv?: {
11186
12043
  [key: string]: string;
@@ -11266,6 +12123,7 @@ interface paths {
11266
12123
  };
11267
12124
  topK?: number;
11268
12125
  topP?: number;
12126
+ versionId?: string;
11269
12127
  voice?: {
11270
12128
  elevenLabs?: {
11271
12129
  modelId?: string;
@@ -11496,6 +12354,7 @@ interface paths {
11496
12354
  agentId?: string;
11497
12355
  /** @enum {string} */
11498
12356
  agentType?: "runtype" | "claude_managed";
12357
+ alias?: string;
11499
12358
  artifacts?: {
11500
12359
  /** @enum {boolean} */
11501
12360
  enabled: true;
@@ -11511,6 +12370,12 @@ interface paths {
11511
12370
  setupMode?: "create" | "connect";
11512
12371
  systemPrompt?: string;
11513
12372
  };
12373
+ durability?: {
12374
+ /** @enum {string} */
12375
+ forced?: "durable" | "in_process";
12376
+ maxBudgetMs?: number | null;
12377
+ watchLeaseMs?: number | null;
12378
+ };
11514
12379
  errorHandling?: {
11515
12380
  fallbacks?: ({
11516
12381
  delay?: number;
@@ -11571,16 +12436,25 @@ interface paths {
11571
12436
  };
11572
12437
  sandbox?: {
11573
12438
  enabled: boolean;
11574
- /** @enum {string} */
12439
+ /**
12440
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
12441
+ * @enum {string}
12442
+ */
11575
12443
  instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
11576
12444
  networkAccess?: ("none" | "essentials" | "open") | {
11577
12445
  allow?: string[];
11578
12446
  /** @enum {string} */
11579
12447
  profile?: "none" | "essentials" | "open";
11580
12448
  };
11581
- /** @enum {string} */
12449
+ /**
12450
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
12451
+ * @enum {string}
12452
+ */
11582
12453
  persistence?: "ephemeral" | "conversation" | "named";
11583
- /** @enum {string} */
12454
+ /**
12455
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
12456
+ * @enum {string}
12457
+ */
11584
12458
  provider?: "runtype-sandbox" | "daytona";
11585
12459
  secretEnv?: {
11586
12460
  [key: string]: string;
@@ -11666,6 +12540,7 @@ interface paths {
11666
12540
  };
11667
12541
  topK?: number;
11668
12542
  topP?: number;
12543
+ versionId?: string;
11669
12544
  voice?: {
11670
12545
  elevenLabs?: {
11671
12546
  modelId?: string;
@@ -15798,51 +16673,311 @@ interface paths {
15798
16673
  patch?: never;
15799
16674
  trace?: never;
15800
16675
  };
15801
- "/v1/eval/suites/{id}/proposals/{proposalId}/reject": {
16676
+ "/v1/eval/suites/{id}/proposals/{proposalId}/reject": {
16677
+ parameters: {
16678
+ query?: never;
16679
+ header?: never;
16680
+ path?: never;
16681
+ cookie?: never;
16682
+ };
16683
+ get?: never;
16684
+ put?: never;
16685
+ /**
16686
+ * Reject an eval case proposal
16687
+ * @description Reject a proposal. The row survives as audit and as a dedup signal for future generation passes.
16688
+ */
16689
+ post: {
16690
+ parameters: {
16691
+ query?: never;
16692
+ header?: never;
16693
+ path: {
16694
+ id: string;
16695
+ proposalId: string;
16696
+ };
16697
+ cookie?: never;
16698
+ };
16699
+ requestBody?: never;
16700
+ responses: {
16701
+ /** @description Proposal rejected */
16702
+ 200: {
16703
+ headers: {
16704
+ [name: string]: unknown;
16705
+ };
16706
+ content: {
16707
+ "application/json": {
16708
+ proposal: components["schemas"]["EvalCaseProposal"];
16709
+ };
16710
+ };
16711
+ };
16712
+ /** @description Invalid request */
16713
+ 400: {
16714
+ headers: {
16715
+ [name: string]: unknown;
16716
+ };
16717
+ content: {
16718
+ "application/json": components["schemas"]["Error"];
16719
+ };
16720
+ };
16721
+ /** @description Unauthorized */
16722
+ 401: {
16723
+ headers: {
16724
+ [name: string]: unknown;
16725
+ };
16726
+ content: {
16727
+ "application/json": components["schemas"]["Error"];
16728
+ };
16729
+ };
16730
+ /** @description Forbidden */
16731
+ 403: {
16732
+ headers: {
16733
+ [name: string]: unknown;
16734
+ };
16735
+ content: {
16736
+ "application/json": components["schemas"]["Error"];
16737
+ };
16738
+ };
16739
+ /** @description Not found */
16740
+ 404: {
16741
+ headers: {
16742
+ [name: string]: unknown;
16743
+ };
16744
+ content: {
16745
+ "application/json": components["schemas"]["Error"];
16746
+ };
16747
+ };
16748
+ /** @description Already resolved */
16749
+ 409: {
16750
+ headers: {
16751
+ [name: string]: unknown;
16752
+ };
16753
+ content: {
16754
+ "application/json": components["schemas"]["Error"];
16755
+ };
16756
+ };
16757
+ /** @description Internal server error */
16758
+ 500: {
16759
+ headers: {
16760
+ [name: string]: unknown;
16761
+ };
16762
+ content: {
16763
+ "application/json": components["schemas"]["Error"];
16764
+ };
16765
+ };
16766
+ };
16767
+ };
16768
+ delete?: never;
16769
+ options?: never;
16770
+ head?: never;
16771
+ patch?: never;
16772
+ trace?: never;
16773
+ };
16774
+ "/v1/eval/suites/{id}/run": {
16775
+ parameters: {
16776
+ query?: never;
16777
+ header?: never;
16778
+ path?: never;
16779
+ cookie?: never;
16780
+ };
16781
+ get?: never;
16782
+ put?: never;
16783
+ /**
16784
+ * Run eval suite
16785
+ * @description Run every enabled case of the suite against its target and grade the outputs with the suite graders. Suites within the synchronous case limit (50) run inline and return the full scored result; larger suites are queued as a durable run (202) that is graded when it completes — poll GET /eval/runs/{runId}/scores. Both paths persist per-case scores to the same run history.
16786
+ */
16787
+ post: {
16788
+ parameters: {
16789
+ query?: never;
16790
+ header?: never;
16791
+ path: {
16792
+ id: string;
16793
+ };
16794
+ cookie?: never;
16795
+ };
16796
+ requestBody?: {
16797
+ content: {
16798
+ "application/json": {
16799
+ /**
16800
+ * @description Force the execution path. Default: sync for suites within the synchronous case limit (50), batch above it.
16801
+ * @enum {string}
16802
+ */
16803
+ mode?: "sync" | "batch";
16804
+ /** @description Run every case against this model instead of the target’s configured one, without editing the suite or its target. Re-run the same suite once per candidate model and compare scores to pick a model on graded evidence. Applies to both flow and agent targets. */
16805
+ modelOverride?: string;
16806
+ /** @description Strict grading: a soft grader miss fails its case like a gate miss. */
16807
+ strict?: boolean;
16808
+ };
16809
+ };
16810
+ };
16811
+ responses: {
16812
+ /** @description Suite ran synchronously — score + per-case grader outcomes */
16813
+ 200: {
16814
+ headers: {
16815
+ [name: string]: unknown;
16816
+ };
16817
+ content: {
16818
+ "application/json": components["schemas"]["RunEvalResponse"];
16819
+ };
16820
+ };
16821
+ /** @description Suite queued as a durable run (scored on completion) */
16822
+ 202: {
16823
+ headers: {
16824
+ [name: string]: unknown;
16825
+ };
16826
+ content: {
16827
+ "application/json": components["schemas"]["EvalSuiteRunQueued"];
16828
+ };
16829
+ };
16830
+ /** @description Invalid request */
16831
+ 400: {
16832
+ headers: {
16833
+ [name: string]: unknown;
16834
+ };
16835
+ content: {
16836
+ "application/json": components["schemas"]["Error"];
16837
+ };
16838
+ };
16839
+ /** @description Unauthorized */
16840
+ 401: {
16841
+ headers: {
16842
+ [name: string]: unknown;
16843
+ };
16844
+ content: {
16845
+ "application/json": components["schemas"]["Error"];
16846
+ };
16847
+ };
16848
+ /** @description Daily eval limit exceeded */
16849
+ 402: {
16850
+ headers: {
16851
+ [name: string]: unknown;
16852
+ };
16853
+ content: {
16854
+ "application/json": components["schemas"]["Error"];
16855
+ };
16856
+ };
16857
+ /** @description Forbidden */
16858
+ 403: {
16859
+ headers: {
16860
+ [name: string]: unknown;
16861
+ };
16862
+ content: {
16863
+ "application/json": components["schemas"]["Error"];
16864
+ };
16865
+ };
16866
+ /** @description Not found */
16867
+ 404: {
16868
+ headers: {
16869
+ [name: string]: unknown;
16870
+ };
16871
+ content: {
16872
+ "application/json": components["schemas"]["Error"];
16873
+ };
16874
+ };
16875
+ /** @description Internal server error */
16876
+ 500: {
16877
+ headers: {
16878
+ [name: string]: unknown;
16879
+ };
16880
+ content: {
16881
+ "application/json": components["schemas"]["Error"];
16882
+ };
16883
+ };
16884
+ };
16885
+ };
16886
+ delete?: never;
16887
+ options?: never;
16888
+ head?: never;
16889
+ patch?: never;
16890
+ trace?: never;
16891
+ };
16892
+ "/v1/eval/{id}/results": {
15802
16893
  parameters: {
15803
16894
  query?: never;
15804
16895
  header?: never;
15805
16896
  path?: never;
15806
16897
  cookie?: never;
15807
16898
  };
15808
- get?: never;
15809
- put?: never;
15810
16899
  /**
15811
- * Reject an eval case proposal
15812
- * @description Reject a proposal. The row survives as audit and as a dedup signal for future generation passes.
16900
+ * Get eval results
16901
+ * @description Get detailed results for a specific eval batch including step results and tool calls.
15813
16902
  */
15814
- post: {
16903
+ get: {
15815
16904
  parameters: {
15816
16905
  query?: never;
15817
16906
  header?: never;
15818
16907
  path: {
16908
+ /** @description Batch execution ID */
15819
16909
  id: string;
15820
- proposalId: string;
15821
16910
  };
15822
16911
  cookie?: never;
15823
16912
  };
15824
16913
  requestBody?: never;
15825
16914
  responses: {
15826
- /** @description Proposal rejected */
16915
+ /** @description Eval results returned */
15827
16916
  200: {
15828
16917
  headers: {
15829
16918
  [name: string]: unknown;
15830
16919
  };
15831
16920
  content: {
15832
16921
  "application/json": {
15833
- proposal: components["schemas"]["EvalCaseProposal"];
16922
+ batchExecutionId: string;
16923
+ completedAt?: string;
16924
+ evalConfig?: unknown;
16925
+ evalGroupId?: string;
16926
+ evalName?: string;
16927
+ failedRecords: number;
16928
+ flowId: string | null;
16929
+ processedRecords: number;
16930
+ resultsByRecord: {
16931
+ [key: string]: {
16932
+ completionTokens: number | null;
16933
+ durationMs: number | null;
16934
+ errorMessage: string | null;
16935
+ errorStack: string | null;
16936
+ executedAt: string;
16937
+ /**
16938
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
16939
+ * @enum {string|null}
16940
+ */
16941
+ executionEngine?: "runtime" | "legacy" | null;
16942
+ executionSessionId: string | null;
16943
+ inputVariables?: unknown;
16944
+ messageHistory: unknown[] | null;
16945
+ modelUsed: string | null;
16946
+ output: string | null;
16947
+ promptTokens: number | null;
16948
+ reasoningContent: string | null;
16949
+ reasoningTokens: number | null;
16950
+ recordMetadata?: unknown;
16951
+ recordName: string | null;
16952
+ resolvedPrompt: string | null;
16953
+ retryCount: number | null;
16954
+ stepConfig?: unknown;
16955
+ stepId: string | null;
16956
+ stepName: string | null;
16957
+ stepResultId: string;
16958
+ stepType: string;
16959
+ toolCalls: {
16960
+ errorMessage: string | null;
16961
+ executedAt: string;
16962
+ executionTimeMs: number | null;
16963
+ inputParameters?: unknown;
16964
+ model: string | null;
16965
+ outputResult?: unknown;
16966
+ status: string;
16967
+ toolDescription: string | null;
16968
+ toolExecutionId: string;
16969
+ toolId: string | null;
16970
+ toolName: string;
16971
+ }[];
16972
+ totalCost: number | null;
16973
+ }[];
16974
+ };
16975
+ startedAt: string;
16976
+ status: string;
16977
+ totalRecords: number;
15834
16978
  };
15835
16979
  };
15836
16980
  };
15837
- /** @description Invalid request */
15838
- 400: {
15839
- headers: {
15840
- [name: string]: unknown;
15841
- };
15842
- content: {
15843
- "application/json": components["schemas"]["Error"];
15844
- };
15845
- };
15846
16981
  /** @description Unauthorized */
15847
16982
  401: {
15848
16983
  headers: {
@@ -15852,15 +16987,6 @@ interface paths {
15852
16987
  "application/json": components["schemas"]["Error"];
15853
16988
  };
15854
16989
  };
15855
- /** @description Forbidden */
15856
- 403: {
15857
- headers: {
15858
- [name: string]: unknown;
15859
- };
15860
- content: {
15861
- "application/json": components["schemas"]["Error"];
15862
- };
15863
- };
15864
16990
  /** @description Not found */
15865
16991
  404: {
15866
16992
  headers: {
@@ -15870,15 +16996,6 @@ interface paths {
15870
16996
  "application/json": components["schemas"]["Error"];
15871
16997
  };
15872
16998
  };
15873
- /** @description Already resolved */
15874
- 409: {
15875
- headers: {
15876
- [name: string]: unknown;
15877
- };
15878
- content: {
15879
- "application/json": components["schemas"]["Error"];
15880
- };
15881
- };
15882
16999
  /** @description Internal server error */
15883
17000
  500: {
15884
17001
  headers: {
@@ -15890,69 +17007,51 @@ interface paths {
15890
17007
  };
15891
17008
  };
15892
17009
  };
17010
+ put?: never;
17011
+ post?: never;
15893
17012
  delete?: never;
15894
17013
  options?: never;
15895
17014
  head?: never;
15896
17015
  patch?: never;
15897
17016
  trace?: never;
15898
17017
  };
15899
- "/v1/eval/suites/{id}/run": {
17018
+ "/v1/executions/{executionId}/events": {
15900
17019
  parameters: {
15901
17020
  query?: never;
15902
17021
  header?: never;
15903
17022
  path?: never;
15904
17023
  cookie?: never;
15905
17024
  };
15906
- get?: never;
15907
- put?: never;
15908
17025
  /**
15909
- * Run eval suite
15910
- * @description Run every enabled case of the suite against its target and grade the outputs with the suite graders. Suites within the synchronous case limit (50) run inline and return the full scored result; larger suites are queued as a durable run (202) that is graded when it completes poll GET /eval/runs/{runId}/scores. Both paths persist per-case scores to the same run history.
17026
+ * Stream execution events
17027
+ * @description Execution-scoped alias of `GET /v1/agents/{id}/executions/{executionId}/events`: reconnect to a durable turn and replay-and-tail its Server-Sent Events without already knowing which agent ran it. The agent is resolved from the execution's own persisted record, so a run started through `/v1/dispatch` reconnects by execution id alone; a record with no agent (an inline definition, which addresses no durable session) answers 404. A turn that streams over an expired watch lease ends with `await` / `awaitReason: "detached"` while the execution keeps running; pass the last seen SSE `id:` as `after` to rejoin it. Replays buffered events strictly past the `after` cursor, then live-tails if the turn is still running. Each event carries an SSE `id:` line — a durable row seq, or (unified vocabulary) a composite `<seq>.<subIndex>` when one durable row translates to multiple events. Pass that id verbatim after any disconnect (tab reload, sleep, stream timeout) to resume without missing or duplicating events. Replayed and live-tailed frames use the unified execution vocabulary. An API key needs `AGENTS:READ`, `AGENTS:*`, `DISPATCH:*`, or `*`; `DISPATCH:*` is admitted because this alias exists for dispatch-started runs.
15911
17028
  */
15912
- post: {
17029
+ get: {
15913
17030
  parameters: {
15914
- query?: never;
17031
+ query?: {
17032
+ /** @description Fallback session key, honored only for a turn that persists no session key of its own (the Claude Managed lane). A durable turn resolves its session owner from the persisted execution, and a subagent run from its private child thread. */
17033
+ conversationId?: string;
17034
+ /** @description Replay only events strictly past this cursor (the last seen SSE id, passed verbatim): a plain row seq, or the composite `<seq>.<subIndex>` a unified-vocabulary stream stamps on intermediate sub-frames. Defaults to 0 (replay the whole turn). */
17035
+ after?: string;
17036
+ };
15915
17037
  header?: never;
15916
17038
  path: {
15917
- id: string;
17039
+ executionId: string;
15918
17040
  };
15919
17041
  cookie?: never;
15920
17042
  };
15921
- requestBody?: {
15922
- content: {
15923
- "application/json": {
15924
- /**
15925
- * @description Force the execution path. Default: sync for suites within the synchronous case limit (50), batch above it.
15926
- * @enum {string}
15927
- */
15928
- mode?: "sync" | "batch";
15929
- /** @description Run every case against this model instead of the target’s configured one, without editing the suite or its target. Re-run the same suite once per candidate model and compare scores to pick a model on graded evidence. Applies to both flow and agent targets. */
15930
- modelOverride?: string;
15931
- /** @description Strict grading: a soft grader miss fails its case like a gate miss. */
15932
- strict?: boolean;
15933
- };
15934
- };
15935
- };
17043
+ requestBody?: never;
15936
17044
  responses: {
15937
- /** @description Suite ran synchronously score + per-case grader outcomes */
17045
+ /** @description Server-Sent Events stream (buffered replay followed by a live tail) */
15938
17046
  200: {
15939
17047
  headers: {
15940
17048
  [name: string]: unknown;
15941
17049
  };
15942
17050
  content: {
15943
- "application/json": components["schemas"]["RunEvalResponse"];
15944
- };
15945
- };
15946
- /** @description Suite queued as a durable run (scored on completion) */
15947
- 202: {
15948
- headers: {
15949
- [name: string]: unknown;
15950
- };
15951
- content: {
15952
- "application/json": components["schemas"]["EvalSuiteRunQueued"];
17051
+ "text/event-stream": unknown;
15953
17052
  };
15954
17053
  };
15955
- /** @description Invalid request */
17054
+ /** @description No session owner resolves for this execution */
15956
17055
  400: {
15957
17056
  headers: {
15958
17057
  [name: string]: unknown;
@@ -15970,16 +17069,7 @@ interface paths {
15970
17069
  "application/json": components["schemas"]["Error"];
15971
17070
  };
15972
17071
  };
15973
- /** @description Daily eval limit exceeded */
15974
- 402: {
15975
- headers: {
15976
- [name: string]: unknown;
15977
- };
15978
- content: {
15979
- "application/json": components["schemas"]["Error"];
15980
- };
15981
- };
15982
- /** @description Forbidden */
17072
+ /** @description Insufficient API key permissions */
15983
17073
  403: {
15984
17074
  headers: {
15985
17075
  [name: string]: unknown;
@@ -15988,7 +17078,7 @@ interface paths {
15988
17078
  "application/json": components["schemas"]["Error"];
15989
17079
  };
15990
17080
  };
15991
- /** @description Not found */
17081
+ /** @description Execution not found, or it addresses no durable session */
15992
17082
  404: {
15993
17083
  headers: {
15994
17084
  [name: string]: unknown;
@@ -16006,123 +17096,8 @@ interface paths {
16006
17096
  "application/json": components["schemas"]["Error"];
16007
17097
  };
16008
17098
  };
16009
- };
16010
- };
16011
- delete?: never;
16012
- options?: never;
16013
- head?: never;
16014
- patch?: never;
16015
- trace?: never;
16016
- };
16017
- "/v1/eval/{id}/results": {
16018
- parameters: {
16019
- query?: never;
16020
- header?: never;
16021
- path?: never;
16022
- cookie?: never;
16023
- };
16024
- /**
16025
- * Get eval results
16026
- * @description Get detailed results for a specific eval batch including step results and tool calls.
16027
- */
16028
- get: {
16029
- parameters: {
16030
- query?: never;
16031
- header?: never;
16032
- path: {
16033
- /** @description Batch execution ID */
16034
- id: string;
16035
- };
16036
- cookie?: never;
16037
- };
16038
- requestBody?: never;
16039
- responses: {
16040
- /** @description Eval results returned */
16041
- 200: {
16042
- headers: {
16043
- [name: string]: unknown;
16044
- };
16045
- content: {
16046
- "application/json": {
16047
- batchExecutionId: string;
16048
- completedAt?: string;
16049
- evalConfig?: unknown;
16050
- evalGroupId?: string;
16051
- evalName?: string;
16052
- failedRecords: number;
16053
- flowId: string | null;
16054
- processedRecords: number;
16055
- resultsByRecord: {
16056
- [key: string]: {
16057
- completionTokens: number | null;
16058
- durationMs: number | null;
16059
- errorMessage: string | null;
16060
- errorStack: string | null;
16061
- executedAt: string;
16062
- /**
16063
- * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
16064
- * @enum {string|null}
16065
- */
16066
- executionEngine?: "runtime" | "legacy" | null;
16067
- executionSessionId: string | null;
16068
- inputVariables?: unknown;
16069
- messageHistory: unknown[] | null;
16070
- modelUsed: string | null;
16071
- output: string | null;
16072
- promptTokens: number | null;
16073
- reasoningContent: string | null;
16074
- reasoningTokens: number | null;
16075
- recordMetadata?: unknown;
16076
- recordName: string | null;
16077
- resolvedPrompt: string | null;
16078
- retryCount: number | null;
16079
- stepConfig?: unknown;
16080
- stepId: string | null;
16081
- stepName: string | null;
16082
- stepResultId: string;
16083
- stepType: string;
16084
- toolCalls: {
16085
- errorMessage: string | null;
16086
- executedAt: string;
16087
- executionTimeMs: number | null;
16088
- inputParameters?: unknown;
16089
- model: string | null;
16090
- outputResult?: unknown;
16091
- status: string;
16092
- toolDescription: string | null;
16093
- toolExecutionId: string;
16094
- toolId: string | null;
16095
- toolName: string;
16096
- }[];
16097
- totalCost: number | null;
16098
- }[];
16099
- };
16100
- startedAt: string;
16101
- status: string;
16102
- totalRecords: number;
16103
- };
16104
- };
16105
- };
16106
- /** @description Unauthorized */
16107
- 401: {
16108
- headers: {
16109
- [name: string]: unknown;
16110
- };
16111
- content: {
16112
- "application/json": components["schemas"]["Error"];
16113
- };
16114
- };
16115
- /** @description Not found */
16116
- 404: {
16117
- headers: {
16118
- [name: string]: unknown;
16119
- };
16120
- content: {
16121
- "application/json": components["schemas"]["Error"];
16122
- };
16123
- };
16124
- /** @description Internal server error */
16125
- 500: {
17099
+ /** @description Failed to attach to the execution stream */
17100
+ 502: {
16126
17101
  headers: {
16127
17102
  [name: string]: unknown;
16128
17103
  };
@@ -16271,6 +17246,19 @@ interface paths {
16271
17246
  };
16272
17247
  content: {
16273
17248
  "application/json": {
17249
+ /**
17250
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row.
17251
+ * @enum {string}
17252
+ */
17253
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
17254
+ /** @description Version number and label for `agentVersionId`. `null` exactly when `agentVersionId` is `null`. */
17255
+ agentVersion?: {
17256
+ id: string;
17257
+ label: string | null;
17258
+ versionNumber: number;
17259
+ } | null;
17260
+ /** @description The `agent_versions` row the run was recorded against. Present only for durable agent executions; `null` when that surface stamps no version. */
17261
+ agentVersionId?: string | null;
16274
17262
  createdAt: string;
16275
17263
  error?: string;
16276
17264
  executionId: string;
@@ -17510,7 +18498,7 @@ interface paths {
17510
18498
  put?: never;
17511
18499
  /**
17512
18500
  * Ensure flow (config-as-code converge)
17513
- * @description Idempotently converge a repo-defined flow definition onto the platform. Identity is name + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the flow or append a new version when the canonical content hash differs. Non-executing: never touches the execution pipeline — the deploy-time sibling of the dispatch-coupled `flowMode: "upsert"` (which saves and runs in one request). The response always carries the server-computed canonical hash. Set dryRun to plan without writing (CI drift gate), onConflict: "overwrite" to converge over dashboard/API edits, and release: "publish" to also re-aim the published-version pointer.
18501
+ * @description Idempotently converge a repo-defined flow definition onto the platform. Identity is name + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the flow or append a new version when the canonical content hash differs. Non-executing: never touches the execution pipeline — the deploy-time sibling of the dispatch-coupled `flowMode: "upsert"` (which saves and runs in one request). The response always carries the server-computed canonical hash. Set dryRun to plan without writing (CI drift gate), onConflict: "overwrite" to converge over dashboard/API edits, and release: "publish" to also re-aim the published-version pointer. Optional version.label / version.notes stamp provenance (a git SHA, a release tag) on the appended version row.
17514
18502
  */
17515
18503
  post: {
17516
18504
  parameters: {
@@ -17543,6 +18531,7 @@ interface paths {
17543
18531
  onConflict?: "error" | "overwrite";
17544
18532
  /** @enum {string} */
17545
18533
  release?: "none" | "publish";
18534
+ version?: components["schemas"]["EnsureVersionMetadata"];
17546
18535
  };
17547
18536
  };
17548
18537
  };
@@ -37045,6 +38034,10 @@ interface paths {
37045
38034
  "application/json": {
37046
38035
  data: {
37047
38036
  createdAt: string;
38037
+ /**
38038
+ * @deprecated
38039
+ * @description Deprecated alias for `modelCost`; identical value.
38040
+ */
37048
38041
  estimatedCost: string | null;
37049
38042
  /**
37050
38043
  * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
@@ -37055,12 +38048,15 @@ interface paths {
37055
38048
  flowId: string | null;
37056
38049
  flowName: string | null;
37057
38050
  id: string;
38051
+ modelCost: string | null;
37058
38052
  modelUsed: string | null;
37059
38053
  promptId: string | null;
37060
38054
  promptName: string | null;
37061
38055
  recordId: string;
37062
38056
  result?: unknown;
37063
38057
  status: string;
38058
+ /** @description Built-in tool spend for this execution, as a decimal string. `null` means unknown, not zero: rows written before per-run cost was split into model and tool portions carry no tool figure. A run that genuinely used no billable tool records `"0"`. Sum with `modelCost` for the run total, and treat `null` as unknown rather than zero. */
38059
+ toolCost: string | null;
37064
38060
  totalTokens: number | null;
37065
38061
  }[];
37066
38062
  pagination: {
@@ -43505,22 +44501,360 @@ interface paths {
43505
44501
  "application/json": components["schemas"]["Error"];
43506
44502
  };
43507
44503
  };
43508
- /** @description Conflict: external_modification (last write was not ensure; pass onConflict: "overwrite") or remote_changed (expectedRemoteHash guard) */
44504
+ /** @description Conflict: external_modification (last write was not ensure; pass onConflict: "overwrite") or remote_changed (expectedRemoteHash guard) */
44505
+ 409: {
44506
+ headers: {
44507
+ [name: string]: unknown;
44508
+ };
44509
+ content: {
44510
+ "application/json": components["schemas"]["ToolEnsureConflict"];
44511
+ };
44512
+ };
44513
+ /** @description Submitted contentHash does not match the server-recomputed canonical hash */
44514
+ 422: {
44515
+ headers: {
44516
+ [name: string]: unknown;
44517
+ };
44518
+ content: {
44519
+ "application/json": components["schemas"]["ToolEnsureHashMismatch"];
44520
+ };
44521
+ };
44522
+ /** @description Internal server error */
44523
+ 500: {
44524
+ headers: {
44525
+ [name: string]: unknown;
44526
+ };
44527
+ content: {
44528
+ "application/json": components["schemas"]["Error"];
44529
+ };
44530
+ };
44531
+ };
44532
+ };
44533
+ delete?: never;
44534
+ options?: never;
44535
+ head?: never;
44536
+ patch?: never;
44537
+ trace?: never;
44538
+ };
44539
+ "/v1/tools/flows/{flowId}/convert-to-tool": {
44540
+ parameters: {
44541
+ query?: never;
44542
+ header?: never;
44543
+ path?: never;
44544
+ cookie?: never;
44545
+ };
44546
+ get?: never;
44547
+ put?: never;
44548
+ /**
44549
+ * Convert flow to tool
44550
+ * @description Create a flow-type tool from an existing flow, generating its parameters schema from the flow steps.
44551
+ */
44552
+ post: {
44553
+ parameters: {
44554
+ query?: never;
44555
+ header?: never;
44556
+ path: {
44557
+ flowId: string;
44558
+ };
44559
+ cookie?: never;
44560
+ };
44561
+ requestBody?: {
44562
+ content: {
44563
+ "application/json": {
44564
+ [key: string]: unknown;
44565
+ };
44566
+ };
44567
+ };
44568
+ responses: {
44569
+ /** @description Created tool */
44570
+ 200: {
44571
+ headers: {
44572
+ [name: string]: unknown;
44573
+ };
44574
+ content: {
44575
+ "application/json": {
44576
+ config: {
44577
+ [key: string]: unknown;
44578
+ } | null;
44579
+ createdAt: string;
44580
+ description: string | null;
44581
+ id: string;
44582
+ isActive: boolean;
44583
+ lastModifiedSource?: string | null;
44584
+ name: string;
44585
+ organizationId: string | null;
44586
+ parametersSchema?: {
44587
+ [key: string]: unknown;
44588
+ };
44589
+ toolType: string;
44590
+ updatedAt: string;
44591
+ userId: string | null;
44592
+ validation?: {
44593
+ warnings: {
44594
+ code: string;
44595
+ column?: number;
44596
+ line?: number;
44597
+ message: string;
44598
+ /** @enum {string} */
44599
+ severity: "error" | "warning";
44600
+ suggestion?: string;
44601
+ }[];
44602
+ };
44603
+ };
44604
+ };
44605
+ };
44606
+ /** @description Validation error */
44607
+ 400: {
44608
+ headers: {
44609
+ [name: string]: unknown;
44610
+ };
44611
+ content: {
44612
+ "application/json": components["schemas"]["Error"];
44613
+ };
44614
+ };
44615
+ /** @description Unauthorized */
44616
+ 401: {
44617
+ headers: {
44618
+ [name: string]: unknown;
44619
+ };
44620
+ content: {
44621
+ "application/json": components["schemas"]["Error"];
44622
+ };
44623
+ };
44624
+ /** @description Insufficient permissions */
44625
+ 403: {
44626
+ headers: {
44627
+ [name: string]: unknown;
44628
+ };
44629
+ content: {
44630
+ "application/json": components["schemas"]["Error"];
44631
+ };
44632
+ };
44633
+ /** @description Flow not found */
44634
+ 404: {
44635
+ headers: {
44636
+ [name: string]: unknown;
44637
+ };
44638
+ content: {
44639
+ "application/json": components["schemas"]["Error"];
44640
+ };
44641
+ };
44642
+ /** @description Internal server error */
44643
+ 500: {
44644
+ headers: {
44645
+ [name: string]: unknown;
44646
+ };
44647
+ content: {
44648
+ "application/json": components["schemas"]["Error"];
44649
+ };
44650
+ };
44651
+ };
44652
+ };
44653
+ delete?: never;
44654
+ options?: never;
44655
+ head?: never;
44656
+ patch?: never;
44657
+ trace?: never;
44658
+ };
44659
+ "/v1/tools/pull": {
44660
+ parameters: {
44661
+ query?: never;
44662
+ header?: never;
44663
+ path?: never;
44664
+ cookie?: never;
44665
+ };
44666
+ /**
44667
+ * Pull tool definition (config-as-code)
44668
+ * @description Return the canonical config-as-code definition and provenance for a tool by name — the absorb-drift direction of the ensure protocol. The contentHash is recomputed from the live tool state, so it is accurate even immediately after a dashboard edit.
44669
+ */
44670
+ get: {
44671
+ parameters: {
44672
+ query: {
44673
+ name: string;
44674
+ };
44675
+ header?: never;
44676
+ path?: never;
44677
+ cookie?: never;
44678
+ };
44679
+ requestBody?: never;
44680
+ responses: {
44681
+ /** @description Canonical definition + provenance */
44682
+ 200: {
44683
+ headers: {
44684
+ [name: string]: unknown;
44685
+ };
44686
+ content: {
44687
+ "application/json": components["schemas"]["ToolPullResponse"];
44688
+ };
44689
+ };
44690
+ /** @description Unauthorized */
44691
+ 401: {
44692
+ headers: {
44693
+ [name: string]: unknown;
44694
+ };
44695
+ content: {
44696
+ "application/json": components["schemas"]["Error"];
44697
+ };
44698
+ };
44699
+ /** @description Insufficient permissions */
44700
+ 403: {
44701
+ headers: {
44702
+ [name: string]: unknown;
44703
+ };
44704
+ content: {
44705
+ "application/json": components["schemas"]["Error"];
44706
+ };
44707
+ };
44708
+ /** @description No tool with that name in the account scope */
44709
+ 404: {
44710
+ headers: {
44711
+ [name: string]: unknown;
44712
+ };
44713
+ content: {
44714
+ "application/json": components["schemas"]["Error"];
44715
+ };
44716
+ };
44717
+ /** @description Internal server error */
44718
+ 500: {
44719
+ headers: {
44720
+ [name: string]: unknown;
44721
+ };
44722
+ content: {
44723
+ "application/json": components["schemas"]["Error"];
44724
+ };
44725
+ };
44726
+ };
44727
+ };
44728
+ put?: never;
44729
+ post?: never;
44730
+ delete?: never;
44731
+ options?: never;
44732
+ head?: never;
44733
+ patch?: never;
44734
+ trace?: never;
44735
+ };
44736
+ "/v1/tools/sandbox/cf-sandbox/deploy": {
44737
+ parameters: {
44738
+ query?: never;
44739
+ header?: never;
44740
+ path?: never;
44741
+ cookie?: never;
44742
+ };
44743
+ get?: never;
44744
+ put?: never;
44745
+ /**
44746
+ * Deploy Runtype Sandbox
44747
+ * @description Deploy a live Runtype Sandbox preview. Omitted retention preserves unlimited legacy retention; explicit retention is metered and rollout-gated. Provider sleep or loss can end availability earlier.
44748
+ */
44749
+ post: {
44750
+ parameters: {
44751
+ query?: never;
44752
+ header?: never;
44753
+ path?: never;
44754
+ cookie?: never;
44755
+ };
44756
+ requestBody?: {
44757
+ content: {
44758
+ "application/json": {
44759
+ code: string;
44760
+ files?: {
44761
+ [key: string]: string;
44762
+ };
44763
+ /** @enum {string} */
44764
+ language?: "javascript" | "typescript" | "python";
44765
+ /** @enum {boolean} */
44766
+ managed?: false;
44767
+ packageJson?: string;
44768
+ port?: number;
44769
+ /** @enum {string} */
44770
+ retention?: "10m" | "1h" | "24h" | "unlimited";
44771
+ sandboxId?: string;
44772
+ sleepPolicy?: {
44773
+ /** @enum {string} */
44774
+ mode: "never";
44775
+ } | {
44776
+ /** @enum {string} */
44777
+ after: "5m" | "15m" | "30m" | "1h";
44778
+ /** @enum {string} */
44779
+ mode: "idle";
44780
+ };
44781
+ startCommand?: string;
44782
+ } & {
44783
+ [key: string]: unknown;
44784
+ };
44785
+ };
44786
+ };
44787
+ responses: {
44788
+ /** @description Sandbox deployment result */
44789
+ 200: {
44790
+ headers: {
44791
+ [name: string]: unknown;
44792
+ };
44793
+ content: {
44794
+ "application/json": {
44795
+ effectivePolicy?: {
44796
+ autoDeleteInterval?: number;
44797
+ autoStopInterval?: number;
44798
+ expiresAt: string | null;
44799
+ /** @enum {string} */
44800
+ metering: "active" | "legacy-untracked";
44801
+ /** @enum {string} */
44802
+ origin: "explicit" | "legacy-default";
44803
+ /** @enum {string} */
44804
+ retention: "10m" | "1h" | "24h" | "unlimited";
44805
+ sleepPolicy?: {
44806
+ /** @enum {string} */
44807
+ mode: "never";
44808
+ } | {
44809
+ /** @enum {string} */
44810
+ after: "5m" | "15m" | "30m" | "1h";
44811
+ /** @enum {string} */
44812
+ mode: "idle";
44813
+ };
44814
+ };
44815
+ error?: string;
44816
+ output?: string;
44817
+ previewUrl?: string;
44818
+ sandboxId: string;
44819
+ stage?: string;
44820
+ status: string;
44821
+ };
44822
+ };
44823
+ };
44824
+ /** @description Validation error */
44825
+ 400: {
44826
+ headers: {
44827
+ [name: string]: unknown;
44828
+ };
44829
+ content: {
44830
+ "application/json": components["schemas"]["Error"];
44831
+ };
44832
+ };
44833
+ /** @description Unauthorized */
44834
+ 401: {
44835
+ headers: {
44836
+ [name: string]: unknown;
44837
+ };
44838
+ content: {
44839
+ "application/json": components["schemas"]["Error"];
44840
+ };
44841
+ };
44842
+ /** @description Insufficient permissions */
44843
+ 403: {
44844
+ headers: {
44845
+ [name: string]: unknown;
44846
+ };
44847
+ content: {
44848
+ "application/json": components["schemas"]["Error"];
44849
+ };
44850
+ };
44851
+ /** @description Sandbox lifecycle enrollment conflict */
43509
44852
  409: {
43510
44853
  headers: {
43511
44854
  [name: string]: unknown;
43512
44855
  };
43513
44856
  content: {
43514
- "application/json": components["schemas"]["ToolEnsureConflict"];
43515
- };
43516
- };
43517
- /** @description Submitted contentHash does not match the server-recomputed canonical hash */
43518
- 422: {
43519
- headers: {
43520
- [name: string]: unknown;
43521
- };
43522
- content: {
43523
- "application/json": components["schemas"]["ToolEnsureHashMismatch"];
44857
+ "application/json": components["schemas"]["Error"];
43524
44858
  };
43525
44859
  };
43526
44860
  /** @description Internal server error */
@@ -43540,7 +44874,7 @@ interface paths {
43540
44874
  patch?: never;
43541
44875
  trace?: never;
43542
44876
  };
43543
- "/v1/tools/flows/{flowId}/convert-to-tool": {
44877
+ "/v1/tools/sandbox/cf-sandbox/{sandboxId}": {
43544
44878
  parameters: {
43545
44879
  query?: never;
43546
44880
  header?: never;
@@ -43549,148 +44883,33 @@ interface paths {
43549
44883
  };
43550
44884
  get?: never;
43551
44885
  put?: never;
44886
+ post?: never;
43552
44887
  /**
43553
- * Convert flow to tool
43554
- * @description Create a flow-type tool from an existing flow, generating its parameters schema from the flow steps.
44888
+ * Cleanup Runtype Sandbox
44889
+ * @description Cleanup a deployed Runtype Sandbox container.
43555
44890
  */
43556
- post: {
44891
+ delete: {
43557
44892
  parameters: {
43558
44893
  query?: never;
43559
44894
  header?: never;
43560
44895
  path: {
43561
- flowId: string;
44896
+ sandboxId: string;
43562
44897
  };
43563
44898
  cookie?: never;
43564
44899
  };
43565
- requestBody?: {
43566
- content: {
43567
- "application/json": {
43568
- [key: string]: unknown;
43569
- };
43570
- };
43571
- };
44900
+ requestBody?: never;
43572
44901
  responses: {
43573
- /** @description Created tool */
44902
+ /** @description Sandbox cleaned up */
43574
44903
  200: {
43575
44904
  headers: {
43576
44905
  [name: string]: unknown;
43577
44906
  };
43578
44907
  content: {
43579
44908
  "application/json": {
43580
- config: {
43581
- [key: string]: unknown;
43582
- } | null;
43583
- createdAt: string;
43584
- description: string | null;
43585
- id: string;
43586
- isActive: boolean;
43587
- lastModifiedSource?: string | null;
43588
- name: string;
43589
- organizationId: string | null;
43590
- parametersSchema?: {
43591
- [key: string]: unknown;
43592
- };
43593
- toolType: string;
43594
- updatedAt: string;
43595
- userId: string | null;
43596
- validation?: {
43597
- warnings: {
43598
- code: string;
43599
- column?: number;
43600
- line?: number;
43601
- message: string;
43602
- /** @enum {string} */
43603
- severity: "error" | "warning";
43604
- suggestion?: string;
43605
- }[];
43606
- };
44909
+ success: boolean;
43607
44910
  };
43608
44911
  };
43609
44912
  };
43610
- /** @description Validation error */
43611
- 400: {
43612
- headers: {
43613
- [name: string]: unknown;
43614
- };
43615
- content: {
43616
- "application/json": components["schemas"]["Error"];
43617
- };
43618
- };
43619
- /** @description Unauthorized */
43620
- 401: {
43621
- headers: {
43622
- [name: string]: unknown;
43623
- };
43624
- content: {
43625
- "application/json": components["schemas"]["Error"];
43626
- };
43627
- };
43628
- /** @description Insufficient permissions */
43629
- 403: {
43630
- headers: {
43631
- [name: string]: unknown;
43632
- };
43633
- content: {
43634
- "application/json": components["schemas"]["Error"];
43635
- };
43636
- };
43637
- /** @description Flow not found */
43638
- 404: {
43639
- headers: {
43640
- [name: string]: unknown;
43641
- };
43642
- content: {
43643
- "application/json": components["schemas"]["Error"];
43644
- };
43645
- };
43646
- /** @description Internal server error */
43647
- 500: {
43648
- headers: {
43649
- [name: string]: unknown;
43650
- };
43651
- content: {
43652
- "application/json": components["schemas"]["Error"];
43653
- };
43654
- };
43655
- };
43656
- };
43657
- delete?: never;
43658
- options?: never;
43659
- head?: never;
43660
- patch?: never;
43661
- trace?: never;
43662
- };
43663
- "/v1/tools/pull": {
43664
- parameters: {
43665
- query?: never;
43666
- header?: never;
43667
- path?: never;
43668
- cookie?: never;
43669
- };
43670
- /**
43671
- * Pull tool definition (config-as-code)
43672
- * @description Return the canonical config-as-code definition and provenance for a tool by name — the absorb-drift direction of the ensure protocol. The contentHash is recomputed from the live tool state, so it is accurate even immediately after a dashboard edit.
43673
- */
43674
- get: {
43675
- parameters: {
43676
- query: {
43677
- name: string;
43678
- };
43679
- header?: never;
43680
- path?: never;
43681
- cookie?: never;
43682
- };
43683
- requestBody?: never;
43684
- responses: {
43685
- /** @description Canonical definition + provenance */
43686
- 200: {
43687
- headers: {
43688
- [name: string]: unknown;
43689
- };
43690
- content: {
43691
- "application/json": components["schemas"]["ToolPullResponse"];
43692
- };
43693
- };
43694
44913
  /** @description Unauthorized */
43695
44914
  401: {
43696
44915
  headers: {
@@ -43709,15 +44928,6 @@ interface paths {
43709
44928
  "application/json": components["schemas"]["Error"];
43710
44929
  };
43711
44930
  };
43712
- /** @description No tool with that name in the account scope */
43713
- 404: {
43714
- headers: {
43715
- [name: string]: unknown;
43716
- };
43717
- content: {
43718
- "application/json": components["schemas"]["Error"];
43719
- };
43720
- };
43721
44931
  /** @description Internal server error */
43722
44932
  500: {
43723
44933
  headers: {
@@ -43729,15 +44939,12 @@ interface paths {
43729
44939
  };
43730
44940
  };
43731
44941
  };
43732
- put?: never;
43733
- post?: never;
43734
- delete?: never;
43735
44942
  options?: never;
43736
44943
  head?: never;
43737
44944
  patch?: never;
43738
44945
  trace?: never;
43739
44946
  };
43740
- "/v1/tools/sandbox/cf-sandbox/deploy": {
44947
+ "/v1/tools/sandbox/deploy": {
43741
44948
  parameters: {
43742
44949
  query?: never;
43743
44950
  header?: never;
@@ -43747,8 +44954,8 @@ interface paths {
43747
44954
  get?: never;
43748
44955
  put?: never;
43749
44956
  /**
43750
- * Deploy Runtype Sandbox
43751
- * @description Deploy code to a persistent Runtype Sandbox container and return a preview URL.
44957
+ * Deploy Daytona sandbox
44958
+ * @description Deploy a live Daytona preview. Retention defaults to 10m; provider sleep or deletion can end availability earlier. Preview URLs are not durable hosting.
43752
44959
  */
43753
44960
  post: {
43754
44961
  parameters: {
@@ -43760,6 +44967,35 @@ interface paths {
43760
44967
  requestBody?: {
43761
44968
  content: {
43762
44969
  "application/json": {
44970
+ autoDeleteInterval?: number;
44971
+ autoStopInterval?: number;
44972
+ code: string;
44973
+ files?: {
44974
+ [key: string]: string;
44975
+ };
44976
+ labels?: {
44977
+ [key: string]: string;
44978
+ };
44979
+ /** @enum {string} */
44980
+ language?: "javascript" | "typescript" | "python";
44981
+ /** @enum {boolean} */
44982
+ managed?: false;
44983
+ packageJson?: string;
44984
+ port?: number;
44985
+ /** @enum {string} */
44986
+ retention?: "10m" | "1h" | "24h" | "unlimited";
44987
+ sandboxId?: string;
44988
+ sleepPolicy?: {
44989
+ /** @enum {string} */
44990
+ mode: "never";
44991
+ } | {
44992
+ /** @enum {string} */
44993
+ after: "5m" | "15m" | "30m" | "1h";
44994
+ /** @enum {string} */
44995
+ mode: "idle";
44996
+ };
44997
+ startCommand?: string;
44998
+ } & {
43763
44999
  [key: string]: unknown;
43764
45000
  };
43765
45001
  };
@@ -43772,11 +45008,30 @@ interface paths {
43772
45008
  };
43773
45009
  content: {
43774
45010
  "application/json": {
45011
+ effectivePolicy?: {
45012
+ autoDeleteInterval?: number;
45013
+ autoStopInterval?: number;
45014
+ expiresAt: string | null;
45015
+ /** @enum {string} */
45016
+ metering: "active" | "legacy-untracked";
45017
+ /** @enum {string} */
45018
+ origin: "explicit" | "legacy-default";
45019
+ /** @enum {string} */
45020
+ retention: "10m" | "1h" | "24h" | "unlimited";
45021
+ sleepPolicy?: {
45022
+ /** @enum {string} */
45023
+ mode: "never";
45024
+ } | {
45025
+ /** @enum {string} */
45026
+ after: "5m" | "15m" | "30m" | "1h";
45027
+ /** @enum {string} */
45028
+ mode: "idle";
45029
+ };
45030
+ };
43775
45031
  error?: string;
43776
45032
  output?: string;
43777
45033
  previewUrl?: string;
43778
- sandboxId: string;
43779
- stage?: string;
45034
+ sandboxId?: string;
43780
45035
  status: string;
43781
45036
  };
43782
45037
  };
@@ -43808,70 +45063,8 @@ interface paths {
43808
45063
  "application/json": components["schemas"]["Error"];
43809
45064
  };
43810
45065
  };
43811
- /** @description Internal server error */
43812
- 500: {
43813
- headers: {
43814
- [name: string]: unknown;
43815
- };
43816
- content: {
43817
- "application/json": components["schemas"]["Error"];
43818
- };
43819
- };
43820
- };
43821
- };
43822
- delete?: never;
43823
- options?: never;
43824
- head?: never;
43825
- patch?: never;
43826
- trace?: never;
43827
- };
43828
- "/v1/tools/sandbox/cf-sandbox/{sandboxId}": {
43829
- parameters: {
43830
- query?: never;
43831
- header?: never;
43832
- path?: never;
43833
- cookie?: never;
43834
- };
43835
- get?: never;
43836
- put?: never;
43837
- post?: never;
43838
- /**
43839
- * Cleanup Runtype Sandbox
43840
- * @description Cleanup a deployed Runtype Sandbox container.
43841
- */
43842
- delete: {
43843
- parameters: {
43844
- query?: never;
43845
- header?: never;
43846
- path: {
43847
- sandboxId: string;
43848
- };
43849
- cookie?: never;
43850
- };
43851
- requestBody?: never;
43852
- responses: {
43853
- /** @description Sandbox cleaned up */
43854
- 200: {
43855
- headers: {
43856
- [name: string]: unknown;
43857
- };
43858
- content: {
43859
- "application/json": {
43860
- success: boolean;
43861
- };
43862
- };
43863
- };
43864
- /** @description Unauthorized */
43865
- 401: {
43866
- headers: {
43867
- [name: string]: unknown;
43868
- };
43869
- content: {
43870
- "application/json": components["schemas"]["Error"];
43871
- };
43872
- };
43873
- /** @description Insufficient permissions */
43874
- 403: {
45066
+ /** @description Sandbox not found */
45067
+ 404: {
43875
45068
  headers: {
43876
45069
  [name: string]: unknown;
43877
45070
  };
@@ -43888,85 +45081,8 @@ interface paths {
43888
45081
  "application/json": components["schemas"]["Error"];
43889
45082
  };
43890
45083
  };
43891
- };
43892
- };
43893
- options?: never;
43894
- head?: never;
43895
- patch?: never;
43896
- trace?: never;
43897
- };
43898
- "/v1/tools/sandbox/deploy": {
43899
- parameters: {
43900
- query?: never;
43901
- header?: never;
43902
- path?: never;
43903
- cookie?: never;
43904
- };
43905
- get?: never;
43906
- put?: never;
43907
- /**
43908
- * Deploy Daytona sandbox
43909
- * @description Deploy code to a persistent Daytona sandbox and return a preview URL.
43910
- */
43911
- post: {
43912
- parameters: {
43913
- query?: never;
43914
- header?: never;
43915
- path?: never;
43916
- cookie?: never;
43917
- };
43918
- requestBody?: {
43919
- content: {
43920
- "application/json": {
43921
- [key: string]: unknown;
43922
- };
43923
- };
43924
- };
43925
- responses: {
43926
- /** @description Sandbox deployment result */
43927
- 200: {
43928
- headers: {
43929
- [name: string]: unknown;
43930
- };
43931
- content: {
43932
- "application/json": {
43933
- error?: string;
43934
- output?: string;
43935
- previewUrl?: string;
43936
- sandboxId?: string;
43937
- status: string;
43938
- };
43939
- };
43940
- };
43941
- /** @description Validation error */
43942
- 400: {
43943
- headers: {
43944
- [name: string]: unknown;
43945
- };
43946
- content: {
43947
- "application/json": components["schemas"]["Error"];
43948
- };
43949
- };
43950
- /** @description Unauthorized */
43951
- 401: {
43952
- headers: {
43953
- [name: string]: unknown;
43954
- };
43955
- content: {
43956
- "application/json": components["schemas"]["Error"];
43957
- };
43958
- };
43959
- /** @description Insufficient permissions */
43960
- 403: {
43961
- headers: {
43962
- [name: string]: unknown;
43963
- };
43964
- content: {
43965
- "application/json": components["schemas"]["Error"];
43966
- };
43967
- };
43968
- /** @description Internal server error */
43969
- 500: {
45084
+ /** @description Sandbox metering unavailable */
45085
+ 503: {
43970
45086
  headers: {
43971
45087
  [name: string]: unknown;
43972
45088
  };
@@ -45503,6 +46619,14 @@ interface components {
45503
46619
  /** @enum {string} */
45504
46620
  status: "running";
45505
46621
  };
46622
+ AgentEnsureBadRequest: {
46623
+ /**
46624
+ * @description A release alias is organization-owned, so a personal-scope agent cannot carry one.
46625
+ * @enum {string}
46626
+ */
46627
+ code?: "alias_requires_organization";
46628
+ error: string;
46629
+ };
45506
46630
  AgentEnsureConflict: {
45507
46631
  /** @enum {string} */
45508
46632
  code: "external_modification" | "remote_changed";
@@ -45511,6 +46635,25 @@ interface components {
45511
46635
  lastModifiedSource?: string;
45512
46636
  modifiedAt?: string | null;
45513
46637
  };
46638
+ /** @description Atomically save this definition and activate it at a release alias. Use { alias: "live" } to deploy to production, or any name matching ^[a-z0-9][a-z0-9-]{0,62}$ for a preview pointer. A non-live alias appends a candidate version and moves that one pointer: it never writes the agent row, its config hash, its capabilities, its draft pointer or its live pointer, so onConflict and expectedRemoteHash describe writes it never performs and are rejected with a 400 alongside it. A release alias is organization-owned, so a non-live deploy on a personal-scope agent is a 400 with code alias_requires_organization. Mutually exclusive with release. */
46639
+ AgentEnsureDeployTarget: {
46640
+ alias: string;
46641
+ };
46642
+ /** @description Present when the converge carried release or deploy and the activation was applied. */
46643
+ AgentEnsureDeployment: {
46644
+ /** @description The release alias this converge aimed. */
46645
+ alias: string;
46646
+ /** @description Whether this converge moved the pointer (on a dry run, whether it would move it). */
46647
+ changed: boolean;
46648
+ /** @description The deployment receipt this converge appended. Absent when the pointer did not move. */
46649
+ receiptId?: string;
46650
+ /** @description Compare-and-swap revision of the alias, null when the alias does not exist yet. */
46651
+ revision: number | null;
46652
+ /** @description The version the alias selects as of this response (null on a dry run against an alias that does not exist yet). */
46653
+ versionId: string | null;
46654
+ /** @description Version number of that version, when known. */
46655
+ versionNumber: number | null;
46656
+ };
45514
46657
  AgentEnsureHashMismatch: {
45515
46658
  /** @enum {string} */
45516
46659
  code: "content_hash_mismatch";
@@ -45522,6 +46665,9 @@ interface components {
45522
46665
  agentId: string;
45523
46666
  /** @description Server-computed canonical content hash. Clients should echo this hash in probes. */
45524
46667
  contentHash: string;
46668
+ deployment?: components["schemas"]["AgentEnsureDeployment"];
46669
+ /** @description For a non-live deploy: the content hash the alias carried before this converge (absent when the alias is new). */
46670
+ remoteHash?: string;
45525
46671
  /** @enum {string} */
45526
46672
  result: "unchanged" | "created" | "updated";
45527
46673
  /** @description The version snapshot backing this state (null if snapshotting failed). */
@@ -45535,10 +46681,18 @@ interface components {
45535
46681
  /** @enum {string} */
45536
46682
  changes: "none" | "create" | "update";
45537
46683
  contentHash: string;
46684
+ deployment?: components["schemas"]["AgentEnsureDeployment"] & unknown;
45538
46685
  remoteHash?: string;
45539
46686
  /** @enum {string} */
45540
46687
  result: "plan";
45541
46688
  };
46689
+ AgentEnsureServerError: {
46690
+ /** @description The release alias whose activation failed. No pointer was moved. */
46691
+ alias?: string;
46692
+ /** @enum {string} */
46693
+ code?: "alias_activation_failed";
46694
+ error: string;
46695
+ };
45542
46696
  AgentPullResponse: {
45543
46697
  agentId: string;
45544
46698
  contentHash: string;
@@ -45636,16 +46790,25 @@ interface components {
45636
46790
  };
45637
46791
  sandbox?: {
45638
46792
  enabled: boolean;
45639
- /** @enum {string} */
46793
+ /**
46794
+ * @description Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled.
46795
+ * @enum {string}
46796
+ */
45640
46797
  instanceType?: "standard-1" | "standard-2" | "standard-3" | "standard-4";
45641
46798
  networkAccess?: ("none" | "essentials" | "open") | {
45642
46799
  allow?: string[];
45643
46800
  /** @enum {string} */
45644
46801
  profile?: "none" | "essentials" | "open";
45645
46802
  };
45646
- /** @enum {string} */
46803
+ /**
46804
+ * @description Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled.
46805
+ * @enum {string}
46806
+ */
45647
46807
  persistence?: "ephemeral" | "conversation" | "named";
45648
- /** @enum {string} */
46808
+ /**
46809
+ * @description Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution.
46810
+ * @enum {string}
46811
+ */
45649
46812
  provider?: "runtype-sandbox" | "daytona";
45650
46813
  secretEnv?: {
45651
46814
  [key: string]: string;
@@ -46151,6 +47314,19 @@ interface components {
46151
47314
  versionNumber: number;
46152
47315
  } | null;
46153
47316
  };
47317
+ /** @description Provenance recorded on the version row this converge appends. Omit to keep the default "sdk-ensure" label and the server-generated notes. */
47318
+ EnsureVersionMetadata: {
47319
+ /**
47320
+ * @description Short provenance label recorded on the appended version row (e.g. a git SHA or release tag). Defaults to "sdk-ensure". An empty string is treated as omitted.
47321
+ * @example a1b2c3d
47322
+ */
47323
+ label?: string;
47324
+ /**
47325
+ * @description Free-form notes recorded on the appended version row, used verbatim. Defaults to the server-generated converge summary. An empty string is treated as omitted.
47326
+ * @example Promoted from CI run 4821 (main@a1b2c3d).
47327
+ */
47328
+ notes?: string;
47329
+ };
46154
47330
  Error: {
46155
47331
  details?: {
46156
47332
  /** @description Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM). */
@@ -47091,6 +48267,25 @@ interface components {
47091
48267
  seq: number;
47092
48268
  /** @enum {string} */
47093
48269
  type: "error";
48270
+ } | {
48271
+ epoch: number;
48272
+ executionId: string;
48273
+ /** @enum {string} */
48274
+ kind: "compaction";
48275
+ /** @enum {string} */
48276
+ outcome?: "ok" | "failed" | "gap" | "skipped";
48277
+ /** @enum {string} */
48278
+ phase: "start" | "complete";
48279
+ /** @enum {string} */
48280
+ reason: "threshold" | "overflow" | "manual" | "surface_policy" | "provider_mismatch";
48281
+ seq: number;
48282
+ /** @enum {string} */
48283
+ strategy: "provider_native" | "summary";
48284
+ tier: number;
48285
+ tokensAfter?: number;
48286
+ tokensBefore?: number;
48287
+ /** @enum {string} */
48288
+ type: "context_notice";
47094
48289
  } | {
47095
48290
  executionId: string;
47096
48291
  seq: number;
@@ -49842,6 +51037,22 @@ interface ExecuteToolResponse {
49842
51037
  errorMessage?: string;
49843
51038
  executionTimeMs: number;
49844
51039
  }
51040
+ type SandboxDeployRetention = '10m' | '1h' | '24h' | 'unlimited';
51041
+ type SandboxDeploySleepPolicy = {
51042
+ mode: 'never';
51043
+ } | {
51044
+ mode: 'idle';
51045
+ after: '5m' | '15m' | '30m' | '1h';
51046
+ };
51047
+ interface SandboxDeployEffectivePolicy {
51048
+ retention: SandboxDeployRetention;
51049
+ origin: 'explicit' | 'legacy-default';
51050
+ expiresAt: string | null;
51051
+ metering: 'active' | 'legacy-untracked';
51052
+ sleepPolicy?: SandboxDeploySleepPolicy;
51053
+ autoStopInterval?: number;
51054
+ autoDeleteInterval?: number;
51055
+ }
49845
51056
  interface DeploySandboxRequest {
49846
51057
  code: string;
49847
51058
  packageJson?: string;
@@ -49856,6 +51067,10 @@ interface DeploySandboxRequest {
49856
51067
  autoStopInterval?: number;
49857
51068
  /** Auto-delete interval in minutes (Daytona); 0 deletes immediately on stop. Disabled when omitted. */
49858
51069
  autoDeleteInterval?: number;
51070
+ /** Runtype destruction backstop; defaults to 10m independently of provider autostop. */
51071
+ retention?: SandboxDeployRetention;
51072
+ /** Cannot be combined with autoStopInterval. Does not extend retention. */
51073
+ sleepPolicy?: SandboxDeploySleepPolicy;
49859
51074
  }
49860
51075
  interface DeploySandboxResponse {
49861
51076
  sandboxId: string;
@@ -49863,6 +51078,7 @@ interface DeploySandboxResponse {
49863
51078
  output: string;
49864
51079
  status: 'running' | 'error';
49865
51080
  error?: string;
51081
+ effectivePolicy?: SandboxDeployEffectivePolicy;
49866
51082
  }
49867
51083
  interface DeployCfSandboxRequest {
49868
51084
  code: string;
@@ -49872,6 +51088,10 @@ interface DeployCfSandboxRequest {
49872
51088
  sandboxId?: string;
49873
51089
  startCommand?: string;
49874
51090
  files?: Record<string, string>;
51091
+ /** Omission preserves unlimited legacy retention. Explicit policy requires lifecycle rollout enablement. */
51092
+ retention?: SandboxDeployRetention;
51093
+ /** Legacy Runtype Sandbox supports idle sleep only; continuous keepAlive is unavailable. */
51094
+ sleepPolicy?: SandboxDeploySleepPolicy;
49875
51095
  }
49876
51096
  interface DeployCfSandboxResponse {
49877
51097
  sandboxId: string;
@@ -49880,6 +51100,7 @@ interface DeployCfSandboxResponse {
49880
51100
  status: 'running' | 'error';
49881
51101
  stage?: 'validate_port' | 'validate_files' | 'write_package_json' | 'npm_install' | 'write_main_file' | 'write_additional_files' | 'start_process' | 'expose_port';
49882
51102
  error?: string;
51103
+ effectivePolicy?: SandboxDeployEffectivePolicy;
49883
51104
  }
49884
51105
  interface ModelUsageQueryParams {
49885
51106
  startDate?: string;
@@ -50515,6 +51736,164 @@ interface BillingSpendAnalyticsParams {
50515
51736
  */
50516
51737
  period?: 'billing_period' | 'current_month' | 'last_7_days' | 'last_30_days' | 'last_90_days';
50517
51738
  }
51739
+ interface ProductionHealthQuery {
51740
+ /** Length of the reporting window in days (1-90). Defaults to 7. */
51741
+ days?: number;
51742
+ }
51743
+ /**
51744
+ * A metric beside its comparison value: the preceding period of equal length,
51745
+ * unless the field says otherwise. `null` means "not computable", never
51746
+ * "zero".
51747
+ *
51748
+ * These metrics are read from run ledgers that record one row per run. No row
51749
+ * exists for a run that finished before those ledgers were deployed and none
51750
+ * can be reconstructed, so `previous` is empty rather than wrong until the
51751
+ * preceding period is entirely made up of ledger-era runs.
51752
+ */
51753
+ interface MetricDelta {
51754
+ value: number | null;
51755
+ previous: number | null;
51756
+ }
51757
+ /**
51758
+ * Run counts for one population. `successes + failures + unsettled` equals
51759
+ * `current`; the success rate divides `successes` by the settled runs only, so
51760
+ * `failures` must be read rather than derived as `current - successes`.
51761
+ */
51762
+ interface ExecutionCounts {
51763
+ /** Runs that started inside the current period. */
51764
+ current: number;
51765
+ /** Runs that started inside the preceding period of equal length. */
51766
+ previous: number;
51767
+ /** Current-period runs that finished successfully. */
51768
+ successes: number;
51769
+ /** Current-period runs that ended in an error or lost their stream. */
51770
+ failures: number;
51771
+ /**
51772
+ * Current-period runs with no verdict: still running, paused waiting on an
51773
+ * approval or a client tool, or cancelled by the caller. They are inside
51774
+ * `current` because they happened, and outside the success rate entirely.
51775
+ */
51776
+ unsettled: number;
51777
+ }
51778
+ interface HealthInsight {
51779
+ id: string;
51780
+ severity: 'critical' | 'warning' | 'info';
51781
+ title: string;
51782
+ detail: string;
51783
+ href?: string;
51784
+ }
51785
+ interface ProductionHealthResponse {
51786
+ /** Daily intervals anchored to period.start, counting root runs once. */
51787
+ activity?: Array<{
51788
+ date: string;
51789
+ agents: number;
51790
+ flows: number;
51791
+ unclassified: number;
51792
+ }>;
51793
+ period: {
51794
+ days: number;
51795
+ start: string;
51796
+ end: string;
51797
+ previousStart: string;
51798
+ };
51799
+ /**
51800
+ * Run totals across BOTH populations, one row per run whatever it did.
51801
+ * `agents` is broken out first: an agent turn drives a flow internally, so
51802
+ * before this split the same run was counted on the headline and again on
51803
+ * the agents line. Every field is agents plus flows plus unclassified history.
51804
+ *
51805
+ * The two halves come from different tables because neither is complete on
51806
+ * its own. Agent counts come from `agent_executions`, which is the only
51807
+ * record of an agent the customer hosts themselves (reported over
51808
+ * OpenTelemetry, or proxied over HTTP) since no Runtype runtime ran it. Flow
51809
+ * counts come from `flow_executions` rows that no agent drove.
51810
+ */
51811
+ executions: ExecutionCounts & {
51812
+ /** Agent runs. Includes agents running outside Runtype. */
51813
+ agents: ExecutionCounts;
51814
+ /** Flow runs. */
51815
+ flows: ExecutionCounts;
51816
+ unclassified: ExecutionCounts;
51817
+ };
51818
+ /**
51819
+ * Successful runs over SETTLED runs. Runs still open, paused mid-run, or
51820
+ * cancelled are outside both halves of this division rather than counted as
51821
+ * either outcome. Null when nothing in the period settled.
51822
+ */
51823
+ successRate: MetricDelta;
51824
+ /**
51825
+ * 95th percentile of a run's wall clock, start to finish: context steps,
51826
+ * tool-call steps and queueing included. Measured over settled runs only, so
51827
+ * a run that is still open or still paused contributes nothing. A run that
51828
+ * paused for an approval or a client tool and then resumed carries that wait
51829
+ * inside its wall clock, because the caller waited for it too. Null when no
51830
+ * settled run in the period recorded a duration.
51831
+ */
51832
+ p95LatencyMs: MetricDelta;
51833
+ /**
51834
+ * Model cost including retries, compaction, fallback and descendants, divided
51835
+ * by successful runs. Null when any run has incomplete model accounting.
51836
+ * Estimated execution cost excludes billing margin and is not billed spend.
51837
+ */
51838
+ modelCostPerSuccess: MetricDelta;
51839
+ /** Estimated model cost across every run in the window, failed runs included. Same caveats. */
51840
+ totalModelCost: MetricDelta;
51841
+ costs: Record<'model' | 'tool' | 'total', MetricDelta & {
51842
+ knownValue: number;
51843
+ knownPrevious: number;
51844
+ incompleteRuns: number;
51845
+ previousIncompleteRuns: number;
51846
+ }>;
51847
+ /**
51848
+ * Share of runs where at least one attempt routed to a fallback model instead
51849
+ * of the configured one, over every run in the period. Null when any run has
51850
+ * incomplete model accounting.
51851
+ */
51852
+ fallbackShare: MetricDelta;
51853
+ /**
51854
+ * Eval pass rates. `value` and `previous` are the latest scored run and the previous scored run
51855
+ * in the same suite, compared run over run rather than period over
51856
+ * period, so either may predate the window.
51857
+ */
51858
+ evals: MetricDelta & {
51859
+ suiteId: string | null;
51860
+ suiteName: string | null;
51861
+ /** When the most recent eval run of any kind was created; null if none has ever run. */
51862
+ lastRunAt: string | null;
51863
+ /**
51864
+ * When the run behind `value` was created; null while nothing has ever
51865
+ * scored. This is older than `lastRunAt` whenever the newest run is still
51866
+ * processing, cancelled, failed, or graded nothing, so it is the only
51867
+ * timestamp a pass rate may be presented beside. Pairing `value` with
51868
+ * `lastRunAt` attributes a rate to a run that did not produce it.
51869
+ */
51870
+ lastScoredRunAt: string | null;
51871
+ /**
51872
+ * Whether `lastRunAt` falls inside the current period. Any eval run counts,
51873
+ * including one still processing, cancelled, failed, or with no graders, so
51874
+ * this can be true while `value` is null (nothing scored yet) and false
51875
+ * while `value` is set (the last run that scored predates the window).
51876
+ */
51877
+ ranInPeriod: boolean;
51878
+ };
51879
+ agents: {
51880
+ /**
51881
+ * Share of agent runs that stopped because they hit the turn ceiling.
51882
+ * Agent run counts live on `executions.agents`, not here.
51883
+ */
51884
+ maxTurnsShare: MetricDelta;
51885
+ };
51886
+ surfaces: Array<{
51887
+ /** Surface the agent executions were attributed to; rows with no surface type are grouped as `unknown`. */
51888
+ surfaceType: string;
51889
+ /** Agent executions on this surface in the current period. Counts agent runs only, not flow runs. */
51890
+ executions: number;
51891
+ /** Share of those agent executions that completed. */
51892
+ successRate: number | null;
51893
+ }>;
51894
+ insights: HealthInsight[];
51895
+ generatedAt: string;
51896
+ }
50518
51897
 
50519
51898
  /**
50520
51899
  * Per-grader severity (mirror of `@runtypelabs/shared`'s `GraderSeverity`). A
@@ -51145,6 +52524,12 @@ interface EnsureFlowOptions {
51145
52524
  * the remote still hashes to this value (409 remote_changed otherwise).
51146
52525
  */
51147
52526
  expectedRemoteHash?: string;
52527
+ /**
52528
+ * Provenance stamped on the version row this converge appends (a git SHA, a
52529
+ * release tag). Omit to keep the default 'sdk-ensure' label and the
52530
+ * server-generated notes.
52531
+ */
52532
+ version?: components['schemas']['EnsureVersionMetadata'];
51148
52533
  /** Implies dryRun; throws FlowDriftError unless the plan is 'none'. */
51149
52534
  expectNoChanges?: boolean;
51150
52535
  }
@@ -53247,6 +54632,12 @@ interface EnsureAgentOptions {
53247
54632
  * the remote still hashes to this value (409 remote_changed otherwise).
53248
54633
  */
53249
54634
  expectedRemoteHash?: string;
54635
+ /**
54636
+ * Provenance stamped on the version row this converge appends (a git SHA, a
54637
+ * release tag). Omit to keep the default 'sdk-ensure' label and the
54638
+ * server-generated notes.
54639
+ */
54640
+ version?: components['schemas']['EnsureVersionMetadata'];
53250
54641
  /** Implies dryRun; throws AgentDriftError unless the plan is 'none'. */
53251
54642
  expectNoChanges?: boolean;
53252
54643
  }
@@ -53879,6 +55270,97 @@ declare class SurfacesNamespace {
53879
55270
  pull(productId: string, name: string): Promise<SurfacePullResult>;
53880
55271
  }
53881
55272
 
55273
+ /**
55274
+ * Transparent reconnect for a DETACHED agent stream (ADR 0020 point 6;
55275
+ * blueprint `2026-08-25-durable-by-default-agent-turns.md` §4).
55276
+ *
55277
+ * ## What the server does
55278
+ *
55279
+ * A durable agent turn runs inside a Durable Object, and the socket it streams
55280
+ * over carries a WATCH LEASE (10 minutes by default), not the turn's lifetime.
55281
+ * When the lease expires the server emits a unified `await` frame with
55282
+ * `awaitReason: 'detached'` and CLOSES the stream — the execution keeps running
55283
+ * server-side. Detach is part of the public contract, not an error:
55284
+ *
55285
+ * id: 118
55286
+ * event: await
55287
+ * data: {"type":"await","awaitReason":"detached","executionId":"aex_…",…}
55288
+ *
55289
+ * Raw-HTTP consumers get documented behavior. The SDKs are expected to follow
55290
+ * it, which is what this module does: it reopens the turn through the events
55291
+ * route with `?after=<last SSE id>` and keeps yielding frames until a real
55292
+ * terminal arrives.
55293
+ *
55294
+ * ## Why it wraps the stream rather than the callbacks
55295
+ *
55296
+ * `executeStream` is the single place every consumer goes through
55297
+ * (`executeWithCallbacks` and the local-tool loop both build on it), so
55298
+ * wrapping the `Response` body makes reconnect transparent for all of them at
55299
+ * once — and for a caller reading the raw stream by hand.
55300
+ *
55301
+ * Bytes are forwarded VERBATIM. This is not a re-encoder: it parses complete
55302
+ * SSE blocks only to observe three things (the last `id:`, the executionId, and
55303
+ * whether a terminal or a detach frame went by), and passes the original text
55304
+ * straight through. That matters because the `id:` line IS the relay cursor —
55305
+ * re-stamping it would break the very reconnect this exists to perform.
55306
+ *
55307
+ * ## Cursor and duplicate-freedom
55308
+ *
55309
+ * The server replays strictly AFTER the cursor, so a reconnect produces no
55310
+ * duplicates. A cursor that is malformed or lost fails OPEN to a replay from
55311
+ * the start of the turn, which is why the last-seen `id:` is tracked as the
55312
+ * raw string rather than being parsed into a number here.
55313
+ *
55314
+ * ## The detach frame is not swallowed
55315
+ *
55316
+ * It is forwarded like any other frame. The wire vocabulary is unchanged, so a
55317
+ * consumer that renders `await` states keeps rendering this one; the difference
55318
+ * is only that the stream no longer ENDS there.
55319
+ *
55320
+ * The Python SDK mirrors this behavior — a follow-up, tracked with the rest of
55321
+ * the SDK work in the blueprint's §4 slice 2.
55322
+ */
55323
+ /**
55324
+ * How many times a single logical turn may be re-opened. A detached turn is
55325
+ * bounded by its absolute budget (30 minutes by default, 24 hours at most) and
55326
+ * each leg covers a full watch lease, so this is a safety stop against a server
55327
+ * that detaches immediately and repeatedly — not a normal-path limit.
55328
+ */
55329
+ declare const DEFAULT_MAX_DETACHED_RECONNECTS = 12;
55330
+ interface DetachedReconnectOptions {
55331
+ /**
55332
+ * Turn transparent reconnect OFF and hand back the raw stream, ending at the
55333
+ * detach frame. The documented escape hatch: a caller that wants to own the
55334
+ * reconnect (its own backoff, its own cursor storage, a handoff to another
55335
+ * process) sets this and drives the events route itself.
55336
+ */
55337
+ autoReconnect?: boolean;
55338
+ /** Safety stop; see {@link DEFAULT_MAX_DETACHED_RECONNECTS}. */
55339
+ maxReconnects?: number;
55340
+ /** Milliseconds to wait before each reconnect attempt. */
55341
+ reconnectDelayMs?: number;
55342
+ }
55343
+ /**
55344
+ * Link a caller's cancellation to the reconnect wrapper's own signal.
55345
+ *
55346
+ * Cancelling the wrapped stream must abort a reattach request that is already
55347
+ * opening, so a reattach honors BOTH signals rather than only the caller's.
55348
+ */
55349
+ declare function combineAbortSignals(...signals: Array<AbortSignal | undefined>): AbortSignal | undefined;
55350
+ /** Open the next leg of a detached turn. Returns `null` when it cannot. */
55351
+ type DetachedReattach = (args: {
55352
+ executionId: string;
55353
+ after: string;
55354
+ signal?: AbortSignal;
55355
+ }) => Promise<Response | null>;
55356
+ /**
55357
+ * Wrap a durable-turn SSE `Response` so a detach transparently continues.
55358
+ *
55359
+ * A non-streaming or failed response is returned untouched — there is nothing
55360
+ * to follow, and swallowing it here would hide the error from the caller.
55361
+ */
55362
+ declare function withDetachedReconnect(response: Response, reattach: DetachedReattach, options?: DetachedReconnectOptions): Response;
55363
+
53882
55364
  interface RuntypeConfig {
53883
55365
  /** API key for authentication */
53884
55366
  apiKey?: string;
@@ -53935,8 +55417,14 @@ declare class RuntypeClient$1 {
53935
55417
  * (`RuntypeFlowBuilder`), so it normalizes the request to the canonical
53936
55418
  * `/v1/dispatch` wire contract here — every builder path inherits the same
53937
55419
  * normalization the `DispatchEndpoint` applies, with no per-builder call.
55420
+ *
55421
+ * A dispatched agent turn runs on the durable lane, so the stream follows a
55422
+ * detach through {@link executionEvents}; pass `autoReconnect: false` to own
55423
+ * the reconnect yourself.
53938
55424
  */
53939
- dispatch(config: unknown): Promise<Response>;
55425
+ dispatch(config: unknown, init?: {
55426
+ signal?: AbortSignal;
55427
+ } & DetachedReconnectOptions): Promise<Response>;
53940
55428
  /**
53941
55429
  * Dispatch flow execution (non-streaming JSON).
53942
55430
  *
@@ -53948,6 +55436,26 @@ declare class RuntypeClient$1 {
53948
55436
  /** Start a normalized dispatch and return a durable handle immediately. */
53949
55437
  dispatchAsync(config: unknown): Promise<AsyncExecutionHandle>;
53950
55438
  getExecutionStatus(executionId: string): Promise<AsyncExecutionStatus>;
55439
+ /**
55440
+ * Rejoin a durable execution's Server-Sent Events by execution id.
55441
+ *
55442
+ * The execution-scoped alias of the agent events route, so a turn started
55443
+ * through `/v1/dispatch` reconnects without knowing which agent served it.
55444
+ * Pass the last SSE `id:` the stream delivered as `after` to replay strictly
55445
+ * past that cursor and then live-tail while the run is still going. This is
55446
+ * the same leg a detached dispatch stream follows on its own, exposed for a
55447
+ * caller that stores the cursor and reattaches later or from elsewhere.
55448
+ *
55449
+ * @example
55450
+ * ```typescript
55451
+ * const events = await client.executionEvents('aex_123', { after: '118' })
55452
+ * ```
55453
+ */
55454
+ executionEvents(executionId: string, opts?: {
55455
+ after?: string;
55456
+ conversationId?: string;
55457
+ signal?: AbortSignal;
55458
+ }): Promise<Response>;
53951
55459
  /**
53952
55460
  * Build full URL with query parameters
53953
55461
  */
@@ -54250,90 +55758,6 @@ declare class Runtype {
54250
55758
  static get surfaces(): SurfacesNamespace;
54251
55759
  }
54252
55760
 
54253
- /**
54254
- * Transparent reconnect for a DETACHED agent stream (ADR 0020 point 6;
54255
- * blueprint `2026-08-25-durable-by-default-agent-turns.md` §4).
54256
- *
54257
- * ## What the server does
54258
- *
54259
- * A durable agent turn runs inside a Durable Object, and the socket it streams
54260
- * over carries a WATCH LEASE (10 minutes by default), not the turn's lifetime.
54261
- * When the lease expires the server emits a unified `await` frame with
54262
- * `awaitReason: 'detached'` and CLOSES the stream — the execution keeps running
54263
- * server-side. Detach is part of the public contract, not an error:
54264
- *
54265
- * id: 118
54266
- * event: await
54267
- * data: {"type":"await","awaitReason":"detached","executionId":"aex_…",…}
54268
- *
54269
- * Raw-HTTP consumers get documented behavior. The SDKs are expected to follow
54270
- * it, which is what this module does: it reopens the turn through the events
54271
- * route with `?after=<last SSE id>` and keeps yielding frames until a real
54272
- * terminal arrives.
54273
- *
54274
- * ## Why it wraps the stream rather than the callbacks
54275
- *
54276
- * `executeStream` is the single place every consumer goes through
54277
- * (`executeWithCallbacks` and the local-tool loop both build on it), so
54278
- * wrapping the `Response` body makes reconnect transparent for all of them at
54279
- * once — and for a caller reading the raw stream by hand.
54280
- *
54281
- * Bytes are forwarded VERBATIM. This is not a re-encoder: it parses complete
54282
- * SSE blocks only to observe three things (the last `id:`, the executionId, and
54283
- * whether a terminal or a detach frame went by), and passes the original text
54284
- * straight through. That matters because the `id:` line IS the relay cursor —
54285
- * re-stamping it would break the very reconnect this exists to perform.
54286
- *
54287
- * ## Cursor and duplicate-freedom
54288
- *
54289
- * The server replays strictly AFTER the cursor, so a reconnect produces no
54290
- * duplicates. A cursor that is malformed or lost fails OPEN to a replay from
54291
- * the start of the turn, which is why the last-seen `id:` is tracked as the
54292
- * raw string rather than being parsed into a number here.
54293
- *
54294
- * ## The detach frame is not swallowed
54295
- *
54296
- * It is forwarded like any other frame. The wire vocabulary is unchanged, so a
54297
- * consumer that renders `await` states keeps rendering this one; the difference
54298
- * is only that the stream no longer ENDS there.
54299
- *
54300
- * The Python SDK mirrors this behavior — a follow-up, tracked with the rest of
54301
- * the SDK work in the blueprint's §4 slice 2.
54302
- */
54303
- /**
54304
- * How many times a single logical turn may be re-opened. A detached turn is
54305
- * bounded by its absolute budget (30 minutes by default, 24 hours at most) and
54306
- * each leg covers a full watch lease, so this is a safety stop against a server
54307
- * that detaches immediately and repeatedly — not a normal-path limit.
54308
- */
54309
- declare const DEFAULT_MAX_DETACHED_RECONNECTS = 12;
54310
- interface DetachedReconnectOptions {
54311
- /**
54312
- * Turn transparent reconnect OFF and hand back the raw stream, ending at the
54313
- * detach frame. The documented escape hatch: a caller that wants to own the
54314
- * reconnect (its own backoff, its own cursor storage, a handoff to another
54315
- * process) sets this and drives the events route itself.
54316
- */
54317
- autoReconnect?: boolean;
54318
- /** Safety stop; see {@link DEFAULT_MAX_DETACHED_RECONNECTS}. */
54319
- maxReconnects?: number;
54320
- /** Milliseconds to wait before each reconnect attempt. */
54321
- reconnectDelayMs?: number;
54322
- }
54323
- /** Open the next leg of a detached turn. Returns `null` when it cannot. */
54324
- type DetachedReattach = (args: {
54325
- executionId: string;
54326
- after: string;
54327
- signal?: AbortSignal;
54328
- }) => Promise<Response | null>;
54329
- /**
54330
- * Wrap a durable-turn SSE `Response` so a detach transparently continues.
54331
- *
54332
- * A non-streaming or failed response is returned untouched — there is nothing
54333
- * to follow, and swallowing it here would hide the error from the caller.
54334
- */
54335
- declare function withDetachedReconnect(response: Response, reattach: DetachedReattach, options?: DetachedReconnectOptions): Response;
54336
-
54337
55761
  /**
54338
55762
  * Agent API key request types.
54339
55763
  *
@@ -54936,6 +56360,20 @@ interface ApiClient {
54936
56360
  postBinary<T>(path: string, body: Uint8Array, contentType: string): Promise<T>;
54937
56361
  requestStream(path: string, options?: RequestInit): Promise<Response>;
54938
56362
  }
56363
+ /**
56364
+ * Path of the execution-scoped events alias,
56365
+ * `GET /v1/executions/{executionId}/events`.
56366
+ *
56367
+ * The reconnect leg a dispatch-started durable turn rejoins through: it names
56368
+ * no agent, because the alias resolves the agent from the execution's own
56369
+ * persisted record. Single-sourced here so the transparent reattach inside
56370
+ * `DispatchEndpoint.executeStream` and the explicit `executionEvents` method on
56371
+ * the client build the same URL, cursor and session key included.
56372
+ */
56373
+ declare function buildExecutionEventsPath(executionId: string, query?: {
56374
+ after?: string;
56375
+ conversationId?: string;
56376
+ }): string;
54939
56377
  /**
54940
56378
  * Flows endpoint handlers
54941
56379
  */
@@ -55503,8 +56941,23 @@ declare class DispatchEndpoint {
55503
56941
  executeAsync(data: DispatchRequest): Promise<AsyncExecutionHandle>;
55504
56942
  /**
55505
56943
  * Dispatch with streaming response
56944
+ *
56945
+ * A dispatched agent turn runs on the durable lane, so its socket can close
56946
+ * with `await` / `awaitReason: 'detached'` while the run continues. The
56947
+ * stream follows that detach through the execution-scoped events alias;
56948
+ * `autoReconnect: false` hands back the raw stream instead.
56949
+ */
56950
+ executeStream(data: DispatchRequest, init?: {
56951
+ signal?: AbortSignal;
56952
+ } & DetachedReconnectOptions): Promise<Response>;
56953
+ /**
56954
+ * The `?after=` reattach leg a detached dispatch stream is followed with.
56955
+ *
56956
+ * Unlike an agent execute, a dispatch knows no agent id at the call site, so
56957
+ * it rejoins by execution id alone through the execution-scoped alias. The
56958
+ * cursor is the last SSE `id:` the stream delivered, forwarded verbatim.
55506
56959
  */
55507
- executeStream(data: DispatchRequest): Promise<Response>;
56960
+ private buildDetachedReattach;
55508
56961
  /**
55509
56962
  * Resume paused flow execution
55510
56963
  * Uses buffered JSON when streamResponse is omitted.
@@ -55615,6 +57068,12 @@ declare class AnalyticsEndpoint {
55615
57068
  * Get execution and platform-spend usage grouped by projected product end user.
55616
57069
  */
55617
57070
  getEndUserUsage(params: EndUserUsageQuery): Promise<EndUserUsageResponse>;
57071
+ /**
57072
+ * Get reliability, latency, unit economics, and eval health for the current
57073
+ * period against the preceding period of equal length, plus a derived feed of
57074
+ * notable changes.
57075
+ */
57076
+ getProductionHealth(params?: ProductionHealthQuery): Promise<ProductionHealthResponse>;
55618
57077
  }
55619
57078
  /**
55620
57079
  * Flow Steps endpoint handlers
@@ -55757,7 +57216,7 @@ declare class ToolsEndpoint {
55757
57216
  */
55758
57217
  getBuiltInToolSchema(toolId: string): Promise<BuiltInTool>;
55759
57218
  /**
55760
- * Deploy code to a persistent Daytona sandbox and get a preview URL
57219
+ * Deploy a Daytona preview; retention defaults to ten minutes and the URL is not durable hosting.
55761
57220
  */
55762
57221
  deploySandbox(data: DeploySandboxRequest): Promise<DeploySandboxResponse>;
55763
57222
  /**
@@ -55765,7 +57224,7 @@ declare class ToolsEndpoint {
55765
57224
  */
55766
57225
  cleanupSandbox(sandboxId: string): Promise<void>;
55767
57226
  /**
55768
- * Deploy code to a persistent Cloudflare Sandbox container and get a preview URL
57227
+ * Deploy a Runtype Sandbox preview; omitted retention preserves the legacy unlimited backstop.
55769
57228
  */
55770
57229
  deployCfSandbox(data: DeployCfSandboxRequest): Promise<DeployCfSandboxResponse>;
55771
57230
  /**
@@ -56586,6 +58045,16 @@ interface AgentExecuteRequest {
56586
58045
  * Mirrors `DispatchRequest.options.cache`.
56587
58046
  */
56588
58047
  cache?: boolean;
58048
+ /**
58049
+ * Per-request durability override. `forced` pins this turn's lane and outranks the saved
58050
+ * agent's `config.durability` pin; `watchLeaseMs` bounds only the single attached socket,
58051
+ * after which the watcher detaches and the turn keeps running. Durability does not imply
58052
+ * async: `Prefer: respond-async` stays a separate choice. Mirrors `DispatchRequest.agent.durability`.
58053
+ */
58054
+ durability?: {
58055
+ forced?: 'durable' | 'in_process';
58056
+ watchLeaseMs?: number;
58057
+ };
56589
58058
  }
56590
58059
  /**
56591
58060
  * Agent execute response (non-streaming)
@@ -59326,4 +60795,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
59326
60795
  declare function getDefaultPlanPath(taskName: string): string;
59327
60796
  declare function sanitizeTaskSlug(taskName: string): string;
59328
60797
 
59329
- export { type AIGrader, type Agent, type AgentAdmissionOptions, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, type AgentElicitation, type AgentElicitationRequest, 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, type ApiKeyRequest, type ApiKeyRequestDelivery, type ApiKeyRequestEnvironment, type ApiKeyRequestHandoff, type ApiKeyRequestListParams, type ApiKeyRequestRequester, type ApiKeyRequestStatus, ApiKeyRequestsEndpoint, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AssetReferenceContentPart, type AsyncExecutionHandle, type AsyncExecutionStatus, 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 BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CanonicalDispatchMessageContent, type CanonicalDispatchRequest, type CaseExpected, type CatalogClientToolRef, ChatEndpoint, type CheckGrader, type ClaimApiKeyRequestInput, type ClaimApiKeyRequestResponse, type ClaudeManagedEvalOverrideValues, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientToolEntry, type ClientWidgetTheme, type CollectionMeta, CollectionsEndpoint, 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 CreateApiKeyRequestInput, type CreateApiKeyRequestResponse, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateCollectionRequest, type CreateConversationRequest, type CreateEvalSuiteInput, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CurrentBilledSpendResponse, type CurrentBilledSpendSource, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_MAX_DETACHED_RECONNECTS, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DecomposeCriteriaResult, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DetachedReattach, type DetachedReconnectOptions, type DiscoveredModel, type DispatchAgentInput, type DispatchApprovalContinuationResponse, type DispatchApproveRequest, type DispatchApproveResponse, type DispatchClient, type DispatchContinuationRequest, type DispatchContinuationResponse, type DispatchDetachedApprovalResponse, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchFlowInput, type DispatchMessageContent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type DispatchResponse, type DispatchResumeRequest, type DispatchResumeResponse, type EndUserUsageQuery, type EndUserUsageResponse, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, 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 EvalCaseDefinition, type EvalCaseInput, type EvalCaseProposal, type EvalCaseProposalAccepted, type EvalCaseProposalListResult, type EvalCasesGenerated, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalOverrideValues, type EvalProposalSource, type EvalProposalStatus, type EvalProposedCase, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunCaseScores, type EvalRunConfig, type EvalRunScores, EvalRunner, type EvalStatus, type EvalSuiteCase, type EvalSuiteCaseInput, type EvalSuiteCoverage, type EvalSuiteDetail, type EvalSuiteLatestRun, type EvalSuiteListResult, type EvalSuiteRunQueued, type EvalSuiteRunResult, type EvalSuiteSummary, EvalSuitesNamespace, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, ExecutionsEndpoint, ExecutionsNamespace, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, 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 FlowInlineEvalInput, 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 GenerateEvalCasesInput, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GetApiKeyRequestResponse, type GetRecordStepConfig$1 as GetRecordStepConfig, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type HumanVerdict, type ImageContentPart, type InferCollectionSchemaResponse, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListCollectionsResponse, type ListConversationsResponse, type ListParams, type ListRecordsStepConfig$1 as ListRecordsStepConfig, 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 LoopStepConfig$1 as LoopStepConfig, 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 PersistedGraderOutcome, 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 RecordCollection, type RecordCollectionWithHistory, type RecordCollections, 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 RunEvalCaseResult, type RunEvalInput, type RunEvalResult, 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 FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type GetRecordStepConfig as RuntypeGetRecordStepConfig, type ListRecordsStepConfig as RuntypeListRecordsStepConfig, type LoopStepConfig as RuntypeLoopStepConfig, 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 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 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 SelectOrganizationProviderCredentialRequest, type SelectOrganizationProviderCredentialResponse, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, 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 SlackAppStatusResponse, type SlackInstallRequest, type SlackManifestRequest, type SlackManifestResponse, type SlackOAuthStartRequest, type SlackOAuthStartResponse, 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 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, type TypedCreateRecordRequest, type TypedRecordListItem, type TypedRecordWriteResponse, TypedRecordsScope, type TypedRuntypeRecord, UNIFIED_EVENTS_QUERY, type UpdateClientTokenRequest, type UpdateCollectionRequest, type UpdateCollectionResponse, type UpdateConversationRequest, type UpdateEvalCaseInput, type UpdateEvalSuiteInput, type UpdateFlowRequest, 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 ValidateExistingRecordsResponse, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionPublishOptions, 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, buildAgentAdmissionHeaders, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildObservationMaskMarker, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isCatalogClientToolRef, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withDetachedReconnect, withUnifiedEvents };
60798
+ export { type AIGrader, type Agent, type AgentAdmissionOptions, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, type AgentElicitation, type AgentElicitationRequest, 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, type ApiKeyRequest, type ApiKeyRequestDelivery, type ApiKeyRequestEnvironment, type ApiKeyRequestHandoff, type ApiKeyRequestListParams, type ApiKeyRequestRequester, type ApiKeyRequestStatus, ApiKeyRequestsEndpoint, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AssetReferenceContentPart, type AsyncExecutionHandle, type AsyncExecutionStatus, 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 BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CanonicalDispatchMessageContent, type CanonicalDispatchRequest, type CaseExpected, type CatalogClientToolRef, ChatEndpoint, type CheckGrader, type ClaimApiKeyRequestInput, type ClaimApiKeyRequestResponse, type ClaudeManagedEvalOverrideValues, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientToolEntry, type ClientWidgetTheme, type CollectionMeta, CollectionsEndpoint, 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 CreateApiKeyRequestInput, type CreateApiKeyRequestResponse, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateCollectionRequest, type CreateConversationRequest, type CreateEvalSuiteInput, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CurrentBilledSpendResponse, type CurrentBilledSpendSource, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_MAX_DETACHED_RECONNECTS, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DecomposeCriteriaResult, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DetachedReattach, type DetachedReconnectOptions, type DiscoveredModel, type DispatchAgentInput, type DispatchApprovalContinuationResponse, type DispatchApproveRequest, type DispatchApproveResponse, type DispatchClient, type DispatchContinuationRequest, type DispatchContinuationResponse, type DispatchDetachedApprovalResponse, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchFlowInput, type DispatchMessageContent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type DispatchResponse, type DispatchResumeRequest, type DispatchResumeResponse, type EndUserUsageQuery, type EndUserUsageResponse, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, 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 EvalCaseDefinition, type EvalCaseInput, type EvalCaseProposal, type EvalCaseProposalAccepted, type EvalCaseProposalListResult, type EvalCasesGenerated, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalOverrideValues, type EvalProposalSource, type EvalProposalStatus, type EvalProposedCase, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunCaseScores, type EvalRunConfig, type EvalRunScores, EvalRunner, type EvalStatus, type EvalSuiteCase, type EvalSuiteCaseInput, type EvalSuiteCoverage, type EvalSuiteDetail, type EvalSuiteLatestRun, type EvalSuiteListResult, type EvalSuiteRunQueued, type EvalSuiteRunResult, type EvalSuiteSummary, EvalSuitesNamespace, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionCounts, type ExecutionStreamEvent, ExecutionsEndpoint, ExecutionsNamespace, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, 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 FlowInlineEvalInput, 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 GenerateEvalCasesInput, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GetApiKeyRequestResponse, type GetRecordStepConfig$1 as GetRecordStepConfig, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type HealthInsight, type HumanVerdict, type ImageContentPart, type InferCollectionSchemaResponse, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListCollectionsResponse, type ListConversationsResponse, type ListParams, type ListRecordsStepConfig$1 as ListRecordsStepConfig, 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 LoopStepConfig$1 as LoopStepConfig, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type MetricDelta, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type PersistedGraderOutcome, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, type ProductionHealthQuery, type ProductionHealthResponse, 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 RecordCollection, type RecordCollectionWithHistory, type RecordCollections, 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 RunEvalCaseResult, type RunEvalInput, type RunEvalResult, 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 FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type GetRecordStepConfig as RuntypeGetRecordStepConfig, type ListRecordsStepConfig as RuntypeListRecordsStepConfig, type LoopStepConfig as RuntypeLoopStepConfig, 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 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 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 SandboxDeployEffectivePolicy, type SandboxDeployRetention, type SandboxDeploySleepPolicy, 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 SelectOrganizationProviderCredentialRequest, type SelectOrganizationProviderCredentialResponse, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, 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 SlackAppStatusResponse, type SlackInstallRequest, type SlackManifestRequest, type SlackManifestResponse, type SlackOAuthStartRequest, type SlackOAuthStartResponse, 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 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, type TypedCreateRecordRequest, type TypedRecordListItem, type TypedRecordWriteResponse, TypedRecordsScope, type TypedRuntypeRecord, UNIFIED_EVENTS_QUERY, type UpdateClientTokenRequest, type UpdateCollectionRequest, type UpdateCollectionResponse, type UpdateConversationRequest, type UpdateEvalCaseInput, type UpdateEvalSuiteInput, type UpdateFlowRequest, 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 ValidateExistingRecordsResponse, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionPublishOptions, 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, buildAgentAdmissionHeaders, buildEmptySessionNudge, buildExecutionEventsPath, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildObservationMaskMarker, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, combineAbortSignals, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isCatalogClientToolRef, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withDetachedReconnect, withUnifiedEvents };