@anthropic-ai/claude-agent-sdk 0.3.160 → 0.3.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -1,47 +1,47 @@
1
1
  {
2
- "version": "2.1.160",
3
- "commit": "de93a1b1a590fe446df917b81bab02a21fed62b6",
4
- "buildDate": "2026-06-01T15:46:25Z",
2
+ "version": "2.1.162",
3
+ "commit": "9c0de1e1ecc1b4636e146d2df5dc663afd3c810c",
4
+ "buildDate": "2026-06-03T07:10:21Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "6c9069a9ee0e7b9b6ee43d006c3402e66815e19f87ac4313330cf03f83611968",
9
- "size": 217429920
8
+ "checksum": "2d407dd2a63243ac900f64331589b9fcd29a2159a73289070af685f4085a17d2",
9
+ "size": 218602272
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "2fb7c11111152f62ab36bd093776d71410fbe047e938fe37719ff65ab76c0714",
14
- "size": 219944080
13
+ "checksum": "53f2749bf24e5a80b23b017d0877f61c9894a3c06222141515b37a94c6051d41",
14
+ "size": 221116432
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "1fcf285194a0ea0c5e09973c4c5910f71c5abf451930f0b9c79441d7501ac229",
19
- "size": 242726536
18
+ "checksum": "eca2a603dfebc3426a8469cbe797f9df95245738bc1c20ec842fc8f80af4010d",
19
+ "size": 243906184
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "2b84cc2e04633619eab02b9f77ed00a56b64682b4fa7b3267149ee9eb1fecfc7",
24
- "size": 242845392
23
+ "checksum": "947a49b0de8688f6a74a6e753c24771ff3ddd17b2a6dae85f36304ec514e61d1",
24
+ "size": 244000464
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "f3ab15d3a823c3ebb636b0f57c003f518b8c00fd7c1da3e4699a7004491703bc",
29
- "size": 235581272
28
+ "checksum": "fb86f490f854dd36846771c38b80de7cbcc6804bca838a581eed2792cc58c445",
29
+ "size": 236760920
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "0f267fd2f4ca1c09f4eea7bf12a3df62f663e450903572419ea70fe6f7db3218",
34
- "size": 237239344
33
+ "checksum": "be80745855476f1f1b283e739b721a38952accaad4609d69736cde38095fdb78",
34
+ "size": 238394416
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "51080c42aca4532d866e8f9d4efbe81bac6dfca2807f201125961e37a64155a7",
39
- "size": 238434976
38
+ "checksum": "ac4e1319f6ac0c9e04336d0ae5845acc5dd317bf9e6f26ca47e63df06d91f8bc",
39
+ "size": 239551648
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "e5e4ba3bacaffed42a432179ae5e14e0be5ccb875a851b5be1eb411537425779",
44
- "size": 234400416
43
+ "checksum": "3e8c5c55b8c6d1348842e78d17d2eb41d5b30a8aaaae05a6f906360911a6936b",
44
+ "size": 235516576
45
45
  }
46
46
  }
