@runtypelabs/persona 4.22.0 → 4.22.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.
Files changed (93) hide show
  1. package/dist/animations/glyph-cycle.d.cts +1 -1
  2. package/dist/animations/glyph-cycle.d.ts +1 -1
  3. package/dist/animations/{types-B_JdVK9o.d.cts → types-9Vxm-PPz.d.cts} +136 -6
  4. package/dist/animations/{types-B_JdVK9o.d.ts → types-9Vxm-PPz.d.ts} +136 -6
  5. package/dist/animations/wipe.d.cts +1 -1
  6. package/dist/animations/wipe.d.ts +1 -1
  7. package/dist/animations-extra.d.cts +136 -6
  8. package/dist/animations-extra.d.ts +136 -6
  9. package/dist/approval-ui.d.cts +148 -14
  10. package/dist/approval-ui.d.ts +148 -14
  11. package/dist/artifacts-ui.d.cts +148 -14
  12. package/dist/artifacts-ui.d.ts +148 -14
  13. package/dist/codegen.cjs +1 -1
  14. package/dist/codegen.js +1 -1
  15. package/dist/context-mentions.d.cts +148 -14
  16. package/dist/context-mentions.d.ts +148 -14
  17. package/dist/event-stream-view-GL3ADRY2.js +1 -0
  18. package/dist/event-stream-view.cjs +1 -1
  19. package/dist/event-stream-view.d.cts +148 -14
  20. package/dist/event-stream-view.d.ts +148 -14
  21. package/dist/event-stream-view.js +1 -1
  22. package/dist/forms-ui.d.cts +161 -23
  23. package/dist/forms-ui.d.ts +161 -23
  24. package/dist/history-view.d.cts +136 -6
  25. package/dist/history-view.d.ts +136 -6
  26. package/dist/index.cjs +67 -67
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +166 -27
  29. package/dist/index.d.ts +166 -27
  30. package/dist/index.global.js +51 -51
  31. package/dist/index.global.js.map +1 -1
  32. package/dist/index.js +67 -67
  33. package/dist/index.js.map +1 -1
  34. package/dist/session-reconnect.d.cts +148 -14
  35. package/dist/session-reconnect.d.ts +148 -14
  36. package/dist/smart-dom-reader.d.cts +148 -14
  37. package/dist/smart-dom-reader.d.ts +148 -14
  38. package/dist/testing.cjs +3 -3
  39. package/dist/testing.d.cts +3 -4
  40. package/dist/testing.d.ts +3 -4
  41. package/dist/testing.js +3 -3
  42. package/dist/theme-editor-preview.cjs +71 -71
  43. package/dist/theme-editor-preview.d.cts +148 -14
  44. package/dist/theme-editor-preview.d.ts +148 -14
  45. package/dist/theme-editor-preview.js +48 -48
  46. package/dist/theme-editor.d.cts +148 -14
  47. package/dist/theme-editor.d.ts +148 -14
  48. package/dist/voice-runtime.d.cts +6 -2
  49. package/dist/voice-runtime.d.ts +6 -2
  50. package/package.json +1 -1
  51. package/src/ask-user-question-tool.ts +1 -1
  52. package/src/client-history-rest.test.ts +2 -1
  53. package/src/client-visitor-history.test.ts +20 -4
  54. package/src/client.composer-options.test.ts +1 -1
  55. package/src/client.interrupt.test.ts +2 -2
  56. package/src/client.test.ts +477 -915
  57. package/src/client.ts +134 -494
  58. package/src/client.unified-tools.test.ts +76 -0
  59. package/src/components/event-stream-badge-theming.test.ts +3 -0
  60. package/src/components/event-stream-view.test.ts +76 -76
  61. package/src/components/event-stream-view.ts +5 -0
  62. package/src/components/tool-bubble.test.ts +12 -0
  63. package/src/components/tool-bubble.ts +13 -2
  64. package/src/event-stream-view-bundle.test.ts +2 -2
  65. package/src/generated/runtype-openapi-contract.ts +129 -1
  66. package/src/internal/runtype-history-provider.test.ts +2 -2
  67. package/src/session-history.test.ts +1 -1
  68. package/src/session.quote.test.ts +1 -1
  69. package/src/session.resubmit-from.test.ts +1 -1
  70. package/src/session.test.ts +5 -5
  71. package/src/session.ts +95 -36
  72. package/src/suggest-replies-tool.ts +1 -1
  73. package/src/testing/mock-stream.test.ts +37 -16
  74. package/src/testing/mock-stream.ts +14 -9
  75. package/src/types.ts +19 -14
  76. package/src/ui.ask-user-question-plugin.test.ts +7 -7
  77. package/src/ui.composer-defer-one.test.ts +6 -34
  78. package/src/ui.composer-draft-persistence.test.ts +1 -1
  79. package/src/ui.composer-quote.test.ts +1 -1
  80. package/src/ui.message-history-actions.test.ts +1 -1
  81. package/src/ui.streaming-coalescing.test.ts +10 -13
  82. package/src/ui.ts +67 -32
  83. package/src/ui.typing-indicator.test.ts +216 -0
  84. package/src/ui.voice-custom-provider.test.ts +211 -0
  85. package/src/utils/event-stream-buffer.test.ts +13 -13
  86. package/src/utils/event-stream-capture.test.ts +20 -20
  87. package/src/utils/throughput-tracker.test.ts +100 -142
  88. package/src/utils/throughput-tracker.ts +18 -132
  89. package/src/utils/voice-support.ts +18 -1
  90. package/src/voice/voice-turn-tracker.ts +18 -0
  91. package/src/webmcp-bridge.ts +1 -1
  92. package/dist/event-stream-view-FKWDY3UB.js +0 -1
  93. package/src/utils/__fixtures__/unified-translator.oracle.ts +0 -717
