@vellumai/plugin-api 0.10.12-dev.202607250140.9979030 → 0.10.12-staging.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 (3) hide show
  1. package/index.d.ts +2827 -1374
  2. package/index.js +0 -1
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,6 +1,82 @@
1
1
  /// <reference path="./app.d.ts" />
2
2
  import { z } from 'zod';
3
3
 
4
+ declare type _AcpServerMessages = AcpSessionSpawnedEvent | AcpSessionUpdateEvent | AcpSessionCompletedEvent | AcpSessionErrorEvent | AcpSessionUsageEvent;
5
+
6
+ declare type AcpSessionCompletedEvent = z.infer<typeof AcpSessionCompletedEventSchema>;
7
+
8
+ declare const AcpSessionCompletedEventSchema: z.ZodObject<{
9
+ type: z.ZodLiteral<"acp_session_completed">;
10
+ acpSessionId: z.ZodString;
11
+ stopReason: z.ZodEnum<{
12
+ cancelled: "cancelled";
13
+ end_turn: "end_turn";
14
+ max_tokens: "max_tokens";
15
+ max_turn_requests: "max_turn_requests";
16
+ refusal: "refusal";
17
+ }>;
18
+ }, z.core.$strict>;
19
+
20
+ declare type AcpSessionErrorEvent = z.infer<typeof AcpSessionErrorEventSchema>;
21
+
22
+ declare const AcpSessionErrorEventSchema: z.ZodObject<{
23
+ type: z.ZodLiteral<"acp_session_error">;
24
+ acpSessionId: z.ZodString;
25
+ error: z.ZodString;
26
+ }, z.core.$strict>;
27
+
28
+ declare type AcpSessionSpawnedEvent = z.infer<typeof AcpSessionSpawnedEventSchema>;
29
+
30
+ declare const AcpSessionSpawnedEventSchema: z.ZodObject<{
31
+ type: z.ZodLiteral<"acp_session_spawned">;
32
+ acpSessionId: z.ZodString;
33
+ agent: z.ZodString;
34
+ parentConversationId: z.ZodString;
35
+ parentToolUseId: z.ZodOptional<z.ZodString>;
36
+ task: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strict>;
38
+
39
+ declare type AcpSessionUpdateEvent = z.infer<typeof AcpSessionUpdateEventSchema>;
40
+
41
+ declare const AcpSessionUpdateEventSchema: z.ZodObject<{
42
+ type: z.ZodLiteral<"acp_session_update">;
43
+ acpSessionId: z.ZodString;
44
+ updateType: z.ZodEnum<{
45
+ agent_message_chunk: "agent_message_chunk";
46
+ agent_thought_chunk: "agent_thought_chunk";
47
+ user_message_chunk: "user_message_chunk";
48
+ tool_call: "tool_call";
49
+ tool_call_update: "tool_call_update";
50
+ plan: "plan";
51
+ }>;
52
+ content: z.ZodOptional<z.ZodString>;
53
+ toolCallId: z.ZodOptional<z.ZodString>;
54
+ toolTitle: z.ZodOptional<z.ZodString>;
55
+ toolKind: z.ZodOptional<z.ZodString>;
56
+ toolStatus: z.ZodOptional<z.ZodString>;
57
+ rawInput: z.ZodOptional<z.ZodUnknown>;
58
+ rawOutput: z.ZodOptional<z.ZodUnknown>;
59
+ locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
60
+ path: z.ZodString;
61
+ line: z.ZodOptional<z.ZodNumber>;
62
+ }, z.core.$strip>>>;
63
+ messageId: z.ZodOptional<z.ZodString>;
64
+ seq: z.ZodOptional<z.ZodNumber>;
65
+ }, z.core.$strict>;
66
+
67
+ declare type AcpSessionUsageEvent = z.infer<typeof AcpSessionUsageEventSchema>;
68
+
69
+ declare const AcpSessionUsageEventSchema: z.ZodObject<{
70
+ type: z.ZodLiteral<"acp_session_usage">;
71
+ acpSessionId: z.ZodString;
72
+ usedTokens: z.ZodNumber;
73
+ contextSize: z.ZodNumber;
74
+ inputTokens: z.ZodOptional<z.ZodNumber>;
75
+ outputTokens: z.ZodOptional<z.ZodNumber>;
76
+ costAmount: z.ZodOptional<z.ZodNumber>;
77
+ costCurrency: z.ZodOptional<z.ZodString>;
78
+ }, z.core.$strict>;
79
+
4
80
  /**
5
81
  * Append a message to a conversation. This is the low-level insert: it
6
82
  * persists and indexes the row only — it does not project the message into
@@ -76,6 +152,85 @@ export declare type AgentLoopExitReason =
76
152
  /** An unhandled error ended the turn. */
77
153
  | "error";
78
154
 
155
+ /** Any surface `data` payload, including the opaque (non-renderable) types. */
156
+ declare type AnySurfaceData = SurfaceDataByType[SurfaceType];
157
+
158
+ declare interface AppDataResponse {
159
+ type: "app_data_response";
160
+ surfaceId: string;
161
+ callId: string;
162
+ success: boolean;
163
+ result?: unknown;
164
+ error?: string;
165
+ }
166
+
167
+ declare interface AppDeleteResponse {
168
+ type: "app_delete_response";
169
+ success: boolean;
170
+ }
171
+
172
+ declare interface AppDiffResponse {
173
+ type: "app_diff_response";
174
+ appId: string;
175
+ diff: string;
176
+ }
177
+
178
+ declare interface AppFileAtVersionResponse {
179
+ type: "app_file_at_version_response";
180
+ appId: string;
181
+ path: string;
182
+ content: string;
183
+ }
184
+
185
+ declare interface AppFilesChanged {
186
+ type: "app_files_changed";
187
+ appId: string;
188
+ }
189
+
190
+ declare interface AppHistoryResponse {
191
+ type: "app_history_response";
192
+ appId: string;
193
+ versions: Array<{
194
+ commitHash: string;
195
+ message: string;
196
+ timestamp: number;
197
+ }>;
198
+ }
199
+
200
+ declare interface AppPreviewResponse {
201
+ type: "app_preview_response";
202
+ appId: string;
203
+ preview?: string;
204
+ }
205
+
206
+ declare interface AppRestoreResponse {
207
+ type: "app_restore_response";
208
+ success: boolean;
209
+ error?: string;
210
+ }
211
+
212
+ declare interface AppsListResponse {
213
+ type: "apps_list_response";
214
+ apps: Array<{
215
+ id: string;
216
+ name: string;
217
+ description?: string;
218
+ icon?: string;
219
+ preview?: string;
220
+ createdAt: number;
221
+ version?: string;
222
+ contentId?: string;
223
+ }>;
224
+ }
225
+
226
+ declare type _AppsServerMessages = AppDataResponse | AppsListResponse | SharedAppsListResponse | AppDeleteResponse | SharedAppDeleteResponse | ForkSharedAppResponse | BundleAppResponse | OpenBundleResponse | SignBundlePayloadRequest | GetSigningIdentityRequest | ShareAppCloudResponse | AppHistoryResponse | AppDiffResponse | AppFileAtVersionResponse | AppRestoreResponse | AppUpdatePreviewResponse | AppPreviewResponse | PublishPageResponse | UnpublishPageResponse | AppFilesChanged;
227
+
228
+ declare interface AppUpdatePreviewResponse {
229
+ type: "app_update_preview_response";
230
+ success: boolean;
231
+ appId: string;
232
+ }
233
+
79
234
  /**
80
235
  * How {@link listConversations} (and friends) treats archived rows.
81
236
  *
@@ -89,16 +244,64 @@ export declare type AgentLoopExitReason =
89
244
  */
90
245
  declare type ArchiveStatusFilter = "active" | "archived" | "all";
91
246
 
247
+ declare type AssistantActivityStateEvent = z.infer<typeof AssistantActivityStateEventSchema>;
248
+
249
+ declare const AssistantActivityStateEventSchema: z.ZodObject<{
250
+ type: z.ZodLiteral<"assistant_activity_state">;
251
+ conversationId: z.ZodString;
252
+ activityVersion: z.ZodNumber;
253
+ phase: z.ZodEnum<{
254
+ thinking: "thinking";
255
+ idle: "idle";
256
+ streaming: "streaming";
257
+ tool_running: "tool_running";
258
+ awaiting_confirmation: "awaiting_confirmation";
259
+ }>;
260
+ anchor: z.ZodEnum<{
261
+ assistant_turn: "assistant_turn";
262
+ user_turn: "user_turn";
263
+ global: "global";
264
+ }>;
265
+ reason: z.ZodEnum<{
266
+ thinking_delta: "thinking_delta";
267
+ generation_cancelled: "generation_cancelled";
268
+ message_dequeued: "message_dequeued";
269
+ first_text_delta: "first_text_delta";
270
+ tool_use_start: "tool_use_start";
271
+ preview_start: "preview_start";
272
+ tool_result_received: "tool_result_received";
273
+ confirmation_requested: "confirmation_requested";
274
+ confirmation_resolved: "confirmation_resolved";
275
+ context_compacting: "context_compacting";
276
+ message_complete: "message_complete";
277
+ error_terminal: "error_terminal";
278
+ }>;
279
+ requestId: z.ZodOptional<z.ZodString>;
280
+ statusText: z.ZodOptional<z.ZodString>;
281
+ }, z.core.$strip>;
282
+
283
+ /** Attention state metadata for a conversation's latest assistant message. */
284
+ declare interface AssistantAttention {
285
+ hasUnseenLatestAssistantMessage: boolean;
286
+ latestAssistantMessageAt?: number;
287
+ lastSeenAssistantMessageAt?: number;
288
+ lastSeenConfidence?: string;
289
+ lastSeenSignalType?: string;
290
+ }
291
+
92
292
  declare type AssistantConfig = z.infer<typeof AssistantConfigSchema>;
93
293
 
