@runtypelabs/sdk 10.12.1 → 10.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -14445,7 +14445,7 @@ function transformQueryParams(params) {
14445
14445
  }
14446
14446
  //#endregion
14447
14447
  //#region src/version.ts
14448
- const SDK_VERSION = "10.12.1";
14448
+ const SDK_VERSION = "10.13.2";
14449
14449
  /**
14450
14450
  * Canonical client identity the API uses for attribution
14451
14451
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/dist/index.d.cts CHANGED
@@ -1125,6 +1125,8 @@ interface paths {
1125
1125
  };
1126
1126
  tools?: {
1127
1127
  approval?: {
1128
+ /** @enum {string} */
1129
+ approver?: "owner" | "end-user";
1128
1130
  choices?: {
1129
1131
  alwaysAllow?: boolean;
1130
1132
  alwaysDeny?: boolean;
@@ -1213,6 +1215,7 @@ interface paths {
1213
1215
  topK?: number;
1214
1216
  topP?: number;
1215
1217
  voice?: {
1218
+ disclosure?: boolean;
1216
1219
  elevenLabs?: {
1217
1220
  modelId?: string;
1218
1221
  similarity?: number;
@@ -1656,6 +1659,8 @@ interface paths {
1656
1659
  };
1657
1660
  tools?: {
1658
1661
  approval?: {
1662
+ /** @enum {string} */
1663
+ approver?: "owner" | "end-user";
1659
1664
  choices?: {
1660
1665
  alwaysAllow?: boolean;
1661
1666
  alwaysDeny?: boolean;
@@ -1744,6 +1749,7 @@ interface paths {
1744
1749
  topK?: number;
1745
1750
  topP?: number;
1746
1751
  voice?: {
1752
+ disclosure?: boolean;
1747
1753
  elevenLabs?: {
1748
1754
  modelId?: string;
1749
1755
  similarity?: number;
@@ -2234,7 +2240,10 @@ interface paths {
2234
2240
  put: {
2235
2241
  parameters: {
2236
2242
  query?: never;
2237
- header?: never;
2243
+ header?: {
2244
+ /** @description The updatedAt value last loaded. A stale revision returns 409 without saving. */
2245
+ "if-match"?: string;
2246
+ };
2238
2247
  path: {
2239
2248
  id: string;
2240
2249
  };
@@ -2245,6 +2254,21 @@ interface paths {
2245
2254
  "application/json": {
2246
2255
  /** @enum {string} */
2247
2256
  agentType?: "runtype" | "external" | "claude_managed";
2257
+ /** @description Capability additions and removals committed with the definition and its draft snapshot. If-Match guards the entire save. */
2258
+ capabilityChanges?: {
2259
+ /** @default [] */
2260
+ add?: {
2261
+ enabled?: boolean;
2262
+ flowId?: string;
2263
+ parametersSchema?: unknown;
2264
+ subAgentId?: string;
2265
+ toolDescription?: string;
2266
+ toolId?: string;
2267
+ toolName: string;
2268
+ }[];
2269
+ /** @default [] */
2270
+ remove?: string[];
2271
+ };
2248
2272
  claudeManagedConfig?: {
2249
2273
  anthropicAgentId?: string;
2250
2274
  anthropicAgentVersion?: number;
@@ -2460,6 +2484,8 @@ interface paths {
2460
2484
  };
2461
2485
  tools?: {
2462
2486
  approval?: {
2487
+ /** @enum {string} */
2488
+ approver?: "owner" | "end-user";
2463
2489
  choices?: {
2464
2490
  alwaysAllow?: boolean;
2465
2491
  alwaysDeny?: boolean;
@@ -2548,6 +2574,7 @@ interface paths {
2548
2574
  topK?: number;
2549
2575
  topP?: number;
2550
2576
  voice?: {
2577
+ disclosure?: boolean;
2551
2578
  elevenLabs?: {
2552
2579
  modelId?: string;
2553
2580
  similarity?: number;
@@ -2714,7 +2741,7 @@ interface paths {
2714
2741
  requested: string;
2715
2742
  supported: string[];
2716
2743
  }[];
2717
- /** @description The snapshot created by this update, or null if snapshot creation failed. Use this exact ID for save-and-publish; a null result requires another save before publishing. */
2744
+ /** @description The snapshot committed with this update, or the current draft snapshot for an unchanged definition. Save repairs a missing snapshot without changing the definition revision. Definition, capability, and snapshot failures roll back together. */
2718
2745
  savedVersionId: string | null;
2719
2746
  status: string;
2720
2747
  updatedAt: string;
@@ -2767,6 +2794,15 @@ interface paths {
2767
2794
  "application/json": components["schemas"]["Error"];
2768
2795
  };
2769
2796
  };
2797
+ /** @description The saved agent revision changed; local edits were not saved */
2798
+ 409: {
2799
+ headers: {
2800
+ [name: string]: unknown;
2801
+ };
2802
+ content: {
2803
+ "application/json": components["schemas"]["Error"];
2804
+ };
2805
+ };
2770
2806
  /** @description Internal server error */
2771
2807
  500: {
2772
2808
  headers: {
@@ -8936,6 +8972,126 @@ interface paths {
8936
8972
  patch?: never;
8937
8973
  trace?: never;
8938
8974
  };
8975
+ "/v1/client/approve": {
8976
+ parameters: {
8977
+ query?: never;
8978
+ header?: never;
8979
+ path?: never;
8980
+ cookie?: never;
8981
+ };
8982
+ get?: never;
8983
+ put?: never;
8984
+ /**
8985
+ * Answer an end-user approval gate
8986
+ * @description Session-authenticated approval for browser client-token sessions. Answers a paused approval whose gate the agent authored with `tools.approval.approver: 'end-user'`, then streams the continued run over Server-Sent Events in the same shape as `/v1/client/resume`. The decision is bound to the session that started the turn, single-use, and bound to the exact reviewed tool parameters; visitors cannot create persistent "always allow" grants. A gate with the default `owner` approver is refused with `403 APPROVAL_APPROVER_NOT_END_USER`; answer those with `POST /v1/dispatch/approve`. Does not count against execution limits.
8987
+ */
8988
+ post: {
8989
+ parameters: {
8990
+ query?: never;
8991
+ header?: never;
8992
+ path?: never;
8993
+ cookie?: never;
8994
+ };
8995
+ requestBody: {
8996
+ content: {
8997
+ "application/json": {
8998
+ /** @description The `approvalId` from the `approval_start` event this decision answers. */
8999
+ approvalId: string;
9000
+ /** @description Id for the assistant message this resumed leg produces, so a re-send deduplicates by id. Optional; same contract as `/v1/client/resume`. */
9001
+ assistantMessageId?: string;
9002
+ /** @enum {string} */
9003
+ decision: "approved" | "denied";
9004
+ executionId: string;
9005
+ /** @description The visitor's own note on the decision, recorded with it. Optional. */
9006
+ reason?: string;
9007
+ sessionId: string;
9008
+ /** @default true */
9009
+ streamResponse?: boolean;
9010
+ };
9011
+ };
9012
+ };
9013
+ responses: {
9014
+ /** @description SSE stream of the continued execution, or a buffered JSON continuation result when streamResponse is false */
9015
+ 200: {
9016
+ headers: {
9017
+ [name: string]: unknown;
9018
+ };
9019
+ content: {
9020
+ "application/json": components["schemas"]["DispatchToolOutputContinuationJsonResponse"];
9021
+ "text/event-stream": unknown;
9022
+ };
9023
+ };
9024
+ /** @description Validation error, or the approvalId does not match the pending approval */
9025
+ 400: {
9026
+ headers: {
9027
+ [name: string]: unknown;
9028
+ };
9029
+ content: {
9030
+ "application/json": components["schemas"]["Error"];
9031
+ };
9032
+ };
9033
+ /** @description Session not found or expired */
9034
+ 401: {
9035
+ headers: {
9036
+ [name: string]: unknown;
9037
+ };
9038
+ content: {
9039
+ "application/json": components["schemas"]["Error"];
9040
+ };
9041
+ };
9042
+ /** @description Client token inactive, origin mismatch, execution belongs to another session, or the gate needs the owner (`APPROVAL_APPROVER_NOT_END_USER`) */
9043
+ 403: {
9044
+ headers: {
9045
+ [name: string]: unknown;
9046
+ };
9047
+ content: {
9048
+ "application/json": components["schemas"]["Error"];
9049
+ };
9050
+ };
9051
+ /** @description No paused execution found for the executionId, or the approval expired */
9052
+ 404: {
9053
+ headers: {
9054
+ [name: string]: unknown;
9055
+ };
9056
+ content: {
9057
+ "application/json": components["schemas"]["Error"];
9058
+ };
9059
+ };
9060
+ /** @description The approval was already resolved (`APPROVAL_ALREADY_RESOLVED`) */
9061
+ 409: {
9062
+ headers: {
9063
+ [name: string]: unknown;
9064
+ };
9065
+ content: {
9066
+ "application/json": components["schemas"]["Error"];
9067
+ };
9068
+ };
9069
+ /** @description Internal server error */
9070
+ 500: {
9071
+ headers: {
9072
+ [name: string]: unknown;
9073
+ };
9074
+ content: {
9075
+ "application/json": components["schemas"]["Error"];
9076
+ };
9077
+ };
9078
+ /** @description Neutral service-unavailable response when the owner platform-key spend limit blocks an end-user continuation */
9079
+ 503: {
9080
+ headers: {
9081
+ [name: string]: unknown;
9082
+ };
9083
+ content: {
9084
+ "application/json": components["schemas"]["Error"];
9085
+ };
9086
+ };
9087
+ };
9088
+ };
9089
+ delete?: never;
9090
+ options?: never;
9091
+ head?: never;
9092
+ patch?: never;
9093
+ trace?: never;
9094
+ };
8939
9095
  "/v1/client/chat": {
8940
9096
  parameters: {
8941
9097
  query?: never;
@@ -13790,6 +13946,7 @@ interface paths {
13790
13946
  topP?: number;
13791
13947
  versionId?: string;
13792
13948
  voice?: {
13949
+ disclosure?: boolean;
13793
13950
  elevenLabs?: {
13794
13951
  modelId?: string;
13795
13952
  similarity?: number;
@@ -14240,6 +14397,7 @@ interface paths {
14240
14397
  topP?: number;
14241
14398
  versionId?: string;
14242
14399
  voice?: {
14400
+ disclosure?: boolean;
14243
14401
  elevenLabs?: {
14244
14402
  modelId?: string;
14245
14403
  similarity?: number;
@@ -51784,6 +51942,8 @@ interface components {
51784
51942
  };
51785
51943
  tools?: {
51786
51944
  approval?: {
51945
+ /** @enum {string} */
51946
+ approver?: "owner" | "end-user";
51787
51947
  choices?: {
51788
51948
  alwaysAllow?: boolean;
51789
51949
  alwaysDeny?: boolean;
@@ -51872,6 +52032,7 @@ interface components {
51872
52032
  topK?: number;
51873
52033
  topP?: number;
51874
52034
  voice?: {
52035
+ disclosure?: boolean;
51875
52036
  elevenLabs?: {
51876
52037
  modelId?: string;
51877
52038
  similarity?: number;
@@ -52561,6 +52722,8 @@ interface components {
52561
52722
  };
52562
52723
  tools?: {
52563
52724
  approval?: {
52725
+ /** @enum {string} */
52726
+ approver?: "owner" | "end-user";
52564
52727
  choices?: {
52565
52728
  alwaysAllow?: boolean;
52566
52729
  alwaysDeny?: boolean;
@@ -52649,6 +52812,7 @@ interface components {
52649
52812
  topK?: number;
52650
52813
  topP?: number;
52651
52814
  voice?: {
52815
+ disclosure?: boolean;
52652
52816
  elevenLabs?: {
52653
52817
  modelId?: string;
52654
52818
  similarity?: number;
package/dist/index.d.ts CHANGED
@@ -1125,6 +1125,8 @@ interface paths {
1125
1125
  };
1126
1126
  tools?: {
1127
1127
  approval?: {
1128
+ /** @enum {string} */
1129
+ approver?: "owner" | "end-user";
1128
1130
  choices?: {
1129
1131
  alwaysAllow?: boolean;
1130
1132
  alwaysDeny?: boolean;
@@ -1213,6 +1215,7 @@ interface paths {
1213
1215
  topK?: number;
1214
1216
  topP?: number;
1215
1217
  voice?: {
1218
+ disclosure?: boolean;
1216
1219
  elevenLabs?: {
1217
1220
  modelId?: string;
1218
1221
  similarity?: number;
@@ -1656,6 +1659,8 @@ interface paths {
1656
1659
  };
1657
1660
  tools?: {
1658
1661
  approval?: {
1662
+ /** @enum {string} */
1663
+ approver?: "owner" | "end-user";
1659
1664
  choices?: {
1660
1665
  alwaysAllow?: boolean;
1661
1666
  alwaysDeny?: boolean;
@@ -1744,6 +1749,7 @@ interface paths {
1744
1749
  topK?: number;
1745
1750
  topP?: number;
1746
1751
  voice?: {
1752
+ disclosure?: boolean;
1747
1753
  elevenLabs?: {
1748
1754
  modelId?: string;
1749
1755
  similarity?: number;
@@ -2234,7 +2240,10 @@ interface paths {
2234
2240
  put: {
2235
2241
  parameters: {
2236
2242
  query?: never;
2237
- header?: never;
2243
+ header?: {
2244
+ /** @description The updatedAt value last loaded. A stale revision returns 409 without saving. */
2245
+ "if-match"?: string;
2246
+ };
2238
2247
  path: {
2239
2248
  id: string;
2240
2249
  };
@@ -2245,6 +2254,21 @@ interface paths {
2245
2254
  "application/json": {
2246
2255
  /** @enum {string} */
2247
2256
  agentType?: "runtype" | "external" | "claude_managed";
2257
+ /** @description Capability additions and removals committed with the definition and its draft snapshot. If-Match guards the entire save. */
2258
+ capabilityChanges?: {
2259
+ /** @default [] */
2260
+ add?: {
2261
+ enabled?: boolean;
2262
+ flowId?: string;
2263
+ parametersSchema?: unknown;
2264
+ subAgentId?: string;
2265
+ toolDescription?: string;
2266
+ toolId?: string;
2267
+ toolName: string;
2268
+ }[];
2269
+ /** @default [] */
2270
+ remove?: string[];
2271
+ };
2248
2272
  claudeManagedConfig?: {
2249
2273
  anthropicAgentId?: string;
2250
2274
  anthropicAgentVersion?: number;
@@ -2460,6 +2484,8 @@ interface paths {
2460
2484
  };
2461
2485
  tools?: {
2462
2486
  approval?: {
2487
+ /** @enum {string} */
2488
+ approver?: "owner" | "end-user";
2463
2489
  choices?: {
2464
2490
  alwaysAllow?: boolean;
2465
2491
  alwaysDeny?: boolean;
@@ -2548,6 +2574,7 @@ interface paths {
2548
2574
  topK?: number;
2549
2575
  topP?: number;
2550
2576
  voice?: {
2577
+ disclosure?: boolean;
2551
2578
  elevenLabs?: {
2552
2579
  modelId?: string;
2553
2580
  similarity?: number;
@@ -2714,7 +2741,7 @@ interface paths {
2714
2741
  requested: string;
2715
2742
  supported: string[];
2716
2743
  }[];
2717
- /** @description The snapshot created by this update, or null if snapshot creation failed. Use this exact ID for save-and-publish; a null result requires another save before publishing. */
2744
+ /** @description The snapshot committed with this update, or the current draft snapshot for an unchanged definition. Save repairs a missing snapshot without changing the definition revision. Definition, capability, and snapshot failures roll back together. */
2718
2745
  savedVersionId: string | null;
2719
2746
  status: string;
2720
2747
  updatedAt: string;
@@ -2767,6 +2794,15 @@ interface paths {
2767
2794
  "application/json": components["schemas"]["Error"];
2768
2795
  };
2769
2796
  };
2797
+ /** @description The saved agent revision changed; local edits were not saved */
2798
+ 409: {
2799
+ headers: {
2800
+ [name: string]: unknown;
2801
+ };
2802
+ content: {
2803
+ "application/json": components["schemas"]["Error"];
2804
+ };
2805
+ };
2770
2806
  /** @description Internal server error */
2771
2807
  500: {
2772
2808
  headers: {
@@ -8936,6 +8972,126 @@ interface paths {
8936
8972
  patch?: never;
8937
8973
  trace?: never;
8938
8974
  };
8975
+ "/v1/client/approve": {
8976
+ parameters: {
8977
+ query?: never;
8978
+ header?: never;
8979
+ path?: never;
8980
+ cookie?: never;
8981
+ };
8982
+ get?: never;
8983
+ put?: never;
8984
+ /**
8985
+ * Answer an end-user approval gate
8986
+ * @description Session-authenticated approval for browser client-token sessions. Answers a paused approval whose gate the agent authored with `tools.approval.approver: 'end-user'`, then streams the continued run over Server-Sent Events in the same shape as `/v1/client/resume`. The decision is bound to the session that started the turn, single-use, and bound to the exact reviewed tool parameters; visitors cannot create persistent "always allow" grants. A gate with the default `owner` approver is refused with `403 APPROVAL_APPROVER_NOT_END_USER`; answer those with `POST /v1/dispatch/approve`. Does not count against execution limits.
8987
+ */
8988
+ post: {
8989
+ parameters: {
8990
+ query?: never;
8991
+ header?: never;
8992
+ path?: never;
8993
+ cookie?: never;
8994
+ };
8995
+ requestBody: {
8996
+ content: {
8997
+ "application/json": {
8998
+ /** @description The `approvalId` from the `approval_start` event this decision answers. */
8999
+ approvalId: string;
9000
+ /** @description Id for the assistant message this resumed leg produces, so a re-send deduplicates by id. Optional; same contract as `/v1/client/resume`. */
9001
+ assistantMessageId?: string;
9002
+ /** @enum {string} */
9003
+ decision: "approved" | "denied";
9004
+ executionId: string;
9005
+ /** @description The visitor's own note on the decision, recorded with it. Optional. */
9006
+ reason?: string;
9007
+ sessionId: string;
9008
+ /** @default true */
9009
+ streamResponse?: boolean;
9010
+ };
9011
+ };
9012
+ };
9013
+ responses: {
9014
+ /** @description SSE stream of the continued execution, or a buffered JSON continuation result when streamResponse is false */
9015
+ 200: {
9016
+ headers: {
9017
+ [name: string]: unknown;
9018
+ };
9019
+ content: {
9020
+ "application/json": components["schemas"]["DispatchToolOutputContinuationJsonResponse"];
9021
+ "text/event-stream": unknown;
9022
+ };
9023
+ };
9024
+ /** @description Validation error, or the approvalId does not match the pending approval */
9025
+ 400: {
9026
+ headers: {
9027
+ [name: string]: unknown;
9028
+ };
9029
+ content: {
9030
+ "application/json": components["schemas"]["Error"];
9031
+ };
9032
+ };
9033
+ /** @description Session not found or expired */
9034
+ 401: {
9035
+ headers: {
9036
+ [name: string]: unknown;
9037
+ };
9038
+ content: {
9039
+ "application/json": components["schemas"]["Error"];
9040
+ };
9041
+ };
9042
+ /** @description Client token inactive, origin mismatch, execution belongs to another session, or the gate needs the owner (`APPROVAL_APPROVER_NOT_END_USER`) */
9043
+ 403: {
9044
+ headers: {
9045
+ [name: string]: unknown;
9046
+ };
9047
+ content: {
9048
+ "application/json": components["schemas"]["Error"];
9049
+ };
9050
+ };
9051
+ /** @description No paused execution found for the executionId, or the approval expired */
9052
+ 404: {
9053
+ headers: {
9054
+ [name: string]: unknown;
9055
+ };
9056
+ content: {
9057
+ "application/json": components["schemas"]["Error"];
9058
+ };
9059
+ };
9060
+ /** @description The approval was already resolved (`APPROVAL_ALREADY_RESOLVED`) */
9061
+ 409: {
9062
+ headers: {
9063
+ [name: string]: unknown;
9064
+ };
9065
+ content: {
9066
+ "application/json": components["schemas"]["Error"];
9067
+ };
9068
+ };
9069
+ /** @description Internal server error */
9070
+ 500: {
9071
+ headers: {
9072
+ [name: string]: unknown;
9073
+ };
9074
+ content: {
9075
+ "application/json": components["schemas"]["Error"];
9076
+ };
9077
+ };
9078
+ /** @description Neutral service-unavailable response when the owner platform-key spend limit blocks an end-user continuation */
9079
+ 503: {
9080
+ headers: {
9081
+ [name: string]: unknown;
9082
+ };
9083
+ content: {
9084
+ "application/json": components["schemas"]["Error"];
9085
+ };
9086
+ };
9087
+ };
9088
+ };
9089
+ delete?: never;
9090
+ options?: never;
9091
+ head?: never;
9092
+ patch?: never;
9093
+ trace?: never;
9094
+ };
8939
9095
  "/v1/client/chat": {
8940
9096
  parameters: {
8941
9097
  query?: never;
@@ -13790,6 +13946,7 @@ interface paths {
13790
13946
  topP?: number;
13791
13947
  versionId?: string;
13792
13948
  voice?: {
13949
+ disclosure?: boolean;
13793
13950
  elevenLabs?: {
13794
13951
  modelId?: string;
13795
13952
  similarity?: number;
@@ -14240,6 +14397,7 @@ interface paths {
14240
14397
  topP?: number;
14241
14398
  versionId?: string;
14242
14399
  voice?: {
14400
+ disclosure?: boolean;
14243
14401
  elevenLabs?: {
14244
14402
  modelId?: string;
14245
14403
  similarity?: number;
@@ -51784,6 +51942,8 @@ interface components {
51784
51942
  };
51785
51943
  tools?: {
51786
51944
  approval?: {
51945
+ /** @enum {string} */
51946
+ approver?: "owner" | "end-user";
51787
51947
  choices?: {
51788
51948
  alwaysAllow?: boolean;
51789
51949
  alwaysDeny?: boolean;
@@ -51872,6 +52032,7 @@ interface components {
51872
52032
  topK?: number;
51873
52033
  topP?: number;
51874
52034
  voice?: {
52035
+ disclosure?: boolean;
51875
52036
  elevenLabs?: {
51876
52037
  modelId?: string;
51877
52038
  similarity?: number;
@@ -52561,6 +52722,8 @@ interface components {
52561
52722
  };
52562
52723
  tools?: {
52563
52724
  approval?: {
52725
+ /** @enum {string} */
52726
+ approver?: "owner" | "end-user";
52564
52727
  choices?: {
52565
52728
  alwaysAllow?: boolean;
52566
52729
  alwaysDeny?: boolean;
@@ -52649,6 +52812,7 @@ interface components {
52649
52812
  topK?: number;
52650
52813
  topP?: number;
52651
52814
  voice?: {
52815
+ disclosure?: boolean;
52652
52816
  elevenLabs?: {
52653
52817
  modelId?: string;
52654
52818
  similarity?: number;
package/dist/index.mjs CHANGED
@@ -14444,7 +14444,7 @@ function transformQueryParams(params) {
14444
14444
  }
14445
14445
  //#endregion
14446
14446
  //#region src/version.ts
14447
- const SDK_VERSION = "10.12.1";
14447
+ const SDK_VERSION = "10.13.2";
14448
14448
  /**
14449
14449
  * Canonical client identity the API uses for attribution
14450
14450
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "10.12.1",
3
+ "version": "10.13.2",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {},
26
26
  "devDependencies": {
27
- "@runtypelabs/shared": "3.73.0",
27
+ "@runtypelabs/shared": "3.75.1",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.0",
30
30
  "typescript": "^6.0.3",