47
47
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.160",
3
- "commit": "de93a1b1a590fe446df917b81bab02a21fed62b6",
4
- "buildDate": "2026-06-01T15:54:16Z",
2
+ "version": "2.1.162",
3
+ "commit": "9c0de1e1ecc1b4636e146d2df5dc663afd3c810c",
4
+ "buildDate": "2026-06-03T07:12:09Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "b0b46155278d33ce01fbc3a5fe732a417d7043ab3925dc603f02802830edee9a",
9
- "size": 44755996,
8
+ "checksum": "8e053bf397765cd1dd50fd8e68ef40f9a42a62a589008eab8b42590e00f8df80",
9
+ "size": 44978781,
10
10
  "bundle": {
11
- "checksum": "0b64fa56fbc47f73b04a354264219438907bb2810f4fdc81d45f55fb02fd0d40",
12
- "size": 44758281
11
+ "checksum": "695847eb827c9257c2d403590424e78f83330822e1ebc3b16b96968e5a1100fa",
12
+ "size": 44976743
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "32f40c64f4bd71a03859b92d446c7223b0d38f3b6544107cca7321dbe1b72577",
18
- "size": 46656899,
17
+ "checksum": "b48f6331e003f761d6b658c12e13a1435714452e6f3c3f5c630cd1cbbe5adaf3",
18
+ "size": 46876164,
19
19
  "bundle": {
20
- "checksum": "d37c157eae47256cab66b3a28f1ee352840a750e1c52d80c8a4be1dda6c1852f",
21
- "size": 46660369
20
+ "checksum": "17c0b3ee43e0c4dd28759e073d4f1b592cdd24a5918543ce255544e3d5970194",
21
+ "size": 46885327
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "1a6ef9657f6b6aa269cf13e67264932094a4672ae8eff5ad38b385a906a55dd4",
27
- "size": 52435988
26
+ "checksum": "601fe3241200ecdae03c8a6de235d34a2bb88984ac75794d621bee7497304c1d",
27
+ "size": 52651979
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "3a54f54e987cd9a92a93b19300f7517d4cd64fa2f6ecf9fd99b813d1ffbe1f02",
32
- "size": 53055750
31
+ "checksum": "8af5e2f052793a18cc3448e308f018ad08183ddc580d2478a131ad0e323267d0",
32
+ "size": 53260193
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "6f343c12ce7e94960bbea30cc56dfa7e09efce6609b0c9ce35afdf6209aa0832",
37
- "size": 51088958
36
+ "checksum": "eceb861978c15812379a4a595f0c0d77b25b2e629612e80253be872becc4db16",
37
+ "size": 51283192
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "aca16a0315d87c822d1caa026f67a29bc2b5e14ff491d155fc697f24883d7995",
42
- "size": 51791112
41
+ "checksum": "8ca6fa22c2245ac45b596e07215e391165622a671d7bfc995cb65dd208df0226",
42
+ "size": 51981254
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "80639cbd59d5dc252ace45571e3076adda31435adedd39d86b9c5f128b54ccc6",
47
- "size": 53799660
46
+ "checksum": "116068b7058d90423025411faa206d0a6c89155e1f9b07288052f882d3da00a9",
47
+ "size": 53982456
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "606df27e59d1eb3c9ac12229f68260e9ac3bb968ce0d42eb3084899caa23e0ef",
52
- "size": 52073128
51
+ "checksum": "7c1c8b3d5a330a9e12b2f3ca4e2c3e0f308e7ccf0d5401dce1b1c09cc4ac941c",
52
+ "size": 52271058
53
53
  }
54
54
  }
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.160",
3
+ "version": "0.3.162",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -61,14 +61,14 @@
61
61
  "zod": "^4.0.0"
62
62
  },
63
63
  "optionalDependencies": {
64
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.160",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.160",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.160",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.160",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.160",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.160",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.160",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.160"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.162",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.162",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.162",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.162",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.162",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.162",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.162",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.162"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -86,5 +86,5 @@
86
86
  "manifest.json",
87
87
  "manifest.zst.json"
88
88
  ],
89
- "claudeCodeVersion": "2.1.160"
89
+ "claudeCodeVersion": "2.1.162"
90
90
  }
package/sdk.d.ts CHANGED
@@ -294,6 +294,9 @@ declare type ControlErrorResponse = {
294
294
  subtype: 'error';
295
295
  request_id: string;
296
296
  error: string;
297
+ /**
298
+ * Permission requests still awaiting a response. Sent on the `initialize` response so a client joining an already-initialized session learns about in-flight prompts.
299
+ */
297
300
  pending_permission_requests?: SDKControlRequest[];
298
301
  };
299
302
 
@@ -301,6 +304,10 @@ declare type ControlResponse = {
301
304
  subtype: 'success';
302
305
  request_id: string;
303
306
  response?: Record<string, unknown>;
307
+ /**
308
+ * Permission requests still awaiting a response. Sent on the `initialize` response so a client joining an already-initialized session learns about in-flight prompts.
309
+ */
310
+ pending_permission_requests?: SDKControlRequest[];
304
311
  };
305
312
 