94
294
  declare const AssistantConfigSchema: z.ZodObject<{
95
295
  services: z.ZodDefault<z.ZodObject<{
96
296
  inference: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
97
297
  "image-generation": z.ZodDefault<z.ZodObject<{
298
+ mode: z.ZodDefault<z.ZodEnum<{
299
+ managed: "managed";
300
+ "your-own": "your-own";
301
+ }>>;
98
302
  provider: z.ZodDefault<z.ZodEnum<{
99
303
  openai: "openai";
100
304
  gemini: "gemini";
101
- vellum: "vellum";
102
305
  }>>;
103
306
  model: z.ZodDefault<z.ZodString>;
104
307
  }, z.core.$strip>>;
@@ -439,7 +642,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
439
642
  needleK: z.ZodDefault<z.ZodNumber>;
440
643
  denseK: z.ZodDefault<z.ZodNumber>;
441
644
  replyQueryK: z.ZodDefault<z.ZodNumber>;
442
- spanQueryK: z.ZodDefault<z.ZodNumber>;
443
645
  selectorEnabled: z.ZodDefault<z.ZodBoolean>;
444
646
  selectorPromptPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
445
647
  edge: z.ZodDefault<z.ZodObject<{
@@ -1128,1364 +1330,197 @@ declare const AssistantConfigSchema: z.ZodObject<{
1128
1330
  maxStepsPerSession: z.ZodDefault<z.ZodNumber>;
1129
1331
  }, z.core.$strip>;
1130
1332
 
1131
- export declare type AssistantEventCallback = (event: AssistantEventEnvelope) => void | Promise<void>;
1333
+ /** Daemon-side specialization of the generic event envelope. */
1334
+ export declare type AssistantEvent = BaseAssistantEvent<ServerMessage>;
1132
1335
 
1133
- declare type AssistantEventEnvelope = z.infer<typeof AssistantEventEnvelopeSchema>;
1134
- export { AssistantEventEnvelope as AssistantEvent }
1135
- export { AssistantEventEnvelope }
1336
+ export declare type AssistantEventCallback = (event: AssistantEvent) => void | Promise<void>;
1337
+
1338
+ /** Filter that determines which events a subscriber receives. */
1339
+ export declare type AssistantEventFilter = {
1340
+ /** When set, restrict delivery to events for this conversation. */
1341
+ conversationId?: string;
1342
+ };
1136
1343
 
1137
1344
  /**
1138
- * SSE wire envelope wrapping every outbound event from the daemon.
1345
+ * Lightweight pub/sub hub for `AssistantEvent` messages.
1346
+ *
1347
+ * Filtering is applied at subscription level:
1348
+ * - `conversationId`: scoped events match subscribers with same conversationId
1349
+ * or no conversationId filter (broadcast to all).
1350
+ * - `targetCapability` (on publish): targeted events only reach subscribers
1351
+ * whose capabilities include the target. Untargeted events fan out to all.
1139
1352
  *
1140
- * Transport-level metadata (`id`, `seq`, `emittedAt`, `conversationId`)
1141
- * surrounds the semantic event payload in `message`.
1353
+ * Client connections register as subscribers with metadata and are queryable
1354
+ * via `listClients()`, `getMostRecentClientByCapability()`, etc.
1142
1355
  */
1143
- declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1144
- id: z.ZodString;
1356
+ export declare class AssistantEventHub {
1357
+ private readonly subscribers;
1358
+ private readonly maxSubscribers;
1359
+ /** Monotonic source for per-connection ids, scoped to this hub. */
1360
+ private connectionCounter;
1361
+ constructor(options?: {
1362
+ maxSubscribers?: number;
1363
+ });
1364
+ /**
1365
+ * Register a subscriber that will be called for each matching event.
1366
+ *
1367
+ * **Client deduplication:** When a client subscriber is registered with a
1368
+ * `clientId` that already exists, all stale entries for that clientId are
1369
+ * disposed first. This prevents subscriber stacking when clients reconnect
1370
+ * (e.g. Chrome extension reload, SSE token refresh) before the old
1371
+ * connection's abort signal fires.
1372
+ *
1373
+ * When the subscriber cap (`maxSubscribers`) has been reached, the **oldest**
1374
+ * subscriber is evicted to make room: its `onEvict` callback is invoked (so
1375
+ * it can close its SSE stream) and its entry is removed from the hub.
1376
+ */
1377
+ subscribe(subscriber: SubscriberInput): AssistantEventSubscription;
1378
+ /**
1379
+ * Publish an event to all matching subscribers.
1380
+ *
1381
+ * Matching rules:
1382
+ * - if `excludeClientId` is set, the subscriber with that clientId is
1383
+ * skipped regardless of every other rule (self-echo suppression — the
1384
+ * client that originated the mutation does not receive its own
1385
+ * invalidation back through the hub).
1386
+ * - if `targetClientId` is set, deliver only to the subscriber with that
1387
+ * clientId, bypassing the conversation-id filter entirely (the web-origin
1388
+ * event's conversationId differs from the macOS client's subscribed
1389
+ * conversation).
1390
+ * - if `filter.conversationId` is set (and `targetClientId` is not), the
1391
+ * `event.conversationId` must equal it
1392
+ * - if `targetCapability` is set, only subscribers whose capabilities include
1393
+ * it receive the event; untargeted events go to all
1394
+ * - if `targetInterfaceId` is set, only client subscribers whose
1395
+ * `interfaceId` matches receive the event; process subscribers and
1396
+ * non-matching clients are skipped. Used to narrow legacy
1397
+ * broadcasts (e.g. `conversation_list_invalidated`) to a specific
1398
+ * client surface during a migration window.
1399
+ *
1400
+ * Fanout is isolated: a throwing or rejecting subscriber does not abort
1401
+ * delivery to remaining subscribers.
1402
+ */
1403
+ publish(event: AssistantEvent, options?: {
1404
+ targetCapability?: HostProxyCapability;
1405
+ targetClientId?: string;
1406
+ targetInterfaceId?: InterfaceId;
1407
+ /**
1408
+ * Skip the subscriber with this `clientId`. Used for self-echo
1409
+ * suppression on `sync_changed`: the route handler echoes the
1410
+ * originating tab's `X-Vellum-Client-Id` back on the event, and the
1411
+ * hub uses it here to avoid re-delivering the invalidation to the
1412
+ * tab that already mutated its own optimistic state.
1413
+ */
1414
+ excludeClientId?: string;
1415
+ }): Promise<void>;
1416
+ /**
1417
+ * Return the active client subscriber with the given clientId, or
1418
+ * `undefined` if no such subscriber exists.
1419
+ */
1420
+ getClientById(clientId: string): ClientEntry | undefined;
1421
+ /**
1422
+ * Return the verified actor principal id captured at SSE subscription time
1423
+ * for the given client, or `undefined` if the client is unknown or
1424
+ * connected without a principal (e.g. legacy/service tokens).
1425
+ *
1426
+ * Used by host proxies to bind cross-client targeted execution to the same
1427
+ * authenticated user identity that opened the target client's SSE stream.
1428
+ */
1429
+ getActorPrincipalIdForClient(clientId: string): string | undefined;
1430
+ /**
1431
+ * Returns true when at least one active subscriber would receive the given
1432
+ * event based on the same conversation matching rules as publish().
1433
+ */
1434
+ hasSubscribersForEvent(event: Pick<AssistantEvent, "conversationId">): boolean;
1435
+ private clientEntries;
1436
+ /**
1437
+ * Return all active client subscribers, sorted by `lastActiveAt` descending.
1438
+ */
1439
+ listClients(): ClientEntry[];
1440
+ /**
1441
+ * Return all client subscribers that support the given capability,
1442
+ * sorted by `lastActiveAt` descending.
1443
+ */
1444
+ listClientsByCapability(capability: HostProxyCapability): ClientEntry[];
1445
+ /**
1446
+ * Return the most recently active client that supports the given
1447
+ * capability, or `undefined` if none exists.
1448
+ */
1449
+ getMostRecentClientByCapability(capability: HostProxyCapability): ClientEntry | undefined;
1450
+ /**
1451
+ * Return all client subscribers with the given interface type,
1452
+ * sorted by `lastActiveAt` descending.
1453
+ */
1454
+ listClientsByInterface(interfaceId: InterfaceId): ClientEntry[];
1455
+ /**
1456
+ * Touch a client subscriber — update `lastActiveAt`. Used by heartbeat.
1457
+ */
1458
+ touchClient(clientId: string): void;
1459
+ /**
1460
+ * Force-disconnect a client by disposing all subscribers for the given
1461
+ * `clientId`. Returns the number of disposed entries.
1462
+ *
1463
+ * Used by `assistant clients disconnect <clientId>` to forcibly remove
1464
+ * stale or unwanted client connections.
1465
+ */
1466
+ disposeClient(clientId: string): number;
1467
+ /** Number of currently active subscribers (useful for tests and caps). */
1468
+ subscriberCount(): number;
1469
+ /** Returns true if the hub can accept a subscriber without evicting anyone. */
1470
+ hasCapacity(): boolean;
1471
+ }
1472
+
1473
+ /** The plugin-facing event hub. See module docs. */
1474
+ export declare const assistantEventHub: PluginEventHub;
1475
+
1476
+ /** Opaque handle returned by `subscribe`. Call `dispose()` to remove the subscription. */
1477
+ export declare interface AssistantEventSubscription {
1478
+ dispose(): void;
1479
+ /** True until `dispose()` has been called. */
1480
+ readonly active: boolean;
1481
+ /**
1482
+ * Per-connection identifier, unique within the hub instance. Distinguishes
1483
+ * connections that share a `clientId` (e.g. an old connection and the new
1484
+ * one that replaced it on reconnect) so subscribe / dispose / shed log
1485
+ * lines can be attributed to a specific connection.
1486
+ */
1487
+ readonly connectionId: string;
1488
+ }
1489
+
1490
+ declare type AssistantStatusEvent = z.infer<typeof AssistantStatusEventSchema>;
1491
+
1492
+ declare const AssistantStatusEventSchema: z.ZodObject<{
1493
+ type: z.ZodLiteral<"assistant_status">;
1494
+ version: z.ZodOptional<z.ZodString>;
1495
+ keyFingerprint: z.ZodOptional<z.ZodString>;
1496
+ }, z.core.$strip>;
1497
+
1498
+ declare type AssistantTextDeltaEvent = z.infer<typeof AssistantTextDeltaEventSchema>;
1499
+
1500
+ declare const AssistantTextDeltaEventSchema: z.ZodObject<{
1501
+ type: z.ZodLiteral<"assistant_text_delta">;
1502
+ text: z.ZodString;
1503
+ messageId: z.ZodOptional<z.ZodString>;
1145
1504
  conversationId: z.ZodOptional<z.ZodString>;
1146
- seq: z.ZodOptional<z.ZodNumber>;
1147
- emittedAt: z.ZodString;
1148
- message: z.ZodDiscriminatedUnion<[z.ZodObject<{
1149
- type: z.ZodLiteral<"acp_session_completed">;
1150
- acpSessionId: z.ZodString;
1151
- stopReason: z.ZodEnum<{
1152
- cancelled: "cancelled";
1153
- end_turn: "end_turn";
1154
- max_tokens: "max_tokens";
1155
- max_turn_requests: "max_turn_requests";
1156
- refusal: "refusal";
1157
- }>;
1158
- }, z.core.$strict>, z.ZodObject<{
1159
- type: z.ZodLiteral<"acp_session_error">;
1160
- acpSessionId: z.ZodString;
1161
- error: z.ZodString;
1162
- }, z.core.$strict>, z.ZodObject<{
1163
- type: z.ZodLiteral<"acp_session_spawned">;
1164
- acpSessionId: z.ZodString;
1165
- agent: z.ZodString;
1166
- parentConversationId: z.ZodString;
1167
- parentToolUseId: z.ZodOptional<z.ZodString>;
1168
- task: z.ZodOptional<z.ZodString>;
1169
- }, z.core.$strict>, z.ZodObject<{
1170
- type: z.ZodLiteral<"acp_session_update">;
1171
- acpSessionId: z.ZodString;
1172
- updateType: z.ZodEnum<{
1173
- agent_message_chunk: "agent_message_chunk";
1174
- agent_thought_chunk: "agent_thought_chunk";
1175
- user_message_chunk: "user_message_chunk";
1176
- tool_call: "tool_call";
1177
- tool_call_update: "tool_call_update";
1178
- plan: "plan";
1179
- }>;
1180
- content: z.ZodOptional<z.ZodString>;
1181
- toolCallId: z.ZodOptional<z.ZodString>;
1182
- toolTitle: z.ZodOptional<z.ZodString>;
1183
- toolKind: z.ZodOptional<z.ZodString>;
1184
- toolStatus: z.ZodOptional<z.ZodString>;
1185
- rawInput: z.ZodOptional<z.ZodUnknown>;
1186
- rawOutput: z.ZodOptional<z.ZodUnknown>;
1187
- locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1188
- path: z.ZodString;
1189
- line: z.ZodOptional<z.ZodNumber>;
1190
- }, z.core.$strip>>>;
1191
- messageId: z.ZodOptional<z.ZodString>;
1192
- seq: z.ZodOptional<z.ZodNumber>;
1193
- }, z.core.$strict>, z.ZodObject<{
1194
- type: z.ZodLiteral<"acp_session_usage">;
1195
- acpSessionId: z.ZodString;
1196
- usedTokens: z.ZodNumber;
1197
- contextSize: z.ZodNumber;
1198
- inputTokens: z.ZodOptional<z.ZodNumber>;
1199
- outputTokens: z.ZodOptional<z.ZodNumber>;
1200
- costAmount: z.ZodOptional<z.ZodNumber>;
1201
- costCurrency: z.ZodOptional<z.ZodString>;
1202
- }, z.core.$strict>, z.ZodObject<{
1203
- type: z.ZodLiteral<"app_files_changed">;
1204
- appId: z.ZodString;
1205
- }, z.core.$strip>, z.ZodObject<{
1206
- type: z.ZodLiteral<"assistant_activity_state">;
1207
- conversationId: z.ZodString;
1208
- activityVersion: z.ZodNumber;
1209
- phase: z.ZodEnum<{
1210
- thinking: "thinking";
1211
- idle: "idle";
1212
- streaming: "streaming";
1213
- tool_running: "tool_running";
1214
- awaiting_confirmation: "awaiting_confirmation";
1215
- }>;
1216
- anchor: z.ZodEnum<{
1217
- assistant_turn: "assistant_turn";
1218
- user_turn: "user_turn";
1219
- global: "global";
1220
- }>;
1221
- reason: z.ZodEnum<{
1222
- thinking_delta: "thinking_delta";
1223
- message_dequeued: "message_dequeued";
1224
- first_text_delta: "first_text_delta";
1225
- tool_use_start: "tool_use_start";
1226
- preview_start: "preview_start";
1227
- tool_result_received: "tool_result_received";
1228
- confirmation_requested: "confirmation_requested";
1229
- confirmation_resolved: "confirmation_resolved";
1230
- context_compacting: "context_compacting";
1231
- message_complete: "message_complete";
1232
- generation_cancelled: "generation_cancelled";
1233
- error_terminal: "error_terminal";
1234
- }>;
1235
- requestId: z.ZodOptional<z.ZodString>;
1236
- statusText: z.ZodOptional<z.ZodString>;
1237
- }, z.core.$strip>, z.ZodObject<{
1238
- type: z.ZodLiteral<"assistant_status">;
1239
- version: z.ZodOptional<z.ZodString>;
1240
- keyFingerprint: z.ZodOptional<z.ZodString>;
1241
- }, z.core.$strip>, z.ZodObject<{
1242
- type: z.ZodLiteral<"assistant_text_delta">;
1243
- text: z.ZodString;
1244
- messageId: z.ZodOptional<z.ZodString>;
1245
- conversationId: z.ZodOptional<z.ZodString>;
1246
- }, z.core.$strip>, z.ZodObject<{
1247
- type: z.ZodLiteral<"assistant_thinking_delta">;
1248
- thinking: z.ZodString;
1249
- messageId: z.ZodOptional<z.ZodString>;
1250
- conversationId: z.ZodOptional<z.ZodString>;
1251
- timestampMs: z.ZodOptional<z.ZodNumber>;
1252
- }, z.core.$strip>, z.ZodObject<{
1253
- type: z.ZodLiteral<"assistant_turn_start">;
1254
- messageId: z.ZodString;
1255
- conversationId: z.ZodOptional<z.ZodString>;
1256
- }, z.core.$strip>, z.ZodObject<{
1257
- type: z.ZodLiteral<"avatar_updated">;
1258
- avatarPath: z.ZodString;
1259
- }, z.core.$strip>, z.ZodObject<{
1260
- type: z.ZodLiteral<"background_tool_completed">;
1261
- id: z.ZodString;
1262
- conversationId: z.ZodString;
1263
- status: z.ZodEnum<{
1264
- cancelled: "cancelled";
1265
- completed: "completed";
1266
- failed: "failed";
1267
- }>;
1268
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1269
- output: z.ZodOptional<z.ZodString>;
1270
- completedAt: z.ZodNumber;
1271
- }, z.core.$strip>, z.ZodObject<{
1272
- type: z.ZodLiteral<"background_tool_started">;
1273
- id: z.ZodString;
1274
- toolName: z.ZodString;
1275
- conversationId: z.ZodString;
1276
- command: z.ZodString;
1277
- startedAt: z.ZodNumber;
1278
- }, z.core.$strip>, z.ZodObject<{
1279
- type: z.ZodLiteral<"bookmark.created">;
1280
- bookmark: z.ZodObject<{
1281
- id: z.ZodString;
1282
- messageId: z.ZodString;
1283
- conversationId: z.ZodString;
1284
- conversationTitle: z.ZodNullable<z.ZodString>;
1285
- messagePreview: z.ZodString;
1286
- messageRole: z.ZodString;
1287
- messageCreatedAt: z.ZodNumber;
1288
- createdAt: z.ZodNumber;
1289
- }, z.core.$strip>;
1290
- }, z.core.$strip>, z.ZodObject<{
1291
- type: z.ZodLiteral<"bookmark.deleted">;
1292
- messageId: z.ZodString;
1293
- }, z.core.$strip>, z.ZodObject<{
1294
- type: z.ZodLiteral<"client_settings_update">;
1295
- key: z.ZodString;
1296
- value: z.ZodString;
1297
- }, z.core.$strip>, z.ZodObject<{
1298
- type: z.ZodLiteral<"compaction_circuit_closed">;
1299
- conversationId: z.ZodString;
1300
- }, z.core.$strip>, z.ZodObject<{
1301
- type: z.ZodLiteral<"compaction_circuit_open">;
1302
- conversationId: z.ZodString;
1303
- reason: z.ZodLiteral<"3_consecutive_failures">;
1304
- openUntil: z.ZodNumber;
1305
- }, z.core.$strip>, z.ZodObject<{
1306
- type: z.ZodLiteral<"config_changed">;
1307
- }, z.core.$strip>, z.ZodObject<{
1308
- type: z.ZodLiteral<"confirmation_request">;
1309
- requestId: z.ZodString;
1310
- toolName: z.ZodString;
1311
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1312
- riskLevel: z.ZodString;
1313
- riskReason: z.ZodOptional<z.ZodString>;
1314
- isContainerized: z.ZodOptional<z.ZodBoolean>;
1315
- executionTarget: z.ZodOptional<z.ZodEnum<{
1316
- sandbox: "sandbox";
1317
- host: "host";
1318
- }>>;
1319
- allowlistOptions: z.ZodArray<z.ZodObject<{
1320
- label: z.ZodString;
1321
- description: z.ZodString;
1322
- pattern: z.ZodString;
1323
- }, z.core.$strip>>;
1324
- scopeOptions: z.ZodArray<z.ZodObject<{
1325
- label: z.ZodString;
1326
- scope: z.ZodString;
1327
- }, z.core.$strip>>;
1328
- directoryScopeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1329
- label: z.ZodString;
1330
- scope: z.ZodString;
1331
- }, z.core.$strip>>>;
1332
- diff: z.ZodOptional<z.ZodObject<{
1333
- filePath: z.ZodString;
1334
- oldContent: z.ZodString;
1335
- newContent: z.ZodString;
1336
- isNewFile: z.ZodBoolean;
1337
- }, z.core.$strip>>;
1338
- conversationId: z.ZodOptional<z.ZodString>;
1339
- persistentDecisionsAllowed: z.ZodOptional<z.ZodBoolean>;
1340
- toolUseId: z.ZodOptional<z.ZodString>;
1341
- acpToolKind: z.ZodOptional<z.ZodString>;
1342
- acpOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1343
- optionId: z.ZodString;
1344
- name: z.ZodString;
1345
- kind: z.ZodEnum<{
1346
- allow_once: "allow_once";
1347
- allow_always: "allow_always";
1348
- reject_once: "reject_once";
1349
- reject_always: "reject_always";
1350
- }>;
1351
- }, z.core.$strip>>>;
1352
- }, z.core.$strip>, z.ZodObject<{
1353
- type: z.ZodLiteral<"confirmation_state_changed">;
1354
- conversationId: z.ZodString;
1355
- requestId: z.ZodString;
1356
- state: z.ZodEnum<{
1357
- timed_out: "timed_out";
1358
- pending: "pending";
1359
- approved: "approved";
1360
- denied: "denied";
1361
- resolved_stale: "resolved_stale";
1362
- }>;
1363
- source: z.ZodEnum<{
1364
- button: "button";
1365
- inline_nl: "inline_nl";
1366
- auto_deny: "auto_deny";
1367
- timeout: "timeout";
1368
- system: "system";
1369
- }>;
1370
- causedByRequestId: z.ZodOptional<z.ZodString>;
1371
- decisionText: z.ZodOptional<z.ZodString>;
1372
- toolUseId: z.ZodOptional<z.ZodString>;
1373
- }, z.core.$strip>, z.ZodObject<{
1374
- type: z.ZodLiteral<"contact_request">;
1375
- requestId: z.ZodString;
1376
- channel: z.ZodOptional<z.ZodString>;
1377
- placeholder: z.ZodOptional<z.ZodString>;
1378
- label: z.ZodOptional<z.ZodString>;
1379
- description: z.ZodOptional<z.ZodString>;
1380
- role: z.ZodOptional<z.ZodString>;
1381
- }, z.core.$strip>, z.ZodObject<{
1382
- type: z.ZodLiteral<"contacts_changed">;
1383
- }, z.core.$strip>, z.ZodObject<{
1384
- type: z.ZodLiteral<"context_compacted">;
1385
- conversationId: z.ZodString;
1386
- previousEstimatedInputTokens: z.ZodNumber;
1387
- estimatedInputTokens: z.ZodNumber;
1388
- maxInputTokens: z.ZodNumber;
1389
- thresholdTokens: z.ZodNumber;
1390
- compactedMessages: z.ZodNumber;
1391
- summaryCalls: z.ZodNumber;
1392
- summaryInputTokens: z.ZodNumber;
1393
- summaryOutputTokens: z.ZodNumber;
1394
- summaryModel: z.ZodString;
1395
- summaryCharCount: z.ZodOptional<z.ZodNumber>;
1396
- summaryHeaderCount: z.ZodOptional<z.ZodNumber>;
1397
- summaryHadMemoryEcho: z.ZodOptional<z.ZodBoolean>;
1398
- }, z.core.$strip>, z.ZodObject<{
1399
- type: z.ZodLiteral<"conversation_error">;
1400
- conversationId: z.ZodString;
1401
- code: z.ZodEnum<{
1402
- PROVIDER_NETWORK: "PROVIDER_NETWORK";
1403
- PROVIDER_RATE_LIMIT: "PROVIDER_RATE_LIMIT";
1404
- MANAGED_USAGE_LIMIT: "MANAGED_USAGE_LIMIT";
1405
- PROVIDER_OVERLOADED: "PROVIDER_OVERLOADED";
1406
- PROVIDER_API: "PROVIDER_API";
1407
- IMAGE_TOO_LARGE: "IMAGE_TOO_LARGE";
1408
- PROVIDER_BILLING: "PROVIDER_BILLING";
1409
- PROVIDER_ORDERING: "PROVIDER_ORDERING";
1410
- PROVIDER_WEB_SEARCH: "PROVIDER_WEB_SEARCH";
1411
- PROVIDER_NOT_CONFIGURED: "PROVIDER_NOT_CONFIGURED";
1412
- PROVIDER_INVALID_KEY: "PROVIDER_INVALID_KEY";
1413
- MANAGED_KEY_INVALID: "MANAGED_KEY_INVALID";
1414
- CONTEXT_TOO_LARGE: "CONTEXT_TOO_LARGE";
1415
- BUDGET_YIELD_UNRECOVERED: "BUDGET_YIELD_UNRECOVERED";
1416
- MAX_TOKENS_REACHED: "MAX_TOKENS_REACHED";
1417
- CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
1418
- CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
1419
- DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
1420
- UNKNOWN: "UNKNOWN";
1421
- }>;
1422
- userMessage: z.ZodString;
1423
- retryable: z.ZodBoolean;
1424
- debugDetails: z.ZodOptional<z.ZodString>;
1425
- errorCategory: z.ZodOptional<z.ZodString>;
1426
- connectionName: z.ZodOptional<z.ZodString>;
1427
- profileName: z.ZodOptional<z.ZodString>;
1428
- }, z.core.$strip>, z.ZodObject<{
1429
- type: z.ZodLiteral<"conversation_inference_profile_updated">;
1430
- conversationId: z.ZodString;
1431
- profile: z.ZodNullable<z.ZodString>;
1432
- sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1433
- expiresAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1434
- }, z.core.$strip>, z.ZodObject<{
1435
- type: z.ZodLiteral<"conversation_list_invalidated">;
1436
- reason: z.ZodEnum<{
1437
- created: "created";
1438
- renamed: "renamed";
1439
- deleted: "deleted";
1440
- reordered: "reordered";
1441
- seen_changed: "seen_changed";
1442
- }>;
1443
- }, z.core.$strip>, z.ZodObject<{
1444
- type: z.ZodLiteral<"conversation_notice">;
1445
- conversationId: z.ZodString;
1446
- source: z.ZodEnum<{
1447
- memory_v3: "memory_v3";
1448
- }>;
1449
- code: z.ZodEnum<{
1450
- PROVIDER_NETWORK: "PROVIDER_NETWORK";
1451
- PROVIDER_RATE_LIMIT: "PROVIDER_RATE_LIMIT";
1452
- MANAGED_USAGE_LIMIT: "MANAGED_USAGE_LIMIT";
1453
- PROVIDER_OVERLOADED: "PROVIDER_OVERLOADED";
1454
- PROVIDER_API: "PROVIDER_API";
1455
- IMAGE_TOO_LARGE: "IMAGE_TOO_LARGE";
1456
- PROVIDER_BILLING: "PROVIDER_BILLING";
1457
- PROVIDER_ORDERING: "PROVIDER_ORDERING";
1458
- PROVIDER_WEB_SEARCH: "PROVIDER_WEB_SEARCH";
1459
- PROVIDER_NOT_CONFIGURED: "PROVIDER_NOT_CONFIGURED";
1460
- PROVIDER_INVALID_KEY: "PROVIDER_INVALID_KEY";
1461
- MANAGED_KEY_INVALID: "MANAGED_KEY_INVALID";
1462
- CONTEXT_TOO_LARGE: "CONTEXT_TOO_LARGE";
1463
- BUDGET_YIELD_UNRECOVERED: "BUDGET_YIELD_UNRECOVERED";
1464
- MAX_TOKENS_REACHED: "MAX_TOKENS_REACHED";
1465
- CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
1466
- CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
1467
- DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
1468
- UNKNOWN: "UNKNOWN";
1469
- }>;
1470
- userMessage: z.ZodString;
1471
- errorCategory: z.ZodOptional<z.ZodString>;
1472
- }, z.core.$strip>, z.ZodObject<{
1473
- type: z.ZodLiteral<"conversation_title_updated">;
1474
- conversationId: z.ZodString;
1475
- title: z.ZodString;
1476
- }, z.core.$strip>, z.ZodObject<{
1477
- type: z.ZodLiteral<"disk_pressure_status_changed">;
1478
- status: z.ZodObject<{
1479
- enabled: z.ZodBoolean;
1480
- state: z.ZodEnum<{
1481
- unknown: "unknown";
1482
- disabled: "disabled";
1483
- critical: "critical";
1484
- ok: "ok";
1485
- warning: "warning";
1486
- }>;
1487
- locked: z.ZodBoolean;
1488
- acknowledged: z.ZodBoolean;
1489
- overrideActive: z.ZodBoolean;
1490
- effectivelyLocked: z.ZodBoolean;
1491
- lockId: z.ZodNullable<z.ZodString>;
1492
- usagePercent: z.ZodNullable<z.ZodNumber>;
1493
- thresholdPercent: z.ZodNumber;
1494
- path: z.ZodNullable<z.ZodString>;
1495
- lastCheckedAt: z.ZodNullable<z.ZodString>;
1496
- blockedCapabilities: z.ZodArray<z.ZodEnum<{
1497
- "agent-turns": "agent-turns";
1498
- "background-work": "background-work";
1499
- "remote-ingress": "remote-ingress";
1500
- }>>;
1501
- error: z.ZodNullable<z.ZodString>;
1502
- }, z.core.$strip>;
1503
- }, z.core.$strip>, z.ZodObject<{
1504
- type: z.ZodLiteral<"document_comment_created">;
1505
- conversationId: z.ZodString;
1506
- surfaceId: z.ZodString;
1507
- comment: z.ZodObject<{
1508
- id: z.ZodString;
1509
- surfaceId: z.ZodString;
1510
- author: z.ZodString;
1511
- content: z.ZodString;
1512
- anchorStart: z.ZodOptional<z.ZodNumber>;
1513
- anchorEnd: z.ZodOptional<z.ZodNumber>;
1514
- anchorText: z.ZodOptional<z.ZodString>;
1515
- parentCommentId: z.ZodOptional<z.ZodString>;
1516
- status: z.ZodString;
1517
- createdAt: z.ZodNumber;
1518
- updatedAt: z.ZodNumber;
1519
- }, z.core.$strip>;
1520
- }, z.core.$strip>, z.ZodObject<{
1521
- type: z.ZodLiteral<"document_comment_deleted">;
1522
- conversationId: z.ZodString;
1523
- surfaceId: z.ZodString;
1524
- commentId: z.ZodString;
1525
- }, z.core.$strip>, z.ZodObject<{
1526
- type: z.ZodLiteral<"document_comment_reopened">;
1527
- conversationId: z.ZodString;
1528
- surfaceId: z.ZodString;
1529
- commentId: z.ZodString;
1530
- }, z.core.$strip>, z.ZodObject<{
1531
- type: z.ZodLiteral<"document_comment_resolved">;
1532
- conversationId: z.ZodString;
1533
- surfaceId: z.ZodString;
1534
- commentId: z.ZodString;
1535
- resolvedBy: z.ZodString;
1536
- }, z.core.$strip>, z.ZodObject<{
1537
- type: z.ZodLiteral<"document_editor_show">;
1538
- conversationId: z.ZodString;
1539
- surfaceId: z.ZodString;
1540
- title: z.ZodString;
1541
- initialContent: z.ZodString;
1542
- }, z.core.$strip>, z.ZodObject<{
1543
- type: z.ZodLiteral<"document_editor_update">;
1544
- conversationId: z.ZodString;
1545
- surfaceId: z.ZodString;
1546
- markdown: z.ZodString;
1547
- mode: z.ZodString;
1548
- }, z.core.$strip>, z.ZodObject<{
1549
- type: z.ZodLiteral<"error">;
1550
- message: z.ZodString;
1551
- code: z.ZodOptional<z.ZodString>;
1552
- category: z.ZodOptional<z.ZodString>;
1553
- errorCategory: z.ZodOptional<z.ZodString>;
1554
- requestId: z.ZodOptional<z.ZodString>;
1555
- conversationId: z.ZodOptional<z.ZodString>;
1556
- }, z.core.$strip>, z.ZodObject<{
1557
- type: z.ZodLiteral<"generation_cancelled">;
1558
- conversationId: z.ZodOptional<z.ZodString>;
1559
- }, z.core.$strip>, z.ZodObject<{
1560
- type: z.ZodLiteral<"generation_handoff">;
1561
- conversationId: z.ZodOptional<z.ZodString>;
1562
- requestId: z.ZodOptional<z.ZodString>;
1563
- queuedCount: z.ZodNumber;
1564
- messageId: z.ZodOptional<z.ZodString>;
1565
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1566
- id: z.ZodOptional<z.ZodString>;
1567
- filename: z.ZodString;
1568
- mimeType: z.ZodString;
1569
- data: z.ZodString;
1570
- sourceType: z.ZodOptional<z.ZodEnum<{
1571
- host_file: "host_file";
1572
- sandbox_file: "sandbox_file";
1573
- tool_block: "tool_block";
1574
- }>>;
1575
- sizeBytes: z.ZodOptional<z.ZodNumber>;
1576
- thumbnailData: z.ZodOptional<z.ZodString>;
1577
- fileBacked: z.ZodOptional<z.ZodBoolean>;
1578
- filePath: z.ZodOptional<z.ZodString>;
1579
- }, z.core.$strip>>>;
1580
- attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1581
- }, z.core.$strip>, z.ZodObject<{
1582
- type: z.ZodLiteral<"heartbeat_alert">;
1583
- title: z.ZodString;
1584
- body: z.ZodString;
1585
- }, z.core.$strip>, z.ZodObject<{
1586
- type: z.ZodLiteral<"heartbeat_conversation_created">;
1587
- conversationId: z.ZodString;
1588
- title: z.ZodString;
1589
- }, z.core.$strip>, z.ZodObject<{
1590
- type: z.ZodLiteral<"home_feed_updated">;
1591
- updatedAt: z.ZodString;
1592
- newItemCount: z.ZodNumber;
1593
- }, z.core.$strip>, z.ZodObject<{
1594
- type: z.ZodLiteral<"hook_event">;
1595
- conversationId: z.ZodOptional<z.ZodString>;
1596
- hookName: z.ZodString;
1597
- owner: z.ZodObject<{
1598
- kind: z.ZodEnum<{
1599
- plugin: "plugin";
1600
- workspace: "workspace";
1601
- }>;
1602
- id: z.ZodString;
1603
- }, z.core.$strip>;
1604
- detail: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1605
- }, z.core.$strip>, z.ZodObject<{
1606
- type: z.ZodLiteral<"host_app_control_cancel">;
1607
- requestId: z.ZodString;
1608
- conversationId: z.ZodString;
1609
- }, z.core.$strip>, z.ZodObject<{
1610
- type: z.ZodLiteral<"host_app_control_request">;
1611
- requestId: z.ZodString;
1612
- conversationId: z.ZodString;
1613
- toolName: z.ZodString;
1614
- input: z.ZodDiscriminatedUnion<[z.ZodObject<{
1615
- tool: z.ZodLiteral<"start">;
1616
- app: z.ZodString;
1617
- args: z.ZodOptional<z.ZodArray<z.ZodString>>;
1618
- }, z.core.$strip>, z.ZodObject<{
1619
- tool: z.ZodLiteral<"observe">;
1620
- app: z.ZodString;
1621
- settle_ms: z.ZodOptional<z.ZodNumber>;
1622
- }, z.core.$strip>, z.ZodObject<{
1623
- tool: z.ZodLiteral<"press">;
1624
- app: z.ZodString;
1625
- key: z.ZodString;
1626
- modifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
1627
- duration_ms: z.ZodOptional<z.ZodNumber>;
1628
- }, z.core.$strip>, z.ZodObject<{
1629
- tool: z.ZodLiteral<"combo">;
1630
- app: z.ZodString;
1631
- keys: z.ZodArray<z.ZodString>;
1632
- duration_ms: z.ZodOptional<z.ZodNumber>;
1633
- }, z.core.$strip>, z.ZodObject<{
1634
- tool: z.ZodLiteral<"sequence">;
1635
- app: z.ZodString;
1636
- steps: z.ZodArray<z.ZodObject<{
1637
- key: z.ZodString;
1638
- modifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
1639
- duration_ms: z.ZodOptional<z.ZodNumber>;
1640
- gap_ms: z.ZodOptional<z.ZodNumber>;
1641
- }, z.core.$strip>>;
1642
- }, z.core.$strip>, z.ZodObject<{
1643
- tool: z.ZodLiteral<"type">;
1644
- app: z.ZodString;
1645
- text: z.ZodString;
1646
- }, z.core.$strip>, z.ZodObject<{
1647
- tool: z.ZodLiteral<"click">;
1648
- app: z.ZodString;
1649
- x: z.ZodNumber;
1650
- y: z.ZodNumber;
1651
- button: z.ZodOptional<z.ZodEnum<{
1652
- left: "left";
1653
- right: "right";
1654
- middle: "middle";
1655
- }>>;
1656
- double: z.ZodOptional<z.ZodBoolean>;
1657
- }, z.core.$strip>, z.ZodObject<{
1658
- tool: z.ZodLiteral<"drag">;
1659
- app: z.ZodString;
1660
- from_x: z.ZodNumber;
1661
- from_y: z.ZodNumber;
1662
- to_x: z.ZodNumber;
1663
- to_y: z.ZodNumber;
1664
- button: z.ZodOptional<z.ZodEnum<{
1665
- left: "left";
1666
- right: "right";
1667
- middle: "middle";
1668
- }>>;
1669
- }, z.core.$strip>, z.ZodObject<{
1670
- tool: z.ZodLiteral<"stop">;
1671
- app: z.ZodOptional<z.ZodString>;
1672
- reason: z.ZodOptional<z.ZodString>;
1673
- }, z.core.$strip>], "tool">;
1674
- }, z.core.$strip>, z.ZodObject<{
1675
- type: z.ZodLiteral<"host_bash_cancel">;
1676
- requestId: z.ZodString;
1677
- conversationId: z.ZodString;
1678
- targetClientId: z.ZodOptional<z.ZodString>;
1679
- }, z.core.$strip>, z.ZodObject<{
1680
- type: z.ZodLiteral<"host_bash_request">;
1681
- requestId: z.ZodString;
1682
- conversationId: z.ZodString;
1683
- command: z.ZodString;
1684
- working_dir: z.ZodOptional<z.ZodString>;
1685
- timeout_seconds: z.ZodOptional<z.ZodNumber>;
1686
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1687
- targetClientId: z.ZodOptional<z.ZodString>;
1688
- }, z.core.$strip>, z.ZodObject<{
1689
- type: z.ZodLiteral<"host_browser_cancel">;
1690
- requestId: z.ZodString;
1691
- }, z.core.$strip>, z.ZodObject<{
1692
- type: z.ZodLiteral<"host_browser_request">;
1693
- requestId: z.ZodString;
1694
- conversationId: z.ZodString;
1695
- cdpMethod: z.ZodString;
1696
- cdpParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1697
- cdpSessionId: z.ZodOptional<z.ZodString>;
1698
- timeout_seconds: z.ZodOptional<z.ZodNumber>;
1699
- }, z.core.$strip>, z.ZodObject<{
1700
- type: z.ZodLiteral<"host_cu_cancel">;
1701
- requestId: z.ZodString;
1702
- conversationId: z.ZodString;
1703
- targetClientId: z.ZodOptional<z.ZodString>;
1704
- }, z.core.$strip>, z.ZodObject<{
1705
- type: z.ZodLiteral<"host_cu_request">;
1706
- requestId: z.ZodString;
1707
- conversationId: z.ZodString;
1708
- targetClientId: z.ZodOptional<z.ZodString>;
1709
- toolName: z.ZodString;
1710
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1711
- stepNumber: z.ZodNumber;
1712
- reasoning: z.ZodOptional<z.ZodString>;
1713
- }, z.core.$strip>, z.ZodObject<{
1714
- type: z.ZodLiteral<"host_file_cancel">;
1715
- requestId: z.ZodString;
1716
- conversationId: z.ZodString;
1717
- targetClientId: z.ZodOptional<z.ZodString>;
1718
- }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1719
- type: z.ZodLiteral<"host_file_request">;
1720
- requestId: z.ZodString;
1721
- conversationId: z.ZodString;
1722
- targetClientId: z.ZodOptional<z.ZodString>;
1723
- operation: z.ZodLiteral<"read">;
1724
- path: z.ZodString;
1725
- offset: z.ZodOptional<z.ZodNumber>;
1726
- limit: z.ZodOptional<z.ZodNumber>;
1727
- }, z.core.$strip>, z.ZodObject<{
1728
- type: z.ZodLiteral<"host_file_request">;
1729
- requestId: z.ZodString;
1730
- conversationId: z.ZodString;
1731
- targetClientId: z.ZodOptional<z.ZodString>;
1732
- operation: z.ZodLiteral<"write">;
1733
- path: z.ZodString;
1734
- content: z.ZodString;
1735
- }, z.core.$strip>, z.ZodObject<{
1736
- type: z.ZodLiteral<"host_file_request">;
1737
- requestId: z.ZodString;
1738
- conversationId: z.ZodString;
1739
- targetClientId: z.ZodOptional<z.ZodString>;
1740
- operation: z.ZodLiteral<"edit">;
1741
- path: z.ZodString;
1742
- old_string: z.ZodString;
1743
- new_string: z.ZodString;
1744
- replace_all: z.ZodOptional<z.ZodBoolean>;
1745
- }, z.core.$strip>], "operation">, z.ZodObject<{
1746
- type: z.ZodLiteral<"host_transfer_cancel">;
1747
- requestId: z.ZodString;
1748
- conversationId: z.ZodString;
1749
- targetClientId: z.ZodOptional<z.ZodString>;
1750
- }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1751
- type: z.ZodLiteral<"host_transfer_request">;
1752
- requestId: z.ZodString;
1753
- conversationId: z.ZodString;
1754
- targetClientId: z.ZodOptional<z.ZodString>;
1755
- direction: z.ZodLiteral<"to_host">;
1756
- transferId: z.ZodString;
1757
- destPath: z.ZodString;
1758
- sizeBytes: z.ZodNumber;
1759
- sha256: z.ZodString;
1760
- overwrite: z.ZodBoolean;
1761
- }, z.core.$strip>, z.ZodObject<{
1762
- type: z.ZodLiteral<"host_transfer_request">;
1763
- requestId: z.ZodString;
1764
- conversationId: z.ZodString;
1765
- targetClientId: z.ZodOptional<z.ZodString>;
1766
- direction: z.ZodLiteral<"to_sandbox">;
1767
- transferId: z.ZodString;
1768
- sourcePath: z.ZodString;
1769
- }, z.core.$strip>], "direction">, z.ZodObject<{
1770
- type: z.ZodLiteral<"host_ui_snapshot_cancel">;
1771
- requestId: z.ZodString;
1772
- }, z.core.$strip>, z.ZodObject<{
1773
- type: z.ZodLiteral<"host_ui_snapshot_request">;
1774
- requestId: z.ZodString;
1775
- view: z.ZodEnum<{
1776
- sampler: "sampler";
1777
- chat: "chat";
1778
- }>;
1779
- tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1780
- }, z.core.$strip>, z.ZodObject<{
1781
- type: z.ZodLiteral<"identity_changed">;
1782
- name: z.ZodString;
1783
- role: z.ZodString;
1784
- personality: z.ZodString;
1785
- emoji: z.ZodString;
1786
- home: z.ZodString;
1787
- }, z.core.$strip>, z.ZodObject<{
1788
- type: z.ZodLiteral<"interaction_resolved">;
1789
- requestId: z.ZodString;
1790
- conversationId: z.ZodString;
1791
- state: z.ZodEnum<{
1792
- cancelled: "cancelled";
1793
- superseded: "superseded";
1794
- approved: "approved";
1795
- rejected: "rejected";
1796
- answered: "answered";
1797
- }>;
1798
- kind: z.ZodString;
1799
- }, z.core.$strip>, z.ZodObject<{
1800
- type: z.ZodLiteral<"memory_recalled">;
1801
- provider: z.ZodString;
1802
- model: z.ZodString;
1803
- degradation: z.ZodOptional<z.ZodObject<{
1804
- semanticUnavailable: z.ZodBoolean;
1805
- reason: z.ZodString;
1806
- fallbackSources: z.ZodArray<z.ZodString>;
1807
- }, z.core.$strip>>;
1808
- semanticHits: z.ZodNumber;
1809
- tier1Count: z.ZodNumber;
1810
- tier2Count: z.ZodNumber;
1811
- hybridSearchLatencyMs: z.ZodNumber;
1812
- sparseVectorUsed: z.ZodBoolean;
1813
- mergedCount: z.ZodNumber;
1814
- selectedCount: z.ZodNumber;
1815
- injectedTokens: z.ZodNumber;
1816
- latencyMs: z.ZodNumber;
1817
- topCandidates: z.ZodArray<z.ZodObject<{
1818
- key: z.ZodString;
1819
- type: z.ZodString;
1820
- kind: z.ZodString;
1821
- finalScore: z.ZodNumber;
1822
- semantic: z.ZodNumber;
1823
- recency: z.ZodNumber;
1824
- }, z.core.$strip>>;
1825
- }, z.core.$strip>, z.ZodObject<{
1826
- type: z.ZodLiteral<"memory_status">;
1827
- enabled: z.ZodBoolean;
1828
- degraded: z.ZodBoolean;
1829
- degradation: z.ZodOptional<z.ZodObject<{
1830
- semanticUnavailable: z.ZodBoolean;
1831
- reason: z.ZodString;
1832
- fallbackSources: z.ZodArray<z.ZodString>;
1833
- }, z.core.$strip>>;
1834
- reason: z.ZodOptional<z.ZodString>;
1835
- provider: z.ZodOptional<z.ZodString>;
1836
- model: z.ZodOptional<z.ZodString>;
1837
- }, z.core.$strip>, z.ZodObject<{
1838
- type: z.ZodLiteral<"message_complete">;
1839
- messageId: z.ZodOptional<z.ZodString>;
1840
- conversationId: z.ZodOptional<z.ZodString>;
1841
- source: z.ZodOptional<z.ZodEnum<{
1842
- main: "main";
1843
- aux: "aux";
1844
- }>>;
1845
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1846
- id: z.ZodOptional<z.ZodString>;
1847
- filename: z.ZodString;
1848
- mimeType: z.ZodString;
1849
- data: z.ZodString;
1850
- sourceType: z.ZodOptional<z.ZodEnum<{
1851
- host_file: "host_file";
1852
- sandbox_file: "sandbox_file";
1853
- tool_block: "tool_block";
1854
- }>>;
1855
- sizeBytes: z.ZodOptional<z.ZodNumber>;
1856
- thumbnailData: z.ZodOptional<z.ZodString>;
1857
- fileBacked: z.ZodOptional<z.ZodBoolean>;
1858
- filePath: z.ZodOptional<z.ZodString>;
1859
- }, z.core.$strip>>>;
1860
- attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1861
- }, z.core.$strip>, z.ZodObject<{
1862
- type: z.ZodLiteral<"message_dequeued">;
1863
- conversationId: z.ZodString;
1864
- requestId: z.ZodString;
1865
- }, z.core.$strip>, z.ZodObject<{
1866
- type: z.ZodLiteral<"message_queued">;
1867
- conversationId: z.ZodString;
1868
- requestId: z.ZodString;
1869
- position: z.ZodNumber;
1870
- }, z.core.$strip>, z.ZodObject<{
1871
- type: z.ZodLiteral<"message_queued_deleted">;
1872
- conversationId: z.ZodString;
1873
- requestId: z.ZodString;
1874
- }, z.core.$strip>, z.ZodObject<{
1875
- type: z.ZodLiteral<"message_request_complete">;
1876
- conversationId: z.ZodString;
1877
- requestId: z.ZodString;
1878
- runStillActive: z.ZodOptional<z.ZodBoolean>;
1879
- }, z.core.$strip>, z.ZodObject<{
1880
- type: z.ZodLiteral<"message_steered">;
1881
- conversationId: z.ZodString;
1882
- requestId: z.ZodString;
1883
- }, z.core.$strip>, z.ZodObject<{
1884
- type: z.ZodLiteral<"model_info">;
1885
- conversationId: z.ZodOptional<z.ZodString>;
1886
- model: z.ZodString;
1887
- provider: z.ZodString;
1888
- configuredProviders: z.ZodOptional<z.ZodArray<z.ZodString>>;
1889
- availableModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1890
- id: z.ZodString;
1891
- displayName: z.ZodString;
1892
- }, z.core.$strip>>>;
1893
- allProviders: z.ZodOptional<z.ZodArray<z.ZodObject<{
1894
- id: z.ZodString;
1895
- displayName: z.ZodString;
1896
- models: z.ZodArray<z.ZodObject<{
1897
- id: z.ZodString;
1898
- displayName: z.ZodString;
1899
- }, z.core.$strip>>;
1900
- defaultModel: z.ZodString;
1901
- apiKeyUrl: z.ZodOptional<z.ZodString>;
1902
- apiKeyPlaceholder: z.ZodOptional<z.ZodString>;
1903
- }, z.core.$strip>>>;
1904
- }, z.core.$strip>, z.ZodObject<{
1905
- type: z.ZodLiteral<"navigate_settings">;
1906
- tab: z.ZodString;
1907
- }, z.core.$strip>, z.ZodObject<{
1908
- type: z.ZodLiteral<"notification_conversation_created">;
1909
- conversationId: z.ZodString;
1910
- title: z.ZodString;
1911
- sourceEventName: z.ZodString;
1912
- targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
1913
- groupId: z.ZodOptional<z.ZodString>;
1914
- source: z.ZodOptional<z.ZodString>;
1915
- silent: z.ZodOptional<z.ZodBoolean>;
1916
- }, z.core.$strip>, z.ZodObject<{
1917
- type: z.ZodLiteral<"notification_intent">;
1918
- sourceEventName: z.ZodString;
1919
- title: z.ZodString;
1920
- body: z.ZodString;
1921
- deliveryId: z.ZodOptional<z.ZodString>;
1922
- deepLinkMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1923
- targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
1924
- silent: z.ZodOptional<z.ZodBoolean>;
1925
- }, z.core.$strip>, z.ZodObject<{
1926
- type: z.ZodLiteral<"oauth_connect_result">;
1927
- success: z.ZodBoolean;
1928
- service: z.ZodOptional<z.ZodString>;
1929
- grantedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1930
- accountInfo: z.ZodOptional<z.ZodString>;
1931
- error: z.ZodOptional<z.ZodString>;
1932
- }, z.core.$strip>, z.ZodObject<{
1933
- type: z.ZodLiteral<"open_conversation">;
1934
- conversationId: z.ZodString;
1935
- title: z.ZodOptional<z.ZodString>;
1936
- anchorMessageId: z.ZodOptional<z.ZodString>;
1937
- focus: z.ZodOptional<z.ZodBoolean>;
1938
- }, z.core.$strip>, z.ZodObject<{
1939
- type: z.ZodLiteral<"open_panel">;
1940
- panelType: z.ZodString;
1941
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1942
- conversationId: z.ZodOptional<z.ZodString>;
1943
- surfaceId: z.ZodOptional<z.ZodString>;
1944
- }, z.core.$strip>, z.ZodObject<{
1945
- type: z.ZodLiteral<"open_url">;
1946
- url: z.ZodString;
1947
- title: z.ZodOptional<z.ZodString>;
1948
- conversationId: z.ZodOptional<z.ZodString>;
1949
- }, z.core.$strip>, z.ZodObject<{
1950
- type: z.ZodLiteral<"platform_disconnected">;
1951
- }, z.core.$strip>, z.ZodObject<{
1952
- type: z.ZodLiteral<"question_request">;
1953
- requestId: z.ZodString;
1954
- questions: z.ZodArray<z.ZodObject<{
1955
- id: z.ZodString;
1956
- question: z.ZodString;
1957
- description: z.ZodOptional<z.ZodString>;
1958
- options: z.ZodArray<z.ZodObject<{
1959
- id: z.ZodString;
1960
- label: z.ZodString;
1961
- description: z.ZodOptional<z.ZodString>;
1962
- }, z.core.$strip>>;
1963
- freeTextPlaceholder: z.ZodOptional<z.ZodString>;
1964
- }, z.core.$strip>>;
1965
- question: z.ZodString;
1966
- description: z.ZodOptional<z.ZodString>;
1967
- options: z.ZodArray<z.ZodObject<{
1968
- id: z.ZodString;
1969
- label: z.ZodString;
1970
- description: z.ZodOptional<z.ZodString>;
1971
- }, z.core.$strip>>;
1972
- freeTextPlaceholder: z.ZodOptional<z.ZodString>;
1973
- conversationId: z.ZodOptional<z.ZodString>;
1974
- toolUseId: z.ZodOptional<z.ZodString>;
1975
- }, z.core.$strip>, z.ZodObject<{
1976
- type: z.ZodLiteral<"recording_pause">;
1977
- recordingId: z.ZodString;
1978
- }, z.core.$strip>, z.ZodObject<{
1979
- type: z.ZodLiteral<"recording_resume">;
1980
- recordingId: z.ZodString;
1981
- }, z.core.$strip>, z.ZodObject<{
1982
- type: z.ZodLiteral<"recording_start">;
1983
- recordingId: z.ZodString;
1984
- attachToConversationId: z.ZodOptional<z.ZodString>;
1985
- options: z.ZodOptional<z.ZodObject<{
1986
- captureScope: z.ZodOptional<z.ZodEnum<{
1987
- display: "display";
1988
- window: "window";
1989
- }>>;
1990
- displayId: z.ZodOptional<z.ZodString>;
1991
- windowId: z.ZodOptional<z.ZodNumber>;
1992
- includeAudio: z.ZodOptional<z.ZodBoolean>;
1993
- includeMicrophone: z.ZodOptional<z.ZodBoolean>;
1994
- promptForSource: z.ZodOptional<z.ZodBoolean>;
1995
- }, z.core.$strip>>;
1996
- operationToken: z.ZodOptional<z.ZodString>;
1997
- }, z.core.$strip>, z.ZodObject<{
1998
- type: z.ZodLiteral<"recording_stop">;
1999
- recordingId: z.ZodString;
2000
- }, z.core.$strip>, z.ZodObject<{
2001
- type: z.ZodLiteral<"relationship_state_updated">;
2002
- updatedAt: z.ZodString;
2003
- }, z.core.$strip>, z.ZodObject<{
2004
- type: z.ZodLiteral<"schedule_conversation_created">;
2005
- conversationId: z.ZodString;
2006
- scheduleJobId: z.ZodString;
2007
- title: z.ZodString;
2008
- }, z.core.$strip>, z.ZodObject<{
2009
- type: z.ZodLiteral<"secret_request">;
2010
- requestId: z.ZodString;
2011
- service: z.ZodString;
2012
- field: z.ZodString;
2013
- label: z.ZodString;
2014
- description: z.ZodOptional<z.ZodString>;
2015
- placeholder: z.ZodOptional<z.ZodString>;
2016
- conversationId: z.ZodOptional<z.ZodString>;
2017
- purpose: z.ZodOptional<z.ZodString>;
2018
- allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
2019
- allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
2020
- allowOneTimeSend: z.ZodOptional<z.ZodBoolean>;
2021
- }, z.core.$strip>, z.ZodObject<{
2022
- type: z.ZodLiteral<"service_group_update_complete">;
2023
- installedVersion: z.ZodString;
2024
- success: z.ZodBoolean;
2025
- rolledBackToVersion: z.ZodOptional<z.ZodString>;
2026
- }, z.core.$strip>, z.ZodObject<{
2027
- type: z.ZodLiteral<"service_group_update_progress">;
2028
- statusMessage: z.ZodString;
2029
- }, z.core.$strip>, z.ZodObject<{
2030
- type: z.ZodLiteral<"service_group_update_starting">;
2031
- targetVersion: z.ZodString;
2032
- expectedDowntimeSeconds: z.ZodNumber;
2033
- }, z.core.$strip>, z.ZodObject<{
2034
- type: z.ZodLiteral<"show_platform_login">;
2035
- }, z.core.$strip>, z.ZodObject<{
2036
- type: z.ZodLiteral<"skills_state_changed">;
2037
- name: z.ZodString;
2038
- state: z.ZodEnum<{
2039
- enabled: "enabled";
2040
- disabled: "disabled";
2041
- installed: "installed";
2042
- uninstalled: "uninstalled";
2043
- }>;
2044
- }, z.core.$strip>, z.ZodObject<{
2045
- type: z.ZodLiteral<"sounds_config_updated">;
2046
- }, z.core.$strip>, z.ZodObject<{
2047
- type: z.ZodLiteral<"subagent_event">;
2048
- conversationId: z.ZodString;
2049
- subagentId: z.ZodString;
2050
- event: z.ZodObject<{
2051
- type: z.ZodString;
2052
- content: z.ZodOptional<z.ZodString>;
2053
- text: z.ZodOptional<z.ZodString>;
2054
- result: z.ZodOptional<z.ZodString>;
2055
- input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2056
- toolName: z.ZodOptional<z.ZodString>;
2057
- isError: z.ZodOptional<z.ZodBoolean>;
2058
- toolUseId: z.ZodOptional<z.ZodString>;
2059
- }, z.core.$loose>;
2060
- }, z.core.$strict>, z.ZodObject<{
2061
- type: z.ZodLiteral<"subagent_spawned">;
2062
- subagentId: z.ZodString;
2063
- parentConversationId: z.ZodString;
2064
- label: z.ZodString;
2065
- objective: z.ZodString;
2066
- isFork: z.ZodOptional<z.ZodBoolean>;
2067
- parentToolUseId: z.ZodOptional<z.ZodString>;
2068
- }, z.core.$strict>, z.ZodObject<{
2069
- type: z.ZodLiteral<"subagent_status_changed">;
2070
- subagentId: z.ZodString;
2071
- status: z.ZodEnum<{
2072
- completed: "completed";
2073
- failed: "failed";
2074
- pending: "pending";
2075
- running: "running";
2076
- awaiting_input: "awaiting_input";
2077
- aborted: "aborted";
2078
- interrupted: "interrupted";
2079
- }>;
2080
- error: z.ZodOptional<z.ZodString>;
2081
- usage: z.ZodOptional<z.ZodObject<{
2082
- inputTokens: z.ZodNumber;
2083
- outputTokens: z.ZodNumber;
2084
- estimatedCost: z.ZodNumber;
2085
- }, z.core.$strict>>;
2086
- }, z.core.$strict>, z.ZodObject<{
2087
- type: z.ZodLiteral<"sync_changed">;
2088
- tags: z.ZodArray<z.ZodString>;
2089
- originClientId: z.ZodOptional<z.ZodString>;
2090
- }, z.core.$strip>, z.ZodObject<{
2091
- type: z.ZodLiteral<"tool_input_delta">;
2092
- toolName: z.ZodString;
2093
- content: z.ZodString;
2094
- conversationId: z.ZodOptional<z.ZodString>;
2095
- toolUseId: z.ZodOptional<z.ZodString>;
2096
- messageId: z.ZodOptional<z.ZodString>;
2097
- }, z.core.$strip>, z.ZodObject<{
2098
- type: z.ZodLiteral<"tool_output_chunk">;
2099
- chunk: z.ZodString;
2100
- conversationId: z.ZodOptional<z.ZodString>;
2101
- toolUseId: z.ZodOptional<z.ZodString>;
2102
- subType: z.ZodOptional<z.ZodEnum<{
2103
- status: "status";
2104
- tool_start: "tool_start";
2105
- tool_complete: "tool_complete";
2106
- }>>;
2107
- subToolName: z.ZodOptional<z.ZodString>;
2108
- subToolInput: z.ZodOptional<z.ZodString>;
2109
- subToolIsError: z.ZodOptional<z.ZodBoolean>;
2110
- subToolId: z.ZodOptional<z.ZodString>;
2111
- messageId: z.ZodOptional<z.ZodString>;
2112
- }, z.core.$strip>, z.ZodObject<{
2113
- type: z.ZodLiteral<"tool_result">;
2114
- toolName: z.ZodString;
2115
- result: z.ZodString;
2116
- isError: z.ZodOptional<z.ZodBoolean>;
2117
- diff: z.ZodOptional<z.ZodObject<{
2118
- filePath: z.ZodString;
2119
- oldContent: z.ZodString;
2120
- newContent: z.ZodString;
2121
- isNewFile: z.ZodBoolean;
2122
- }, z.core.$strip>>;
2123
- status: z.ZodOptional<z.ZodString>;
2124
- conversationId: z.ZodOptional<z.ZodString>;
2125
- imageData: z.ZodOptional<z.ZodString>;
2126
- imageDataList: z.ZodOptional<z.ZodArray<z.ZodString>>;
2127
- toolUseId: z.ZodOptional<z.ZodString>;
2128
- messageId: z.ZodOptional<z.ZodString>;
2129
- riskLevel: z.ZodOptional<z.ZodString>;
2130
- riskReason: z.ZodOptional<z.ZodString>;
2131
- matchedTrustRuleId: z.ZodOptional<z.ZodString>;
2132
- isContainerized: z.ZodOptional<z.ZodBoolean>;
2133
- riskScopeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2134
- pattern: z.ZodString;
2135
- label: z.ZodString;
2136
- }, z.core.$strip>>>;
2137
- riskAllowlistOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2138
- label: z.ZodString;
2139
- description: z.ZodString;
2140
- pattern: z.ZodString;
2141
- }, z.core.$strip>>>;
2142
- riskDirectoryScopeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2143
- label: z.ZodString;
2144
- scope: z.ZodString;
2145
- }, z.core.$strip>>>;
2146
- approvalMode: z.ZodOptional<z.ZodString>;
2147
- approvalReason: z.ZodOptional<z.ZodString>;
2148
- riskThreshold: z.ZodOptional<z.ZodString>;
2149
- activityMetadata: z.ZodOptional<z.ZodObject<{
2150
- webSearch: z.ZodOptional<z.ZodObject<{
2151
- query: z.ZodString;
2152
- provider: z.ZodEnum<{
2153
- "anthropic-native": "anthropic-native";
2154
- brave: "brave";
2155
- perplexity: "perplexity";
2156
- tavily: "tavily";
2157
- firecrawl: "firecrawl";
2158
- }>;
2159
- resultCount: z.ZodNumber;
2160
- durationMs: z.ZodNumber;
2161
- results: z.ZodArray<z.ZodObject<{
2162
- rank: z.ZodNumber;
2163
- title: z.ZodString;
2164
- url: z.ZodString;
2165
- domain: z.ZodString;
2166
- faviconUrl: z.ZodOptional<z.ZodString>;
2167
- snippet: z.ZodOptional<z.ZodString>;
2168
- age: z.ZodOptional<z.ZodString>;
2169
- score: z.ZodOptional<z.ZodNumber>;
2170
- }, z.core.$strip>>;
2171
- errorMessage: z.ZodOptional<z.ZodString>;
2172
- }, z.core.$strip>>;
2173
- webFetch: z.ZodOptional<z.ZodObject<{
2174
- url: z.ZodString;
2175
- finalUrl: z.ZodString;
2176
- provider: z.ZodOptional<z.ZodEnum<{
2177
- default: "default";
2178
- firecrawl: "firecrawl";
2179
- }>>;
2180
- status: z.ZodNumber;
2181
- contentType: z.ZodOptional<z.ZodString>;
2182
- byteCount: z.ZodNumber;
2183
- charCount: z.ZodNumber;
2184
- truncated: z.ZodBoolean;
2185
- title: z.ZodOptional<z.ZodString>;
2186
- domain: z.ZodString;
2187
- faviconUrl: z.ZodOptional<z.ZodString>;
2188
- redirectCount: z.ZodNumber;
2189
- durationMs: z.ZodNumber;
2190
- errorMessage: z.ZodOptional<z.ZodString>;
2191
- mayRequireJavaScript: z.ZodOptional<z.ZodBoolean>;
2192
- }, z.core.$strip>>;
2193
- }, z.core.$strip>>;
2194
- errorCode: z.ZodOptional<z.ZodString>;
2195
- completedAt: z.ZodOptional<z.ZodNumber>;
2196
- }, z.core.$strip>, z.ZodObject<{
2197
- type: z.ZodLiteral<"tool_use_preview_start">;
2198
- toolUseId: z.ZodString;
2199
- toolName: z.ZodString;
2200
- conversationId: z.ZodOptional<z.ZodString>;
2201
- messageId: z.ZodOptional<z.ZodString>;
2202
- previewStartedAt: z.ZodOptional<z.ZodNumber>;
2203
- }, z.core.$strip>, z.ZodObject<{
2204
- type: z.ZodLiteral<"tool_use_start">;
2205
- toolName: z.ZodString;
2206
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2207
- toolUseId: z.ZodOptional<z.ZodString>;
2208
- messageId: z.ZodOptional<z.ZodString>;
2209
- conversationId: z.ZodOptional<z.ZodString>;
2210
- startedAt: z.ZodOptional<z.ZodNumber>;
2211
- previewStartedAt: z.ZodOptional<z.ZodNumber>;
2212
- }, z.core.$strip>, z.ZodObject<{
2213
- type: z.ZodLiteral<"ui_surface_complete">;
2214
- conversationId: z.ZodString;
2215
- surfaceId: z.ZodString;
2216
- summary: z.ZodString;
2217
- submittedData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2218
- }, z.core.$strip>, z.ZodObject<{
2219
- type: z.ZodLiteral<"ui_surface_dismiss">;
2220
- conversationId: z.ZodString;
2221
- surfaceId: z.ZodString;
2222
- }, z.core.$strip>, z.ZodObject<{
2223
- type: z.ZodLiteral<"ui_surface_show">;
2224
- conversationId: z.ZodString;
2225
- surfaceId: z.ZodString;
2226
- surfaceType: z.ZodString;
2227
- title: z.ZodOptional<z.ZodString>;
2228
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2229
- actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2230
- id: z.ZodString;
2231
- label: z.ZodString;
2232
- style: z.ZodOptional<z.ZodEnum<{
2233
- primary: "primary";
2234
- secondary: "secondary";
2235
- destructive: "destructive";
2236
- }>>;
2237
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2238
- }, z.core.$strip>>>;
2239
- display: z.ZodOptional<z.ZodEnum<{
2240
- inline: "inline";
2241
- panel: "panel";
2242
- }>>;
2243
- messageId: z.ZodOptional<z.ZodString>;
2244
- persistent: z.ZodOptional<z.ZodBoolean>;
2245
- toolCallId: z.ZodOptional<z.ZodString>;
2246
- }, z.core.$strip>, z.ZodObject<{
2247
- type: z.ZodLiteral<"ui_surface_undo_result">;
2248
- conversationId: z.ZodString;
2249
- surfaceId: z.ZodString;
2250
- success: z.ZodBoolean;
2251
- remainingUndos: z.ZodNumber;
2252
- }, z.core.$strip>, z.ZodObject<{
2253
- type: z.ZodLiteral<"ui_surface_update">;
2254
- conversationId: z.ZodString;
2255
- surfaceId: z.ZodString;
2256
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2257
- }, z.core.$strip>, z.ZodObject<{
2258
- type: z.ZodLiteral<"usage_progress">;
2259
- conversationId: z.ZodString;
2260
- inputTokens: z.ZodNumber;
2261
- outputTokens: z.ZodNumber;
2262
- estimatedCost: z.ZodNumber;
2263
- model: z.ZodString;
2264
- }, z.core.$strip>, z.ZodObject<{
2265
- type: z.ZodLiteral<"usage_update">;
2266
- conversationId: z.ZodString;
2267
- inputTokens: z.ZodNumber;
2268
- outputTokens: z.ZodNumber;
2269
- cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
2270
- cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
2271
- totalInputTokens: z.ZodNumber;
2272
- totalOutputTokens: z.ZodNumber;
2273
- estimatedCost: z.ZodNumber;
2274
- model: z.ZodString;
2275
- contextWindowTokens: z.ZodOptional<z.ZodNumber>;
2276
- contextWindowMaxTokens: z.ZodOptional<z.ZodNumber>;
2277
- }, z.core.$strip>, z.ZodObject<{
2278
- type: z.ZodLiteral<"user_message_echo">;
2279
- text: z.ZodString;
2280
- conversationId: z.ZodOptional<z.ZodString>;
2281
- messageId: z.ZodOptional<z.ZodString>;
2282
- requestId: z.ZodOptional<z.ZodString>;
2283
- clientMessageId: z.ZodOptional<z.ZodString>;
2284
- }, z.core.$strict>, z.ZodObject<{
2285
- type: z.ZodLiteral<"workflow_completed">;
2286
- runId: z.ZodString;
2287
- conversationId: z.ZodOptional<z.ZodString>;
2288
- status: z.ZodEnum<{
2289
- completed: "completed";
2290
- failed: "failed";
2291
- running: "running";
2292
- aborted: "aborted";
2293
- interrupted: "interrupted";
2294
- cap_exceeded: "cap_exceeded";
2295
- }>;
2296
- agentsSpawned: z.ZodNumber;
2297
- inputTokens: z.ZodNumber;
2298
- outputTokens: z.ZodNumber;
2299
- summary: z.ZodOptional<z.ZodString>;
2300
- }, z.core.$strict>, z.ZodObject<{
2301
- type: z.ZodLiteral<"workflow_leaf_finished">;
2302
- runId: z.ZodString;
2303
- conversationId: z.ZodString;
2304
- seq: z.ZodNumber;
2305
- status: z.ZodEnum<{
2306
- completed: "completed";
2307
- failed: "failed";
2308
- }>;
2309
- label: z.ZodOptional<z.ZodString>;
2310
- inputTokens: z.ZodOptional<z.ZodNumber>;
2311
- outputTokens: z.ZodOptional<z.ZodNumber>;
2312
- resultSummary: z.ZodOptional<z.ZodString>;
2313
- }, z.core.$strict>, z.ZodObject<{
2314
- type: z.ZodLiteral<"workflow_leaf_started">;
2315
- runId: z.ZodString;
2316
- conversationId: z.ZodString;
2317
- seq: z.ZodNumber;
2318
- label: z.ZodOptional<z.ZodString>;
2319
- phase: z.ZodOptional<z.ZodString>;
2320
- promptSummary: z.ZodOptional<z.ZodString>;
2321
- }, z.core.$strict>, z.ZodObject<{
2322
- type: z.ZodLiteral<"workflow_progress">;
2323
- runId: z.ZodString;
2324
- conversationId: z.ZodOptional<z.ZodString>;
2325
- agentsSpawned: z.ZodNumber;
2326
- phase: z.ZodOptional<z.ZodString>;
2327
- label: z.ZodOptional<z.ZodString>;
2328
- message: z.ZodOptional<z.ZodString>;
2329
- }, z.core.$strict>, z.ZodObject<{
2330
- type: z.ZodLiteral<"workflow_started">;
2331
- runId: z.ZodString;
2332
- conversationId: z.ZodString;
2333
- toolUseId: z.ZodOptional<z.ZodString>;
2334
- label: z.ZodOptional<z.ZodString>;
2335
- }, z.core.$strict>], "type">;
2336
- }, z.core.$strip>;
2337
-
2338
- /** Filter that determines which events a subscriber receives. */
2339
- export declare type AssistantEventFilter = {
2340
- /** When set, restrict delivery to events for this conversation. */
2341
- conversationId?: string;
2342
- };
2343
-
2344
- /**
2345
- * Lightweight pub/sub hub for `AssistantEventEnvelope` messages.
2346
- *
2347
- * Filtering is applied at subscription level:
2348
- * - `conversationId`: scoped events match subscribers with same conversationId
2349
- * or no conversationId filter (broadcast to all).
2350
- * - `targetCapability` (on publish): targeted events only reach subscribers
2351
- * whose capabilities include the target. Untargeted events fan out to all.
2352
- *
2353
- * Client connections register as subscribers with metadata and are queryable
2354
- * via `listClients()`, `getMostRecentClientByCapability()`, etc.
2355
- */
2356
- export declare class AssistantEventHub {
2357
- private readonly subscribers;
2358
- private readonly maxSubscribers;
2359
- /** Monotonic source for per-connection ids, scoped to this hub. */
2360
- private connectionCounter;
2361
- constructor(options?: {
2362
- maxSubscribers?: number;
2363
- });
2364
- /**
2365
- * Register a subscriber that will be called for each matching event.
2366
- *
2367
- * **Client deduplication:** When a client subscriber is registered with a
2368
- * `clientId` that already exists, all stale entries for that clientId are
2369
- * disposed first. This prevents subscriber stacking when clients reconnect
2370
- * (e.g. Chrome extension reload, SSE token refresh) before the old
2371
- * connection's abort signal fires.
2372
- *
2373
- * When the subscriber cap (`maxSubscribers`) has been reached, the **oldest**
2374
- * subscriber is evicted to make room: its `onEvict` callback is invoked (so
2375
- * it can close its SSE stream) and its entry is removed from the hub.
2376
- */
2377
- subscribe(subscriber: SubscriberInput): AssistantEventSubscription;
2378
- /**
2379
- * Publish an event to all matching subscribers.
2380
- *
2381
- * Matching rules:
2382
- * - if `excludeClientId` is set, the subscriber with that clientId is
2383
- * skipped regardless of every other rule (self-echo suppression — the
2384
- * client that originated the mutation does not receive its own
2385
- * invalidation back through the hub).
2386
- * - if `targetClientId` is set, deliver only to the subscriber with that
2387
- * clientId, bypassing the conversation-id filter entirely (the web-origin
2388
- * event's conversationId differs from the macOS client's subscribed
2389
- * conversation).
2390
- * - if `filter.conversationId` is set (and `targetClientId` is not), the
2391
- * `event.conversationId` must equal it
2392
- * - if `targetCapability` is set, only subscribers whose capabilities include
2393
- * it receive the event; untargeted events go to all
2394
- * - if `targetInterfaceId` is set, only client subscribers whose
2395
- * `interfaceId` matches receive the event; process subscribers and
2396
- * non-matching clients are skipped. Used to narrow legacy
2397
- * broadcasts (e.g. `conversation_list_invalidated`) to a specific
2398
- * client surface during a migration window.
2399
- *
2400
- * Fanout is isolated: a throwing or rejecting subscriber does not abort
2401
- * delivery to remaining subscribers.
2402
- */
2403
- publish(event: AssistantEventEnvelope, options?: {
2404
- targetCapability?: HostProxyCapability;
2405
- targetClientId?: string;
2406
- targetInterfaceId?: InterfaceId;
2407
- /**
2408
- * Skip the subscriber with this `clientId`. Used for self-echo
2409
- * suppression on `sync_changed`: the route handler echoes the
2410
- * originating tab's `X-Vellum-Client-Id` back on the event, and the
2411
- * hub uses it here to avoid re-delivering the invalidation to the
2412
- * tab that already mutated its own optimistic state.
2413
- */
2414
- excludeClientId?: string;
2415
- }): Promise<void>;
2416
- /**
2417
- * Return the active client subscriber with the given clientId, or
2418
- * `undefined` if no such subscriber exists.
2419
- */
2420
- getClientById(clientId: string): ClientEntry | undefined;
2421
- /**
2422
- * Return the verified actor principal id captured at SSE subscription time
2423
- * for the given client, or `undefined` if the client is unknown or
2424
- * connected without a principal (e.g. legacy/service tokens).
2425
- *
2426
- * Used by host proxies to bind cross-client targeted execution to the same
2427
- * authenticated user identity that opened the target client's SSE stream.
2428
- */
2429
- getActorPrincipalIdForClient(clientId: string): string | undefined;
2430
- /**
2431
- * Returns true when at least one active subscriber would receive the given
2432
- * event based on the same conversation matching rules as publish().
2433
- */
2434
- hasSubscribersForEvent(event: Pick<AssistantEventEnvelope, "conversationId">): boolean;
2435
- private clientEntries;
2436
- /**
2437
- * Return all active client subscribers, sorted by `lastActiveAt` descending.
2438
- */
2439
- listClients(): ClientEntry[];
2440
- /**
2441
- * Return all client subscribers that support the given capability,
2442
- * sorted by `lastActiveAt` descending.
2443
- */
2444
- listClientsByCapability(capability: HostProxyCapability): ClientEntry[];
2445
- /**
2446
- * Return the most recently active client that supports the given
2447
- * capability, or `undefined` if none exists.
2448
- */
2449
- getMostRecentClientByCapability(capability: HostProxyCapability): ClientEntry | undefined;
2450
- /**
2451
- * Return all client subscribers with the given interface type,
2452
- * sorted by `lastActiveAt` descending.
2453
- */
2454
- listClientsByInterface(interfaceId: InterfaceId): ClientEntry[];
2455
- /**
2456
- * Touch a client subscriber — update `lastActiveAt`. Used by heartbeat.
2457
- */
2458
- touchClient(clientId: string): void;
2459
- /**
2460
- * Force-disconnect a client by disposing all subscribers for the given
2461
- * `clientId`. Returns the number of disposed entries.
2462
- *
2463
- * Used by `assistant clients disconnect <clientId>` to forcibly remove
2464
- * stale or unwanted client connections.
2465
- */
2466
- disposeClient(clientId: string): number;
2467
- /** Number of currently active subscribers (useful for tests and caps). */
2468
- subscriberCount(): number;
2469
- /** Returns true if the hub can accept a subscriber without evicting anyone. */
2470
- hasCapacity(): boolean;
2471
- }
1505
+ }, z.core.$strip>;
2472
1506
 