package/dist/index.d.cts CHANGED
@@ -1734,6 +1734,11 @@ type RuntypeExecutionStreamEvent = ({
1734
1734
  iteration?: number;
1735
1735
  role: "user" | "assistant" | "system";
1736
1736
  seq: number;
1737
+ subagent?: {
1738
+ agentName?: string;
1739
+ parentToolCallId?: string;
1740
+ toolName: string;
1741
+ };
1737
1742
  turnIndex?: number;
1738
1743
  type: "turn_start";
1739
1744
  }) | ({
@@ -1768,12 +1773,61 @@ type RuntypeExecutionStreamEvent = ({
1768
1773
  role: "user" | "assistant" | "system";
1769
1774
  seq: number;
1770
1775
  stopReason?: "end_turn" | "max_tool_calls" | "length" | "content_filter" | "error" | "unknown";
1776
+ subagent?: {
1777
+ agentName?: string;
1778
+ parentToolCallId?: string;
1779
+ toolName: string;
1780
+ };
1771
1781
  tokens?: {
1772
1782
  input: number;
1773
1783
  output: number;
1774
1784
  };
1775
1785
  type: "turn_complete";
1776
1786
  }) | {
1787
+ executionId: string;
1788
+ id: string;
1789
+ iteration?: number;
1790
+ model?: string;
1791
+ ordinal: number;
1792
+ provider?: string;
1793
+ seq: number;
1794
+ startedAt?: string;
1795
+ stepId?: string;
1796
+ subagent?: {
1797
+ agentName?: string;
1798
+ parentToolCallId?: string;
1799
+ toolName: string;
1800
+ };
1801
+ turnId?: string;
1802
+ type: "model_call_start";
1803
+ } | {
1804
+ completedAt?: string;
1805
+ cost?: number;
1806
+ durationMs?: number;
1807
+ executionId: string;
1808
+ finishReason?: string;
1809
+ id: string;
1810
+ iteration?: number;
1811
+ model?: string;
1812
+ ordinal: number;
1813
+ provider?: string;
1814
+ responseModel?: string;
1815
+ seq: number;
1816
+ subagent?: {
1817
+ agentName?: string;
1818
+ parentToolCallId?: string;
1819
+ toolName: string;
1820
+ };
1821
+ success?: boolean;
1822
+ tokens?: {
1823
+ cacheRead?: number;
1824
+ cacheWrite?: number;
1825
+ input: number;
1826
+ output: number;
1827
+ };
1828
+ turnId?: string;
1829
+ type: "model_call_complete";
1830
+ } | {
1777
1831
  executionId: string;
1778
1832
  id: string;
1779
1833
  index?: number;
@@ -1782,6 +1836,11 @@ type RuntypeExecutionStreamEvent = ({
1782
1836
  seq: number;
1783
1837
  startedAt?: string;
1784
1838
  stepType?: string;
1839
+ subagent?: {
1840
+ agentName?: string;
1841
+ parentToolCallId?: string;
1842
+ toolName: string;
1843
+ };
1785
1844
  totalSteps?: number;
1786
1845
  type: "step_start";
1787
1846
  } | ({
@@ -1809,6 +1868,11 @@ type RuntypeExecutionStreamEvent = ({
1809
1868
  seq: number;
1810
1869
  stepType?: string;
1811
1870
  stopReason?: "end_turn" | "max_tool_calls" | "length" | "content_filter" | "error" | "unknown";
1871
+ subagent?: {
1872
+ agentName?: string;
1873
+ parentToolCallId?: string;
1874
+ toolName: string;
1875
+ };
1812
1876
  success?: boolean;
1813
1877
  tokensUsed?: number;
1814
1878
  type: "step_complete";
@@ -1831,6 +1895,11 @@ type RuntypeExecutionStreamEvent = ({
1831
1895
  role?: "user" | "assistant" | "system";
1832
1896
  seq: number;
1833
1897
  stepId?: string;
1898
+ subagent?: {
1899
+ agentName?: string;
1900
+ parentToolCallId?: string;
1901
+ toolName: string;
1902
+ };
1834
1903
  turnId?: string;
1835
1904
  type: "text_start";
1836
1905
  }) | {
@@ -1838,11 +1907,21 @@ type RuntypeExecutionStreamEvent = ({
1838
1907
  executionId: string;
1839
1908
  id: string;
1840
1909
  seq: number;
1910
+ subagent?: {
1911
+ agentName?: string;
1912
+ parentToolCallId?: string;
1913
+ toolName: string;
1914
+ };
1841
1915
  type: "text_delta";
1842
1916
  } | {
1843
1917
  executionId: string;
1844
1918
  id: string;
1845
1919
  seq: number;
1920
+ subagent?: {
1921
+ agentName?: string;
1922
+ parentToolCallId?: string;
1923
+ toolName: string;
1924
+ };
1846
1925
  text?: string;
1847
1926
  type: "text_complete";
1848
1927
  } | ({
@@ -1851,18 +1930,33 @@ type RuntypeExecutionStreamEvent = ({
1851
1930
  parentToolCallId?: string;
1852
1931
  scope?: "turn" | "loop";
1853
1932
  seq: number;
1933
+ subagent?: {
1934
+ agentName?: string;
1935
+ parentToolCallId?: string;
1936
+ toolName: string;
1937
+ };
1854
1938
  type: "reasoning_start";
1855
1939
  }) | {
1856
1940
  delta: string;
1857
1941
  executionId: string;
1858
1942
  id: string;
1859
1943
  seq: number;
1944
+ subagent?: {
1945
+ agentName?: string;
1946
+ parentToolCallId?: string;
1947
+ toolName: string;
1948
+ };
1860
1949
  type: "reasoning_delta";
1861
1950
  } | ({
1862
1951
  executionId: string;
1863
1952
  id: string;
1864
1953
  scope?: "turn" | "loop";
1865
1954
  seq: number;
1955
+ subagent?: {
1956
+ agentName?: string;
1957
+ parentToolCallId?: string;
1958
+ toolName: string;
1959
+ };
1866
1960
  text?: string;
1867
1961
  type: "reasoning_complete";
1868
1962
  }) | ({
@@ -1955,6 +2049,11 @@ type RuntypeExecutionStreamEvent = ({
1955
2049
  seq: number;
1956
2050
  startedAt?: string;
1957
2051
  stepId?: string;
2052
+ subagent?: {
2053
+ agentName?: string;
2054
+ parentToolCallId?: string;
2055
+ toolName: string;
2056
+ };
1958
2057
  toolCallId: string;
1959
2058
  toolName: string;
1960
2059
  toolType: string;
@@ -1963,6 +2062,11 @@ type RuntypeExecutionStreamEvent = ({
1963
2062
  delta: string;
1964
2063
  executionId: string;
1965
2064
  seq: number;
2065
+ subagent?: {
2066
+ agentName?: string;
2067
+ parentToolCallId?: string;
2068
+ toolName: string;
2069
+ };
1966
2070
  toolCallId: string;
1967
2071
  type: "tool_input_delta";
1968
2072
  } | {
@@ -1970,6 +2074,11 @@ type RuntypeExecutionStreamEvent = ({
1970
2074
  hiddenParameterNames?: Array<string>;
1971
2075
  parameters: Record<string, unknown>;
1972
2076
  seq: number;
2077
+ subagent?: {
2078
+ agentName?: string;
2079
+ parentToolCallId?: string;
2080
+ toolName: string;
2081
+ };
1973
2082
  toolCallId: string;
1974
2083
  toolName?: string;
1975
2084
  type: "tool_input_complete";
@@ -1987,6 +2096,11 @@ type RuntypeExecutionStreamEvent = ({
1987
2096
  result?: unknown;
1988
2097
  seq: number;
1989
2098
  stepId?: string;
2099
+ subagent?: {
2100
+ agentName?: string;
2101
+ parentToolCallId?: string;
2102
+ toolName: string;
2103
+ };
1990
2104
  success: boolean;
1991
2105
  toolCallId: string;
1992
2106
  toolCost?: number;
@@ -2066,6 +2180,19 @@ type RuntypeExecutionStreamEvent = ({
2066
2180
  recoverable?: boolean;
2067
2181
  seq: number;
2068
2182
  type: "error";
2183
+ }) | ({
2184
+ epoch: number;
2185
+ executionId: string;
2186
+ kind: "compaction";
2187
+ outcome?: "ok" | "failed" | "gap" | "skipped";
2188
+ phase: "start" | "complete";
2189
+ reason: "threshold" | "overflow" | "manual" | "surface_policy" | "provider_mismatch";
2190
+ seq: number;
2191
+ strategy: "provider_native" | "summary";
2192
+ tier: number;
2193
+ tokensAfter?: number;
2194
+ tokensBefore?: number;
2195
+ type: "context_notice";
2069
2196
  }) | {
2070
2197
  executionId: string;
2071
2198
  seq: number;
@@ -2129,6 +2256,7 @@ type RuntypeClientInitResponse = {
2129
2256
  conversationRevision: string;
2130
2257
  durableRecovery?: {
2131
2258
  enabled: boolean;
2259
+ join?: boolean;
2132
2260
  };
2133
2261
  expiresAt: string;
2134
2262
  flow?: {
@@ -2189,7 +2317,7 @@ type RuntypeClientChatRequest = {
2189
2317
  }>;
2190
2318
  metadata?: Record<string, unknown>;
2191
2319
  sessionId: string;
2192
- submitMode?: "normal" | "interrupt";
2320
+ submitMode?: "normal" | "interrupt" | "join";
2193
2321
  turnId?: string;
2194
2322
  };
2195
2323
  type RuntypeClientChatStreamEvent = RuntypeExecutionStreamEvent;
@@ -3342,15 +3470,15 @@ type AgentMessageMetadata = {
3342
3470
  */
3343
3471
  parentStepId?: string;
3344
3472
  /**
3345
- * Set to `true` on a tool-variant message produced from a `step_await`
3473
+ * Set to `true` on a tool-variant message produced from an `await`
3346
3474
  * event (`awaitReason: "local_tool_required"`). Signals to UI code that
3347
3475
  * the tool call is a LOCAL tool and the server is paused waiting for a
3348
3476
  * `POST /v1/dispatch/resume` with the user's answer keyed by tool name.
3349
3477
  */
3350
3478
  awaitingLocalTool?: boolean;
3351
3479
  /**
3352
- * The provider per-call id (`toolu_…`) carried on the `step_await` /
3353
- * `flow_await` events for a LOCAL tool (core#3878). Present only when the
3480
+ * The provider per-call id (`toolu_…`) carried on the `await`
3481
+ * event for a LOCAL tool (core#3878). Present only when the
3354
3482
  * server emits it. Two PARALLEL calls to the same tool in one turn share a
3355
3483
  * `toolName` (and a collapsed `toolId`) but get DISTINCT `webMcpToolCallId`s,
3356
3484
  * so this is the key the widget batches a single `/resume` on: preferred
@@ -5648,7 +5776,7 @@ type EventStreamConfig = {
5648
5776
  /**
5649
5777
  * Custom badge color mappings by event type prefix or exact type.
5650
5778
  * Keys are matched as exact match first, then prefix match (keys ending with "_").
5651
- * @example { "flow_": { bg: "#dcfce7", text: "#166534" }, "error": { bg: "#fecaca", text: "#991b1b" } }
5779
+ * @example { "execution_": { bg: "#dcfce7", text: "#166534" }, "error": { bg: "#fecaca", text: "#991b1b" } }
5652
5780
  */
5653
5781
  badgeColors?: Record<string, EventStreamBadgeColor>;
5654
5782
  /**
@@ -7126,9 +7254,13 @@ interface VoiceProvider {
7126
7254
  * `isFinal=false` is a live interim update (user partials, or assistant deltas
7127
7255
  * on providers that stream them); `isFinal=true` finalizes that role's text.
7128
7256
  * On the realtime `runtype` path, interim updates fire for the `user` only and
7129
- * the `assistant` arrives as a single final.
7257
+ * the `assistant` arrives as a single final. Providers with overlapping turns
7258
+ * must include the same turnId on user and assistant finals; without IDs,
7259
+ * providers must discard cancelled output before emitting the next user final.
7130
7260
  */
7131
- onTranscript?(callback: (role: 'user' | 'assistant', text: string, isFinal: boolean) => void): void;
7261
+ onTranscript?(callback: (role: 'user' | 'assistant', text: string, isFinal: boolean, metadata?: {
7262
+ turnId?: string;
7263
+ }) => void): void;
7132
7264
  /** Register a callback for per-turn latency metrics (realtime path). */
7133
7265
  onMetrics?(callback: (metrics: VoiceMetrics) => void): void;
7134
7266
  /**
@@ -9601,16 +9733,16 @@ type AgentWidgetConfig = {
9601
9733
  *
9602
9734
  * @example
9603
9735
  * ```typescript
9604
- * // For Runtype API format
9736
+ * // For a custom backend (Runtype unified events are handled natively)
9605
9737
  * config: {
9606
9738
  * parseSSEEvent: (data) => {
9607
- * if ((data.type === 'step_delta' || data.type === 'step_chunk') && (data.delta || data.chunk)) {
9608
- * return { text: data.delta ?? data.chunk };
9739
+ * if (data.type === 'token' && typeof data.value === 'string') {
9740
+ * return { text: data.value };
9609
9741
  * }
9610
- * if (data.type === 'flow_complete') {
9742
+ * if (data.type === 'done') {
9611
9743
  * return { done: true };
9612
9744
  * }
9613
- * if (data.type === 'step_error') {
9745
+ * if (data.type === 'failure') {
9614
9746
  * return { error: data.error };
9615
9747
  * }
9616
9748
  * return null; // Ignore other events
@@ -9812,7 +9944,7 @@ type AgentWidgetReasoning = {
9812
9944
  /**
9813
9945
  * Reasoning channel scope (wire spec). `"turn"` is ordinary per-turn
9814
9946
  * thinking; `"loop"` is a cross-iteration agent reflection (the fold that
9815
- * replaced the legacy `agent_reflection` event). Absent for legacy streams.
9947
+ * replaced the legacy `agent_reflection` event). Optional when the stream does not specify a scope.
9816
9948
  */
9817
9949
  scope?: "turn" | "loop";
9818
9950
  startedAt?: number;
@@ -9826,6 +9958,9 @@ type AgentWidgetToolCall = {
9826
9958
  args?: unknown;
9827
9959
  chunks?: string[];
9828
9960
  result?: unknown;
9961
+ /** Whether the tool succeeded; failure does not necessarily end the execution. */
9962
+ success?: boolean;
9963
+ error?: string;
9829
9964
  duration?: number;
9830
9965
  startedAt?: number;
9831
9966
  completedAt?: number;
@@ -9856,7 +9991,7 @@ type AgentWidgetApproval = {
9856
9991
  type AgentWidgetMessageVariant = "assistant" | "reasoning" | "tool" | "approval";
9857
9992
  /**
9858
9993
  * Per-turn / per-step stop reason emitted by the runtime on
9859
- * `agent_turn_complete` and `step_complete` SSE events. The vocabulary is
9994
+ * `turn_complete` and `step_complete` SSE events. The vocabulary is
9860
9995
  * owned by the upstream Runtype API: do not extend without coordination.
9861
9996
  *
9862
9997
  * - `end_turn`: natural completion (no affordance needed)
@@ -9987,7 +10122,7 @@ type AgentWidgetMessage = {
9987
10122
  */
9988
10123
  agentMetadata?: AgentMessageMetadata;
9989
10124
  /**
9990
- * Per-turn stop reason reported by the runtime on `agent_turn_complete`
10125
+ * Per-turn stop reason reported by the runtime on `turn_complete`
9991
10126
  * (agent-loop path) or the last `step_complete` for a prompt step
9992
10127
  * (dispatch / flow path). Absent when the API did not report a value.
9993
10128
  *
@@ -10786,7 +10921,7 @@ declare class AgentWidgetClient {
10786
10921
  * Returns the raw Response so the caller can pipe its SSE body through
10787
10922
  * `connectStream()`.
10788
10923
  *
10789
- * @param executionId - The paused execution id carried on `step_await`.
10924
+ * @param executionId - The paused execution id carried on `await`.
10790
10925
  * @param toolOutputs - Map keyed by per-call `toolCallId` (core#3878),
10791
10926
  * falling back to tool name for legacy servers → the tool's result value.
10792
10927
  */
@@ -11102,6 +11237,8 @@ declare class AgentWidgetSession {
11102
11237
  deactivateBargeIn(): Promise<void>;
11103
11238
  private pendingVoiceUserMessageId;
11104
11239
  private pendingVoiceAssistantMessageId;
11240
+ private voiceTurns;
11241
+ private voiceDisconnectPromise;
11105
11242
  private ttsSpokenMessageIds;
11106
11243
  private readAloud;
11107
11244
  /**
@@ -11130,6 +11267,8 @@ declare class AgentWidgetSession {
11130
11267
  * Cleanup voice resources
11131
11268
  */
11132
11269
  cleanupVoice(): void;
11270
+ private disconnectVoice;
11271
+ private settlePendingVoiceTurn;
11133
11272
  /**
11134
11273
  * Extract voice configuration from widget config
11135
11274
  */
@@ -11624,7 +11763,7 @@ declare class AgentWidgetSession {
11624
11763
  /**
11625
11764
  * Resolve a paused `ask_user_question` LOCAL tool call.
11626
11765
  *
11627
- * When the server emits `step_await` for `ask_user_question`, the widget
11766
+ * When the server emits `await` for `ask_user_question`, the widget
11628
11767
  * renders the answer-pill sheet and calls this method once the user
11629
11768
  * picks. Steps:
11630
11769
  * 1. POST the answer to `/resume` via `client.resumeFlow`.
@@ -11653,10 +11792,10 @@ declare class AgentWidgetSession {
11653
11792
  markAskUserQuestionResolved(toolMessage: AgentWidgetMessage, answers?: Record<string, string | string[]>): void;
11654
11793
  resolveAskUserQuestion(toolMessage: AgentWidgetMessage, answer: string | Record<string, string | string[]>): Promise<void>;
11655
11794
  /**
11656
- * Collect an auto-resolving LOCAL-tool `step_await` (`webmcp:*` page tools
11795
+ * Collect an auto-resolving LOCAL-tool `await` (`webmcp:*` page tools
11657
11796
  * and the built-in `suggest_replies`) into a per-executionId batch
11658
11797
  * and schedule a single deferred flush. Parallel calls (core#3878) emit
11659
- * several `step_await`s for ONE paused execution within the same stream tick;
11798
+ * several `await`s for ONE paused execution within the same stream tick;
11660
11799
  * buffering them and flushing once lets us post ONE `/resume` keyed by the
11661
11800
  * per-call `webMcpToolCallId` rather than racing N name-keyed resumes on the
11662
11801
  * same execution (which 404'd on the second and hung the turn).
@@ -11674,7 +11813,7 @@ declare class AgentWidgetSession {
11674
11813
  /**
11675
11814
  * Flush every buffered local-tool await batch, one `/resume` per executionId.
11676
11815
  * Called once a stream ends (`status: idle` / `error`): by then all parallel
11677
- * `step_await`s the stream carried have been collected, even if split across
11816
+ * `await`s the stream carried have been collected, even if split across
11678
11817
  * SSE chunks. Deferred via `queueMicrotask` (epoch-guarded) so the idle
11679
11818
  * handler returns first and the stream's end-of-stream teardown (streaming /
11680
11819
  * abortController) settles before a resolve grabs them: the same ordering the
@@ -11695,7 +11834,7 @@ declare class AgentWidgetSession {
11695
11834
  * Persisted-resolution guard for `suggest_replies`. The in-memory dedupe
11696
11835
  * sets (`webMcpInflightKeys` / `webMcpResolvedKeys`) are cleared by
11697
11836
  * hydrateMessages/clearMessages/cancel, but `suggestRepliesResolved`
11698
- * survives on the stored message, so a stale `step_await` re-emit after a
11837
+ * survives on the stored message, so a stale `await` re-emit after a
11699
11838
  * hydration must not re-POST `/resume` for an already-resolved call (the
11700
11839
  * historical double-resume failure mode the batching work exists to avoid).
11701
11840
  * Checks the LIVE message first; the handleEvent snapshot is a fresh wire
@@ -11729,12 +11868,12 @@ declare class AgentWidgetSession {
11729
11868
  * resumes with a canned "shown" result (the chips render from the message
11730
11869
  * list, not from this resolve).
11731
11870
  *
11732
- * Triggered automatically from `handleEvent` when a `step_await`-derived
11871
+ * Triggered automatically from `handleEvent` when an `await`-derived
11733
11872
  * message arrives for such a tool: the user does not click a pill; the
11734
11873
  * bridge's confirm-bubble gate (WebMCP only) is the only interactive
11735
11874
  * surface.
11736
11875
  *
11737
- * Idempotent on the message's `toolCall.id`: re-emits of the same step_await
11876
+ * Idempotent on the message's `toolCall.id`: re-emits of the same await
11738
11877
  * (e.g. from message coalescing) won't double-fire `tool.execute`. Failure
11739
11878
  * modes, declined, timed out, throw, unknown tool, all resolve into a
11740
11879
  * `{ isError: true, content: [...] }` payload that resumes the dispatch
@@ -11813,7 +11952,7 @@ declare class AgentWidgetSession {
11813
11952
  private trackCursor;
11814
11953
  /**
11815
11954
  * The drop gate: is this stream-end a dropped connection we should reconnect,
11816
- * rather than a graceful finish or an intentional `step_await` pause? ALL must
11955
+ * rather than a graceful finish or an intentional `await` pause? ALL must
11817
11956
  * hold (see plan §Design overview keystone 3).
11818
11957
  */
11819
11958
  private isDurableDrop;
@@ -12375,7 +12514,7 @@ declare const removeAskUserQuestionSheet: (overlay: HTMLElement | null | undefin
12375
12514
  * `clientTools[]` (set `features.askUserQuestion.expose: true`): the same
12376
12515
  * wire surface WebMCP page tools ride. The server registers it as a LOCAL
12377
12516
  * tool under its bare name (`origin: 'sdk'` tools are not `webmcp:`-prefixed),
12378
- * so when the model calls it the execution pauses with a `step_await`, the
12517
+ * so when the model calls it the execution pauses with an `await`, the
12379
12518
  * widget's answer-pill sheet renders, and `session.resolveAskUserQuestion()`
12380
12519
  * resumes the execution with the structured answers. The public await frame
12381
12520
  * for a local-tool pause carries no `awaitReason`; that discriminator is
@@ -12477,7 +12616,7 @@ declare const builtInClientToolsForDispatch: (config: AgentWidgetConfig | undefi
12477
12616
  * The widget can advertise this tool to the agent on every dispatch via
12478
12617
  * `clientTools[]` (set `suggestions.followUps.expose: true`): the same
12479
12618
  * wire surface as `ask_user_question` and WebMCP page tools. When the model
12480
- * calls it, the execution pauses with a `step_await` (a local-tool pause
12619
+ * calls it, the execution pauses with an `await` (a local-tool pause
12481
12620
  * carries no `awaitReason`; that discriminator is internal). Unlike
12482
12621
  * `ask_user_question`, the widget resolves it FIRE-AND-FORGET: it renders the
12483
12622
  * configured follow-up surface and immediately resumes the execution with a
@@ -12662,7 +12801,7 @@ type WebMcpPolyfillModule = {
12662
12801
  declare const stripWebMcpPrefix: (name: string) => string;
12663
12802
  /**
12664
12803
  * `true` when `wireToolName` carries the `webmcp:` prefix. Used by `client.ts`
12665
- * to route `step_await` events.
12804
+ * to route `await` events.
12666
12805
  */
12667
12806
  declare const isWebMcpToolName: (name: string) => boolean;
12668
12807