@runtypelabs/sdk 9.2.1 → 9.3.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.d.cts CHANGED
@@ -674,6 +674,12 @@ interface paths {
674
674
  enabled: true;
675
675
  types: ("markdown" | "component")[];
676
676
  };
677
+ durability?: {
678
+ /** @enum {string} */
679
+ forced?: "durable" | "in_process";
680
+ maxBudgetMs?: number | null;
681
+ watchLeaseMs?: number | null;
682
+ };
677
683
  errorHandling?: {
678
684
  fallbacks?: ({
679
685
  delay?: number;
@@ -720,6 +726,7 @@ interface paths {
720
726
  presencePenalty?: number;
721
727
  reasoning?: boolean | {
722
728
  budgetTokens?: number;
729
+ effort?: string;
723
730
  enabled: boolean;
724
731
  includeThoughts?: boolean;
725
732
  /** @enum {string} */
@@ -727,6 +734,7 @@ interface paths {
727
734
  /** @enum {string} */
728
735
  reasoningSummary?: "auto" | "detailed";
729
736
  thinkingBudget?: number;
737
+ thinkingLevel?: string;
730
738
  };
731
739
  sandbox?: {
732
740
  enabled: boolean;
@@ -912,6 +920,7 @@ interface paths {
912
920
  presencePenalty?: number;
913
921
  reasoning?: boolean | {
914
922
  budgetTokens?: number;
923
+ effort?: string;
915
924
  enabled: boolean;
916
925
  includeThoughts?: boolean;
917
926
  /** @enum {string} */
@@ -919,6 +928,7 @@ interface paths {
919
928
  /** @enum {string} */
920
929
  reasoningSummary?: "auto" | "detailed";
921
930
  thinkingBudget?: number;
931
+ thinkingLevel?: string;
922
932
  };
923
933
  seed?: number;
924
934
  systemPrompt?: string;
@@ -1094,6 +1104,12 @@ interface paths {
1094
1104
  enabled: true;
1095
1105
  types: ("markdown" | "component")[];
1096
1106
  };
1107
+ durability?: {
1108
+ /** @enum {string} */
1109
+ forced?: "durable" | "in_process";
1110
+ maxBudgetMs?: number | null;
1111
+ watchLeaseMs?: number | null;
1112
+ };
1097
1113
  errorHandling?: {
1098
1114
  fallbacks?: ({
1099
1115
  delay?: number;
@@ -1140,6 +1156,7 @@ interface paths {
1140
1156
  presencePenalty?: number;
1141
1157
  reasoning?: boolean | {
1142
1158
  budgetTokens?: number;
1159
+ effort?: string;
1143
1160
  enabled: boolean;
1144
1161
  includeThoughts?: boolean;
1145
1162
  /** @enum {string} */
@@ -1147,6 +1164,7 @@ interface paths {
1147
1164
  /** @enum {string} */
1148
1165
  reasoningSummary?: "auto" | "detailed";
1149
1166
  thinkingBudget?: number;
1167
+ thinkingLevel?: string;
1150
1168
  };
1151
1169
  sandbox?: {
1152
1170
  enabled: boolean;
@@ -1784,6 +1802,12 @@ interface paths {
1784
1802
  enabled: true;
1785
1803
  types: ("markdown" | "component")[];
1786
1804
  };
1805
+ durability?: {
1806
+ /** @enum {string} */
1807
+ forced?: "durable" | "in_process";
1808
+ maxBudgetMs?: number | null;
1809
+ watchLeaseMs?: number | null;
1810
+ };
1787
1811
  errorHandling?: {
1788
1812
  fallbacks?: ({
1789
1813
  delay?: number;
@@ -1830,6 +1854,7 @@ interface paths {
1830
1854
  presencePenalty?: number;
1831
1855
  reasoning?: boolean | {
1832
1856
  budgetTokens?: number;
1857
+ effort?: string;
1833
1858
  enabled: boolean;
1834
1859
  includeThoughts?: boolean;
1835
1860
  /** @enum {string} */
@@ -1837,6 +1862,7 @@ interface paths {
1837
1862
  /** @enum {string} */
1838
1863
  reasoningSummary?: "auto" | "detailed";
1839
1864
  thinkingBudget?: number;
1865
+ thinkingLevel?: string;
1840
1866
  };
1841
1867
  sandbox?: {
1842
1868
  enabled: boolean;
@@ -2022,6 +2048,7 @@ interface paths {
2022
2048
  presencePenalty?: number;
2023
2049
  reasoning?: boolean | {
2024
2050
  budgetTokens?: number;
2051
+ effort?: string;
2025
2052
  enabled: boolean;
2026
2053
  includeThoughts?: boolean;
2027
2054
  /** @enum {string} */
@@ -2029,6 +2056,7 @@ interface paths {
2029
2056
  /** @enum {string} */
2030
2057
  reasoningSummary?: "auto" | "detailed";
2031
2058
  thinkingBudget?: number;
2059
+ thinkingLevel?: string;
2032
2060
  };
2033
2061
  seed?: number;
2034
2062
  systemPrompt?: string;
@@ -2657,7 +2685,14 @@ interface paths {
2657
2685
  post: {
2658
2686
  parameters: {
2659
2687
  query?: never;
2660
- header?: never;
2688
+ header?: {
2689
+ /** @description How a durable turn behaves when the conversation already has one in flight. `reject` (the default when omitted) answers `CONVERSATION_BUSY`; `supersede` cancels the incumbent and takes over; `queue` runs after it. Ignored for a turn that resolves to the in-process lane. */
2690
+ "x-runtype-concurrency"?: "reject" | "supersede" | "queue";
2691
+ /** @description Send `true` to fold this request into an already-pending turn for the same conversation instead of starting a second one. The response is the pending execution. Any other value (or omitting the header) starts a new turn. */
2692
+ "x-runtype-coalesce"?: "true";
2693
+ /** @description Caller-chosen key that makes admission idempotent: a retry with the same key returns the ORIGINAL execution rather than starting a second turn, and consumes no additional quota. Scoped to the durable lane. */
2694
+ "idempotency-key"?: string;
2695
+ };
2661
2696
  path: {
2662
2697
  id: string;
2663
2698
  };
@@ -2814,6 +2849,8 @@ interface paths {
2814
2849
  agentId: string | null;
2815
2850
  agentSource: string | null;
2816
2851
  agentSpec?: unknown;
2852
+ /** @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`. */
2853
+ budgetExhausted: boolean | null;
2817
2854
  cancelRequestedAt: string | null;
2818
2855
  completedAt: string | null;
2819
2856
  /** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
@@ -2949,6 +2986,8 @@ interface paths {
2949
2986
  agentId: string | null;
2950
2987
  agentSource: string | null;
2951
2988
  agentSpec?: unknown;
2989
+ /** @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`. */
2990
+ budgetExhausted: boolean | null;
2952
2991
  cancelRequestedAt: string | null;
2953
2992
  completedAt: string | null;
2954
2993
  /** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
@@ -3162,12 +3201,12 @@ interface paths {
3162
3201
  };
3163
3202
  /**
3164
3203
  * Stream execution events
3165
- * @description Reconnect to a durable Claude Managed agent turn: replay-and-tail its Server-Sent Events. Resolves the per-conversation session owner by (agentId, conversationId), 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. Reconnect after a disconnect (tab reload, sleep, stream timeout) by passing the last seen id verbatim as `after` to resume without missing or duplicating events. Replayed and live-tailed frames use the unified execution vocabulary.
3204
+ * @description Reconnect to a durable agent turn: replay-and-tail its Server-Sent Events. 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. The session owner is resolved from the execution's own persisted record — its conversation for a top-level turn, its private child thread for a subagent run — and the optional `conversationId` is used only for a turn that persists no record of its own. 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.
3166
3205
  */
3167
3206
  get: {
3168
3207
  parameters: {
3169
3208
  query?: {
3170
- /** @description The conversation key for ordinary managed turns. Detached subagents resolve their private child conversation from the run id. */
3209
+ /** @description Fallback session key, honored only for a turn that persists no execution record 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. */
3171
3210
  conversationId?: string;
3172
3211
  /** @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). */
3173
3212
  after?: string;
@@ -3190,7 +3229,7 @@ interface paths {
3190
3229
  "text/event-stream": unknown;
3191
3230
  };
3192
3231
  };
3193
- /** @description Invalid agent ID or missing conversationId */
3232
+ /** @description Invalid agent ID, or no session owner resolves for this execution */
3194
3233
  400: {
3195
3234
  headers: {
3196
3235
  [name: string]: unknown;
@@ -5630,6 +5669,10 @@ interface paths {
5630
5669
  organizationId: string | null;
5631
5670
  outputPreview: string | null;
5632
5671
  promptTokens?: number | null;
5672
+ reasoningConfig?: unknown;
5673
+ reasoningRejection?: unknown;
5674
+ reasoningRequested?: unknown;
5675
+ reasoningTokens?: number | null;
5633
5676
  recordId: string | null;
5634
5677
  recordMetadata?: unknown;
5635
5678
  recordName: string | null;
@@ -10868,6 +10911,7 @@ interface paths {
10868
10911
  presencePenalty?: number;
10869
10912
  reasoning?: boolean | {
10870
10913
  budgetTokens?: number;
10914
+ effort?: string;
10871
10915
  enabled: boolean;
10872
10916
  includeThoughts?: boolean;
10873
10917
  /** @enum {string} */
@@ -10875,6 +10919,7 @@ interface paths {
10875
10919
  /** @enum {string} */
10876
10920
  reasoningSummary?: "auto" | "detailed";
10877
10921
  thinkingBudget?: number;
10922
+ thinkingLevel?: string;
10878
10923
  };
10879
10924
  sandbox?: {
10880
10925
  enabled: boolean;
@@ -11145,7 +11190,7 @@ interface paths {
11145
11190
  /** @default true */
11146
11191
  createVersionOnChange?: boolean;
11147
11192
  };
11148
- /** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
11193
+ /** @description Execution-lane selector. `false` is RETIRED on AGENT dispatches: the legacy agent engine it selected has been deleted, so it is rejected with 400 LEGACY_AGENT_LANE_RETIRED (still carrying the RFC 9745 `Deprecation` + `X-API-Deprecation-Warning` response headers). Omitted and `true` are now IDENTICAL for agents: both run an eligible agent on the @runtypelabs/runtime lane, and both answer a definition the lane cannot execute faithfully with 400 RUNTIME_AGENT_PARITY_FOLD_UNSUPPORTED rather than degrading it. For FLOW dispatches the field is accepted but ignored: eligible flows always use the runtime lane, while ineligible flows still fold to legacy silently. */
11149
11194
  useRuntimePackage?: boolean;
11150
11195
  versionLabel?: string;
11151
11196
  versionNotes?: string;
@@ -11161,7 +11206,7 @@ interface paths {
11161
11206
  ownerId?: string;
11162
11207
  type?: string;
11163
11208
  };
11164
- /** @description Per-request credentials for agent/external-tool execution. Ignored when `flow` is the hosted target; FLOW credentials must use managed {{secret:NAME}} references. */
11209
+ /** @description Retired. A NON-EMPTY map on an agent dispatch is rejected with 400 RUNTIME_AGENT_TRANSIENT_SECRETS_UNSUPPORTED. There is no longer an exception: the legacy engine that honored it for single-turn agents behind `options.useRuntimePackage: false` has been removed, and that opt-out is itself a 400 now. An empty map is accepted and does nothing. Ignored on flow dispatches. Store credentials as managed secrets and reference them as {{secret:NAME}}. The field is kept on the wire for compatibility only. */
11165
11210
  secrets?: {
11166
11211
  [key: string]: string;
11167
11212
  };
@@ -11241,6 +11286,7 @@ interface paths {
11241
11286
  presencePenalty?: number;
11242
11287
  reasoning?: boolean | {
11243
11288
  budgetTokens?: number;
11289
+ effort?: string;
11244
11290
  enabled: boolean;
11245
11291
  includeThoughts?: boolean;
11246
11292
  /** @enum {string} */
@@ -11248,6 +11294,7 @@ interface paths {
11248
11294
  /** @enum {string} */
11249
11295
  reasoningSummary?: "auto" | "detailed";
11250
11296
  thinkingBudget?: number;
11297
+ thinkingLevel?: string;
11251
11298
  };
11252
11299
  sandbox?: {
11253
11300
  enabled: boolean;
@@ -11518,7 +11565,7 @@ interface paths {
11518
11565
  /** @default true */
11519
11566
  createVersionOnChange?: boolean;
11520
11567
  };
11521
- /** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
11568
+ /** @description Execution-lane selector. `false` is RETIRED on AGENT dispatches: the legacy agent engine it selected has been deleted, so it is rejected with 400 LEGACY_AGENT_LANE_RETIRED (still carrying the RFC 9745 `Deprecation` + `X-API-Deprecation-Warning` response headers). Omitted and `true` are now IDENTICAL for agents: both run an eligible agent on the @runtypelabs/runtime lane, and both answer a definition the lane cannot execute faithfully with 400 RUNTIME_AGENT_PARITY_FOLD_UNSUPPORTED rather than degrading it. For FLOW dispatches the field is accepted but ignored: eligible flows always use the runtime lane, while ineligible flows still fold to legacy silently. */
11522
11569
  useRuntimePackage?: boolean;
11523
11570
  versionLabel?: string;
11524
11571
  versionNotes?: string;
@@ -11534,7 +11581,7 @@ interface paths {
11534
11581
  ownerId?: string;
11535
11582
  type?: string;
11536
11583
  };
11537
- /** @description Per-request credentials for agent/external-tool execution. Ignored when `flow` is the hosted target; FLOW credentials must use managed {{secret:NAME}} references. */
11584
+ /** @description Retired. A NON-EMPTY map on an agent dispatch is rejected with 400 RUNTIME_AGENT_TRANSIENT_SECRETS_UNSUPPORTED. There is no longer an exception: the legacy engine that honored it for single-turn agents behind `options.useRuntimePackage: false` has been removed, and that opt-out is itself a 400 now. An empty map is accepted and does nothing. Ignored on flow dispatches. Store credentials as managed secrets and reference them as {{secret:NAME}}. The field is kept on the wire for compatibility only. */
11538
11585
  secrets?: {
11539
11586
  [key: string]: string;
11540
11587
  };
@@ -18000,6 +18047,10 @@ interface paths {
18000
18047
  organizationId: string | null;
18001
18048
  outputPreview: string | null;
18002
18049
  promptTokens?: number | null;
18050
+ reasoningConfig?: unknown;
18051
+ reasoningRejection?: unknown;
18052
+ reasoningRequested?: unknown;
18053
+ reasoningTokens?: number | null;
18003
18054
  recordId: string | null;
18004
18055
  recordMetadata?: unknown;
18005
18056
  recordName: string | null;
@@ -25193,8 +25244,24 @@ interface paths {
25193
25244
  /** @description Previous-Worker-compatible provider-key alias. Updated organization clients should use organizationConnectionId; platform selection is null. */
25194
25245
  providerKeyId: string | null;
25195
25246
  reasoningCapability?: {
25247
+ /**
25248
+ * @description Anthropic only: the thinking request shape sent. adaptive (Claude 4.6 and later, including the Claude 5 family) accepts effort and rejects budgetTokens; enabled is the legacy budgetTokens form.
25249
+ * @enum {string}
25250
+ */
25251
+ anthropicThinkingMode?: "adaptive" | "enabled";
25252
+ /** @description The model always reasons (GPT-5 / o-series); disabling is an effort floor, not off. */
25253
+ builtInReasoning?: boolean;
25196
25254
  /** @enum {string} */
25197
25255
  googleThinkingMode?: "budget" | "level";
25256
+ /** @description Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model. */
25257
+ options?: {
25258
+ budgetTokens?: {
25259
+ max?: number;
25260
+ min?: number;
25261
+ };
25262
+ effort?: string[];
25263
+ toggle?: boolean;
25264
+ };
25198
25265
  provider?: string;
25199
25266
  supported: boolean;
25200
25267
  supportsReasoningSummary?: boolean;
@@ -25339,8 +25406,24 @@ interface paths {
25339
25406
  /** @description Previous-Worker-compatible provider-key alias. Updated organization clients should use organizationConnectionId; platform selection is null. */
25340
25407
  providerKeyId: string | null;
25341
25408
  reasoningCapability?: {
25409
+ /**
25410
+ * @description Anthropic only: the thinking request shape sent. adaptive (Claude 4.6 and later, including the Claude 5 family) accepts effort and rejects budgetTokens; enabled is the legacy budgetTokens form.
25411
+ * @enum {string}
25412
+ */
25413
+ anthropicThinkingMode?: "adaptive" | "enabled";
25414
+ /** @description The model always reasons (GPT-5 / o-series); disabling is an effort floor, not off. */
25415
+ builtInReasoning?: boolean;
25342
25416
  /** @enum {string} */
25343
25417
  googleThinkingMode?: "budget" | "level";
25418
+ /** @description Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model. */
25419
+ options?: {
25420
+ budgetTokens?: {
25421
+ max?: number;
25422
+ min?: number;
25423
+ };
25424
+ effort?: string[];
25425
+ toggle?: boolean;
25426
+ };
25344
25427
  provider?: string;
25345
25428
  supported: boolean;
25346
25429
  supportsReasoningSummary?: boolean;
@@ -25595,8 +25678,24 @@ interface paths {
25595
25678
  providerDisplayName: string;
25596
25679
  }[];
25597
25680
  reasoningCapability?: {
25681
+ /**
25682
+ * @description Anthropic only: the thinking request shape sent. adaptive (Claude 4.6 and later, including the Claude 5 family) accepts effort and rejects budgetTokens; enabled is the legacy budgetTokens form.
25683
+ * @enum {string}
25684
+ */
25685
+ anthropicThinkingMode?: "adaptive" | "enabled";
25686
+ /** @description The model always reasons (GPT-5 / o-series); disabling is an effort floor, not off. */
25687
+ builtInReasoning?: boolean;
25598
25688
  /** @enum {string} */
25599
25689
  googleThinkingMode?: "budget" | "level";
25690
+ /** @description Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model. */
25691
+ options?: {
25692
+ budgetTokens?: {
25693
+ max?: number;
25694
+ min?: number;
25695
+ };
25696
+ effort?: string[];
25697
+ toggle?: boolean;
25698
+ };
25600
25699
  provider?: string;
25601
25700
  supported: boolean;
25602
25701
  supportsReasoningSummary?: boolean;
@@ -25969,8 +26068,24 @@ interface paths {
25969
26068
  /** @description Previous-Worker-compatible provider-key alias. Updated organization clients should use organizationConnectionId; platform selection is null. */
25970
26069
  providerKeyId: string | null;
25971
26070
  reasoningCapability?: {
26071
+ /**
26072
+ * @description Anthropic only: the thinking request shape sent. adaptive (Claude 4.6 and later, including the Claude 5 family) accepts effort and rejects budgetTokens; enabled is the legacy budgetTokens form.
26073
+ * @enum {string}
26074
+ */
26075
+ anthropicThinkingMode?: "adaptive" | "enabled";
26076
+ /** @description The model always reasons (GPT-5 / o-series); disabling is an effort floor, not off. */
26077
+ builtInReasoning?: boolean;
25972
26078
  /** @enum {string} */
25973
26079
  googleThinkingMode?: "budget" | "level";
26080
+ /** @description Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model. */
26081
+ options?: {
26082
+ budgetTokens?: {
26083
+ max?: number;
26084
+ min?: number;
26085
+ };
26086
+ effort?: string[];
26087
+ toggle?: boolean;
26088
+ };
25974
26089
  provider?: string;
25975
26090
  supported: boolean;
25976
26091
  supportsReasoningSummary?: boolean;
@@ -26229,8 +26344,24 @@ interface paths {
26229
26344
  /** @description Previous-Worker-compatible provider-key alias. Updated organization clients should use organizationConnectionId; platform selection is null. */
26230
26345
  providerKeyId: string | null;
26231
26346
  reasoningCapability?: {
26347
+ /**
26348
+ * @description Anthropic only: the thinking request shape sent. adaptive (Claude 4.6 and later, including the Claude 5 family) accepts effort and rejects budgetTokens; enabled is the legacy budgetTokens form.
26349
+ * @enum {string}
26350
+ */
26351
+ anthropicThinkingMode?: "adaptive" | "enabled";
26352
+ /** @description The model always reasons (GPT-5 / o-series); disabling is an effort floor, not off. */
26353
+ builtInReasoning?: boolean;
26232
26354
  /** @enum {string} */
26233
26355
  googleThinkingMode?: "budget" | "level";
26356
+ /** @description Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model. */
26357
+ options?: {
26358
+ budgetTokens?: {
26359
+ max?: number;
26360
+ min?: number;
26361
+ };
26362
+ effort?: string[];
26363
+ toggle?: boolean;
26364
+ };
26234
26365
  provider?: string;
26235
26366
  supported: boolean;
26236
26367
  supportsReasoningSummary?: boolean;
@@ -36698,6 +36829,10 @@ interface paths {
36698
36829
  organizationId: string | null;
36699
36830
  outputPreview: string | null;
36700
36831
  promptTokens?: number | null;
36832
+ reasoningConfig?: unknown;
36833
+ reasoningRejection?: unknown;
36834
+ reasoningRequested?: unknown;
36835
+ reasoningTokens?: number | null;
36701
36836
  recordId: string | null;
36702
36837
  recordMetadata?: unknown;
36703
36838
  recordName: string | null;
@@ -44643,6 +44778,12 @@ interface components {
44643
44778
  enabled: true;
44644
44779
  types: ("markdown" | "component")[];
44645
44780
  };
44781
+ durability?: {
44782
+ /** @enum {string} */
44783
+ forced?: "durable" | "in_process";
44784
+ maxBudgetMs?: number | null;
44785
+ watchLeaseMs?: number | null;
44786
+ };
44646
44787
  errorHandling?: {
44647
44788
  fallbacks?: ({
44648
44789
  delay?: number;
@@ -44689,6 +44830,7 @@ interface components {
44689
44830
  presencePenalty?: number;
44690
44831
  reasoning?: boolean | {
44691
44832
  budgetTokens?: number;
44833
+ effort?: string;
44692
44834
  enabled: boolean;
44693
44835
  includeThoughts?: boolean;
44694
44836
  /** @enum {string} */
@@ -44696,6 +44838,7 @@ interface components {
44696
44838
  /** @enum {string} */
44697
44839
  reasoningSummary?: "auto" | "detailed";
44698
44840
  thinkingBudget?: number;
44841
+ thinkingLevel?: string;
44699
44842
  };
44700
44843
  sandbox?: {
44701
44844
  enabled: boolean;
@@ -46826,13 +46969,6 @@ type StreamEventOf<U, T extends string> = Extract<U, {
46826
46969
  type: T;
46827
46970
  }>;
46828
46971
 
46829
- /**
46830
- * SSE Stream Utilities for FlowBuilder
46831
- *
46832
- * Provides utilities for parsing Server-Sent Events (SSE) streams
46833
- * from the Runtype API dispatch endpoint.
46834
- */
46835
-
46836
46972
  /**
46837
46973
  * Options for the flow stream consumers.
46838
46974
  *
@@ -46894,13 +47030,6 @@ declare function processStream(response: Response, callbacks?: StreamCallbacks,
46894
47030
  */
46895
47031
  declare function streamEvents(response: Response, _options?: StreamConsumeOptions): AsyncGenerator<StreamEvent>;
46896
47032
 
46897
- /**
46898
- * FlowResult - Wrapper for streaming flow execution responses
46899
- *
46900
- * Provides convenient methods for processing streaming responses
46901
- * from the Runtype API dispatch endpoint.
46902
- */
46903
-
46904
47033
  /**
46905
47034
  * Result wrapper for flow execution
46906
47035
  *
@@ -47015,26 +47144,6 @@ declare class FlowResult {
47015
47144
  private ensureNotConsumed;
47016
47145
  }
47017
47146
 
47018
- /**
47019
- * FlowBuilder - Fluent builder for constructing dispatch configurations
47020
- *
47021
- * Provides a chainable API for building flows with steps, making flow
47022
- * construction more readable and type-safe.
47023
- *
47024
- * @example
47025
- * ```typescript
47026
- * import { FlowBuilder } from '@runtypelabs/sdk'
47027
- *
47028
- * const config = new FlowBuilder()
47029
- * .createFlow({ name: "My Flow" })
47030
- * .withRecord({ name: "Record", type: "data", metadata: { key: "value" } })
47031
- * .fetchUrl({ name: "Fetch", url: "https://api.example.com", outputVariable: "data" })
47032
- * .prompt({ name: "Process", model: "gpt-4", userPrompt: "Analyze: {{data}}" })
47033
- * .withOptions({ streamResponse: true, flowMode: "virtual" })
47034
- * .build()
47035
- * ```
47036
- */
47037
-
47038
47147
  interface PromptStepConfig$1 {
47039
47148
  name: string;
47040
47149
  model: string;
@@ -47063,6 +47172,13 @@ interface PromptStepConfig$1 {
47063
47172
  * ```typescript
47064
47173
  * reasoning: { enabled: true, reasoningSummary: 'auto' }
47065
47174
  * ```
47175
+ *
47176
+ * @example Adaptive-thinking Claude (Claude 4.6 and later, including the Claude 5 family) with an effort level
47177
+ * ```typescript
47178
+ * // `effort`, not `budgetTokens` — adaptive thinking carries no token
47179
+ * // budget, so a budget set here is dropped before the request is sent.
47180
+ * reasoning: { enabled: true, effort: 'high' }
47181
+ * ```
47066
47182
  */
47067
47183
  reasoning?: boolean | ReasoningConfig;
47068
47184
  artifacts?: {
@@ -47501,7 +47617,14 @@ interface DispatchOptions$1 {
47501
47617
  autoAppendMetadata?: boolean;
47502
47618
  debugMode?: boolean;
47503
47619
  loggingPolicy?: 'default' | 'on' | 'off';
47504
- /** Ignored for flows; runtime eligibility selects the engine. */
47620
+ /**
47621
+ * Ignored for flows (runtime eligibility selects the engine). For agents,
47622
+ * `false` is RETIRED: the legacy agent engine it selected has been deleted,
47623
+ * so it is rejected with 400 `LEGACY_AGENT_LANE_RETIRED` (the response still
47624
+ * carries `Deprecation` headers). Omit the field, or send `true` — for agents
47625
+ * the two are now identical, and both answer a definition the runtime lane
47626
+ * cannot execute faithfully with a 400 rather than degrading it.
47627
+ */
47505
47628
  useRuntimePackage?: boolean;
47506
47629
  localInference?: {
47507
47630
  sessionId: string;
@@ -48707,10 +48830,9 @@ interface FlowToolConfig {
48707
48830
  flowId?: string;
48708
48831
  toolId?: string;
48709
48832
  /**
48710
- * Inline flow definition. Runtime-selected agent dispatches support this
48711
- * (the runtime lane is the default unless `options.useRuntimePackage: false`
48712
- * opts out); hosted flow definitions currently require a `flowId`/`toolId`
48713
- * reference.
48833
+ * Inline flow definition. Agent dispatches support this — every eligible
48834
+ * agent runs on the runtime lane, which resolves an inline flow — while
48835
+ * hosted flow definitions currently require a `flowId`/`toolId` reference.
48714
48836
  */
48715
48837
  flow?: Record<string, unknown>;
48716
48838
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48858,10 +48980,9 @@ interface RuntimeFlowToolConfig {
48858
48980
  flowId?: string;
48859
48981
  toolId?: string;
48860
48982
  /**
48861
- * Inline flow definition. Runtime-selected agent dispatches support this
48862
- * (the runtime lane is the default unless `options.useRuntimePackage: false`
48863
- * opts out); hosted flow definitions currently require a `flowId`/`toolId`
48864
- * reference.
48983
+ * Inline flow definition. Agent dispatches support this — every eligible
48984
+ * agent runs on the runtime lane, which resolves an inline flow — while
48985
+ * hosted flow definitions currently require a `flowId`/`toolId` reference.
48865
48986
  */
48866
48987
  flow?: Record<string, unknown>;
48867
48988
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48933,7 +49054,28 @@ interface ReasoningConfig {
48933
49054
  reasoningEffort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
48934
49055
  reasoningSummary?: 'auto' | 'detailed';
48935
49056
  budgetTokens?: number;
49057
+ /**
49058
+ * Effort level for Claude ADAPTIVE thinking (Claude 4.6 and later, including the Claude 5 family), forwarded to
49059
+ * Anthropic's `output_config.effort`. Mutually exclusive with
49060
+ * `budgetTokens`: an adaptive model discards a budget, and the older
49061
+ * `budgetTokens` models reject an effort.
49062
+ *
49063
+ * A plain string rather than the `reasoningEffort` union because the accepted
49064
+ * ladder is per-model catalog data and already carries rungs outside it (such
49065
+ * as `'max'`). Validate a flow to see the ladder a specific model accepts —
49066
+ * `REASONING_KNOB_UNSUPPORTED` carries it in `details.accepted`.
49067
+ */
49068
+ effort?: string;
48936
49069
  thinkingBudget?: number;
49070
+ /**
49071
+ * Thinking LEVEL for Gemini 3+ models, forwarded to the Google provider's
49072
+ * `thinkingConfig`. Mutually exclusive with `thinkingBudget` per model
49073
+ * (Gemini 3+ takes the level, Gemini 2.5 takes the budget). Sending the wrong
49074
+ * one is not an error — it is silently ignored.
49075
+ *
49076
+ * A plain string for the same per-model-catalog-ladder reason as `effort`.
49077
+ */
49078
+ thinkingLevel?: string;
48937
49079
  includeThoughts?: boolean;
48938
49080
  }
48939
49081
  type ReasoningValue = boolean | ReasoningConfig;
@@ -49408,32 +49550,6 @@ interface BillingSpendAnalyticsParams {
49408
49550
  period?: 'billing_period' | 'current_month' | 'last_7_days' | 'last_30_days' | 'last_90_days';
49409
49551
  }
49410
49552
 
49411
- /**
49412
- * Eval config-as-code: `defineEval` + the grader builders.
49413
- *
49414
- * The authoring layer for code-colocated evals — define the evals for a flow or
49415
- * agent right next to its `defineFlow` / `flows.ensure` definition. This module
49416
- * is PURE and local (no I/O), the exact analog of `defineFlow` in
49417
- * `flows-ensure.ts`: it validates and normalizes a loose `DefineEvalInput` into
49418
- * a canonical `EvalDefinition` (target + cases + per-case graders) and computes
49419
- * a content hash for hash-first convergence. The converge motion
49420
- * (`client.evals.ensure` → `POST /eval/ensure`) and the `runtype eval` CLI build
49421
- * on this contract in later increments.
49422
- *
49423
- * Grader types are MIRRORED INLINE from `@runtypelabs/shared`'s
49424
- * `grader-types.ts` (the SDK is dependency-free by convention — see the same
49425
- * pattern in `flows-ensure.ts`). The wire shapes must stay byte-identical to the
49426
- * shared discriminated union so an eval authored here scores through the existing
49427
- * `EvalScoringService` unchanged.
49428
- *
49429
- * Scope: the output + AI-judge union plus the trace graders (`called_tool` /
49430
- * `tool_order` / `ran_step` / `completed` / `cost` / …), each scored server-side
49431
- * by the same pure `runCheck` engine over the run's captured execution trace.
49432
- * Severity (`.gate()` / `.soft()`) is deliberately NOT emitted here — it lands
49433
- * with its own grader-engine extension. See
49434
- * `docs/features/planning/2026-06-24-code-colocated-evals.md`.
49435
- */
49436
-
49437
49553
  /**
49438
49554
  * Per-grader severity (mirror of `@runtypelabs/shared`'s `GraderSeverity`). A
49439
49555
  * `gate` miss always fails the case; a `soft` miss is tracked-but-not-failing
@@ -49974,44 +50090,6 @@ declare function pullEval(client: RuntypeClient$1, name: string): Promise<EvalPu
49974
50090
  */
49975
50091
  declare function runEvalSuite(client: RuntypeClient$1, input: RunEvalInput): Promise<RunEvalResult>;
49976
50092
 
49977
- /**
49978
- * Flow config-as-code: `defineFlow`, `flows.ensure`, `flows.pull`.
49979
- *
49980
- * The non-executing sibling of `flows.upsert()` — `upsert` is the
49981
- * dispatch-coupled save-and-run motion (it saves the flow AND executes it in
49982
- * one request); `ensure` is the deploy-time convergence postcondition: "make
49983
- * the platform's definition of this flow match this object; no-op if it
49984
- * already does." Identity is name + account scope (the API key's org, else
49985
- * personal); environment is whichever API the client points at. `ensure`
49986
- * never deletes, and renaming a definition orphans the old flow and creates a
49987
- * new one.
49988
- *
49989
- * Wire protocol (POST /v1/flows/ensure — APQ-shaped, both APQ scars fixed):
49990
- * 1. Hash-only probe `{ name, contentHash }`. A match is
49991
- * `{ result: 'unchanged' }`; a miss is a NORMAL 200
49992
- * `{ result: 'definitionRequired' }`, never an error.
49993
- * 2. On a miss, retry with the full `definition`. The server recomputes the
49994
- * canonical hash itself and returns it on every response — this SDK
49995
- * echoes the server's hash (memoized per client instance) rather than
49996
- * trusting its own serialization.
49997
- *
49998
- * The content hash is the SAME steps-only hash the flow upsert protocol uses
49999
- * (`computeFlowContentHash` — mirrored from
50000
- * `packages/shared/src/utils/flow-content-hash.ts`; this package is
50001
- * dependency-free by convention), so ensure and upsert interoperate on the
50002
- * same flow. The flow definition surface is `{ name, steps }` — description
50003
- * is not part of the v1 ensure surface (the shared hash covers steps only).
50004
- *
50005
- * A `defineFlow` may also carry inline `evals` — eval suites to converge
50006
- * alongside the flow. These are SDK-orchestrated: they are NOT part of the
50007
- * flow content hash and NEVER ride the `/flows/ensure` wire (its server schema
50008
- * is `.strict()` `{ name, steps }`). After the flow converges, `ensureFlow`
50009
- * converges each inline suite through the existing `/eval/ensure` endpoint
50010
- * (`ensureEval`), so eval semantics stay confined to the eval endpoints.
50011
- *
50012
- * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
50013
- */
50014
-
50015
50093
  /** SHA-256 (hex) over the canonical normalized step list (steps only). */
50016
50094
  declare function computeFlowContentHash(steps: unknown[]): Promise<string>;
50017
50095
  /**
@@ -50163,15 +50241,6 @@ declare class FlowDriftError extends Error {
50163
50241
  constructor(plan: EnsureFlowPlan);
50164
50242
  }
50165
50243
 
50166
- /**
50167
- * FlowsNamespace - Static namespace for flow operations
50168
- *
50169
- * Provides factory methods for creating flow builders with different modes:
50170
- * - upsert: Create or update a flow by name
50171
- * - virtual: One-off execution without saving
50172
- * - use: Execute an existing flow by ID
50173
- */
50174
-
50175
50244
  interface LocalToolsOptions {
50176
50245
  localTools?: Record<string, (args: unknown) => Promise<unknown>>;
50177
50246
  }
@@ -50549,13 +50618,6 @@ declare class RuntypeFlowBuilder {
50549
50618
  private addStep;
50550
50619
  }
50551
50620
 
50552
- /**
50553
- * BatchesNamespace - Static namespace for batch operations
50554
- *
50555
- * Provides direct methods for scheduling and managing batch operations.
50556
- * Batches are always asynchronous - they don't return results immediately.
50557
- */
50558
-
50559
50621
  interface BatchScheduleConfig {
50560
50622
  /** Flow ID to execute for each record */
50561
50623
  flowId: string;
@@ -50681,17 +50743,6 @@ declare class BatchesNamespace {
50681
50743
  }>;
50682
50744
  }
50683
50745
 
50684
- /**
50685
- * Eval-suite CRUD + case management + run — the SDK surface for the
50686
- * `/v1/eval/suites` REST family (Beginner-First Evals).
50687
- *
50688
- * This is the imperative, id-addressed counterpart of the config-as-code
50689
- * surface in `evals-ensure.ts` (`defineEval` / `ensure` / `pull`): use ensure
50690
- * to converge a repo-authored suite on deploy, and this namespace to inspect
50691
- * or manage suites, edit test cases (server-authoritative data), and start
50692
- * runs. Exposed as `client.evals.suites.*`.
50693
- */
50694
-
50695
50746
  /** The most recent run of a suite, with its score once graded. */
50696
50747
  interface EvalSuiteLatestRun {
50697
50748
  runId: string;
@@ -51080,13 +51131,6 @@ declare class EvalSuitesNamespace {
51080
51131
  getCoverage(suiteId: string): Promise<EvalSuiteCoverage>;
51081
51132
  }
51082
51133
 
51083
- /**
51084
- * EvalsNamespace - Static namespace for evaluation operations
51085
- *
51086
- * Provides methods for running evaluations and comparing model performance.
51087
- * Evals can be streamed for real-time results or submitted as batch jobs.
51088
- */
51089
-
51090
51134
  interface ModelOverride$1 {
51091
51135
  /** Name of the step to override */
51092
51136
  stepName: string;
@@ -51404,13 +51448,6 @@ declare class EvalsNamespace {
51404
51448
  }>;
51405
51449
  }
51406
51450
 
51407
- /**
51408
- * PromptsNamespace - Static namespace for prompt operations
51409
- *
51410
- * Provides CRUD operations for prompts and execution methods
51411
- * with streaming and non-streaming options.
51412
- */
51413
-
51414
51451
  interface CreatePromptData {
51415
51452
  /** Prompt name */
51416
51453
  name: string;
@@ -51572,39 +51609,6 @@ declare class PromptsNamespace {
51572
51609
  delete(promptId: string): Promise<void>;
51573
51610
  }
51574
51611
 
51575
- /**
51576
- * Skill config-as-code: `defineSkill`, `skills.ensure`, `skills.pull`.
51577
- *
51578
- * The deploy-time convergence postcondition for Agent Skills: "make the
51579
- * platform's definition of this skill match this manifest; no-op if it already
51580
- * does." Identity is name + account scope (the API key's org, else personal);
51581
- * environment is whichever API the client points at. `ensure` never deletes,
51582
- * and renaming a manifest orphans the old skill and creates a new one.
51583
- *
51584
- * This is the admin/control-plane converge — API scopes only, no review queue.
51585
- * It is NOT the deployed-agent `propose_skill` data plane.
51586
- *
51587
- * Wire protocol (POST /v1/skills/ensure — APQ-shaped, both APQ scars fixed):
51588
- * 1. Hash-only probe `{ name, contentHash }`. A match is
51589
- * `{ result: 'unchanged' }`; a miss is a NORMAL 200
51590
- * `{ result: 'definitionRequired' }`, never an error.
51591
- * 2. On a miss, retry with the full `definition`. The server recomputes the
51592
- * canonical hash itself and returns it on every response — this SDK echoes
51593
- * the server's hash (memoized per client instance) rather than trusting its
51594
- * own serialization.
51595
- *
51596
- * Like agents/flows (and unlike tools), skills HAVE version snapshots: every
51597
- * change appends an immutable version, the result carries a `versionId`, and
51598
- * `release: 'publish'` re-aims the published-version pointer.
51599
- *
51600
- * The content hash is the canonical skill hash (`computeSkillContentHash` —
51601
- * mirrored from `packages/shared/src/utils/skill-content-hash.ts`; this package
51602
- * is dependency-free by convention) over the manifest `{ frontmatter (name
51603
- * excluded), runtype, body }`. `name` is identity, not content.
51604
- *
51605
- * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
51606
- */
51607
-
51608
51612
  interface SkillContentInput {
51609
51613
  /** Identity — excluded from the hash. */
51610
51614
  name: string;
@@ -51710,22 +51714,6 @@ declare class SkillDriftError extends Error {
51710
51714
  constructor(plan: EnsureSkillPlan);
51711
51715
  }
51712
51716
 
51713
- /**
51714
- * SkillsNamespace — admin/control-plane operations for Agent Skills.
51715
- *
51716
- * Skills are loadable context bundles (SKILL.md + capability bindings) for
51717
- * deployed Runtype agents. This namespace wraps the admin REST surface
51718
- * (`/v1/skills`, `/v1/skill-proposals`) — governed by API scopes only, no
51719
- * review queue. The deployed-agent data plane (the `propose_skill` runtime
51720
- * tool) is intentionally NOT exposed here; authoring a skill via the SDK is
51721
- * authoring, and lands published when you ask it to.
51722
- *
51723
- * Types here mirror the canonical definitions in `@runtypelabs/shared`
51724
- * (`skill-manifest-types.ts`) and the `skills` / `skill_versions` /
51725
- * `agent_skill_bindings` / `skill_proposals` tables. Per SDK convention they
51726
- * are defined inline rather than imported, to keep the package dependency-free.
51727
- */
51728
-
51729
51717
  /** Lifecycle status of a skill. */
51730
51718
  type SkillStatus = 'draft' | 'active' | 'archived';
51731
51719
  /** Trust level recorded on a skill (governs UI warnings). */
@@ -52122,35 +52110,6 @@ declare class SkillsNamespace {
52122
52110
  pull(name: string): Promise<SkillPullResult>;
52123
52111
  }
52124
52112
 
52125
- /**
52126
- * AgentsNamespace — agent config-as-code: `defineAgent`, `ensure`, `pull`.
52127
- *
52128
- * `ensure` is a convergence postcondition, not a save button: "make the
52129
- * platform's definition of this agent match this object; no-op if it already
52130
- * does." Identity is name + account scope (the API key's org, else personal);
52131
- * environment is whichever API the client points at. `ensure` never deletes,
52132
- * and renaming a definition orphans the old agent and creates a new one.
52133
- *
52134
- * Wire protocol (POST /v1/agents/ensure — APQ-shaped, both APQ scars fixed):
52135
- * 1. Hash-only probe `{ name, contentHash }`. A match is
52136
- * `{ result: 'unchanged' }`; a miss is a NORMAL 200
52137
- * `{ result: 'definitionRequired' }`, never an error.
52138
- * 2. On a miss, retry with the full `definition`. The server recomputes the
52139
- * canonical hash itself and returns it on every response — this SDK
52140
- * echoes the server's hash (memoized per client instance) rather than
52141
- * trusting its own serialization.
52142
- *
52143
- * The content-hash implementation below is an INLINED COPY of
52144
- * `packages/shared/src/utils/agent-content-hash.ts` (this package is
52145
- * dependency-free by convention, mirroring the flow content hash in
52146
- * flows-namespace.ts). Parity is pinned by the shared fixture corpus in
52147
- * `packages/shared/test-fixtures/agent-content-hash/cases.json`, asserted by
52148
- * both packages' test suites. Change both copies (and regenerate the corpus)
52149
- * in the same PR.
52150
- *
52151
- * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
52152
- */
52153
-
52154
52113
  /** Canonical normalized form — must stay byte-identical to the shared impl. */
52155
52114
  declare function normalizeAgentDefinition(definition: {
52156
52115
  name: string;
@@ -52228,6 +52187,19 @@ interface AgentDefinitionConfig {
52228
52187
  profileTemplate?: string;
52229
52188
  injectSummary?: boolean;
52230
52189
  };
52190
+ /**
52191
+ * Durable-turn knobs (ADR 0020). `watchLeaseMs` is how long a streaming
52192
+ * caller is watched before the stream ends with `await` /
52193
+ * `awaitReason: 'detached'` (the turn keeps running server-side);
52194
+ * `maxBudgetMs` is the absolute wall-clock budget for one turn; `forced`
52195
+ * pins the lane past the policy. `null` on either duration is the wire-only
52196
+ * reset marker.
52197
+ */
52198
+ durability?: {
52199
+ watchLeaseMs?: number | null;
52200
+ maxBudgetMs?: number | null;
52201
+ forced?: 'durable' | 'in_process';
52202
+ };
52231
52203
  }
52232
52204
  /**
52233
52205
  * `defineAgent` input — the flat authoring shape: identity + presentation
@@ -52377,36 +52349,6 @@ declare class ExecutionsNamespace {
52377
52349
  getStatus(executionId: string): Promise<AsyncExecutionStatus>;
52378
52350
  }
52379
52351
 
52380
- /**
52381
- * Tool config-as-code: `defineTool`, `tools.ensure`, `tools.pull`.
52382
- *
52383
- * The deploy-time convergence postcondition for saved tools: "make the
52384
- * platform's definition of this tool match this object; no-op if it already
52385
- * does." Identity is name + account scope (the API key's org, else personal);
52386
- * environment is whichever API the client points at. `ensure` never deletes,
52387
- * and renaming a definition orphans the old tool and creates a new one.
52388
- *
52389
- * Wire protocol (POST /v1/tools/ensure — APQ-shaped, both APQ scars fixed):
52390
- * 1. Hash-only probe `{ name, contentHash }`. A match is
52391
- * `{ result: 'unchanged' }`; a miss is a NORMAL 200
52392
- * `{ result: 'definitionRequired' }`, never an error.
52393
- * 2. On a miss, retry with the full `definition`. The server recomputes the
52394
- * canonical hash itself and returns it on every response — this SDK
52395
- * echoes the server's hash (memoized per client instance) rather than
52396
- * trusting its own serialization.
52397
- *
52398
- * Unlike agents/flows, tools have NO version snapshots: there is no
52399
- * `release: 'publish'` option and no `versionId` on the result.
52400
- *
52401
- * The content hash is the canonical tool hash (`computeToolContentHash` —
52402
- * mirrored from `packages/shared/src/utils/tool-content-hash.ts`; this package
52403
- * is dependency-free by convention) over `{ toolType, description,
52404
- * parametersSchema, config }`. `name` is identity, not content, so it is
52405
- * excluded from the hash.
52406
- *
52407
- * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
52408
- */
52409
-
52410
52352
  /** Canonical normalized form of a tool definition (name excluded — identity). */
52411
52353
  declare function normalizeToolDefinition(definition: ToolContentInput): {
52412
52354
  toolType: string;
@@ -52520,14 +52462,6 @@ declare class ToolDriftError extends Error {
52520
52462
  constructor(plan: EnsureToolPlan);
52521
52463
  }
52522
52464
 
52523
- /**
52524
- * ToolsNamespace — config-as-code operations for saved tools.
52525
- *
52526
- * `tools.ensure` is the deploy-time, non-executing converge (create-or-update a
52527
- * tool by name + account scope); `tools.pull` is the absorb-drift direction.
52528
- * Both delegate to the implementation in `tools-ensure.ts`.
52529
- */
52530
-
52531
52465
  declare class ToolsNamespace {
52532
52466
  private getClient;
52533
52467
  constructor(getClient: () => RuntypeClient$1);
@@ -52561,42 +52495,6 @@ declare class ToolsNamespace {
52561
52495
  pull(name: string): Promise<ToolPullResult>;
52562
52496
  }
52563
52497
 
52564
- /**
52565
- * Product config-as-code: `defineProduct`, `products.ensure`, `products.pull`.
52566
- *
52567
- * The deploy-time convergence postcondition for the top-level product record:
52568
- * "make the platform's definition of this product match this object; no-op if
52569
- * it already does." Identity is name + account scope (the API key's org, else
52570
- * personal); environment is whichever API the client points at. `ensure` never
52571
- * deletes, and renaming a definition orphans the old product and creates a new
52572
- * one.
52573
- *
52574
- * SCOPE (v1): the converge covers the TOP-LEVEL product record only — name
52575
- * (identity), description, icon, and the `spec` (ProductSpec). It does NOT
52576
- * converge nested capabilities/surfaces/tools/records/schedules, and it does
52577
- * NOT converge `canvas` (architecture-viewer UI layout state).
52578
- *
52579
- * Wire protocol (POST /v1/products/ensure — APQ-shaped, both APQ scars fixed):
52580
- * 1. Hash-only probe `{ name, contentHash }`. A match is
52581
- * `{ result: 'unchanged' }`; a miss is a NORMAL 200
52582
- * `{ result: 'definitionRequired' }`, never an error.
52583
- * 2. On a miss, retry with the full `definition`. The server recomputes the
52584
- * canonical hash itself and returns it on every response — this SDK
52585
- * echoes the server's hash (memoized per client instance) rather than
52586
- * trusting its own serialization.
52587
- *
52588
- * Unlike agents/flows, products have NO version snapshots: there is no
52589
- * `release: 'publish'` option and no `versionId` on the result.
52590
- *
52591
- * The content hash is the canonical product hash (`computeProductContentHash` —
52592
- * mirrored from `packages/shared/src/utils/product-content-hash.ts`; this
52593
- * package is dependency-free by convention) over `{ description, icon, spec }`.
52594
- * `name` is identity, not content, so it is excluded from the hash; `canvas` is
52595
- * UI state and is excluded too.
52596
- *
52597
- * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
52598
- */
52599
-
52600
52498
  /** Canonical normalized form of a product definition (name + canvas excluded). */
52601
52499
  declare function normalizeProductDefinition(definition: ProductContentInput): {
52602
52500
  description?: string;
@@ -52698,25 +52596,6 @@ declare class ProductDriftError extends Error {
52698
52596
  constructor(plan: EnsureProductPlan);
52699
52597
  }
52700
52598
 
52701
- /**
52702
- * SDK config-as-code converge for an entire Full Product Object (FPO).
52703
- *
52704
- * `products.ensureFpo` converges the whole nested product graph in one request
52705
- * by POSTing the FPO to `POST /v1/products/ensure-fpo`, where the server fans
52706
- * out to the per-entity ensure services. Unlike `products.ensure` (top-level
52707
- * record only), there is no hash-only probe in this release: the full FPO is
52708
- * always shipped and the server returns the canonical whole-FPO hash + a
52709
- * per-entity report. (The hash-only fast-probe lands once the server persists a
52710
- * per-product FPO hash — see the plan's PR3.)
52711
- *
52712
- * `computeFpoContentHash` is inlined here (the SDK avoids a `@runtypelabs/shared`
52713
- * dependency) and pinned byte-for-byte against the canonical implementation by
52714
- * the shared fixture corpus (`packages/shared/test-fixtures/fpo-content-hash/`)
52715
- * asserted from BOTH packages. A normalization change in
52716
- * `packages/shared/src/utils/fpo-content-hash.ts` MUST be mirrored here in the
52717
- * same PR.
52718
- */
52719
-
52720
52599
  /** An FPO for hashing/sending. Permissive — the server validates the rich contract. */
52721
52600
  type FpoInput = Record<string, unknown>;
52722
52601
  /**
@@ -52791,18 +52670,6 @@ declare function ensureFpo(client: RuntypeClient$1, fpo: FpoInput, options?: Ens
52791
52670
  */
52792
52671
  declare function pullFpo(client: RuntypeClient$1, name: string): Promise<PullFpoResult>;
52793
52672
 
52794
- /**
52795
- * ProductsNamespace — config-as-code operations for products.
52796
- *
52797
- * `products.ensure` is the deploy-time, non-executing converge (create-or-update
52798
- * a product by name + account scope); `products.pull` is the absorb-drift
52799
- * direction. Both delegate to the implementation in `products-ensure.ts`.
52800
- *
52801
- * SCOPE (v1): the converge covers the top-level product record only
52802
- * (description, icon, spec). Nested capabilities/surfaces/tools and the
52803
- * `canvas` UI layout state are not converged.
52804
- */
52805
-
52806
52673
  declare class ProductsNamespace {
52807
52674
  private getClient;
52808
52675
  constructor(getClient: () => RuntypeClient$1);
@@ -52869,38 +52736,6 @@ declare class ProductsNamespace {
52869
52736
  pullFpo(name: string): Promise<PullFpoResult>;
52870
52737
  }
52871
52738
 
52872
- /**
52873
- * Surface config-as-code: `defineSurface`, `surfaces.ensure`, `surfaces.pull`.
52874
- *
52875
- * The deploy-time convergence postcondition for product surfaces: "make the
52876
- * platform's definition of this surface match this object; no-op if it already
52877
- * does." Surfaces are PRODUCT-scoped: identity is (productId, name) — NOT
52878
- * account scope. `ensure` never deletes, and renaming a definition orphans the
52879
- * old surface and creates a new one.
52880
- *
52881
- * Wire protocol (POST /v1/products/{id}/surfaces/ensure — APQ-shaped, both APQ
52882
- * scars fixed):
52883
- * 1. Hash-only probe `{ name, contentHash }`. A match is
52884
- * `{ result: 'unchanged' }`; a miss is a NORMAL 200
52885
- * `{ result: 'definitionRequired' }`, never an error.
52886
- * 2. On a miss, retry with the full `definition`. The server recomputes the
52887
- * canonical hash itself and returns it on every response — this SDK echoes
52888
- * the server's hash (memoized per client instance) rather than trusting
52889
- * its own serialization.
52890
- *
52891
- * Unlike agents/flows, surfaces have NO version snapshots: there is no
52892
- * `release: 'publish'` option and no `versionId` on the result.
52893
- *
52894
- * The content hash is the canonical surface hash (`computeSurfaceContentHash` —
52895
- * mirrored from `packages/shared/src/utils/surface-content-hash.ts`; this
52896
- * package is dependency-free by convention) over `{ type, behavior, status,
52897
- * environment }`. `name` is identity, not content, so it is excluded; `inbound` /
52898
- * `outbound` are also EXCLUDED — they carry sealed secrets that hash
52899
- * non-deterministically against the stored row (see `normalizeSurfaceDefinition`).
52900
- *
52901
- * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
52902
- */
52903
-
52904
52739
  /**
52905
52740
  * Canonical normalized form of a surface definition (name excluded — identity).
52906
52741
  * `inbound` / `outbound` are EXCLUDED — they carry sealed secrets that hash
@@ -53022,16 +52857,6 @@ declare class SurfaceDriftError extends Error {
53022
52857
  constructor(plan: EnsureSurfacePlan);
53023
52858
  }
53024
52859
 
53025
- /**
53026
- * SurfacesNamespace — config-as-code operations for product surfaces.
53027
- *
53028
- * `surfaces.ensure` is the deploy-time, non-executing converge (create-or-update
53029
- * a surface by name within a product); `surfaces.pull` is the absorb-drift
53030
- * direction. Both delegate to the implementation in `surfaces-ensure.ts`.
53031
- *
53032
- * Surfaces are PRODUCT-scoped: every operation takes the owning `productId`.
53033
- */
53034
-
53035
52860
  declare class SurfacesNamespace {
53036
52861
  private getClient;
53037
52862
  constructor(getClient: () => RuntypeClient$1);
@@ -53064,49 +52889,6 @@ declare class SurfacesNamespace {
53064
52889
  pull(productId: string, name: string): Promise<SurfacePullResult>;
53065
52890
  }
53066
52891
 
53067
- /**
53068
- * Runtype - The unified SDK client for building and executing flows, batches, evals, and prompts
53069
- *
53070
- * Provides a fluent API with static namespaces for all product areas.
53071
- *
53072
- * @example
53073
- * ```typescript
53074
- * import { Runtype } from '@runtypelabs/sdk'
53075
- *
53076
- * // Global configuration (once per app)
53077
- * Runtype.configure({ apiKey: process.env.RUNTYPE_API_KEY })
53078
- *
53079
- * // Build and stream a flow
53080
- * const stream = await Runtype.flows.upsert({ name: 'My Flow' })
53081
- * .withRecord({ name: 'Test', metadata: {} })
53082
- * .prompt({ name: 'Analyze', model: 'gpt-4o', userPrompt: '...' })
53083
- * .stream()
53084
- *
53085
- * // Get complete result
53086
- * const result = await Runtype.flows.use('flow_123')
53087
- * .withRecord({ name: 'Test' })
53088
- * .result()
53089
- *
53090
- * // Schedule a batch
53091
- * const batch = await Runtype.batches.schedule({
53092
- * flowId: 'flow_123',
53093
- * recordType: 'customers',
53094
- * })
53095
- *
53096
- * // Run an eval with streaming
53097
- * const evalStream = await Runtype.evals.run({
53098
- * flowId: 'flow_123',
53099
- * recordType: 'test_data',
53100
- * models: [{ stepName: 'Analyze', model: 'gpt-4o' }]
53101
- * }).stream()
53102
- *
53103
- * // Execute a prompt
53104
- * const promptResult = await Runtype.prompts.run('prompt_123', {
53105
- * recordId: 'rec_456'
53106
- * }).result()
53107
- * ```
53108
- */
53109
-
53110
52892
  interface RuntypeConfig {
53111
52893
  /** API key for authentication */
53112
52894
  apiKey?: string;
@@ -53194,9 +52976,46 @@ declare class RuntypeClient$1 {
53194
52976
  private transformResponse;
53195
52977
  }
53196
52978
  /**
53197
- * Runtype - Main entry point for the SDK
52979
+ * Runtype - The unified SDK client for building and executing flows, batches, evals, and prompts.
52980
+ *
52981
+ * Provides a fluent API with static namespaces for all product areas.
52982
+ *
52983
+ * @example
52984
+ * ```typescript
52985
+ * import { Runtype } from '@runtypelabs/sdk'
52986
+ *
52987
+ * // Global configuration (once per app)
52988
+ * Runtype.configure({ apiKey: process.env.RUNTYPE_API_KEY })
53198
52989
  *
53199
- * Use static methods and namespaces to interact with the API.
52990
+ * // Build and stream a flow
52991
+ * const stream = await Runtype.flows.upsert({ name: 'My Flow' })
52992
+ * .withRecord({ name: 'Test', metadata: {} })
52993
+ * .prompt({ name: 'Analyze', model: 'gpt-4o', userPrompt: '...' })
52994
+ * .stream()
52995
+ *
52996
+ * // Get complete result
52997
+ * const result = await Runtype.flows.use('flow_123')
52998
+ * .withRecord({ name: 'Test' })
52999
+ * .result()
53000
+ *
53001
+ * // Schedule a batch
53002
+ * const batch = await Runtype.batches.schedule({
53003
+ * flowId: 'flow_123',
53004
+ * recordType: 'customers',
53005
+ * })
53006
+ *
53007
+ * // Run an eval with streaming
53008
+ * const evalStream = await Runtype.evals.run({
53009
+ * flowId: 'flow_123',
53010
+ * recordType: 'test_data',
53011
+ * models: [{ stepName: 'Analyze', model: 'gpt-4o' }]
53012
+ * }).stream()
53013
+ *
53014
+ * // Execute a prompt
53015
+ * const promptResult = await Runtype.prompts.run('prompt_123', {
53016
+ * recordId: 'rec_456'
53017
+ * }).result()
53018
+ * ```
53200
53019
  */
53201
53020
  declare class Runtype {
53202
53021
  /**
@@ -53445,6 +53264,90 @@ declare class Runtype {
53445
53264
  static get surfaces(): SurfacesNamespace;
53446
53265
  }
53447
53266
 
53267
+ /**
53268
+ * Transparent reconnect for a DETACHED agent stream (ADR 0020 point 6;
53269
+ * blueprint `2026-08-25-durable-by-default-agent-turns.md` §4).
53270
+ *
53271
+ * ## What the server does
53272
+ *
53273
+ * A durable agent turn runs inside a Durable Object, and the socket it streams
53274
+ * over carries a WATCH LEASE (10 minutes by default), not the turn's lifetime.
53275
+ * When the lease expires the server emits a unified `await` frame with
53276
+ * `awaitReason: 'detached'` and CLOSES the stream — the execution keeps running
53277
+ * server-side. Detach is part of the public contract, not an error:
53278
+ *
53279
+ * id: 118
53280
+ * event: await
53281
+ * data: {"type":"await","awaitReason":"detached","executionId":"aex_…",…}
53282
+ *
53283
+ * Raw-HTTP consumers get documented behavior. The SDKs are expected to follow
53284
+ * it, which is what this module does: it reopens the turn through the events
53285
+ * route with `?after=<last SSE id>` and keeps yielding frames until a real
53286
+ * terminal arrives.
53287
+ *
53288
+ * ## Why it wraps the stream rather than the callbacks
53289
+ *
53290
+ * `executeStream` is the single place every consumer goes through
53291
+ * (`executeWithCallbacks` and the local-tool loop both build on it), so
53292
+ * wrapping the `Response` body makes reconnect transparent for all of them at
53293
+ * once — and for a caller reading the raw stream by hand.
53294
+ *
53295
+ * Bytes are forwarded VERBATIM. This is not a re-encoder: it parses complete
53296
+ * SSE blocks only to observe three things (the last `id:`, the executionId, and
53297
+ * whether a terminal or a detach frame went by), and passes the original text
53298
+ * straight through. That matters because the `id:` line IS the relay cursor —
53299
+ * re-stamping it would break the very reconnect this exists to perform.
53300
+ *
53301
+ * ## Cursor and duplicate-freedom
53302
+ *
53303
+ * The server replays strictly AFTER the cursor, so a reconnect produces no
53304
+ * duplicates. A cursor that is malformed or lost fails OPEN to a replay from
53305
+ * the start of the turn, which is why the last-seen `id:` is tracked as the
53306
+ * raw string rather than being parsed into a number here.
53307
+ *
53308
+ * ## The detach frame is not swallowed
53309
+ *
53310
+ * It is forwarded like any other frame. The wire vocabulary is unchanged, so a
53311
+ * consumer that renders `await` states keeps rendering this one; the difference
53312
+ * is only that the stream no longer ENDS there.
53313
+ *
53314
+ * The Python SDK mirrors this behavior — a follow-up, tracked with the rest of
53315
+ * the SDK work in the blueprint's §4 slice 2.
53316
+ */
53317
+ /**
53318
+ * How many times a single logical turn may be re-opened. A detached turn is
53319
+ * bounded by its absolute budget (30 minutes by default, 24 hours at most) and
53320
+ * each leg covers a full watch lease, so this is a safety stop against a server
53321
+ * that detaches immediately and repeatedly — not a normal-path limit.
53322
+ */
53323
+ declare const DEFAULT_MAX_DETACHED_RECONNECTS = 12;
53324
+ interface DetachedReconnectOptions {
53325
+ /**
53326
+ * Turn transparent reconnect OFF and hand back the raw stream, ending at the
53327
+ * detach frame. The documented escape hatch: a caller that wants to own the
53328
+ * reconnect (its own backoff, its own cursor storage, a handoff to another
53329
+ * process) sets this and drives the events route itself.
53330
+ */
53331
+ autoReconnect?: boolean;
53332
+ /** Safety stop; see {@link DEFAULT_MAX_DETACHED_RECONNECTS}. */
53333
+ maxReconnects?: number;
53334
+ /** Milliseconds to wait before each reconnect attempt. */
53335
+ reconnectDelayMs?: number;
53336
+ }
53337
+ /** Open the next leg of a detached turn. Returns `null` when it cannot. */
53338
+ type DetachedReattach = (args: {
53339
+ executionId: string;
53340
+ after: string;
53341
+ signal?: AbortSignal;
53342
+ }) => Promise<Response | null>;
53343
+ /**
53344
+ * Wrap a durable-turn SSE `Response` so a detach transparently continues.
53345
+ *
53346
+ * A non-streaming or failed response is returned untouched — there is nothing
53347
+ * to follow, and swallowing it here would hide the error from the caller.
53348
+ */
53349
+ declare function withDetachedReconnect(response: Response, reattach: DetachedReattach, options?: DetachedReconnectOptions): Response;
53350
+
53448
53351
  /**
53449
53352
  * Agent API key request types.
53450
53353
  *
@@ -53894,15 +53797,6 @@ type TypedCreateRecordRequest<S extends string> = Omit<CreateRecordRequest, 'typ
53894
53797
  metadata?: CollectionMeta<S>;
53895
53798
  };
53896
53799
 
53897
- /**
53898
- * Pluggable workflow architecture for marathon task execution.
53899
- *
53900
- * A WorkflowDefinition describes the phases an agent goes through
53901
- * (e.g. research → planning → execution) and the rules for each phase.
53902
- * The default implementation mirrors the existing hardcoded behavior;
53903
- * consumers can supply custom workflows for different strategies (TDD, etc.).
53904
- */
53905
-
53906
53800
  interface RunTaskStateSlice {
53907
53801
  agentId: string;
53908
53802
  taskName: string;
@@ -54044,10 +53938,6 @@ interface WorkflowDefinition {
54044
53938
  buildCandidateBlock?: (state: RunTaskStateSlice) => string;
54045
53939
  }
54046
53940
 
54047
- /**
54048
- * API endpoint handlers with automatic camelCase/snake_case transformation
54049
- */
54050
-
54051
53941
  interface ApiClient {
54052
53942
  get<T>(path: string, params?: {
54053
53943
  [key: string]: any;
@@ -55263,7 +55153,7 @@ interface AgentMediaEvent extends BaseAgentEvent {
55263
55153
  *
55264
55154
  * Local SDK copy of `ExternalAgentContext` from `@runtypelabs/shared`'s
55265
55155
  * `sse-parser.ts`. The SDK has zero production dependencies and
55266
- * re-derives wire types by design (Phase 9 — see
55156
+ * re-derives wire types by design (see
55267
55157
  * `docs/features/shipped/2026-02-25-user-cloud-deployment.md`). Keep
55268
55158
  * the shape identical to `@runtypelabs/shared`'s `ExternalAgentContext`.
55269
55159
  */
@@ -55298,7 +55188,7 @@ interface AgentElicitationRequest {
55298
55188
  *
55299
55189
  * Local SDK copy of `unifiedElicitationSchema` from `@runtypelabs/shared`'s
55300
55190
  * `unified-sse-event-schemas.ts`. The SDK has zero production dependencies and
55301
- * re-derives wire types by design (Phase 9). Keep the shape identical.
55191
+ * re-derives wire types by design. Keep the shape identical.
55302
55192
  */
55303
55193
  interface AgentElicitation {
55304
55194
  /** `form` answers with text; `url` sends the human to {@link url} first. */
@@ -56112,6 +56002,45 @@ interface Agent {
56112
56002
  createdAt: string;
56113
56003
  updatedAt: string;
56114
56004
  }
56005
+ /**
56006
+ * Durable-turn admission controls (ADR 0020), sent as request headers on
56007
+ * `POST /agents/{id}/execute`.
56008
+ *
56009
+ * The route declares all three, so they are in the published spec and in every
56010
+ * generated SDK; this bag is the hand-written namespace's equivalent. Each is
56011
+ * optional, and sending none of them leaves the wire behavior of the call
56012
+ * exactly as it was. They are read only by the durable lane: a turn that
56013
+ * resolves to the in-process lane ignores them.
56014
+ */
56015
+ interface AgentAdmissionOptions {
56016
+ /**
56017
+ * What to do when the conversation already has a turn in flight. `reject`
56018
+ * (the default when omitted) answers `CONVERSATION_BUSY`; `supersede`
56019
+ * cancels the incumbent and takes over; `queue` runs after it.
56020
+ */
56021
+ concurrency?: 'reject' | 'supersede' | 'queue';
56022
+ /**
56023
+ * Fold this request into an already-pending turn for the same conversation
56024
+ * instead of starting a second one. The response is the pending execution.
56025
+ */
56026
+ coalesce?: boolean;
56027
+ /**
56028
+ * Caller-chosen key that makes admission idempotent: a retry with the same
56029
+ * key returns the ORIGINAL execution rather than starting a second turn, and
56030
+ * consumes no additional quota.
56031
+ */
56032
+ idempotencyKey?: string;
56033
+ }
56034
+ /**
56035
+ * Project {@link AgentAdmissionOptions} onto the three wire headers.
56036
+ *
56037
+ * Absent fields emit no header at all, because the route distinguishes "header
56038
+ * omitted" from "header sent with the default value" only for `coalesce`
56039
+ * (`'true'` is the sole accepted value; anything else starts a new turn) — but
56040
+ * emitting nothing for every absent field keeps a caller that passes `{}`
56041
+ * byte-identical to one that passes nothing.
56042
+ */
56043
+ declare function buildAgentAdmissionHeaders(options?: AgentAdmissionOptions): Record<string, string>;
56115
56044
  /**
56116
56045
  * Agents endpoint handlers
56117
56046
  */
@@ -56183,9 +56112,9 @@ declare class AgentsEndpoint {
56183
56112
  /**
56184
56113
  * Execute an agent (non-streaming)
56185
56114
  */
56186
- execute(id: string, data: AgentExecuteRequest): Promise<AgentExecuteResponse>;
56115
+ execute(id: string, data: AgentExecuteRequest, options?: AgentAdmissionOptions): Promise<AgentExecuteResponse>;
56187
56116
  /** Start an agent execution and return its durable handle immediately. */
56188
- executeAsync(id: string, data: AgentExecuteRequest): Promise<AsyncExecutionHandle>;
56117
+ executeAsync(id: string, data: AgentExecuteRequest, options?: AgentAdmissionOptions): Promise<AsyncExecutionHandle>;
56189
56118
  /**
56190
56119
  * Execute an agent with streaming response
56191
56120
  *
@@ -56206,7 +56135,17 @@ declare class AgentsEndpoint {
56206
56135
  */
56207
56136
  executeStream(id: string, data: AgentExecuteRequest, init?: {
56208
56137
  signal?: AbortSignal;
56209
- }): Promise<Response>;
56138
+ } & DetachedReconnectOptions & AgentAdmissionOptions): Promise<Response>;
56139
+ /**
56140
+ * The `?after=` reattach leg every durable agent stream is followed with.
56141
+ *
56142
+ * Shared by `executeStream` and by the local-tool loop's RESUME leg: a
56143
+ * durable resume answers on the same watch-lease contract as the original
56144
+ * execute, so its socket can close on `awaitReason: 'detached'` too. Building
56145
+ * it once is what keeps the two from drifting into different cursor or
56146
+ * conversation-key behavior.
56147
+ */
56148
+ private buildDetachedReattach;
56210
56149
  /**
56211
56150
  * Execute an agent with streaming and callbacks
56212
56151
  *
@@ -56788,18 +56727,6 @@ declare class ToolApprovalGrantsEndpoint {
56788
56727
  }>;
56789
56728
  }
56790
56729
 
56791
- /**
56792
- * @layer sdk
56793
- * @case camelCase (SDK and API both use native camelCase - no conversion needed)
56794
- *
56795
- * Main Runtype API Client.
56796
- *
56797
- * The SDK and API both use native camelCase for all request/response bodies.
56798
- * No case transformation is performed.
56799
- *
56800
- * @see packages/client/src/transform.ts for pass-through utilities
56801
- */
56802
-
56803
56730
  type LocalToolHandler = (args: unknown) => Promise<unknown>;
56804
56731
  /**
56805
56732
  * Richer local tool entry that pairs a handler with the wire schema the
@@ -57081,44 +57008,6 @@ declare function parseOffloadedOutputId(value: string): string | undefined;
57081
57008
  /** Parse the tree-log-relative artifact path out of a ledger offload reference. */
57082
57009
  declare function parseLedgerArtifactRelativePath(value: string): string | undefined;
57083
57010
 
57084
- /**
57085
- * Unified wire → stable SDK callback adapter (the client-side mirror of the api's
57086
- * `apps/api/src/lib/unified-event-stream.ts`).
57087
- *
57088
- * As of the unified-SSE cutover (runtypelabs/core unified-sse-default) the
57089
- * execution streams the SDK consumes — `/dispatch`, `/dispatch/resume`,
57090
- * `/agents/{id}/execute`, `/agents/{id}/resume` — use the 35-event unified
57091
- * vocabulary (`unifiedSSEEventSchema` in `@runtypelabs/shared`). The SDK
57092
- * translates those frames back into its stable, hand-written callback shapes
57093
- * here.
57094
- *
57095
- * Why translate instead of rewriting every consumer switch: the SDK's public
57096
- * callback contracts (`StreamCallbacks`, `AgentStreamCallbacks`) and their event
57097
- * types are part of the published surface. Reversing the wire at the parse
57098
- * boundary moves the SDK onto the unified format on the wire while keeping that
57099
- * surface byte-stable for downstream consumers. The translation is the inverse
57100
- * of the api edge translator's mapping table
57101
- * (`docs/features/planning/2026-06-16-persona-sse-event-merged-spec.md`).
57102
- *
57103
- * Scope: only the events the SDK's consumers actually read are reconstructed;
57104
- * everything else (artifact channel, `source`, the `state_snapshot` /
57105
- * `state_delta` agent-state channel, `custom`, fallback live-beat, `step_skip`)
57106
- * maps to zero callback events. The state channel is recognized as unified
57107
- * vocabulary (so `isUnifiedEventType` is true and the wire union stays exhaustive)
57108
- * but has no stable SDK callback shape to project onto; surfacing it to the SDK
57109
- * callback surface is a separate additive slice, not a wire-translation concern.
57110
- * Two unified-contract folds are NOT reconstructed because the unified
57111
- * vocabulary deliberately discards them:
57112
- * - `agent_iteration_start` / `agent_iteration_complete` are folded into the
57113
- * `iteration` field on turn/tool frames, so `onIterationStart` /
57114
- * `onIterationComplete` no longer fire.
57115
- * - the additive `fallback` summary on `step_complete` / `turn_complete` is
57116
- * dropped (the SDK callback surface never consumed `fallback_*` events).
57117
- *
57118
- * Each translator is STATEFUL (channel block ids, current step/turn/iteration,
57119
- * media accumulation) and therefore must be constructed once PER STREAM — never
57120
- * shared across executions.
57121
- */
57122
57011
  type Json = Record<string, unknown>;
57123
57012
  /**
57124
57013
  * @deprecated Unified events are now the only public execution-stream format.
@@ -57264,41 +57153,6 @@ declare class ClientBatchBuilder extends BatchBuilder {
57264
57153
  run(): Promise<BatchResult>;
57265
57154
  }
57266
57155
 
57267
- /**
57268
- * EvalBuilder - Fluent builder for evaluation runs
57269
- *
57270
- * Provides a chainable API for building evaluation configurations
57271
- * that test flows against records with model overrides and comparisons.
57272
- *
57273
- * @example
57274
- * ```typescript
57275
- * import { EvalBuilder } from '@runtypelabs/sdk'
57276
- *
57277
- * // Single model eval with overrides
57278
- * const eval1 = await new EvalBuilder()
57279
- * .useFlow('flow_abc123')
57280
- * .forRecordType('test_data')
57281
- * .withModelOverrides([{ stepName: 'Analyze', model: 'gpt-4o' }])
57282
- * .run(apiClient)
57283
- *
57284
- * // Multi-model comparison
57285
- * const eval2 = await new EvalBuilder()
57286
- * .useFlow('flow_abc123')
57287
- * .forRecordType('test_data')
57288
- * .compareModels([
57289
- * { stepName: 'Analyze', model: 'gpt-5.4' },
57290
- * { stepName: 'Analyze', model: 'claude-opus-4-6' },
57291
- * ])
57292
- * .run(apiClient)
57293
- *
57294
- * // Virtual flow eval
57295
- * const eval3 = await new EvalBuilder()
57296
- * .useVirtualFlow(flowBuilder)
57297
- * .forRecordType('test_data')
57298
- * .run(apiClient)
57299
- * ```
57300
- */
57301
-
57302
57156
  interface ModelOverride {
57303
57157
  /** Name of the step to override */
57304
57158
  stepName: string;
@@ -57490,16 +57344,6 @@ declare class ClientEvalBuilder extends EvalBuilder {
57490
57344
  run(): Promise<EvalResult>;
57491
57345
  }
57492
57346
 
57493
- /**
57494
- * SDK Code Generation Metadata
57495
- *
57496
- * Type-safe field registry for generating SDK code from flow step configs.
57497
- * Co-located with the step config interfaces so that adding or removing a
57498
- * field on any config interface produces a compile error here, preventing
57499
- * silent drift between the SDK and downstream code generators (e.g. the
57500
- * dashboard's sdk-code-generator.ts).
57501
- */
57502
-
57503
57347
  /** How to serialize a field value into TypeScript source code. */
57504
57348
  type FieldFormat = 'json' | 'template' | 'raw' | 'value';
57505
57349
  /** Describes one field in a step config for code emission. */
@@ -58215,20 +58059,6 @@ declare const STEP_TYPE_TO_METHOD: {
58215
58059
  readonly 'memory-summary': "memorySummary";
58216
58060
  };
58217
58061
 
58218
- /**
58219
- * Named workflow hook registry.
58220
- *
58221
- * Workflow configs (the data form compiled by `compileWorkflowConfig`) can
58222
- * reference behavior by name instead of carrying functions: `builtin:*` names
58223
- * are reserved for the hooks that power the default workflow, and consumers
58224
- * register their own under a custom namespace (e.g. `acme:my-completion`).
58225
- *
58226
- * Every hook declares which SLOT KIND it implements so a config that wires a
58227
- * hook into the wrong slot fails at load/compile time with an actionable
58228
- * error — not mid-marathon. Hook misfires in this system don't crash, they
58229
- * stall, which is the worst failure mode to debug.
58230
- */
58231
-
58232
58062
  interface WorkflowHookSignatures {
58233
58063
  /** WorkflowPhase.buildInstructions — used verbatim (no header is added) */
58234
58064
  instructions: (state: RunTaskStateSlice) => string;
@@ -58282,27 +58112,6 @@ declare function listWorkflowHooks(): Array<{
58282
58112
  /** Test seam: remove a custom hook (builtin entries cannot be removed). */
58283
58113
  declare function unregisterWorkflowHook(name: string): boolean;
58284
58114
 
58285
- /**
58286
- * Declarative workflow configs and the compiler that turns them into a
58287
- * `WorkflowDefinition`.
58288
- *
58289
- * This is the single compile path for marathon workflows-as-data: the CLI
58290
- * playbook loader parses YAML/JSON into a `WorkflowConfig` and delegates here,
58291
- * and the shipped default workflow is itself a `WorkflowConfig`
58292
- * (`defaultWorkflowConfig` in default-workflow.ts) compiled through the same
58293
- * function — so playbooks and the default cannot drift in semantics.
58294
- *
58295
- * Each behavior slot accepts either INLINE DATA (strings, declarative
58296
- * criteria, policy rules) or a HOOK REFERENCE (`"<namespace>:<id>"`, see
58297
- * hook-registry.ts) resolved against the registry with slot-kind validation
58298
- * at compile time.
58299
- *
58300
- * The compiler is environment-free: no fs, no YAML, no glob library. Glob
58301
- * matching for policy rules is injected via `WorkflowCompileDeps` (the CLI
58302
- * passes micromatch); configs that use glob policies without a matcher fail
58303
- * at compile time with an actionable error.
58304
- */
58305
-
58306
58115
  declare const DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS = 2;
58307
58116
  /** A `"<namespace>:<id>"` reference into the workflow hook registry. */
58308
58117
  type WorkflowHookRef = string;
@@ -58447,14 +58256,6 @@ declare function buildPolicyGuidance(policy?: WorkflowPolicyConfig): string[];
58447
58256
  */
58448
58257
  declare function compileWorkflowConfig(config: WorkflowConfig, deps?: WorkflowCompileDeps): WorkflowDefinition;
58449
58258
 
58450
- /**
58451
- * Default marathon workflow: research → planning → execution.
58452
- *
58453
- * This is a data-driven extraction of the previously hardcoded logic
58454
- * in AgentsEndpoint. It handles both "modify" and "create" task variants
58455
- * via the `workflowVariant` / `isCreationTask` flags on state.
58456
- */
58457
-
58458
58259
  /**
58459
58260
  * Register the default workflow's behaviors as `builtin:*` hooks. Idempotent.
58460
58261
  * Importing this module (or anything that pulls in `defaultWorkflow`) calls it
@@ -58474,58 +58275,10 @@ declare function ensureDefaultWorkflowHooks(): void;
58474
58275
  declare const defaultWorkflowConfig: WorkflowConfig;
58475
58276
  declare const defaultWorkflow: WorkflowDefinition;
58476
58277
 
58477
- /**
58478
- * Deploy workflow: scaffold → deploy.
58479
- *
58480
- * A streamlined two-phase workflow for tasks where the goal is to build
58481
- * code and deploy it to a sandbox with a live preview URL, rather than
58482
- * editing files in the local repository.
58483
- *
58484
- * Phase 1 (scaffold): Understand what the user wants built. Quick —
58485
- * auto-advances after the agent has acknowledged the task.
58486
- *
58487
- * Phase 2 (deploy): Write code and call deploy_sandbox to get a live
58488
- * preview URL. Iterate on errors until the deployment succeeds.
58489
- */
58490
-
58491
58278
  declare const deployWorkflow: WorkflowDefinition;
58492
58279
 
58493
- /**
58494
- * Game workflow: design → build → verify.
58495
- *
58496
- * A three-phase workflow for tasks where the goal is to build a game
58497
- * (Three.js, Phaser, WebGL, etc.) and deploy it to a Daytona sandbox.
58498
- *
58499
- * The key difference from the deploy workflow is that game code often
58500
- * uses template literals, which break when embedded inside Express
58501
- * `res.send()` template literals. This workflow instructs the agent to
58502
- * use the `files` parameter for multi-file deployment (Express static
58503
- * server + separate HTML/JS/CSS files).
58504
- *
58505
- * Phase 1 (design): Understand game requirements. Auto-advances after
58506
- * the first session.
58507
- *
58508
- * Phase 2 (build): Write game code using multi-file deployment. The
58509
- * agent uses `code` for a minimal Express static server and `files`
58510
- * for the actual game assets (HTML, JS, CSS).
58511
- *
58512
- * Phase 3 (verify): Confirm the game is running and playable. Auto-
58513
- * accepts completion when deploy_sandbox has succeeded.
58514
- */
58515
-
58516
58280
  declare const gameWorkflow: WorkflowDefinition;
58517
58281
 
58518
- /**
58519
- * Helpers for WorkflowDefinition.stallPolicy: what happens when an agent
58520
- * produces consecutive sessions with no tool actions.
58521
- *
58522
- * All thresholds count the run-level `consecutiveEmptySessions` counter (a
58523
- * session is empty when it performed no write/read/discovery/verification
58524
- * tool action), so narration-only sessions escalate here even though they
58525
- * carry text output. Absent policy values preserve the legacy behavior:
58526
- * no nudge, no escalation signal, stop after 3.
58527
- */
58528
-
58529
58282
  declare const DEFAULT_STALL_STOP_AFTER = 3;
58530
58283
  /** Resolve how many consecutive empty sessions end the run as 'stalled'. */
58531
58284
  declare function resolveStallStopAfter(policy?: WorkflowStallPolicy): number;
@@ -58562,4 +58315,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
58562
58315
  declare function getDefaultPlanPath(taskName: string): string;
58563
58316
  declare function sanitizeTaskSlug(taskName: string): string;
58564
58317
 
58565
- export { type AIGrader, type Agent, 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_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 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 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 SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, 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 VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, 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, withUnifiedEvents };
58318
+ 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 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 SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, 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 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, 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 };