2473
- /** The plugin-facing event hub. See module docs. */
2474
- export declare const assistantEventHub: PluginEventHub;
1507
+ declare type AssistantThinkingDeltaEvent = z.infer<typeof AssistantThinkingDeltaEventSchema>;
2475
1508
 
2476
- /** Opaque handle returned by `subscribe`. Call `dispose()` to remove the subscription. */
2477
- export declare interface AssistantEventSubscription {
2478
- dispose(): void;
2479
- /** True until `dispose()` has been called. */
2480
- readonly active: boolean;
2481
- /**
2482
- * Per-connection identifier, unique within the hub instance. Distinguishes
2483
- * connections that share a `clientId` (e.g. an old connection and the new
2484
- * one that replaced it on reconnect) so subscribe / dispose / shed log
2485
- * lines can be attributed to a specific connection.
2486
- */
2487
- readonly connectionId: string;
2488
- }
1509
+ declare const AssistantThinkingDeltaEventSchema: z.ZodObject<{
1510
+ type: z.ZodLiteral<"assistant_thinking_delta">;
1511
+ thinking: z.ZodString;
1512
+ messageId: z.ZodOptional<z.ZodString>;
1513
+ conversationId: z.ZodOptional<z.ZodString>;
1514
+ timestampMs: z.ZodOptional<z.ZodNumber>;
1515
+ }, z.core.$strip>;
1516
+
1517
+ declare type AssistantTurnStartEvent = z.infer<typeof AssistantTurnStartEventSchema>;
1518
+
1519
+ declare const AssistantTurnStartEventSchema: z.ZodObject<{
1520
+ type: z.ZodLiteral<"assistant_turn_start">;
1521
+ messageId: z.ZodString;
1522
+ conversationId: z.ZodOptional<z.ZodString>;
1523
+ }, z.core.$strip>;
2489
1524
 
