@runtypelabs/sdk 10.15.0 → 10.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -197,7 +197,8 @@ function createFlowEventTranslator() {
197
197
  parameters: data.parameters,
198
198
  awaitedAt: data.awaitedAt,
199
199
  origin: data.origin,
200
- pageOrigin: data.pageOrigin
200
+ pageOrigin: data.pageOrigin,
201
+ annotations: data.annotations
201
202
  })];
202
203
  default: return [];
203
204
  }
@@ -306,7 +307,8 @@ function createAgentEventTranslator() {
306
307
  parameters: data.parameters,
307
308
  hiddenParameterNames: data.hiddenParameterNames,
308
309
  origin: data.origin,
309
- pageOrigin: data.pageOrigin
310
+ pageOrigin: data.pageOrigin,
311
+ annotations: data.annotations
310
312
  })];
311
313
  case "tool_output_delta": return [compact({
312
314
  type: "agent_tool_delta",
@@ -421,6 +423,7 @@ function createAgentEventTranslator() {
421
423
  awaitedAt: data.awaitedAt,
422
424
  origin: data.origin,
423
425
  pageOrigin: data.pageOrigin,
426
+ annotations: data.annotations,
424
427
  awaitReason: data.awaitReason,
425
428
  elicitation: data.elicitation,
426
429
  externalAgent: data.externalAgent
@@ -14456,7 +14459,7 @@ function transformQueryParams(params) {
14456
14459
  }
14457
14460
  //#endregion
14458
14461
  //#region src/version.ts
14459
- const SDK_VERSION = "10.15.0";
14462
+ const SDK_VERSION = "10.15.1";
14460
14463
  /**
14461
14464
  * Canonical client identity the API uses for attribution
14462
14465
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
@@ -14577,6 +14580,7 @@ var RuntypeClient = class {
14577
14580
  parametersSchema: entry.parametersSchema,
14578
14581
  ...entry.origin ? { origin: entry.origin } : {},
14579
14582
  ...entry.pageOrigin ? { pageOrigin: entry.pageOrigin } : {},
14583
+ ...entry.annotations ? { annotations: entry.annotations } : {},
14580
14584
  ...entry.untrustedContentHint ? { untrustedContentHint: true } : {}
14581
14585
  })) : [];
14582
14586
  const modifiedRequest = {
package/dist/index.d.cts CHANGED
@@ -9684,6 +9684,15 @@ interface paths {
9684
9684
  "application/json": {
9685
9685
  assistantMessageId?: string;
9686
9686
  clientTools?: {
9687
+ annotations?: {
9688
+ consequentialHint?: boolean;
9689
+ debugging?: boolean;
9690
+ destructiveHint?: boolean;
9691
+ idempotentHint?: boolean;
9692
+ openWorldHint?: boolean;
9693
+ readOnlyHint?: boolean;
9694
+ untrustedContentHint?: boolean;
9695
+ };
9687
9696
  description: string;
9688
9697
  name: string;
9689
9698
  /** @enum {string} */
@@ -10995,6 +11004,15 @@ interface paths {
10995
11004
  /** @description Id for the assistant message this resumed leg produces. The leg's completion is persisted to the conversation, so sending the id the client already uses locally makes a later re-send of that same message deduplicate exactly instead of by text. Optional and backward compatible. */
10996
11005
  assistantMessageId?: string;
10997
11006
  clientTools?: {
11007
+ annotations?: {
11008
+ consequentialHint?: boolean;
11009
+ debugging?: boolean;
11010
+ destructiveHint?: boolean;
11011
+ idempotentHint?: boolean;
11012
+ openWorldHint?: boolean;
11013
+ readOnlyHint?: boolean;
11014
+ untrustedContentHint?: boolean;
11015
+ };
10998
11016
  description: string;
10999
11017
  name: string;
11000
11018
  /** @enum {string} */
@@ -14556,6 +14574,15 @@ interface paths {
14556
14574
  };
14557
14575
  };
14558
14576
  clientTools?: ({
14577
+ annotations?: {
14578
+ consequentialHint?: boolean;
14579
+ debugging?: boolean;
14580
+ destructiveHint?: boolean;
14581
+ idempotentHint?: boolean;
14582
+ openWorldHint?: boolean;
14583
+ readOnlyHint?: boolean;
14584
+ untrustedContentHint?: boolean;
14585
+ };
14559
14586
  description: string;
14560
14587
  name: string;
14561
14588
  /** @enum {string} */
@@ -15007,6 +15034,15 @@ interface paths {
15007
15034
  };
15008
15035
  };
15009
15036
  clientTools?: ({
15037
+ annotations?: {
15038
+ consequentialHint?: boolean;
15039
+ debugging?: boolean;
15040
+ destructiveHint?: boolean;
15041
+ idempotentHint?: boolean;
15042
+ openWorldHint?: boolean;
15043
+ readOnlyHint?: boolean;
15044
+ untrustedContentHint?: boolean;
15045
+ };
15010
15046
  description: string;
15011
15047
  name: string;
15012
15048
  /** @enum {string} */
@@ -17814,6 +17850,15 @@ interface paths {
17814
17850
  "application/json": components["schemas"]["Error"];
17815
17851
  };
17816
17852
  };
17853
+ /** @description The target cannot run: RUNTIME_LANE_INELIGIBLE (with `reasons`) for a flow, or flow plus eval overrides, the batch host cannot run, before any eval quota is reserved; or an unsupported agent target. */
17854
+ 422: {
17855
+ headers: {
17856
+ [name: string]: unknown;
17857
+ };
17858
+ content: {
17859
+ "application/json": components["schemas"]["EvalLaneRefusalError"] | components["schemas"]["Error"];
17860
+ };
17861
+ };
17817
17862
  /** @description Internal server error */
17818
17863
  500: {
17819
17864
  headers: {
@@ -19402,6 +19447,15 @@ interface paths {
19402
19447
  "application/json": components["schemas"]["Error"];
19403
19448
  };
19404
19449
  };
19450
+ /** @description A durable run of a flow target the batch host cannot run (RUNTIME_LANE_INELIGIBLE, with `reasons`). Nothing is queued and no eval run is counted. */
19451
+ 422: {
19452
+ headers: {
19453
+ [name: string]: unknown;
19454
+ };
19455
+ content: {
19456
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
19457
+ };
19458
+ };
19405
19459
  /** @description Internal server error */
19406
19460
  500: {
19407
19461
  headers: {
@@ -36060,13 +36114,13 @@ interface paths {
36060
36114
  };
36061
36115
  };
36062
36116
  };
36063
- /** @description Validation error */
36117
+ /** @description Validation error, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
36064
36118
  400: {
36065
36119
  headers: {
36066
36120
  [name: string]: unknown;
36067
36121
  };
36068
36122
  content: {
36069
- "application/json": components["schemas"]["Error"];
36123
+ "application/json": components["schemas"]["ScheduleValidationError"];
36070
36124
  };
36071
36125
  };
36072
36126
  /** @description Unauthorized */
@@ -36305,13 +36359,13 @@ interface paths {
36305
36359
  };
36306
36360
  };
36307
36361
  };
36308
- /** @description Validation error */
36362
+ /** @description Validation error, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
36309
36363
  400: {
36310
36364
  headers: {
36311
36365
  [name: string]: unknown;
36312
36366
  };
36313
36367
  content: {
36314
- "application/json": components["schemas"]["Error"];
36368
+ "application/json": components["schemas"]["ScheduleValidationError"];
36315
36369
  };
36316
36370
  };
36317
36371
  /** @description Unauthorized */
@@ -36533,13 +36587,13 @@ interface paths {
36533
36587
  };
36534
36588
  };
36535
36589
  };
36536
- /** @description Invalid ID or surface is not a schedule surface */
36590
+ /** @description Invalid ID, surface is not a schedule surface, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
36537
36591
  400: {
36538
36592
  headers: {
36539
36593
  [name: string]: unknown;
36540
36594
  };
36541
36595
  content: {
36542
- "application/json": components["schemas"]["Error"];
36596
+ "application/json": components["schemas"]["ScheduleValidationError"];
36543
36597
  };
36544
36598
  };
36545
36599
  /** @description Unauthorized */
@@ -36652,6 +36706,15 @@ interface paths {
36652
36706
  "application/json": components["schemas"]["Error"];
36653
36707
  };
36654
36708
  };
36709
+ /** @description The flow uses capabilities the batch host cannot run (RUNTIME_LANE_INELIGIBLE). Nothing is queued and no executions are counted. */
36710
+ 422: {
36711
+ headers: {
36712
+ [name: string]: unknown;
36713
+ };
36714
+ content: {
36715
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
36716
+ };
36717
+ };
36655
36718
  /** @description Daily execution limit exceeded */
36656
36719
  429: {
36657
36720
  headers: {
@@ -45555,7 +45618,7 @@ interface paths {
45555
45618
  };
45556
45619
  };
45557
45620
  };
45558
- /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
45621
+ /** @description Validation error, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
45559
45622
  400: {
45560
45623
  headers: {
45561
45624
  [name: string]: unknown;
@@ -45769,7 +45832,7 @@ interface paths {
45769
45832
  "application/json": components["schemas"]["ScheduleEnsureResponse"];
45770
45833
  };
45771
45834
  };
45772
- /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
45835
+ /** @description Validation error, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
45773
45836
  400: {
45774
45837
  headers: {
45775
45838
  [name: string]: unknown;
@@ -46331,7 +46394,7 @@ interface paths {
46331
46394
  };
46332
46395
  };
46333
46396
  };
46334
- /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
46397
+ /** @description Validation error, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
46335
46398
  400: {
46336
46399
  headers: {
46337
46400
  [name: string]: unknown;
@@ -46546,7 +46609,7 @@ interface paths {
46546
46609
  };
46547
46610
  };
46548
46611
  };
46549
- /** @description Invalid ID format, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
46612
+ /** @description Invalid ID format, RUNTIME_LANE_INELIGIBLE for a flow target the batch host cannot run, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
46550
46613
  400: {
46551
46614
  headers: {
46552
46615
  [name: string]: unknown;
@@ -46665,6 +46728,15 @@ interface paths {
46665
46728
  "application/json": components["schemas"]["Error"];
46666
46729
  };
46667
46730
  };
46731
+ /** @description The flow uses capabilities the batch host cannot run (RUNTIME_LANE_INELIGIBLE). Nothing is queued and no executions are counted. */
46732
+ 422: {
46733
+ headers: {
46734
+ [name: string]: unknown;
46735
+ };
46736
+ content: {
46737
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
46738
+ };
46739
+ };
46668
46740
  /** @description Rate limit exceeded */
46669
46741
  429: {
46670
46742
  headers: {
@@ -53109,7 +53181,7 @@ interface components {
53109
53181
  * @enum {string}
53110
53182
  */
53111
53183
  code: "RUNTIME_LANE_INELIGIBLE";
53112
- /** @description Stable `ineligible:*` reason codes, e.g. `ineligible:wait-until`. */
53184
+ /** @description Stable reason codes: `ineligible:*` capabilities (e.g. `ineligible:wait-until`), or `eval-override:*` for an eval override the batch host cannot apply. */
53113
53185
  reasons: string[];
53114
53186
  };
53115
53187
  BuiltinToolExecuteResult: {
@@ -54255,6 +54327,12 @@ interface components {
54255
54327
  result: "plan";
54256
54328
  suiteId?: string;
54257
54329
  };
54330
+ EvalLaneRefusalError: components["schemas"]["BatchLaneRefusalError"] & {
54331
+ /** @description `evalConfigId` of the refused configuration (product surface batch evals). */
54332
+ evalConfigId?: string;
54333
+ /** @description Index into `evalConfigs` of the refused configuration (multi-config submissions). */
54334
+ evalConfigIndex?: number;
54335
+ };
54258
54336
  /** @description Canonical eval override field. Replaces `stepOverrides` (and its `"*"` key), `claudeManagedOverride` and `advisorOverride`; setting both spellings of one channel is a 400. */
54259
54337
  EvalOverrides: {
54260
54338
  /** @description Advisor override for agent capabilities. `null` disables the advisor; omitting it leaves the target’s own config alone. */
@@ -55020,6 +55098,15 @@ interface components {
55020
55098
  /** @enum {string} */
55021
55099
  type: "state_delta";
55022
55100
  } | {
55101
+ annotations?: {
55102
+ consequentialHint?: boolean;
55103
+ debugging?: boolean;
55104
+ destructiveHint?: boolean;
55105
+ idempotentHint?: boolean;
55106
+ openWorldHint?: boolean;
55107
+ readOnlyHint?: boolean;
55108
+ untrustedContentHint?: boolean;
55109
+ };
55023
55110
  executionId: string;
55024
55111
  hiddenParameterNames?: string[];
55025
55112
  iteration?: number;
@@ -55134,6 +55221,15 @@ interface components {
55134
55221
  /** @enum {string} */
55135
55222
  type: "approval_complete";
55136
55223
  } | {
55224
+ annotations?: {
55225
+ consequentialHint?: boolean;
55226
+ debugging?: boolean;
55227
+ destructiveHint?: boolean;
55228
+ idempotentHint?: boolean;
55229
+ openWorldHint?: boolean;
55230
+ readOnlyHint?: boolean;
55231
+ untrustedContentHint?: boolean;
55232
+ };
55137
55233
  awaitReason?: string;
55138
55234
  awaitedAt?: string;
55139
55235
  crawlId?: string;
@@ -56222,10 +56318,12 @@ interface components {
56222
56318
  kind: "run" | "records" | "none";
56223
56319
  };
56224
56320
  ScheduleValidationError: components["schemas"]["Error"] & {
56225
- /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. */
56321
+ /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. RUNTIME_LANE_INELIGIBLE: the target flow uses capabilities the batch host cannot run; `reasons` names them. */
56226
56322
  code?: string;
56227
56323
  /** @description Human-readable error message. */
56228
56324
  message?: string;
56325
+ /** @description With RUNTIME_LANE_INELIGIBLE: stable `ineligible:*` reason codes, e.g. `ineligible:wait-until`. */
56326
+ reasons?: string[];
56229
56327
  };
56230
56328
  SessionPreviewUrlWarning: {
56231
56329
  /** @enum {string} */
@@ -58718,6 +58816,16 @@ export interface UpsertOptions {
58718
58816
  * Environment type for dispatch requests
58719
58817
  */
58720
58818
  export type DispatchEnvironment = 'development' | 'production';
58819
+ /** Advisory WebMCP and MCP metadata; not an approval or replay-safety grant. */
58820
+ export interface ToolAnnotations {
58821
+ readOnlyHint?: boolean;
58822
+ destructiveHint?: boolean;
58823
+ consequentialHint?: boolean;
58824
+ untrustedContentHint?: boolean;
58825
+ idempotentHint?: boolean;
58826
+ openWorldHint?: boolean;
58827
+ debugging?: boolean;
58828
+ }
58721
58829
  /**
58722
58830
  * Inline tool definition that executes on the dispatching client.
58723
58831
  *
@@ -58747,6 +58855,7 @@ export interface ClientToolDefinition {
58747
58855
  parametersSchema: Record<string, unknown>;
58748
58856
  origin?: 'webmcp' | 'sdk';
58749
58857
  pageOrigin?: string;
58858
+ annotations?: ToolAnnotations;
58750
58859
  /**
58751
58860
  * When `true`, the server spotlights (delimiter-wraps) this tool's output
58752
58861
  * before the model reads it, treating it as untrusted data. `origin: 'webmcp'`
@@ -66986,6 +67095,7 @@ export interface AgentToolStartEvent extends BaseAgentEvent {
66986
67095
  * via the WebMCP polyfill; `'sdk'` marks SDK-provided locals.
66987
67096
  */
66988
67097
  origin?: 'webmcp' | 'sdk';
67098
+ annotations?: ToolAnnotations;
66989
67099
  /** `window.location.origin` of the page that registered a WebMCP tool. */
66990
67100
  pageOrigin?: string;
66991
67101
  }
@@ -67257,6 +67367,7 @@ export interface AgentPausedEvent extends BaseAgentEvent {
67257
67367
  awaitedAt: string;
67258
67368
  /** Provenance for tools registered via `dispatch.clientTools[]`. */
67259
67369
  origin?: 'webmcp' | 'sdk';
67370
+ annotations?: ToolAnnotations;
67260
67371
  /** `window.location.origin` of the page that registered a WebMCP tool. */
67261
67372
  pageOrigin?: string;
67262
67373
  /** Why the run paused. UX context only — never a control signal. */
@@ -68807,6 +68918,7 @@ interface LocalToolEntry {
68807
68918
  execute: (args: unknown) => Promise<unknown>;
68808
68919
  origin?: 'webmcp' | 'sdk';
68809
68920
  pageOrigin?: string;
68921
+ annotations?: ToolAnnotations;
68810
68922
  /**
68811
68923
  * When `true`, the server spotlights (delimiter-wraps) this tool's output as
68812
68924
  * untrusted before the model reads it. Use for `origin: 'sdk'` tools that
package/dist/index.d.ts CHANGED
@@ -9684,6 +9684,15 @@ interface paths {
9684
9684
  "application/json": {
9685
9685
  assistantMessageId?: string;
9686
9686
  clientTools?: {
9687
+ annotations?: {
9688
+ consequentialHint?: boolean;
9689
+ debugging?: boolean;
9690
+ destructiveHint?: boolean;
9691
+ idempotentHint?: boolean;
9692
+ openWorldHint?: boolean;
9693
+ readOnlyHint?: boolean;
9694
+ untrustedContentHint?: boolean;
9695
+ };
9687
9696
  description: string;
9688
9697
  name: string;
9689
9698
  /** @enum {string} */
@@ -10995,6 +11004,15 @@ interface paths {
10995
11004
  /** @description Id for the assistant message this resumed leg produces. The leg's completion is persisted to the conversation, so sending the id the client already uses locally makes a later re-send of that same message deduplicate exactly instead of by text. Optional and backward compatible. */
10996
11005
  assistantMessageId?: string;
10997
11006
  clientTools?: {
11007
+ annotations?: {
11008
+ consequentialHint?: boolean;
11009
+ debugging?: boolean;
11010
+ destructiveHint?: boolean;
11011
+ idempotentHint?: boolean;
11012
+ openWorldHint?: boolean;
11013
+ readOnlyHint?: boolean;
11014
+ untrustedContentHint?: boolean;
11015
+ };
10998
11016
  description: string;
10999
11017
  name: string;
11000
11018
  /** @enum {string} */
@@ -14556,6 +14574,15 @@ interface paths {
14556
14574
  };
14557
14575
  };
14558
14576
  clientTools?: ({
14577
+ annotations?: {
14578
+ consequentialHint?: boolean;
14579
+ debugging?: boolean;
14580
+ destructiveHint?: boolean;
14581
+ idempotentHint?: boolean;
14582
+ openWorldHint?: boolean;
14583
+ readOnlyHint?: boolean;
14584
+ untrustedContentHint?: boolean;
14585
+ };
14559
14586
  description: string;
14560
14587
  name: string;
14561
14588
  /** @enum {string} */
@@ -15007,6 +15034,15 @@ interface paths {
15007
15034
  };
15008
15035
  };
15009
15036
  clientTools?: ({
15037
+ annotations?: {
15038
+ consequentialHint?: boolean;
15039
+ debugging?: boolean;
15040
+ destructiveHint?: boolean;
15041
+ idempotentHint?: boolean;
15042
+ openWorldHint?: boolean;
15043
+ readOnlyHint?: boolean;
15044
+ untrustedContentHint?: boolean;
15045
+ };
15010
15046
  description: string;
15011
15047
  name: string;
15012
15048
  /** @enum {string} */
@@ -17814,6 +17850,15 @@ interface paths {
17814
17850
  "application/json": components["schemas"]["Error"];
17815
17851
  };
17816
17852
  };
17853
+ /** @description The target cannot run: RUNTIME_LANE_INELIGIBLE (with `reasons`) for a flow, or flow plus eval overrides, the batch host cannot run, before any eval quota is reserved; or an unsupported agent target. */
17854
+ 422: {
17855
+ headers: {
17856
+ [name: string]: unknown;
17857
+ };
17858
+ content: {
17859
+ "application/json": components["schemas"]["EvalLaneRefusalError"] | components["schemas"]["Error"];
17860
+ };
17861
+ };
17817
17862
  /** @description Internal server error */
17818
17863
  500: {
17819
17864
  headers: {
@@ -19402,6 +19447,15 @@ interface paths {
19402
19447
  "application/json": components["schemas"]["Error"];
19403
19448
  };
19404
19449
  };
19450
+ /** @description A durable run of a flow target the batch host cannot run (RUNTIME_LANE_INELIGIBLE, with `reasons`). Nothing is queued and no eval run is counted. */
19451
+ 422: {
19452
+ headers: {
19453
+ [name: string]: unknown;
19454
+ };
19455
+ content: {
19456
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
19457
+ };
19458
+ };
19405
19459
  /** @description Internal server error */
19406
19460
  500: {
19407
19461
  headers: {
@@ -36060,13 +36114,13 @@ interface paths {
36060
36114
  };
36061
36115
  };
36062
36116
  };
36063
- /** @description Validation error */
36117
+ /** @description Validation error, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
36064
36118
  400: {
36065
36119
  headers: {
36066
36120
  [name: string]: unknown;
36067
36121
  };
36068
36122
  content: {
36069
- "application/json": components["schemas"]["Error"];
36123
+ "application/json": components["schemas"]["ScheduleValidationError"];
36070
36124
  };
36071
36125
  };
36072
36126
  /** @description Unauthorized */
@@ -36305,13 +36359,13 @@ interface paths {
36305
36359
  };
36306
36360
  };
36307
36361
  };
36308
- /** @description Validation error */
36362
+ /** @description Validation error, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
36309
36363
  400: {
36310
36364
  headers: {
36311
36365
  [name: string]: unknown;
36312
36366
  };
36313
36367
  content: {
36314
- "application/json": components["schemas"]["Error"];
36368
+ "application/json": components["schemas"]["ScheduleValidationError"];
36315
36369
  };
36316
36370
  };
36317
36371
  /** @description Unauthorized */
@@ -36533,13 +36587,13 @@ interface paths {
36533
36587
  };
36534
36588
  };
36535
36589
  };
36536
- /** @description Invalid ID or surface is not a schedule surface */
36590
+ /** @description Invalid ID, surface is not a schedule surface, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
36537
36591
  400: {
36538
36592
  headers: {
36539
36593
  [name: string]: unknown;
36540
36594
  };
36541
36595
  content: {
36542
- "application/json": components["schemas"]["Error"];
36596
+ "application/json": components["schemas"]["ScheduleValidationError"];
36543
36597
  };
36544
36598
  };
36545
36599
  /** @description Unauthorized */
@@ -36652,6 +36706,15 @@ interface paths {
36652
36706
  "application/json": components["schemas"]["Error"];
36653
36707
  };
36654
36708
  };
36709
+ /** @description The flow uses capabilities the batch host cannot run (RUNTIME_LANE_INELIGIBLE). Nothing is queued and no executions are counted. */
36710
+ 422: {
36711
+ headers: {
36712
+ [name: string]: unknown;
36713
+ };
36714
+ content: {
36715
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
36716
+ };
36717
+ };
36655
36718
  /** @description Daily execution limit exceeded */
36656
36719
  429: {
36657
36720
  headers: {
@@ -45555,7 +45618,7 @@ interface paths {
45555
45618
  };
45556
45619
  };
45557
45620
  };
45558
- /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
45621
+ /** @description Validation error, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
45559
45622
  400: {
45560
45623
  headers: {
45561
45624
  [name: string]: unknown;
@@ -45769,7 +45832,7 @@ interface paths {
45769
45832
  "application/json": components["schemas"]["ScheduleEnsureResponse"];
45770
45833
  };
45771
45834
  };
45772
- /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
45835
+ /** @description Validation error, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
45773
45836
  400: {
45774
45837
  headers: {
45775
45838
  [name: string]: unknown;
@@ -46331,7 +46394,7 @@ interface paths {
46331
46394
  };
46332
46395
  };
46333
46396
  };
46334
- /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
46397
+ /** @description Validation error, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or RUNTIME_LANE_INELIGIBLE for a flow the batch host cannot run */
46335
46398
  400: {
46336
46399
  headers: {
46337
46400
  [name: string]: unknown;
@@ -46546,7 +46609,7 @@ interface paths {
46546
46609
  };
46547
46610
  };
46548
46611
  };
46549
- /** @description Invalid ID format, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
46612
+ /** @description Invalid ID format, RUNTIME_LANE_INELIGIBLE for a flow target the batch host cannot run, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
46550
46613
  400: {
46551
46614
  headers: {
46552
46615
  [name: string]: unknown;
@@ -46665,6 +46728,15 @@ interface paths {
46665
46728
  "application/json": components["schemas"]["Error"];
46666
46729
  };
46667
46730
  };
46731
+ /** @description The flow uses capabilities the batch host cannot run (RUNTIME_LANE_INELIGIBLE). Nothing is queued and no executions are counted. */
46732
+ 422: {
46733
+ headers: {
46734
+ [name: string]: unknown;
46735
+ };
46736
+ content: {
46737
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
46738
+ };
46739
+ };
46668
46740
  /** @description Rate limit exceeded */
46669
46741
  429: {
46670
46742
  headers: {
@@ -53109,7 +53181,7 @@ interface components {
53109
53181
  * @enum {string}
53110
53182
  */
53111
53183
  code: "RUNTIME_LANE_INELIGIBLE";
53112
- /** @description Stable `ineligible:*` reason codes, e.g. `ineligible:wait-until`. */
53184
+ /** @description Stable reason codes: `ineligible:*` capabilities (e.g. `ineligible:wait-until`), or `eval-override:*` for an eval override the batch host cannot apply. */
53113
53185
  reasons: string[];
53114
53186
  };
53115
53187
  BuiltinToolExecuteResult: {
@@ -54255,6 +54327,12 @@ interface components {
54255
54327
  result: "plan";
54256
54328
  suiteId?: string;
54257
54329
  };
54330
+ EvalLaneRefusalError: components["schemas"]["BatchLaneRefusalError"] & {
54331
+ /** @description `evalConfigId` of the refused configuration (product surface batch evals). */
54332
+ evalConfigId?: string;
54333
+ /** @description Index into `evalConfigs` of the refused configuration (multi-config submissions). */
54334
+ evalConfigIndex?: number;
54335
+ };
54258
54336
  /** @description Canonical eval override field. Replaces `stepOverrides` (and its `"*"` key), `claudeManagedOverride` and `advisorOverride`; setting both spellings of one channel is a 400. */
54259
54337
  EvalOverrides: {
54260
54338
  /** @description Advisor override for agent capabilities. `null` disables the advisor; omitting it leaves the target’s own config alone. */
@@ -55020,6 +55098,15 @@ interface components {
55020
55098
  /** @enum {string} */
55021
55099
  type: "state_delta";
55022
55100
  } | {
55101
+ annotations?: {
55102
+ consequentialHint?: boolean;
55103
+ debugging?: boolean;
55104
+ destructiveHint?: boolean;
55105
+ idempotentHint?: boolean;
55106
+ openWorldHint?: boolean;
55107
+ readOnlyHint?: boolean;
55108
+ untrustedContentHint?: boolean;
55109
+ };
55023
55110
  executionId: string;
55024
55111
  hiddenParameterNames?: string[];
55025
55112
  iteration?: number;
@@ -55134,6 +55221,15 @@ interface components {
55134
55221
  /** @enum {string} */
55135
55222
  type: "approval_complete";
55136
55223
  } | {
55224
+ annotations?: {
55225
+ consequentialHint?: boolean;
55226
+ debugging?: boolean;
55227
+ destructiveHint?: boolean;
55228
+ idempotentHint?: boolean;
55229
+ openWorldHint?: boolean;
55230
+ readOnlyHint?: boolean;
55231
+ untrustedContentHint?: boolean;
55232
+ };
55137
55233
  awaitReason?: string;
55138
55234
  awaitedAt?: string;
55139
55235
  crawlId?: string;
@@ -56222,10 +56318,12 @@ interface components {
56222
56318
  kind: "run" | "records" | "none";
56223
56319
  };
56224
56320
  ScheduleValidationError: components["schemas"]["Error"] & {
56225
- /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. */
56321
+ /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. RUNTIME_LANE_INELIGIBLE: the target flow uses capabilities the batch host cannot run; `reasons` names them. */
56226
56322
  code?: string;
56227
56323
  /** @description Human-readable error message. */
56228
56324
  message?: string;
56325
+ /** @description With RUNTIME_LANE_INELIGIBLE: stable `ineligible:*` reason codes, e.g. `ineligible:wait-until`. */
56326
+ reasons?: string[];
56229
56327
  };
56230
56328
  SessionPreviewUrlWarning: {
56231
56329
  /** @enum {string} */
@@ -58718,6 +58816,16 @@ export interface UpsertOptions {
58718
58816
  * Environment type for dispatch requests
58719
58817
  */
58720
58818
  export type DispatchEnvironment = 'development' | 'production';
58819
+ /** Advisory WebMCP and MCP metadata; not an approval or replay-safety grant. */
58820
+ export interface ToolAnnotations {
58821
+ readOnlyHint?: boolean;
58822
+ destructiveHint?: boolean;
58823
+ consequentialHint?: boolean;
58824
+ untrustedContentHint?: boolean;
58825
+ idempotentHint?: boolean;
58826
+ openWorldHint?: boolean;
58827
+ debugging?: boolean;
58828
+ }
58721
58829
  /**
58722
58830
  * Inline tool definition that executes on the dispatching client.
58723
58831
  *
@@ -58747,6 +58855,7 @@ export interface ClientToolDefinition {
58747
58855
  parametersSchema: Record<string, unknown>;
58748
58856
  origin?: 'webmcp' | 'sdk';
58749
58857
  pageOrigin?: string;
58858
+ annotations?: ToolAnnotations;
58750
58859
  /**
58751
58860
  * When `true`, the server spotlights (delimiter-wraps) this tool's output
58752
58861
  * before the model reads it, treating it as untrusted data. `origin: 'webmcp'`
@@ -66986,6 +67095,7 @@ export interface AgentToolStartEvent extends BaseAgentEvent {
66986
67095
  * via the WebMCP polyfill; `'sdk'` marks SDK-provided locals.
66987
67096
  */
66988
67097
  origin?: 'webmcp' | 'sdk';
67098
+ annotations?: ToolAnnotations;
66989
67099
  /** `window.location.origin` of the page that registered a WebMCP tool. */
66990
67100
  pageOrigin?: string;
66991
67101
  }
@@ -67257,6 +67367,7 @@ export interface AgentPausedEvent extends BaseAgentEvent {
67257
67367
  awaitedAt: string;
67258
67368
  /** Provenance for tools registered via `dispatch.clientTools[]`. */
67259
67369
  origin?: 'webmcp' | 'sdk';
67370
+ annotations?: ToolAnnotations;
67260
67371
  /** `window.location.origin` of the page that registered a WebMCP tool. */
67261
67372
  pageOrigin?: string;
67262
67373
  /** Why the run paused. UX context only — never a control signal. */
@@ -68807,6 +68918,7 @@ interface LocalToolEntry {
68807
68918
  execute: (args: unknown) => Promise<unknown>;
68808
68919
  origin?: 'webmcp' | 'sdk';
68809
68920
  pageOrigin?: string;
68921
+ annotations?: ToolAnnotations;
68810
68922
  /**
68811
68923
  * When `true`, the server spotlights (delimiter-wraps) this tool's output as
68812
68924
  * untrusted before the model reads it. Use for `origin: 'sdk'` tools that
package/dist/index.mjs CHANGED
@@ -196,7 +196,8 @@ function createFlowEventTranslator() {
196
196
  parameters: data.parameters,
197
197
  awaitedAt: data.awaitedAt,
198
198
  origin: data.origin,
199
- pageOrigin: data.pageOrigin
199
+ pageOrigin: data.pageOrigin,
200
+ annotations: data.annotations
200
201
  })];
201
202
  default: return [];
202
203
  }
@@ -305,7 +306,8 @@ function createAgentEventTranslator() {
305
306
  parameters: data.parameters,
306
307
  hiddenParameterNames: data.hiddenParameterNames,
307
308
  origin: data.origin,
308
- pageOrigin: data.pageOrigin
309
+ pageOrigin: data.pageOrigin,
310
+ annotations: data.annotations
309
311
  })];
310
312
  case "tool_output_delta": return [compact({
311
313
  type: "agent_tool_delta",
@@ -420,6 +422,7 @@ function createAgentEventTranslator() {
420
422
  awaitedAt: data.awaitedAt,
421
423
  origin: data.origin,
422
424
  pageOrigin: data.pageOrigin,
425
+ annotations: data.annotations,
423
426
  awaitReason: data.awaitReason,
424
427
  elicitation: data.elicitation,
425
428
  externalAgent: data.externalAgent
@@ -14455,7 +14458,7 @@ function transformQueryParams(params) {
14455
14458
  }
14456
14459
  //#endregion
14457
14460
  //#region src/version.ts
14458
- const SDK_VERSION = "10.15.0";
14461
+ const SDK_VERSION = "10.15.1";
14459
14462
  /**
14460
14463
  * Canonical client identity the API uses for attribution
14461
14464
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
@@ -14576,6 +14579,7 @@ var RuntypeClient = class {
14576
14579
  parametersSchema: entry.parametersSchema,
14577
14580
  ...entry.origin ? { origin: entry.origin } : {},
14578
14581
  ...entry.pageOrigin ? { pageOrigin: entry.pageOrigin } : {},
14582
+ ...entry.annotations ? { annotations: entry.annotations } : {},
14579
14583
  ...entry.untrustedContentHint ? { untrustedContentHint: true } : {}
14580
14584
  })) : [];
14581
14585
  const modifiedRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "10.15.0",
3
+ "version": "10.15.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {},
26
26
  "devDependencies": {
27
- "@runtypelabs/shared": "3.81.0",
27
+ "@runtypelabs/shared": "3.81.1",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.0",
30
30
  "typescript": "^6.0.3",