@factory/droid-sdk 0.2.0 → 0.4.0

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 (41) hide show
  1. package/README.md +214 -82
  2. package/dist/index.cjs +2345 -692
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +2570 -232
  5. package/dist/index.d.ts +2570 -232
  6. package/dist/index.js +2298 -697
  7. package/dist/index.js.map +1 -1
  8. package/docs/daemon-usage-guide.md +544 -0
  9. package/docs/sdk-usage-guide.md +748 -0
  10. package/examples/abort-session-stream.ts +23 -56
  11. package/examples/daemon-multi-session.ts +67 -0
  12. package/examples/droid-dev-structured-output.ts +5 -5
  13. package/examples/fork-session.ts +33 -7
  14. package/examples/hook-execution.ts +68 -0
  15. package/examples/init-metadata.ts +14 -66
  16. package/examples/interrupt-session.ts +23 -55
  17. package/examples/list-sessions.ts +9 -55
  18. package/examples/multi-turn-session.ts +27 -54
  19. package/examples/permission-handler.ts +27 -84
  20. package/examples/readme-structured-output.ts +26 -0
  21. package/examples/result-metadata.ts +2 -1
  22. package/examples/run.ts +2 -1
  23. package/examples/sdk-mcp-tool.ts +14 -8
  24. package/examples/session-stream.ts +57 -0
  25. package/examples/spec-mode-new-session.ts +39 -99
  26. package/examples/spec-mode-same-session.ts +50 -111
  27. package/examples/structured-output.ts +17 -10
  28. package/examples/test-compact.ts +9 -4
  29. package/examples/test-rewind.ts +49 -117
  30. package/examples/tool-controls.ts +23 -55
  31. package/package.json +3 -1
  32. package/docs/examples/init-metadata.md +0 -79
  33. package/docs/examples/list-sessions.md +0 -64
  34. package/docs/examples/multi-turn-session.md +0 -77
  35. package/docs/examples/one-shot-query.md +0 -73
  36. package/docs/examples/permission-handler.md +0 -102
  37. package/docs/examples/run.md +0 -52
  38. package/docs/examples/spec-mode.md +0 -101
  39. package/docs/examples/tool-controls.md +0 -90
  40. package/docs/typescript-sdk-reference.md +0 -372
  41. package/examples/simple-query.ts +0 -53
package/dist/index.d.ts CHANGED
@@ -1,19 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
3
3
 
4
- /**
5
- * All protocol enums for the Factory Droid SDK.
6
- *
7
- * - packages/common/src/droid/enums.ts
8
- * - packages/common/src/shared/enums.ts
9
- * - packages/common/src/llm/enums.ts
10
- * - packages/common/src/settings/enums.ts
11
- */
12
4
  /** Droid server methods (client → server communication). */