2490
1525
  declare interface AudioEmbeddingInput {
2491
1526
  type: "audio";
@@ -2493,6 +1528,42 @@ declare interface AudioEmbeddingInput {
2493
1528
  mimeType: string;
2494
1529
  }
2495
1530
 
1531
+ declare type AvatarUpdatedEvent = z.infer<typeof AvatarUpdatedEventSchema>;
1532
+
1533
+ declare const AvatarUpdatedEventSchema: z.ZodObject<{
1534
+ type: z.ZodLiteral<"avatar_updated">;
1535
+ avatarPath: z.ZodString;
1536
+ }, z.core.$strip>;
1537
+
1538
+ declare type BackgroundToolCompletedEvent = z.infer<typeof BackgroundToolCompletedEventSchema>;
1539
+
1540
+ declare const BackgroundToolCompletedEventSchema: z.ZodObject<{
1541
+ type: z.ZodLiteral<"background_tool_completed">;
1542
+ id: z.ZodString;
1543
+ conversationId: z.ZodString;
1544
+ status: z.ZodEnum<{
1545
+ cancelled: "cancelled";
1546
+ completed: "completed";
1547
+ failed: "failed";
1548
+ }>;
1549
+ exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1550
+ output: z.ZodOptional<z.ZodString>;
1551
+ completedAt: z.ZodNumber;
1552
+ }, z.core.$strip>;
1553
+
1554
+ declare type _BackgroundToolsServerMessages = BackgroundToolStartedEvent | BackgroundToolCompletedEvent;
1555
+
1556
+ declare type BackgroundToolStartedEvent = z.infer<typeof BackgroundToolStartedEventSchema>;
1557
+
1558
+ declare const BackgroundToolStartedEventSchema: z.ZodObject<{
1559
+ type: z.ZodLiteral<"background_tool_started">;
1560
+ id: z.ZodString;
1561
+ toolName: z.ZodString;
1562
+ conversationId: z.ZodString;
1563
+ command: z.ZodString;
1564
+ startedAt: z.ZodNumber;
1565
+ }, z.core.$strip>;
1566
+
2496
1567
  /**
2497
1568
  * Media payload for an image or file content block. One unified type covers
2498
1569
  * both blocks and both storage forms:
@@ -2520,6 +1591,31 @@ declare interface Base64MediaSource {
2520
1591
  filename?: string;
2521
1592
  }
2522
1593
 
1594
+ /**
1595
+ * A single assistant event wrapping an outbound message payload.
1596
+ *
1597
+ * Generic over the payload type. The `TMessage` default of `unknown` keeps
1598
+ * the envelope nameable without a type argument when the caller does not
1599
+ * care about message narrowing.
1600
+ */
1601
+ declare interface BaseAssistantEvent<TMessage = unknown> {
1602
+ /** Globally unique event identifier (UUID). */
1603
+ id: string;
1604
+ /** Resolved conversation id when available. */
1605
+ conversationId?: string;
1606
+ /**
1607
+ * Monotonic per-conversation sequence number. Assigned by the daemon at
1608
+ * publish time for conversation-scoped events; absent for unscoped
1609
+ * broadcasts. Clients track the highest observed `seq` per conversation
1610
+ * and pass it back on reconnect to request replay of missed events.
1611
+ */
1612
+ seq?: number;
1613
+ /** ISO-8601 timestamp of when the event was emitted. */
1614
+ emittedAt: string;
1615
+ /** Outbound message payload. */
1616
+ message: TMessage;
1617
+ }
1618
+
2523
1619
  /**
2524
1620
  * Capabilities shared by every chain-hook context (`user-prompt-submit`,
2525
1621
  * `post-compact`, `post-tool-use`, `stop`, `pre-model-call`,
@@ -2560,6 +1656,31 @@ declare interface BaseSubscriberEntry {
2560
1656
  connectionId: string;
2561
1657
  }
2562
1658
 
1659
+ declare type BookmarkCreatedEvent = z.infer<typeof BookmarkCreatedEventSchema>;
1660
+
1661
+ declare const BookmarkCreatedEventSchema: z.ZodObject<{
1662
+ type: z.ZodLiteral<"bookmark.created">;
1663
+ bookmark: z.ZodObject<{
1664
+ id: z.ZodString;
1665
+ messageId: z.ZodString;
1666
+ conversationId: z.ZodString;
1667
+ conversationTitle: z.ZodNullable<z.ZodString>;
1668
+ messagePreview: z.ZodString;
1669
+ messageRole: z.ZodString;
1670
+ messageCreatedAt: z.ZodNumber;
1671
+ createdAt: z.ZodNumber;
1672
+ }, z.core.$strip>;
1673
+ }, z.core.$strip>;
1674
+
1675
+ declare type BookmarkDeletedEvent = z.infer<typeof BookmarkDeletedEventSchema>;
1676
+
1677
+ declare const BookmarkDeletedEventSchema: z.ZodObject<{
1678
+ type: z.ZodLiteral<"bookmark.deleted">;
1679
+ messageId: z.ZodString;
1680
+ }, z.core.$strip>;
1681
+
1682
+ declare type _BookmarksServerMessages = BookmarkCreatedEvent | BookmarkDeletedEvent;
1683
+
2563
1684
  /**
2564
1685
  * Build a model-facing excerpt of stored message content around a query,
2565
1686
  * preserving external-content envelopes so third-party boundaries stay
@@ -2567,6 +1688,149 @@ declare interface BaseSubscriberEntry {
2567
1688
  */
2568
1689
  export declare function buildMessageExcerpt(rawContent: string, query: string): Promise<string>;
2569
1690
 
1691
+ declare interface BundleAppResponse {
1692
+ type: "bundle_app_response";
1693
+ bundlePath: string;
1694
+ /** Base64-encoded PNG of the generated app icon, if available. */
1695
+ iconImageBase64?: string;
1696
+ manifest: {
1697
+ format_version: number;
1698
+ name: string;
1699
+ description?: string;
1700
+ icon?: string;
1701
+ created_at: string;
1702
+ created_by: string;
1703
+ entry: string;
1704
+ capabilities: string[];
1705
+ version?: string;
1706
+ content_id?: string;
1707
+ };
1708
+ }
1709
+
1710
+ declare type CardSurfaceData = z.infer<typeof CardSurfaceDataSchema>;
1711
+
1712
+ declare const CardSurfaceDataSchema: z.ZodObject<{
1713
+ title: z.ZodOptional<z.ZodString>;
1714
+ subtitle: z.ZodOptional<z.ZodString>;
1715
+ body: z.ZodOptional<z.ZodString>;
1716
+ metadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
1717
+ label: z.ZodCoercedString<unknown>;
1718
+ value: z.ZodCoercedString<unknown>;
1719
+ }, z.core.$strip>>>;
1720
+ template: z.ZodOptional<z.ZodString>;
1721
+ templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1722
+ }, z.core.$strip>;
1723
+
1724
+ /**
1725
+ * Canonical channel-id vocabulary shared between the assistant daemon and the
1726
+ * gateway.
1727
+ *
1728
+ * A "channel" is an external messaging surface an actor can reach the
1729
+ * assistant through (Slack, Telegram, WhatsApp, phone, …) plus a couple of
1730
+ * internal ids (`vellum` for native app conversations, `platform` for the
1731
+ * internal control plane). This is the single source of truth for that set:
1732
+ * the assistant adopts it wholesale as its `ChannelId`, and the gateway
1733
+ * asserts its own (narrower) inbound list is a subset of it so the two sides
1734
+ * cannot silently drift.
1735
+ *
1736
+ * Both packages depend on `@vellumai/service-contracts`, so hoisting the set
1737
+ * here (rather than maintaining a copy on each side) means adding or renaming
1738
+ * a channel happens in exactly one place.
1739
+ *
1740
+ * Note that a consumer may legitimately handle only a *subset* of these — the
1741
+ * gateway, for example, never ingresses `platform`. Use a local list guarded
1742
+ * by `satisfies readonly ChannelId[]` for those cases rather than redefining
1743
+ * the union.
1744
+ */
1745
+ declare const CHANNEL_IDS: readonly ["telegram", "phone", "vellum", "whatsapp", "slack", "email", "platform", "a2a"];
1746
+
1747
+ /** Channel binding metadata exposed in conversation list APIs. */
1748
+ declare interface ChannelBinding {
1749
+ sourceChannel: ChannelId;
1750
+ externalChatId: string;
1751
+ externalChatName?: string | null;
1752
+ externalThreadId?: string | null;
1753
+ externalUserId?: string | null;
1754
+ displayName?: string | null;
1755
+ username?: string | null;
1756
+ slackThread?: {
1757
+ channelId: string;
1758
+ threadTs: string;
1759
+ link?: {
1760
+ appUrl?: string;
1761
+ webUrl?: string;
1762
+ };
1763
+ };
1764
+ slackChannel?: {
1765
+ channelId: string;
1766
+ name?: string;
1767
+ link?: {
1768
+ webUrl?: string;
1769
+ };
1770
+ };
1771
+ }
1772
+
1773
+ declare type ChannelId = (typeof CHANNEL_IDS)[number];
1774
+
1775
+ declare interface ChannelVerificationSessionResponse {
1776
+ type: "channel_verification_session_response";
1777
+ success: boolean;
1778
+ secret?: string;
1779
+ instruction?: string;
1780
+ /** Present when action is 'status'. */
1781
+ bound?: boolean;
1782
+ guardianExternalUserId?: string;
1783
+ /** The channel this status pertains to (e.g. "telegram", "phone"). Present when action is 'status'. */
1784
+ channel?: ChannelId;
1785
+ /** The assistant ID scoped to this status. Present when action is 'status'. */
1786
+ assistantId?: string;
1787
+ /** The delivery chat ID for the guardian (e.g. Telegram chat ID). Present when action is 'status' and bound is true. */
1788
+ guardianDeliveryChatId?: string;
1789
+ /** Optional channel username/handle for the bound guardian (for UI display). */
1790
+ guardianUsername?: string;
1791
+ /** Optional display name for the bound guardian (for UI display). */
1792
+ guardianDisplayName?: string;
1793
+ /** Whether a pending verification challenge exists for this (assistantId, channel). Used by relay setup to detect active voice verification sessions. */
1794
+ hasPendingChallenge?: boolean;
1795
+ error?: string;
1796
+ /** Human-readable error detail (e.g. for already_bound failures). */
1797
+ message?: string;
1798
+ /** Conversation ID for outbound verification flows. */
1799
+ verificationSessionId?: string;
1800
+ /** Epoch ms when the verification session expires. */
1801
+ expiresAt?: number;
1802
+ /** Epoch ms after which a resend is allowed. */
1803
+ nextResendAt?: number;
1804
+ /** Number of sends for this session. */
1805
+ sendCount?: number;
1806
+ /** Telegram deep-link URL for bootstrap (M3 placeholder). */
1807
+ telegramBootstrapUrl?: string;
1808
+ /** True when the outbound session is still in pending_bootstrap state (Telegram handle flow). Prevents the client from clearing the bootstrap URL during status polling. */
1809
+ pendingBootstrap?: boolean;
1810
+ }
1811
+
1812
+ declare type ChoiceSurfaceData = z.infer<typeof ChoiceSurfaceDataSchema>;
1813
+
1814
+ declare const ChoiceSurfaceDataSchema: z.ZodObject<{
1815
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1816
+ options: z.ZodPipe<z.ZodTransform<{
1817
+ id: string;
1818
+ title: string;
1819
+ }[], unknown>, z.ZodArray<z.ZodObject<{
1820
+ id: z.ZodString;
1821
+ title: z.ZodString;
1822
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1823
+ recommended: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1824
+ data: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1825
+ }, z.core.$strip>>>;
1826
+ selectionMode: z.ZodPipe<z.ZodTransform<"single" | "multiple", unknown>, z.ZodEnum<{
1827
+ single: "single";
1828
+ multiple: "multiple";
1829
+ }>>;
1830
+ commitOnSelect: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1831
+ submitLabel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1832
+ }, z.core.$strip>;
1833
+
2570
1834
  export declare const CLI_COMMAND_HELP: readonly CliCommandHelp[];
2571
1835
 
2572
1836
  declare interface CliArgumentHelp {
@@ -2624,6 +1888,14 @@ declare interface ClientEntry extends BaseSubscriberEntry {
2624
1888
  actorPrincipalId?: string;
2625
1889
  }
2626
1890
 
1891
+ declare type ClientSettingsUpdateEvent = z.infer<typeof ClientSettingsUpdateEventSchema>;
1892
+
1893
+ declare const ClientSettingsUpdateEventSchema: z.ZodObject<{
1894
+ type: z.ZodLiteral<"client_settings_update">;
1895
+ key: z.ZodString;
1896
+ value: z.ZodString;
1897
+ }, z.core.$strip>;
1898
+
2627
1899
  declare interface CliOptionHelp {
2628
1900
  /** Commander flag spec, e.g. `"--path <file>"` or `"-l, --limit <n>"`. */
2629
1901
  flags: string;
@@ -2657,10 +1929,158 @@ declare interface CliSubcommandHelp {
2657
1929
  subcommands?: CliSubcommandHelp[];
2658
1930
  }
2659
1931
 
1932
+ declare type CompactionCircuitClosedEvent = z.infer<typeof CompactionCircuitClosedEventSchema>;
1933
+
1934
+ declare const CompactionCircuitClosedEventSchema: z.ZodObject<{
1935
+ type: z.ZodLiteral<"compaction_circuit_closed">;
1936
+ conversationId: z.ZodString;
1937
+ }, z.core.$strip>;
1938
+
1939
+ declare type CompactionCircuitOpenEvent = z.infer<typeof CompactionCircuitOpenEventSchema>;
1940
+
1941
+ declare const CompactionCircuitOpenEventSchema: z.ZodObject<{
1942
+ type: z.ZodLiteral<"compaction_circuit_open">;
1943
+ conversationId: z.ZodString;
1944
+ reason: z.ZodLiteral<"3_consecutive_failures">;
1945
+ openUntil: z.ZodNumber;
1946
+ }, z.core.$strip>;
1947
+
1948
+ declare type _ComputerUseServerMessages = RecordingStartEvent | RecordingStopEvent | RecordingPauseEvent | RecordingResumeEvent;
1949
+
1950
+ declare type ConfigChangedEvent = z.infer<typeof ConfigChangedEventSchema>;
1951
+
1952
+ declare const ConfigChangedEventSchema: z.ZodObject<{
1953
+ type: z.ZodLiteral<"config_changed">;
1954
+ }, z.core.$strip>;
1955
+
2660
1956
  declare type ConfiguredProviderOptions = Pick<ResolveCallSiteOpts, "overrideProfile" | "forceOverrideProfile" | "selectionSeed">;
2661
1957
 
1958
+ declare type ConfirmationRequestEvent = z.infer<typeof ConfirmationRequestEventSchema>;
1959
+
1960
+ declare const ConfirmationRequestEventSchema: z.ZodObject<{
1961
+ type: z.ZodLiteral<"confirmation_request">;
1962
+ requestId: z.ZodString;
1963
+ toolName: z.ZodString;
1964
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1965
+ riskLevel: z.ZodString;
1966
+ riskReason: z.ZodOptional<z.ZodString>;
1967
+ isContainerized: z.ZodOptional<z.ZodBoolean>;
1968
+ executionTarget: z.ZodOptional<z.ZodEnum<{
1969
+ sandbox: "sandbox";
1970
+ host: "host";
1971
+ }>>;
1972
+ allowlistOptions: z.ZodArray<z.ZodObject<{
1973
+ label: z.ZodString;
1974
+ description: z.ZodString;
1975
+ pattern: z.ZodString;
1976
+ }, z.core.$strip>>;
1977
+ scopeOptions: z.ZodArray<z.ZodObject<{
1978
+ label: z.ZodString;
1979
+ scope: z.ZodString;
1980
+ }, z.core.$strip>>;
1981
+ directoryScopeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1982
+ label: z.ZodString;
1983
+ scope: z.ZodString;
1984
+ }, z.core.$strip>>>;
1985
+ diff: z.ZodOptional<z.ZodObject<{
1986
+ filePath: z.ZodString;
1987
+ oldContent: z.ZodString;
1988
+ newContent: z.ZodString;
1989
+ isNewFile: z.ZodBoolean;
1990
+ }, z.core.$strip>>;
1991
+ conversationId: z.ZodOptional<z.ZodString>;
1992
+ persistentDecisionsAllowed: z.ZodOptional<z.ZodBoolean>;
1993
+ toolUseId: z.ZodOptional<z.ZodString>;
1994
+ acpToolKind: z.ZodOptional<z.ZodString>;
1995
+ acpOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1996
+ optionId: z.ZodString;
1997
+ name: z.ZodString;
1998
+ kind: z.ZodEnum<{
1999
+ allow_once: "allow_once";
2000
+ allow_always: "allow_always";
2001
+ reject_once: "reject_once";
2002
+ reject_always: "reject_always";
2003
+ }>;
2004
+ }, z.core.$strip>>>;
2005
+ }, z.core.$strip>;
2006
+
2007
+ declare type ConfirmationStateChangedEvent = z.infer<typeof ConfirmationStateChangedEventSchema>;
2008
+
2009
+ declare const ConfirmationStateChangedEventSchema: z.ZodObject<{
2010
+ type: z.ZodLiteral<"confirmation_state_changed">;
2011
+ conversationId: z.ZodString;
2012
+ requestId: z.ZodString;
2013
+ state: z.ZodEnum<{
2014
+ timed_out: "timed_out";
2015
+ pending: "pending";
2016
+ approved: "approved";
2017
+ denied: "denied";
2018
+ resolved_stale: "resolved_stale";
2019
+ }>;
2020
+ source: z.ZodEnum<{
2021
+ button: "button";
2022
+ inline_nl: "inline_nl";
2023
+ auto_deny: "auto_deny";
2024
+ timeout: "timeout";
2025
+ system: "system";
2026
+ }>;
2027
+ causedByRequestId: z.ZodOptional<z.ZodString>;
2028
+ decisionText: z.ZodOptional<z.ZodString>;
2029
+ toolUseId: z.ZodOptional<z.ZodString>;
2030
+ }, z.core.$strip>;
2031
+
2032
+ declare type ConfirmationSurfaceData = z.infer<typeof ConfirmationSurfaceDataSchema>;
2033
+
2034
+ declare const ConfirmationSurfaceDataSchema: z.ZodObject<{
2035
+ message: z.ZodCatch<z.ZodString>;
2036
+ detail: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2037
+ confirmLabel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2038
+ confirmedLabel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2039
+ cancelLabel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2040
+ destructive: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
2041
+ }, z.core.$strip>;
2042
+
2043
+ declare type ContactRequestEvent = z.infer<typeof ContactRequestEventSchema>;
2044
+
2045
+ declare const ContactRequestEventSchema: z.ZodObject<{
2046
+ type: z.ZodLiteral<"contact_request">;
2047
+ requestId: z.ZodString;
2048
+ channel: z.ZodOptional<z.ZodString>;
2049
+ placeholder: z.ZodOptional<z.ZodString>;
2050
+ label: z.ZodOptional<z.ZodString>;
2051
+ description: z.ZodOptional<z.ZodString>;
2052
+ role: z.ZodOptional<z.ZodString>;
2053
+ }, z.core.$strip>;
2054
+
2055
+ declare type ContactsChangedEvent = z.infer<typeof ContactsChangedEventSchema>;
2056
+
2057
+ declare const ContactsChangedEventSchema: z.ZodObject<{
2058
+ type: z.ZodLiteral<"contacts_changed">;
2059
+ }, z.core.$strip>;
2060
+
2061
+ declare type _ContactsServerMessages = ContactsChangedEvent | ContactRequestEvent;
2062
+
2662
2063
  export declare type ContentBlock = TextContent | ThinkingContent | RedactedThinkingContent | ImageContent | FileContent | ToolUseContent | ToolResultContent | ServerToolUseContent | WebSearchToolResultContent;
2663
2064
 
2065
+ declare type ContextCompactedEvent = z.infer<typeof ContextCompactedEventSchema>;
2066
+
2067
+ declare const ContextCompactedEventSchema: z.ZodObject<{
2068
+ type: z.ZodLiteral<"context_compacted">;
2069
+ conversationId: z.ZodString;
2070
+ previousEstimatedInputTokens: z.ZodNumber;
2071
+ estimatedInputTokens: z.ZodNumber;
2072
+ maxInputTokens: z.ZodNumber;
2073
+ thresholdTokens: z.ZodNumber;
2074
+ compactedMessages: z.ZodNumber;
2075
+ summaryCalls: z.ZodNumber;
2076
+ summaryInputTokens: z.ZodNumber;
2077
+ summaryOutputTokens: z.ZodNumber;
2078
+ summaryModel: z.ZodString;
2079
+ summaryCharCount: z.ZodOptional<z.ZodNumber>;
2080
+ summaryHeaderCount: z.ZodOptional<z.ZodNumber>;
2081
+ summaryHadMemoryEcho: z.ZodOptional<z.ZodBoolean>;
2082
+ }, z.core.$strip>;
2083
+
2664
2084
  /** How a conversation was created / its execution mode. */
2665
2085
  declare type ConversationCreateType = "standard" | "background" | "scheduled";
2666
2086
 
@@ -2691,6 +2111,142 @@ declare interface ConversationDeletedInputContext {
2691
2111
  readonly conversationId: string;
2692
2112
  }
2693
2113
 