306
313
  declare namespace coreTypes {
@@ -385,6 +392,7 @@ declare namespace coreTypes {
385
392
  SDKAssistantMessageError,
386
393
  SDKAssistantMessage,
387
394
  SDKAuthStatusMessage,
395
+ SDKCommandsChangedMessage,
388
396
  SDKCompactBoundaryMessage,
389
397
  SDKDeferredToolUse,
390
398
  SDKElicitationCompleteMessage,
@@ -992,7 +1000,7 @@ export declare type McpClaudeAIProxyServerConfig = {
992
1000
  url: string;
993
1001
  id: string;
994
1002
  /**
995
- * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1003
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Values below 1000ms are ignored (falls through to MCP_TOOL_TIMEOUT or the default).
996
1004
  */
997
1005
  timeout?: number;
998
1006
  };
@@ -1003,7 +1011,7 @@ export declare type McpHttpServerConfig = {
1003
1011
  headers?: Record<string, string>;
1004
1012
  tools?: McpServerToolPolicy[];
1005
1013
  /**
1006
- * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1014
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Values below 1000ms are ignored (falls through to MCP_TOOL_TIMEOUT or the default).
1007
1015
  */
1008
1016
  timeout?: number;
1009
1017
  /**
@@ -1113,7 +1121,7 @@ export declare type McpSSEServerConfig = {
1113
1121
  headers?: Record<string, string>;
1114
1122
  tools?: McpServerToolPolicy[];
1115
1123
  /**
1116
- * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1124
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Values below 1000ms are ignored (falls through to MCP_TOOL_TIMEOUT or the default).
1117
1125
  */
1118
1126
  timeout?: number;
1119
1127
  /**
@@ -1129,7 +1137,7 @@ export declare type McpStdioServerConfig = {
1129
1137
  args?: string[];
1130
1138
  env?: Record<string, string>;
1131
1139
  /**
1132
- * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1140
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Values below 1000ms are ignored (falls through to MCP_TOOL_TIMEOUT or the default).
1133
1141
  */
1134
1142
  timeout?: number;
1135
1143
  /**
@@ -1250,6 +1258,16 @@ export declare type OnElicitation = (request: ElicitationRequest, options: {
1250
1258
  signal: AbortSignal;
1251
1259
  }) => Promise<ElicitationResult>;
1252
1260
 
1261
+ /**
1262
+ * Callback for handling `request_user_dialog` control requests.
1263
+ * Called when the CLI asks the host to render a blocking dialog.
1264
+ * If not provided, dialogs are answered as cancelled and the CLI applies
1265
+ * each dialog's default behavior.
1266
+ */
1267
+ export declare type OnUserDialog = (request: UserDialogRequest, options: {
1268
+ signal: AbortSignal;
1269
+ }) => Promise<UserDialogResult>;
1270
+
1253
1271
  /**
1254
1272
  * Options for the query function.
1255
1273
  * Contains callbacks and other non-serializable fields.
@@ -1359,6 +1377,9 @@ export declare type Options = {
1359
1377
  * - `string[]` - Array of specific tool names (e.g., `['Bash', 'Read', 'Edit']`)
1360
1378
  * - `[]` (empty array) - Disable all built-in tools
1361
1379
  * - `{ type: 'preset'; preset: 'claude_code' }` - Use all default Claude Code tools
1380
+ *
1381
+ * Note: native builds may provide search via Bash `find`/`grep` instead of the
1382
+ * dedicated Grep/Glob tools. List Grep/Glob here or in `allowedTools` to get them.
1362
1383
  */
1363
1384
  tools?: string[] | {
1364
1385
  type: 'preset';
@@ -1472,6 +1493,16 @@ export declare type Options = {
1472
1493
  * ```
1473
1494
  */
1474
1495
  onElicitation?: OnElicitation;
1496
+ /**
1497
+ * Callback for handling `request_user_dialog` control requests — blocking
1498
+ * dialogs the CLI asks the host to render. Each `dialogKind` defines its
1499
+ * own payload and result shape.
1500
+ *
1501
+ * If not provided — or when the host answers `{behavior: 'cancelled'}`,
1502
+ * which is the required answer for an unrecognized `dialogKind` — the CLI
1503
+ * applies the dialog's default behavior.
1504
+ */
1505
+ onUserDialog?: OnUserDialog;
1475
1506
  /**
1476
1507
  * When false, disables session persistence to disk. Sessions will not be
1477
1508
  * saved to ~/.claude/projects/ and cannot be resumed later. Useful for
@@ -2631,7 +2662,7 @@ export declare type SDKAssistantMessage = {
2631
2662
 
2632
2663
  };
2633
2664
 
2634
- export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'billing_error' | 'rate_limit' | 'invalid_request' | 'model_not_found' | 'server_error' | 'unknown' | 'max_output_tokens';
2665
+ export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'billing_error' | 'rate_limit' | 'overloaded' | 'invalid_request' | 'model_not_found' | 'server_error' | 'unknown' | 'max_output_tokens';
2635
2666
 
2636
2667
  export declare type SDKAuthStatusMessage = {
2637
2668
  type: 'auth_status';
@@ -2644,6 +2675,17 @@ export declare type SDKAuthStatusMessage = {
2644
2675
 
2645
2676
  export declare type SdkBeta = 'context-1m-2025-08-07';
2646
2677
 
2678
+ /**
2679
+ * Fire-and-forget push of the full slash-command list after a mid-session change (e.g. skills discovered dynamically as the agent works in a subdirectory). Clients should REPLACE their cached command list with this payload: supportedCommands() is captured once at initialize and never reflects mid-session changes, so a client re-fetch would return the stale init list.
2680
+ */
2681
+ export declare type SDKCommandsChangedMessage = {
2682
+ type: 'system';
2683
+ subtype: 'commands_changed';
2684
+ commands: SlashCommand[];
2685
+ uuid: UUID;
2686
+ session_id: string;
2687
+ };
2688
+
2647
2689
  export declare type SDKCompactBoundaryMessage = {
2648
2690
  type: 'system';
2649
2691
  subtype: 'compact_boundary';
@@ -2916,6 +2958,7 @@ export declare type SDKControlInitializeResponse = {
2916
2958
  account: coreTypes.AccountInfo;
2917
2959
 
2918
2960
  fast_mode_state?: coreTypes.FastModeState;
2961
+
2919
2962
  };
2920
2963
 
2921
2964
  /**
@@ -3073,7 +3116,7 @@ declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPer
3073
3116
  declare type SDKControlRequestUserDialogRequest = {
3074
3117
  subtype: 'request_user_dialog';
3075
3118
  /**
3076
- * Identifier for the dialog the host should render. Open string union — known kinds include "it2_setup", "computer_use_approval", and "refusal_fallback_prompt"; new kinds may be added without bumping the protocol.
3119
+ * Identifier for the dialog the host should render. Open string union — new kinds may be added without bumping the protocol; hosts must answer unrecognized kinds with {behavior: "cancelled"}.
3077
3120
  */
3078
3121
  dialog_kind: string;
3079
3122
  /**
@@ -3298,7 +3341,7 @@ export declare type SDKMemoryRecallMessage = {
3298
3341
  session_id: string;
3299
3342
  };
3300
3343
 
3301
- export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
3344
+ export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
3302
3345
 
3303
3346
  /**
3304
3347
  * Provenance of a user-role message (peer session, team lead, channel). Absent or `human` means keyboard input from the user.
@@ -3316,6 +3359,8 @@ export declare type SDKMessageOrigin = {
3316
3359
  kind: 'task-notification';
3317
3360
  } | {
3318
3361
  kind: 'coordinator';
3362
+ } | {
3363
+ kind: 'auto-continuation';
3319
3364
  };
3320
3365
 
3321
3366
  /**
@@ -3485,6 +3530,8 @@ export declare type SDKResultSuccess = {
3485
3530
  duration_ms: number;
3486
3531
  duration_api_ms: number;
3487
3532
  ttft_ms?: number;
3533
+ time_to_request_ms?: number;
3534
+ time_to_request_from_spawn_ms?: number;
3488
3535
  is_error: boolean;
3489
3536
  api_error_status?: number | null;
3490
3537
  num_turns: number;
@@ -5155,9 +5202,10 @@ export declare interface Settings {
5155
5202
  */
5156
5203
  pluginSuggestionMarketplaces?: string[];
5157
5204
  /**
5158
- * Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing
5205
+ * Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow
5159
5206
  */
5160
- forceLoginMethod?: 'claudeai' | 'console';
5207
+ forceLoginMethod?: 'claudeai' | 'console' | 'gateway';
5208
+
5161
5209
  /**
5162
5210
  * Controls whether the SDK parent tier (Options.managedSettings / --managed-settings) layers under this admin tier. "first-wins" (default): parent is dropped — admin tiers are the only policy source. "merge": parent's restrictive-only-filtered settings union under the admin winner. Has no effect when no admin tier exists (parent applies as the sole policy tier, still filtered restrictive-only).
5163
5211
  */
@@ -5930,6 +5978,39 @@ export declare interface Transport {
5930
5978
  [Symbol.dispose]?(): void;
5931
5979
  }
5932
5980
 
5981
+ /**
5982
+ * A `request_user_dialog` control request from the CLI, asking the SDK
5983
+ * consumer to render a blocking dialog and return the user's choice.
5984
+ * Each `dialogKind` defines its own payload and result shape; the protocol
5985
+ * transports both opaquely.
5986
+ */
5987
+ export declare type UserDialogRequest = {
5988
+ /**
5989
+ * Identifier for the dialog the host should render. Open string union —
5990
+ * new kinds may be added without a protocol bump, so hosts must answer
5991
+ * unrecognized kinds with `{behavior: 'cancelled'}`.
5992
+ */
5993
+ dialogKind: string;
5994
+ /** Dialog-specific data for the host renderer; shape is defined per dialogKind. */
5995
+ payload: Record<string, unknown>;
5996
+ /**
5997
+ * Present when the dialog is tied to a specific tool invocation. Same
5998
+ * value as the `toolUseID` passed to `canUseTool`.
5999
+ */
6000
+ toolUseID?: string;
6001
+ };
6002
+
6003
+ /**
6004
+ * The host's answer to a {@link UserDialogRequest}. On `cancelled`, the CLI
6005
+ * applies the dialog's default behavior.
6006
+ */
6007
+ export declare type UserDialogResult = {
6008
+ behavior: 'completed';
6009
+ result: unknown;
6010
+ } | {
6011
+ behavior: 'cancelled';
6012
+ };
6013
+
5933
6014
  export declare type UserPromptExpansionHookInput = BaseHookInput & {
5934
6015
  hook_event_name: 'UserPromptExpansion';
5935
6016
  expansion_type: 'slash_command' | 'mcp_prompt';