13
5
  declare enum DroidServerMethod {
14
6
  INITIALIZE_SESSION = "droid.initialize_session",
15
7
  LOAD_SESSION = "droid.load_session",
16
8
  ADD_USER_MESSAGE = "droid.add_user_message",
9
+ CLOSE_SESSION = "droid.close_session",
17
10
  INTERRUPT_SESSION = "droid.interrupt_session",
18
11
  KILL_WORKER_SESSION = "droid.kill_worker_session",
19
12
  UPDATE_SESSION_SETTINGS = "droid.update_session_settings",
@@ -44,7 +37,6 @@ declare enum DroidClientMethod {
44
37
  REQUEST_PERMISSION = "droid.request_permission",
45
38
  ASK_USER = "droid.ask_user"
46
39
  }
47
- /** Session notification types. */
48
40
  declare enum SessionNotificationType {
49
41
  TOOL_RESULT = "tool_result",
50
42
  TOOL_PROGRESS_UPDATE = "tool_progress_update",
@@ -56,7 +48,10 @@ declare enum SessionNotificationType {
56
48
  SESSION_TITLE_UPDATED = "session_title_updated",
57
49
  MCP_STATUS_CHANGED = "mcp_status_changed",
58
50
  ASSISTANT_TEXT_DELTA = "assistant_text_delta",
51
+ ASSISTANT_TEXT_COMPLETE = "assistant_text_complete",
59
52
  THINKING_TEXT_DELTA = "thinking_text_delta",
53
+ THINKING_TEXT_COMPLETE = "thinking_text_complete",
54
+ TOOL_CALL = "tool_call",
60
55
  SESSION_TOKEN_USAGE_CHANGED = "session_token_usage_changed",
61
56
  MISSION_STATE_CHANGED = "mission_state_changed",
62
57
  MISSION_FEATURES_CHANGED = "mission_features_changed",
@@ -65,7 +60,10 @@ declare enum SessionNotificationType {
65
60
  MISSION_WORKER_STARTED = "mission_worker_started",
66
61
  MISSION_WORKER_COMPLETED = "mission_worker_completed",
67
62
  MCP_AUTH_REQUIRED = "mcp_auth_required",
68
- MCP_AUTH_COMPLETED = "mcp_auth_completed"
63
+ MCP_AUTH_COMPLETED = "mcp_auth_completed",
64
+ HOOK_EXECUTION_STARTED = "hook_execution_started",
65
+ HOOK_EXECUTION_COMPLETED = "hook_execution_completed",
66
+ STRUCTURED_OUTPUT = "structured_output"
69
67
  }
70
68
  /** Tool confirmation outcome options (possible user responses to permission requests). */
71
69
  declare enum ToolConfirmationOutcome {
@@ -94,7 +92,6 @@ declare enum ToolConfirmationType {
94
92
  ApplyPatch = "apply_patch",
95
93
  McpTool = "mcp_tool"
96
94
  }
97
- /** Droid working state (represents what the agent is currently doing). */
98
95
  declare enum DroidWorkingState {
99
96
  Idle = "idle",
100
97
  StreamingAssistantMessage = "streaming_assistant_message",
@@ -102,12 +99,10 @@ declare enum DroidWorkingState {
102
99
  ExecutingTool = "executing_tool",
103
100
  CompactingConversation = "compacting_conversation"
104
101
  }
105
- /** Accuracy of reported context stats. */
106
102
  declare enum ContextStatsAccuracy {
107
103
  Exact = "exact",
108
104
  Estimated = "estimated"
109
105
  }
110
- /** Error types for error notifications. */
111
106
  declare enum DroidErrorType {
112
107
  CONNECTION_ERROR = "ConnectionError",
113
108
  PROTOCOL_ERROR = "ProtocolError",
@@ -117,7 +112,6 @@ declare enum DroidErrorType {
117
112
  PROCESS_EXIT_ERROR = "ProcessExitError",
118
113
  ERROR = "Error"
119
114
  }
120
- /** MCP server connection status. */
121
115
  declare enum McpServerStatus {
122
116
  Connecting = "connecting",
123
117
  Connected = "connected",
@@ -125,13 +119,11 @@ declare enum McpServerStatus {
125
119
  Failed = "failed",
126
120
  Disabled = "disabled"
127
121
  }
128
- /** MCP server transport type. */
129
122
  declare enum McpServerType {
130
123
  Stdio = "stdio",
131
124
  Http = "http",
132
125
  Sse = "sse"
133
126
  }
134
- /** Overall MCP initialization status. */
135
127
  declare enum McpStatus {
136
128
  NotInitialized = "not-initialized",
137
129
  Initializing = "initializing",
@@ -139,7 +131,6 @@ declare enum McpStatus {
139
131
  NoServers = "no-servers",
140
132
  Failed = "failed"
141
133
  }
142
- /** MCP authentication outcome. */
143
134
  declare enum McpAuthOutcome {
144
135
  Success = "success",
145
136
  Cancelled = "cancelled",
@@ -233,7 +224,6 @@ declare enum AutonomyMode {
233
224
  AutoMedium = "auto-medium",
234
225
  AutoHigh = "auto-high"
235
226
  }
236
- /** Reasoning effort levels for LLMs. */
237
227
  declare enum ReasoningEffort {
238
228
  None = "none",
239
229
  Dynamic = "dynamic",
@@ -245,7 +235,6 @@ declare enum ReasoningEffort {
245
235
  ExtraHigh = "xhigh",
246
236
  Max = "max"
247
237
  }
248
- /** Model provider identifiers. */
249
238
  declare enum ModelProvider {
250
239
  ANTHROPIC = "anthropic",
251
240
  OPENAI = "openai",
@@ -266,12 +255,15 @@ declare enum JsonRpcErrorCode {
266
255
  ENTITY_NOT_FOUND = -32004,
267
256
  SESSION_DISCONNECTED = -32005
268
257
  }
269
- /** JSON-RPC message type discriminator. */
270
258
  declare enum JsonRpcMessageType {
271
259
  Request = "request",
272
260
  Response = "response",
273
261
  Notification = "notification"
274
262
  }
263
+ declare enum ServerRequestHandlerType {
264
+ Permission = "permission",
265
+ AskUser = "askUser"
266
+ }
275
267
  /**
276
268
  * Settings hierarchy level enum.
277
269
  * Precedence order (highest to lowest): Org → Runtime → Folder → Project → User
@@ -285,7 +277,6 @@ declare enum SettingsLevel {
285
277
  Dynamic = "dynamic",
286
278
  BuiltIn = "builtin"
287
279
  }
288
- /** Skill file location type. */
289
280
  declare enum SkillLocation {
290
281
  Project = "project",
291
282
  Personal = "personal",
@@ -295,12 +286,13 @@ declare enum SkillLocation {
295
286
  /** JSON-RPC protocol version. */
296
287
  declare const JSONRPC_VERSION: "2.0";
297
288
  /**
298
- * Legacy Factory API version for backward compatibility.
299
- * @deprecated Use FACTORY_PROTOCOL_VERSION for runtime compatibility instead.
289
+ * Frozen Factory API version embedded in every JSON-RPC envelope.
290
+ * This value is required by the wire protocol and must not be changed.
291
+ * For version negotiation, use FACTORY_PROTOCOL_VERSION instead.
300
292
  */
301
293
  declare const LEGACY_FACTORY_API_VERSION: "1.0.0";
302
294
  /** Current Factory protocol version. */
303
- declare const FACTORY_PROTOCOL_VERSION: "1.3.0";
295
+ declare const FACTORY_PROTOCOL_VERSION: "1.51.0";
304
296
  /** HTTP header identifying the Factory client type. */
305
297
  declare const FACTORY_CLIENT_HEADER: "X-Factory-Client";
306
298
  /** HTTP header identifying the Factory client version. */
@@ -943,6 +935,122 @@ declare const JsonRpcMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
943
935
  } | undefined;
944
936
  }>]>;
945
937
  type JsonRpcMessage = z.infer<typeof JsonRpcMessageSchema>;
938
+ /** Creates a JSON-RPC response schema (success | failure) for a given result schema. */
939
+ declare function createResponseSchema<T extends z.ZodTypeAny>(resultSchema: T): z.ZodUnion<[z.ZodObject<{
940
+ jsonrpc: z.ZodLiteral<"2.0">;
941
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
942
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
943
+ _meta: z.ZodOptional<z.ZodObject<{
944
+ traceparent: z.ZodOptional<z.ZodString>;
945
+ tracestate: z.ZodOptional<z.ZodString>;
946
+ }, "strip", z.ZodTypeAny, {
947
+ traceparent?: string | undefined;
948
+ tracestate?: string | undefined;
949
+ }, {
950
+ traceparent?: string | undefined;
951
+ tracestate?: string | undefined;
952
+ }>>;
953
+ type: z.ZodLiteral<"response">;
954
+ id: z.ZodString;
955
+ } & {
956
+ result: T;
957
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
958
+ jsonrpc: z.ZodLiteral<"2.0">;
959
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
960
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
961
+ _meta: z.ZodOptional<z.ZodObject<{
962
+ traceparent: z.ZodOptional<z.ZodString>;
963
+ tracestate: z.ZodOptional<z.ZodString>;
964
+ }, "strip", z.ZodTypeAny, {
965
+ traceparent?: string | undefined;
966
+ tracestate?: string | undefined;
967
+ }, {
968
+ traceparent?: string | undefined;
969
+ tracestate?: string | undefined;
970
+ }>>;
971
+ type: z.ZodLiteral<"response">;
972
+ id: z.ZodString;
973
+ } & {
974
+ result: T;
975
+ }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
976
+ jsonrpc: z.ZodLiteral<"2.0">;
977
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
978
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
979
+ _meta: z.ZodOptional<z.ZodObject<{
980
+ traceparent: z.ZodOptional<z.ZodString>;
981
+ tracestate: z.ZodOptional<z.ZodString>;
982
+ }, "strip", z.ZodTypeAny, {
983
+ traceparent?: string | undefined;
984
+ tracestate?: string | undefined;
985
+ }, {
986
+ traceparent?: string | undefined;
987
+ tracestate?: string | undefined;
988
+ }>>;
989
+ type: z.ZodLiteral<"response">;
990
+ id: z.ZodString;
991
+ } & {
992
+ result: T;
993
+ }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>, z.ZodObject<{
994
+ jsonrpc: z.ZodLiteral<"2.0">;
995
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
996
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
997
+ _meta: z.ZodOptional<z.ZodObject<{
998
+ traceparent: z.ZodOptional<z.ZodString>;
999
+ tracestate: z.ZodOptional<z.ZodString>;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ traceparent?: string | undefined;
1002
+ tracestate?: string | undefined;
1003
+ }, {
1004
+ traceparent?: string | undefined;
1005
+ tracestate?: string | undefined;
1006
+ }>>;
1007
+ } & {
1008
+ type: z.ZodLiteral<"response">;
1009
+ id: z.ZodNullable<z.ZodString>;
1010
+ error: z.ZodObject<{
1011
+ code: z.ZodNativeEnum<typeof JsonRpcErrorCode>;
1012
+ message: z.ZodString;
1013
+ data: z.ZodOptional<z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>;
1014
+ }, "strip", z.ZodTypeAny, {
1015
+ code: JsonRpcErrorCode;
1016
+ message: string;
1017
+ data?: JsonValue | undefined;
1018
+ }, {
1019
+ code: JsonRpcErrorCode;
1020
+ message: string;
1021
+ data?: JsonValue | undefined;
1022
+ }>;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ error: {
1025
+ code: JsonRpcErrorCode;
1026
+ message: string;
1027
+ data?: JsonValue | undefined;
1028
+ };
1029
+ type: "response";
1030
+ jsonrpc: "2.0";
1031
+ factoryApiVersion: "1.0.0";
1032
+ id: string | null;
1033
+ factoryProtocolVersion?: string | undefined;
1034
+ _meta?: {
1035
+ traceparent?: string | undefined;
1036
+ tracestate?: string | undefined;
1037
+ } | undefined;
1038
+ }, {
1039
+ error: {
1040
+ code: JsonRpcErrorCode;
1041
+ message: string;
1042
+ data?: JsonValue | undefined;
1043
+ };
1044
+ type: "response";
1045
+ jsonrpc: "2.0";
1046
+ factoryApiVersion: "1.0.0";
1047
+ id: string | null;
1048
+ factoryProtocolVersion?: string | undefined;
1049
+ _meta?: {
1050
+ traceparent?: string | undefined;
1051
+ tracestate?: string | undefined;
1052
+ } | undefined;
1053
+ }>]>;
946
1054
 
947
1055
  /**
948
1056
  * Session metadata returned by {@link listSessions}.
@@ -1090,6 +1198,200 @@ interface ListSessionsOptions {
1090
1198
  sessionsDir?: string;
1091
1199
  }
1092
1200
 
1201
+ declare const DroidHookEventSchema: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
1202
+ type DroidHookEvent = z.infer<typeof DroidHookEventSchema>;
1203
+ declare const DroidHookSpecificOutputSchema: z.ZodObject<{
1204
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1205
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1206
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1207
+ additionalContext: z.ZodOptional<z.ZodString>;
1208
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1209
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1210
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1211
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1212
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1213
+ additionalContext: z.ZodOptional<z.ZodString>;
1214
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1215
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1216
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1217
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1218
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1219
+ additionalContext: z.ZodOptional<z.ZodString>;
1220
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1221
+ }, z.ZodTypeAny, "passthrough">>;
1222
+ declare const DroidHookOutputSchema: z.ZodObject<{
1223
+ continue: z.ZodOptional<z.ZodBoolean>;
1224
+ stopReason: z.ZodOptional<z.ZodString>;
1225
+ suppressOutput: z.ZodOptional<z.ZodBoolean>;
1226
+ systemMessage: z.ZodOptional<z.ZodString>;
1227
+ decision: z.ZodOptional<z.ZodEnum<["block", "approve"]>>;
1228
+ reason: z.ZodOptional<z.ZodString>;
1229
+ hookSpecificOutput: z.ZodOptional<z.ZodObject<{
1230
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1231
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1232
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1233
+ additionalContext: z.ZodOptional<z.ZodString>;
1234
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1235
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1236
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1237
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1238
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1239
+ additionalContext: z.ZodOptional<z.ZodString>;
1240
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1241
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1242
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1243
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1244
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1245
+ additionalContext: z.ZodOptional<z.ZodString>;
1246
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1247
+ }, z.ZodTypeAny, "passthrough">>>;
1248
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1249
+ continue: z.ZodOptional<z.ZodBoolean>;
1250
+ stopReason: z.ZodOptional<z.ZodString>;
1251
+ suppressOutput: z.ZodOptional<z.ZodBoolean>;
1252
+ systemMessage: z.ZodOptional<z.ZodString>;
1253
+ decision: z.ZodOptional<z.ZodEnum<["block", "approve"]>>;
1254
+ reason: z.ZodOptional<z.ZodString>;
1255
+ hookSpecificOutput: z.ZodOptional<z.ZodObject<{
1256
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1257
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1258
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1259
+ additionalContext: z.ZodOptional<z.ZodString>;
1260
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1261
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1262
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1263
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1264
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1265
+ additionalContext: z.ZodOptional<z.ZodString>;
1266
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1267
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1268
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1269
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1270
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1271
+ additionalContext: z.ZodOptional<z.ZodString>;
1272
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1273
+ }, z.ZodTypeAny, "passthrough">>>;
1274
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1275
+ continue: z.ZodOptional<z.ZodBoolean>;
1276
+ stopReason: z.ZodOptional<z.ZodString>;
1277
+ suppressOutput: z.ZodOptional<z.ZodBoolean>;
1278
+ systemMessage: z.ZodOptional<z.ZodString>;
1279
+ decision: z.ZodOptional<z.ZodEnum<["block", "approve"]>>;
1280
+ reason: z.ZodOptional<z.ZodString>;
1281
+ hookSpecificOutput: z.ZodOptional<z.ZodObject<{
1282
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1283
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1284
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1285
+ additionalContext: z.ZodOptional<z.ZodString>;
1286
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1287
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1288
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1289
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1290
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1291
+ additionalContext: z.ZodOptional<z.ZodString>;
1292
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1293
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1294
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1295
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1296
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1297
+ additionalContext: z.ZodOptional<z.ZodString>;
1298
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1299
+ }, z.ZodTypeAny, "passthrough">>>;
1300
+ }, z.ZodTypeAny, "passthrough">>;
1301
+ type DroidHookOutput = z.infer<typeof DroidHookOutputSchema>;
1302
+ declare const DroidHookExecutionResultSchema: z.ZodObject<{
1303
+ continue: z.ZodOptional<z.ZodBoolean>;
1304
+ stopReason: z.ZodOptional<z.ZodString>;
1305
+ suppressOutput: z.ZodOptional<z.ZodBoolean>;
1306
+ systemMessage: z.ZodOptional<z.ZodString>;
1307
+ decision: z.ZodOptional<z.ZodEnum<["block", "approve"]>>;
1308
+ reason: z.ZodOptional<z.ZodString>;
1309
+ hookSpecificOutput: z.ZodOptional<z.ZodObject<{
1310
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1311
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1312
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1313
+ additionalContext: z.ZodOptional<z.ZodString>;
1314
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1315
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1316
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1317
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1318
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1319
+ additionalContext: z.ZodOptional<z.ZodString>;
1320
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1321
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1322
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1323
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1324
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1325
+ additionalContext: z.ZodOptional<z.ZodString>;
1326
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1327
+ }, z.ZodTypeAny, "passthrough">>>;
1328
+ } & {
1329
+ exitCode: z.ZodNumber;
1330
+ stdout: z.ZodString;
1331
+ stderr: z.ZodString;
1332
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1333
+ continue: z.ZodOptional<z.ZodBoolean>;
1334
+ stopReason: z.ZodOptional<z.ZodString>;
1335
+ suppressOutput: z.ZodOptional<z.ZodBoolean>;
1336
+ systemMessage: z.ZodOptional<z.ZodString>;
1337
+ decision: z.ZodOptional<z.ZodEnum<["block", "approve"]>>;
1338
+ reason: z.ZodOptional<z.ZodString>;
1339
+ hookSpecificOutput: z.ZodOptional<z.ZodObject<{
1340
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1341
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1342
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1343
+ additionalContext: z.ZodOptional<z.ZodString>;
1344
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1345
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1346
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1347
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1348
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1349
+ additionalContext: z.ZodOptional<z.ZodString>;
1350
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1351
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1352
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1353
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1354
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1355
+ additionalContext: z.ZodOptional<z.ZodString>;
1356
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1357
+ }, z.ZodTypeAny, "passthrough">>>;
1358
+ } & {
1359
+ exitCode: z.ZodNumber;
1360
+ stdout: z.ZodString;
1361
+ stderr: z.ZodString;
1362
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1363
+ continue: z.ZodOptional<z.ZodBoolean>;
1364
+ stopReason: z.ZodOptional<z.ZodString>;
1365
+ suppressOutput: z.ZodOptional<z.ZodBoolean>;
1366
+ systemMessage: z.ZodOptional<z.ZodString>;
1367
+ decision: z.ZodOptional<z.ZodEnum<["block", "approve"]>>;
1368
+ reason: z.ZodOptional<z.ZodString>;
1369
+ hookSpecificOutput: z.ZodOptional<z.ZodObject<{
1370
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1371
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1372
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1373
+ additionalContext: z.ZodOptional<z.ZodString>;
1374
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1375
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1376
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1377
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1378
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1379
+ additionalContext: z.ZodOptional<z.ZodString>;
1380
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1381
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1382
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
1383
+ permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
1384
+ permissionDecisionReason: z.ZodOptional<z.ZodString>;
1385
+ additionalContext: z.ZodOptional<z.ZodString>;
1386
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1387
+ }, z.ZodTypeAny, "passthrough">>>;
1388
+ } & {
1389
+ exitCode: z.ZodNumber;
1390
+ stdout: z.ZodString;
1391
+ stderr: z.ZodString;
1392
+ }, z.ZodTypeAny, "passthrough">>;
1393
+ type DroidHookExecutionResult = z.infer<typeof DroidHookExecutionResultSchema>;
1394
+
1093
1395
  /** Text content block. */
1094
1396
  declare const TextBlockSchema: z.ZodObject<{
1095
1397
  type: z.ZodLiteral<"text">;
@@ -1878,7 +2180,6 @@ declare const DocumentSourceSchema: z.ZodObject<{
1878
2180
  }, z.ZodTypeAny, "passthrough">>;
1879
2181
  type DocumentSource = z.infer<typeof DocumentSourceSchema>;
1880
2182
 
1881
- /** Stdio MCP server configuration fields. */
1882
2183
  declare const McpStdioServerConfigFieldsSchema: z.ZodObject<{
1883
2184
  command: z.ZodOptional<z.ZodString>;
1884
2185
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -1890,7 +2191,6 @@ declare const McpStdioServerConfigFieldsSchema: z.ZodObject<{
1890
2191
  args?: string[] | undefined;
1891
2192
  }>;
1892
2193
  type McpStdioServerConfigFields = z.infer<typeof McpStdioServerConfigFieldsSchema>;
1893
- /** HTTP MCP server configuration fields. */
1894
2194
  declare const McpHttpServerConfigFieldsSchema: z.ZodObject<{
1895
2195
  url: z.ZodOptional<z.ZodString>;
1896
2196
  }, "strip", z.ZodTypeAny, {
@@ -1899,7 +2199,6 @@ declare const McpHttpServerConfigFieldsSchema: z.ZodObject<{
1899
2199
  url?: string | undefined;
1900
2200
  }>;
1901
2201
  type McpHttpServerConfigFields = z.infer<typeof McpHttpServerConfigFieldsSchema>;
1902
- /** SSE MCP server configuration fields. */
1903
2202
  declare const McpSseServerConfigFieldsSchema: z.ZodObject<{
1904
2203
  url: z.ZodString;
1905
2204
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1911,7 +2210,6 @@ declare const McpSseServerConfigFieldsSchema: z.ZodObject<{
1911
2210
  headers?: Record<string, string> | undefined;
1912
2211
  }>;
1913
2212
  type McpSseServerConfigFields = z.infer<typeof McpSseServerConfigFieldsSchema>;
1914
- /** MCP server status information. */
1915
2213
  declare const McpServerStatusInfoSchema: z.ZodObject<{
1916
2214
  name: z.ZodString;
1917
2215
  status: z.ZodNativeEnum<typeof McpServerStatus>;
@@ -1941,7 +2239,6 @@ declare const McpServerStatusInfoSchema: z.ZodObject<{
1941
2239
  hasAuthTokens: z.ZodOptional<z.ZodBoolean>;
1942
2240
  }, z.ZodTypeAny, "passthrough">>;
1943
2241
  type McpServerStatusInfo = z.infer<typeof McpServerStatusInfoSchema>;
1944
- /** MCP status summary. */
1945
2242
  declare const McpStatusSummarySchema: z.ZodObject<{
1946
2243
  total: z.ZodNumber;
1947
2244
  connected: z.ZodNumber;
@@ -1962,7 +2259,6 @@ declare const McpStatusSummarySchema: z.ZodObject<{
1962
2259
  disabled: z.ZodOptional<z.ZodNumber>;
1963
2260
  }, z.ZodTypeAny, "passthrough">>;
1964
2261
  type McpStatusSummary = z.infer<typeof McpStatusSummarySchema>;
1965
- /** MCP registry server entity. */
1966
2262
  declare const McpRegistryServerSchema: z.ZodObject<{
1967
2263
  name: z.ZodString;
1968
2264
  description: z.ZodString;
@@ -2007,7 +2303,6 @@ declare const McpToolInputSchemaSchema: z.ZodObject<{
2007
2303
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2008
2304
  }, z.ZodTypeAny, "passthrough">>;
2009
2305
  type McpToolInputSchema = z.infer<typeof McpToolInputSchemaSchema>;
2010
- /** MCP tool information entity. */
2011
2306
  declare const McpToolInfoSchema: z.ZodObject<{
2012
2307
  serverName: z.ZodString;
2013
2308
  name: z.ZodString;
@@ -2067,7 +2362,6 @@ declare const McpToolInfoSchema: z.ZodObject<{
2067
2362
  }, z.ZodTypeAny, "passthrough">>>;
2068
2363
  }, z.ZodTypeAny, "passthrough">>;
2069
2364
  type McpToolInfo = z.infer<typeof McpToolInfoSchema>;
2070
- /** Selectable list item for tool confirmation prompts. */
2071
2365
  declare const ToolConfirmationListItemSchema: z.ZodObject<{
2072
2366
  label: z.ZodString;
2073
2367
  value: z.ZodNativeEnum<typeof ToolConfirmationOutcome>;
@@ -8485,7 +8779,6 @@ declare const ProgressLogEntrySchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
8485
8779
  }, z.ZodTypeAny, "passthrough">>]>;
8486
8780
  type ProgressLogEntry = z.infer<typeof ProgressLogEntrySchema>;
8487
8781
 
8488
- /** Session tag metadata. */
8489
8782
  declare const SessionTagSchema: z.ZodObject<{
8490
8783
  name: z.ZodString;
8491
8784
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -8497,7 +8790,6 @@ declare const SessionTagSchema: z.ZodObject<{
8497
8790
  metadata?: Record<string, string> | undefined;
8498
8791
  }>;
8499
8792
  type SessionTag = z.infer<typeof SessionTagSchema>;
8500
- /** Session source information. */
8501
8793
  declare const SessionSourceSchema: z.ZodObject<{
8502
8794
  platform: z.ZodString;
8503
8795
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -8506,7 +8798,6 @@ declare const SessionSourceSchema: z.ZodObject<{
8506
8798
  platform: z.ZodString;
8507
8799
  }, z.ZodTypeAny, "passthrough">>;
8508
8800
  type SessionSource = z.infer<typeof SessionSourceSchema>;
8509
- /** Stdio MCP server configuration for initialization. */
8510
8801
  declare const StdioMcpConfigSchema: z.ZodObject<{
8511
8802
  name: z.ZodString;
8512
8803
  command: z.ZodString;
@@ -8524,7 +8815,6 @@ declare const StdioMcpConfigSchema: z.ZodObject<{
8524
8815
  env?: Record<string, string> | undefined;
8525
8816
  }>;
8526
8817
  type StdioMcpConfig = z.infer<typeof StdioMcpConfigSchema>;
8527
- /** HTTP header for MCP server configuration. */
8528
8818
  declare const HttpHeaderSchema: z.ZodObject<{
8529
8819
  name: z.ZodString;
8530
8820
  value: z.ZodString;
@@ -8536,7 +8826,6 @@ declare const HttpHeaderSchema: z.ZodObject<{
8536
8826
  name: string;
8537
8827
  }>;
8538
8828
  type HttpHeader = z.infer<typeof HttpHeaderSchema>;
8539
- /** HTTP MCP server configuration for initialization. */
8540
8829
  declare const HttpMcpConfigSchema: z.ZodObject<{
8541
8830
  type: z.ZodLiteral<"http">;
8542
8831
  name: z.ZodString;
@@ -8569,7 +8858,6 @@ declare const HttpMcpConfigSchema: z.ZodObject<{
8569
8858
  }[] | undefined;
8570
8859
  }>;
8571
8860
  type HttpMcpConfig = z.infer<typeof HttpMcpConfigSchema>;
8572
- /** SSE MCP server configuration for initialization. */
8573
8861
  declare const SseMcpConfigSchema: z.ZodObject<{
8574
8862
  type: z.ZodLiteral<"sse">;
8575
8863
  name: z.ZodString;
@@ -8602,7 +8890,6 @@ declare const SseMcpConfigSchema: z.ZodObject<{
8602
8890
  }[] | undefined;
8603
8891
  }>;
8604
8892
  type SseMcpConfig = z.infer<typeof SseMcpConfigSchema>;
8605
- /** Union of MCP server configs. */
8606
8893
  declare const McpServerConfigSchema: z.ZodUnion<[z.ZodObject<{
8607
8894
  name: z.ZodString;
8608
8895
  command: z.ZodString;
@@ -8713,7 +9000,6 @@ declare const SessionSettingsSchema: z.ZodObject<{
8713
9000
  specModeReasoningEffort: z.ZodOptional<z.ZodNativeEnum<typeof ReasoningEffort>>;
8714
9001
  }, z.ZodTypeAny, "passthrough">>;
8715
9002
  type SessionSettings = z.infer<typeof SessionSettingsSchema>;
8716
- /** Git repository information. */
8717
9003
  declare const GitRepoInfoSchema: z.ZodObject<{
8718
9004
  owner: z.ZodOptional<z.ZodString>;
8719
9005
  repoName: z.ZodString;
@@ -8776,7 +9062,6 @@ declare const AvailableModelConfigSchema: z.ZodObject<{
8776
9062
  usesUSBasedInference: z.ZodOptional<z.ZodBoolean>;
8777
9063
  }, z.ZodTypeAny, "passthrough">>;
8778
9064
  type AvailableModelConfig = z.infer<typeof AvailableModelConfigSchema>;
8779
- /** Token usage information for a session. */
8780
9065
  declare const TokenUsageSchema: z.ZodObject<{
8781
9066
  inputTokens: z.ZodNumber;
8782
9067
  outputTokens: z.ZodNumber;
@@ -8818,7 +9103,6 @@ declare const ContextStatsSchema: z.ZodObject<{
8818
9103
  updatedAt: z.ZodString;
8819
9104
  }, z.ZodTypeAny, "passthrough">>;
8820
9105
  type ContextStats = z.infer<typeof ContextStatsSchema>;
8821
- /** Worker state information for mission snapshots. */
8822
9106
  declare const WorkerStateInfoSchema: z.ZodObject<{
8823
9107
  startedAt: z.ZodString;
8824
9108
  completedAt: z.ZodOptional<z.ZodString>;
@@ -8833,7 +9117,6 @@ declare const WorkerStateInfoSchema: z.ZodObject<{
8833
9117
  exitCode: z.ZodOptional<z.ZodNumber>;
8834
9118
  }, z.ZodTypeAny, "passthrough">>;
8835
9119
  type WorkerStateInfo = z.infer<typeof WorkerStateInfoSchema>;
8836
- /** Skill resource file in a skill folder. */
8837
9120
  declare const SkillResourceSchema: z.ZodObject<{
8838
9121
  name: z.ZodString;
8839
9122
  path: z.ZodString;
@@ -8848,7 +9131,6 @@ declare const SkillResourceSchema: z.ZodObject<{
8848
9131
  type: z.ZodEnum<["reference", "asset"]>;
8849
9132
  }, z.ZodTypeAny, "passthrough">>;
8850
9133
  type SkillResource = z.infer<typeof SkillResourceSchema>;
8851
- /** Skill information returned by list_skills. */
8852
9134
  declare const SkillInfoSchema: z.ZodObject<{
8853
9135
  name: z.ZodString;
8854
9136
  description: z.ZodOptional<z.ZodString>;
@@ -8917,7 +9199,6 @@ declare const SkillInfoSchema: z.ZodObject<{
8917
9199
  }, z.ZodTypeAny, "passthrough">>, "many">>;
8918
9200
  }, z.ZodTypeAny, "passthrough">>;
8919
9201
  type SkillInfo = z.infer<typeof SkillInfoSchema>;
8920
- /** Parameters for droid.initialize_session request. */
8921
9202
  declare const InitializeSessionRequestParamsSchema: z.ZodObject<{
8922
9203
  sessionLocation: z.ZodOptional<z.ZodString>;
8923
9204
  sessionSource: z.ZodOptional<z.ZodObject<{
@@ -9128,7 +9409,6 @@ declare const InitializeSessionRequestParamsSchema: z.ZodObject<{
9128
9409
  mcpOAuthCallbackUri?: string | undefined;
9129
9410
  }>;
9130
9411
  type InitializeSessionRequestParams = z.infer<typeof InitializeSessionRequestParamsSchema>;
9131
- /** Parameters for droid.load_session request. */
9132
9412
  declare const LoadSessionRequestParamsSchema: z.ZodObject<{
9133
9413
  sessionId: z.ZodString;
9134
9414
  mcpServers: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -9260,12 +9540,10 @@ declare const LoadSessionRequestParamsSchema: z.ZodObject<{
9260
9540
  mcpOAuthCallbackUri?: string | undefined;
9261
9541
  }>;
9262
9542
  type LoadSessionRequestParams = z.infer<typeof LoadSessionRequestParamsSchema>;
9263
- /** Structured output format type names. */
9264
9543
  declare const OutputFormatType: {
9265
9544
  readonly JsonSchema: "json_schema";
9266
9545
  };
9267
9546
  type OutputFormatType = (typeof OutputFormatType)[keyof typeof OutputFormatType];
9268
- /** Structured output format for droid.add_user_message request. */
9269
9547
  declare const OutputFormatSchema: z.ZodObject<{
9270
9548
  type: z.ZodLiteral<"json_schema">;
9271
9549
  schema: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
@@ -9277,7 +9555,6 @@ declare const OutputFormatSchema: z.ZodObject<{
9277
9555
  schema: JsonObject;
9278
9556
  }>;
9279
9557
  type OutputFormat = z.infer<typeof OutputFormatSchema>;
9280
- /** Parameters for droid.add_user_message request. */
9281
9558
  declare const AddUserMessageRequestParamsSchema: z.ZodObject<{
9282
9559
  messageId: z.ZodOptional<z.ZodString>;
9283
9560
  text: z.ZodString;
@@ -9363,10 +9640,16 @@ declare const AddUserMessageRequestParamsSchema: z.ZodObject<{
9363
9640
  } | undefined;
9364
9641
  }>;
9365
9642
  type AddUserMessageRequestParams = z.infer<typeof AddUserMessageRequestParamsSchema>;
9366
- /** Parameters for droid.interrupt_session request (empty). */
9367
9643
  declare const InterruptSessionRequestParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
9368
9644
  type InterruptSessionRequestParams = z.infer<typeof InterruptSessionRequestParamsSchema>;
9369
- /** Parameters for droid.kill_worker_session request. */
9645
+ declare const CloseSessionRequestParamsSchema: z.ZodObject<{
9646
+ reason: z.ZodOptional<z.ZodEnum<["clear", "logout", "prompt_input_exit", "other"]>>;
9647
+ }, "strict", z.ZodTypeAny, {
9648
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
9649
+ }, {
9650
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
9651
+ }>;
9652
+ type CloseSessionRequestParams = z.infer<typeof CloseSessionRequestParamsSchema>;
9370
9653
  declare const KillWorkerSessionRequestParamsSchema: z.ZodObject<{
9371
9654
  workerSessionId: z.ZodString;
9372
9655
  }, "strict", z.ZodTypeAny, {
@@ -9375,7 +9658,6 @@ declare const KillWorkerSessionRequestParamsSchema: z.ZodObject<{
9375
9658
  workerSessionId: string;
9376
9659
  }>;
9377
9660
  type KillWorkerSessionRequestParams = z.infer<typeof KillWorkerSessionRequestParamsSchema>;
9378
- /** Parameters for droid.update_session_settings request. */
9379
9661
  declare const UpdateSessionSettingsRequestParamsSchema: z.ZodObject<{
9380
9662
  enabledToolIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9381
9663
  disabledToolIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -9408,7 +9690,6 @@ declare const UpdateSessionSettingsRequestParamsSchema: z.ZodObject<{
9408
9690
  specModeReasoningEffort?: ReasoningEffort | null | undefined;
9409
9691
  }>;
9410
9692
  type UpdateSessionSettingsRequestParams = z.infer<typeof UpdateSessionSettingsRequestParamsSchema>;
9411
- /** Parameters for droid.toggle_mcp_server request. */
9412
9693
  declare const ToggleMcpServerRequestParamsSchema: z.ZodObject<{
9413
9694
  serverName: z.ZodString;
9414
9695
  enabled: z.ZodBoolean;
@@ -9423,7 +9704,6 @@ declare const ToggleMcpServerRequestParamsSchema: z.ZodObject<{
9423
9704
  settingsLevel: SettingsLevel.User;
9424
9705
  }>;
9425
9706
  type ToggleMcpServerRequestParams = z.infer<typeof ToggleMcpServerRequestParamsSchema>;
9426
- /** Parameters for droid.authenticate_mcp_server request. */
9427
9707
  declare const AuthenticateMcpServerRequestParamsSchema: z.ZodObject<{
9428
9708
  serverName: z.ZodString;
9429
9709
  }, "strict", z.ZodTypeAny, {
@@ -9432,7 +9712,6 @@ declare const AuthenticateMcpServerRequestParamsSchema: z.ZodObject<{
9432
9712
  serverName: string;
9433
9713
  }>;
9434
9714
  type AuthenticateMcpServerRequestParams = z.infer<typeof AuthenticateMcpServerRequestParamsSchema>;
9435
- /** Parameters for droid.cancel_mcp_auth request. */
9436
9715
  declare const CancelMcpAuthRequestParamsSchema: z.ZodObject<{
9437
9716
  serverName: z.ZodString;
9438
9717
  }, "strict", z.ZodTypeAny, {
@@ -9441,7 +9720,6 @@ declare const CancelMcpAuthRequestParamsSchema: z.ZodObject<{
9441
9720
  serverName: string;
9442
9721
  }>;
9443
9722
  type CancelMcpAuthRequestParams = z.infer<typeof CancelMcpAuthRequestParamsSchema>;
9444
- /** Parameters for droid.clear_mcp_auth request. */
9445
9723
  declare const ClearMcpAuthRequestParamsSchema: z.ZodObject<{
9446
9724
  serverName: z.ZodString;
9447
9725
  }, "strict", z.ZodTypeAny, {
@@ -9450,7 +9728,6 @@ declare const ClearMcpAuthRequestParamsSchema: z.ZodObject<{
9450
9728
  serverName: string;
9451
9729
  }>;
9452
9730
  type ClearMcpAuthRequestParams = z.infer<typeof ClearMcpAuthRequestParamsSchema>;
9453
- /** Parameters for droid.submit_mcp_auth_code request. */
9454
9731
  declare const SubmitMcpAuthCodeRequestParamsSchema: z.ZodObject<{
9455
9732
  serverName: z.ZodString;
9456
9733
  code: z.ZodString;
@@ -9465,7 +9742,6 @@ declare const SubmitMcpAuthCodeRequestParamsSchema: z.ZodObject<{
9465
9742
  state: string;
9466
9743
  }>;
9467
9744
  type SubmitMcpAuthCodeRequestParams = z.infer<typeof SubmitMcpAuthCodeRequestParamsSchema>;
9468
- /** Parameters for droid.add_mcp_server request. */
9469
9745
  declare const AddMcpServerRequestParamsSchema: z.ZodObject<{
9470
9746
  name: z.ZodString;
9471
9747
  type: z.ZodNativeEnum<typeof McpServerType>;
@@ -9492,7 +9768,6 @@ declare const AddMcpServerRequestParamsSchema: z.ZodObject<{
9492
9768
  env?: Record<string, string> | undefined;
9493
9769
  }>;
9494
9770
  type AddMcpServerRequestParams = z.infer<typeof AddMcpServerRequestParamsSchema>;
9495
- /** Parameters for droid.remove_mcp_server request. */
9496
9771
  declare const RemoveMcpServerRequestParamsSchema: z.ZodObject<{
9497
9772
  serverName: z.ZodString;
9498
9773
  settingsLevel: z.ZodLiteral<SettingsLevel.User>;
@@ -9504,13 +9779,10 @@ declare const RemoveMcpServerRequestParamsSchema: z.ZodObject<{
9504
9779
  settingsLevel: SettingsLevel.User;
9505
9780
  }>;
9506
9781
  type RemoveMcpServerRequestParams = z.infer<typeof RemoveMcpServerRequestParamsSchema>;
9507
- /** Parameters for droid.list_mcp_registry request (empty). */
9508
9782
  declare const ListMcpRegistryRequestParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
9509
9783
  type ListMcpRegistryRequestParams = z.infer<typeof ListMcpRegistryRequestParamsSchema>;
9510
- /** Parameters for droid.list_mcp_tools request (empty). */
9511
9784
  declare const ListMcpToolsRequestParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
9512
9785
  type ListMcpToolsRequestParams = z.infer<typeof ListMcpToolsRequestParamsSchema>;
9513
- /** Tool catalog entry returned by droid.list_tools. */
9514
9786
  declare const ExecToolInfoSchema: z.ZodObject<{
9515
9787
  id: z.ZodString;
9516
9788
  llmId: z.ZodString;
@@ -9537,7 +9809,6 @@ declare const ExecToolInfoSchema: z.ZodObject<{
9537
9809
  currentlyAllowed: z.ZodBoolean;
9538
9810
  }, z.ZodTypeAny, "passthrough">>;
9539
9811
  type ExecToolInfo = z.infer<typeof ExecToolInfoSchema>;
9540
- /** Parameters for droid.list_tools. */
9541
9812
  declare const ListToolsRequestParamsSchema: z.ZodObject<{
9542
9813
  depth: z.ZodOptional<z.ZodNumber>;
9543
9814
  enabledToolIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -9570,10 +9841,8 @@ declare const ListToolsRequestParamsSchema: z.ZodObject<{
9570
9841
  depth?: number | undefined;
9571
9842
  }>;
9572
9843
  type ListToolsRequestParams = z.infer<typeof ListToolsRequestParamsSchema>;
9573
- /** Parameters for droid.list_mcp_servers request (empty). */
9574
9844
  declare const ListMcpServersRequestParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
9575
9845
  type ListMcpServersRequestParams = z.infer<typeof ListMcpServersRequestParamsSchema>;
9576
- /** Parameters for droid.toggle_mcp_tool request. */
9577
9846
  declare const ToggleMcpToolRequestParamsSchema: z.ZodObject<{
9578
9847
  serverName: z.ZodString;
9579
9848
  toolName: z.ZodString;
@@ -9588,10 +9857,8 @@ declare const ToggleMcpToolRequestParamsSchema: z.ZodObject<{
9588
9857
  toolName: string;
9589
9858
  }>;
9590
9859
  type ToggleMcpToolRequestParams = z.infer<typeof ToggleMcpToolRequestParamsSchema>;
9591
- /** Parameters for droid.list_skills request (empty). */
9592
9860
  declare const ListSkillsRequestParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
9593
9861
  type ListSkillsRequestParams = z.infer<typeof ListSkillsRequestParamsSchema>;
9594
- /** Parameters for droid.submit_bug_report request. */
9595
9862
  declare const SubmitBugReportRequestParamsSchema: z.ZodObject<{
9596
9863
  userComment: z.ZodString;
9597
9864
  clientLogs: z.ZodOptional<z.ZodString>;
@@ -9603,7 +9870,6 @@ declare const SubmitBugReportRequestParamsSchema: z.ZodObject<{
9603
9870
  clientLogs?: string | undefined;
9604
9871
  }>;
9605
9872
  type SubmitBugReportRequestParams = z.infer<typeof SubmitBugReportRequestParamsSchema>;
9606
- /** File snapshot for rewind operations. */
9607
9873
  declare const RewindFileSnapshotSchema: z.ZodObject<{
9608
9874
  filePath: z.ZodString;
9609
9875
  contentHash: z.ZodString;
@@ -9618,7 +9884,6 @@ declare const RewindFileSnapshotSchema: z.ZodObject<{
9618
9884
  size: z.ZodNumber;
9619
9885
  }, z.ZodTypeAny, "passthrough">>;
9620
9886
  type RewindFileSnapshot = z.infer<typeof RewindFileSnapshotSchema>;
9621
- /** File creation record for rewind operations. */
9622
9887
  declare const RewindFileCreationSchema: z.ZodObject<{
9623
9888
  filePath: z.ZodString;
9624
9889
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -9627,7 +9892,6 @@ declare const RewindFileCreationSchema: z.ZodObject<{
9627
9892
  filePath: z.ZodString;
9628
9893
  }, z.ZodTypeAny, "passthrough">>;
9629
9894
  type RewindFileCreation = z.infer<typeof RewindFileCreationSchema>;
9630
- /** Evicted file record for rewind operations. */
9631
9895
  declare const RewindEvictedFileSchema: z.ZodObject<{
9632
9896
  filePath: z.ZodString;
9633
9897
  reason: z.ZodString;
@@ -9639,7 +9903,6 @@ declare const RewindEvictedFileSchema: z.ZodObject<{
9639
9903
  reason: z.ZodString;
9640
9904
  }, z.ZodTypeAny, "passthrough">>;
9641
9905
  type RewindEvictedFile = z.infer<typeof RewindEvictedFileSchema>;
9642
- /** Parameters for droid.get_rewind_info request. */
9643
9906
  declare const GetRewindInfoRequestParamsSchema: z.ZodObject<{
9644
9907
  messageId: z.ZodString;
9645
9908
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -9648,7 +9911,6 @@ declare const GetRewindInfoRequestParamsSchema: z.ZodObject<{
9648
9911
  messageId: z.ZodString;
9649
9912
  }, z.ZodTypeAny, "passthrough">>;
9650
9913
  type GetRewindInfoRequestParams = z.infer<typeof GetRewindInfoRequestParamsSchema>;
9651
- /** Parameters for droid.execute_rewind request. */
9652
9914
  declare const ExecuteRewindRequestParamsSchema: z.ZodObject<{
9653
9915
  messageId: z.ZodString;
9654
9916
  filesToRestore: z.ZodArray<z.ZodObject<{
@@ -9720,7 +9982,6 @@ declare const ExecuteRewindRequestParamsSchema: z.ZodObject<{
9720
9982
  forkTitle: z.ZodString;
9721
9983
  }, z.ZodTypeAny, "passthrough">>;
9722
9984
  type ExecuteRewindRequestParams = z.infer<typeof ExecuteRewindRequestParamsSchema>;
9723
- /** Parameters for droid.compact_session request. */
9724
9985
  declare const CompactSessionRequestParamsSchema: z.ZodObject<{
9725
9986
  customInstructions: z.ZodOptional<z.ZodString>;
9726
9987
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -9729,7 +9990,6 @@ declare const CompactSessionRequestParamsSchema: z.ZodObject<{
9729
9990
  customInstructions: z.ZodOptional<z.ZodString>;
9730
9991
  }, z.ZodTypeAny, "passthrough">>;
9731
9992
  type CompactSessionRequestParams = z.infer<typeof CompactSessionRequestParamsSchema>;
9732
- /** Parameters for droid.rename_session request. */
9733
9993
  declare const RenameSessionRequestParamsSchema: z.ZodObject<{
9734
9994
  title: z.ZodString;
9735
9995
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -9738,10 +9998,8 @@ declare const RenameSessionRequestParamsSchema: z.ZodObject<{
9738
9998
  title: z.ZodString;
9739
9999
  }, z.ZodTypeAny, "passthrough">>;
9740
10000
  type RenameSessionRequestParams = z.infer<typeof RenameSessionRequestParamsSchema>;
9741
- /** Parameters for droid.fork_session request (empty). */
9742
10001
  declare const ForkSessionRequestParamsSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
9743
10002
  type ForkSessionRequestParams = z.infer<typeof ForkSessionRequestParamsSchema>;
9744
- /** Parameters for droid.get_context_stats request (empty). */
9745
10003
  declare const GetContextStatsRequestParamsSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
9746
10004
  type GetContextStatsRequestParams = z.infer<typeof GetContextStatsRequestParamsSchema>;
9747
10005
  declare const InitializeSessionRequestSchema: z.ZodObject<{
@@ -10528,6 +10786,61 @@ declare const InterruptSessionRequestSchema: z.ZodObject<{
10528
10786
  } | undefined;
10529
10787
  }>;
10530
10788
  type InterruptSessionRequest = z.infer<typeof InterruptSessionRequestSchema>;
10789
+ declare const CloseSessionRequestSchema: z.ZodObject<{
10790
+ jsonrpc: z.ZodLiteral<"2.0">;
10791
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
10792
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
10793
+ _meta: z.ZodOptional<z.ZodObject<{
10794
+ traceparent: z.ZodOptional<z.ZodString>;
10795
+ tracestate: z.ZodOptional<z.ZodString>;
10796
+ }, "strip", z.ZodTypeAny, {
10797
+ traceparent?: string | undefined;
10798
+ tracestate?: string | undefined;
10799
+ }, {
10800
+ traceparent?: string | undefined;
10801
+ tracestate?: string | undefined;
10802
+ }>>;
10803
+ type: z.ZodLiteral<"request">;
10804
+ id: z.ZodString;
10805
+ } & {
10806
+ method: z.ZodLiteral<DroidServerMethod.CLOSE_SESSION>;
10807
+ params: z.ZodObject<{
10808
+ reason: z.ZodOptional<z.ZodEnum<["clear", "logout", "prompt_input_exit", "other"]>>;
10809
+ }, "strict", z.ZodTypeAny, {
10810
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
10811
+ }, {
10812
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
10813
+ }>;
10814
+ }, "strip", z.ZodTypeAny, {
10815
+ params: {
10816
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
10817
+ };
10818
+ type: "request";
10819
+ jsonrpc: "2.0";
10820
+ factoryApiVersion: "1.0.0";
10821
+ id: string;
10822
+ method: DroidServerMethod.CLOSE_SESSION;
10823
+ factoryProtocolVersion?: string | undefined;
10824
+ _meta?: {
10825
+ traceparent?: string | undefined;
10826
+ tracestate?: string | undefined;
10827
+ } | undefined;
10828
+ }, {
10829
+ params: {
10830
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
10831
+ };
10832
+ type: "request";
10833
+ jsonrpc: "2.0";
10834
+ factoryApiVersion: "1.0.0";
10835
+ id: string;
10836
+ method: DroidServerMethod.CLOSE_SESSION;
10837
+ factoryProtocolVersion?: string | undefined;
10838
+ _meta?: {
10839
+ traceparent?: string | undefined;
10840
+ tracestate?: string | undefined;
10841
+ } | undefined;
10842
+ }>;
10843
+ type CloseSessionRequest = z.infer<typeof CloseSessionRequestSchema>;
10531
10844
  declare const KillWorkerSessionRequestSchema: z.ZodObject<{
10532
10845
  jsonrpc: z.ZodLiteral<"2.0">;
10533
10846
  factoryApiVersion: z.ZodLiteral<"1.0.0">;
@@ -12683,6 +12996,59 @@ declare const ClientRequestSchema: z.ZodDiscriminatedUnion<"method", [z.ZodObjec
12683
12996
  }>>;
12684
12997
  type: z.ZodLiteral<"request">;
12685
12998
  id: z.ZodString;
12999
+ } & {
13000
+ method: z.ZodLiteral<DroidServerMethod.CLOSE_SESSION>;
13001
+ params: z.ZodObject<{
13002
+ reason: z.ZodOptional<z.ZodEnum<["clear", "logout", "prompt_input_exit", "other"]>>;
13003
+ }, "strict", z.ZodTypeAny, {
13004
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
13005
+ }, {
13006
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
13007
+ }>;
13008
+ }, "strip", z.ZodTypeAny, {
13009
+ params: {
13010
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
13011
+ };
13012
+ type: "request";
13013
+ jsonrpc: "2.0";
13014
+ factoryApiVersion: "1.0.0";
13015
+ id: string;
13016
+ method: DroidServerMethod.CLOSE_SESSION;
13017
+ factoryProtocolVersion?: string | undefined;
13018
+ _meta?: {
13019
+ traceparent?: string | undefined;
13020
+ tracestate?: string | undefined;
13021
+ } | undefined;
13022
+ }, {
13023
+ params: {
13024
+ reason?: "clear" | "logout" | "prompt_input_exit" | "other" | undefined;
13025
+ };
13026
+ type: "request";
13027
+ jsonrpc: "2.0";
13028
+ factoryApiVersion: "1.0.0";
13029
+ id: string;
13030
+ method: DroidServerMethod.CLOSE_SESSION;
13031
+ factoryProtocolVersion?: string | undefined;
13032
+ _meta?: {
13033
+ traceparent?: string | undefined;
13034
+ tracestate?: string | undefined;
13035
+ } | undefined;
13036
+ }>, z.ZodObject<{
13037
+ jsonrpc: z.ZodLiteral<"2.0">;
13038
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
13039
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
13040
+ _meta: z.ZodOptional<z.ZodObject<{
13041
+ traceparent: z.ZodOptional<z.ZodString>;
13042
+ tracestate: z.ZodOptional<z.ZodString>;
13043
+ }, "strip", z.ZodTypeAny, {
13044
+ traceparent?: string | undefined;
13045
+ tracestate?: string | undefined;
13046
+ }, {
13047
+ traceparent?: string | undefined;
13048
+ tracestate?: string | undefined;
13049
+ }>>;
13050
+ type: z.ZodLiteral<"request">;
13051
+ id: z.ZodString;
12686
13052
  } & {
12687
13053
  method: z.ZodLiteral<DroidServerMethod.INTERRUPT_SESSION>;
12688
13054
  params: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
@@ -14073,7 +14439,6 @@ declare const ClientRequestSchema: z.ZodDiscriminatedUnion<"method", [z.ZodObjec
14073
14439
  } | undefined;
14074
14440
  }>]>;
14075
14441
  type ClientRequest = z.infer<typeof ClientRequestSchema>;
14076
- /** Mission state snapshot (for orchestrator sessions). */
14077
14442
  declare const MissionSnapshotSchema: z.ZodObject<{
14078
14443
  state: z.ZodNativeEnum<typeof MissionState>;
14079
14444
  features: z.ZodArray<z.ZodObject<{
@@ -22128,7 +22493,6 @@ declare const MissionSnapshotSchema: z.ZodObject<{
22128
22493
  }, z.ZodTypeAny, "passthrough">>>>;
22129
22494
  }, z.ZodTypeAny, "passthrough">>;
22130
22495
  type MissionSnapshot = z.infer<typeof MissionSnapshotSchema>;
22131
- /** Result for droid.initialize_session response. */
22132
22496
  declare const InitializeSessionResultSchema: z.ZodObject<{
22133
22497
  sessionId: z.ZodString;
22134
22498
  session: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
@@ -22638,7 +23002,6 @@ declare const InitializeSessionResultSchema: z.ZodObject<{
22638
23002
  }, z.ZodTypeAny, "passthrough">>, "many">>;
22639
23003
  }, z.ZodTypeAny, "passthrough">>;
22640
23004
  type InitializeSessionResult = z.infer<typeof InitializeSessionResultSchema>;
22641
- /** Result for droid.load_session response. */
22642
23005
  declare const LoadSessionResultSchema: z.ZodObject<{
22643
23006
  session: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
22644
23007
  mcpServers: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -47385,19 +47748,16 @@ declare const LoadSessionResultSchema: z.ZodObject<{
47385
47748
  decompSessionType: z.ZodOptional<z.ZodNativeEnum<typeof DecompSessionType>>;
47386
47749
  }, z.ZodTypeAny, "passthrough">>;
47387
47750
  type LoadSessionResult = z.infer<typeof LoadSessionResultSchema>;
47388
- /** Result for droid.add_user_message response (empty). */
47389
47751
  declare const AddUserMessageResultSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
47390
47752
  type AddUserMessageResult = z.infer<typeof AddUserMessageResultSchema>;
47391
- /** Result for droid.interrupt_session response (empty). */
47392
47753
  declare const InterruptSessionResultSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
47393
47754
  type InterruptSessionResult = z.infer<typeof InterruptSessionResultSchema>;
47394
- /** Result for droid.kill_worker_session response (empty). */
47755
+ declare const CloseSessionResultSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
47756
+ type CloseSessionResult = z.infer<typeof CloseSessionResultSchema>;
47395
47757
  declare const KillWorkerSessionResultSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
47396
47758
  type KillWorkerSessionResult = z.infer<typeof KillWorkerSessionResultSchema>;
47397
- /** Result for droid.update_session_settings response (empty). */
47398
47759
  declare const UpdateSessionSettingsResultSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
47399
47760
  type UpdateSessionSettingsResult = z.infer<typeof UpdateSessionSettingsResultSchema>;
47400
- /** Result for droid.toggle_mcp_server response. */
47401
47761
  declare const ToggleMcpServerResultSchema: z.ZodObject<{
47402
47762
  success: z.ZodBoolean;
47403
47763
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47406,7 +47766,6 @@ declare const ToggleMcpServerResultSchema: z.ZodObject<{
47406
47766
  success: z.ZodBoolean;
47407
47767
  }, z.ZodTypeAny, "passthrough">>;
47408
47768
  type ToggleMcpServerResult = z.infer<typeof ToggleMcpServerResultSchema>;
47409
- /** Result for droid.authenticate_mcp_server response. */
47410
47769
  declare const AuthenticateMcpServerResultSchema: z.ZodObject<{
47411
47770
  success: z.ZodBoolean;
47412
47771
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47415,7 +47774,6 @@ declare const AuthenticateMcpServerResultSchema: z.ZodObject<{
47415
47774
  success: z.ZodBoolean;
47416
47775
  }, z.ZodTypeAny, "passthrough">>;
47417
47776
  type AuthenticateMcpServerResult = z.infer<typeof AuthenticateMcpServerResultSchema>;
47418
- /** Result for droid.cancel_mcp_auth response. */
47419
47777
  declare const CancelMcpAuthResultSchema: z.ZodObject<{
47420
47778
  success: z.ZodBoolean;
47421
47779
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47424,7 +47782,6 @@ declare const CancelMcpAuthResultSchema: z.ZodObject<{
47424
47782
  success: z.ZodBoolean;
47425
47783
  }, z.ZodTypeAny, "passthrough">>;
47426
47784
  type CancelMcpAuthResult = z.infer<typeof CancelMcpAuthResultSchema>;
47427
- /** Result for droid.clear_mcp_auth response. */
47428
47785
  declare const ClearMcpAuthResultSchema: z.ZodObject<{
47429
47786
  success: z.ZodBoolean;
47430
47787
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47433,7 +47790,6 @@ declare const ClearMcpAuthResultSchema: z.ZodObject<{
47433
47790
  success: z.ZodBoolean;
47434
47791
  }, z.ZodTypeAny, "passthrough">>;
47435
47792
  type ClearMcpAuthResult = z.infer<typeof ClearMcpAuthResultSchema>;
47436
- /** Result for droid.submit_mcp_auth_code response. */
47437
47793
  declare const SubmitMcpAuthCodeResultSchema: z.ZodObject<{
47438
47794
  success: z.ZodBoolean;
47439
47795
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47442,7 +47798,6 @@ declare const SubmitMcpAuthCodeResultSchema: z.ZodObject<{
47442
47798
  success: z.ZodBoolean;
47443
47799
  }, z.ZodTypeAny, "passthrough">>;
47444
47800
  type SubmitMcpAuthCodeResult = z.infer<typeof SubmitMcpAuthCodeResultSchema>;
47445
- /** Result for droid.add_mcp_server response. */
47446
47801
  declare const AddMcpServerResultSchema: z.ZodObject<{
47447
47802
  success: z.ZodBoolean;
47448
47803
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47451,7 +47806,6 @@ declare const AddMcpServerResultSchema: z.ZodObject<{
47451
47806
  success: z.ZodBoolean;
47452
47807
  }, z.ZodTypeAny, "passthrough">>;
47453
47808
  type AddMcpServerResult = z.infer<typeof AddMcpServerResultSchema>;
47454
- /** Result for droid.remove_mcp_server response. */
47455
47809
  declare const RemoveMcpServerResultSchema: z.ZodObject<{
47456
47810
  success: z.ZodBoolean;
47457
47811
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47460,7 +47814,6 @@ declare const RemoveMcpServerResultSchema: z.ZodObject<{
47460
47814
  success: z.ZodBoolean;
47461
47815
  }, z.ZodTypeAny, "passthrough">>;
47462
47816
  type RemoveMcpServerResult = z.infer<typeof RemoveMcpServerResultSchema>;
47463
- /** Result for droid.list_mcp_registry response. */
47464
47817
  declare const ListMcpRegistryResultSchema: z.ZodObject<{
47465
47818
  servers: z.ZodArray<z.ZodObject<{
47466
47819
  name: z.ZodString;
@@ -47550,7 +47903,6 @@ declare const ListMcpRegistryResultSchema: z.ZodObject<{
47550
47903
  }, z.ZodTypeAny, "passthrough">>, "many">;
47551
47904
  }, z.ZodTypeAny, "passthrough">>;
47552
47905
  type ListMcpRegistryResult = z.infer<typeof ListMcpRegistryResultSchema>;
47553
- /** Result for droid.list_mcp_tools response. */
47554
47906
  declare const ListMcpToolsResultSchema: z.ZodObject<{
47555
47907
  tools: z.ZodArray<z.ZodObject<{
47556
47908
  serverName: z.ZodString;
@@ -47730,7 +48082,6 @@ declare const ListMcpToolsResultSchema: z.ZodObject<{
47730
48082
  }, z.ZodTypeAny, "passthrough">>, "many">;
47731
48083
  }, z.ZodTypeAny, "passthrough">>;
47732
48084
  type ListMcpToolsResult = z.infer<typeof ListMcpToolsResultSchema>;
47733
- /** Result for droid.list_tools response. */
47734
48085
  declare const ListToolsResultSchema: z.ZodObject<{
47735
48086
  tools: z.ZodArray<z.ZodObject<{
47736
48087
  id: z.ZodString;
@@ -47811,7 +48162,6 @@ declare const ListToolsResultSchema: z.ZodObject<{
47811
48162
  }, z.ZodTypeAny, "passthrough">>, "many">;
47812
48163
  }, z.ZodTypeAny, "passthrough">>;
47813
48164
  type ListToolsResult = z.infer<typeof ListToolsResultSchema>;
47814
- /** Result for droid.list_mcp_servers response. */
47815
48165
  declare const ListMcpServersResultSchema: z.ZodObject<{
47816
48166
  servers: z.ZodArray<z.ZodObject<{
47817
48167
  name: z.ZodString;
@@ -47958,7 +48308,6 @@ declare const ListMcpServersResultSchema: z.ZodObject<{
47958
48308
  }, z.ZodTypeAny, "passthrough">>;
47959
48309
  }, z.ZodTypeAny, "passthrough">>;
47960
48310
  type ListMcpServersResult = z.infer<typeof ListMcpServersResultSchema>;
47961
- /** Result for droid.toggle_mcp_tool response. */
47962
48311
  declare const ToggleMcpToolResultSchema: z.ZodObject<{
47963
48312
  success: z.ZodBoolean;
47964
48313
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -47967,7 +48316,6 @@ declare const ToggleMcpToolResultSchema: z.ZodObject<{
47967
48316
  success: z.ZodBoolean;
47968
48317
  }, z.ZodTypeAny, "passthrough">>;
47969
48318
  type ToggleMcpToolResult = z.infer<typeof ToggleMcpToolResultSchema>;
47970
- /** Result for droid.list_skills response. */
47971
48319
  declare const ListSkillsResultSchema: z.ZodObject<{
47972
48320
  skills: z.ZodArray<z.ZodObject<{
47973
48321
  name: z.ZodString;
@@ -48174,7 +48522,6 @@ declare const ListSkillsResultSchema: z.ZodObject<{
48174
48522
  }, z.ZodTypeAny, "passthrough">>, "many">;
48175
48523
  }, z.ZodTypeAny, "passthrough">>;
48176
48524
  type ListSkillsResult = z.infer<typeof ListSkillsResultSchema>;
48177
- /** Result for droid.submit_bug_report response. */
48178
48525
  declare const SubmitBugReportResultSchema: z.ZodObject<{
48179
48526
  bugReportId: z.ZodString;
48180
48527
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -48183,7 +48530,6 @@ declare const SubmitBugReportResultSchema: z.ZodObject<{
48183
48530
  bugReportId: z.ZodString;
48184
48531
  }, z.ZodTypeAny, "passthrough">>;
48185
48532
  type SubmitBugReportResult = z.infer<typeof SubmitBugReportResultSchema>;
48186
- /** Result for droid.get_rewind_info response. */
48187
48533
  declare const GetRewindInfoResultSchema: z.ZodObject<{
48188
48534
  availableFiles: z.ZodArray<z.ZodObject<{
48189
48535
  filePath: z.ZodString;
@@ -48279,7 +48625,6 @@ declare const GetRewindInfoResultSchema: z.ZodObject<{
48279
48625
  }, z.ZodTypeAny, "passthrough">>, "many">;
48280
48626
  }, z.ZodTypeAny, "passthrough">>;
48281
48627
  type GetRewindInfoResult = z.infer<typeof GetRewindInfoResultSchema>;
48282
- /** Result for droid.execute_rewind response. */
48283
48628
  declare const ExecuteRewindResultSchema: z.ZodObject<{
48284
48629
  newSessionId: z.ZodString;
48285
48630
  restoredCount: z.ZodNumber;
@@ -48300,7 +48645,6 @@ declare const ExecuteRewindResultSchema: z.ZodObject<{
48300
48645
  failedDeleteCount: z.ZodNumber;
48301
48646
  }, z.ZodTypeAny, "passthrough">>;
48302
48647
  type ExecuteRewindResult = z.infer<typeof ExecuteRewindResultSchema>;
48303
- /** Result for droid.compact_session response. */
48304
48648
  declare const CompactSessionResultSchema: z.ZodObject<{
48305
48649
  newSessionId: z.ZodString;
48306
48650
  removedCount: z.ZodNumber;
@@ -48312,7 +48656,6 @@ declare const CompactSessionResultSchema: z.ZodObject<{
48312
48656
  removedCount: z.ZodNumber;
48313
48657
  }, z.ZodTypeAny, "passthrough">>;
48314
48658
  type CompactSessionResult = z.infer<typeof CompactSessionResultSchema>;
48315
- /** Result for droid.fork_session response. */
48316
48659
  declare const ForkSessionResultSchema: z.ZodObject<{
48317
48660
  newSessionId: z.ZodString;
48318
48661
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -48321,7 +48664,6 @@ declare const ForkSessionResultSchema: z.ZodObject<{
48321
48664
  newSessionId: z.ZodString;
48322
48665
  }, z.ZodTypeAny, "passthrough">>;
48323
48666
  type ForkSessionResult = z.infer<typeof ForkSessionResultSchema>;
48324
- /** Result for droid.get_context_stats response. */
48325
48667
  declare const GetContextStatsResultSchema: z.ZodObject<{
48326
48668
  used: z.ZodNumber;
48327
48669
  remaining: z.ZodNumber;
@@ -48342,7 +48684,78 @@ declare const GetContextStatsResultSchema: z.ZodObject<{
48342
48684
  updatedAt: z.ZodString;
48343
48685
  }, z.ZodTypeAny, "passthrough">>;
48344
48686
  type GetContextStatsResult = z.infer<typeof GetContextStatsResultSchema>;
48345
- /** Result for droid.rename_session response. */
48687
+ declare const ContextBreakdownCategorySchema: z.ZodObject<{
48688
+ name: z.ZodString;
48689
+ tokens: z.ZodNumber;
48690
+ colorKey: z.ZodString;
48691
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48692
+ name: z.ZodString;
48693
+ tokens: z.ZodNumber;
48694
+ colorKey: z.ZodString;
48695
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
48696
+ name: z.ZodString;
48697
+ tokens: z.ZodNumber;
48698
+ colorKey: z.ZodString;
48699
+ }, z.ZodTypeAny, "passthrough">>;
48700
+ declare const ContextBreakdownResultSchema: z.ZodObject<{
48701
+ modelId: z.ZodString;
48702
+ modelDisplayName: z.ZodString;
48703
+ contextBudget: z.ZodNumber;
48704
+ usedTokens: z.ZodNumber;
48705
+ freeTokens: z.ZodNumber;
48706
+ categories: z.ZodArray<z.ZodObject<{
48707
+ name: z.ZodString;
48708
+ tokens: z.ZodNumber;
48709
+ colorKey: z.ZodString;
48710
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48711
+ name: z.ZodString;
48712
+ tokens: z.ZodNumber;
48713
+ colorKey: z.ZodString;
48714
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
48715
+ name: z.ZodString;
48716
+ tokens: z.ZodNumber;
48717
+ colorKey: z.ZodString;
48718
+ }, z.ZodTypeAny, "passthrough">>, "many">;
48719
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48720
+ modelId: z.ZodString;
48721
+ modelDisplayName: z.ZodString;
48722
+ contextBudget: z.ZodNumber;
48723
+ usedTokens: z.ZodNumber;
48724
+ freeTokens: z.ZodNumber;
48725
+ categories: z.ZodArray<z.ZodObject<{
48726
+ name: z.ZodString;
48727
+ tokens: z.ZodNumber;
48728
+ colorKey: z.ZodString;
48729
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48730
+ name: z.ZodString;
48731
+ tokens: z.ZodNumber;
48732
+ colorKey: z.ZodString;
48733
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
48734
+ name: z.ZodString;
48735
+ tokens: z.ZodNumber;
48736
+ colorKey: z.ZodString;
48737
+ }, z.ZodTypeAny, "passthrough">>, "many">;
48738
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
48739
+ modelId: z.ZodString;
48740
+ modelDisplayName: z.ZodString;
48741
+ contextBudget: z.ZodNumber;
48742
+ usedTokens: z.ZodNumber;
48743
+ freeTokens: z.ZodNumber;
48744
+ categories: z.ZodArray<z.ZodObject<{
48745
+ name: z.ZodString;
48746
+ tokens: z.ZodNumber;
48747
+ colorKey: z.ZodString;
48748
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48749
+ name: z.ZodString;
48750
+ tokens: z.ZodNumber;
48751
+ colorKey: z.ZodString;
48752
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
48753
+ name: z.ZodString;
48754
+ tokens: z.ZodNumber;
48755
+ colorKey: z.ZodString;
48756
+ }, z.ZodTypeAny, "passthrough">>, "many">;
48757
+ }, z.ZodTypeAny, "passthrough">>;
48758
+ type ContextBreakdownResult = z.infer<typeof ContextBreakdownResultSchema>;
48346
48759
  declare const RenameSessionResultSchema: z.ZodObject<{
48347
48760
  success: z.ZodBoolean;
48348
48761
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -49299,6 +49712,112 @@ declare const InterruptSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
49299
49712
  } | undefined;
49300
49713
  }>]>;
49301
49714
  type InterruptSessionResponse = z.infer<typeof InterruptSessionResponseSchema>;
49715
+ declare const CloseSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
49716
+ jsonrpc: z.ZodLiteral<"2.0">;
49717
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
49718
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
49719
+ _meta: z.ZodOptional<z.ZodObject<{
49720
+ traceparent: z.ZodOptional<z.ZodString>;
49721
+ tracestate: z.ZodOptional<z.ZodString>;
49722
+ }, "strip", z.ZodTypeAny, {
49723
+ traceparent?: string | undefined;
49724
+ tracestate?: string | undefined;
49725
+ }, {
49726
+ traceparent?: string | undefined;
49727
+ tracestate?: string | undefined;
49728
+ }>>;
49729
+ type: z.ZodLiteral<"response">;
49730
+ id: z.ZodString;
49731
+ } & {
49732
+ result: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
49733
+ }, "strip", z.ZodTypeAny, {
49734
+ type: "response";
49735
+ jsonrpc: "2.0";
49736
+ factoryApiVersion: "1.0.0";
49737
+ id: string;
49738
+ result: {} & {
49739
+ [k: string]: unknown;
49740
+ };
49741
+ factoryProtocolVersion?: string | undefined;
49742
+ _meta?: {
49743
+ traceparent?: string | undefined;
49744
+ tracestate?: string | undefined;
49745
+ } | undefined;
49746
+ }, {
49747
+ type: "response";
49748
+ jsonrpc: "2.0";
49749
+ factoryApiVersion: "1.0.0";
49750
+ id: string;
49751
+ result: {} & {
49752
+ [k: string]: unknown;
49753
+ };
49754
+ factoryProtocolVersion?: string | undefined;
49755
+ _meta?: {
49756
+ traceparent?: string | undefined;
49757
+ tracestate?: string | undefined;
49758
+ } | undefined;
49759
+ }>, z.ZodObject<{
49760
+ jsonrpc: z.ZodLiteral<"2.0">;
49761
+ factoryApiVersion: z.ZodLiteral<"1.0.0">;
49762
+ factoryProtocolVersion: z.ZodOptional<z.ZodString>;
49763
+ _meta: z.ZodOptional<z.ZodObject<{
49764
+ traceparent: z.ZodOptional<z.ZodString>;
49765
+ tracestate: z.ZodOptional<z.ZodString>;
49766
+ }, "strip", z.ZodTypeAny, {
49767
+ traceparent?: string | undefined;
49768
+ tracestate?: string | undefined;
49769
+ }, {
49770
+ traceparent?: string | undefined;
49771
+ tracestate?: string | undefined;
49772
+ }>>;
49773
+ } & {
49774
+ type: z.ZodLiteral<"response">;
49775
+ id: z.ZodNullable<z.ZodString>;
49776
+ error: z.ZodObject<{
49777
+ code: z.ZodNativeEnum<typeof JsonRpcErrorCode>;
49778
+ message: z.ZodString;
49779
+ data: z.ZodOptional<z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>;
49780
+ }, "strip", z.ZodTypeAny, {
49781
+ code: JsonRpcErrorCode;
49782
+ message: string;
49783
+ data?: JsonValue | undefined;
49784
+ }, {
49785
+ code: JsonRpcErrorCode;
49786
+ message: string;
49787
+ data?: JsonValue | undefined;
49788
+ }>;
49789
+ }, "strip", z.ZodTypeAny, {
49790
+ error: {
49791
+ code: JsonRpcErrorCode;
49792
+ message: string;
49793
+ data?: JsonValue | undefined;
49794
+ };
49795
+ type: "response";
49796
+ jsonrpc: "2.0";
49797
+ factoryApiVersion: "1.0.0";
49798
+ id: string | null;
49799
+ factoryProtocolVersion?: string | undefined;
49800
+ _meta?: {
49801
+ traceparent?: string | undefined;
49802
+ tracestate?: string | undefined;
49803
+ } | undefined;
49804
+ }, {
49805
+ error: {
49806
+ code: JsonRpcErrorCode;
49807
+ message: string;
49808
+ data?: JsonValue | undefined;
49809
+ };
49810
+ type: "response";
49811
+ jsonrpc: "2.0";
49812
+ factoryApiVersion: "1.0.0";
49813
+ id: string | null;
49814
+ factoryProtocolVersion?: string | undefined;
49815
+ _meta?: {
49816
+ traceparent?: string | undefined;
49817
+ tracestate?: string | undefined;
49818
+ } | undefined;
49819
+ }>]>;
49820
+ type CloseSessionResponse = z.infer<typeof CloseSessionResponseSchema>;
49302
49821
  declare const KillWorkerSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
49303
49822
  jsonrpc: z.ZodLiteral<"2.0">;
49304
49823
  factoryApiVersion: z.ZodLiteral<"1.0.0">;
@@ -52818,7 +53337,6 @@ declare const ToolUseSchema: z.ZodObject<{
52818
53337
  name: z.ZodString;
52819
53338
  thoughtSignature: z.ZodOptional<z.ZodString>;
52820
53339
  }, z.ZodTypeAny, "passthrough">>;
52821
- /** Error detail object within an ErrorNotification. */
52822
53340
  declare const ErrorDetailSchema: z.ZodObject<{
52823
53341
  name: z.ZodString;
52824
53342
  message: z.ZodString;
@@ -52830,7 +53348,6 @@ declare const ErrorDetailSchema: z.ZodObject<{
52830
53348
  message: z.ZodString;
52831
53349
  }, z.ZodTypeAny, "passthrough">>;
52832
53350
  type ErrorDetail = z.infer<typeof ErrorDetailSchema>;
52833
- /** Streaming update from subagent tool calls. */
52834
53351
  declare const ToolProgressUpdateSchema: z.ZodObject<{
52835
53352
  type: z.ZodEnum<["tool_call", "tool_result", "error", "status", "message"]>;
52836
53353
  toolName: z.ZodOptional<z.ZodString>;
@@ -52866,7 +53383,6 @@ declare const ToolProgressUpdateSchema: z.ZodObject<{
52866
53383
  subagentSessionId: z.ZodOptional<z.ZodString>;
52867
53384
  }, z.ZodTypeAny, "passthrough">>;
52868
53385
  type ToolProgressUpdate = z.infer<typeof ToolProgressUpdateSchema>;
52869
- /** Settings payload within SettingsUpdatedNotification. */
52870
53386
  declare const SettingsUpdatedPayloadSchema: z.ZodObject<{
52871
53387
  enabledToolIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52872
53388
  disabledToolIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -52899,7 +53415,6 @@ declare const SettingsUpdatedPayloadSchema: z.ZodObject<{
52899
53415
  specModeReasoningEffort: z.ZodOptional<z.ZodNativeEnum<typeof ReasoningEffort>>;
52900
53416
  }, z.ZodTypeAny, "passthrough">>;
52901
53417
  type SettingsUpdatedPayload = z.infer<typeof SettingsUpdatedPayloadSchema>;
52902
- /** Tool result notification. */
52903
53418
  declare const ToolResultNotificationSchema: z.ZodObject<{
52904
53419
  type: z.ZodLiteral<SessionNotificationType.TOOL_RESULT>;
52905
53420
  messageId: z.ZodString;
@@ -52923,7 +53438,6 @@ declare const ToolResultNotificationSchema: z.ZodObject<{
52923
53438
  id: z.ZodOptional<z.ZodString>;
52924
53439
  }, z.ZodTypeAny, "passthrough">>;
52925
53440
  type ToolResultNotification = z.infer<typeof ToolResultNotificationSchema>;
52926
- /** Tool progress update notification. */
52927
53441
  declare const ToolProgressUpdateNotificationSchema: z.ZodObject<{
52928
53442
  type: z.ZodLiteral<SessionNotificationType.TOOL_PROGRESS_UPDATE>;
52929
53443
  toolUseId: z.ZodString;
@@ -53040,7 +53554,6 @@ declare const ToolProgressUpdateNotificationSchema: z.ZodObject<{
53040
53554
  }, z.ZodTypeAny, "passthrough">>;
53041
53555
  }, z.ZodTypeAny, "passthrough">>;
53042
53556
  type ToolProgressUpdateNotification = z.infer<typeof ToolProgressUpdateNotificationSchema>;
53043
- /** Create message notification. */
53044
53557
  declare const CreateMessageNotificationSchema: z.ZodObject<{
53045
53558
  type: z.ZodLiteral<SessionNotificationType.CREATE_MESSAGE>;
53046
53559
  message: z.ZodObject<{
@@ -54381,7 +54894,6 @@ declare const CreateMessageNotificationSchema: z.ZodObject<{
54381
54894
  requestId: z.ZodOptional<z.ZodString>;
54382
54895
  }, z.ZodTypeAny, "passthrough">>;
54383
54896
  type CreateMessageNotification = z.infer<typeof CreateMessageNotificationSchema>;
54384
- /** Error notification. */
54385
54897
  declare const ErrorNotificationSchema: z.ZodObject<{
54386
54898
  type: z.ZodLiteral<SessionNotificationType.ERROR>;
54387
54899
  message: z.ZodString;
@@ -54429,7 +54941,6 @@ declare const ErrorNotificationSchema: z.ZodObject<{
54429
54941
  }, z.ZodTypeAny, "passthrough">>>;
54430
54942
  }, z.ZodTypeAny, "passthrough">>;
54431
54943
  type ErrorNotification = z.infer<typeof ErrorNotificationSchema>;
54432
- /** Droid working state changed notification. */
54433
54944
  declare const DroidWorkingStateChangedNotificationSchema: z.ZodObject<{
54434
54945
  type: z.ZodLiteral<SessionNotificationType.DROID_WORKING_STATE_CHANGED>;
54435
54946
  newState: z.ZodNativeEnum<typeof DroidWorkingState>;
@@ -54441,7 +54952,6 @@ declare const DroidWorkingStateChangedNotificationSchema: z.ZodObject<{
54441
54952
  newState: z.ZodNativeEnum<typeof DroidWorkingState>;
54442
54953
  }, z.ZodTypeAny, "passthrough">>;
54443
54954
  type DroidWorkingStateChangedNotification = z.infer<typeof DroidWorkingStateChangedNotificationSchema>;
54444
- /** Permission resolved notification. */
54445
54955
  declare const PermissionResolvedNotificationSchema: z.ZodObject<{
54446
54956
  type: z.ZodLiteral<SessionNotificationType.PERMISSION_RESOLVED>;
54447
54957
  requestId: z.ZodString;
@@ -54459,7 +54969,6 @@ declare const PermissionResolvedNotificationSchema: z.ZodObject<{
54459
54969
  selectedOption: z.ZodNativeEnum<typeof ToolConfirmationOutcome>;
54460
54970
  }, z.ZodTypeAny, "passthrough">>;
54461
54971
  type PermissionResolvedNotification = z.infer<typeof PermissionResolvedNotificationSchema>;
54462
- /** Settings updated notification. */
54463
54972
  declare const SettingsUpdatedNotificationSchema: z.ZodObject<{
54464
54973
  type: z.ZodLiteral<SessionNotificationType.SETTINGS_UPDATED>;
54465
54974
  settings: z.ZodObject<{
@@ -54561,7 +55070,6 @@ declare const SettingsUpdatedNotificationSchema: z.ZodObject<{
54561
55070
  }, z.ZodTypeAny, "passthrough">>;
54562
55071
  }, z.ZodTypeAny, "passthrough">>;
54563
55072
  type SettingsUpdatedNotification = z.infer<typeof SettingsUpdatedNotificationSchema>;
54564
- /** Session title updated notification. */
54565
55073
  declare const SessionTitleUpdatedNotificationSchema: z.ZodObject<{
54566
55074
  type: z.ZodLiteral<SessionNotificationType.SESSION_TITLE_UPDATED>;
54567
55075
  title: z.ZodString;
@@ -54573,7 +55081,6 @@ declare const SessionTitleUpdatedNotificationSchema: z.ZodObject<{
54573
55081
  title: z.ZodString;
54574
55082
  }, z.ZodTypeAny, "passthrough">>;
54575
55083
  type SessionTitleUpdatedNotification = z.infer<typeof SessionTitleUpdatedNotificationSchema>;
54576
- /** MCP status changed notification. */
54577
55084
  declare const McpStatusChangedNotificationSchema: z.ZodObject<{
54578
55085
  type: z.ZodLiteral<SessionNotificationType.MCP_STATUS_CHANGED>;
54579
55086
  servers: z.ZodArray<z.ZodObject<{
@@ -54741,7 +55248,21 @@ declare const AssistantTextDeltaNotificationSchema: z.ZodObject<{
54741
55248
  textDelta: z.ZodString;
54742
55249
  }, z.ZodTypeAny, "passthrough">>;
54743
55250
  type AssistantTextDeltaNotification = z.infer<typeof AssistantTextDeltaNotificationSchema>;
54744
- /** Thinking text delta notification (streaming thinking token). */
55251
+ /** Assistant text complete notification (streaming block finished). */
55252
+ declare const AssistantTextCompleteNotificationSchema: z.ZodObject<{
55253
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
55254
+ messageId: z.ZodString;
55255
+ blockIndex: z.ZodNumber;
55256
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55257
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
55258
+ messageId: z.ZodString;
55259
+ blockIndex: z.ZodNumber;
55260
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55261
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
55262
+ messageId: z.ZodString;
55263
+ blockIndex: z.ZodNumber;
55264
+ }, z.ZodTypeAny, "passthrough">>;
55265
+ type AssistantTextCompleteNotification = z.infer<typeof AssistantTextCompleteNotificationSchema>;
54745
55266
  declare const ThinkingTextDeltaNotificationSchema: z.ZodObject<{
54746
55267
  type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_DELTA>;
54747
55268
  messageId: z.ZodString;
@@ -54759,7 +55280,88 @@ declare const ThinkingTextDeltaNotificationSchema: z.ZodObject<{
54759
55280
  textDelta: z.ZodString;
54760
55281
  }, z.ZodTypeAny, "passthrough">>;
54761
55282
  type ThinkingTextDeltaNotification = z.infer<typeof ThinkingTextDeltaNotificationSchema>;
54762
- /** Session token usage changed notification. */
55283
+ declare const ThinkingTextCompleteNotificationSchema: z.ZodObject<{
55284
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
55285
+ messageId: z.ZodString;
55286
+ blockIndex: z.ZodNumber;
55287
+ durationMs: z.ZodOptional<z.ZodNumber>;
55288
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55289
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
55290
+ messageId: z.ZodString;
55291
+ blockIndex: z.ZodNumber;
55292
+ durationMs: z.ZodOptional<z.ZodNumber>;
55293
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55294
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
55295
+ messageId: z.ZodString;
55296
+ blockIndex: z.ZodNumber;
55297
+ durationMs: z.ZodOptional<z.ZodNumber>;
55298
+ }, z.ZodTypeAny, "passthrough">>;
55299
+ type ThinkingTextCompleteNotification = z.infer<typeof ThinkingTextCompleteNotificationSchema>;
55300
+ declare const ToolCallNotificationSchema: z.ZodObject<{
55301
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
55302
+ toolUse: z.ZodObject<{
55303
+ type: z.ZodLiteral<"tool_use">;
55304
+ id: z.ZodString;
55305
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55306
+ name: z.ZodString;
55307
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55308
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55309
+ type: z.ZodLiteral<"tool_use">;
55310
+ id: z.ZodString;
55311
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55312
+ name: z.ZodString;
55313
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55314
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55315
+ type: z.ZodLiteral<"tool_use">;
55316
+ id: z.ZodString;
55317
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55318
+ name: z.ZodString;
55319
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55320
+ }, z.ZodTypeAny, "passthrough">>;
55321
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55322
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
55323
+ toolUse: z.ZodObject<{
55324
+ type: z.ZodLiteral<"tool_use">;
55325
+ id: z.ZodString;
55326
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55327
+ name: z.ZodString;
55328
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55329
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55330
+ type: z.ZodLiteral<"tool_use">;
55331
+ id: z.ZodString;
55332
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55333
+ name: z.ZodString;
55334
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55335
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55336
+ type: z.ZodLiteral<"tool_use">;
55337
+ id: z.ZodString;
55338
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55339
+ name: z.ZodString;
55340
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55341
+ }, z.ZodTypeAny, "passthrough">>;
55342
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55343
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
55344
+ toolUse: z.ZodObject<{
55345
+ type: z.ZodLiteral<"tool_use">;
55346
+ id: z.ZodString;
55347
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55348
+ name: z.ZodString;
55349
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55350
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55351
+ type: z.ZodLiteral<"tool_use">;
55352
+ id: z.ZodString;
55353
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55354
+ name: z.ZodString;
55355
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55356
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55357
+ type: z.ZodLiteral<"tool_use">;
55358
+ id: z.ZodString;
55359
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
55360
+ name: z.ZodString;
55361
+ thoughtSignature: z.ZodOptional<z.ZodString>;
55362
+ }, z.ZodTypeAny, "passthrough">>;
55363
+ }, z.ZodTypeAny, "passthrough">>;
55364
+ type ToolCallNotification = z.infer<typeof ToolCallNotificationSchema>;
54763
55365
  declare const SessionTokenUsageChangedNotificationSchema: z.ZodObject<{
54764
55366
  type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
54765
55367
  sessionId: z.ZodString;
@@ -54828,7 +55430,6 @@ declare const SessionTokenUsageChangedNotificationSchema: z.ZodObject<{
54828
55430
  }, z.ZodTypeAny, "passthrough">>;
54829
55431
  }, z.ZodTypeAny, "passthrough">>;
54830
55432
  type SessionTokenUsageChangedNotification = z.infer<typeof SessionTokenUsageChangedNotificationSchema>;
54831
- /** Mission state changed notification. */
54832
55433
  declare const MissionStateChangedNotificationSchema: z.ZodObject<{
54833
55434
  type: z.ZodLiteral<SessionNotificationType.MISSION_STATE_CHANGED>;
54834
55435
  state: z.ZodNativeEnum<typeof MissionState>;
@@ -54840,7 +55441,6 @@ declare const MissionStateChangedNotificationSchema: z.ZodObject<{
54840
55441
  state: z.ZodNativeEnum<typeof MissionState>;
54841
55442
  }, z.ZodTypeAny, "passthrough">>;
54842
55443
  type MissionStateChangedNotification = z.infer<typeof MissionStateChangedNotificationSchema>;
54843
- /** Mission features changed notification. */
54844
55444
  declare const MissionFeaturesChangedNotificationSchema: z.ZodObject<{
54845
55445
  type: z.ZodLiteral<SessionNotificationType.MISSION_FEATURES_CHANGED>;
54846
55446
  features: z.ZodArray<z.ZodObject<{
@@ -54969,7 +55569,6 @@ declare const MissionFeaturesChangedNotificationSchema: z.ZodObject<{
54969
55569
  }, z.ZodTypeAny, "passthrough">>, "many">;
54970
55570
  }, z.ZodTypeAny, "passthrough">>;
54971
55571
  type MissionFeaturesChangedNotification = z.infer<typeof MissionFeaturesChangedNotificationSchema>;
54972
- /** Mission progress entry notification. */
54973
55572
  declare const MissionProgressEntryNotificationSchema: z.ZodObject<{
54974
55573
  type: z.ZodLiteral<SessionNotificationType.MISSION_PROGRESS_ENTRY>;
54975
55574
  progressLog: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -62748,7 +63347,6 @@ declare const MissionProgressEntryNotificationSchema: z.ZodObject<{
62748
63347
  }, z.ZodTypeAny, "passthrough">>]>, "many">;
62749
63348
  }, z.ZodTypeAny, "passthrough">>;
62750
63349
  type MissionProgressEntryNotification = z.infer<typeof MissionProgressEntryNotificationSchema>;
62751
- /** Mission heartbeat notification. */
62752
63350
  declare const MissionHeartbeatNotificationSchema: z.ZodObject<{
62753
63351
  type: z.ZodLiteral<SessionNotificationType.MISSION_HEARTBEAT>;
62754
63352
  timestamp: z.ZodString;
@@ -62760,7 +63358,6 @@ declare const MissionHeartbeatNotificationSchema: z.ZodObject<{
62760
63358
  timestamp: z.ZodString;
62761
63359
  }, z.ZodTypeAny, "passthrough">>;
62762
63360
  type MissionHeartbeatNotification = z.infer<typeof MissionHeartbeatNotificationSchema>;
62763
- /** Mission worker started notification. */
62764
63361
  declare const MissionWorkerStartedNotificationSchema: z.ZodObject<{
62765
63362
  type: z.ZodLiteral<SessionNotificationType.MISSION_WORKER_STARTED>;
62766
63363
  workerSessionId: z.ZodString;
@@ -62772,7 +63369,6 @@ declare const MissionWorkerStartedNotificationSchema: z.ZodObject<{
62772
63369
  workerSessionId: z.ZodString;
62773
63370
  }, z.ZodTypeAny, "passthrough">>;
62774
63371
  type MissionWorkerStartedNotification = z.infer<typeof MissionWorkerStartedNotificationSchema>;
62775
- /** Mission worker completed notification. */
62776
63372
  declare const MissionWorkerCompletedNotificationSchema: z.ZodObject<{
62777
63373
  type: z.ZodLiteral<SessionNotificationType.MISSION_WORKER_COMPLETED>;
62778
63374
  workerSessionId: z.ZodString;
@@ -62787,7 +63383,6 @@ declare const MissionWorkerCompletedNotificationSchema: z.ZodObject<{
62787
63383
  exitCode: z.ZodNumber;
62788
63384
  }, z.ZodTypeAny, "passthrough">>;
62789
63385
  type MissionWorkerCompletedNotification = z.infer<typeof MissionWorkerCompletedNotificationSchema>;
62790
- /** MCP authentication required notification. */
62791
63386
  declare const McpAuthRequiredNotificationSchema: z.ZodObject<{
62792
63387
  type: z.ZodLiteral<SessionNotificationType.MCP_AUTH_REQUIRED>;
62793
63388
  serverName: z.ZodString;
@@ -62808,7 +63403,6 @@ declare const McpAuthRequiredNotificationSchema: z.ZodObject<{
62808
63403
  state: z.ZodString;
62809
63404
  }, z.ZodTypeAny, "passthrough">>;
62810
63405
  type McpAuthRequiredNotification = z.infer<typeof McpAuthRequiredNotificationSchema>;
62811
- /** MCP authentication completed notification. */
62812
63406
  declare const McpAuthCompletedNotificationSchema: z.ZodObject<{
62813
63407
  type: z.ZodLiteral<SessionNotificationType.MCP_AUTH_COMPLETED>;
62814
63408
  serverName: z.ZodString;
@@ -62826,6 +63420,242 @@ declare const McpAuthCompletedNotificationSchema: z.ZodObject<{
62826
63420
  message: z.ZodString;
62827
63421
  }, z.ZodTypeAny, "passthrough">>;
62828
63422
  type McpAuthCompletedNotification = z.infer<typeof McpAuthCompletedNotificationSchema>;
63423
+ declare const HookCommandSchema: z.ZodObject<{
63424
+ command: z.ZodString;
63425
+ timeout: z.ZodOptional<z.ZodNumber>;
63426
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63427
+ command: z.ZodString;
63428
+ timeout: z.ZodOptional<z.ZodNumber>;
63429
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63430
+ command: z.ZodString;
63431
+ timeout: z.ZodOptional<z.ZodNumber>;
63432
+ }, z.ZodTypeAny, "passthrough">>;
63433
+ type HookCommand = z.infer<typeof HookCommandSchema>;
63434
+ declare const HookResultSchema: z.ZodObject<{
63435
+ exitCode: z.ZodNumber;
63436
+ stdout: z.ZodString;
63437
+ stderr: z.ZodString;
63438
+ command: z.ZodOptional<z.ZodString>;
63439
+ timeout: z.ZodOptional<z.ZodNumber>;
63440
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63441
+ exitCode: z.ZodNumber;
63442
+ stdout: z.ZodString;
63443
+ stderr: z.ZodString;
63444
+ command: z.ZodOptional<z.ZodString>;
63445
+ timeout: z.ZodOptional<z.ZodNumber>;
63446
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63447
+ exitCode: z.ZodNumber;
63448
+ stdout: z.ZodString;
63449
+ stderr: z.ZodString;
63450
+ command: z.ZodOptional<z.ZodString>;
63451
+ timeout: z.ZodOptional<z.ZodNumber>;
63452
+ }, z.ZodTypeAny, "passthrough">>;
63453
+ type HookResult = z.infer<typeof HookResultSchema>;
63454
+ declare const HookExecutionStartedNotificationSchema: z.ZodObject<{
63455
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
63456
+ hookId: z.ZodString;
63457
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
63458
+ hookMatcher: z.ZodOptional<z.ZodString>;
63459
+ hookCommands: z.ZodArray<z.ZodObject<{
63460
+ command: z.ZodString;
63461
+ timeout: z.ZodOptional<z.ZodNumber>;
63462
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63463
+ command: z.ZodString;
63464
+ timeout: z.ZodOptional<z.ZodNumber>;
63465
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63466
+ command: z.ZodString;
63467
+ timeout: z.ZodOptional<z.ZodNumber>;
63468
+ }, z.ZodTypeAny, "passthrough">>, "many">;
63469
+ hookToolCallId: z.ZodOptional<z.ZodString>;
63470
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
63471
+ parallelGroupId: z.ZodOptional<z.ZodString>;
63472
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63473
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
63474
+ hookId: z.ZodString;
63475
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
63476
+ hookMatcher: z.ZodOptional<z.ZodString>;
63477
+ hookCommands: z.ZodArray<z.ZodObject<{
63478
+ command: z.ZodString;
63479
+ timeout: z.ZodOptional<z.ZodNumber>;
63480
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63481
+ command: z.ZodString;
63482
+ timeout: z.ZodOptional<z.ZodNumber>;
63483
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63484
+ command: z.ZodString;
63485
+ timeout: z.ZodOptional<z.ZodNumber>;
63486
+ }, z.ZodTypeAny, "passthrough">>, "many">;
63487
+ hookToolCallId: z.ZodOptional<z.ZodString>;
63488
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
63489
+ parallelGroupId: z.ZodOptional<z.ZodString>;
63490
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63491
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
63492
+ hookId: z.ZodString;
63493
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
63494
+ hookMatcher: z.ZodOptional<z.ZodString>;
63495
+ hookCommands: z.ZodArray<z.ZodObject<{
63496
+ command: z.ZodString;
63497
+ timeout: z.ZodOptional<z.ZodNumber>;
63498
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63499
+ command: z.ZodString;
63500
+ timeout: z.ZodOptional<z.ZodNumber>;
63501
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63502
+ command: z.ZodString;
63503
+ timeout: z.ZodOptional<z.ZodNumber>;
63504
+ }, z.ZodTypeAny, "passthrough">>, "many">;
63505
+ hookToolCallId: z.ZodOptional<z.ZodString>;
63506
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
63507
+ parallelGroupId: z.ZodOptional<z.ZodString>;
63508
+ }, z.ZodTypeAny, "passthrough">>;
63509
+ type HookExecutionStartedNotification = z.infer<typeof HookExecutionStartedNotificationSchema>;
63510
+ declare const HookExecutionCompletedNotificationSchema: z.ZodObject<{
63511
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
63512
+ hookId: z.ZodString;
63513
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
63514
+ hookMatcher: z.ZodOptional<z.ZodString>;
63515
+ hookToolCallId: z.ZodOptional<z.ZodString>;
63516
+ hookStatus: z.ZodEnum<["completed", "error"]>;
63517
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
63518
+ exitCode: z.ZodNumber;
63519
+ stdout: z.ZodString;
63520
+ stderr: z.ZodString;
63521
+ command: z.ZodOptional<z.ZodString>;
63522
+ timeout: z.ZodOptional<z.ZodNumber>;
63523
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63524
+ exitCode: z.ZodNumber;
63525
+ stdout: z.ZodString;
63526
+ stderr: z.ZodString;
63527
+ command: z.ZodOptional<z.ZodString>;
63528
+ timeout: z.ZodOptional<z.ZodNumber>;
63529
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63530
+ exitCode: z.ZodNumber;
63531
+ stdout: z.ZodString;
63532
+ stderr: z.ZodString;
63533
+ command: z.ZodOptional<z.ZodString>;
63534
+ timeout: z.ZodOptional<z.ZodNumber>;
63535
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
63536
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63537
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
63538
+ hookId: z.ZodString;
63539
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
63540
+ hookMatcher: z.ZodOptional<z.ZodString>;
63541
+ hookToolCallId: z.ZodOptional<z.ZodString>;
63542
+ hookStatus: z.ZodEnum<["completed", "error"]>;
63543
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
63544
+ exitCode: z.ZodNumber;
63545
+ stdout: z.ZodString;
63546
+ stderr: z.ZodString;
63547
+ command: z.ZodOptional<z.ZodString>;
63548
+ timeout: z.ZodOptional<z.ZodNumber>;
63549
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63550
+ exitCode: z.ZodNumber;
63551
+ stdout: z.ZodString;
63552
+ stderr: z.ZodString;
63553
+ command: z.ZodOptional<z.ZodString>;
63554
+ timeout: z.ZodOptional<z.ZodNumber>;
63555
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63556
+ exitCode: z.ZodNumber;
63557
+ stdout: z.ZodString;
63558
+ stderr: z.ZodString;
63559
+ command: z.ZodOptional<z.ZodString>;
63560
+ timeout: z.ZodOptional<z.ZodNumber>;
63561
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
63562
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63563
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
63564
+ hookId: z.ZodString;
63565
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
63566
+ hookMatcher: z.ZodOptional<z.ZodString>;
63567
+ hookToolCallId: z.ZodOptional<z.ZodString>;
63568
+ hookStatus: z.ZodEnum<["completed", "error"]>;
63569
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
63570
+ exitCode: z.ZodNumber;
63571
+ stdout: z.ZodString;
63572
+ stderr: z.ZodString;
63573
+ command: z.ZodOptional<z.ZodString>;
63574
+ timeout: z.ZodOptional<z.ZodNumber>;
63575
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63576
+ exitCode: z.ZodNumber;
63577
+ stdout: z.ZodString;
63578
+ stderr: z.ZodString;
63579
+ command: z.ZodOptional<z.ZodString>;
63580
+ timeout: z.ZodOptional<z.ZodNumber>;
63581
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63582
+ exitCode: z.ZodNumber;
63583
+ stdout: z.ZodString;
63584
+ stderr: z.ZodString;
63585
+ command: z.ZodOptional<z.ZodString>;
63586
+ timeout: z.ZodOptional<z.ZodNumber>;
63587
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
63588
+ }, z.ZodTypeAny, "passthrough">>;
63589
+ type HookExecutionCompletedNotification = z.infer<typeof HookExecutionCompletedNotificationSchema>;
63590
+ /** Structured output validation error emitted by Droid. */
63591
+ declare const StructuredOutputErrorSchema: z.ZodObject<{
63592
+ code: z.ZodString;
63593
+ message: z.ZodString;
63594
+ details: z.ZodOptional<z.ZodUnknown>;
63595
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63596
+ code: z.ZodString;
63597
+ message: z.ZodString;
63598
+ details: z.ZodOptional<z.ZodUnknown>;
63599
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63600
+ code: z.ZodString;
63601
+ message: z.ZodString;
63602
+ details: z.ZodOptional<z.ZodUnknown>;
63603
+ }, z.ZodTypeAny, "passthrough">>;
63604
+ type StructuredOutputError = z.infer<typeof StructuredOutputErrorSchema>;
63605
+ /** Backend-validated structured output for the completed turn. */
63606
+ declare const StructuredOutputNotificationSchema: z.ZodObject<{
63607
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
63608
+ messageId: z.ZodString;
63609
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
63610
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
63611
+ code: z.ZodString;
63612
+ message: z.ZodString;
63613
+ details: z.ZodOptional<z.ZodUnknown>;
63614
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63615
+ code: z.ZodString;
63616
+ message: z.ZodString;
63617
+ details: z.ZodOptional<z.ZodUnknown>;
63618
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63619
+ code: z.ZodString;
63620
+ message: z.ZodString;
63621
+ details: z.ZodOptional<z.ZodUnknown>;
63622
+ }, z.ZodTypeAny, "passthrough">>>;
63623
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63624
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
63625
+ messageId: z.ZodString;
63626
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
63627
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
63628
+ code: z.ZodString;
63629
+ message: z.ZodString;
63630
+ details: z.ZodOptional<z.ZodUnknown>;
63631
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63632
+ code: z.ZodString;
63633
+ message: z.ZodString;
63634
+ details: z.ZodOptional<z.ZodUnknown>;
63635
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63636
+ code: z.ZodString;
63637
+ message: z.ZodString;
63638
+ details: z.ZodOptional<z.ZodUnknown>;
63639
+ }, z.ZodTypeAny, "passthrough">>>;
63640
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63641
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
63642
+ messageId: z.ZodString;
63643
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
63644
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
63645
+ code: z.ZodString;
63646
+ message: z.ZodString;
63647
+ details: z.ZodOptional<z.ZodUnknown>;
63648
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63649
+ code: z.ZodString;
63650
+ message: z.ZodString;
63651
+ details: z.ZodOptional<z.ZodUnknown>;
63652
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63653
+ code: z.ZodString;
63654
+ message: z.ZodString;
63655
+ details: z.ZodOptional<z.ZodUnknown>;
63656
+ }, z.ZodTypeAny, "passthrough">>>;
63657
+ }, z.ZodTypeAny, "passthrough">>;
63658
+ type StructuredOutputNotification = z.infer<typeof StructuredOutputNotificationSchema>;
62829
63659
  /** List of all session notification schemas (for discriminatedUnion). */
62830
63660
  declare const SessionNotificationSchemaList: readonly [z.ZodObject<{
62831
63661
  type: z.ZodLiteral<SessionNotificationType.TOOL_RESULT>;
@@ -64639,6 +65469,18 @@ declare const SessionNotificationSchemaList: readonly [z.ZodObject<{
64639
65469
  messageId: z.ZodString;
64640
65470
  blockIndex: z.ZodNumber;
64641
65471
  textDelta: z.ZodString;
65472
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
65473
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
65474
+ messageId: z.ZodString;
65475
+ blockIndex: z.ZodNumber;
65476
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65477
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
65478
+ messageId: z.ZodString;
65479
+ blockIndex: z.ZodNumber;
65480
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65481
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
65482
+ messageId: z.ZodString;
65483
+ blockIndex: z.ZodNumber;
64642
65484
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
64643
65485
  type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_DELTA>;
64644
65486
  messageId: z.ZodString;
@@ -64654,6 +65496,84 @@ declare const SessionNotificationSchemaList: readonly [z.ZodObject<{
64654
65496
  messageId: z.ZodString;
64655
65497
  blockIndex: z.ZodNumber;
64656
65498
  textDelta: z.ZodString;
65499
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
65500
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
65501
+ messageId: z.ZodString;
65502
+ blockIndex: z.ZodNumber;
65503
+ durationMs: z.ZodOptional<z.ZodNumber>;
65504
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65505
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
65506
+ messageId: z.ZodString;
65507
+ blockIndex: z.ZodNumber;
65508
+ durationMs: z.ZodOptional<z.ZodNumber>;
65509
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65510
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
65511
+ messageId: z.ZodString;
65512
+ blockIndex: z.ZodNumber;
65513
+ durationMs: z.ZodOptional<z.ZodNumber>;
65514
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
65515
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
65516
+ toolUse: z.ZodObject<{
65517
+ type: z.ZodLiteral<"tool_use">;
65518
+ id: z.ZodString;
65519
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65520
+ name: z.ZodString;
65521
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65522
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65523
+ type: z.ZodLiteral<"tool_use">;
65524
+ id: z.ZodString;
65525
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65526
+ name: z.ZodString;
65527
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65528
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65529
+ type: z.ZodLiteral<"tool_use">;
65530
+ id: z.ZodString;
65531
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65532
+ name: z.ZodString;
65533
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65534
+ }, z.ZodTypeAny, "passthrough">>;
65535
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65536
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
65537
+ toolUse: z.ZodObject<{
65538
+ type: z.ZodLiteral<"tool_use">;
65539
+ id: z.ZodString;
65540
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65541
+ name: z.ZodString;
65542
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65543
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65544
+ type: z.ZodLiteral<"tool_use">;
65545
+ id: z.ZodString;
65546
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65547
+ name: z.ZodString;
65548
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65549
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65550
+ type: z.ZodLiteral<"tool_use">;
65551
+ id: z.ZodString;
65552
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65553
+ name: z.ZodString;
65554
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65555
+ }, z.ZodTypeAny, "passthrough">>;
65556
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65557
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
65558
+ toolUse: z.ZodObject<{
65559
+ type: z.ZodLiteral<"tool_use">;
65560
+ id: z.ZodString;
65561
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65562
+ name: z.ZodString;
65563
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65564
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65565
+ type: z.ZodLiteral<"tool_use">;
65566
+ id: z.ZodString;
65567
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65568
+ name: z.ZodString;
65569
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65570
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65571
+ type: z.ZodLiteral<"tool_use">;
65572
+ id: z.ZodString;
65573
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
65574
+ name: z.ZodString;
65575
+ thoughtSignature: z.ZodOptional<z.ZodString>;
65576
+ }, z.ZodTypeAny, "passthrough">>;
64657
65577
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
64658
65578
  type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
64659
65579
  sessionId: z.ZodString;
@@ -72694,8 +73614,191 @@ declare const SessionNotificationSchemaList: readonly [z.ZodObject<{
72694
73614
  serverName: z.ZodString;
72695
73615
  outcome: z.ZodNativeEnum<typeof McpAuthOutcome>;
72696
73616
  message: z.ZodString;
73617
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
73618
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
73619
+ hookId: z.ZodString;
73620
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
73621
+ hookMatcher: z.ZodOptional<z.ZodString>;
73622
+ hookCommands: z.ZodArray<z.ZodObject<{
73623
+ command: z.ZodString;
73624
+ timeout: z.ZodOptional<z.ZodNumber>;
73625
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73626
+ command: z.ZodString;
73627
+ timeout: z.ZodOptional<z.ZodNumber>;
73628
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73629
+ command: z.ZodString;
73630
+ timeout: z.ZodOptional<z.ZodNumber>;
73631
+ }, z.ZodTypeAny, "passthrough">>, "many">;
73632
+ hookToolCallId: z.ZodOptional<z.ZodString>;
73633
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
73634
+ parallelGroupId: z.ZodOptional<z.ZodString>;
73635
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73636
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
73637
+ hookId: z.ZodString;
73638
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
73639
+ hookMatcher: z.ZodOptional<z.ZodString>;
73640
+ hookCommands: z.ZodArray<z.ZodObject<{
73641
+ command: z.ZodString;
73642
+ timeout: z.ZodOptional<z.ZodNumber>;
73643
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73644
+ command: z.ZodString;
73645
+ timeout: z.ZodOptional<z.ZodNumber>;
73646
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73647
+ command: z.ZodString;
73648
+ timeout: z.ZodOptional<z.ZodNumber>;
73649
+ }, z.ZodTypeAny, "passthrough">>, "many">;
73650
+ hookToolCallId: z.ZodOptional<z.ZodString>;
73651
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
73652
+ parallelGroupId: z.ZodOptional<z.ZodString>;
73653
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73654
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
73655
+ hookId: z.ZodString;
73656
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
73657
+ hookMatcher: z.ZodOptional<z.ZodString>;
73658
+ hookCommands: z.ZodArray<z.ZodObject<{
73659
+ command: z.ZodString;
73660
+ timeout: z.ZodOptional<z.ZodNumber>;
73661
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73662
+ command: z.ZodString;
73663
+ timeout: z.ZodOptional<z.ZodNumber>;
73664
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73665
+ command: z.ZodString;
73666
+ timeout: z.ZodOptional<z.ZodNumber>;
73667
+ }, z.ZodTypeAny, "passthrough">>, "many">;
73668
+ hookToolCallId: z.ZodOptional<z.ZodString>;
73669
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
73670
+ parallelGroupId: z.ZodOptional<z.ZodString>;
73671
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
73672
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
73673
+ hookId: z.ZodString;
73674
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
73675
+ hookMatcher: z.ZodOptional<z.ZodString>;
73676
+ hookToolCallId: z.ZodOptional<z.ZodString>;
73677
+ hookStatus: z.ZodEnum<["completed", "error"]>;
73678
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
73679
+ exitCode: z.ZodNumber;
73680
+ stdout: z.ZodString;
73681
+ stderr: z.ZodString;
73682
+ command: z.ZodOptional<z.ZodString>;
73683
+ timeout: z.ZodOptional<z.ZodNumber>;
73684
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73685
+ exitCode: z.ZodNumber;
73686
+ stdout: z.ZodString;
73687
+ stderr: z.ZodString;
73688
+ command: z.ZodOptional<z.ZodString>;
73689
+ timeout: z.ZodOptional<z.ZodNumber>;
73690
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73691
+ exitCode: z.ZodNumber;
73692
+ stdout: z.ZodString;
73693
+ stderr: z.ZodString;
73694
+ command: z.ZodOptional<z.ZodString>;
73695
+ timeout: z.ZodOptional<z.ZodNumber>;
73696
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
73697
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73698
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
73699
+ hookId: z.ZodString;
73700
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
73701
+ hookMatcher: z.ZodOptional<z.ZodString>;
73702
+ hookToolCallId: z.ZodOptional<z.ZodString>;
73703
+ hookStatus: z.ZodEnum<["completed", "error"]>;
73704
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
73705
+ exitCode: z.ZodNumber;
73706
+ stdout: z.ZodString;
73707
+ stderr: z.ZodString;
73708
+ command: z.ZodOptional<z.ZodString>;
73709
+ timeout: z.ZodOptional<z.ZodNumber>;
73710
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73711
+ exitCode: z.ZodNumber;
73712
+ stdout: z.ZodString;
73713
+ stderr: z.ZodString;
73714
+ command: z.ZodOptional<z.ZodString>;
73715
+ timeout: z.ZodOptional<z.ZodNumber>;
73716
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73717
+ exitCode: z.ZodNumber;
73718
+ stdout: z.ZodString;
73719
+ stderr: z.ZodString;
73720
+ command: z.ZodOptional<z.ZodString>;
73721
+ timeout: z.ZodOptional<z.ZodNumber>;
73722
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
73723
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73724
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
73725
+ hookId: z.ZodString;
73726
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
73727
+ hookMatcher: z.ZodOptional<z.ZodString>;
73728
+ hookToolCallId: z.ZodOptional<z.ZodString>;
73729
+ hookStatus: z.ZodEnum<["completed", "error"]>;
73730
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
73731
+ exitCode: z.ZodNumber;
73732
+ stdout: z.ZodString;
73733
+ stderr: z.ZodString;
73734
+ command: z.ZodOptional<z.ZodString>;
73735
+ timeout: z.ZodOptional<z.ZodNumber>;
73736
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73737
+ exitCode: z.ZodNumber;
73738
+ stdout: z.ZodString;
73739
+ stderr: z.ZodString;
73740
+ command: z.ZodOptional<z.ZodString>;
73741
+ timeout: z.ZodOptional<z.ZodNumber>;
73742
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73743
+ exitCode: z.ZodNumber;
73744
+ stdout: z.ZodString;
73745
+ stderr: z.ZodString;
73746
+ command: z.ZodOptional<z.ZodString>;
73747
+ timeout: z.ZodOptional<z.ZodNumber>;
73748
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
73749
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
73750
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
73751
+ messageId: z.ZodString;
73752
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
73753
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
73754
+ code: z.ZodString;
73755
+ message: z.ZodString;
73756
+ details: z.ZodOptional<z.ZodUnknown>;
73757
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73758
+ code: z.ZodString;
73759
+ message: z.ZodString;
73760
+ details: z.ZodOptional<z.ZodUnknown>;
73761
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73762
+ code: z.ZodString;
73763
+ message: z.ZodString;
73764
+ details: z.ZodOptional<z.ZodUnknown>;
73765
+ }, z.ZodTypeAny, "passthrough">>>;
73766
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73767
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
73768
+ messageId: z.ZodString;
73769
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
73770
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
73771
+ code: z.ZodString;
73772
+ message: z.ZodString;
73773
+ details: z.ZodOptional<z.ZodUnknown>;
73774
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73775
+ code: z.ZodString;
73776
+ message: z.ZodString;
73777
+ details: z.ZodOptional<z.ZodUnknown>;
73778
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73779
+ code: z.ZodString;
73780
+ message: z.ZodString;
73781
+ details: z.ZodOptional<z.ZodUnknown>;
73782
+ }, z.ZodTypeAny, "passthrough">>>;
73783
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73784
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
73785
+ messageId: z.ZodString;
73786
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
73787
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
73788
+ code: z.ZodString;
73789
+ message: z.ZodString;
73790
+ details: z.ZodOptional<z.ZodUnknown>;
73791
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73792
+ code: z.ZodString;
73793
+ message: z.ZodString;
73794
+ details: z.ZodOptional<z.ZodUnknown>;
73795
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73796
+ code: z.ZodString;
73797
+ message: z.ZodString;
73798
+ details: z.ZodOptional<z.ZodUnknown>;
73799
+ }, z.ZodTypeAny, "passthrough">>>;
72697
73800
  }, z.ZodTypeAny, "passthrough">>];
72698
- /** Discriminated union over all 20 session notification types. */
73801
+ /** Discriminated union over all session notification types. */
72699
73802
  declare const SessionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
72700
73803
  type: z.ZodLiteral<SessionNotificationType.TOOL_RESULT>;
72701
73804
  messageId: z.ZodString;
@@ -74508,6 +75611,18 @@ declare const SessionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type",
74508
75611
  messageId: z.ZodString;
74509
75612
  blockIndex: z.ZodNumber;
74510
75613
  textDelta: z.ZodString;
75614
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
75615
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
75616
+ messageId: z.ZodString;
75617
+ blockIndex: z.ZodNumber;
75618
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75619
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
75620
+ messageId: z.ZodString;
75621
+ blockIndex: z.ZodNumber;
75622
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75623
+ type: z.ZodLiteral<SessionNotificationType.ASSISTANT_TEXT_COMPLETE>;
75624
+ messageId: z.ZodString;
75625
+ blockIndex: z.ZodNumber;
74511
75626
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
74512
75627
  type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_DELTA>;
74513
75628
  messageId: z.ZodString;
@@ -74524,48 +75639,126 @@ declare const SessionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type",
74524
75639
  blockIndex: z.ZodNumber;
74525
75640
  textDelta: z.ZodString;
74526
75641
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
74527
- type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
74528
- sessionId: z.ZodString;
74529
- tokenUsage: z.ZodObject<{
74530
- inputTokens: z.ZodNumber;
74531
- outputTokens: z.ZodNumber;
74532
- cacheCreationTokens: z.ZodNumber;
74533
- cacheReadTokens: z.ZodNumber;
74534
- thinkingTokens: z.ZodNumber;
75642
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
75643
+ messageId: z.ZodString;
75644
+ blockIndex: z.ZodNumber;
75645
+ durationMs: z.ZodOptional<z.ZodNumber>;
75646
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75647
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
75648
+ messageId: z.ZodString;
75649
+ blockIndex: z.ZodNumber;
75650
+ durationMs: z.ZodOptional<z.ZodNumber>;
75651
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75652
+ type: z.ZodLiteral<SessionNotificationType.THINKING_TEXT_COMPLETE>;
75653
+ messageId: z.ZodString;
75654
+ blockIndex: z.ZodNumber;
75655
+ durationMs: z.ZodOptional<z.ZodNumber>;
75656
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
75657
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
75658
+ toolUse: z.ZodObject<{
75659
+ type: z.ZodLiteral<"tool_use">;
75660
+ id: z.ZodString;
75661
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75662
+ name: z.ZodString;
75663
+ thoughtSignature: z.ZodOptional<z.ZodString>;
74535
75664
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74536
- inputTokens: z.ZodNumber;
74537
- outputTokens: z.ZodNumber;
74538
- cacheCreationTokens: z.ZodNumber;
74539
- cacheReadTokens: z.ZodNumber;
74540
- thinkingTokens: z.ZodNumber;
75665
+ type: z.ZodLiteral<"tool_use">;
75666
+ id: z.ZodString;
75667
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75668
+ name: z.ZodString;
75669
+ thoughtSignature: z.ZodOptional<z.ZodString>;
74541
75670
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
74542
- inputTokens: z.ZodNumber;
74543
- outputTokens: z.ZodNumber;
74544
- cacheCreationTokens: z.ZodNumber;
74545
- cacheReadTokens: z.ZodNumber;
74546
- thinkingTokens: z.ZodNumber;
75671
+ type: z.ZodLiteral<"tool_use">;
75672
+ id: z.ZodString;
75673
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75674
+ name: z.ZodString;
75675
+ thoughtSignature: z.ZodOptional<z.ZodString>;
74547
75676
  }, z.ZodTypeAny, "passthrough">>;
74548
75677
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74549
- type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
74550
- sessionId: z.ZodString;
74551
- tokenUsage: z.ZodObject<{
74552
- inputTokens: z.ZodNumber;
74553
- outputTokens: z.ZodNumber;
74554
- cacheCreationTokens: z.ZodNumber;
74555
- cacheReadTokens: z.ZodNumber;
74556
- thinkingTokens: z.ZodNumber;
75678
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
75679
+ toolUse: z.ZodObject<{
75680
+ type: z.ZodLiteral<"tool_use">;
75681
+ id: z.ZodString;
75682
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75683
+ name: z.ZodString;
75684
+ thoughtSignature: z.ZodOptional<z.ZodString>;
74557
75685
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74558
- inputTokens: z.ZodNumber;
74559
- outputTokens: z.ZodNumber;
74560
- cacheCreationTokens: z.ZodNumber;
74561
- cacheReadTokens: z.ZodNumber;
74562
- thinkingTokens: z.ZodNumber;
75686
+ type: z.ZodLiteral<"tool_use">;
75687
+ id: z.ZodString;
75688
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75689
+ name: z.ZodString;
75690
+ thoughtSignature: z.ZodOptional<z.ZodString>;
74563
75691
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
74564
- inputTokens: z.ZodNumber;
74565
- outputTokens: z.ZodNumber;
74566
- cacheCreationTokens: z.ZodNumber;
74567
- cacheReadTokens: z.ZodNumber;
74568
- thinkingTokens: z.ZodNumber;
75692
+ type: z.ZodLiteral<"tool_use">;
75693
+ id: z.ZodString;
75694
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75695
+ name: z.ZodString;
75696
+ thoughtSignature: z.ZodOptional<z.ZodString>;
75697
+ }, z.ZodTypeAny, "passthrough">>;
75698
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75699
+ type: z.ZodLiteral<SessionNotificationType.TOOL_CALL>;
75700
+ toolUse: z.ZodObject<{
75701
+ type: z.ZodLiteral<"tool_use">;
75702
+ id: z.ZodString;
75703
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75704
+ name: z.ZodString;
75705
+ thoughtSignature: z.ZodOptional<z.ZodString>;
75706
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75707
+ type: z.ZodLiteral<"tool_use">;
75708
+ id: z.ZodString;
75709
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75710
+ name: z.ZodString;
75711
+ thoughtSignature: z.ZodOptional<z.ZodString>;
75712
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75713
+ type: z.ZodLiteral<"tool_use">;
75714
+ id: z.ZodString;
75715
+ input: z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>;
75716
+ name: z.ZodString;
75717
+ thoughtSignature: z.ZodOptional<z.ZodString>;
75718
+ }, z.ZodTypeAny, "passthrough">>;
75719
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
75720
+ type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
75721
+ sessionId: z.ZodString;
75722
+ tokenUsage: z.ZodObject<{
75723
+ inputTokens: z.ZodNumber;
75724
+ outputTokens: z.ZodNumber;
75725
+ cacheCreationTokens: z.ZodNumber;
75726
+ cacheReadTokens: z.ZodNumber;
75727
+ thinkingTokens: z.ZodNumber;
75728
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75729
+ inputTokens: z.ZodNumber;
75730
+ outputTokens: z.ZodNumber;
75731
+ cacheCreationTokens: z.ZodNumber;
75732
+ cacheReadTokens: z.ZodNumber;
75733
+ thinkingTokens: z.ZodNumber;
75734
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75735
+ inputTokens: z.ZodNumber;
75736
+ outputTokens: z.ZodNumber;
75737
+ cacheCreationTokens: z.ZodNumber;
75738
+ cacheReadTokens: z.ZodNumber;
75739
+ thinkingTokens: z.ZodNumber;
75740
+ }, z.ZodTypeAny, "passthrough">>;
75741
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75742
+ type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
75743
+ sessionId: z.ZodString;
75744
+ tokenUsage: z.ZodObject<{
75745
+ inputTokens: z.ZodNumber;
75746
+ outputTokens: z.ZodNumber;
75747
+ cacheCreationTokens: z.ZodNumber;
75748
+ cacheReadTokens: z.ZodNumber;
75749
+ thinkingTokens: z.ZodNumber;
75750
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75751
+ inputTokens: z.ZodNumber;
75752
+ outputTokens: z.ZodNumber;
75753
+ cacheCreationTokens: z.ZodNumber;
75754
+ cacheReadTokens: z.ZodNumber;
75755
+ thinkingTokens: z.ZodNumber;
75756
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75757
+ inputTokens: z.ZodNumber;
75758
+ outputTokens: z.ZodNumber;
75759
+ cacheCreationTokens: z.ZodNumber;
75760
+ cacheReadTokens: z.ZodNumber;
75761
+ thinkingTokens: z.ZodNumber;
74569
75762
  }, z.ZodTypeAny, "passthrough">>;
74570
75763
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
74571
75764
  type: z.ZodLiteral<SessionNotificationType.SESSION_TOKEN_USAGE_CHANGED>;
@@ -82563,6 +83756,189 @@ declare const SessionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type",
82563
83756
  serverName: z.ZodString;
82564
83757
  outcome: z.ZodNativeEnum<typeof McpAuthOutcome>;
82565
83758
  message: z.ZodString;
83759
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
83760
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
83761
+ hookId: z.ZodString;
83762
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
83763
+ hookMatcher: z.ZodOptional<z.ZodString>;
83764
+ hookCommands: z.ZodArray<z.ZodObject<{
83765
+ command: z.ZodString;
83766
+ timeout: z.ZodOptional<z.ZodNumber>;
83767
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83768
+ command: z.ZodString;
83769
+ timeout: z.ZodOptional<z.ZodNumber>;
83770
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83771
+ command: z.ZodString;
83772
+ timeout: z.ZodOptional<z.ZodNumber>;
83773
+ }, z.ZodTypeAny, "passthrough">>, "many">;
83774
+ hookToolCallId: z.ZodOptional<z.ZodString>;
83775
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
83776
+ parallelGroupId: z.ZodOptional<z.ZodString>;
83777
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83778
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
83779
+ hookId: z.ZodString;
83780
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
83781
+ hookMatcher: z.ZodOptional<z.ZodString>;
83782
+ hookCommands: z.ZodArray<z.ZodObject<{
83783
+ command: z.ZodString;
83784
+ timeout: z.ZodOptional<z.ZodNumber>;
83785
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83786
+ command: z.ZodString;
83787
+ timeout: z.ZodOptional<z.ZodNumber>;
83788
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83789
+ command: z.ZodString;
83790
+ timeout: z.ZodOptional<z.ZodNumber>;
83791
+ }, z.ZodTypeAny, "passthrough">>, "many">;
83792
+ hookToolCallId: z.ZodOptional<z.ZodString>;
83793
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
83794
+ parallelGroupId: z.ZodOptional<z.ZodString>;
83795
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83796
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_STARTED>;
83797
+ hookId: z.ZodString;
83798
+ hookEventName: z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>;
83799
+ hookMatcher: z.ZodOptional<z.ZodString>;
83800
+ hookCommands: z.ZodArray<z.ZodObject<{
83801
+ command: z.ZodString;
83802
+ timeout: z.ZodOptional<z.ZodNumber>;
83803
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83804
+ command: z.ZodString;
83805
+ timeout: z.ZodOptional<z.ZodNumber>;
83806
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83807
+ command: z.ZodString;
83808
+ timeout: z.ZodOptional<z.ZodNumber>;
83809
+ }, z.ZodTypeAny, "passthrough">>, "many">;
83810
+ hookToolCallId: z.ZodOptional<z.ZodString>;
83811
+ isParallelExecution: z.ZodOptional<z.ZodBoolean>;
83812
+ parallelGroupId: z.ZodOptional<z.ZodString>;
83813
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
83814
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
83815
+ hookId: z.ZodString;
83816
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
83817
+ hookMatcher: z.ZodOptional<z.ZodString>;
83818
+ hookToolCallId: z.ZodOptional<z.ZodString>;
83819
+ hookStatus: z.ZodEnum<["completed", "error"]>;
83820
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
83821
+ exitCode: z.ZodNumber;
83822
+ stdout: z.ZodString;
83823
+ stderr: z.ZodString;
83824
+ command: z.ZodOptional<z.ZodString>;
83825
+ timeout: z.ZodOptional<z.ZodNumber>;
83826
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83827
+ exitCode: z.ZodNumber;
83828
+ stdout: z.ZodString;
83829
+ stderr: z.ZodString;
83830
+ command: z.ZodOptional<z.ZodString>;
83831
+ timeout: z.ZodOptional<z.ZodNumber>;
83832
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83833
+ exitCode: z.ZodNumber;
83834
+ stdout: z.ZodString;
83835
+ stderr: z.ZodString;
83836
+ command: z.ZodOptional<z.ZodString>;
83837
+ timeout: z.ZodOptional<z.ZodNumber>;
83838
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
83839
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83840
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
83841
+ hookId: z.ZodString;
83842
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
83843
+ hookMatcher: z.ZodOptional<z.ZodString>;
83844
+ hookToolCallId: z.ZodOptional<z.ZodString>;
83845
+ hookStatus: z.ZodEnum<["completed", "error"]>;
83846
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
83847
+ exitCode: z.ZodNumber;
83848
+ stdout: z.ZodString;
83849
+ stderr: z.ZodString;
83850
+ command: z.ZodOptional<z.ZodString>;
83851
+ timeout: z.ZodOptional<z.ZodNumber>;
83852
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83853
+ exitCode: z.ZodNumber;
83854
+ stdout: z.ZodString;
83855
+ stderr: z.ZodString;
83856
+ command: z.ZodOptional<z.ZodString>;
83857
+ timeout: z.ZodOptional<z.ZodNumber>;
83858
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83859
+ exitCode: z.ZodNumber;
83860
+ stdout: z.ZodString;
83861
+ stderr: z.ZodString;
83862
+ command: z.ZodOptional<z.ZodString>;
83863
+ timeout: z.ZodOptional<z.ZodNumber>;
83864
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
83865
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83866
+ type: z.ZodLiteral<SessionNotificationType.HOOK_EXECUTION_COMPLETED>;
83867
+ hookId: z.ZodString;
83868
+ hookEventName: z.ZodOptional<z.ZodEnum<["PreToolUse", "PostToolUse", "Notification", "UserPromptSubmit", "Stop", "SubagentStop", "PreCompact", "SessionStart", "SessionEnd"]>>;
83869
+ hookMatcher: z.ZodOptional<z.ZodString>;
83870
+ hookToolCallId: z.ZodOptional<z.ZodString>;
83871
+ hookStatus: z.ZodEnum<["completed", "error"]>;
83872
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
83873
+ exitCode: z.ZodNumber;
83874
+ stdout: z.ZodString;
83875
+ stderr: z.ZodString;
83876
+ command: z.ZodOptional<z.ZodString>;
83877
+ timeout: z.ZodOptional<z.ZodNumber>;
83878
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83879
+ exitCode: z.ZodNumber;
83880
+ stdout: z.ZodString;
83881
+ stderr: z.ZodString;
83882
+ command: z.ZodOptional<z.ZodString>;
83883
+ timeout: z.ZodOptional<z.ZodNumber>;
83884
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83885
+ exitCode: z.ZodNumber;
83886
+ stdout: z.ZodString;
83887
+ stderr: z.ZodString;
83888
+ command: z.ZodOptional<z.ZodString>;
83889
+ timeout: z.ZodOptional<z.ZodNumber>;
83890
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
83891
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
83892
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
83893
+ messageId: z.ZodString;
83894
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
83895
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
83896
+ code: z.ZodString;
83897
+ message: z.ZodString;
83898
+ details: z.ZodOptional<z.ZodUnknown>;
83899
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83900
+ code: z.ZodString;
83901
+ message: z.ZodString;
83902
+ details: z.ZodOptional<z.ZodUnknown>;
83903
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83904
+ code: z.ZodString;
83905
+ message: z.ZodString;
83906
+ details: z.ZodOptional<z.ZodUnknown>;
83907
+ }, z.ZodTypeAny, "passthrough">>>;
83908
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83909
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
83910
+ messageId: z.ZodString;
83911
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
83912
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
83913
+ code: z.ZodString;
83914
+ message: z.ZodString;
83915
+ details: z.ZodOptional<z.ZodUnknown>;
83916
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83917
+ code: z.ZodString;
83918
+ message: z.ZodString;
83919
+ details: z.ZodOptional<z.ZodUnknown>;
83920
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83921
+ code: z.ZodString;
83922
+ message: z.ZodString;
83923
+ details: z.ZodOptional<z.ZodUnknown>;
83924
+ }, z.ZodTypeAny, "passthrough">>>;
83925
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83926
+ type: z.ZodLiteral<SessionNotificationType.STRUCTURED_OUTPUT>;
83927
+ messageId: z.ZodString;
83928
+ structuredOutput: z.ZodNullable<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
83929
+ structuredOutputError: z.ZodNullable<z.ZodObject<{
83930
+ code: z.ZodString;
83931
+ message: z.ZodString;
83932
+ details: z.ZodOptional<z.ZodUnknown>;
83933
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83934
+ code: z.ZodString;
83935
+ message: z.ZodString;
83936
+ details: z.ZodOptional<z.ZodUnknown>;
83937
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
83938
+ code: z.ZodString;
83939
+ message: z.ZodString;
83940
+ details: z.ZodOptional<z.ZodUnknown>;
83941
+ }, z.ZodTypeAny, "passthrough">>>;
82566
83942
  }, z.ZodTypeAny, "passthrough">>]>;
82567
83943
  type SessionNotificationPayload = z.infer<typeof SessionNotificationPayloadSchema>;
82568
83944
  declare const SessionNotificationParamsSchema: z.ZodType<SessionNotificationParams, z.ZodTypeDef, unknown>;
@@ -90315,9 +91691,16 @@ type NotificationCallback = (notification: Record<string, unknown>) => void;
90315
91691
  interface NotificationFilter {
90316
91692
  type?: string;
90317
91693
  }
91694
+ interface NotificationListener {
91695
+ readonly callback: NotificationCallback;
91696
+ readonly filter?: NotificationFilter;
91697
+ }
91698
+ /** Dispatch a notification to matching listeners, swallowing listener errors. */
91699
+ declare function dispatchNotification(notification: Record<string, unknown>, listeners: Iterable<NotificationListener>): void;
90318
91700
  declare class ProtocolEngine {
90319
91701
  private readonly _transport;
90320
91702
  private readonly _defaultTimeout;
91703
+ private readonly _serverRequestMethodMap;
90321
91704
  private readonly _pendingRequests;
90322
91705
  private readonly _notificationListeners;
90323
91706
  private _permissionHandler;
@@ -90327,6 +91710,12 @@ declare class ProtocolEngine {
90327
91710
  constructor(options: {
90328
91711
  transport: DroidClientTransport;
90329
91712
  defaultTimeout?: number;
91713
+ /**
91714
+ * Maps incoming server-to-client request method strings to handler types.
91715
+ * Defaults to `{ 'droid.request_permission': 'permission', 'droid.ask_user': 'askUser' }`.
91716
+ * Override for daemon mode: `{ 'daemon.request_permission': 'permission', ... }`.
91717
+ */
91718
+ serverRequestMethodMap?: Record<string, ServerRequestHandlerType>;
90330
91719
  });
90331
91720
  sendRequest(method: string, params: Record<string, unknown>, timeout?: number): Promise<unknown>;
90332
91721
  onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
@@ -90374,10 +91763,6 @@ declare class DroidClient {
90374
91763
  private readonly _engine;
90375
91764
  private _sessionId;
90376
91765
  private _closed;
90377
- /**
90378
- * Client-level notification listeners.
90379
- * Each entry is [callback, optional notification filter].
90380
- */
90381
91766
  private readonly _notificationListeners;
90382
91767
  /** Client-level permission handler. */
90383
91768
  private _permissionHandler;
@@ -90393,6 +91778,7 @@ declare class DroidClient {
90393
91778
  loadSession(params: LoadSessionRequestParams): Promise<LoadSessionResult>;
90394
91779
  addUserMessage(params: Pick<AddUserMessageRequestParams, 'text'> & Partial<Pick<AddUserMessageRequestParams, 'images' | 'files' | 'messageId' | 'outputFormat'>>): Promise<AddUserMessageResult>;
90395
91780
  interruptSession(): Promise<InterruptSessionResult>;
91781
+ closeSession(params?: CloseSessionRequestParams): Promise<CloseSessionResult>;
90396
91782
  killWorkerSession(params: KillWorkerSessionRequestParams): Promise<KillWorkerSessionResult>;
90397
91783
  updateSessionSettings(params: Partial<UpdateSessionSettingsRequestParams>): Promise<UpdateSessionSettingsResult>;
90398
91784
  toggleMcpServer(params: ToggleMcpServerRequestParams): Promise<ToggleMcpServerResult>;
@@ -90428,24 +91814,112 @@ declare class DroidClient {
90428
91814
  private _ensureSession;
90429
91815
  }
90430
91816
 
91817
+ type DroidPermissionMode = 'off' | 'spec' | 'auto-low' | 'auto-medium' | 'auto-high';
91818
+ interface BaseDroidHookInput {
91819
+ session_id: string;
91820
+ transcript_path: string;
91821
+ cwd: string;
91822
+ permission_mode: DroidPermissionMode;
91823
+ hook_event_name: DroidHookEvent;
91824
+ message_id?: string;
91825
+ [key: string]: unknown;
91826
+ }
91827
+ interface ToolHookInput extends BaseDroidHookInput {
91828
+ hook_event_name: 'PreToolUse' | 'PostToolUse';
91829
+ tool_name: string;
91830
+ tool_input: Record<string, unknown>;
91831
+ tool_response?: unknown;
91832
+ }
91833
+ interface UserPromptSubmitHookInput extends BaseDroidHookInput {
91834
+ hook_event_name: 'UserPromptSubmit';
91835
+ prompt: string;
91836
+ has_images?: boolean;
91837
+ }
91838
+ interface NotificationHookInput extends BaseDroidHookInput {
91839
+ hook_event_name: 'Notification';
91840
+ message: string;
91841
+ notification_type: 'permission_prompt' | 'idle_prompt' | 'auth_success' | 'elicitation_dialog';
91842
+ }
91843
+ interface StopHookInput extends BaseDroidHookInput {
91844
+ hook_event_name: 'Stop';
91845
+ stop_hook_active: boolean;
91846
+ tool_execution_count?: number;
91847
+ elapsed_time?: number;
91848
+ }
91849
+ interface SubagentStopHookInput extends BaseDroidHookInput {
91850
+ hook_event_name: 'SubagentStop';
91851
+ task_name: string;
91852
+ task_result?: string;
91853
+ task_error?: string;
91854
+ stop_hook_active: boolean;
91855
+ }
91856
+ interface PreCompactHookInput extends BaseDroidHookInput {
91857
+ hook_event_name: 'PreCompact';
91858
+ trigger: 'manual' | 'auto';
91859
+ custom_instructions?: string;
91860
+ message_count: number;
91861
+ estimated_tokens: number;
91862
+ }
91863
+ interface SessionStartHookInput extends BaseDroidHookInput {
91864
+ hook_event_name: 'SessionStart';
91865
+ source: 'startup' | 'resume' | 'clear' | 'compact';
91866
+ previous_session_id?: string;
91867
+ calling_session_id?: string;
91868
+ }
91869
+ interface SessionEndHookInput extends BaseDroidHookInput {
91870
+ hook_event_name: 'SessionEnd';
91871
+ reason: 'clear' | 'logout' | 'prompt_input_exit' | 'other';
91872
+ session_duration_ms: number;
91873
+ message_count: number;
91874
+ }
91875
+ type DroidHookInput = ToolHookInput | UserPromptSubmitHookInput | NotificationHookInput | StopHookInput | SubagentStopHookInput | PreCompactHookInput | SessionStartHookInput | SessionEndHookInput | BaseDroidHookInput;
91876
+
90431
91877
  interface AssistantTextDelta {
90432
91878
  readonly type: 'assistant_text_delta';
90433
91879
  readonly messageId: string;
90434
91880
  readonly blockIndex: number;
90435
91881
  readonly text: string;
90436
91882
  }
91883
+ interface AssistantTextComplete {
91884
+ readonly type: 'assistant_text_complete';
91885
+ readonly messageId: string;
91886
+ readonly blockIndex: number;
91887
+ }
90437
91888
  interface ThinkingTextDelta {
90438
91889
  readonly type: 'thinking_text_delta';
90439
91890
  readonly messageId: string;
90440
91891
  readonly blockIndex: number;
90441
91892
  readonly text: string;
90442
91893
  }
91894
+ interface ThinkingTextComplete {
91895
+ readonly type: 'thinking_text_complete';
91896
+ readonly messageId: string;
91897
+ readonly blockIndex: number;
91898
+ readonly durationMs?: number;
91899
+ }
91900
+ interface ToolCallDelta {
91901
+ readonly type: 'tool_call_delta';
91902
+ readonly toolUse: ToolUseBlock;
91903
+ }
90443
91904
  interface ToolUse {
90444
91905
  readonly type: 'tool_use';
90445
91906
  readonly toolName: string;
90446
91907
  readonly toolInput: JsonObject;
90447
91908
  readonly toolUseId: string;
90448
91909
  }
91910
+ interface DroidToolCallMessage {
91911
+ readonly type: 'tool_call';
91912
+ readonly toolUse: ToolUseBlock;
91913
+ }
91914
+ interface DroidAssistantMessage {
91915
+ readonly type: 'assistant';
91916
+ readonly message: FactoryDroidMessage;
91917
+ readonly text: string;
91918
+ }
91919
+ interface DroidUserMessage {
91920
+ readonly type: 'user';
91921
+ readonly message: FactoryDroidMessage;
91922
+ }
90449
91923
  interface ToolResult {
90450
91924
  readonly type: 'tool_result';
90451
91925
  readonly toolUseId: string;
@@ -90531,27 +92005,81 @@ interface McpAuthCompleted {
90531
92005
  readonly outcome: McpAuthOutcome;
90532
92006
  readonly message: string;
90533
92007
  }
92008
+ interface HookExecution {
92009
+ readonly type: 'hook';
92010
+ readonly hookId: string;
92011
+ readonly eventName?: DroidHookEvent;
92012
+ readonly matcher?: string;
92013
+ readonly toolCallId?: string;
92014
+ readonly command?: string;
92015
+ readonly timeout?: number;
92016
+ readonly status: 'started' | 'completed' | 'error';
92017
+ readonly exitCode?: number;
92018
+ readonly stdout?: string;
92019
+ readonly stderr?: string;
92020
+ }
92021
+ interface StructuredOutputFields {
92022
+ readonly structuredOutput: JsonObject | null;
92023
+ readonly structuredOutputError: StructuredOutputError | null;
92024
+ }
92025
+ interface StructuredOutput extends StructuredOutputFields {
92026
+ readonly type: 'structured_output';
92027
+ readonly messageId: string;
92028
+ }
90534
92029
  interface ErrorEvent {
90535
92030
  readonly type: 'error';
90536
92031
  readonly message: string;
90537
92032
  readonly errorType: ErrorNotification['errorType'];
90538
92033
  readonly timestamp: string;
90539
92034
  }
90540
- /** Sentinel yielded when the agent turn finishes (returns to Idle). */
90541
- interface TurnComplete {
90542
- readonly type: 'turn_complete';
90543
- readonly tokenUsage: TokenUsageUpdate | null;
92035
+ type DroidErrorMessage = ErrorEvent;
92036
+ type DroidToolResultMessage = ToolResult;
92037
+ interface DroidResultBase {
92038
+ readonly type: 'result';
92039
+ readonly sessionId: string;
92040
+ readonly durationMs: number;
92041
+ readonly numTurns: number;
92042
+ readonly result: string;
92043
+ readonly tokenUsage: TokenUsage | null;
92044
+ /** Stream messages emitted before this result. */
92045
+ readonly messages: DroidStreamEvent[];
92046
+ readonly text: string;
92047
+ readonly turnCount: number;
92048
+ readonly success: boolean;
92049
+ }
92050
+ interface DroidResultSuccessMessage extends DroidResultBase {
92051
+ readonly subtype: 'success';
92052
+ readonly isError: false;
92053
+ readonly structuredOutput?: unknown;
92054
+ readonly structuredOutputError?: null;
92055
+ readonly error: null;
92056
+ }
92057
+ interface DroidResultErrorMessage extends DroidResultBase {
92058
+ readonly subtype: 'error_during_execution' | 'error_structured_output';
92059
+ readonly isError: true;
92060
+ readonly errors: string[];
92061
+ readonly structuredOutput?: unknown;
92062
+ readonly structuredOutputError?: StructuredOutputError | null;
92063
+ readonly error: ErrorEvent | null;
90544
92064
  }
90545
- type DroidMessage = AssistantTextDelta | ThinkingTextDelta | ToolUse | ToolResult | ToolProgress | WorkingStateChanged | TokenUsageUpdate | CreateMessage | PermissionResolved | SettingsUpdated | SessionTitleUpdated | McpStatusChanged | MissionStateChanged | MissionFeaturesChanged | MissionProgressEntry | MissionHeartbeat | MissionWorkerStarted | MissionWorkerCompleted | McpAuthRequired | McpAuthCompleted | ErrorEvent | TurnComplete;
92065
+ type DroidResultMessage = DroidResultSuccessMessage | DroidResultErrorMessage;
92066
+ type DroidStreamMessage = DroidAssistantMessage | DroidUserMessage | DroidToolCallMessage | ToolResult | HookExecution | ErrorEvent | DroidResultMessage;
92067
+ type DroidStreamEvent = DroidStreamMessage | AssistantTextDelta | AssistantTextComplete | ThinkingTextDelta | ThinkingTextComplete | ToolCallDelta | ToolProgress | WorkingStateChanged | TokenUsageUpdate | PermissionResolved | SettingsUpdated | SessionTitleUpdated | McpStatusChanged | MissionStateChanged | MissionFeaturesChanged | MissionProgressEntry | MissionHeartbeat | MissionWorkerStarted | MissionWorkerCompleted | McpAuthRequired | McpAuthCompleted | HookExecution;
92068
+ type InternalDroidMessage = DroidStreamEvent | ToolUse | CreateMessage | StructuredOutput;
92069
+ type DroidMessage = DroidStreamEvent;
90546
92070
  declare const DroidMessageType: {
92071
+ readonly Assistant: "assistant";
92072
+ readonly User: "user";
92073
+ readonly ToolCall: "tool_call";
90547
92074
  readonly AssistantTextDelta: "assistant_text_delta";
92075
+ readonly AssistantTextComplete: "assistant_text_complete";
90548
92076
  readonly ThinkingTextDelta: "thinking_text_delta";
90549
- readonly ToolUse: "tool_use";
92077
+ readonly ThinkingTextComplete: "thinking_text_complete";
92078
+ readonly ToolCallDelta: "tool_call_delta";
90550
92079
  readonly ToolResult: "tool_result";
90551
92080
  readonly ToolProgress: "tool_progress";
90552
92081
  readonly WorkingStateChanged: "working_state_changed";
90553
92082
  readonly TokenUsageUpdate: "token_usage_update";
90554
- readonly CreateMessage: "create_message";
90555
92083
  readonly PermissionResolved: "permission_resolved";
90556
92084
  readonly SettingsUpdated: "settings_updated";
90557
92085
  readonly SessionTitleUpdated: "session_title_updated";
@@ -90564,24 +92092,41 @@ declare const DroidMessageType: {
90564
92092
  readonly MissionWorkerCompleted: "mission_worker_completed";
90565
92093
  readonly McpAuthRequired: "mcp_auth_required";
90566
92094
  readonly McpAuthCompleted: "mcp_auth_completed";
92095
+ readonly Hook: "hook";
90567
92096
  readonly Error: "error";
90568
- readonly TurnComplete: "turn_complete";
92097
+ readonly Result: "result";
90569
92098
  };
90570
92099
  type DroidMessageType = (typeof DroidMessageType)[keyof typeof DroidMessageType];
90571
- declare function convertNotificationToStreamMessage(raw: unknown): DroidMessage | DroidMessage[] | null;
92100
+ declare function convertNotificationToStreamMessage(raw: unknown): InternalDroidMessage | InternalDroidMessage[] | null;
90572
92101
  /**
90573
92102
  * Tracks working state to detect turn completion (non-idle → idle transition).
90574
92103
  * Create a fresh instance per `stream()` call.
90575
92104
  */
90576
92105
  declare class StreamStateTracker {
92106
+ private readonly options;
90577
92107
  private hasBeenNonIdle;
90578
92108
  private lastTokenUsage;
92109
+ private fullText;
92110
+ private finalAssistantText;
92111
+ private structuredOutput;
92112
+ private structuredOutputError;
92113
+ private errors;
92114
+ private numTurns;
92115
+ private emittedMessages;
90579
92116
  private toolNameMap;
92117
+ constructor(options?: {
92118
+ sessionId?: string;
92119
+ startedAt?: number;
92120
+ hasOutputFormat?: boolean;
92121
+ });
90580
92122
  private getToolName;
90581
- processMessage(message: DroidMessage): {
90582
- message: DroidMessage;
90583
- additional: DroidMessage[];
92123
+ processMessage(message: InternalDroidMessage): {
92124
+ message: InternalDroidMessage | null;
92125
+ additional: InternalDroidMessage[];
90584
92126
  };
92127
+ private createResultMessage;
92128
+ private trackEmittedMessage;
92129
+ private resetTurnState;
90585
92130
  }
90586
92131
 
90587
92132
  type ToolInputShape = Record<string, z.ZodTypeAny>;
@@ -90615,7 +92160,15 @@ declare class SdkMcpServer {
90615
92160
  }
90616
92161
  declare function createSdkMcpServer(options: SdkMcpServerOptions): SdkMcpServer;
90617
92162
 
92163
+ interface MessageOptions {
92164
+ images?: Base64ImageSource[];
92165
+ files?: DocumentSource[];
92166
+ outputFormat?: OutputFormat;
92167
+ includePartialMessages?: boolean;
92168
+ abortSignal?: AbortSignal;
92169
+ }
90618
92170
  interface TransportCreationOptions extends Pick<ProcessTransportOptions, 'execPath' | 'execArgs' | 'cwd' | 'env'> {
92171
+ apiKey: string;
90619
92172
  transport?: DroidClientTransport;
90620
92173
  }
90621
92174
  interface HandlerOptions {
@@ -90623,6 +92176,7 @@ interface HandlerOptions {
90623
92176
  askUserHandler?: ClientAskUserHandler;
90624
92177
  }
90625
92178
  interface SessionInitOptions extends ToolSelectionOverrides {
92179
+ apiKey: string;
90626
92180
  cwd?: string;
90627
92181
  machineId?: string;
90628
92182
  modelId?: string;
@@ -90632,42 +92186,19 @@ interface SessionInitOptions extends ToolSelectionOverrides {
90632
92186
  specModeModelId?: string;
90633
92187
  specModeReasoningEffort?: ReasoningEffort;
90634
92188
  mcpServers?: DroidMcpServerConfig[];
92189
+ sessionSource?: SessionSource;
90635
92190
  tags?: SessionTag[];
90636
92191
  }
90637
92192
 
90638
- /** Aggregated result from a non-streaming `session.send()` call. */
90639
- interface DroidResult {
90640
- /** Session that produced this result. */
90641
- sessionId: string;
90642
- /** Concatenated assistant text deltas emitted during the turn. */
90643
- text: string;
90644
- /** All stream messages emitted during the turn. */
90645
- messages: DroidMessage[];
90646
- /** Latest token usage update for the turn, when reported by Droid. */
90647
- tokenUsage: TokenUsageUpdate | null;
90648
- /** Wall-clock duration spent consuming the turn. */
90649
- durationMs: number;
90650
- /** Number of completed turns observed while consuming the stream. */
90651
- turnCount: number;
90652
- /** First error event emitted during the turn, if any. */
90653
- error: ErrorEvent | null;
90654
- /** Structured JSON object emitted by the turn, when requested. */
90655
- structuredOutput: JsonObject | null;
90656
- /** True when the stream completed without an error event. */
90657
- success: boolean;
90658
- }
92193
+ /** Aggregated result from a one-shot {@link run} call. */
92194
+ type DroidResult = DroidResultMessage;
90659
92195
  interface CreateSessionOptions extends SessionInitOptions, HandlerOptions, TransportCreationOptions {
90660
92196
  abortSignal?: AbortSignal;
90661
92197
  }
90662
- interface ResumeSessionOptions extends Pick<CreateSessionOptions, 'execPath' | 'execArgs' | 'cwd' | 'env' | 'permissionHandler' | 'askUserHandler' | 'transport' | 'abortSignal'> {
92198
+ interface ResumeSessionOptions extends Pick<CreateSessionOptions, 'apiKey' | 'execPath' | 'execArgs' | 'env' | 'permissionHandler' | 'askUserHandler' | 'transport' | 'abortSignal'> {
90663
92199
  mcpServers?: DroidMcpServerConfig[];
90664
92200
  }
90665
- interface MessageOptions {
90666
- images?: Base64ImageSource[];
90667
- files?: DocumentSource[];
90668
- outputFormat?: OutputFormat;
90669
- abortSignal?: AbortSignal;
90670
- }
92201
+
90671
92202
  /** Create instances via {@link createSession} or {@link resumeSession}. */
90672
92203
  declare class DroidSession {
90673
92204
  private _client;
@@ -90676,6 +92207,7 @@ declare class DroidSession {
90676
92207
  private _closed;
90677
92208
  private _cleanupAbortSignal;
90678
92209
  private _cleanupCallbacks;
92210
+ private readonly _activeBridges;
90679
92211
  /** @internal */
90680
92212
  constructor(client: DroidClient, sessionId: string, initResult: InitializeSessionResult | LoadSessionResult);
90681
92213
  get sessionId(): string;
@@ -90684,10 +92216,14 @@ declare class DroidSession {
90684
92216
  setAbortSignalCleanup(cleanup: () => void): void;
90685
92217
  /** @internal */
90686
92218
  addCleanup(cleanup: () => Promise<void> | void): void;
90687
- /** Yields {@link DroidMessage} events until `turn_complete`. */
90688
- stream(text: string, options?: MessageOptions): AsyncGenerator<DroidMessage, void, undefined>;
90689
- /** Consumes the stream and returns an aggregated {@link DroidResult}. */
90690
- send(text: string, options?: MessageOptions): Promise<DroidResult>;
92219
+ /** Yields message-level events until the final `result` message. */
92220
+ stream(prompt: string, options?: MessageOptions & {
92221
+ includePartialMessages?: false;
92222
+ }): AsyncGenerator<DroidStreamMessage, void, undefined>;
92223
+ /** Yields message-level events plus partial chunks until the final `result` message. */
92224
+ stream(prompt: string, options: MessageOptions & {
92225
+ includePartialMessages: true;
92226
+ }): AsyncGenerator<DroidStreamEvent, void, undefined>;
90691
92227
  interrupt(): Promise<void>;
90692
92228
  close(): Promise<void>;
90693
92229
  updateSettings(params: Partial<UpdateSessionSettingsRequestParams>): Promise<UpdateSessionSettingsResult>;
@@ -90709,31 +92245,25 @@ declare class DroidSession {
90709
92245
  onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
90710
92246
  private _ensureNotClosed;
90711
92247
  }
90712
- declare function createSession(options?: CreateSessionOptions): Promise<DroidSession>;
90713
- /** @throws {SessionNotFoundError} If the session ID does not exist. */
90714
- declare function resumeSession(sessionId: string, options?: ResumeSessionOptions): Promise<DroidSession>;
90715
-
90716
- interface QueryOptions extends CreateSessionOptions {
90717
- prompt: string;
90718
- }
90719
- interface DroidQuery extends AsyncGenerator<DroidMessage, void, undefined> {
90720
- interrupt(): Promise<void>;
90721
- abort(): void;
90722
- /** `null` before initialization completes. */
90723
- readonly sessionId: string | null;
90724
- /** `null` before initialization completes. */
90725
- readonly initResult: InitializeSessionResult | null;
90726
- readonly initialized: Promise<InitializeSessionResult>;
90727
- }
92248
+ declare function createSession(options: CreateSessionOptions): Promise<DroidSession>;
90728
92249
  /**
90729
- * Spawns a droid process, initializes a session, sends the prompt, and
90730
- * yields {@link DroidMessage} events. Resources are cleaned up automatically.
92250
+ * Resumes an existing Droid session.
92251
+ *
92252
+ * The resumed session always runs in the working directory that was persisted
92253
+ * with the session at creation time. `resumeSession()` intentionally does not
92254
+ * accept a `cwd` option: the persisted session cwd is authoritative. The
92255
+ * underlying subprocess is launched in the host process's `process.cwd()`, but
92256
+ * this does not affect the session's working directory as far as the Droid is
92257
+ * concerned. To run in a different directory, create a new session or fork the
92258
+ * existing one.
92259
+ *
92260
+ * @throws {SessionNotFoundError} If the session ID does not exist.
90731
92261
  */
90732
- declare function query(options: QueryOptions): DroidQuery;
92262
+ declare function resumeSession(sessionId: string, options: ResumeSessionOptions): Promise<DroidSession>;
90733
92263
 
90734
- interface RunOptions extends CreateSessionOptions, MessageOptions {
92264
+ interface RunOptions extends CreateSessionOptions, Omit<MessageOptions, 'includePartialMessages'> {
90735
92265
  }
90736
- declare function run(text: string, options?: RunOptions): Promise<DroidResult>;
92266
+ declare function run(prompt: string, options: RunOptions): Promise<DroidResult>;
90737
92267
 
90738
92268
  /**
90739
92269
  * List droid sessions stored on disk.
@@ -90761,4 +92291,812 @@ declare function run(text: string, options?: RunOptions): Promise<DroidResult>;
90761
92291
  */
90762
92292
  declare function listSessions(options?: ListSessionsOptions): Promise<SessionMetadata[]>;
90763
92293
 
90764
- export { type AddMcpServerRequest, type AddMcpServerRequestParams, AddMcpServerRequestParamsSchema, AddMcpServerRequestSchema, type AddMcpServerResponse, AddMcpServerResponseSchema, type AddMcpServerResult, AddMcpServerResultSchema, type AddUserMessageRequest, type AddUserMessageRequestParams, AddUserMessageRequestParamsSchema, AddUserMessageRequestSchema, type AddUserMessageResponse, AddUserMessageResponseSchema, type AddUserMessageResult, AddUserMessageResultSchema, type ApplyPatchToolConfirmationDetails, ApplyPatchToolConfirmationDetailsSchema, type AskUserCollectedAnswer, AskUserCollectedAnswerSchema, type AskUserConfirmationDetails, AskUserConfirmationDetailsSchema, type AskUserHandler, type AskUserQuestion, AskUserQuestionSchema, type AskUserRequest, type AskUserRequestParams, AskUserRequestParamsSchema, AskUserRequestSchema, type AskUserResponse, AskUserResponseSchema, type AskUserResult, AskUserResultSchema, type AssistantTextDelta, type AssistantTextDeltaNotification, AssistantTextDeltaNotificationSchema, type AuthenticateMcpServerRequest, type AuthenticateMcpServerRequestParams, AuthenticateMcpServerRequestParamsSchema, AuthenticateMcpServerRequestSchema, type AuthenticateMcpServerResponse, AuthenticateMcpServerResponseSchema, type AuthenticateMcpServerResult, AuthenticateMcpServerResultSchema, AutonomyLevel, AutonomyMode, type AvailableModelConfig, AvailableModelConfigSchema, type Base64ImageSource, Base64ImageSourceSchema, type BaseNotification, BaseNotificationSchema, type BaseRequest, BaseRequestSchema, type BaseResponseFailure, BaseResponseFailureSchema, type BaseResponseSuccess, BaseResponseSuccessSchema, COMPACTION_TIMEOUT, type CancelMcpAuthRequest, type CancelMcpAuthRequestParams, CancelMcpAuthRequestParamsSchema, CancelMcpAuthRequestSchema, type CancelMcpAuthResponse, CancelMcpAuthResponseSchema, type CancelMcpAuthResult, CancelMcpAuthResultSchema, type ClearMcpAuthRequest, type ClearMcpAuthRequestParams, ClearMcpAuthRequestParamsSchema, ClearMcpAuthRequestSchema, type ClearMcpAuthResponse, ClearMcpAuthResponseSchema, type ClearMcpAuthResult, ClearMcpAuthResultSchema, type CliRequestOrNotification, CliRequestOrNotificationSchema, type ClientAskUserHandler, type ClientPermissionHandler, type ClientRequest, ClientRequestSchema, type CompactSessionRequest, type CompactSessionRequestParams, CompactSessionRequestParamsSchema, CompactSessionRequestSchema, type CompactSessionResponse, CompactSessionResponseSchema, type CompactSessionResult, CompactSessionResultSchema, ConnectionError, type ContentBlock, ContentBlockSchema, type ContextStats, ContextStatsAccuracy, ContextStatsSchema, type CreateMessage, type CreateMessageNotification, CreateMessageNotificationSchema, type CreateSessionOptions, type CreateToolConfirmationDetails, CreateToolConfirmationDetailsSchema, DEFAULT_REQUEST_TIMEOUT, DecompSessionType, type DiscoveredIssue, DiscoveredIssueSchema, type DismissalRecord, DismissalRecordSchema, DismissalType, type DocumentBlock, DocumentBlockSchema, type DocumentSource, DocumentSourceSchema, DroidClient, DroidClientMethod, type DroidClientOptions, type DroidClientTransport, DroidErrorType, DroidInteractionMode, type DroidMcpServerConfig, type DroidMessage, DroidMessageType, type DroidQuery, type DroidResult, DroidServerMethod, DroidSession, type DroidTool, type DroidToolResult, DroidWorkingState, type DroidWorkingStateChangedNotification, DroidWorkingStateChangedNotificationSchema, type EditToolConfirmationDetails, EditToolConfirmationDetailsSchema, type EmptyResult, EmptyResultSchema, type ErrorCallback, type ErrorDetail, ErrorDetailSchema, type ErrorEvent, type ErrorNotification, ErrorNotificationSchema, type ExecToolInfo, ExecToolInfoSchema, type ExecuteRewindRequest, type ExecuteRewindRequestParams, ExecuteRewindRequestParamsSchema, ExecuteRewindRequestSchema, type ExecuteRewindResponse, ExecuteRewindResponseSchema, type ExecuteRewindResult, ExecuteRewindResultSchema, type ExecuteToolConfirmationDetails, ExecuteToolConfirmationDetailsSchema, type ExitSpecModeConfirmationDetails, ExitSpecModeConfirmationDetailsSchema, FACTORY_CLIENT_HEADER, FACTORY_CLIENT_VERSION, FACTORY_PROTOCOL_VERSION, type FactoryDroidMessage, FactoryDroidMessageRole, FactoryDroidMessageSchema, FeatureStatus, FeatureSuccessState, FeatureSuccessStateSchema, type ForkSessionRequest, type ForkSessionRequestParams, ForkSessionRequestParamsSchema, ForkSessionRequestSchema, type ForkSessionResponse, ForkSessionResponseSchema, type ForkSessionResult, ForkSessionResultSchema, type GetContextStatsRequest, type GetContextStatsRequestParams, GetContextStatsRequestParamsSchema, GetContextStatsRequestSchema, type GetContextStatsResponse, GetContextStatsResponseSchema, type GetContextStatsResult, GetContextStatsResultSchema, type GetRewindInfoRequest, type GetRewindInfoRequestParams, GetRewindInfoRequestParamsSchema, GetRewindInfoRequestSchema, type GetRewindInfoResponse, GetRewindInfoResponseSchema, type GetRewindInfoResult, GetRewindInfoResultSchema, type GitRepoInfo, GitRepoInfoSchema, type Handoff, type HandoffItemsDismissedEntry, HandoffItemsDismissedEntrySchema, HandoffSchema, type HttpHeader, HttpHeaderSchema, type HttpMcpConfig, HttpMcpConfigSchema, type ImageBlock, ImageBlockSchema, type InitializeSessionRequest, type InitializeSessionRequestParams, InitializeSessionRequestParamsSchema, InitializeSessionRequestSchema, type InitializeSessionResponse, InitializeSessionResponseSchema, type InitializeSessionResult, InitializeSessionResultSchema, type InteractiveCheck, InteractiveCheckSchema, type InterruptSessionRequest, type InterruptSessionRequestParams, InterruptSessionRequestParamsSchema, InterruptSessionRequestSchema, type InterruptSessionResponse, InterruptSessionResponseSchema, type InterruptSessionResult, InterruptSessionResultSchema, IssueSeverity, JSONRPC_VERSION, type JsonArray, JsonArraySchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonRpcEnvelope, JsonRpcEnvelopeSchema, type JsonRpcError, JsonRpcErrorCode, JsonRpcErrorSchema, type JsonRpcMessage, JsonRpcMessageSchema, JsonRpcMessageType, type JsonRpcNotification, JsonRpcNotificationSchema, type JsonRpcRequest, JsonRpcRequestSchema, type JsonRpcResponse, type JsonRpcResponseFailure, JsonRpcResponseFailureSchema, JsonRpcResponseSchema, type JsonRpcResponseSuccess, JsonRpcResponseSuccessSchema, type JsonValue, JsonValueSchema, type KillWorkerSessionRequest, type KillWorkerSessionRequestParams, KillWorkerSessionRequestParamsSchema, KillWorkerSessionRequestSchema, type KillWorkerSessionResponse, KillWorkerSessionResponseSchema, type KillWorkerSessionResult, KillWorkerSessionResultSchema, LEGACY_FACTORY_API_VERSION, type ListMcpRegistryRequest, type ListMcpRegistryRequestParams, ListMcpRegistryRequestParamsSchema, ListMcpRegistryRequestSchema, type ListMcpRegistryResponse, ListMcpRegistryResponseSchema, type ListMcpRegistryResult, ListMcpRegistryResultSchema, type ListMcpServersRequest, type ListMcpServersRequestParams, ListMcpServersRequestParamsSchema, ListMcpServersRequestSchema, type ListMcpServersResponse, ListMcpServersResponseSchema, type ListMcpServersResult, ListMcpServersResultSchema, type ListMcpToolsRequest, type ListMcpToolsRequestParams, ListMcpToolsRequestParamsSchema, ListMcpToolsRequestSchema, type ListMcpToolsResponse, ListMcpToolsResponseSchema, type ListMcpToolsResult, ListMcpToolsResultSchema, type ListSessionsOptions, type ListSkillsRequest, type ListSkillsRequestParams, ListSkillsRequestParamsSchema, ListSkillsRequestSchema, type ListSkillsResponse, ListSkillsResponseSchema, type ListSkillsResult, ListSkillsResultSchema, type ListToolsRequest, type ListToolsRequestParams, ListToolsRequestParamsSchema, ListToolsRequestSchema, type ListToolsResponse, ListToolsResponseSchema, type ListToolsResult, ListToolsResultSchema, type LoadSessionRequest, type LoadSessionRequestParams, LoadSessionRequestParamsSchema, LoadSessionRequestSchema, type LoadSessionResponse, LoadSessionResponseSchema, type LoadSessionResult, LoadSessionResultSchema, MCP_AUTH_TIMEOUT, type McpAuthCompleted, type McpAuthCompletedNotification, McpAuthCompletedNotificationSchema, McpAuthOutcome, type McpAuthRequired, type McpAuthRequiredNotification, McpAuthRequiredNotificationSchema, type McpHttpServerConfigFields, McpHttpServerConfigFieldsSchema, type McpRegistryServer, McpRegistryServerSchema, type McpServerConfig, McpServerConfigSchema, McpServerStatus, type McpServerStatusInfo, McpServerStatusInfoSchema, McpServerType, type McpSseServerConfigFields, McpSseServerConfigFieldsSchema, McpStatus, type McpStatusChanged, type McpStatusChangedNotification, McpStatusChangedNotificationSchema, type McpStatusSummary, McpStatusSummarySchema, type McpStdioServerConfigFields, McpStdioServerConfigFieldsSchema, type McpToolConfirmationDetails, McpToolConfirmationDetailsSchema, type McpToolInfo, McpToolInfoSchema, type McpToolInputSchema, McpToolInputSchemaSchema, type MessageCallback, type MessageOptions, type MilestoneValidationTriggeredEntry, MilestoneValidationTriggeredEntrySchema, type MissionAcceptedEntry, MissionAcceptedEntrySchema, type MissionFeature, MissionFeatureSchema, type MissionFeaturesChanged, type MissionFeaturesChangedNotification, MissionFeaturesChangedNotificationSchema, type MissionHeartbeat, type MissionHeartbeatNotification, MissionHeartbeatNotificationSchema, type MissionPausedEntry, MissionPausedEntrySchema, type MissionProgressEntry, type MissionProgressEntryNotification, MissionProgressEntryNotificationSchema, type MissionResumedEntry, MissionResumedEntrySchema, type MissionRunStartedEntry, MissionRunStartedEntrySchema, type MissionSnapshot, MissionSnapshotSchema, MissionState, type MissionStateChanged, type MissionStateChangedNotification, MissionStateChangedNotificationSchema, type MissionWorkerCompleted, type MissionWorkerCompletedNotification, MissionWorkerCompletedNotificationSchema, type MissionWorkerStarted, type MissionWorkerStartedNotification, MissionWorkerStartedNotificationSchema, ModelProvider, type NotificationCallback, type NotificationFilter, type OutputFormat, OutputFormatSchema, OutputFormatType, type PermissionHandler, type PermissionResolved, type PermissionResolvedNotification, PermissionResolvedNotificationSchema, ProcessExitError, ProcessTransport, type ProcessTransportOptions, type ProgressLogEntry, ProgressLogEntrySchema, ProgressLogEntryType, type ProposeMissionConfirmationDetails, ProposeMissionConfirmationDetailsSchema, ProtocolEngine, ProtocolError, type QueryOptions, REWIND_TIMEOUT, ReasoningEffort, type RedactedThinkingBlock, RedactedThinkingBlockSchema, type RemoveMcpServerRequest, type RemoveMcpServerRequestParams, RemoveMcpServerRequestParamsSchema, RemoveMcpServerRequestSchema, type RemoveMcpServerResponse, RemoveMcpServerResponseSchema, type RemoveMcpServerResult, RemoveMcpServerResultSchema, type RenameSessionRequest, type RenameSessionRequestParams, RenameSessionRequestParamsSchema, RenameSessionRequestSchema, type RenameSessionResponse, RenameSessionResponseSchema, type RenameSessionResult, RenameSessionResultSchema, type RequestPermissionHandlerResult, type RequestPermissionRequest, type RequestPermissionRequestParams, RequestPermissionRequestParamsSchema, RequestPermissionRequestSchema, type RequestPermissionResponse, RequestPermissionResponseSchema, type RequestPermissionResult, RequestPermissionResultSchema, type RequestPermissionSelection, type ResumeSessionOptions, type RewindEvictedFile, RewindEvictedFileSchema, type RewindFileCreation, RewindFileCreationSchema, type RewindFileSnapshot, RewindFileSnapshotSchema, type RunOptions, SDK_TAG, SDK_VERSION, SESSION_INIT_TIMEOUT, SdkMcpServer, type SdkMcpServerOptions, SessionError, type SessionMetadata, SessionMetadataSchema, SessionNotFoundError, type SessionNotification, type SessionNotificationParams, SessionNotificationParamsSchema, type SessionNotificationPayload, SessionNotificationPayloadSchema, SessionNotificationSchema, SessionNotificationSchemaList, SessionNotificationType, type SessionSettings, type SessionSettingsFile, SessionSettingsFileSchema, SessionSettingsSchema, type SessionSource, SessionSourceSchema, type SessionStartEvent, SessionStartEventSchema, type SessionTag, SessionTagSchema, type SessionTitleUpdated, type SessionTitleUpdatedNotification, SessionTitleUpdatedNotificationSchema, type SessionTokenUsageChangedNotification, SessionTokenUsageChangedNotificationSchema, SettingsLevel, type SettingsUpdated, type SettingsUpdatedNotification, SettingsUpdatedNotificationSchema, type SettingsUpdatedPayload, SettingsUpdatedPayloadSchema, type SkillDeviation, SkillDeviationSchema, type SkillFeedback, SkillFeedbackSchema, type SkillInfo, SkillInfoSchema, SkillLocation, type SkillResource, SkillResourceSchema, type SseMcpConfig, SseMcpConfigSchema, type StartMissionRunConfirmationDetails, StartMissionRunConfirmationDetailsSchema, type StdioMcpConfig, StdioMcpConfigSchema, StreamStateTracker, type SubmitBugReportRequest, type SubmitBugReportRequestParams, SubmitBugReportRequestParamsSchema, SubmitBugReportRequestSchema, type SubmitBugReportResponse, SubmitBugReportResponseSchema, type SubmitBugReportResult, SubmitBugReportResultSchema, type SubmitMcpAuthCodeRequest, type SubmitMcpAuthCodeRequestParams, SubmitMcpAuthCodeRequestParamsSchema, SubmitMcpAuthCodeRequestSchema, type SubmitMcpAuthCodeResponse, SubmitMcpAuthCodeResponseSchema, type SubmitMcpAuthCodeResult, SubmitMcpAuthCodeResultSchema, type SuccessResult, SuccessResultSchema, type TestCase, TestCaseSchema, type TestFile, TestFileSchema, type Tests, TestsSchema, type TextBlock, TextBlockSchema, type ThinkingBlock, ThinkingBlockSchema, type ThinkingTextDelta, type ThinkingTextDeltaNotification, ThinkingTextDeltaNotificationSchema, TimeoutError, type ToggleMcpServerRequest, type ToggleMcpServerRequestParams, ToggleMcpServerRequestParamsSchema, ToggleMcpServerRequestSchema, type ToggleMcpServerResponse, ToggleMcpServerResponseSchema, type ToggleMcpServerResult, ToggleMcpServerResultSchema, type ToggleMcpToolRequest, type ToggleMcpToolRequestParams, ToggleMcpToolRequestParamsSchema, ToggleMcpToolRequestSchema, type ToggleMcpToolResponse, ToggleMcpToolResponseSchema, type ToggleMcpToolResult, ToggleMcpToolResultSchema, type TokenUsage, TokenUsageSchema, type TokenUsageUpdate, type ToolConfirmationDetails, ToolConfirmationDetailsSchema, type ToolConfirmationInfo, ToolConfirmationInfoSchema, type ToolConfirmationListItem, ToolConfirmationListItemSchema, ToolConfirmationOutcome, ToolConfirmationType, type ToolProgress, type ToolProgressUpdate, type ToolProgressUpdateNotification, ToolProgressUpdateNotificationSchema, ToolProgressUpdateSchema, type ToolResult, type ToolResultBlock, ToolResultBlockSchema, type ToolResultNotification, ToolResultNotificationSchema, type ToolSelectionOverrides, ToolSelectionOverridesSchema, type ToolUse, type ToolUseBlock, ToolUseBlockSchema, ToolUseSchema, type TraceContextMeta, TraceContextMetaSchema, type TurnComplete, type UpdateSessionSettingsRequest, type UpdateSessionSettingsRequestParams, UpdateSessionSettingsRequestParamsSchema, UpdateSessionSettingsRequestSchema, type UpdateSessionSettingsResponse, UpdateSessionSettingsResponseSchema, type UpdateSessionSettingsResult, UpdateSessionSettingsResultSchema, type Verification, type VerificationCommand, VerificationCommandSchema, VerificationSchema, type WorkerCompletedEntry, WorkerCompletedEntrySchema, type WorkerFailedEntry, WorkerFailedEntrySchema, type WorkerPausedEntry, WorkerPausedEntrySchema, type WorkerSelectedFeatureEntry, WorkerSelectedFeatureEntrySchema, type WorkerStartedEntry, WorkerStartedEntrySchema, type WorkerStateInfo, WorkerStateInfoSchema, type WorkingStateChanged, convertNotificationToStreamMessage, createSdkMcpServer, createSession, listSessions, query, resumeSession, run, tool };
92294
+ declare const MachineTemplateBuildStatusSchema: z.ZodObject<{
92295
+ status: z.ZodEnum<["building", "success", "failed"]>;
92296
+ failureReason: z.ZodOptional<z.ZodEnum<["setup_script_error", "system_error"]>>;
92297
+ buildStartedAt: z.ZodOptional<z.ZodNumber>;
92298
+ builtAt: z.ZodOptional<z.ZodNumber>;
92299
+ logs: z.ZodOptional<z.ZodString>;
92300
+ }, "strip", z.ZodTypeAny, {
92301
+ status: "failed" | "success" | "building";
92302
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92303
+ buildStartedAt?: number | undefined;
92304
+ builtAt?: number | undefined;
92305
+ logs?: string | undefined;
92306
+ }, {
92307
+ status: "failed" | "success" | "building";
92308
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92309
+ buildStartedAt?: number | undefined;
92310
+ builtAt?: number | undefined;
92311
+ logs?: string | undefined;
92312
+ }>;
92313
+ type MachineTemplateBuildStatus = z.infer<typeof MachineTemplateBuildStatusSchema>;
92314
+ declare const MachineTemplateSchema: z.ZodObject<{
92315
+ templateId: z.ZodString;
92316
+ repoUrl: z.ZodString;
92317
+ templateName: z.ZodString;
92318
+ defaultBranch: z.ZodString;
92319
+ createdBy: z.ZodString;
92320
+ createdAt: z.ZodOptional<z.ZodNumber>;
92321
+ buildStatus: z.ZodOptional<z.ZodObject<{
92322
+ status: z.ZodEnum<["building", "success", "failed"]>;
92323
+ failureReason: z.ZodOptional<z.ZodEnum<["setup_script_error", "system_error"]>>;
92324
+ buildStartedAt: z.ZodOptional<z.ZodNumber>;
92325
+ builtAt: z.ZodOptional<z.ZodNumber>;
92326
+ logs: z.ZodOptional<z.ZodString>;
92327
+ }, "strip", z.ZodTypeAny, {
92328
+ status: "failed" | "success" | "building";
92329
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92330
+ buildStartedAt?: number | undefined;
92331
+ builtAt?: number | undefined;
92332
+ logs?: string | undefined;
92333
+ }, {
92334
+ status: "failed" | "success" | "building";
92335
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92336
+ buildStartedAt?: number | undefined;
92337
+ builtAt?: number | undefined;
92338
+ logs?: string | undefined;
92339
+ }>>;
92340
+ lastUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
92341
+ environmentVariables: z.ZodOptional<z.ZodArray<z.ZodObject<{
92342
+ key: z.ZodString;
92343
+ value: z.ZodString;
92344
+ }, "strip", z.ZodTypeAny, {
92345
+ value: string;
92346
+ key: string;
92347
+ }, {
92348
+ value: string;
92349
+ key: string;
92350
+ }>, "many">>;
92351
+ userEnvironmentVariablesByUser: z.ZodOptional<z.ZodArray<z.ZodObject<{
92352
+ key: z.ZodString;
92353
+ value: z.ZodString;
92354
+ }, "strip", z.ZodTypeAny, {
92355
+ value: string;
92356
+ key: string;
92357
+ }, {
92358
+ value: string;
92359
+ key: string;
92360
+ }>, "many">>;
92361
+ setupScript: z.ZodOptional<z.ZodString>;
92362
+ }, "strip", z.ZodTypeAny, {
92363
+ templateId: string;
92364
+ repoUrl: string;
92365
+ templateName: string;
92366
+ defaultBranch: string;
92367
+ createdBy: string;
92368
+ createdAt?: number | undefined;
92369
+ buildStatus?: {
92370
+ status: "failed" | "success" | "building";
92371
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92372
+ buildStartedAt?: number | undefined;
92373
+ builtAt?: number | undefined;
92374
+ logs?: string | undefined;
92375
+ } | undefined;
92376
+ lastUpdatedAt?: number | null | undefined;
92377
+ environmentVariables?: {
92378
+ value: string;
92379
+ key: string;
92380
+ }[] | undefined;
92381
+ userEnvironmentVariablesByUser?: {
92382
+ value: string;
92383
+ key: string;
92384
+ }[] | undefined;
92385
+ setupScript?: string | undefined;
92386
+ }, {
92387
+ templateId: string;
92388
+ repoUrl: string;
92389
+ templateName: string;
92390
+ defaultBranch: string;
92391
+ createdBy: string;
92392
+ createdAt?: number | undefined;
92393
+ buildStatus?: {
92394
+ status: "failed" | "success" | "building";
92395
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92396
+ buildStartedAt?: number | undefined;
92397
+ builtAt?: number | undefined;
92398
+ logs?: string | undefined;
92399
+ } | undefined;
92400
+ lastUpdatedAt?: number | null | undefined;
92401
+ environmentVariables?: {
92402
+ value: string;
92403
+ key: string;
92404
+ }[] | undefined;
92405
+ userEnvironmentVariablesByUser?: {
92406
+ value: string;
92407
+ key: string;
92408
+ }[] | undefined;
92409
+ setupScript?: string | undefined;
92410
+ }>;
92411
+ type MachineTemplate = z.infer<typeof MachineTemplateSchema>;
92412
+ declare const MachineTemplateListResponseSchema: z.ZodObject<{
92413
+ templates: z.ZodArray<z.ZodObject<{
92414
+ templateId: z.ZodString;
92415
+ repoUrl: z.ZodString;
92416
+ templateName: z.ZodString;
92417
+ defaultBranch: z.ZodString;
92418
+ createdBy: z.ZodString;
92419
+ createdAt: z.ZodOptional<z.ZodNumber>;
92420
+ buildStatus: z.ZodOptional<z.ZodObject<{
92421
+ status: z.ZodEnum<["building", "success", "failed"]>;
92422
+ failureReason: z.ZodOptional<z.ZodEnum<["setup_script_error", "system_error"]>>;
92423
+ buildStartedAt: z.ZodOptional<z.ZodNumber>;
92424
+ builtAt: z.ZodOptional<z.ZodNumber>;
92425
+ logs: z.ZodOptional<z.ZodString>;
92426
+ }, "strip", z.ZodTypeAny, {
92427
+ status: "failed" | "success" | "building";
92428
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92429
+ buildStartedAt?: number | undefined;
92430
+ builtAt?: number | undefined;
92431
+ logs?: string | undefined;
92432
+ }, {
92433
+ status: "failed" | "success" | "building";
92434
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92435
+ buildStartedAt?: number | undefined;
92436
+ builtAt?: number | undefined;
92437
+ logs?: string | undefined;
92438
+ }>>;
92439
+ lastUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
92440
+ environmentVariables: z.ZodOptional<z.ZodArray<z.ZodObject<{
92441
+ key: z.ZodString;
92442
+ value: z.ZodString;
92443
+ }, "strip", z.ZodTypeAny, {
92444
+ value: string;
92445
+ key: string;
92446
+ }, {
92447
+ value: string;
92448
+ key: string;
92449
+ }>, "many">>;
92450
+ userEnvironmentVariablesByUser: z.ZodOptional<z.ZodArray<z.ZodObject<{
92451
+ key: z.ZodString;
92452
+ value: z.ZodString;
92453
+ }, "strip", z.ZodTypeAny, {
92454
+ value: string;
92455
+ key: string;
92456
+ }, {
92457
+ value: string;
92458
+ key: string;
92459
+ }>, "many">>;
92460
+ setupScript: z.ZodOptional<z.ZodString>;
92461
+ }, "strip", z.ZodTypeAny, {
92462
+ templateId: string;
92463
+ repoUrl: string;
92464
+ templateName: string;
92465
+ defaultBranch: string;
92466
+ createdBy: string;
92467
+ createdAt?: number | undefined;
92468
+ buildStatus?: {
92469
+ status: "failed" | "success" | "building";
92470
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92471
+ buildStartedAt?: number | undefined;
92472
+ builtAt?: number | undefined;
92473
+ logs?: string | undefined;
92474
+ } | undefined;
92475
+ lastUpdatedAt?: number | null | undefined;
92476
+ environmentVariables?: {
92477
+ value: string;
92478
+ key: string;
92479
+ }[] | undefined;
92480
+ userEnvironmentVariablesByUser?: {
92481
+ value: string;
92482
+ key: string;
92483
+ }[] | undefined;
92484
+ setupScript?: string | undefined;
92485
+ }, {
92486
+ templateId: string;
92487
+ repoUrl: string;
92488
+ templateName: string;
92489
+ defaultBranch: string;
92490
+ createdBy: string;
92491
+ createdAt?: number | undefined;
92492
+ buildStatus?: {
92493
+ status: "failed" | "success" | "building";
92494
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92495
+ buildStartedAt?: number | undefined;
92496
+ builtAt?: number | undefined;
92497
+ logs?: string | undefined;
92498
+ } | undefined;
92499
+ lastUpdatedAt?: number | null | undefined;
92500
+ environmentVariables?: {
92501
+ value: string;
92502
+ key: string;
92503
+ }[] | undefined;
92504
+ userEnvironmentVariablesByUser?: {
92505
+ value: string;
92506
+ key: string;
92507
+ }[] | undefined;
92508
+ setupScript?: string | undefined;
92509
+ }>, "many">;
92510
+ pagination: z.ZodObject<{
92511
+ hasMore: z.ZodBoolean;
92512
+ nextCursor: z.ZodNullable<z.ZodString>;
92513
+ }, "strip", z.ZodTypeAny, {
92514
+ hasMore: boolean;
92515
+ nextCursor: string | null;
92516
+ }, {
92517
+ hasMore: boolean;
92518
+ nextCursor: string | null;
92519
+ }>;
92520
+ }, "strip", z.ZodTypeAny, {
92521
+ templates: {
92522
+ templateId: string;
92523
+ repoUrl: string;
92524
+ templateName: string;
92525
+ defaultBranch: string;
92526
+ createdBy: string;
92527
+ createdAt?: number | undefined;
92528
+ buildStatus?: {
92529
+ status: "failed" | "success" | "building";
92530
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92531
+ buildStartedAt?: number | undefined;
92532
+ builtAt?: number | undefined;
92533
+ logs?: string | undefined;
92534
+ } | undefined;
92535
+ lastUpdatedAt?: number | null | undefined;
92536
+ environmentVariables?: {
92537
+ value: string;
92538
+ key: string;
92539
+ }[] | undefined;
92540
+ userEnvironmentVariablesByUser?: {
92541
+ value: string;
92542
+ key: string;
92543
+ }[] | undefined;
92544
+ setupScript?: string | undefined;
92545
+ }[];
92546
+ pagination: {
92547
+ hasMore: boolean;
92548
+ nextCursor: string | null;
92549
+ };
92550
+ }, {
92551
+ templates: {
92552
+ templateId: string;
92553
+ repoUrl: string;
92554
+ templateName: string;
92555
+ defaultBranch: string;
92556
+ createdBy: string;
92557
+ createdAt?: number | undefined;
92558
+ buildStatus?: {
92559
+ status: "failed" | "success" | "building";
92560
+ failureReason?: "setup_script_error" | "system_error" | undefined;
92561
+ buildStartedAt?: number | undefined;
92562
+ builtAt?: number | undefined;
92563
+ logs?: string | undefined;
92564
+ } | undefined;
92565
+ lastUpdatedAt?: number | null | undefined;
92566
+ environmentVariables?: {
92567
+ value: string;
92568
+ key: string;
92569
+ }[] | undefined;
92570
+ userEnvironmentVariablesByUser?: {
92571
+ value: string;
92572
+ key: string;
92573
+ }[] | undefined;
92574
+ setupScript?: string | undefined;
92575
+ }[];
92576
+ pagination: {
92577
+ hasMore: boolean;
92578
+ nextCursor: string | null;
92579
+ };
92580
+ }>;
92581
+ type MachineTemplateListResponse = z.infer<typeof MachineTemplateListResponseSchema>;
92582
+ interface FactoryApiOptions {
92583
+ apiKey: string;
92584
+ baseUrl?: string;
92585
+ }
92586
+ interface ComputerApiOptions extends FactoryApiOptions {
92587
+ computerId: string;
92588
+ }
92589
+ interface ListMachineTemplatesOptions extends FactoryApiOptions {
92590
+ limit?: number;
92591
+ cursor?: string;
92592
+ }
92593
+ interface GetMachineTemplateOptions extends FactoryApiOptions {
92594
+ templateId: string;
92595
+ }
92596
+ declare const ComputerSchema: z.ZodObject<{
92597
+ id: z.ZodString;
92598
+ name: z.ZodString;
92599
+ hostname: z.ZodOptional<z.ZodString>;
92600
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92601
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92602
+ createdAt: z.ZodNumber;
92603
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92604
+ remoteUser: z.ZodOptional<z.ZodString>;
92605
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
92606
+ id: z.ZodString;
92607
+ name: z.ZodString;
92608
+ hostname: z.ZodOptional<z.ZodString>;
92609
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92610
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92611
+ createdAt: z.ZodNumber;
92612
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92613
+ remoteUser: z.ZodOptional<z.ZodString>;
92614
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
92615
+ id: z.ZodString;
92616
+ name: z.ZodString;
92617
+ hostname: z.ZodOptional<z.ZodString>;
92618
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92619
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92620
+ createdAt: z.ZodNumber;
92621
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92622
+ remoteUser: z.ZodOptional<z.ZodString>;
92623
+ }, z.ZodTypeAny, "passthrough">>;
92624
+ type Computer = z.infer<typeof ComputerSchema>;
92625
+ declare const ComputerListResponseSchema: z.ZodObject<{
92626
+ computers: z.ZodArray<z.ZodObject<{
92627
+ id: z.ZodString;
92628
+ name: z.ZodString;
92629
+ hostname: z.ZodOptional<z.ZodString>;
92630
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92631
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92632
+ createdAt: z.ZodNumber;
92633
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92634
+ remoteUser: z.ZodOptional<z.ZodString>;
92635
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
92636
+ id: z.ZodString;
92637
+ name: z.ZodString;
92638
+ hostname: z.ZodOptional<z.ZodString>;
92639
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92640
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92641
+ createdAt: z.ZodNumber;
92642
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92643
+ remoteUser: z.ZodOptional<z.ZodString>;
92644
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
92645
+ id: z.ZodString;
92646
+ name: z.ZodString;
92647
+ hostname: z.ZodOptional<z.ZodString>;
92648
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92649
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92650
+ createdAt: z.ZodNumber;
92651
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92652
+ remoteUser: z.ZodOptional<z.ZodString>;
92653
+ }, z.ZodTypeAny, "passthrough">>, "many">;
92654
+ }, "strip", z.ZodTypeAny, {
92655
+ computers: z.objectOutputType<{
92656
+ id: z.ZodString;
92657
+ name: z.ZodString;
92658
+ hostname: z.ZodOptional<z.ZodString>;
92659
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92660
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92661
+ createdAt: z.ZodNumber;
92662
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92663
+ remoteUser: z.ZodOptional<z.ZodString>;
92664
+ }, z.ZodTypeAny, "passthrough">[];
92665
+ }, {
92666
+ computers: z.objectInputType<{
92667
+ id: z.ZodString;
92668
+ name: z.ZodString;
92669
+ hostname: z.ZodOptional<z.ZodString>;
92670
+ providerType: z.ZodEnum<["byom", "e2b"]>;
92671
+ status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
92672
+ createdAt: z.ZodNumber;
92673
+ relayClientUrl: z.ZodOptional<z.ZodString>;
92674
+ remoteUser: z.ZodOptional<z.ZodString>;
92675
+ }, z.ZodTypeAny, "passthrough">[];
92676
+ }>;
92677
+ type ComputerListResponse = z.infer<typeof ComputerListResponseSchema>;
92678
+ interface ListComputersOptions extends FactoryApiOptions {
92679
+ }
92680
+ interface GetComputerOptions extends ComputerApiOptions {
92681
+ }
92682
+ interface CreateComputerOptions extends FactoryApiOptions {
92683
+ name: string;
92684
+ remoteUser: string;
92685
+ provider?: 'byom' | 'e2b';
92686
+ hostId?: string;
92687
+ repos?: string[];
92688
+ autoInstallDeps?: boolean;
92689
+ serviceAccountId?: string;
92690
+ }
92691
+ interface GetComputerByNameOptions extends FactoryApiOptions {
92692
+ name: string;
92693
+ }
92694
+ interface UpdateComputerOptions extends ComputerApiOptions {
92695
+ name?: string;
92696
+ remoteUser?: string;
92697
+ hostId?: string;
92698
+ }
92699
+ interface DeleteComputerOptions extends ComputerApiOptions {
92700
+ }
92701
+ interface RestartComputerOptions extends ComputerApiOptions {
92702
+ }
92703
+ interface RefreshComputerOptions extends ComputerApiOptions {
92704
+ }
92705
+ declare const RefreshComputerResponseSchema: z.ZodObject<{
92706
+ configured: z.ZodNumber;
92707
+ }, "strip", z.ZodTypeAny, {
92708
+ configured: number;
92709
+ }, {
92710
+ configured: number;
92711
+ }>;
92712
+ type RefreshComputerResponse = z.infer<typeof RefreshComputerResponseSchema>;
92713
+ declare const ComputerMetricSchema: z.ZodObject<{
92714
+ timestamp: z.ZodString;
92715
+ cpuUsedPct: z.ZodNumber;
92716
+ cpuCount: z.ZodNumber;
92717
+ memUsed: z.ZodNumber;
92718
+ memTotal: z.ZodNumber;
92719
+ diskUsed: z.ZodNumber;
92720
+ diskTotal: z.ZodNumber;
92721
+ }, "strip", z.ZodTypeAny, {
92722
+ timestamp: string;
92723
+ cpuUsedPct: number;
92724
+ cpuCount: number;
92725
+ memUsed: number;
92726
+ memTotal: number;
92727
+ diskUsed: number;
92728
+ diskTotal: number;
92729
+ }, {
92730
+ timestamp: string;
92731
+ cpuUsedPct: number;
92732
+ cpuCount: number;
92733
+ memUsed: number;
92734
+ memTotal: number;
92735
+ diskUsed: number;
92736
+ diskTotal: number;
92737
+ }>;
92738
+ type ComputerMetric = z.infer<typeof ComputerMetricSchema>;
92739
+ declare const ComputerMetricsResponseSchema: z.ZodArray<z.ZodObject<{
92740
+ timestamp: z.ZodString;
92741
+ cpuUsedPct: z.ZodNumber;
92742
+ cpuCount: z.ZodNumber;
92743
+ memUsed: z.ZodNumber;
92744
+ memTotal: z.ZodNumber;
92745
+ diskUsed: z.ZodNumber;
92746
+ diskTotal: z.ZodNumber;
92747
+ }, "strip", z.ZodTypeAny, {
92748
+ timestamp: string;
92749
+ cpuUsedPct: number;
92750
+ cpuCount: number;
92751
+ memUsed: number;
92752
+ memTotal: number;
92753
+ diskUsed: number;
92754
+ diskTotal: number;
92755
+ }, {
92756
+ timestamp: string;
92757
+ cpuUsedPct: number;
92758
+ cpuCount: number;
92759
+ memUsed: number;
92760
+ memTotal: number;
92761
+ diskUsed: number;
92762
+ diskTotal: number;
92763
+ }>, "many">;
92764
+ type ComputerMetricsResponse = z.infer<typeof ComputerMetricsResponseSchema>;
92765
+ interface GetComputerMetricsOptions extends ComputerApiOptions {
92766
+ start?: string;
92767
+ }
92768
+ interface RetryInstallDepsOptions extends ComputerApiOptions {
92769
+ }
92770
+ declare const RemoteSessionSchema: z.ZodObject<{
92771
+ sessionId: z.ZodString;
92772
+ title: z.ZodOptional<z.ZodString>;
92773
+ status: z.ZodEnum<["idle", "pending", "running"]>;
92774
+ messageCount: z.ZodNumber;
92775
+ createdAt: z.ZodNumber;
92776
+ updatedAt: z.ZodNumber;
92777
+ completedAt: z.ZodOptional<z.ZodNumber>;
92778
+ computerId: z.ZodOptional<z.ZodString>;
92779
+ }, "strip", z.ZodTypeAny, {
92780
+ status: "idle" | "running" | "pending";
92781
+ createdAt: number;
92782
+ updatedAt: number;
92783
+ sessionId: string;
92784
+ messageCount: number;
92785
+ title?: string | undefined;
92786
+ completedAt?: number | undefined;
92787
+ computerId?: string | undefined;
92788
+ }, {
92789
+ status: "idle" | "running" | "pending";
92790
+ createdAt: number;
92791
+ updatedAt: number;
92792
+ sessionId: string;
92793
+ messageCount: number;
92794
+ title?: string | undefined;
92795
+ completedAt?: number | undefined;
92796
+ computerId?: string | undefined;
92797
+ }>;
92798
+ type RemoteSession = z.infer<typeof RemoteSessionSchema>;
92799
+ declare const RemoteSessionListResponseSchema: z.ZodObject<{
92800
+ sessions: z.ZodArray<z.ZodObject<{
92801
+ sessionId: z.ZodString;
92802
+ title: z.ZodOptional<z.ZodString>;
92803
+ status: z.ZodEnum<["idle", "pending", "running"]>;
92804
+ messageCount: z.ZodNumber;
92805
+ createdAt: z.ZodNumber;
92806
+ updatedAt: z.ZodNumber;
92807
+ completedAt: z.ZodOptional<z.ZodNumber>;
92808
+ computerId: z.ZodOptional<z.ZodString>;
92809
+ }, "strip", z.ZodTypeAny, {
92810
+ status: "idle" | "running" | "pending";
92811
+ createdAt: number;
92812
+ updatedAt: number;
92813
+ sessionId: string;
92814
+ messageCount: number;
92815
+ title?: string | undefined;
92816
+ completedAt?: number | undefined;
92817
+ computerId?: string | undefined;
92818
+ }, {
92819
+ status: "idle" | "running" | "pending";
92820
+ createdAt: number;
92821
+ updatedAt: number;
92822
+ sessionId: string;
92823
+ messageCount: number;
92824
+ title?: string | undefined;
92825
+ completedAt?: number | undefined;
92826
+ computerId?: string | undefined;
92827
+ }>, "many">;
92828
+ pagination: z.ZodObject<{
92829
+ hasMore: z.ZodBoolean;
92830
+ nextCursor: z.ZodNullable<z.ZodString>;
92831
+ }, "strip", z.ZodTypeAny, {
92832
+ hasMore: boolean;
92833
+ nextCursor: string | null;
92834
+ }, {
92835
+ hasMore: boolean;
92836
+ nextCursor: string | null;
92837
+ }>;
92838
+ }, "strip", z.ZodTypeAny, {
92839
+ sessions: {
92840
+ status: "idle" | "running" | "pending";
92841
+ createdAt: number;
92842
+ updatedAt: number;
92843
+ sessionId: string;
92844
+ messageCount: number;
92845
+ title?: string | undefined;
92846
+ completedAt?: number | undefined;
92847
+ computerId?: string | undefined;
92848
+ }[];
92849
+ pagination: {
92850
+ hasMore: boolean;
92851
+ nextCursor: string | null;
92852
+ };
92853
+ }, {
92854
+ sessions: {
92855
+ status: "idle" | "running" | "pending";
92856
+ createdAt: number;
92857
+ updatedAt: number;
92858
+ sessionId: string;
92859
+ messageCount: number;
92860
+ title?: string | undefined;
92861
+ completedAt?: number | undefined;
92862
+ computerId?: string | undefined;
92863
+ }[];
92864
+ pagination: {
92865
+ hasMore: boolean;
92866
+ nextCursor: string | null;
92867
+ };
92868
+ }>;
92869
+ type RemoteSessionListResponse = z.infer<typeof RemoteSessionListResponseSchema>;
92870
+ interface ListRemoteSessionsOptions extends FactoryApiOptions {
92871
+ computerId?: string;
92872
+ limit?: number;
92873
+ cursor?: string;
92874
+ }
92875
+
92876
+ declare function listMachineTemplates(options: ListMachineTemplatesOptions): Promise<MachineTemplateListResponse>;
92877
+ declare function getMachineTemplate(options: GetMachineTemplateOptions): Promise<MachineTemplate>;
92878
+ declare function listComputers(options: ListComputersOptions): Promise<ComputerListResponse>;
92879
+ declare function getComputer(options: GetComputerOptions): Promise<Computer>;
92880
+ declare function createComputer(options: CreateComputerOptions): Promise<Computer>;
92881
+ declare function getComputerByName(options: GetComputerByNameOptions): Promise<Computer>;
92882
+ declare function updateComputer(options: UpdateComputerOptions): Promise<Computer>;
92883
+ declare function deleteComputer(options: DeleteComputerOptions): Promise<void>;
92884
+ declare function restartComputer(options: RestartComputerOptions): Promise<void>;
92885
+ declare function refreshComputer(options: RefreshComputerOptions): Promise<RefreshComputerResponse>;
92886
+ declare function getComputerMetrics(options: GetComputerMetricsOptions): Promise<ComputerMetricsResponse>;
92887
+ declare function retryInstallDeps(options: RetryInstallDepsOptions): Promise<Computer>;
92888
+ declare function listRemoteSessions(options: ListRemoteSessionsOptions): Promise<RemoteSessionListResponse>;
92889
+
92890
+ type DaemonClientPermissionHandler = PermissionHandler;
92891
+ type DaemonClientAskUserHandler = AskUserHandler;
92892
+ interface DaemonClientOptions {
92893
+ transport: DroidClientTransport;
92894
+ apiKey: string;
92895
+ }
92896
+ declare class DaemonClient {
92897
+ private readonly _engine;
92898
+ private readonly _apiKey;
92899
+ private _sessionId;
92900
+ private _closed;
92901
+ private readonly _notificationListeners;
92902
+ private _permissionHandler;
92903
+ private _askUserHandler;
92904
+ constructor(options: DaemonClientOptions);
92905
+ get sessionId(): string | null;
92906
+ get isConnected(): boolean;
92907
+ initializeSession(params: InitializeSessionRequestParams): Promise<InitializeSessionResult>;
92908
+ loadSession(params: LoadSessionRequestParams): Promise<LoadSessionResult>;
92909
+ addUserMessage(params: Pick<AddUserMessageRequestParams, 'text'> & Partial<Pick<AddUserMessageRequestParams, 'images' | 'files' | 'messageId' | 'outputFormat'>>): Promise<AddUserMessageResult>;
92910
+ interruptSession(): Promise<InterruptSessionResult>;
92911
+ closeSession(params?: CloseSessionRequestParams): Promise<CloseSessionResult>;
92912
+ updateSessionSettings(params: Partial<UpdateSessionSettingsRequestParams>): Promise<UpdateSessionSettingsResult>;
92913
+ compactSession(params?: CompactSessionRequestParams): Promise<CompactSessionResult>;
92914
+ forkSession(): Promise<ForkSessionResult>;
92915
+ getContextBreakdown(): Promise<ContextBreakdownResult>;
92916
+ renameSession(params: RenameSessionRequestParams): Promise<RenameSessionResult>;
92917
+ getRewindInfo(params: GetRewindInfoRequestParams): Promise<GetRewindInfoResult>;
92918
+ executeRewind(params: ExecuteRewindRequestParams): Promise<ExecuteRewindResult>;
92919
+ addMcpServer(params: AddMcpServerRequestParams): Promise<AddMcpServerResult>;
92920
+ removeMcpServer(params: RemoveMcpServerRequestParams): Promise<RemoveMcpServerResult>;
92921
+ toggleMcpServer(params: ToggleMcpServerRequestParams): Promise<ToggleMcpServerResult>;
92922
+ listMcpServers(): Promise<ListMcpServersResult>;
92923
+ listMcpTools(): Promise<ListMcpToolsResult>;
92924
+ authenticateMcpServer(params: AuthenticateMcpServerRequestParams): Promise<AuthenticateMcpServerResult>;
92925
+ listSkills(): Promise<ListSkillsResult>;
92926
+ onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
92927
+ setPermissionHandler(handler: DaemonClientPermissionHandler): void;
92928
+ setAskUserHandler(handler: DaemonClientAskUserHandler): void;
92929
+ close(): Promise<void>;
92930
+ private _rpc;
92931
+ private _sessionRpc;
92932
+ private _dispatchPermissionRequest;
92933
+ private _dispatchAskUserRequest;
92934
+ private _ensureNotClosed;
92935
+ private _ensureSession;
92936
+ }
92937
+
92938
+ declare enum MachineType {
92939
+ Local = "local",
92940
+ Computer = "computer"
92941
+ }
92942
+ type SDKMachineConfig = {
92943
+ type: MachineType.Local;
92944
+ } | {
92945
+ type: MachineType.Computer;
92946
+ computerId: string;
92947
+ };
92948
+ interface ConnectDaemonOptions {
92949
+ /** Factory API key for authentication. */
92950
+ apiKey: string;
92951
+ /** Machine to connect to. Defaults to local daemon if omitted. */
92952
+ machine?: SDKMachineConfig;
92953
+ /** Direct WebSocket URL. Overrides machine-based URL resolution. */
92954
+ url?: string;
92955
+ /** Connection retry budget for the connect+authenticate cycle. */
92956
+ maxRetries?: number;
92957
+ /** Local daemon WebSocket port. Default: 37643. */
92958
+ daemonPort?: number;
92959
+ /** Factory relay base URL for computer connections. Default: wss://relay.factory.ai */
92960
+ relayBaseUrl?: string;
92961
+ /** Factory API base URL. Default: https://api.factory.ai */
92962
+ baseUrl?: string;
92963
+ }
92964
+ interface DaemonSessionOptions extends ToolSelectionOverrides {
92965
+ cwd?: string;
92966
+ modelId?: string;
92967
+ autonomyLevel?: AutonomyLevel;
92968
+ interactionMode?: DroidInteractionMode;
92969
+ reasoningEffort?: ReasoningEffort;
92970
+ specModeModelId?: string;
92971
+ specModeReasoningEffort?: ReasoningEffort;
92972
+ mcpServers?: DroidMcpServerConfig[];
92973
+ tags?: SessionTag[];
92974
+ /** Permission handler for tool confirmations. */
92975
+ permissionHandler?: ClientPermissionHandler;
92976
+ /** Handler for ask-user requests from the agent. */
92977
+ askUserHandler?: ClientAskUserHandler;
92978
+ /** Where this session was created from. Used for attribution. */
92979
+ sessionSource?: SessionSource;
92980
+ }
92981
+ interface DaemonResumeOptions {
92982
+ /** Permission handler for tool confirmations. */
92983
+ permissionHandler?: ClientPermissionHandler;
92984
+ /** Handler for ask-user requests from the agent. */
92985
+ askUserHandler?: ClientAskUserHandler;
92986
+ /** MCP servers to attach to the resumed session. */
92987
+ mcpServers?: DroidMcpServerConfig[];
92988
+ }
92989
+ interface SendOptions {
92990
+ /** Base64-encoded image attachments. */
92991
+ images?: Base64ImageSource[];
92992
+ /** Document/file attachments. */
92993
+ files?: DocumentSource[];
92994
+ /** Structured output request. */
92995
+ outputFormat?: OutputFormat;
92996
+ }
92997
+ interface WebSocketTransportOptions {
92998
+ /** Max connection retries. Default: 5. */
92999
+ maxConnectRetries?: number;
93000
+ /** Initial retry delay in ms. Default: 500. */
93001
+ initialRetryDelayMs?: number;
93002
+ /** Max retry delay in ms. Default: 5000. */
93003
+ maxRetryDelayMs?: number;
93004
+ /** Connection timeout in ms. Default: 5000. */
93005
+ connectionTimeoutMs?: number;
93006
+ }
93007
+
93008
+ declare class DaemonSession {
93009
+ private _client;
93010
+ private _sessionId;
93011
+ private _closed;
93012
+ private readonly _activeBridges;
93013
+ private readonly _cleanupCallbacks;
93014
+ /** @internal */
93015
+ constructor(client: DaemonClient, sessionId: string);
93016
+ /** @internal */
93017
+ addCleanup(cleanup: () => Promise<void> | void): void;
93018
+ get sessionId(): string;
93019
+ stream(prompt: string, options?: MessageOptions & {
93020
+ includePartialMessages?: false;
93021
+ }): AsyncGenerator<DroidStreamMessage, void, undefined>;
93022
+ stream(prompt: string, options: MessageOptions & {
93023
+ includePartialMessages: true;
93024
+ }): AsyncGenerator<DroidStreamEvent, void, undefined>;
93025
+ send(prompt: string, options?: SendOptions): Promise<void>;
93026
+ interrupt(): Promise<void>;
93027
+ close(): Promise<void>;
93028
+ updateSettings(params: Partial<UpdateSessionSettingsRequestParams>): Promise<UpdateSessionSettingsResult>;
93029
+ enterSpecMode(params?: Pick<UpdateSessionSettingsRequestParams, 'specModeModelId' | 'specModeReasoningEffort'>): Promise<UpdateSessionSettingsResult>;
93030
+ compactSession(params?: CompactSessionRequestParams): Promise<CompactSessionResult>;
93031
+ forkSession(): Promise<ForkSessionResult>;
93032
+ getContextBreakdown(): Promise<ContextBreakdownResult>;
93033
+ renameSession(params: RenameSessionRequestParams): Promise<RenameSessionResult>;
93034
+ getRewindInfo(params: GetRewindInfoRequestParams): Promise<GetRewindInfoResult>;
93035
+ executeRewind(params: ExecuteRewindRequestParams): Promise<ExecuteRewindResult>;
93036
+ addMcpServer(params: AddMcpServerRequestParams): Promise<AddMcpServerResult>;
93037
+ removeMcpServer(params: RemoveMcpServerRequestParams): Promise<RemoveMcpServerResult>;
93038
+ toggleMcpServer(params: ToggleMcpServerRequestParams): Promise<ToggleMcpServerResult>;
93039
+ listMcpServers(): Promise<ListMcpServersResult>;
93040
+ listMcpTools(): Promise<ListMcpToolsResult>;
93041
+ authenticateMcpServer(params: AuthenticateMcpServerRequestParams): Promise<AuthenticateMcpServerResult>;
93042
+ listSkills(): Promise<ListSkillsResult>;
93043
+ onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
93044
+ private _ensureNotClosed;
93045
+ }
93046
+
93047
+ declare class WebSocketTransport implements DroidClientTransport {
93048
+ private readonly maxConnectRetries;
93049
+ private readonly initialRetryDelayMs;
93050
+ private readonly maxRetryDelayMs;
93051
+ private readonly connectionTimeoutMs;
93052
+ private ws;
93053
+ private messageHandler;
93054
+ private errorHandler;
93055
+ private _isConnected;
93056
+ private isClosing;
93057
+ constructor(options?: WebSocketTransportOptions);
93058
+ get isConnected(): boolean;
93059
+ connect(url?: string): Promise<void>;
93060
+ send(message: Record<string, unknown>): void;
93061
+ onMessage(callback: MessageCallback): void;
93062
+ onError(callback: ErrorCallback): void;
93063
+ close(): Promise<void>;
93064
+ private _doConnect;
93065
+ private _setupOngoingHandlers;
93066
+ }
93067
+
93068
+ declare function resolveWebSocketUrl(options: ConnectDaemonOptions & {
93069
+ _localPort?: number;
93070
+ }): string;
93071
+ declare class DaemonConnection {
93072
+ private readonly _transport;
93073
+ private readonly _multiplexer;
93074
+ private readonly _apiKey;
93075
+ private _closed;
93076
+ /** @internal */
93077
+ constructor(transport: WebSocketTransport, apiKey: string);
93078
+ createSession(options?: DaemonSessionOptions): Promise<DaemonSession>;
93079
+ resumeSession(sessionId: string, options?: DaemonResumeOptions): Promise<DaemonSession>;
93080
+ interruptSession(sessionId: string): Promise<void>;
93081
+ close(): Promise<void>;
93082
+ private _ensureNotClosed;
93083
+ }
93084
+ declare function connectDaemon(options: ConnectDaemonOptions): Promise<DaemonConnection>;
93085
+
93086
+ /**
93087
+ * Ensure a local `droid daemon` process is running and reachable.
93088
+ *
93089
+ * Discovery order:
93090
+ * 1. Cached target from a previous call in this process
93091
+ * 2. Well-known port (37643)
93092
+ * 3. Port file (`~/.factory/sdk/daemon.port`)
93093
+ * 4. Spawn new daemon (prefer well-known port, fallback to random)
93094
+ *
93095
+ * Concurrent calls are deduplicated — all callers join the same
93096
+ * spawn attempt.
93097
+ */
93098
+ declare function ensureLocalDaemon(): Promise<{
93099
+ port: number;
93100
+ }>;
93101
+
93102
+ export { type AddMcpServerRequest, type AddMcpServerRequestParams, AddMcpServerRequestParamsSchema, AddMcpServerRequestSchema, type AddMcpServerResponse, AddMcpServerResponseSchema, type AddMcpServerResult, AddMcpServerResultSchema, type AddUserMessageRequest, type AddUserMessageRequestParams, AddUserMessageRequestParamsSchema, AddUserMessageRequestSchema, type AddUserMessageResponse, AddUserMessageResponseSchema, type AddUserMessageResult, AddUserMessageResultSchema, type ApplyPatchToolConfirmationDetails, ApplyPatchToolConfirmationDetailsSchema, type AskUserCollectedAnswer, AskUserCollectedAnswerSchema, type AskUserConfirmationDetails, AskUserConfirmationDetailsSchema, type AskUserHandler, type AskUserQuestion, AskUserQuestionSchema, type AskUserRequest, type AskUserRequestParams, AskUserRequestParamsSchema, AskUserRequestSchema, type AskUserResponse, AskUserResponseSchema, type AskUserResult, AskUserResultSchema, type AssistantTextComplete, type AssistantTextCompleteNotification, AssistantTextCompleteNotificationSchema, type AssistantTextDelta, type AssistantTextDeltaNotification, AssistantTextDeltaNotificationSchema, type AuthenticateMcpServerRequest, type AuthenticateMcpServerRequestParams, AuthenticateMcpServerRequestParamsSchema, AuthenticateMcpServerRequestSchema, type AuthenticateMcpServerResponse, AuthenticateMcpServerResponseSchema, type AuthenticateMcpServerResult, AuthenticateMcpServerResultSchema, AutonomyLevel, AutonomyMode, type AvailableModelConfig, AvailableModelConfigSchema, type Base64ImageSource, Base64ImageSourceSchema, type BaseDroidHookInput, type BaseNotification, BaseNotificationSchema, type BaseRequest, BaseRequestSchema, type BaseResponseFailure, BaseResponseFailureSchema, type BaseResponseSuccess, BaseResponseSuccessSchema, COMPACTION_TIMEOUT, type CancelMcpAuthRequest, type CancelMcpAuthRequestParams, CancelMcpAuthRequestParamsSchema, CancelMcpAuthRequestSchema, type CancelMcpAuthResponse, CancelMcpAuthResponseSchema, type CancelMcpAuthResult, CancelMcpAuthResultSchema, type ClearMcpAuthRequest, type ClearMcpAuthRequestParams, ClearMcpAuthRequestParamsSchema, ClearMcpAuthRequestSchema, type ClearMcpAuthResponse, ClearMcpAuthResponseSchema, type ClearMcpAuthResult, ClearMcpAuthResultSchema, type CliRequestOrNotification, CliRequestOrNotificationSchema, type ClientAskUserHandler, type ClientPermissionHandler, type ClientRequest, ClientRequestSchema, type CloseSessionRequest, type CloseSessionRequestParams, CloseSessionRequestParamsSchema, CloseSessionRequestSchema, type CloseSessionResponse, CloseSessionResponseSchema, type CloseSessionResult, CloseSessionResultSchema, type CompactSessionRequest, type CompactSessionRequestParams, CompactSessionRequestParamsSchema, CompactSessionRequestSchema, type CompactSessionResponse, CompactSessionResponseSchema, type CompactSessionResult, CompactSessionResultSchema, type Computer, type ComputerApiOptions, type ComputerListResponse, ComputerListResponseSchema, type ComputerMetric, ComputerMetricSchema, type ComputerMetricsResponse, ComputerMetricsResponseSchema, ComputerSchema, type ConnectDaemonOptions, ConnectionError, type ContentBlock, ContentBlockSchema, ContextBreakdownCategorySchema, type ContextBreakdownResult, ContextBreakdownResultSchema, type ContextStats, ContextStatsAccuracy, ContextStatsSchema, type CreateComputerOptions, type CreateMessage, type CreateMessageNotification, CreateMessageNotificationSchema, type CreateSessionOptions, type CreateToolConfirmationDetails, CreateToolConfirmationDetailsSchema, DEFAULT_REQUEST_TIMEOUT, DaemonClient, type DaemonClientOptions, DaemonConnection, type DaemonResumeOptions, DaemonSession, type DaemonSessionOptions, DecompSessionType, type DeleteComputerOptions, type DiscoveredIssue, DiscoveredIssueSchema, type DismissalRecord, DismissalRecordSchema, DismissalType, type DocumentBlock, DocumentBlockSchema, type DocumentSource, DocumentSourceSchema, type DroidAssistantMessage, DroidClient, DroidClientMethod, type DroidClientOptions, type DroidClientTransport, type DroidErrorMessage, DroidErrorType, type DroidHookEvent, DroidHookEventSchema, type DroidHookExecutionResult, DroidHookExecutionResultSchema, type DroidHookInput, type DroidHookOutput, DroidHookOutputSchema, DroidHookSpecificOutputSchema, DroidInteractionMode, type DroidMcpServerConfig, type DroidMessage, DroidMessageType, type DroidPermissionMode, type DroidResult, type DroidResultMessage, DroidServerMethod, DroidSession, type DroidStreamEvent, type DroidStreamMessage, type DroidTool, type DroidToolCallMessage, type DroidToolResult, type DroidToolResultMessage, type DroidUserMessage, DroidWorkingState, type DroidWorkingStateChangedNotification, DroidWorkingStateChangedNotificationSchema, type EditToolConfirmationDetails, EditToolConfirmationDetailsSchema, type EmptyResult, EmptyResultSchema, type ErrorCallback, type ErrorDetail, ErrorDetailSchema, type ErrorEvent, type ErrorNotification, ErrorNotificationSchema, type ExecToolInfo, ExecToolInfoSchema, type ExecuteRewindRequest, type ExecuteRewindRequestParams, ExecuteRewindRequestParamsSchema, ExecuteRewindRequestSchema, type ExecuteRewindResponse, ExecuteRewindResponseSchema, type ExecuteRewindResult, ExecuteRewindResultSchema, type ExecuteToolConfirmationDetails, ExecuteToolConfirmationDetailsSchema, type ExitSpecModeConfirmationDetails, ExitSpecModeConfirmationDetailsSchema, FACTORY_CLIENT_HEADER, FACTORY_CLIENT_VERSION, FACTORY_PROTOCOL_VERSION, type FactoryApiOptions, type FactoryDroidMessage, FactoryDroidMessageRole, FactoryDroidMessageSchema, FeatureStatus, FeatureSuccessState, FeatureSuccessStateSchema, type ForkSessionRequest, type ForkSessionRequestParams, ForkSessionRequestParamsSchema, ForkSessionRequestSchema, type ForkSessionResponse, ForkSessionResponseSchema, type ForkSessionResult, ForkSessionResultSchema, type GetComputerByNameOptions, type GetComputerMetricsOptions, type GetComputerOptions, type GetContextStatsRequest, type GetContextStatsRequestParams, GetContextStatsRequestParamsSchema, GetContextStatsRequestSchema, type GetContextStatsResponse, GetContextStatsResponseSchema, type GetContextStatsResult, GetContextStatsResultSchema, type GetMachineTemplateOptions, type GetRewindInfoRequest, type GetRewindInfoRequestParams, GetRewindInfoRequestParamsSchema, GetRewindInfoRequestSchema, type GetRewindInfoResponse, GetRewindInfoResponseSchema, type GetRewindInfoResult, GetRewindInfoResultSchema, type GitRepoInfo, GitRepoInfoSchema, type Handoff, type HandoffItemsDismissedEntry, HandoffItemsDismissedEntrySchema, HandoffSchema, type HookCommand, HookCommandSchema, type HookExecution, type HookExecutionCompletedNotification, HookExecutionCompletedNotificationSchema, type HookExecutionStartedNotification, HookExecutionStartedNotificationSchema, type HookResult, HookResultSchema, type HttpHeader, HttpHeaderSchema, type HttpMcpConfig, HttpMcpConfigSchema, type ImageBlock, ImageBlockSchema, type InitializeSessionRequest, type InitializeSessionRequestParams, InitializeSessionRequestParamsSchema, InitializeSessionRequestSchema, type InitializeSessionResponse, InitializeSessionResponseSchema, type InitializeSessionResult, InitializeSessionResultSchema, type InteractiveCheck, InteractiveCheckSchema, type InterruptSessionRequest, type InterruptSessionRequestParams, InterruptSessionRequestParamsSchema, InterruptSessionRequestSchema, type InterruptSessionResponse, InterruptSessionResponseSchema, type InterruptSessionResult, InterruptSessionResultSchema, IssueSeverity, JSONRPC_VERSION, type JsonArray, JsonArraySchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonRpcEnvelope, JsonRpcEnvelopeSchema, type JsonRpcError, JsonRpcErrorCode, JsonRpcErrorSchema, type JsonRpcMessage, JsonRpcMessageSchema, JsonRpcMessageType, type JsonRpcNotification, JsonRpcNotificationSchema, type JsonRpcRequest, JsonRpcRequestSchema, type JsonRpcResponse, type JsonRpcResponseFailure, JsonRpcResponseFailureSchema, JsonRpcResponseSchema, type JsonRpcResponseSuccess, JsonRpcResponseSuccessSchema, type JsonValue, JsonValueSchema, type KillWorkerSessionRequest, type KillWorkerSessionRequestParams, KillWorkerSessionRequestParamsSchema, KillWorkerSessionRequestSchema, type KillWorkerSessionResponse, KillWorkerSessionResponseSchema, type KillWorkerSessionResult, KillWorkerSessionResultSchema, LEGACY_FACTORY_API_VERSION, type ListComputersOptions, type ListMachineTemplatesOptions, type ListMcpRegistryRequest, type ListMcpRegistryRequestParams, ListMcpRegistryRequestParamsSchema, ListMcpRegistryRequestSchema, type ListMcpRegistryResponse, ListMcpRegistryResponseSchema, type ListMcpRegistryResult, ListMcpRegistryResultSchema, type ListMcpServersRequest, type ListMcpServersRequestParams, ListMcpServersRequestParamsSchema, ListMcpServersRequestSchema, type ListMcpServersResponse, ListMcpServersResponseSchema, type ListMcpServersResult, ListMcpServersResultSchema, type ListMcpToolsRequest, type ListMcpToolsRequestParams, ListMcpToolsRequestParamsSchema, ListMcpToolsRequestSchema, type ListMcpToolsResponse, ListMcpToolsResponseSchema, type ListMcpToolsResult, ListMcpToolsResultSchema, type ListRemoteSessionsOptions, type ListSessionsOptions, type ListSkillsRequest, type ListSkillsRequestParams, ListSkillsRequestParamsSchema, ListSkillsRequestSchema, type ListSkillsResponse, ListSkillsResponseSchema, type ListSkillsResult, ListSkillsResultSchema, type ListToolsRequest, type ListToolsRequestParams, ListToolsRequestParamsSchema, ListToolsRequestSchema, type ListToolsResponse, ListToolsResponseSchema, type ListToolsResult, ListToolsResultSchema, type LoadSessionRequest, type LoadSessionRequestParams, LoadSessionRequestParamsSchema, LoadSessionRequestSchema, type LoadSessionResponse, LoadSessionResponseSchema, type LoadSessionResult, LoadSessionResultSchema, MCP_AUTH_TIMEOUT, type MachineTemplate, type MachineTemplateBuildStatus, MachineTemplateBuildStatusSchema, type MachineTemplateListResponse, MachineTemplateListResponseSchema, MachineTemplateSchema, MachineType, type McpAuthCompleted, type McpAuthCompletedNotification, McpAuthCompletedNotificationSchema, McpAuthOutcome, type McpAuthRequired, type McpAuthRequiredNotification, McpAuthRequiredNotificationSchema, type McpHttpServerConfigFields, McpHttpServerConfigFieldsSchema, type McpRegistryServer, McpRegistryServerSchema, type McpServerConfig, McpServerConfigSchema, McpServerStatus, type McpServerStatusInfo, McpServerStatusInfoSchema, McpServerType, type McpSseServerConfigFields, McpSseServerConfigFieldsSchema, McpStatus, type McpStatusChanged, type McpStatusChangedNotification, McpStatusChangedNotificationSchema, type McpStatusSummary, McpStatusSummarySchema, type McpStdioServerConfigFields, McpStdioServerConfigFieldsSchema, type McpToolConfirmationDetails, McpToolConfirmationDetailsSchema, type McpToolInfo, McpToolInfoSchema, type McpToolInputSchema, McpToolInputSchemaSchema, type MessageCallback, type MessageOptions, type MilestoneValidationTriggeredEntry, MilestoneValidationTriggeredEntrySchema, type MissionAcceptedEntry, MissionAcceptedEntrySchema, type MissionFeature, MissionFeatureSchema, type MissionFeaturesChanged, type MissionFeaturesChangedNotification, MissionFeaturesChangedNotificationSchema, type MissionHeartbeat, type MissionHeartbeatNotification, MissionHeartbeatNotificationSchema, type MissionPausedEntry, MissionPausedEntrySchema, type MissionProgressEntry, type MissionProgressEntryNotification, MissionProgressEntryNotificationSchema, type MissionResumedEntry, MissionResumedEntrySchema, type MissionRunStartedEntry, MissionRunStartedEntrySchema, type MissionSnapshot, MissionSnapshotSchema, MissionState, type MissionStateChanged, type MissionStateChangedNotification, MissionStateChangedNotificationSchema, type MissionWorkerCompleted, type MissionWorkerCompletedNotification, MissionWorkerCompletedNotificationSchema, type MissionWorkerStarted, type MissionWorkerStartedNotification, MissionWorkerStartedNotificationSchema, ModelProvider, type NotificationCallback, type NotificationFilter, type NotificationHookInput, type NotificationListener, type OutputFormat, OutputFormatSchema, OutputFormatType, type PermissionHandler, type PermissionResolved, type PermissionResolvedNotification, PermissionResolvedNotificationSchema, type PreCompactHookInput, ProcessExitError, ProcessTransport, type ProcessTransportOptions, type ProgressLogEntry, ProgressLogEntrySchema, ProgressLogEntryType, type ProposeMissionConfirmationDetails, ProposeMissionConfirmationDetailsSchema, ProtocolEngine, ProtocolError, REWIND_TIMEOUT, ReasoningEffort, type RedactedThinkingBlock, RedactedThinkingBlockSchema, type RefreshComputerOptions, type RefreshComputerResponse, RefreshComputerResponseSchema, type RemoteSession, type RemoteSessionListResponse, RemoteSessionListResponseSchema, RemoteSessionSchema, type RemoveMcpServerRequest, type RemoveMcpServerRequestParams, RemoveMcpServerRequestParamsSchema, RemoveMcpServerRequestSchema, type RemoveMcpServerResponse, RemoveMcpServerResponseSchema, type RemoveMcpServerResult, RemoveMcpServerResultSchema, type RenameSessionRequest, type RenameSessionRequestParams, RenameSessionRequestParamsSchema, RenameSessionRequestSchema, type RenameSessionResponse, RenameSessionResponseSchema, type RenameSessionResult, RenameSessionResultSchema, type RequestPermissionHandlerResult, type RequestPermissionRequest, type RequestPermissionRequestParams, RequestPermissionRequestParamsSchema, RequestPermissionRequestSchema, type RequestPermissionResponse, RequestPermissionResponseSchema, type RequestPermissionResult, RequestPermissionResultSchema, type RequestPermissionSelection, type RestartComputerOptions, type ResumeSessionOptions, type RetryInstallDepsOptions, type RewindEvictedFile, RewindEvictedFileSchema, type RewindFileCreation, RewindFileCreationSchema, type RewindFileSnapshot, RewindFileSnapshotSchema, type RunOptions, type SDKMachineConfig, SDK_TAG, SDK_VERSION, SESSION_INIT_TIMEOUT, SdkMcpServer, type SdkMcpServerOptions, type SendOptions, ServerRequestHandlerType, type SessionEndHookInput, SessionError, type SessionMetadata, SessionMetadataSchema, SessionNotFoundError, type SessionNotification, type SessionNotificationParams, SessionNotificationParamsSchema, type SessionNotificationPayload, SessionNotificationPayloadSchema, SessionNotificationSchema, SessionNotificationSchemaList, SessionNotificationType, type SessionSettings, type SessionSettingsFile, SessionSettingsFileSchema, SessionSettingsSchema, type SessionSource, SessionSourceSchema, type SessionStartEvent, SessionStartEventSchema, type SessionStartHookInput, type SessionTag, SessionTagSchema, type SessionTitleUpdated, type SessionTitleUpdatedNotification, SessionTitleUpdatedNotificationSchema, type SessionTokenUsageChangedNotification, SessionTokenUsageChangedNotificationSchema, SettingsLevel, type SettingsUpdated, type SettingsUpdatedNotification, SettingsUpdatedNotificationSchema, type SettingsUpdatedPayload, SettingsUpdatedPayloadSchema, type SkillDeviation, SkillDeviationSchema, type SkillFeedback, SkillFeedbackSchema, type SkillInfo, SkillInfoSchema, SkillLocation, type SkillResource, SkillResourceSchema, type SseMcpConfig, SseMcpConfigSchema, type StartMissionRunConfirmationDetails, StartMissionRunConfirmationDetailsSchema, type StdioMcpConfig, StdioMcpConfigSchema, type StopHookInput, StreamStateTracker, type StructuredOutput, type StructuredOutputError, StructuredOutputErrorSchema, type StructuredOutputFields, type StructuredOutputNotification, StructuredOutputNotificationSchema, type SubagentStopHookInput, type SubmitBugReportRequest, type SubmitBugReportRequestParams, SubmitBugReportRequestParamsSchema, SubmitBugReportRequestSchema, type SubmitBugReportResponse, SubmitBugReportResponseSchema, type SubmitBugReportResult, SubmitBugReportResultSchema, type SubmitMcpAuthCodeRequest, type SubmitMcpAuthCodeRequestParams, SubmitMcpAuthCodeRequestParamsSchema, SubmitMcpAuthCodeRequestSchema, type SubmitMcpAuthCodeResponse, SubmitMcpAuthCodeResponseSchema, type SubmitMcpAuthCodeResult, SubmitMcpAuthCodeResultSchema, type SuccessResult, SuccessResultSchema, type TestCase, TestCaseSchema, type TestFile, TestFileSchema, type Tests, TestsSchema, type TextBlock, TextBlockSchema, type ThinkingBlock, ThinkingBlockSchema, type ThinkingTextComplete, type ThinkingTextCompleteNotification, ThinkingTextCompleteNotificationSchema, type ThinkingTextDelta, type ThinkingTextDeltaNotification, ThinkingTextDeltaNotificationSchema, TimeoutError, type ToggleMcpServerRequest, type ToggleMcpServerRequestParams, ToggleMcpServerRequestParamsSchema, ToggleMcpServerRequestSchema, type ToggleMcpServerResponse, ToggleMcpServerResponseSchema, type ToggleMcpServerResult, ToggleMcpServerResultSchema, type ToggleMcpToolRequest, type ToggleMcpToolRequestParams, ToggleMcpToolRequestParamsSchema, ToggleMcpToolRequestSchema, type ToggleMcpToolResponse, ToggleMcpToolResponseSchema, type ToggleMcpToolResult, ToggleMcpToolResultSchema, type TokenUsage, TokenUsageSchema, type TokenUsageUpdate, type ToolCallDelta, type ToolCallNotification, ToolCallNotificationSchema, type ToolConfirmationDetails, ToolConfirmationDetailsSchema, type ToolConfirmationInfo, ToolConfirmationInfoSchema, type ToolConfirmationListItem, ToolConfirmationListItemSchema, ToolConfirmationOutcome, ToolConfirmationType, type ToolHookInput, type ToolProgress, type ToolProgressUpdate, type ToolProgressUpdateNotification, ToolProgressUpdateNotificationSchema, ToolProgressUpdateSchema, type ToolResult, type ToolResultBlock, ToolResultBlockSchema, type ToolResultNotification, ToolResultNotificationSchema, type ToolSelectionOverrides, ToolSelectionOverridesSchema, type ToolUse, type ToolUseBlock, ToolUseBlockSchema, ToolUseSchema, type TraceContextMeta, TraceContextMetaSchema, type UpdateComputerOptions, type UpdateSessionSettingsRequest, type UpdateSessionSettingsRequestParams, UpdateSessionSettingsRequestParamsSchema, UpdateSessionSettingsRequestSchema, type UpdateSessionSettingsResponse, UpdateSessionSettingsResponseSchema, type UpdateSessionSettingsResult, UpdateSessionSettingsResultSchema, type UserPromptSubmitHookInput, type Verification, type VerificationCommand, VerificationCommandSchema, VerificationSchema, WebSocketTransport, type WebSocketTransportOptions, type WorkerCompletedEntry, WorkerCompletedEntrySchema, type WorkerFailedEntry, WorkerFailedEntrySchema, type WorkerPausedEntry, WorkerPausedEntrySchema, type WorkerSelectedFeatureEntry, WorkerSelectedFeatureEntrySchema, type WorkerStartedEntry, WorkerStartedEntrySchema, type WorkerStateInfo, WorkerStateInfoSchema, type WorkingStateChanged, connectDaemon, convertNotificationToStreamMessage, createComputer, createResponseSchema, createSdkMcpServer, createSession, deleteComputer, dispatchNotification, ensureLocalDaemon, getComputer, getComputerByName, getComputerMetrics, getMachineTemplate, listComputers, listMachineTemplates, listRemoteSessions, listSessions, refreshComputer, resolveWebSocketUrl, restartComputer, resumeSession, retryInstallDeps, run, tool, updateComputer };