2114
+ declare type ConversationErrorEvent = z.infer<typeof ConversationErrorEventSchema>;
2115
+
2116
+ declare const ConversationErrorEventSchema: z.ZodObject<{
2117
+ type: z.ZodLiteral<"conversation_error">;
2118
+ conversationId: z.ZodString;
2119
+ code: z.ZodEnum<{
2120
+ PROVIDER_NETWORK: "PROVIDER_NETWORK";
2121
+ PROVIDER_RATE_LIMIT: "PROVIDER_RATE_LIMIT";
2122
+ MANAGED_USAGE_LIMIT: "MANAGED_USAGE_LIMIT";
2123
+ PROVIDER_OVERLOADED: "PROVIDER_OVERLOADED";
2124
+ PROVIDER_API: "PROVIDER_API";
2125
+ IMAGE_TOO_LARGE: "IMAGE_TOO_LARGE";
2126
+ PROVIDER_BILLING: "PROVIDER_BILLING";
2127
+ PROVIDER_ORDERING: "PROVIDER_ORDERING";
2128
+ PROVIDER_WEB_SEARCH: "PROVIDER_WEB_SEARCH";
2129
+ PROVIDER_NOT_CONFIGURED: "PROVIDER_NOT_CONFIGURED";
2130
+ PROVIDER_INVALID_KEY: "PROVIDER_INVALID_KEY";
2131
+ MANAGED_KEY_INVALID: "MANAGED_KEY_INVALID";
2132
+ CONTEXT_TOO_LARGE: "CONTEXT_TOO_LARGE";
2133
+ BUDGET_YIELD_UNRECOVERED: "BUDGET_YIELD_UNRECOVERED";
2134
+ MAX_TOKENS_REACHED: "MAX_TOKENS_REACHED";
2135
+ CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
2136
+ CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
2137
+ DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
2138
+ UNKNOWN: "UNKNOWN";
2139
+ }>;
2140
+ userMessage: z.ZodString;
2141
+ retryable: z.ZodBoolean;
2142
+ debugDetails: z.ZodOptional<z.ZodString>;
2143
+ errorCategory: z.ZodOptional<z.ZodString>;
2144
+ connectionName: z.ZodOptional<z.ZodString>;
2145
+ profileName: z.ZodOptional<z.ZodString>;
2146
+ }, z.core.$strip>;
2147
+
2148
+ declare interface ConversationForkParent {
2149
+ conversationId: string;
2150
+ messageId: string;
2151
+ title: string;
2152
+ }
2153
+
2154
+ declare type ConversationInferenceProfileUpdatedEvent = z.infer<typeof ConversationInferenceProfileUpdatedEventSchema>;
2155
+
2156
+ declare const ConversationInferenceProfileUpdatedEventSchema: z.ZodObject<{
2157
+ type: z.ZodLiteral<"conversation_inference_profile_updated">;
2158
+ conversationId: z.ZodString;
2159
+ profile: z.ZodNullable<z.ZodString>;
2160
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2161
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2162
+ }, z.core.$strip>;
2163
+
2164
+ declare interface ConversationInfo {
2165
+ type: "conversation_info";
2166
+ conversationId: string;
2167
+ title: string;
2168
+ correlationId?: string;
2169
+ conversationType?: ConversationType;
2170
+ /**
2171
+ * Per-conversation override for the LLM inference profile. `undefined`
2172
+ * means the conversation inherits the workspace `llm.activeProfile`.
2173
+ */
2174
+ inferenceProfile?: string;
2175
+ }
2176
+
2177
+ declare type ConversationListInvalidatedEvent = z.infer<typeof ConversationListInvalidatedEventSchema>;
2178
+
2179
+ declare const ConversationListInvalidatedEventSchema: z.ZodObject<{
2180
+ type: z.ZodLiteral<"conversation_list_invalidated">;
2181
+ reason: z.ZodEnum<{
2182
+ created: "created";
2183
+ renamed: "renamed";
2184
+ deleted: "deleted";
2185
+ reordered: "reordered";
2186
+ seen_changed: "seen_changed";
2187
+ }>;
2188
+ }, z.core.$strip>;
2189
+
2190
+ declare interface ConversationListResponse {
2191
+ type: "conversation_list_response";
2192
+ conversations: Array<{
2193
+ id: string;
2194
+ title: string;
2195
+ createdAt?: number;
2196
+ updatedAt: number;
2197
+ conversationType?: ConversationType;
2198
+ source?: string;
2199
+ scheduleJobId?: string;
2200
+ channelBinding?: ChannelBinding;
2201
+ conversationOriginChannel?: ChannelId;
2202
+ conversationOriginInterface?: InterfaceId;
2203
+ assistantAttention?: AssistantAttention;
2204
+ displayOrder?: number;
2205
+ isPinned?: boolean;
2206
+ forkParent?: ConversationForkParent;
2207
+ /**
2208
+ * Per-conversation override for the LLM inference profile. Omitted when
2209
+ * the conversation inherits the workspace `llm.activeProfile`.
2210
+ */
2211
+ inferenceProfile?: string;
2212
+ }>;
2213
+ /** Whether more conversations exist beyond the returned page. */
2214
+ hasMore?: boolean;
2215
+ }
2216
+
2217
+ declare type ConversationNoticeEvent = z.infer<typeof ConversationNoticeEventSchema>;
2218
+
2219
+ declare const ConversationNoticeEventSchema: z.ZodObject<{
2220
+ type: z.ZodLiteral<"conversation_notice">;
2221
+ conversationId: z.ZodString;
2222
+ source: z.ZodEnum<{
2223
+ memory_v3: "memory_v3";
2224
+ }>;
2225
+ code: z.ZodEnum<{
2226
+ PROVIDER_NETWORK: "PROVIDER_NETWORK";
2227
+ PROVIDER_RATE_LIMIT: "PROVIDER_RATE_LIMIT";
2228
+ MANAGED_USAGE_LIMIT: "MANAGED_USAGE_LIMIT";
2229
+ PROVIDER_OVERLOADED: "PROVIDER_OVERLOADED";
2230
+ PROVIDER_API: "PROVIDER_API";
2231
+ IMAGE_TOO_LARGE: "IMAGE_TOO_LARGE";
2232
+ PROVIDER_BILLING: "PROVIDER_BILLING";
2233
+ PROVIDER_ORDERING: "PROVIDER_ORDERING";
2234
+ PROVIDER_WEB_SEARCH: "PROVIDER_WEB_SEARCH";
2235
+ PROVIDER_NOT_CONFIGURED: "PROVIDER_NOT_CONFIGURED";
2236
+ PROVIDER_INVALID_KEY: "PROVIDER_INVALID_KEY";
2237
+ MANAGED_KEY_INVALID: "MANAGED_KEY_INVALID";
2238
+ CONTEXT_TOO_LARGE: "CONTEXT_TOO_LARGE";
2239
+ BUDGET_YIELD_UNRECOVERED: "BUDGET_YIELD_UNRECOVERED";
2240
+ MAX_TOKENS_REACHED: "MAX_TOKENS_REACHED";
2241
+ CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
2242
+ CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
2243
+ DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
2244
+ UNKNOWN: "UNKNOWN";
2245
+ }>;
2246
+ userMessage: z.ZodString;
2247
+ errorCategory: z.ZodOptional<z.ZodString>;
2248
+ }, z.core.$strip>;
2249
+
2694
2250
  export declare interface ConversationRow {
2695
2251
  id: string;
2696
2252
  title: string | null;
@@ -2735,8 +2291,28 @@ export declare interface ConversationRow {
2735
2291
  */
2736
2292
  export declare type ConversationsClearedContext = BaseHookContext;
2737
2293
 
2294
+ declare type _ConversationsServerMessages = AssistantStatusEvent | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfoEvent | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompactedEvent | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationNoticeEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationListInvalidatedEvent | ScheduleConversationCreatedEvent | OpenConversationEvent;
2295
+
2296
+ declare type ConversationTitleUpdatedEvent = z.infer<typeof ConversationTitleUpdatedEventSchema>;
2297
+
2298
+ declare const ConversationTitleUpdatedEventSchema: z.ZodObject<{
2299
+ type: z.ZodLiteral<"conversation_title_updated">;
2300
+ conversationId: z.ZodString;
2301
+ title: z.ZodString;
2302
+ }, z.core.$strip>;
2303
+
2304
+ declare type ConversationType = "standard" | "background" | "scheduled";
2305
+
2738
2306
  /** Read-side alias of {@link ConversationCreateType}. */
2739
- declare type ConversationType = ConversationCreateType;
2307
+ declare type ConversationType_2 = ConversationCreateType;
2308
+
2309
+ declare type CopyBlockSurfaceData = z.infer<typeof CopyBlockSurfaceDataSchema>;
2310
+
2311
+ declare const CopyBlockSurfaceDataSchema: z.ZodObject<{
2312
+ text: z.ZodCatch<z.ZodString>;
2313
+ label: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2314
+ language: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2315
+ }, z.core.$strip>;
2740
2316
 
2741
2317
  /** Create a live voice connection bound to the caller's `send` transport. */
2742
2318
  export declare function createLiveVoiceConnection(options: {
@@ -2787,9 +2363,123 @@ declare interface DiffInfo {
2787
2363
  isNewFile: boolean;
2788
2364
  }
2789
2365
 
2366
+ declare type DiskPressureStatusChangedEvent = z.infer<typeof DiskPressureStatusChangedEventSchema>;
2367
+
2368
+ declare const DiskPressureStatusChangedEventSchema: z.ZodObject<{
2369
+ type: z.ZodLiteral<"disk_pressure_status_changed">;
2370
+ status: z.ZodObject<{
2371
+ enabled: z.ZodBoolean;
2372
+ state: z.ZodEnum<{
2373
+ unknown: "unknown";
2374
+ disabled: "disabled";
2375
+ critical: "critical";
2376
+ warning: "warning";
2377
+ ok: "ok";
2378
+ }>;
2379
+ locked: z.ZodBoolean;
2380
+ acknowledged: z.ZodBoolean;
2381
+ overrideActive: z.ZodBoolean;
2382
+ effectivelyLocked: z.ZodBoolean;
2383
+ lockId: z.ZodNullable<z.ZodString>;
2384
+ usagePercent: z.ZodNullable<z.ZodNumber>;
2385
+ thresholdPercent: z.ZodNumber;
2386
+ path: z.ZodNullable<z.ZodString>;
2387
+ lastCheckedAt: z.ZodNullable<z.ZodString>;
2388
+ blockedCapabilities: z.ZodArray<z.ZodEnum<{
2389
+ "agent-turns": "agent-turns";
2390
+ "background-work": "background-work";
2391
+ "remote-ingress": "remote-ingress";
2392
+ }>>;
2393
+ error: z.ZodNullable<z.ZodString>;
2394
+ }, z.core.$strip>;
2395
+ }, z.core.$strip>;
2396
+
2790
2397
  /** Distributive Omit that preserves union discrimination. */
2791
2398
  declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
2792
2399
 
2400
+ declare type DocumentCommentCreatedEvent = z.infer<typeof DocumentCommentCreatedEventSchema>;
2401
+
2402
+ declare const DocumentCommentCreatedEventSchema: z.ZodObject<{
2403
+ type: z.ZodLiteral<"document_comment_created">;
2404
+ conversationId: z.ZodString;
2405
+ surfaceId: z.ZodString;
2406
+ comment: z.ZodObject<{
2407
+ id: z.ZodString;
2408
+ surfaceId: z.ZodString;
2409
+ author: z.ZodString;
2410
+ content: z.ZodString;
2411
+ anchorStart: z.ZodOptional<z.ZodNumber>;
2412
+ anchorEnd: z.ZodOptional<z.ZodNumber>;
2413
+ anchorText: z.ZodOptional<z.ZodString>;
2414
+ parentCommentId: z.ZodOptional<z.ZodString>;
2415
+ status: z.ZodString;
2416
+ createdAt: z.ZodNumber;
2417
+ updatedAt: z.ZodNumber;
2418
+ }, z.core.$strip>;
2419
+ }, z.core.$strip>;
2420
+
2421
+ declare type DocumentCommentDeletedEvent = z.infer<typeof DocumentCommentDeletedEventSchema>;
2422
+
2423
+ declare const DocumentCommentDeletedEventSchema: z.ZodObject<{
2424
+ type: z.ZodLiteral<"document_comment_deleted">;
2425
+ conversationId: z.ZodString;
2426
+ surfaceId: z.ZodString;
2427
+ commentId: z.ZodString;
2428
+ }, z.core.$strip>;
2429
+
2430
+ declare type DocumentCommentReopenedEvent = z.infer<typeof DocumentCommentReopenedEventSchema>;
2431
+
2432
+ declare const DocumentCommentReopenedEventSchema: z.ZodObject<{
2433
+ type: z.ZodLiteral<"document_comment_reopened">;
2434
+ conversationId: z.ZodString;
2435
+ surfaceId: z.ZodString;
2436
+ commentId: z.ZodString;
2437
+ }, z.core.$strip>;
2438
+
2439
+ declare type DocumentCommentResolvedEvent = z.infer<typeof DocumentCommentResolvedEventSchema>;
2440
+
2441
+ declare const DocumentCommentResolvedEventSchema: z.ZodObject<{
2442
+ type: z.ZodLiteral<"document_comment_resolved">;
2443
+ conversationId: z.ZodString;
2444
+ surfaceId: z.ZodString;
2445
+ commentId: z.ZodString;
2446
+ resolvedBy: z.ZodString;
2447
+ }, z.core.$strip>;
2448
+
2449
+ declare type _DocumentCommentsServerMessages = DocumentCommentCreatedEvent | DocumentCommentResolvedEvent | DocumentCommentReopenedEvent | DocumentCommentDeletedEvent;
2450
+
2451
+ declare type DocumentEditorShowEvent = z.infer<typeof DocumentEditorShowEventSchema>;
2452
+
2453
+ declare const DocumentEditorShowEventSchema: z.ZodObject<{
2454
+ type: z.ZodLiteral<"document_editor_show">;
2455
+ conversationId: z.ZodString;
2456
+ surfaceId: z.ZodString;
2457
+ title: z.ZodString;
2458
+ initialContent: z.ZodString;
2459
+ }, z.core.$strip>;
2460
+
2461
+ declare type DocumentEditorUpdateEvent = z.infer<typeof DocumentEditorUpdateEventSchema>;
2462
+
2463
+ declare const DocumentEditorUpdateEventSchema: z.ZodObject<{
2464
+ type: z.ZodLiteral<"document_editor_update">;
2465
+ conversationId: z.ZodString;
2466
+ surfaceId: z.ZodString;
2467
+ markdown: z.ZodString;
2468
+ mode: z.ZodString;
2469
+ }, z.core.$strip>;
2470
+
2471
+ declare type DocumentPreviewSurfaceData = z.infer<typeof DocumentPreviewSurfaceDataSchema>;
2472
+
2473
+ declare const DocumentPreviewSurfaceDataSchema: z.ZodObject<{
2474
+ title: z.ZodCatch<z.ZodString>;
2475
+ surfaceId: z.ZodCatch<z.ZodString>;
2476
+ subtitle: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2477
+ content: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2478
+ mimeType: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2479
+ }, z.core.$strip>;
2480
+
2481
+ declare type _DocumentsServerMessages = DocumentEditorShowEvent | DocumentEditorUpdateEvent;
2482
+
2793
2483
  /**
2794
2484
  * Whether the given model or profile can process image input.
2795
2485
  *
@@ -2799,6 +2489,33 @@ declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Om
2799
2489
  */
2800
2490
  export declare function doesSupportVision(modelOrProfile: ModelProfileInfo | string): boolean;
2801
2491
 
2492
+ declare type DynamicPageSurfaceData = z.infer<typeof DynamicPageSurfaceDataSchema>;
2493
+
2494
+ declare const DynamicPageSurfaceDataSchema: z.ZodObject<{
2495
+ html: z.ZodCatch<z.ZodString>;
2496
+ width: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
2497
+ height: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
2498
+ appId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2499
+ dirName: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2500
+ reloadGeneration: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
2501
+ status: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2502
+ preview: z.ZodCatch<z.ZodOptional<z.ZodObject<{
2503
+ title: z.ZodCatch<z.ZodString>;
2504
+ subtitle: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2505
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2506
+ icon: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2507
+ metrics: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
2508
+ label: z.ZodCoercedString<unknown>;
2509
+ value: z.ZodCoercedString<unknown>;
2510
+ }, z.core.$strip>>>>;
2511
+ context: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
2512
+ app_create: "app_create";
2513
+ general: "general";
2514
+ }>>>;
2515
+ previewImage: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2516
+ }, z.core.$strip>>>;
2517
+ }, z.core.$strip>;
2518
+
2802
2519
  /** Embed a target and upsert its vector into the vector store. */
2803
2520
  export declare function embedAndUpsert(targetType: EmbeddingTargetType, targetId: string, input: EmbeddingInput, extraPayload?: Record<string, unknown>): Promise<void>;
2804
2521
 
@@ -2821,6 +2538,18 @@ declare type EmbeddingInput = string | MultimodalEmbeddingInput;
2821
2538
  */
2822
2539
  declare type EmbeddingTargetType = Parameters<embedAndUpsert_2>[1];
2823
2540
 
2541
+ declare type ErrorEvent_2 = z.infer<typeof ErrorEventSchema>;
2542
+
2543
+ declare const ErrorEventSchema: z.ZodObject<{
2544
+ type: z.ZodLiteral<"error">;
2545
+ message: z.ZodString;
2546
+ code: z.ZodOptional<z.ZodString>;
2547
+ category: z.ZodOptional<z.ZodString>;
2548
+ errorCategory: z.ZodOptional<z.ZodString>;
2549
+ requestId: z.ZodOptional<z.ZodString>;
2550
+ conversationId: z.ZodOptional<z.ZodString>;
2551
+ }, z.core.$strip>;
2552
+
2824
2553
  export declare function extractTextFromStoredMessageContent(raw: string | ContentBlock[]): string;
2825
2554
 
2826
2555
  export declare interface FileContent {
@@ -2838,6 +2567,115 @@ export declare interface FileContent {
2838
2567
  _attachmentId?: string;
2839
2568
  }
2840
2569
 
2570
+ declare type FileUploadSurfaceData = z.infer<typeof FileUploadSurfaceDataSchema>;
2571
+
2572
+ declare const FileUploadSurfaceDataSchema: z.ZodObject<{
2573
+ prompt: z.ZodOptional<z.ZodCoercedString<unknown>>;
2574
+ acceptedTypes: z.ZodPipe<z.ZodTransform<string[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
2575
+ maxFiles: z.ZodCatch<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
2576
+ maxSizeBytes: z.ZodCatch<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
2577
+ }, z.core.$strip>;
2578
+
2579
+ declare interface ForkSharedAppResponse {
2580
+ type: "fork_shared_app_response";
2581
+ success: boolean;
2582
+ appId?: string;
2583
+ name?: string;
2584
+ error?: string;
2585
+ }
2586
+
2587
+ declare type FormSurfaceData = z.infer<typeof FormSurfaceDataSchema>;
2588
+
2589
+ declare const FormSurfaceDataSchema: z.ZodObject<{
2590
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2591
+ fields: z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
2592
+ id: z.ZodCatch<z.ZodString>;
2593
+ type: z.ZodCatch<z.ZodEnum<{
2594
+ number: "number";
2595
+ text: "text";
2596
+ textarea: "textarea";
2597
+ select: "select";
2598
+ toggle: "toggle";
2599
+ password: "password";
2600
+ }>>;
2601
+ label: z.ZodCatch<z.ZodString>;
2602
+ placeholder: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2603
+ required: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
2604
+ defaultValue: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
2605
+ options: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
2606
+ label: z.ZodCoercedString<unknown>;
2607
+ value: z.ZodCoercedString<unknown>;
2608
+ }, z.core.$strip>>>>;
2609
+ }, z.core.$strip>>>;
2610
+ submitLabel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2611
+ pages: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
2612
+ id: z.ZodCatch<z.ZodString>;
2613
+ title: z.ZodCatch<z.ZodString>;
2614
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2615
+ fields: z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
2616
+ id: z.ZodCatch<z.ZodString>;
2617
+ type: z.ZodCatch<z.ZodEnum<{
2618
+ number: "number";
2619
+ text: "text";
2620
+ textarea: "textarea";
2621
+ select: "select";
2622
+ toggle: "toggle";
2623
+ password: "password";
2624
+ }>>;
2625
+ label: z.ZodCatch<z.ZodString>;
2626
+ placeholder: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2627
+ required: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
2628
+ defaultValue: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
2629
+ options: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
2630
+ label: z.ZodCoercedString<unknown>;
2631
+ value: z.ZodCoercedString<unknown>;
2632
+ }, z.core.$strip>>>>;
2633
+ }, z.core.$strip>>>;
2634
+ }, z.core.$strip>>>>>;
2635
+ pageLabels: z.ZodCatch<z.ZodOptional<z.ZodObject<{
2636
+ next: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2637
+ back: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2638
+ submit: z.ZodCatch<z.ZodOptional<z.ZodString>>;
2639
+ }, z.core.$strip>>>;
2640
+ progressStyle: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
2641
+ bar: "bar";
2642
+ tabs: "tabs";
2643
+ }>>>;
2644
+ }, z.core.$strip>;
2645
+
2646
+ declare type GenerationCancelledEvent = z.infer<typeof GenerationCancelledEventSchema>;
2647
+
2648
+ declare const GenerationCancelledEventSchema: z.ZodObject<{
2649
+ type: z.ZodLiteral<"generation_cancelled">;
2650
+ conversationId: z.ZodOptional<z.ZodString>;
2651
+ }, z.core.$strip>;
2652
+
2653
+ declare type GenerationHandoffEvent = z.infer<typeof GenerationHandoffEventSchema>;
2654
+
2655
+ declare const GenerationHandoffEventSchema: z.ZodObject<{
2656
+ type: z.ZodLiteral<"generation_handoff">;
2657
+ conversationId: z.ZodOptional<z.ZodString>;
2658
+ requestId: z.ZodOptional<z.ZodString>;
2659
+ queuedCount: z.ZodNumber;
2660
+ messageId: z.ZodOptional<z.ZodString>;
2661
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
2662
+ id: z.ZodOptional<z.ZodString>;
2663
+ filename: z.ZodString;
2664
+ mimeType: z.ZodString;
2665
+ data: z.ZodString;
2666
+ sourceType: z.ZodOptional<z.ZodEnum<{
2667
+ host_file: "host_file";
2668
+ sandbox_file: "sandbox_file";
2669
+ tool_block: "tool_block";
2670
+ }>>;
2671
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
2672
+ thumbnailData: z.ZodOptional<z.ZodString>;
2673
+ fileBacked: z.ZodOptional<z.ZodBoolean>;
2674
+ filePath: z.ZodOptional<z.ZodString>;
2675
+ }, z.core.$strip>>>;
2676
+ attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
2677
+ }, z.core.$strip>;
2678
+
2841
2679
  /** Read the assistant's name from IDENTITY.md for personalized responses. */
2842
2680
  export declare function getAssistantName(): string | null;
2843
2681
 
@@ -2878,6 +2716,11 @@ export declare function getMessages(conversationId: string): Promise<MessageRow[
2878
2716
  */
2879
2717
  export declare function getModelProfiles(): ModelProfileInfo[];
2880
2718
 
2719
+ declare interface GetSigningIdentityRequest {
2720
+ type: "get_signing_identity";
2721
+ requestId: string;
2722
+ }
2723
+
2881
2724
  /**
2882
2725
  * Returns the workspace root for user-facing state.
2883
2726
  *
@@ -2909,6 +2752,125 @@ declare interface GraphNodeSweepResult {
2909
2752
  /** Whether the text tokenizes to at least one lexical search token. */
2910
2753
  export declare function hasLexicalTokens(text: string): Promise<boolean>;
2911
2754
 
2755
+ declare type HeartbeatAlertEvent = z.infer<typeof HeartbeatAlertEventSchema>;
2756
+
2757
+ declare const HeartbeatAlertEventSchema: z.ZodObject<{
2758
+ type: z.ZodLiteral<"heartbeat_alert">;
2759
+ title: z.ZodString;
2760
+ body: z.ZodString;
2761
+ }, z.core.$strip>;
2762
+
2763
+ declare type HeartbeatConversationCreatedEvent = z.infer<typeof HeartbeatConversationCreatedEventSchema>;
2764
+
2765
+ declare const HeartbeatConversationCreatedEventSchema: z.ZodObject<{
2766
+ type: z.ZodLiteral<"heartbeat_conversation_created">;
2767
+ conversationId: z.ZodString;
2768
+ title: z.ZodString;
2769
+ }, z.core.$strip>;
2770
+
2771
+ declare interface HistoryResponse {
2772
+ type: "history_response";
2773
+ conversationId: string;
2774
+ messages: Array<{
2775
+ /** Database ID used by clients for the rendered message. */
2776
+ id?: string;
2777
+ role: string;
2778
+ text: string;
2779
+ timestamp: number;
2780
+ toolCalls?: HistoryResponseToolCall[];
2781
+ /** True when tool_use blocks appeared before any text block in the original content. */
2782
+ toolCallsBeforeText?: boolean;
2783
+ attachments?: UserMessageAttachment[];
2784
+ /** Text segments split by tool-call boundaries. Preserves interleaving order. */
2785
+ textSegments?: string[];
2786
+ /** Content block ordering using "text:N", "tool:N", "surface:N" encoding. */
2787
+ contentOrder?: string[];
2788
+ /** UI surfaces (widgets) embedded in the message. */
2789
+ surfaces?: HistoryResponseSurface[];
2790
+ /** Present when this message is a subagent lifecycle notification (running/completed/failed/aborted). */
2791
+ subagentNotification?: {
2792
+ subagentId: string;
2793
+ label: string;
2794
+ status: "running" | "completed" | "failed" | "aborted";
2795
+ error?: string;
2796
+ conversationId?: string;
2797
+ objective?: string;
2798
+ };
2799
+ /** True when text or tool result content was truncated due to maxTextChars/maxToolResultChars. */
2800
+ wasTruncated?: boolean;
2801
+ }>;
2802
+ /** Whether older messages exist beyond the returned page. */
2803
+ hasMore: boolean;
2804
+ /** Timestamp of the oldest message in the response (client uses as next pagination cursor). */
2805
+ oldestTimestamp?: number;
2806
+ /** ID of the oldest message in the response (tie-breaker for same-millisecond cursors). */
2807
+ oldestMessageId?: string;
2808
+ }
2809
+
2810
+ declare interface HistoryResponseSurface {
2811
+ surfaceId: string;
2812
+ surfaceType: string;
2813
+ title?: string;
2814
+ data: Record<string, unknown>;
2815
+ actions?: Array<{
2816
+ id: string;
2817
+ label: string;
2818
+ style?: string;
2819
+ data?: Record<string, unknown>;
2820
+ }>;
2821
+ display?: string;
2822
+ /** True when the surface was completed (e.g. form submitted, action taken). */
2823
+ completed?: boolean;
2824
+ /** Human-readable summary shown in the completion chip. */
2825
+ completionSummary?: string;
2826
+ }
2827
+
2828
+ declare interface HistoryResponseToolCall {
2829
+ name: string;
2830
+ input: Record<string, unknown>;
2831
+ result?: string;
2832
+ isError?: boolean;
2833
+ /** Base64-encoded image data from tool contentBlocks (e.g. browser_screenshot). @deprecated Use imageDataList. */
2834
+ imageData?: string;
2835
+ /** Base64-encoded image data from tool contentBlocks (e.g. browser_screenshot, image generation). */
2836
+ imageDataList?: string[];
2837
+ /** Workspace attachment ids for tool-result images persisted as references; clients fetch bytes by id on render instead of embedding base64. */
2838
+ imageAttachmentIds?: string[];
2839
+ /** Unix ms when the tool started executing. */
2840
+ startedAt?: number;
2841
+ /** Unix ms when the tool completed. */
2842
+ completedAt?: number;
2843
+ /** Confirmation decision for this tool call: "approved" | "denied" | "timed_out". */
2844
+ confirmationDecision?: string;
2845
+ /** Friendly label for the confirmation (e.g. "Edit File", "Run Command"). */
2846
+ confirmationLabel?: string;
2847
+ /** Risk level at the time of invocation ("low" | "medium" | "high" | "unknown"). */
2848
+ riskLevel?: string;
2849
+ /** Human-readable reason for the risk classification. */
2850
+ riskReason?: string;
2851
+ /**
2852
+ * @deprecated Use `approvalMode` and `approvalReason` instead.
2853
+ * Kept for backward compatibility during the migration window.
2854
+ */
2855
+ autoApproved?: boolean;
2856
+ /** How the approval decision was reached: prompted, auto, blocked, or unknown (legacy). */
2857
+ approvalMode?: string;
2858
+ /** Why the approval decision was reached (stable enum for client display). */
2859
+ approvalReason?: string;
2860
+ /** Snapshot of the auto-approve threshold at execution time. */
2861
+ riskThreshold?: string;
2862
+ }
2863
+
2864
+ declare type HomeFeedUpdatedEvent = z.infer<typeof HomeFeedUpdatedEventSchema>;
2865
+
2866
+ declare const HomeFeedUpdatedEventSchema: z.ZodObject<{
2867
+ type: z.ZodLiteral<"home_feed_updated">;
2868
+ updatedAt: z.ZodString;
2869
+ newItemCount: z.ZodNumber;
2870
+ }, z.core.$strip>;
2871
+
2872
+ declare type _HomeServerMessages = RelationshipStateUpdatedEvent | HomeFeedUpdatedEvent;
2873
+
2912
2874
  /**
2913
2875
  * Emit a `hook_event` to any UI watching the conversation the hook runs in —
2914
2876
  * e.g. progress while the hook does work the user can feel (memory
@@ -2923,6 +2885,22 @@ export declare function hasLexicalTokens(text: string): Promise<boolean>;
2923
2885
  */
2924
2886
  export declare type HookBroadcast = (detail: Record<string, unknown>) => void;
2925
2887
 
2888
+ declare type HookEvent = z.infer<typeof HookEventSchema>;
2889
+
2890
+ declare const HookEventSchema: z.ZodObject<{
2891
+ type: z.ZodLiteral<"hook_event">;
2892
+ conversationId: z.ZodOptional<z.ZodString>;
2893
+ hookName: z.ZodString;
2894
+ owner: z.ZodObject<{
2895
+ kind: z.ZodEnum<{
2896
+ plugin: "plugin";
2897
+ workspace: "workspace";
2898
+ }>;
2899
+ id: z.ZodString;
2900
+ }, z.core.$strip>;
2901
+ detail: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2902
+ }, z.core.$strip>;
2903
+
2926
2904
  /**
2927
2905
  * A plugin lifecycle hook. Receives a per-lifecycle context shape and may
2928
2906
  * either mutate `ctx` in place (returning `void`) or return a *partial*
@@ -2999,8 +2977,279 @@ export declare const HOOKS: {
2999
2977
  */
3000
2978
  declare const HOST_PROXY_CAPABILITIES: readonly ["host_bash", "host_file", "host_cu", "host_browser", "host_app_control", "host_ui_snapshot"];
3001
2979
 
2980
+ declare type HostAppControlCancelEvent = z.infer<typeof HostAppControlCancelEventSchema>;
2981
+
2982
+ declare const HostAppControlCancelEventSchema: z.ZodObject<{
2983
+ type: z.ZodLiteral<"host_app_control_cancel">;
2984
+ requestId: z.ZodString;
2985
+ conversationId: z.ZodString;
2986
+ }, z.core.$strip>;
2987
+
2988
+ declare type HostAppControlRequestEvent = z.infer<typeof HostAppControlRequestEventSchema>;
2989
+
2990
+ declare const HostAppControlRequestEventSchema: z.ZodObject<{
2991
+ type: z.ZodLiteral<"host_app_control_request">;
2992
+ requestId: z.ZodString;
2993
+ conversationId: z.ZodString;
2994
+ toolName: z.ZodString;
2995
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
2996
+ tool: z.ZodLiteral<"start">;
2997
+ app: z.ZodString;
2998
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
2999
+ }, z.core.$strip>, z.ZodObject<{
3000
+ tool: z.ZodLiteral<"observe">;
3001
+ app: z.ZodString;
3002
+ settle_ms: z.ZodOptional<z.ZodNumber>;
3003
+ }, z.core.$strip>, z.ZodObject<{
3004
+ tool: z.ZodLiteral<"press">;
3005
+ app: z.ZodString;
3006
+ key: z.ZodString;
3007
+ modifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
3008
+ duration_ms: z.ZodOptional<z.ZodNumber>;
3009
+ }, z.core.$strip>, z.ZodObject<{
3010
+ tool: z.ZodLiteral<"combo">;
3011
+ app: z.ZodString;
3012
+ keys: z.ZodArray<z.ZodString>;
3013
+ duration_ms: z.ZodOptional<z.ZodNumber>;
3014
+ }, z.core.$strip>, z.ZodObject<{
3015
+ tool: z.ZodLiteral<"sequence">;
3016
+ app: z.ZodString;
3017
+ steps: z.ZodArray<z.ZodObject<{
3018
+ key: z.ZodString;
3019
+ modifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
3020
+ duration_ms: z.ZodOptional<z.ZodNumber>;
3021
+ gap_ms: z.ZodOptional<z.ZodNumber>;
3022
+ }, z.core.$strip>>;
3023
+ }, z.core.$strip>, z.ZodObject<{
3024
+ tool: z.ZodLiteral<"type">;
3025
+ app: z.ZodString;
3026
+ text: z.ZodString;
3027
+ }, z.core.$strip>, z.ZodObject<{
3028
+ tool: z.ZodLiteral<"click">;
3029
+ app: z.ZodString;
3030
+ x: z.ZodNumber;
3031
+ y: z.ZodNumber;
3032
+ button: z.ZodOptional<z.ZodEnum<{
3033
+ left: "left";
3034
+ right: "right";
3035
+ middle: "middle";
3036
+ }>>;
3037
+ double: z.ZodOptional<z.ZodBoolean>;
3038
+ }, z.core.$strip>, z.ZodObject<{
3039
+ tool: z.ZodLiteral<"drag">;
3040
+ app: z.ZodString;
3041
+ from_x: z.ZodNumber;
3042
+ from_y: z.ZodNumber;
3043
+ to_x: z.ZodNumber;
3044
+ to_y: z.ZodNumber;
3045
+ button: z.ZodOptional<z.ZodEnum<{
3046
+ left: "left";
3047
+ right: "right";
3048
+ middle: "middle";
3049
+ }>>;
3050
+ }, z.core.$strip>, z.ZodObject<{
3051
+ tool: z.ZodLiteral<"stop">;
3052
+ app: z.ZodOptional<z.ZodString>;
3053
+ reason: z.ZodOptional<z.ZodString>;
3054
+ }, z.core.$strip>], "tool">;
3055
+ }, z.core.$strip>;
3056
+
3057
+ declare type _HostAppControlServerMessages = HostAppControlRequestEvent | HostAppControlCancelEvent;
3058
+
3059
+ declare type HostBashCancelEvent = z.infer<typeof HostBashCancelEventSchema>;
3060
+
3061
+ declare const HostBashCancelEventSchema: z.ZodObject<{
3062
+ type: z.ZodLiteral<"host_bash_cancel">;
3063
+ requestId: z.ZodString;
3064
+ conversationId: z.ZodString;
3065
+ targetClientId: z.ZodOptional<z.ZodString>;
3066
+ }, z.core.$strip>;
3067
+
3068
+ declare type HostBashRequestEvent = z.infer<typeof HostBashRequestEventSchema>;
3069
+
3070
+ declare const HostBashRequestEventSchema: z.ZodObject<{
3071
+ type: z.ZodLiteral<"host_bash_request">;
3072
+ requestId: z.ZodString;
3073
+ conversationId: z.ZodString;
3074
+ command: z.ZodString;
3075
+ working_dir: z.ZodOptional<z.ZodString>;
3076
+ timeout_seconds: z.ZodOptional<z.ZodNumber>;
3077
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3078
+ targetClientId: z.ZodOptional<z.ZodString>;
3079
+ }, z.core.$strip>;
3080
+
3081
+ declare type _HostBashServerMessages = HostBashRequestEvent | HostBashCancelEvent;
3082
+
3083
+ declare type HostBrowserCancelEvent = z.infer<typeof HostBrowserCancelEventSchema>;
3084
+
3085
+ declare const HostBrowserCancelEventSchema: z.ZodObject<{
3086
+ type: z.ZodLiteral<"host_browser_cancel">;
3087
+ requestId: z.ZodString;
3088
+ }, z.core.$strip>;
3089
+
3090
+ declare type HostBrowserRequestEvent = z.infer<typeof HostBrowserRequestEventSchema>;
3091
+
3092
+ declare const HostBrowserRequestEventSchema: z.ZodObject<{
3093
+ type: z.ZodLiteral<"host_browser_request">;
3094
+ requestId: z.ZodString;
3095
+ conversationId: z.ZodString;
3096
+ cdpMethod: z.ZodString;
3097
+ cdpParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3098
+ cdpSessionId: z.ZodOptional<z.ZodString>;
3099
+ timeout_seconds: z.ZodOptional<z.ZodNumber>;
3100
+ }, z.core.$strip>;
3101
+
3102
+ declare type _HostBrowserServerMessages = HostBrowserRequestEvent | HostBrowserCancelEvent;
3103
+
3104
+ declare type HostCuCancelEvent = z.infer<typeof HostCuCancelEventSchema>;
3105
+
3106
+ declare const HostCuCancelEventSchema: z.ZodObject<{
3107
+ type: z.ZodLiteral<"host_cu_cancel">;
3108
+ requestId: z.ZodString;
3109
+ conversationId: z.ZodString;
3110
+ targetClientId: z.ZodOptional<z.ZodString>;
3111
+ }, z.core.$strip>;
3112
+
3113
+ declare type HostCuRequestEvent = z.infer<typeof HostCuRequestEventSchema>;
3114
+
3115
+ declare const HostCuRequestEventSchema: z.ZodObject<{
3116
+ type: z.ZodLiteral<"host_cu_request">;
3117
+ requestId: z.ZodString;
3118
+ conversationId: z.ZodString;
3119
+ targetClientId: z.ZodOptional<z.ZodString>;
3120
+ toolName: z.ZodString;
3121
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3122
+ stepNumber: z.ZodNumber;
3123
+ reasoning: z.ZodOptional<z.ZodString>;
3124
+ }, z.core.$strip>;
3125
+
3126
+ declare type _HostCuServerMessages = HostCuRequestEvent | HostCuCancelEvent;
3127
+
3128
+ declare type HostFileCancelEvent = z.infer<typeof HostFileCancelEventSchema>;
3129
+
3130
+ declare const HostFileCancelEventSchema: z.ZodObject<{
3131
+ type: z.ZodLiteral<"host_file_cancel">;
3132
+ requestId: z.ZodString;
3133
+ conversationId: z.ZodString;
3134
+ targetClientId: z.ZodOptional<z.ZodString>;
3135
+ }, z.core.$strip>;
3136
+
3137
+ declare type HostFileRequestEvent = z.infer<typeof HostFileRequestEventSchema>;
3138
+
3139
+ declare const HostFileRequestEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3140
+ type: z.ZodLiteral<"host_file_request">;
3141
+ requestId: z.ZodString;
3142
+ conversationId: z.ZodString;
3143
+ targetClientId: z.ZodOptional<z.ZodString>;
3144
+ operation: z.ZodLiteral<"read">;
3145
+ path: z.ZodString;
3146
+ offset: z.ZodOptional<z.ZodNumber>;
3147
+ limit: z.ZodOptional<z.ZodNumber>;
3148
+ }, z.core.$strip>, z.ZodObject<{
3149
+ type: z.ZodLiteral<"host_file_request">;
3150
+ requestId: z.ZodString;
3151
+ conversationId: z.ZodString;
3152
+ targetClientId: z.ZodOptional<z.ZodString>;
3153
+ operation: z.ZodLiteral<"write">;
3154
+ path: z.ZodString;
3155
+ content: z.ZodString;
3156
+ }, z.core.$strip>, z.ZodObject<{
3157
+ type: z.ZodLiteral<"host_file_request">;
3158
+ requestId: z.ZodString;
3159
+ conversationId: z.ZodString;
3160
+ targetClientId: z.ZodOptional<z.ZodString>;
3161
+ operation: z.ZodLiteral<"edit">;
3162
+ path: z.ZodString;
3163
+ old_string: z.ZodString;
3164
+ new_string: z.ZodString;
3165
+ replace_all: z.ZodOptional<z.ZodBoolean>;
3166
+ }, z.core.$strip>], "operation">;
3167
+
3168
+ declare type _HostFileServerMessages = HostFileRequestEvent | HostFileCancelEvent;
3169
+
3002
3170
  declare type HostProxyCapability = (typeof HOST_PROXY_CAPABILITIES)[number];
3003
3171
 
3172
+ declare type HostTransferCancelEvent = z.infer<typeof HostTransferCancelEventSchema>;
3173
+
3174
+ declare const HostTransferCancelEventSchema: z.ZodObject<{
3175
+ type: z.ZodLiteral<"host_transfer_cancel">;
3176
+ requestId: z.ZodString;
3177
+ conversationId: z.ZodString;
3178
+ targetClientId: z.ZodOptional<z.ZodString>;
3179
+ }, z.core.$strip>;
3180
+
3181
+ declare type HostTransferRequestEvent = z.infer<typeof HostTransferRequestEventSchema>;
3182
+
3183
+ declare const HostTransferRequestEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3184
+ type: z.ZodLiteral<"host_transfer_request">;
3185
+ requestId: z.ZodString;
3186
+ conversationId: z.ZodString;
3187
+ targetClientId: z.ZodOptional<z.ZodString>;
3188
+ direction: z.ZodLiteral<"to_host">;
3189
+ transferId: z.ZodString;
3190
+ destPath: z.ZodString;
3191
+ sizeBytes: z.ZodNumber;
3192
+ sha256: z.ZodString;
3193
+ overwrite: z.ZodBoolean;
3194
+ }, z.core.$strip>, z.ZodObject<{
3195
+ type: z.ZodLiteral<"host_transfer_request">;
3196
+ requestId: z.ZodString;
3197
+ conversationId: z.ZodString;
3198
+ targetClientId: z.ZodOptional<z.ZodString>;
3199
+ direction: z.ZodLiteral<"to_sandbox">;
3200
+ transferId: z.ZodString;
3201
+ sourcePath: z.ZodString;
3202
+ }, z.core.$strip>], "direction">;
3203
+
3204
+ declare type _HostTransferServerMessages = HostTransferRequestEvent | HostTransferCancelEvent;
3205
+
3206
+ declare type HostUiSnapshotCancelEvent = z.infer<typeof HostUiSnapshotCancelEventSchema>;
3207
+
3208
+ declare const HostUiSnapshotCancelEventSchema: z.ZodObject<{
3209
+ type: z.ZodLiteral<"host_ui_snapshot_cancel">;
3210
+ requestId: z.ZodString;
3211
+ }, z.core.$strip>;
3212
+
3213
+ declare type HostUiSnapshotRequestEvent = z.infer<typeof HostUiSnapshotRequestEventSchema>;
3214
+
3215
+ declare const HostUiSnapshotRequestEventSchema: z.ZodObject<{
3216
+ type: z.ZodLiteral<"host_ui_snapshot_request">;
3217
+ requestId: z.ZodString;
3218
+ view: z.ZodEnum<{
3219
+ sampler: "sampler";
3220
+ chat: "chat";
3221
+ }>;
3222
+ tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3223
+ }, z.core.$strip>;
3224
+
3225
+ declare type _HostUiSnapshotServerMessages = HostUiSnapshotRequestEvent | HostUiSnapshotCancelEvent;
3226
+
3227
+ declare type IdentityChangedEvent = z.infer<typeof IdentityChangedEventSchema>;
3228
+
3229
+ declare const IdentityChangedEventSchema: z.ZodObject<{
3230
+ type: z.ZodLiteral<"identity_changed">;
3231
+ name: z.ZodString;
3232
+ role: z.ZodString;
3233
+ personality: z.ZodString;
3234
+ emoji: z.ZodString;
3235
+ home: z.ZodString;
3236
+ }, z.core.$strip>;
3237
+
3238
+ declare interface IdentityGetResponse {
3239
+ type: "identity_get_response";
3240
+ /** Whether an IDENTITY.md file was found. When false, all fields are empty defaults. */
3241
+ found: boolean;
3242
+ name: string;
3243
+ role: string;
3244
+ personality: string;
3245
+ emoji: string;
3246
+ home: string;
3247
+ version?: string;
3248
+ assistantId?: string;
3249
+ createdAt?: string;
3250
+ originSystem?: string;
3251
+ }
3252
+
3004
3253
  export declare interface ImageContent {
3005
3254
  type: "image";
3006
3255
  source: MediaSource_2;
@@ -3012,6 +3261,22 @@ declare interface ImageEmbeddingInput {
3012
3261
  mimeType: string;
3013
3262
  }
3014
3263
 
3264
+ declare interface IngressConfigResponse {
3265
+ type: "ingress_config_response";
3266
+ enabled: boolean;
3267
+ publicBaseUrl: string;
3268
+ /** Read-only gateway target computed from GATEWAY_PORT env var (default 7830) + loopback host. */
3269
+ localGatewayTarget: string;
3270
+ /**
3271
+ * When true, this assistant uses platform-managed callback routing.
3272
+ * Webhook delivery is handled by the platform — no local tunnel or
3273
+ * ngrok setup is needed. `publicBaseUrl` reflects the platform callback URL.
3274
+ */
3275
+ managedCallbacks?: boolean;
3276
+ success: boolean;
3277
+ error?: string;
3278
+ }
3279
+
3015
3280
  /**
3016
3281
  * Context passed to `Plugin.init()` during bootstrap. Carries the resolved
3017
3282
  * config, a pino-compatible logger scoped to the plugin, a per-plugin
@@ -3055,6 +3320,46 @@ declare interface InsertedMessage {
3055
3320
  deduplicated: boolean;
3056
3321
  }
3057
3322
 
3323
+ declare interface IntegrationConnectResult {
3324
+ type: "integration_connect_result";
3325
+ integrationId: string;
3326
+ success: boolean;
3327
+ accountInfo?: string | null;
3328
+ error?: string | null;
3329
+ setupRequired?: boolean;
3330
+ setupHint?: string;
3331
+ }
3332
+
3333
+ declare interface IntegrationListResponse {
3334
+ type: "integration_list_response";
3335
+ integrations: Array<{
3336
+ id: string;
3337
+ connected: boolean;
3338
+ accountInfo?: string | null;
3339
+ connectedAt?: number | null;
3340
+ lastUsed?: number | null;
3341
+ error?: string | null;
3342
+ }>;
3343
+ }
3344
+
3345
+ declare type _IntegrationsServerMessages = SlackWebhookConfigResponse | IngressConfigResponse | PlatformConfigResponse | VercelApiConfigResponse | TelegramConfigResponse | ChannelVerificationSessionResponse | IntegrationListResponse | IntegrationConnectResult | OAuthConnectResultResponse | OpenUrlEvent | OpenPanelEvent | NavigateSettingsEvent | ShowPlatformLogin | PlatformDisconnected;
3346
+
3347
+ declare type InteractionResolvedEvent = z.infer<typeof InteractionResolvedEventSchema>;
3348
+
3349
+ declare const InteractionResolvedEventSchema: z.ZodObject<{
3350
+ type: z.ZodLiteral<"interaction_resolved">;
3351
+ requestId: z.ZodString;
3352
+ conversationId: z.ZodString;
3353
+ state: z.ZodEnum<{
3354
+ cancelled: "cancelled";
3355
+ superseded: "superseded";
3356
+ approved: "approved";
3357
+ rejected: "rejected";
3358
+ answered: "answered";
3359
+ }>;
3360
+ kind: z.ZodString;
3361
+ }, z.core.$strip>;
3362
+
3058
3363
  declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a", "route"];
3059
3364
 
3060
3365
  declare type InterfaceId = (typeof INTERFACE_IDS)[number];
@@ -3135,7 +3440,7 @@ export declare function lastToolResultUserMessageIndex(history: Message[]): numb
3135
3440
  export declare function listCatalogSkills(): Promise<ResolvedSkillEntry[]>;
3136
3441
 
3137
3442
  /** List conversation rows, newest first. */
3138
- export declare function listConversations(limit?: number, conversationType?: ConversationType, offset?: number, archiveStatus?: ArchiveStatusFilter, originChannel?: string): Promise<ConversationRow[]>;
3443
+ export declare function listConversations(limit?: number, conversationType?: ConversationType_2, offset?: number, archiveStatus?: ArchiveStatusFilter, originChannel?: string): Promise<ConversationRow[]>;
3139
3444
 
3140
3445
  /**
3141
3446
  * The locally installed skill catalog with resolved states. Includes every
@@ -3145,6 +3450,23 @@ export declare function listConversations(limit?: number, conversationType?: Con
3145
3450
  */
3146
3451
  export declare function listInstalledSkills(): Promise<ResolvedSkillEntry[]>;
3147
3452
 
3453
+ declare type ListSurfaceData = z.infer<typeof ListSurfaceDataSchema>;
3454
+
3455
+ declare const ListSurfaceDataSchema: z.ZodObject<{
3456
+ items: z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
3457
+ id: z.ZodCatch<z.ZodString>;
3458
+ title: z.ZodCatch<z.ZodString>;
3459
+ subtitle: z.ZodCatch<z.ZodOptional<z.ZodString>>;
3460
+ icon: z.ZodCatch<z.ZodOptional<z.ZodString>>;
3461
+ selected: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
3462
+ }, z.core.$strip>>>;
3463
+ selectionMode: z.ZodCatch<z.ZodEnum<{
3464
+ none: "none";
3465
+ single: "single";
3466
+ multiple: "multiple";
3467
+ }>>;
3468
+ }, z.core.$strip>;
3469
+
3148
3470
  declare const _LIVE_VOICE_SERVER_FRAME_TYPES: readonly ["ready", "busy", "speech_started", "utterance_end", "utterance_discarded", "stt_partial", "stt_final", "thinking", "assistant_text_delta", "tts_audio", "tts_done", "turn_cancelled", "metrics", "archived", "error"];
3149
3471
 
3150
3472
  declare const LIVE_VOICE_TURN_DETECTION_MODES: readonly ["manual", "server_vad"];
@@ -3404,11 +3726,95 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
3404
3726
 
3405
3727
  declare type MediaSource_2 = Base64MediaSource | WorkspaceRefMediaSource;
3406
3728
 
3729
+ declare type MemoryRecalledEvent = z.infer<typeof MemoryRecalledEventSchema>;
3730
+
3731
+ declare const MemoryRecalledEventSchema: z.ZodObject<{
3732
+ type: z.ZodLiteral<"memory_recalled">;
3733
+ provider: z.ZodString;
3734
+ model: z.ZodString;
3735
+ degradation: z.ZodOptional<z.ZodObject<{
3736
+ semanticUnavailable: z.ZodBoolean;
3737
+ reason: z.ZodString;
3738
+ fallbackSources: z.ZodArray<z.ZodString>;
3739
+ }, z.core.$strip>>;
3740
+ semanticHits: z.ZodNumber;
3741
+ tier1Count: z.ZodNumber;
3742
+ tier2Count: z.ZodNumber;
3743
+ hybridSearchLatencyMs: z.ZodNumber;
3744
+ sparseVectorUsed: z.ZodBoolean;
3745
+ mergedCount: z.ZodNumber;
3746
+ selectedCount: z.ZodNumber;
3747
+ injectedTokens: z.ZodNumber;
3748
+ latencyMs: z.ZodNumber;
3749
+ topCandidates: z.ZodArray<z.ZodObject<{
3750
+ key: z.ZodString;
3751
+ type: z.ZodString;
3752
+ kind: z.ZodString;
3753
+ finalScore: z.ZodNumber;
3754
+ semantic: z.ZodNumber;
3755
+ recency: z.ZodNumber;
3756
+ }, z.core.$strip>>;
3757
+ }, z.core.$strip>;
3758
+
3759
+ declare type _MemoryServerMessages = MemoryRecalledEvent | MemoryStatusEvent;
3760
+
3761
+ declare type MemoryStatusEvent = z.infer<typeof MemoryStatusEventSchema>;
3762
+
3763
+ declare const MemoryStatusEventSchema: z.ZodObject<{
3764
+ type: z.ZodLiteral<"memory_status">;
3765
+ enabled: z.ZodBoolean;
3766
+ degraded: z.ZodBoolean;
3767
+ degradation: z.ZodOptional<z.ZodObject<{
3768
+ semanticUnavailable: z.ZodBoolean;
3769
+ reason: z.ZodString;
3770
+ fallbackSources: z.ZodArray<z.ZodString>;
3771
+ }, z.core.$strip>>;
3772
+ reason: z.ZodOptional<z.ZodString>;
3773
+ provider: z.ZodOptional<z.ZodString>;
3774
+ model: z.ZodOptional<z.ZodString>;
3775
+ }, z.core.$strip>;
3776
+
3407
3777
  export declare interface Message {
3408
3778
  role: "user" | "assistant";
3409
3779
  content: ContentBlock[];
3410
3780
  }
3411
3781
 
3782
+ declare type MessageCompleteEvent = z.infer<typeof MessageCompleteEventSchema>;
3783
+
3784
+ declare const MessageCompleteEventSchema: z.ZodObject<{
3785
+ type: z.ZodLiteral<"message_complete">;
3786
+ messageId: z.ZodOptional<z.ZodString>;
3787
+ conversationId: z.ZodOptional<z.ZodString>;
3788
+ source: z.ZodOptional<z.ZodEnum<{
3789
+ main: "main";
3790
+ aux: "aux";
3791
+ }>>;
3792
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
3793
+ id: z.ZodOptional<z.ZodString>;
3794
+ filename: z.ZodString;
3795
+ mimeType: z.ZodString;
3796
+ data: z.ZodString;
3797
+ sourceType: z.ZodOptional<z.ZodEnum<{
3798
+ host_file: "host_file";
3799
+ sandbox_file: "sandbox_file";
3800
+ tool_block: "tool_block";
3801
+ }>>;
3802
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
3803
+ thumbnailData: z.ZodOptional<z.ZodString>;
3804
+ fileBacked: z.ZodOptional<z.ZodBoolean>;
3805
+ filePath: z.ZodOptional<z.ZodString>;
3806
+ }, z.core.$strip>>>;
3807
+ attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
3808
+ }, z.core.$strip>;
3809
+
3810
+ declare type MessageDequeuedEvent = z.infer<typeof MessageDequeuedEventSchema>;
3811
+
3812
+ declare const MessageDequeuedEventSchema: z.ZodObject<{
3813
+ type: z.ZodLiteral<"message_dequeued">;
3814
+ conversationId: z.ZodString;
3815
+ requestId: z.ZodString;
3816
+ }, z.core.$strip>;
3817
+
3412
3818
  declare type MessageLexicalSearchResult = Awaited<ReturnType<searchMessageIdsLexical_2>>[number];
3413
3819
 
3414
3820
  declare interface MessageLexicalSearchResult_2 {
@@ -3529,6 +3935,32 @@ declare const messageMetadataSchema: z.ZodObject<{
3529
3935
  nonInteractiveContextBlock: z.ZodOptional<z.ZodString>;
3530
3936
  }, z.core.$loose>;
3531
3937
 
3938
+ declare type MessageQueuedDeletedEvent = z.infer<typeof MessageQueuedDeletedEventSchema>;
3939
+
3940
+ declare const MessageQueuedDeletedEventSchema: z.ZodObject<{
3941
+ type: z.ZodLiteral<"message_queued_deleted">;
3942
+ conversationId: z.ZodString;
3943
+ requestId: z.ZodString;
3944
+ }, z.core.$strip>;
3945
+
3946
+ declare type MessageQueuedEvent = z.infer<typeof MessageQueuedEventSchema>;
3947
+
3948
+ declare const MessageQueuedEventSchema: z.ZodObject<{
3949
+ type: z.ZodLiteral<"message_queued">;
3950
+ conversationId: z.ZodString;
3951
+ requestId: z.ZodString;
3952
+ position: z.ZodNumber;
3953
+ }, z.core.$strip>;
3954
+
3955
+ declare type MessageRequestCompleteEvent = z.infer<typeof MessageRequestCompleteEventSchema>;
3956
+
3957
+ declare const MessageRequestCompleteEventSchema: z.ZodObject<{
3958
+ type: z.ZodLiteral<"message_request_complete">;
3959
+ conversationId: z.ZodString;
3960
+ requestId: z.ZodString;
3961
+ runStillActive: z.ZodOptional<z.ZodBoolean>;
3962
+ }, z.core.$strip>;
3963
+
3532
3964
  /** Allowed values for the `role` column on `messages`. */
3533
3965
  declare type MessageRole = "user" | "assistant" | "system";
3534
3966
 
@@ -3550,6 +3982,41 @@ declare interface MessageRow {
3550
3982
  finalized: number;
3551
3983
  }
3552
3984
 
3985
+ declare type _MessagesServerMessages = UserMessageEchoEvent | AssistantTurnStartEvent | AssistantTextDeltaEvent | AssistantThinkingDeltaEvent | ToolUseStartEvent | ToolUsePreviewStartEvent | ToolOutputChunkEvent | ToolInputDeltaEvent | ToolResultEvent | ConfirmationRequestEvent | SecretRequestEvent | QuestionRequestEvent | MessageCompleteEvent | ErrorEvent_2 | MessageQueuedEvent | MessageDequeuedEvent | MessageRequestCompleteEvent | MessageQueuedDeletedEvent | MessageSteeredEvent | ConfirmationStateChangedEvent | AssistantActivityStateEvent | ConversationInferenceProfileUpdatedEvent | InteractionResolvedEvent;
3986
+
3987
+ declare type MessageSteeredEvent = z.infer<typeof MessageSteeredEventSchema>;
3988
+
3989
+ declare const MessageSteeredEventSchema: z.ZodObject<{
3990
+ type: z.ZodLiteral<"message_steered">;
3991
+ conversationId: z.ZodString;
3992
+ requestId: z.ZodString;
3993
+ }, z.core.$strip>;
3994
+
3995
+ declare type ModelInfoEvent = z.infer<typeof ModelInfoEventSchema>;
3996
+
3997
+ declare const ModelInfoEventSchema: z.ZodObject<{
3998
+ type: z.ZodLiteral<"model_info">;
3999
+ conversationId: z.ZodOptional<z.ZodString>;
4000
+ model: z.ZodString;
4001
+ provider: z.ZodString;
4002
+ configuredProviders: z.ZodOptional<z.ZodArray<z.ZodString>>;
4003
+ availableModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
4004
+ id: z.ZodString;
4005
+ displayName: z.ZodString;
4006
+ }, z.core.$strip>>>;
4007
+ allProviders: z.ZodOptional<z.ZodArray<z.ZodObject<{
4008
+ id: z.ZodString;
4009
+ displayName: z.ZodString;
4010
+ models: z.ZodArray<z.ZodObject<{
4011
+ id: z.ZodString;
4012
+ displayName: z.ZodString;
4013
+ }, z.core.$strip>>;
4014
+ defaultModel: z.ZodString;
4015
+ apiKeyUrl: z.ZodOptional<z.ZodString>;
4016
+ apiKeyPlaceholder: z.ZodOptional<z.ZodString>;
4017
+ }, z.core.$strip>>>;
4018
+ }, z.core.$strip>;
4019
+
3553
4020
  /**
3554
4021
  * A workspace inference profile a plugin can route to. Returned by
3555
4022
  * {@link getModelProfiles}; {@link key} is the value a `pre-model-call` hook
@@ -3577,7 +4044,106 @@ export declare interface ModelProfileInfo {
3577
4044
  readonly isMix: boolean;
3578
4045
  }
3579
4046
 
3580
- declare type MultimodalEmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput | AudioEmbeddingInput | VideoEmbeddingInput;
4047
+ declare type MultimodalEmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput | AudioEmbeddingInput | VideoEmbeddingInput;
4048
+
4049
+ declare type NavigateSettingsEvent = z.infer<typeof NavigateSettingsEventSchema>;
4050
+
4051
+ declare const NavigateSettingsEventSchema: z.ZodObject<{
4052
+ type: z.ZodLiteral<"navigate_settings">;
4053
+ tab: z.ZodString;
4054
+ }, z.core.$strip>;
4055
+
4056
+ declare type NotificationConversationCreatedEvent = z.infer<typeof NotificationConversationCreatedEventSchema>;
4057
+
4058
+ declare const NotificationConversationCreatedEventSchema: z.ZodObject<{
4059
+ type: z.ZodLiteral<"notification_conversation_created">;
4060
+ conversationId: z.ZodString;
4061
+ title: z.ZodString;
4062
+ sourceEventName: z.ZodString;
4063
+ targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
4064
+ groupId: z.ZodOptional<z.ZodString>;
4065
+ source: z.ZodOptional<z.ZodString>;
4066
+ silent: z.ZodOptional<z.ZodBoolean>;
4067
+ }, z.core.$strip>;
4068
+
4069
+ declare type NotificationIntentEvent = z.infer<typeof NotificationIntentEventSchema>;
4070
+
4071
+ declare const NotificationIntentEventSchema: z.ZodObject<{
4072
+ type: z.ZodLiteral<"notification_intent">;
4073
+ sourceEventName: z.ZodString;
4074
+ title: z.ZodString;
4075
+ body: z.ZodString;
4076
+ deliveryId: z.ZodOptional<z.ZodString>;
4077
+ deepLinkMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4078
+ targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
4079
+ silent: z.ZodOptional<z.ZodBoolean>;
4080
+ }, z.core.$strip>;
4081
+
4082
+ declare type _NotificationsServerMessages = NotificationIntentEvent | NotificationConversationCreatedEvent;
4083
+
4084
+ declare interface OAuthConnectResultResponse {
4085
+ type: "oauth_connect_result";
4086
+ success: boolean;
4087
+ service?: string;
4088
+ grantedScopes?: string[];
4089
+ accountInfo?: string;
4090
+ error?: string;
4091
+ }
4092
+
4093
+ declare type OAuthConnectSurfaceData = z.infer<typeof OAuthConnectSurfaceDataSchema>;
4094
+
4095
+ declare const OAuthConnectSurfaceDataSchema: z.ZodObject<{
4096
+ providerKey: z.ZodCatch<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
4097
+ displayName: z.ZodCatch<z.ZodOptional<z.ZodString>>;
4098
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
4099
+ logoUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
4100
+ }, z.core.$strip>;
4101
+
4102
+ declare interface OpenBundleResponse {
4103
+ type: "open_bundle_response";
4104
+ manifest: {
4105
+ format_version: number;
4106
+ name: string;
4107
+ description?: string;
4108
+ icon?: string;
4109
+ created_at: string;
4110
+ created_by: string;
4111
+ entry: string;
4112
+ capabilities: string[];
4113
+ };
4114
+ scanResult: {
4115
+ passed: boolean;
4116
+ blocked: string[];
4117
+ warnings: string[];
4118
+ };
4119
+ signatureResult: {
4120
+ trustTier: "verified" | "signed" | "unsigned" | "tampered";
4121
+ signerKeyId?: string;
4122
+ signerDisplayName?: string;
4123
+ signerAccount?: string;
4124
+ };
4125
+ bundleSizeBytes: number;
4126
+ }
4127
+
4128
+ declare type OpenConversationEvent = z.infer<typeof OpenConversationEventSchema>;
4129
+
4130
+ declare const OpenConversationEventSchema: z.ZodObject<{
4131
+ type: z.ZodLiteral<"open_conversation">;
4132
+ conversationId: z.ZodString;
4133
+ title: z.ZodOptional<z.ZodString>;
4134
+ anchorMessageId: z.ZodOptional<z.ZodString>;
4135
+ focus: z.ZodOptional<z.ZodBoolean>;
4136
+ }, z.core.$strip>;
4137
+
4138
+ declare type OpenPanelEvent = z.infer<typeof OpenPanelEventSchema>;
4139
+
4140
+ declare const OpenPanelEventSchema: z.ZodObject<{
4141
+ type: z.ZodLiteral<"open_panel">;
4142
+ panelType: z.ZodString;
4143
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4144
+ conversationId: z.ZodOptional<z.ZodString>;
4145
+ surfaceId: z.ZodOptional<z.ZodString>;
4146
+ }, z.core.$strip>;
3581
4147
 
3582
4148
  /**
3583
4149
  * Open a streaming transcription session against the configured STT provider
@@ -3600,6 +4166,15 @@ declare type MultimodalEmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput
3600
4166
  */
3601
4167
  export declare function openTranscriptionSession(): Promise<StreamingTranscriber | null>;
3602
4168
 
4169
+ declare type OpenUrlEvent = z.infer<typeof OpenUrlEventSchema>;
4170
+
4171
+ declare const OpenUrlEventSchema: z.ZodObject<{
4172
+ type: z.ZodLiteral<"open_url">;
4173
+ url: z.ZodString;
4174
+ title: z.ZodOptional<z.ZodString>;
4175
+ conversationId: z.ZodOptional<z.ZodString>;
4176
+ }, z.core.$strip>;
4177
+
3603
4178
  /** Parse a stored message-metadata JSON string; undefined when absent/invalid. */
3604
4179
  export declare function parseMessageMetadata(metadataJson: string | null): Promise<MessageMetadata>;
3605
4180
 
@@ -3613,6 +4188,17 @@ export declare function parseMessageMetadata(metadataJson: string | null): Promi
3613
4188
  */
3614
4189
  declare function parseMessageMetadata_2(metadataJson: string | null): MessageMetadata_2 | undefined;
3615
4190
 
4191
+ declare interface PlatformConfigResponse {
4192
+ type: "platform_config_response";
4193
+ baseUrl: string;
4194
+ success: boolean;
4195
+ error?: string;
4196
+ }
4197
+
4198
+ declare interface PlatformDisconnected {
4199
+ type: "platform_disconnected";
4200
+ }
4201
+
3616
4202
  /**
3617
4203
  * The subset of {@link AssistantEventHub} workspace plugins may use. Picking
3618
4204
  * method signatures off the class keeps the facade in sync with the hub while
@@ -4102,16 +4688,14 @@ declare interface ProxyApprovalRequest {
4102
4688
 
4103
4689
  declare type ProxyToolResolver = (toolName: string, input: Record<string, unknown>) => Promise<ToolExecutionResult>;
4104
4690
 
4105
- /**
4106
- * Publish a runtime event to the assistant's event hub. Resolves once fanout to
4107
- * all subscribers has been attempted (a throwing subscriber never aborts
4108
- * delivery to the rest). Rejects if the event is non-serializable or is a
4109
- * host-proxy control event, which plugins may not publish.
4110
- */
4111
- export declare function publishEvent(event: AssistantEventEnvelope, options?: PublishEventOptions): Promise<void>;
4112
-
4113
- /** Publish options, mirroring the hub's `publish` options (targeting, self-echo suppression). */
4114
- export declare type PublishEventOptions = NonNullable<Parameters<PluginEventHub["publish"]>[1]>;
4691
+ declare interface PublishPageResponse {
4692
+ type: "publish_page_response";
4693
+ success: boolean;
4694
+ publicUrl?: string;
4695
+ deploymentId?: string;
4696
+ error?: string;
4697
+ errorCode?: string;
4698
+ }
4115
4699
 
4116
4700
  /**
4117
4701
  * Remove every previously-refused exchange from a working history: for each
@@ -4125,6 +4709,75 @@ export declare function quarantineRefusedExchanges(messages: Message[]): {
4125
4709
  droppedExchanges: number;
4126
4710
  };
4127
4711
 
4712
+ declare type QuestionRequestEvent = z.infer<typeof QuestionRequestEventSchema>;
4713
+
4714
+ declare const QuestionRequestEventSchema: z.ZodObject<{
4715
+ type: z.ZodLiteral<"question_request">;
4716
+ requestId: z.ZodString;
4717
+ questions: z.ZodArray<z.ZodObject<{
4718
+ id: z.ZodString;
4719
+ question: z.ZodString;
4720
+ description: z.ZodOptional<z.ZodString>;
4721
+ options: z.ZodArray<z.ZodObject<{
4722
+ id: z.ZodString;
4723
+ label: z.ZodString;
4724
+ description: z.ZodOptional<z.ZodString>;
4725
+ }, z.core.$strip>>;
4726
+ freeTextPlaceholder: z.ZodOptional<z.ZodString>;
4727
+ }, z.core.$strip>>;
4728
+ question: z.ZodString;
4729
+ description: z.ZodOptional<z.ZodString>;
4730
+ options: z.ZodArray<z.ZodObject<{
4731
+ id: z.ZodString;
4732
+ label: z.ZodString;
4733
+ description: z.ZodOptional<z.ZodString>;
4734
+ }, z.core.$strip>>;
4735
+ freeTextPlaceholder: z.ZodOptional<z.ZodString>;
4736
+ conversationId: z.ZodOptional<z.ZodString>;
4737
+ toolUseId: z.ZodOptional<z.ZodString>;
4738
+ }, z.core.$strip>;
4739
+
4740
+ declare type RecordingPauseEvent = z.infer<typeof RecordingPauseEventSchema>;
4741
+
4742
+ declare const RecordingPauseEventSchema: z.ZodObject<{
4743
+ type: z.ZodLiteral<"recording_pause">;
4744
+ recordingId: z.ZodString;
4745
+ }, z.core.$strip>;
4746
+
4747
+ declare type RecordingResumeEvent = z.infer<typeof RecordingResumeEventSchema>;
4748
+
4749
+ declare const RecordingResumeEventSchema: z.ZodObject<{
4750
+ type: z.ZodLiteral<"recording_resume">;
4751
+ recordingId: z.ZodString;
4752
+ }, z.core.$strip>;
4753
+
4754
+ declare type RecordingStartEvent = z.infer<typeof RecordingStartEventSchema>;
4755
+
4756
+ declare const RecordingStartEventSchema: z.ZodObject<{
4757
+ type: z.ZodLiteral<"recording_start">;
4758
+ recordingId: z.ZodString;
4759
+ attachToConversationId: z.ZodOptional<z.ZodString>;
4760
+ options: z.ZodOptional<z.ZodObject<{
4761
+ captureScope: z.ZodOptional<z.ZodEnum<{
4762
+ display: "display";
4763
+ window: "window";
4764
+ }>>;
4765
+ displayId: z.ZodOptional<z.ZodString>;
4766
+ windowId: z.ZodOptional<z.ZodNumber>;
4767
+ includeAudio: z.ZodOptional<z.ZodBoolean>;
4768
+ includeMicrophone: z.ZodOptional<z.ZodBoolean>;
4769
+ promptForSource: z.ZodOptional<z.ZodBoolean>;
4770
+ }, z.core.$strip>>;
4771
+ operationToken: z.ZodOptional<z.ZodString>;
4772
+ }, z.core.$strip>;
4773
+
4774
+ declare type RecordingStopEvent = z.infer<typeof RecordingStopEventSchema>;
4775
+
4776
+ declare const RecordingStopEventSchema: z.ZodObject<{
4777
+ type: z.ZodLiteral<"recording_stop">;
4778
+ recordingId: z.ZodString;
4779
+ }, z.core.$strip>;
4780
+
4128
4781
  export declare interface RedactedThinkingContent {
4129
4782
  type: "redacted_thinking";
4130
4783
  data: string;
@@ -4143,6 +4796,13 @@ export declare interface RedactedThinkingContent {
4143
4796
  */
4144
4797
  export declare const REFUSAL_FALLBACK_TEXT = "Sorry \u2014 I wasn't able to generate a response to that. Please try rephrasing or asking in a different way.";
4145
4798
 
4799
+ declare type RelationshipStateUpdatedEvent = z.infer<typeof RelationshipStateUpdatedEventSchema>;
4800
+
4801
+ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
4802
+ type: z.ZodLiteral<"relationship_state_updated">;
4803
+ updatedAt: z.ZodString;
4804
+ }, z.core.$strip>;
4805
+
4146
4806
  declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
4147
4807
 
4148
4808
  /**
@@ -4382,6 +5042,17 @@ export declare interface RunConversationTurnResult {
4382
5042
  queued?: boolean;
4383
5043
  }
4384
5044
 
5045
+ declare type ScheduleConversationCreatedEvent = z.infer<typeof ScheduleConversationCreatedEventSchema>;
5046
+
5047
+ declare const ScheduleConversationCreatedEventSchema: z.ZodObject<{
5048
+ type: z.ZodLiteral<"schedule_conversation_created">;
5049
+ conversationId: z.ZodString;
5050
+ scheduleJobId: z.ZodString;
5051
+ title: z.ZodString;
5052
+ }, z.core.$strip>;
5053
+
5054
+ declare type _SchedulesServerMessages = HeartbeatAlertEvent | HeartbeatConversationCreatedEvent;
5055
+
4385
5056
  /** Sparse lexical search over stored message text; ranked message-id hits. */
4386
5057
  export declare function searchMessageIdsLexical(query: string, limit: number, opts?: {
4387
5058
  conversationId?: string;
@@ -4446,6 +5117,23 @@ declare interface SecretPromptResult {
4446
5117
  collectionExpiresAt?: number;
4447
5118
  }
4448
5119
 
5120
+ declare type SecretRequestEvent = z.infer<typeof SecretRequestEventSchema>;
5121
+
5122
+ declare const SecretRequestEventSchema: z.ZodObject<{
5123
+ type: z.ZodLiteral<"secret_request">;
5124
+ requestId: z.ZodString;
5125
+ service: z.ZodString;
5126
+ field: z.ZodString;
5127
+ label: z.ZodString;
5128
+ description: z.ZodOptional<z.ZodString>;
5129
+ placeholder: z.ZodOptional<z.ZodString>;
5130
+ conversationId: z.ZodOptional<z.ZodString>;
5131
+ purpose: z.ZodOptional<z.ZodString>;
5132
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
5133
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
5134
+ allowOneTimeSend: z.ZodOptional<z.ZodBoolean>;
5135
+ }, z.core.$strip>;
5136
+
4449
5137
  /** Whether the active embedding backend handles multimodal inputs. */
4450
5138
  export declare function selectedBackendSupportsMultimodal(): Promise<boolean>;
4451
5139
 
@@ -4567,6 +5255,8 @@ declare interface SensitiveOutputBinding {
4567
5255
 
4568
5256
  declare type SensitiveOutputKind = "invite_code";
4569
5257
 
5258
+ declare type ServerMessage = _ConversationsServerMessages | _MessagesServerMessages | _SurfacesServerMessages | _SkillsServerMessages | _AppsServerMessages | _IntegrationsServerMessages | _ComputerUseServerMessages | _ContactsServerMessages | _SubagentsServerMessages | _DocumentsServerMessages | _DocumentCommentsServerMessages | _SyncInvalidationServerMessages | _HomeServerMessages | _HostAppControlServerMessages | _HostBashServerMessages | _HostBrowserServerMessages | _HostCuServerMessages | _HostFileServerMessages | _HostTransferServerMessages | _HostUiSnapshotServerMessages | _MemoryServerMessages | _WorkspaceServerMessages | _SchedulesServerMessages | _SettingsServerMessages | _NotificationsServerMessages | _UpgradesServerMessages | _AcpServerMessages | _BackgroundToolsServerMessages | _BookmarksServerMessages | _WorkflowsServerMessages | DiskPressureStatusChangedEvent | HookEvent | SubagentEvent;
5259
+
4570
5260
  export declare interface ServerToolUseContent {
4571
5261
  type: "server_tool_use";
4572
5262
  id: string;
@@ -4574,6 +5264,68 @@ export declare interface ServerToolUseContent {
4574
5264
  input: Record<string, unknown>;
4575
5265
  }
4576
5266
 
5267
+ declare type ServiceGroupUpdateCompleteEvent = z.infer<typeof ServiceGroupUpdateCompleteEventSchema>;
5268
+
5269
+ declare const ServiceGroupUpdateCompleteEventSchema: z.ZodObject<{
5270
+ type: z.ZodLiteral<"service_group_update_complete">;
5271
+ installedVersion: z.ZodString;
5272
+ success: z.ZodBoolean;
5273
+ rolledBackToVersion: z.ZodOptional<z.ZodString>;
5274
+ }, z.core.$strip>;
5275
+
5276
+ declare type ServiceGroupUpdateProgressEvent = z.infer<typeof ServiceGroupUpdateProgressEventSchema>;
5277
+
5278
+ declare const ServiceGroupUpdateProgressEventSchema: z.ZodObject<{
5279
+ type: z.ZodLiteral<"service_group_update_progress">;
5280
+ statusMessage: z.ZodString;
5281
+ }, z.core.$strip>;
5282
+
5283
+ declare type ServiceGroupUpdateStartingEvent = z.infer<typeof ServiceGroupUpdateStartingEventSchema>;
5284
+
5285
+ declare const ServiceGroupUpdateStartingEventSchema: z.ZodObject<{
5286
+ type: z.ZodLiteral<"service_group_update_starting">;
5287
+ targetVersion: z.ZodString;
5288
+ expectedDowntimeSeconds: z.ZodNumber;
5289
+ }, z.core.$strip>;
5290
+
5291
+ declare type _SettingsServerMessages = ClientSettingsUpdateEvent | AvatarUpdatedEvent | ConfigChangedEvent | SoundsConfigUpdatedEvent;
5292
+
5293
+ declare interface ShareAppCloudResponse {
5294
+ type: "share_app_cloud_response";
5295
+ success: boolean;
5296
+ shareToken?: string;
5297
+ shareUrl?: string;
5298
+ error?: string;
5299
+ }
5300
+
5301
+ declare interface SharedAppDeleteResponse {
5302
+ type: "shared_app_delete_response";
5303
+ success: boolean;
5304
+ }
5305
+
5306
+ declare interface SharedAppsListResponse {
5307
+ type: "shared_apps_list_response";
5308
+ apps: Array<{
5309
+ uuid: string;
5310
+ name: string;
5311
+ description?: string;
5312
+ icon?: string;
5313
+ preview?: string;
5314
+ entry: string;
5315
+ trustTier: string;
5316
+ signerDisplayName?: string;
5317
+ bundleSizeBytes: number;
5318
+ installedAt: string;
5319
+ version?: string;
5320
+ contentId?: string;
5321
+ updateAvailable?: boolean;
5322
+ }>;
5323
+ }
5324
+
5325
+ declare interface ShowPlatformLogin {
5326
+ type: "show_platform_login";
5327
+ }
5328
+
4577
5329
  /**
4578
5330
  * Context passed to the `shutdown` hook. Kept intentionally narrower than
4579
5331
  * {@link InitContext} — teardown paths only need to know which assistant
@@ -4615,6 +5367,12 @@ export declare interface ShutdownContext {
4615
5367
  */
4616
5368
  declare type ShutdownReason = "shutdown" | "uninstall" | "disable" | "reload";
4617
5369
 
5370
+ declare interface SignBundlePayloadRequest {
5371
+ type: "sign_bundle_payload";
5372
+ requestId: string;
5373
+ payload: string;
5374
+ }
5375
+
4618
5376
  declare interface SkillInstallMeta {
4619
5377
  origin: "vellum" | "clawhub" | "skillssh" | "custom";
4620
5378
  installedAt: string;
@@ -4644,6 +5402,34 @@ declare interface SkillInstallMeta {
4644
5402
  */
4645
5403
  declare type SkillSource = "bundled" | "managed" | "workspace" | "extra" | "plugin";
4646
5404
 
5405
+ declare type _SkillsServerMessages = SkillStateChangedEvent;
5406
+
5407
+ declare type SkillStateChangedEvent = z.infer<typeof SkillStateChangedEventSchema>;
5408
+
5409
+ declare const SkillStateChangedEventSchema: z.ZodObject<{
5410
+ type: z.ZodLiteral<"skills_state_changed">;
5411
+ name: z.ZodString;
5412
+ state: z.ZodEnum<{
5413
+ enabled: "enabled";
5414
+ disabled: "disabled";
5415
+ installed: "installed";
5416
+ uninstalled: "uninstalled";
5417
+ }>;
5418
+ }, z.core.$strip>;
5419
+
5420
+ declare interface SlackWebhookConfigResponse {
5421
+ type: "slack_webhook_config_response";
5422
+ webhookUrl?: string;
5423
+ success: boolean;
5424
+ error?: string;
5425
+ }
5426
+
5427
+ declare type SoundsConfigUpdatedEvent = z.infer<typeof SoundsConfigUpdatedEventSchema>;
5428
+
5429
+ declare const SoundsConfigUpdatedEventSchema: z.ZodObject<{
5430
+ type: z.ZodLiteral<"sounds_config_updated">;
5431
+ }, z.core.$strip>;
5432
+
4647
5433
  /**
4648
5434
  * The full `stop` context a hook receives — the dispatching call site's
4649
5435
  * {@link StopInputContext} plus the pipeline-stamped {@link BaseHookContext}
@@ -4875,6 +5661,64 @@ export declare interface SttStreamServerPartialEvent {
4875
5661
  readonly confidence?: number;
4876
5662
  }
4877
5663
 
5664
+ declare interface SubagentDetailResponse {
5665
+ type: "subagent_detail_response";
5666
+ subagentId: string;
5667
+ objective?: string;
5668
+ usage?: UsageStats;
5669
+ events: Array<{
5670
+ type: string;
5671
+ content: string;
5672
+ toolName?: string;
5673
+ isError?: boolean;
5674
+ messageId?: string;
5675
+ }>;
5676
+ }
5677
+
5678
+ /** Wraps any ServerMessage emitted by a subagent conversation for routing to the client. */
5679
+ declare interface SubagentEvent {
5680
+ type: "subagent_event";
5681
+ subagentId: string;
5682
+ conversationId: string;
5683
+ event: ServerMessage;
5684
+ }
5685
+
5686
+ declare type SubagentSpawnedEvent = z.infer<typeof SubagentSpawnedEventSchema>;
5687
+
5688
+ declare const SubagentSpawnedEventSchema: z.ZodObject<{
5689
+ type: z.ZodLiteral<"subagent_spawned">;
5690
+ subagentId: z.ZodString;
5691
+ parentConversationId: z.ZodString;
5692
+ label: z.ZodString;
5693
+ objective: z.ZodString;
5694
+ isFork: z.ZodOptional<z.ZodBoolean>;
5695
+ parentToolUseId: z.ZodOptional<z.ZodString>;
5696
+ }, z.core.$strict>;
5697
+
5698
+ declare type _SubagentsServerMessages = SubagentSpawnedEvent | SubagentStatusChangedEvent | SubagentDetailResponse;
5699
+
5700
+ declare type SubagentStatusChangedEvent = z.infer<typeof SubagentStatusChangedEventSchema>;
5701
+
5702
+ declare const SubagentStatusChangedEventSchema: z.ZodObject<{
5703
+ type: z.ZodLiteral<"subagent_status_changed">;
5704
+ subagentId: z.ZodString;
5705
+ status: z.ZodEnum<{
5706
+ completed: "completed";
5707
+ failed: "failed";
5708
+ running: "running";
5709
+ aborted: "aborted";
5710
+ pending: "pending";
5711
+ awaiting_input: "awaiting_input";
5712
+ interrupted: "interrupted";
5713
+ }>;
5714
+ error: z.ZodOptional<z.ZodString>;
5715
+ usage: z.ZodOptional<z.ZodObject<{
5716
+ inputTokens: z.ZodNumber;
5717
+ outputTokens: z.ZodNumber;
5718
+ estimatedCost: z.ZodNumber;
5719
+ }, z.core.$strict>>;
5720
+ }, z.core.$strict>;
5721
+
4878
5722
  declare type SubscriberEntry = ClientEntry | ProcessEntry;
4879
5723
 
4880
5724
  /** Input shape for `subscribe()` — hub fills `active`, `connectedAt`, `lastActiveAt`, `connectionId` and defaults `filter`/`onEvict`. */
@@ -4883,6 +5727,71 @@ declare type SubscriberInput = DistributiveOmit<SubscriberEntry, "active" | "con
4883
5727
  onEvict?: () => void;
4884
5728
  };
4885
5729
 
5730
+ declare interface SurfaceAction {
5731
+ id: string;
5732
+ label: string;
5733
+ style?: "primary" | "secondary" | "destructive";
5734
+ /** Optional data payload returned to the daemon when this action is clicked. */
5735
+ data?: Record<string, unknown>;
5736
+ }
5737
+
5738
+ /**
5739
+ * Per-type `data` payload shapes, keyed by surface type. This is the
5740
+ * correlation source for everything that pairs a `surfaceType` with its
5741
+ * `data`: generic code indexes it (`SurfaceDataByType[K]`) so the compiler
5742
+ * tracks which data shape belongs to which type instead of collapsing to
5743
+ * the undiscriminated `SurfaceData` union.
5744
+ *
5745
+ * Several types are opaque records — they carry data the daemon persists
5746
+ * and serves verbatim but whose shape it does not model, which is why they
5747
+ * are absent from the renderable `SurfaceData` union: `channel_setup` (a
5748
+ * side-effect command forwarded to the setup panel), `task_preferences` (a
5749
+ * fixed grid that reads no data), and `skill_card` / `call_summary` (cards
5750
+ * the daemon appends to history directly — the memory retrospective and a
5751
+ * call summary — and whose data shape is owned by their client renderers).
5752
+ */
5753
+ declare interface SurfaceDataByType {
5754
+ card: CardSurfaceData;
5755
+ channel_setup: Record<string, unknown>;
5756
+ choice: ChoiceSurfaceData;
5757
+ copy_block: CopyBlockSurfaceData;
5758
+ oauth_connect: OAuthConnectSurfaceData;
5759
+ form: FormSurfaceData;
5760
+ list: ListSurfaceData;
5761
+ table: TableSurfaceData;
5762
+ confirmation: ConfirmationSurfaceData;
5763
+ dynamic_page: DynamicPageSurfaceData;
5764
+ file_upload: FileUploadSurfaceData;
5765
+ document_preview: DocumentPreviewSurfaceData;
5766
+ task_preferences: Record<string, unknown>;
5767
+ work_result: WorkResultSurfaceData;
5768
+ skill_card: Record<string, unknown>;
5769
+ call_summary: Record<string, unknown>;
5770
+ }
5771
+
5772
+ declare type _SurfacesServerMessages = UiSurfaceShow | UiSurfaceUpdate | UiSurfaceDismiss | UiSurfaceComplete | UiSurfaceUndoResult;
5773
+
5774
+ declare type SurfaceType = z.infer<typeof SurfaceTypeSchema>;
5775
+
5776
+ declare const SurfaceTypeSchema: z.ZodEnum<{
5777
+ table: "table";
5778
+ card: "card";
5779
+ channel_setup: "channel_setup";
5780
+ choice: "choice";
5781
+ copy_block: "copy_block";
5782
+ oauth_connect: "oauth_connect";
5783
+ form: "form";
5784
+ list: "list";
5785
+ confirmation: "confirmation";
5786
+ dynamic_page: "dynamic_page";
5787
+ file_upload: "file_upload";
5788
+ document_preview: "document_preview";
5789
+ task_preferences: "task_preferences";
5790
+ work_result: "work_result";
5791
+ skill_card: "skill_card";
5792
+ call_summary: "call_summary";
5793
+ }>;
5794
+
4886
5795
  /**
4887
5796
  * Delete `graph_node` Qdrant points whose backing `memory_graph_nodes` row no
4888
5797
  * longer exists.
@@ -4911,6 +5820,16 @@ declare type SubscriberInput = DistributiveOmit<SubscriberEntry, "active" | "con
4911
5820
  */
4912
5821
  export declare function sweepOrphanedGraphNodePoints(qdrant: GraphNodeSweepClient): Promise<GraphNodeSweepResult>;
4913
5822
 
5823
+ declare type SyncChangedEvent = z.infer<typeof SyncChangedEventSchema>;
5824
+
5825
+ declare const SyncChangedEventSchema: z.ZodObject<{
5826
+ type: z.ZodLiteral<"sync_changed">;
5827
+ tags: z.ZodArray<z.ZodString>;
5828
+ originClientId: z.ZodOptional<z.ZodString>;
5829
+ }, z.core.$strip>;
5830
+
5831
+ declare type _SyncInvalidationServerMessages = SyncChangedEvent;
5832
+
4914
5833
  /** Re-sync one persisted message into the conversation's disk view. */
4915
5834
  export declare function syncMessageToDisk(conversationId: string, messageId: string, createdAtMs: number): Promise<void>;
4916
5835
 
@@ -4937,6 +5856,48 @@ export declare interface SynthesizeTextOptions {
4937
5856
  signal?: AbortSignal;
4938
5857
  }
4939
5858
 
5859
+ declare type TableSurfaceData = z.infer<typeof TableSurfaceDataSchema>;
5860
+
5861
+ declare const TableSurfaceDataSchema: z.ZodObject<{
5862
+ columns: z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
5863
+ id: z.ZodCatch<z.ZodString>;
5864
+ label: z.ZodCatch<z.ZodString>;
5865
+ width: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
5866
+ }, z.core.$strip>>>;
5867
+ rows: z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
5868
+ id: z.ZodCatch<z.ZodString>;
5869
+ cells: z.ZodCatch<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
5870
+ text: z.ZodCatch<z.ZodCoercedString<unknown>>;
5871
+ icon: z.ZodCatch<z.ZodOptional<z.ZodString>>;
5872
+ iconColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
5873
+ }, z.core.$strip>]>>>>;
5874
+ selectable: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
5875
+ selected: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
5876
+ }, z.core.$strip>>>;
5877
+ selectionMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
5878
+ none: "none";
5879
+ single: "single";
5880
+ multiple: "multiple";
5881
+ }>>>;
5882
+ caption: z.ZodCatch<z.ZodOptional<z.ZodString>>;
5883
+ }, z.core.$strip>;
5884
+
5885
+ declare interface TelegramConfigResponse {
5886
+ type: "telegram_config_response";
5887
+ success: boolean;
5888
+ hasBotToken: boolean;
5889
+ botId?: string;
5890
+ botUsername?: string;
5891
+ connected: boolean;
5892
+ hasWebhookSecret: boolean;
5893
+ lastError?: string;
5894
+ error?: string;
5895
+ /** Names of bot commands that were registered (present after set_commands or setup). */
5896
+ commandsRegistered?: string[];
5897
+ /** Non-fatal warning (e.g. commands registration failed during setup but token was configured). */
5898
+ warning?: string;
5899
+ }
5900
+
4940
5901
  export declare interface TextContent {
4941
5902
  type: "text";
4942
5903
  text: string;
@@ -4994,15 +5955,6 @@ export declare interface ToolContext {
4994
5955
  assistantId?: string;
4995
5956
  /** True when an interactive client is connected (not just a no-op callback). */
4996
5957
  isInteractive?: boolean;
4997
- /**
4998
- * Whether the current turn's channel can render dynamic UI surfaces
4999
- * (interactive cards, tappable option pickers, secure prompts). `false` on
5000
- * text-only channels (e.g. Telegram, SMS). UI-dependent tools read this to
5001
- * degrade to a text-formatted equivalent instead of emitting a surface the
5002
- * channel silently drops. `undefined` means unknown and is treated as
5003
- * supported (desktop/web/app clients).
5004
- */
5005
- supportsDynamicUi?: boolean;
5006
5958
  /**
5007
5959
  * When set, the tool execution is part of a task run. Used to retrieve ephemeral permission rules.
5008
5960
  * @legacy
@@ -5384,6 +6336,85 @@ export declare interface ToolExecutionResult {
5384
6336
  activityMetadata?: ToolActivityMetadata;
5385
6337
  }
5386
6338
 
6339
+ declare type ToolInputDeltaEvent = z.infer<typeof ToolInputDeltaEventSchema>;
6340
+
6341
+ declare const ToolInputDeltaEventSchema: z.ZodObject<{
6342
+ type: z.ZodLiteral<"tool_input_delta">;
6343
+ toolName: z.ZodString;
6344
+ content: z.ZodString;
6345
+ conversationId: z.ZodOptional<z.ZodString>;
6346
+ toolUseId: z.ZodOptional<z.ZodString>;
6347
+ messageId: z.ZodOptional<z.ZodString>;
6348
+ }, z.core.$strip>;
6349
+
6350
+ declare interface ToolInputSchema {
6351
+ type: "object";
6352
+ properties?: Record<string, {
6353
+ type?: string;
6354
+ description?: string;
6355
+ enum?: string[];
6356
+ [key: string]: unknown;
6357
+ }>;
6358
+ required?: string[];
6359
+ }
6360
+
6361
+ declare interface ToolNamesListResponse {
6362
+ type: "tool_names_list_response";
6363
+ /** Sorted list of all registered tool names. */
6364
+ names: string[];
6365
+ /** Input schemas keyed by tool name. */
6366
+ schemas?: Record<string, ToolInputSchema>;
6367
+ }
6368
+
6369
+ declare type ToolOutputChunkEvent = z.infer<typeof ToolOutputChunkEventSchema>;
6370
+
6371
+ declare const ToolOutputChunkEventSchema: z.ZodObject<{
6372
+ type: z.ZodLiteral<"tool_output_chunk">;
6373
+ chunk: z.ZodString;
6374
+ conversationId: z.ZodOptional<z.ZodString>;
6375
+ toolUseId: z.ZodOptional<z.ZodString>;
6376
+ subType: z.ZodOptional<z.ZodEnum<{
6377
+ status: "status";
6378
+ tool_start: "tool_start";
6379
+ tool_complete: "tool_complete";
6380
+ }>>;
6381
+ subToolName: z.ZodOptional<z.ZodString>;
6382
+ subToolInput: z.ZodOptional<z.ZodString>;
6383
+ subToolIsError: z.ZodOptional<z.ZodBoolean>;
6384
+ subToolId: z.ZodOptional<z.ZodString>;
6385
+ messageId: z.ZodOptional<z.ZodString>;
6386
+ }, z.core.$strip>;
6387
+
6388
+ declare interface ToolPermissionSimulateResponse {
6389
+ type: "tool_permission_simulate_response";
6390
+ success: boolean;
6391
+ /** The simulated permission decision. */
6392
+ decision?: "allow" | "deny" | "prompt";
6393
+ /** Risk level of the simulated tool invocation. */
6394
+ riskLevel?: string;
6395
+ /** Human-readable reason for the decision. */
6396
+ reason?: string;
6397
+ /** When decision is 'prompt', the data needed to render a ToolConfirmationBubble. */
6398
+ promptPayload?: {
6399
+ allowlistOptions: Array<{
6400
+ label: string;
6401
+ description: string;
6402
+ pattern: string;
6403
+ }>;
6404
+ scopeOptions: Array<{
6405
+ label: string;
6406
+ scope: string;
6407
+ }>;
6408
+ persistentDecisionsAllowed: boolean;
6409
+ };
6410
+ /** Resolved execution target for the tool. */
6411
+ executionTarget?: "host" | "sandbox";
6412
+ /** ID of the trust rule that matched (if any). */
6413
+ matchedTrustRuleId?: string;
6414
+ /** Error message when success is false. */
6415
+ error?: string;
6416
+ }
6417
+
5387
6418
  export declare interface ToolResultContent {
5388
6419
  type: "tool_result";
5389
6420
  tool_use_id: string;
@@ -5393,6 +6424,94 @@ export declare interface ToolResultContent {
5393
6424
  contentBlocks?: ContentBlock[];
5394
6425
  }
5395
6426
 
6427
+ declare type ToolResultEvent = z.infer<typeof ToolResultEventSchema>;
6428
+
6429
+ declare const ToolResultEventSchema: z.ZodObject<{
6430
+ type: z.ZodLiteral<"tool_result">;
6431
+ toolName: z.ZodString;
6432
+ result: z.ZodString;
6433
+ isError: z.ZodOptional<z.ZodBoolean>;
6434
+ diff: z.ZodOptional<z.ZodObject<{
6435
+ filePath: z.ZodString;
6436
+ oldContent: z.ZodString;
6437
+ newContent: z.ZodString;
6438
+ isNewFile: z.ZodBoolean;
6439
+ }, z.core.$strip>>;
6440
+ status: z.ZodOptional<z.ZodString>;
6441
+ conversationId: z.ZodOptional<z.ZodString>;
6442
+ imageData: z.ZodOptional<z.ZodString>;
6443
+ imageDataList: z.ZodOptional<z.ZodArray<z.ZodString>>;
6444
+ toolUseId: z.ZodOptional<z.ZodString>;
6445
+ messageId: z.ZodOptional<z.ZodString>;
6446
+ riskLevel: z.ZodOptional<z.ZodString>;
6447
+ riskReason: z.ZodOptional<z.ZodString>;
6448
+ matchedTrustRuleId: z.ZodOptional<z.ZodString>;
6449
+ isContainerized: z.ZodOptional<z.ZodBoolean>;
6450
+ riskScopeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
6451
+ pattern: z.ZodString;
6452
+ label: z.ZodString;
6453
+ }, z.core.$strip>>>;
6454
+ riskAllowlistOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
6455
+ label: z.ZodString;
6456
+ description: z.ZodString;
6457
+ pattern: z.ZodString;
6458
+ }, z.core.$strip>>>;
6459
+ riskDirectoryScopeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
6460
+ label: z.ZodString;
6461
+ scope: z.ZodString;
6462
+ }, z.core.$strip>>>;
6463
+ approvalMode: z.ZodOptional<z.ZodString>;
6464
+ approvalReason: z.ZodOptional<z.ZodString>;
6465
+ riskThreshold: z.ZodOptional<z.ZodString>;
6466
+ activityMetadata: z.ZodOptional<z.ZodObject<{
6467
+ webSearch: z.ZodOptional<z.ZodObject<{
6468
+ query: z.ZodString;
6469
+ provider: z.ZodEnum<{
6470
+ "anthropic-native": "anthropic-native";
6471
+ brave: "brave";
6472
+ perplexity: "perplexity";
6473
+ tavily: "tavily";
6474
+ firecrawl: "firecrawl";
6475
+ }>;
6476
+ resultCount: z.ZodNumber;
6477
+ durationMs: z.ZodNumber;
6478
+ results: z.ZodArray<z.ZodObject<{
6479
+ rank: z.ZodNumber;
6480
+ title: z.ZodString;
6481
+ url: z.ZodString;
6482
+ domain: z.ZodString;
6483
+ faviconUrl: z.ZodOptional<z.ZodString>;
6484
+ snippet: z.ZodOptional<z.ZodString>;
6485
+ age: z.ZodOptional<z.ZodString>;
6486
+ score: z.ZodOptional<z.ZodNumber>;
6487
+ }, z.core.$strip>>;
6488
+ errorMessage: z.ZodOptional<z.ZodString>;
6489
+ }, z.core.$strip>>;
6490
+ webFetch: z.ZodOptional<z.ZodObject<{
6491
+ url: z.ZodString;
6492
+ finalUrl: z.ZodString;
6493
+ provider: z.ZodOptional<z.ZodEnum<{
6494
+ default: "default";
6495
+ firecrawl: "firecrawl";
6496
+ }>>;
6497
+ status: z.ZodNumber;
6498
+ contentType: z.ZodOptional<z.ZodString>;
6499
+ byteCount: z.ZodNumber;
6500
+ charCount: z.ZodNumber;
6501
+ truncated: z.ZodBoolean;
6502
+ title: z.ZodOptional<z.ZodString>;
6503
+ domain: z.ZodString;
6504
+ faviconUrl: z.ZodOptional<z.ZodString>;
6505
+ redirectCount: z.ZodNumber;
6506
+ durationMs: z.ZodNumber;
6507
+ errorMessage: z.ZodOptional<z.ZodString>;
6508
+ mayRequireJavaScript: z.ZodOptional<z.ZodBoolean>;
6509
+ }, z.core.$strip>>;
6510
+ }, z.core.$strip>>;
6511
+ errorCode: z.ZodOptional<z.ZodString>;
6512
+ completedAt: z.ZodOptional<z.ZodNumber>;
6513
+ }, z.core.$strip>;
6514
+
5396
6515
  export declare interface ToolUseContent {
5397
6516
  type: "tool_use";
5398
6517
  id: string;
@@ -5405,6 +6524,30 @@ export declare interface ToolUseContent {
5405
6524
  };
5406
6525
  }
5407
6526
 
6527
+ declare type ToolUsePreviewStartEvent = z.infer<typeof ToolUsePreviewStartEventSchema>;
6528
+
6529
+ declare const ToolUsePreviewStartEventSchema: z.ZodObject<{
6530
+ type: z.ZodLiteral<"tool_use_preview_start">;
6531
+ toolUseId: z.ZodString;
6532
+ toolName: z.ZodString;
6533
+ conversationId: z.ZodOptional<z.ZodString>;
6534
+ messageId: z.ZodOptional<z.ZodString>;
6535
+ previewStartedAt: z.ZodOptional<z.ZodNumber>;
6536
+ }, z.core.$strip>;
6537
+
6538
+ declare type ToolUseStartEvent = z.infer<typeof ToolUseStartEventSchema>;
6539
+
6540
+ declare const ToolUseStartEventSchema: z.ZodObject<{
6541
+ type: z.ZodLiteral<"tool_use_start">;
6542
+ toolName: z.ZodString;
6543
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
6544
+ toolUseId: z.ZodOptional<z.ZodString>;
6545
+ messageId: z.ZodOptional<z.ZodString>;
6546
+ conversationId: z.ZodOptional<z.ZodString>;
6547
+ startedAt: z.ZodOptional<z.ZodNumber>;
6548
+ previewStartedAt: z.ZodOptional<z.ZodNumber>;
6549
+ }, z.core.$strip>;
6550
+
5408
6551
  declare type TrustClass = z.infer<typeof trustClassSchema>;
5409
6552
 
5410
6553
  declare const trustClassSchema: z.ZodEnum<{
@@ -5439,9 +6582,89 @@ declare type TtsUseCase =
5439
6582
  /** In-app message playback — buffer-oriented, higher quality acceptable. */
5440
6583
  | "message-playback";
5441
6584
 
6585
+ declare interface UiSurfaceComplete {
6586
+ type: "ui_surface_complete";
6587
+ conversationId: string;
6588
+ surfaceId: string;
6589
+ summary: string;
6590
+ submittedData?: Record<string, unknown>;
6591
+ }
6592
+
6593
+ declare interface UiSurfaceDismiss {
6594
+ type: "ui_surface_dismiss";
6595
+ conversationId: string;
6596
+ surfaceId: string;
6597
+ }
6598
+
6599
+ /**
6600
+ * Discriminated union over every surface type, derived from
6601
+ * `SurfaceDataByType` so a type added there appears here automatically.
6602
+ * Includes the opaque types (`channel_setup`, `task_preferences`) — their
6603
+ * show events carry opaque record data.
6604
+ */
6605
+ declare type UiSurfaceShow = {
6606
+ [K in SurfaceType]: UiSurfaceShowFor<K>;
6607
+ }[SurfaceType];
6608
+
6609
+ /** Common fields shared by all UiSurfaceShow variants. */
6610
+ declare interface UiSurfaceShowBase {
6611
+ type: "ui_surface_show";
6612
+ conversationId: string;
6613
+ surfaceId: string;
6614
+ title?: string;
6615
+ actions?: SurfaceAction[];
6616
+ display?: "inline" | "panel";
6617
+ /** The message ID that this surface belongs to (for history loading). */
6618
+ messageId?: string;
6619
+ /** When `true`, clicking an action does not dismiss the surface — the client keeps the card visible and only marks the clicked `actionId` as spent so siblings remain clickable. */
6620
+ persistent?: boolean;
6621
+ /** Id of the tool call that produced this surface (the `ui_show` proxy tool). Lets the client gate app previews on the tool result's arrival rather than whole-turn streaming state. */
6622
+ toolCallId?: string;
6623
+ }
6624
+
6625
+ /**
6626
+ * The show event for one specific surface type: base fields plus the
6627
+ * correlated `surfaceType`/`data` pair, both indexed from
6628
+ * `SurfaceDataByType` so generic code keeps the pairing.
6629
+ */
6630
+ declare type UiSurfaceShowFor<K extends SurfaceType> = UiSurfaceShowBase & {
6631
+ surfaceType: K;
6632
+ data: SurfaceDataByType[K];
6633
+ };
6634
+
6635
+ declare interface UiSurfaceUndoResult {
6636
+ type: "ui_surface_undo_result";
6637
+ conversationId: string;
6638
+ surfaceId: string;
6639
+ success: boolean;
6640
+ /** Number of remaining undo entries after this undo. */
6641
+ remainingUndos: number;
6642
+ }
6643
+
6644
+ declare interface UiSurfaceUpdate {
6645
+ type: "ui_surface_update";
6646
+ conversationId: string;
6647
+ surfaceId: string;
6648
+ data: Partial<AnySurfaceData>;
6649
+ }
6650
+
6651
+ declare interface UndoComplete {
6652
+ type: "undo_complete";
6653
+ removedCount: number;
6654
+ conversationId?: string;
6655
+ }
6656
+
6657
+ declare interface UnpublishPageResponse {
6658
+ type: "unpublish_page_response";
6659
+ success: boolean;
6660
+ error?: string;
6661
+ }
6662
+
5442
6663
  /** Merge the given keys into a message's metadata JSON. */
5443
6664
  export declare function updateMessageMetadata(messageId: string, updates: Record<string, unknown>): Promise<void>;
5444
6665
 
6666
+ declare type _UpgradesServerMessages = ServiceGroupUpdateStartingEvent | ServiceGroupUpdateProgressEvent | ServiceGroupUpdateCompleteEvent;
6667
+
5445
6668
  declare type UsageAttributionProfileSource = "call_site" | "conversation" | "active" | "default" | "unknown";
5446
6669
 
5447
6670
  declare interface UsageAttributionSnapshot {
@@ -5461,6 +6684,77 @@ declare interface UsageAttributionSnapshot {
5461
6684
  resolvedMixArm: string | null;
5462
6685
  }
5463
6686
 
6687
+ declare type UsageProgressEvent = z.infer<typeof UsageProgressEventSchema>;
6688
+
6689
+ declare const UsageProgressEventSchema: z.ZodObject<{
6690
+ type: z.ZodLiteral<"usage_progress">;
6691
+ conversationId: z.ZodString;
6692
+ inputTokens: z.ZodNumber;
6693
+ outputTokens: z.ZodNumber;
6694
+ estimatedCost: z.ZodNumber;
6695
+ model: z.ZodString;
6696
+ }, z.core.$strip>;
6697
+
6698
+ declare interface UsageResponse {
6699
+ type: "usage_response";
6700
+ totalInputTokens: number;
6701
+ totalOutputTokens: number;
6702
+ estimatedCost: number;
6703
+ model: string;
6704
+ }
6705
+
6706
+ declare interface UsageStats {
6707
+ inputTokens: number;
6708
+ outputTokens: number;
6709
+ estimatedCost: number;
6710
+ }
6711
+
6712
+ declare type UsageUpdateEvent = z.infer<typeof UsageUpdateEventSchema>;
6713
+
6714
+ declare const UsageUpdateEventSchema: z.ZodObject<{
6715
+ type: z.ZodLiteral<"usage_update">;
6716
+ conversationId: z.ZodString;
6717
+ inputTokens: z.ZodNumber;
6718
+ outputTokens: z.ZodNumber;
6719
+ cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
6720
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
6721
+ totalInputTokens: z.ZodNumber;
6722
+ totalOutputTokens: z.ZodNumber;
6723
+ estimatedCost: z.ZodNumber;
6724
+ model: z.ZodString;
6725
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
6726
+ contextWindowMaxTokens: z.ZodOptional<z.ZodNumber>;
6727
+ }, z.core.$strip>;
6728
+
6729
+ declare interface UserMessageAttachment {
6730
+ id?: string;
6731
+ filename: string;
6732
+ mimeType: string;
6733
+ data: string;
6734
+ /** Origin of the attachment on the daemon side, when known. */
6735
+ sourceType?: "sandbox_file" | "host_file" | "tool_block";
6736
+ extractedText?: string;
6737
+ /** Original file size in bytes. Present when data was omitted from history_response to reduce payload size. */
6738
+ sizeBytes?: number;
6739
+ /** Base64-encoded JPEG thumbnail. Generated server-side for video attachments. */
6740
+ thumbnailData?: string;
6741
+ /** Absolute path to the local file on disk. Present for file-backed attachments (e.g. recordings). */
6742
+ filePath?: string;
6743
+ /** True when the attachment is file-backed and clients should hydrate via the /content endpoint. */
6744
+ fileBacked?: boolean;
6745
+ }
6746
+
6747
+ declare type UserMessageEchoEvent = z.infer<typeof UserMessageEchoEventSchema>;
6748
+
6749
+ declare const UserMessageEchoEventSchema: z.ZodObject<{
6750
+ type: z.ZodLiteral<"user_message_echo">;
6751
+ text: z.ZodString;
6752
+ conversationId: z.ZodOptional<z.ZodString>;
6753
+ messageId: z.ZodOptional<z.ZodString>;
6754
+ requestId: z.ZodOptional<z.ZodString>;
6755
+ clientMessageId: z.ZodOptional<z.ZodString>;
6756
+ }, z.core.$strict>;
6757
+
5464
6758
  /**
5465
6759
  * The full `user-prompt-submit` context a hook receives — the dispatching
5466
6760
  * call site's {@link UserPromptSubmitInputContext} plus the pipeline-stamped
@@ -5567,6 +6861,13 @@ declare interface UserPromptSubmitInputContext {
5567
6861
  latestMessages: Message[];
5568
6862
  }
5569
6863
 
6864
+ declare interface VercelApiConfigResponse {
6865
+ type: "vercel_api_config_response";
6866
+ hasToken: boolean;
6867
+ success: boolean;
6868
+ error?: string;
6869
+ }
6870
+
5570
6871
  declare interface VideoEmbeddingInput {
5571
6872
  type: "video";
5572
6873
  data: Buffer;
@@ -5625,6 +6926,156 @@ export declare interface WebSearchToolResultContent {
5625
6926
  content: unknown;
5626
6927
  }
5627
6928
 
6929
+ declare type WorkflowCompletedEvent = z.infer<typeof WorkflowCompletedEventSchema>;
6930
+
6931
+ declare const WorkflowCompletedEventSchema: z.ZodObject<{
6932
+ type: z.ZodLiteral<"workflow_completed">;
6933
+ runId: z.ZodString;
6934
+ conversationId: z.ZodOptional<z.ZodString>;
6935
+ status: z.ZodEnum<{
6936
+ completed: "completed";
6937
+ failed: "failed";
6938
+ running: "running";
6939
+ aborted: "aborted";
6940
+ interrupted: "interrupted";
6941
+ cap_exceeded: "cap_exceeded";
6942
+ }>;
6943
+ agentsSpawned: z.ZodNumber;
6944
+ inputTokens: z.ZodNumber;
6945
+ outputTokens: z.ZodNumber;
6946
+ summary: z.ZodOptional<z.ZodString>;
6947
+ }, z.core.$strict>;
6948
+
6949
+ declare type WorkflowLeafFinishedEvent = z.infer<typeof WorkflowLeafFinishedEventSchema>;
6950
+
6951
+ declare const WorkflowLeafFinishedEventSchema: z.ZodObject<{
6952
+ type: z.ZodLiteral<"workflow_leaf_finished">;
6953
+ runId: z.ZodString;
6954
+ conversationId: z.ZodString;
6955
+ seq: z.ZodNumber;
6956
+ status: z.ZodEnum<{
6957
+ completed: "completed";
6958
+ failed: "failed";
6959
+ }>;
6960
+ label: z.ZodOptional<z.ZodString>;
6961
+ inputTokens: z.ZodOptional<z.ZodNumber>;
6962
+ outputTokens: z.ZodOptional<z.ZodNumber>;
6963
+ resultSummary: z.ZodOptional<z.ZodString>;
6964
+ }, z.core.$strict>;
6965
+
6966
+ declare type WorkflowLeafStartedEvent = z.infer<typeof WorkflowLeafStartedEventSchema>;
6967
+
6968
+ declare const WorkflowLeafStartedEventSchema: z.ZodObject<{
6969
+ type: z.ZodLiteral<"workflow_leaf_started">;
6970
+ runId: z.ZodString;
6971
+ conversationId: z.ZodString;
6972
+ seq: z.ZodNumber;
6973
+ label: z.ZodOptional<z.ZodString>;
6974
+ phase: z.ZodOptional<z.ZodString>;
6975
+ promptSummary: z.ZodOptional<z.ZodString>;
6976
+ }, z.core.$strict>;
6977
+
6978
+ declare type WorkflowProgressEvent = z.infer<typeof WorkflowProgressEventSchema>;
6979
+
6980
+ declare const WorkflowProgressEventSchema: z.ZodObject<{
6981
+ type: z.ZodLiteral<"workflow_progress">;
6982
+ runId: z.ZodString;
6983
+ conversationId: z.ZodOptional<z.ZodString>;
6984
+ agentsSpawned: z.ZodNumber;
6985
+ phase: z.ZodOptional<z.ZodString>;
6986
+ label: z.ZodOptional<z.ZodString>;
6987
+ message: z.ZodOptional<z.ZodString>;
6988
+ }, z.core.$strict>;
6989
+
6990
+ declare type _WorkflowsServerMessages = WorkflowProgressEvent | WorkflowCompletedEvent | WorkflowStartedEvent | WorkflowLeafStartedEvent | WorkflowLeafFinishedEvent;
6991
+
6992
+ declare type WorkflowStartedEvent = z.infer<typeof WorkflowStartedEventSchema>;
6993
+
6994
+ declare const WorkflowStartedEventSchema: z.ZodObject<{
6995
+ type: z.ZodLiteral<"workflow_started">;
6996
+ runId: z.ZodString;
6997
+ conversationId: z.ZodString;
6998
+ toolUseId: z.ZodOptional<z.ZodString>;
6999
+ label: z.ZodOptional<z.ZodString>;
7000
+ }, z.core.$strict>;
7001
+
7002
+ declare type WorkResultSurfaceData = z.infer<typeof WorkResultSurfaceDataSchema>;
7003
+
7004
+ declare const WorkResultSurfaceDataSchema: z.ZodObject<{
7005
+ eyebrow: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7006
+ status: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
7007
+ completed: "completed";
7008
+ failed: "failed";
7009
+ partial: "partial";
7010
+ in_progress: "in_progress";
7011
+ }>>>;
7012
+ summary: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7013
+ metrics: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
7014
+ detail: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7015
+ tone: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
7016
+ neutral: "neutral";
7017
+ positive: "positive";
7018
+ warning: "warning";
7019
+ negative: "negative";
7020
+ }>>>;
7021
+ label: z.ZodCatch<z.ZodCoercedString<unknown>>;
7022
+ value: z.ZodCatch<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
7023
+ }, z.core.$strip>>>>>;
7024
+ sections: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
7025
+ id: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7026
+ title: z.ZodCatch<z.ZodCoercedString<unknown>>;
7027
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7028
+ type: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
7029
+ diff: "diff";
7030
+ items: "items";
7031
+ timeline: "timeline";
7032
+ artifacts: "artifacts";
7033
+ warnings: "warnings";
7034
+ }>>>;
7035
+ items: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
7036
+ id: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7037
+ title: z.ZodCatch<z.ZodCoercedString<unknown>>;
7038
+ description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7039
+ status: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7040
+ tone: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
7041
+ neutral: "neutral";
7042
+ positive: "positive";
7043
+ warning: "warning";
7044
+ negative: "negative";
7045
+ }>>>;
7046
+ metadata: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
7047
+ label: z.ZodCatch<z.ZodCoercedString<unknown>>;
7048
+ value: z.ZodCatch<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
7049
+ }, z.core.$strip>>>>>;
7050
+ href: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7051
+ }, z.core.$strip>>>>>;
7052
+ diffs: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[], unknown>, z.ZodArray<z.ZodObject<{
7053
+ label: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7054
+ before: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7055
+ after: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7056
+ }, z.core.$strip>>>>>;
7057
+ }, z.core.$strip>>>>>;
7058
+ }, z.core.$strip>;
7059
+
7060
+ declare interface WorkspaceFileReadResponse {
7061
+ type: "workspace_file_read_response";
7062
+ path: string;
7063
+ content: string | null;
7064
+ error?: string;
7065
+ }
7066
+
7067
+ declare interface WorkspaceFilesListResponse {
7068
+ type: "workspace_files_list_response";
7069
+ files: Array<{
7070
+ /** Relative path within the workspace (e.g. "IDENTITY.md", "skills/my-skill"). */
7071
+ path: string;
7072
+ /** Display name (e.g. "IDENTITY.md"). */
7073
+ name: string;
7074
+ /** Whether the file/directory exists. */
7075
+ exists: boolean;
7076
+ }>;
7077
+ }
7078
+
5628
7079
  /**
5629
7080
  * A reference to bytes stored in the workspace rather than inlined. The bytes
5630
7081
  * live in the workspace attachment store, addressed by `attachmentId`, and are
@@ -5650,4 +7101,6 @@ declare interface WorkspaceRefMediaSource {
5650
7101
  height?: number;
5651
7102
  }
5652
7103
 
7104
+ declare type _WorkspaceServerMessages = WorkspaceFilesListResponse | WorkspaceFileReadResponse | IdentityGetResponse | ToolPermissionSimulateResponse | ToolNamesListResponse | IdentityChangedEvent;
7105
+
5653
7106
  export { }