@anthropic-ai/claude-agent-sdk 0.2.81 → 0.2.84

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,46 +1,46 @@
1
1
  {
2
- "version": "2.1.81",
3
- "buildDate": "2026-03-20T21:31:30Z",
2
+ "version": "2.1.84",
3
+ "buildDate": "2026-03-25T23:54:35Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude",
7
- "checksum": "d014162177fc18bfeb7f93d942130dd964f7424e4101f6ad569de66e6eddca03",
8
- "size": 193286000
7
+ "checksum": "c02d911ff13f8ceccb1f6662bf211f3cd9f29d5a46f031c3cc40654eb759aa29",
8
+ "size": 203606768
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude",
12
- "checksum": "3c63d8173d4a86ab3985aead73c4699e42956d10c2f946179274be76ec657099",
13
- "size": 199366256
12
+ "checksum": "da5ed2ee1b0bcf65c2088e79bc65388ec85edc41041fc6ca7c27330f2e201085",
13
+ "size": 205199952
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude",
17
- "checksum": "ccfc3845c8d1a2ded9656a3a517694a844a1b7005b87c784a66f7a60cc58012c",
18
- "size": 235183215
17
+ "checksum": "5c868174b44439e51c74ff084c306856c41779615250d5bbdaa5d10056362814",
18
+ "size": 235473472
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude",
22
- "checksum": "047e3f5591d6238b08dd9518729ac335b0e8df1c80fe985e5d7fbda2c18fc281",
23
- "size": 237954904
22
+ "checksum": "c6872aa8db94f303bc6a4482664e40d3288dfc989c89ba268473ed32e3055878",
23
+ "size": 235657856
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude",
27
- "checksum": "eab144605b0b0cc7d41325ef4dc9d553cdee853234da8bd7cd8187552b875399",
28
- "size": 225718687
27
+ "checksum": "6e42aee87a00ab8e6fb3db3fc409ab969f12758bacc2a0c9f622d8e97445a0a8",
28
+ "size": 228592064
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude",
32
- "checksum": "480a961630459c0790e38d4860a2653fd39ae96aadc38044f669e1c2db686254",
33
- "size": 228552392
32
+ "checksum": "0109e76af6261f6fd37ae1deefc7ee3bc58b0ad786086d198a981275979c549a",
33
+ "size": 230283712
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe",
37
- "checksum": "6d34836bf4d62f4bd5221fb69899ed5b2edc380d35fb0f23218c62fae94e28b9",
38
- "size": 242411680
37
+ "checksum": "64b28630ec4f4aaa6cc0e225379cf59cdb95828cbb4ce700a0ae4401b1999ecd",
38
+ "size": 245196960
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe",
42
- "checksum": "18352be0d91c690b0fe2ed6841e4908c266c06eb7000555118e91966b67b9ea5",
43
- "size": 238605472
42
+ "checksum": "e7f5d18d470f0345ee18bb368f8ea7d43e791e17f0de7b69cdc40e42a9a9398e",
43
+ "size": 241350304
44
44
  }
45
45
  }
46
46
  }
package/manifest.zst.json CHANGED
@@ -1,54 +1,54 @@
1
1
  {
2
- "version": "2.1.81",
3
- "buildDate": "2026-03-20T21:31:31Z",
2
+ "version": "2.1.84",
3
+ "buildDate": "2026-03-25T23:54:36Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude.zst",
7
- "checksum": "daaa46988395c254a933f76c6d1e120caf647fb93d746372b9ce421d87d7d3b2",
8
- "size": 41085748,
7
+ "checksum": "a0e577c1ca84302c5de1e6498d047149ba44a710ea51ff303986fd47f1c0eb83",
8
+ "size": 43366416,
9
9
  "bundle": {
10
- "checksum": "7172c446022862e58d0c46e33ad0f27ca130fbeabff9e36153779fc3f66af4b2",
11
- "size": 41085968
10
+ "checksum": "4111e9be5214eb3e2e97d7fc133dbb13b51fc8978fff23d26578021fa84b7c30",
11
+ "size": 43377661
12
12
  }
13
13
  },
14
14
  "darwin-x64": {
15
15
  "binary": "claude.zst",
16
- "checksum": "929247cb00b2de41c74c74f221a615f07b53e92fe1bc10569909d7e867395d67",
17
- "size": 43512291,
16
+ "checksum": "d852a6245edfb235dd73bdffef79012ab18ee075ef3ded5abf602b17812bc82a",
17
+ "size": 45050362,
18
18
  "bundle": {
19
- "checksum": "8588a7c0a75d21c900d2709b59665809d21f2fc901578bcc35ed8b1171d72037",
20
- "size": 43515586
19
+ "checksum": "10bcd37cb20f82861ed710292821927d7f8e1549ca1dbc9e248769409c62f22b",
20
+ "size": 45050626
21
21
  }
22
22
  },
23
23
  "linux-arm64": {
24
24
  "binary": "claude.zst",
25
- "checksum": "ca80b6bceb380a971334dedfc5c032b14779e4e69775a21b3ced33f970d67a77",
26
- "size": 52977626
25
+ "checksum": "fb0a0db9e8ceb414563fe776b9035b0827548d8e94bfab23f5c58a63d9c5f7b4",
26
+ "size": 53002601
27
27
  },
28
28
  "linux-x64": {
29
29
  "binary": "claude.zst",
30
- "checksum": "fe51a059c7840c571b201e6943c0aa1f502ff738bbedc86fbb5e63f938dacbcc",
31
- "size": 53708186
30
+ "checksum": "8476f46fb0422be1fc2cafe82c1b4b51226c07b5b73b40dd40b203cc5c8ad90a",
31
+ "size": 53582657
32
32
  },
33
33
  "linux-arm64-musl": {
34
34
  "binary": "claude.zst",
35
- "checksum": "7b7cf79deaa20720941400899863ebf0a691d5db10e3359c2fce03765ef31a20",
36
- "size": 50903082
35
+ "checksum": "7523be8411a2fef9bb4d93c59707d5497f5bf8229fb528fbc9ba5fc146480dee",
36
+ "size": 51604167
37
37
  },
38
38
  "linux-x64-musl": {
39
39
  "binary": "claude.zst",
40
- "checksum": "5566d29e1a31c515fb4f0879223647bd6f3f2bbe73dad1e34d3665add5c8a8b2",
41
- "size": 51699949
40
+ "checksum": "e670e1468f01946a822d1526276f2f9de566987d89bbd52186a505f88763714f",
41
+ "size": 52327014
42
42
  },
43
43
  "win32-x64": {
44
44
  "binary": "claude.exe.zst",
45
- "checksum": "3d986f1ae2be61fa6e1be7ff1105ffb36bdb71f2a2927acc24f3312a9fc038c9",
46
- "size": 54472548
45
+ "checksum": "e83814324697073fe6462eafcca9c354af1dc22e9689e5f3c0788dd1021ef414",
46
+ "size": 55192345
47
47
  },
48
48
  "win32-arm64": {
49
49
  "binary": "claude.exe.zst",
50
- "checksum": "2816c6f4eb351bb596f513f13c76bdbf2f32545df1d813f28633ceb3354d956e",
51
- "size": 52521404
50
+ "checksum": "dc7c0d74e5ae0704c4745d350f0afc5c2044b4b3fe553fb808252b9f2957af87",
51
+ "size": 53246192
52
52
  }
53
53
  }
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.2.81",
3
+ "version": "0.2.84",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -62,5 +62,5 @@
62
62
  "@img/sharp-win32-arm64": "^0.34.2",
63
63
  "@img/sharp-win32-x64": "^0.34.2"
64
64
  },
65
- "claudeCodeVersion": "2.1.81"
65
+ "claudeCodeVersion": "2.1.84"
66
66
  }
package/sdk-tools.d.ts CHANGED
@@ -63,6 +63,7 @@ export type ToolOutputSchemas =
63
63
  export type AgentOutput =
64
64
  | {
65
65
  agentId: string;
66
+ agentType?: string;
66
67
  content: {
67
68
  type: "text";
68
69
  text: string;
@@ -315,7 +316,7 @@ export interface BashInput {
315
316
  */
316
317
  description?: string;
317
318
  /**
318
- * Set to true to run this command in the background. Use TaskOutput to read the output later.
319
+ * Set to true to run this command in the background. Use Read to read the output later.
319
320
  */
320
321
  run_in_background?: boolean;
321
322
  /**
@@ -455,7 +456,7 @@ export interface GrepInput {
455
456
  */
456
457
  type?: string;
457
458
  /**
458
- * Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 0 (unlimited).
459
+ * Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 250 when unspecified. Pass 0 for unlimited (use sparingly — large result sets waste context).
459
460
  */
460
461
  head_limit?: number;
461
462
  /**
@@ -2215,7 +2216,7 @@ export interface ConfigInput {
2215
2216
  }
2216
2217
  export interface EnterWorktreeInput {
2217
2218
  /**
2218
- * Optional name for the worktree (letters, digits, dots, underscores, dashes only; max 64 chars). A random name is generated if not provided.
2219
+ * Optional name for the worktree. Each "/"-separated segment may contain only letters, digits, dots, underscores, and dashes; max 64 chars total. A random name is generated if not provided.
2219
2220
  */
2220
2221
  name?: string;
2221
2222
  }
@@ -2286,10 +2287,6 @@ export interface BashOutput {
2286
2287
  * Total size of the output in bytes (set when output is too large for inline)
2287
2288
  */
2288
2289
  persistedOutputSize?: number;
2289
- /**
2290
- * Compressed output sent to model when token-saver is active (UI still uses stdout)
2291
- */
2292
- tokenSaverOutput?: string;
2293
2290
  }
2294
2291
  export interface ExitPlanModeOutput {
2295
2292
  /**
@@ -2305,6 +2302,10 @@ export interface ExitPlanModeOutput {
2305
2302
  * Whether the Agent tool is available in the current context
2306
2303
  */
2307
2304
  hasTaskTool?: boolean;
2305
+ /**
2306
+ * True when the user edited the plan (CCR web UI or Ctrl+G); determines whether the plan is echoed back in tool_result
2307
+ */
2308
+ planWasEdited?: boolean;
2308
2309
  /**
2309
2310
  * When true, the teammate has sent a plan approval request to the team leader
2310
2311
  */
package/sdk.d.ts CHANGED
@@ -65,6 +65,10 @@ export declare type AgentDefinition = {
65
65
  * Array of skill names to preload into the agent context
66
66
  */
67
67
  skills?: string[];
68
+ /**
69
+ * Auto-submitted as the first user turn when this agent is the main thread agent. Slash commands are processed. Prepended to any user-provided prompt.
70
+ */
71
+ initialPrompt?: string;
68
72
  /**
69
73
  * Maximum number of agentic turns (API round-trips) before stopping
70
74
  */
@@ -210,12 +214,16 @@ declare namespace coreTypes {
210
214
  BaseOutputFormat,
211
215
  ConfigChangeHookInput,
212
216
  ConfigScope,
217
+ CwdChangedHookInput,
218
+ CwdChangedHookSpecificOutput,
213
219
  ElicitationHookInput,
214
220
  ElicitationHookSpecificOutput,
215
221
  ElicitationResultHookInput,
216
222
  ElicitationResultHookSpecificOutput,
217
223
  ExitReason,
218
224
  FastModeState,
225
+ FileChangedHookInput,
226
+ FileChangedHookSpecificOutput,
219
227
  HookEvent,
220
228
  HookInput,
221
229
  HookJSONOutput,
@@ -237,6 +245,7 @@ declare namespace coreTypes {
237
245
  OutputFormat,
238
246
  OutputFormatType,
239
247
  PermissionBehavior,
248
+ PermissionDecisionClassification,
240
249
  PermissionMode,
241
250
  PermissionRequestHookInput,
242
251
  PermissionRequestHookSpecificOutput,
@@ -277,6 +286,7 @@ declare namespace coreTypes {
277
286
  SDKResultMessage,
278
287
  SDKResultSuccess,
279
288
  SDKSessionInfo,
289
+ SDKSessionStateChangedMessage,
280
290
  SDKStatusMessage,
281
291
  SDKStatus,
282
292
  SDKSystemMessage,
@@ -303,6 +313,7 @@ declare namespace coreTypes {
303
313
  SubagentStopHookInput,
304
314
  SyncHookJSONOutput,
305
315
  TaskCompletedHookInput,
316
+ TaskCreatedHookInput,
306
317
  TeammateIdleHookInput,
307
318
  ThinkingAdaptive,
308
319
  ThinkingConfig,
@@ -311,6 +322,7 @@ declare namespace coreTypes {
311
322
  UserPromptSubmitHookInput,
312
323
  UserPromptSubmitHookSpecificOutput,
313
324
  WorktreeCreateHookInput,
325
+ WorktreeCreateHookSpecificOutput,
314
326
  WorktreeRemoveHookInput
315
327
  }
316
328
  }
@@ -329,6 +341,27 @@ declare type CreateSdkMcpServerOptions = {
329
341
  tools?: Array<SdkMcpToolDefinition<any>>;
330
342
  };
331
343
 
344
+ export declare type CwdChangedHookInput = BaseHookInput & {
345
+ hook_event_name: 'CwdChanged';
346
+ old_cwd: string;
347
+ new_cwd: string;
348
+ };
349
+
350
+ export declare type CwdChangedHookSpecificOutput = {
351
+ hookEventName: 'CwdChanged';
352
+ watchPaths?: string[];
353
+ };
354
+
355
+ /**
356
+ * Effort level for controlling how much thinking/reasoning Claude applies.
357
+ *
358
+ * - `'low'` — Minimal thinking, fastest responses
359
+ * - `'medium'` — Moderate thinking
360
+ * - `'high'` — Deep reasoning (default)
361
+ * - `'max'` — Maximum effort (select models only)
362
+ */
363
+ export declare type EffortLevel = 'low' | 'medium' | 'high' | 'max';
364
+
332
365
  /**
333
366
  * Hook input for the Elicitation event. Fired when an MCP server requests user input. Hooks can auto-respond (accept/decline) instead of showing the dialog.
334
367
  */
@@ -405,6 +438,17 @@ export declare type ExitReason = 'clear' | 'resume' | 'logout' | 'prompt_input_e
405
438
  */
406
439
  export declare type FastModeState = 'off' | 'cooldown' | 'on';
407
440
 
441
+ export declare type FileChangedHookInput = BaseHookInput & {
442
+ hook_event_name: 'FileChanged';
443
+ file_path: string;
444
+ event: 'change' | 'add' | 'unlink';
445
+ };
446
+
447
+ export declare type FileChangedHookSpecificOutput = {
448
+ hookEventName: 'FileChanged';
449
+ watchPaths?: string[];
450
+ };
451
+
408
452
  /**
409
453
  * Fork a session into a new branch with fresh UUIDs.
410
454
  *
@@ -485,7 +529,7 @@ export declare type GetSessionMessagesOptions = {
485
529
  offset?: number;
486
530
  };
487
531
 
488
- export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "Notification", "UserPromptSubmit", "SessionStart", "SessionEnd", "Stop", "StopFailure", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "PermissionRequest", "Setup", "TeammateIdle", "TaskCompleted", "Elicitation", "ElicitationResult", "ConfigChange", "WorktreeCreate", "WorktreeRemove", "InstructionsLoaded"];
532
+ export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "Notification", "UserPromptSubmit", "SessionStart", "SessionEnd", "Stop", "StopFailure", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "PermissionRequest", "Setup", "TeammateIdle", "TaskCreated", "TaskCompleted", "Elicitation", "ElicitationResult", "ConfigChange", "WorktreeCreate", "WorktreeRemove", "InstructionsLoaded", "CwdChanged", "FileChanged"];
489
533
 
490
534
  /**
491
535
  * Hook callback function for responding to events during execution.
@@ -504,9 +548,9 @@ export declare interface HookCallbackMatcher {
504
548
  timeout?: number;
505
549
  }
506
550
 
507
- export declare type HookEvent = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'Notification' | 'UserPromptSubmit' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'SubagentStart' | 'SubagentStop' | 'PreCompact' | 'PostCompact' | 'PermissionRequest' | 'Setup' | 'TeammateIdle' | 'TaskCompleted' | 'Elicitation' | 'ElicitationResult' | 'ConfigChange' | 'WorktreeCreate' | 'WorktreeRemove' | 'InstructionsLoaded';
551
+ export declare type HookEvent = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'Notification' | 'UserPromptSubmit' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'SubagentStart' | 'SubagentStop' | 'PreCompact' | 'PostCompact' | 'PermissionRequest' | 'Setup' | 'TeammateIdle' | 'TaskCreated' | 'TaskCompleted' | 'Elicitation' | 'ElicitationResult' | 'ConfigChange' | 'WorktreeCreate' | 'WorktreeRemove' | 'InstructionsLoaded' | 'CwdChanged' | 'FileChanged';
508
552
 
509
- export declare type HookInput = PreToolUseHookInput | PostToolUseHookInput | PostToolUseFailureHookInput | NotificationHookInput | UserPromptSubmitHookInput | SessionStartHookInput | SessionEndHookInput | StopHookInput | StopFailureHookInput | SubagentStartHookInput | SubagentStopHookInput | PreCompactHookInput | PostCompactHookInput | PermissionRequestHookInput | SetupHookInput | TeammateIdleHookInput | TaskCompletedHookInput | ElicitationHookInput | ElicitationResultHookInput | ConfigChangeHookInput | InstructionsLoadedHookInput | WorktreeCreateHookInput | WorktreeRemoveHookInput;
553
+ export declare type HookInput = PreToolUseHookInput | PostToolUseHookInput | PostToolUseFailureHookInput | NotificationHookInput | UserPromptSubmitHookInput | SessionStartHookInput | SessionEndHookInput | StopHookInput | StopFailureHookInput | SubagentStartHookInput | SubagentStopHookInput | PreCompactHookInput | PostCompactHookInput | PermissionRequestHookInput | SetupHookInput | TeammateIdleHookInput | TaskCreatedHookInput | TaskCompletedHookInput | ElicitationHookInput | ElicitationResultHookInput | ConfigChangeHookInput | InstructionsLoadedHookInput | WorktreeCreateHookInput | WorktreeRemoveHookInput | CwdChangedHookInput | FileChangedHookInput;
510
554
 
511
555
  export declare type HookJSONOutput = AsyncHookJSONOutput | SyncHookJSONOutput;
512
556
 
@@ -651,6 +695,7 @@ export declare type McpServerStatus = {
651
695
  openWorld?: boolean;
652
696
  };
653
697
  }[];
698
+
654
699
  };
655
700
 
656
701
  export declare type McpServerStatusConfig = McpServerConfigForProcessTransport | McpClaudeAIProxyServerConfig;
@@ -983,7 +1028,7 @@ export declare type Options = {
983
1028
  *
984
1029
  * @see https://docs.anthropic.com/en/docs/build-with-claude/effort
985
1030
  */
986
- effort?: 'low' | 'medium' | 'high' | 'max';
1031
+ effort?: EffortLevel;
987
1032
  /**
988
1033
  * Maximum number of tokens the model can use for its thinking/reasoning process.
989
1034
  * Helps control cost and latency for complex tasks.
@@ -1003,6 +1048,16 @@ export declare type Options = {
1003
1048
  * budget is exceeded, returning an `error_max_budget_usd` result.
1004
1049
  */
1005
1050
  maxBudgetUsd?: number;
1051
+ /**
1052
+ * API-side task budget in tokens. When set, the model is made aware of
1053
+ * its remaining token budget so it can pace tool use and wrap up before
1054
+ * the limit. Sent as `output_config.task_budget` with the
1055
+ * `task-budgets-2026-03-13` beta header.
1056
+ * @alpha
1057
+ */
1058
+ taskBudget?: {
1059
+ total: number;
1060
+ };
1006
1061
  /**
1007
1062
  * MCP (Model Context Protocol) server configurations.
1008
1063
  * Keys are server names, values are server configurations.
@@ -1077,6 +1132,7 @@ export declare type Options = {
1077
1132
 
1078
1133
 
1079
1134
 
1135
+
1080
1136
  /**
1081
1137
  * Enable prompt suggestions. When true, the agent emits a `prompt_suggestion`
1082
1138
  * message after each turn with a predicted next user prompt.
@@ -1252,6 +1308,11 @@ export declare type OutputFormatType = 'json_schema';
1252
1308
 
1253
1309
  export declare type PermissionBehavior = 'allow' | 'deny' | 'ask';
1254
1310
 
1311
+ /**
1312
+ * Classification of this permission decision for telemetry. SDK hosts that prompt users (desktop apps, IDEs) should set this to reflect what actually happened: user_temporary for allow-once, user_permanent for always-allow (both the click and later cache hits), user_reject for deny. If unset, the CLI infers conservatively (temporary for allow, reject for deny). The vocabulary matches tool_decision OTel events (monitoring-usage docs).
1313
+ */
1314
+ export declare type PermissionDecisionClassification = 'user_temporary' | 'user_permanent' | 'user_reject';
1315
+
1255
1316
  /**
1256
1317
  * Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
1257
1318
  */
@@ -1282,11 +1343,13 @@ export declare type PermissionResult = {
1282
1343
  updatedInput?: Record<string, unknown>;
1283
1344
  updatedPermissions?: PermissionUpdate[];
1284
1345
  toolUseID?: string;
1346
+ decisionClassification?: PermissionDecisionClassification;
1285
1347
  } | {
1286
1348
  behavior: 'deny';
1287
1349
  message: string;
1288
1350
  interrupt?: boolean;
1289
1351
  toolUseID?: string;
1352
+ decisionClassification?: PermissionDecisionClassification;
1290
1353
  };
1291
1354
 
1292
1355
  export declare type PermissionRuleValue = {
@@ -1377,7 +1440,7 @@ export declare type PreToolUseHookInput = BaseHookInput & {
1377
1440
 
1378
1441
  export declare type PreToolUseHookSpecificOutput = {
1379
1442
  hookEventName: 'PreToolUse';
1380
- permissionDecision?: 'allow' | 'deny' | 'ask';
1443
+ permissionDecision?: PermissionBehavior;
1381
1444
  permissionDecisionReason?: string;
1382
1445
  updatedInput?: Record<string, unknown>;
1383
1446
  additionalContext?: string;
@@ -1531,6 +1594,17 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
1531
1594
  rewindFiles(userMessageId: string, options?: {
1532
1595
  dryRun?: boolean;
1533
1596
  }): Promise<RewindFilesResult>;
1597
+ /**
1598
+ * Seed the CLI's readFileState cache with a path+mtime entry. Use when
1599
+ * the client observed a Read that has since been removed from context
1600
+ * (e.g. by snip), so a subsequent Edit won't fail "file not read yet".
1601
+ * If the file changed on disk since the given mtime, the seed is skipped
1602
+ * and Edit will correctly require a fresh Read.
1603
+ *
1604
+ * @param path - Path to the file that was previously Read
1605
+ * @param mtime - File mtime (floored ms) at the time of the observed Read
1606
+ */
1607
+ seedReadState(path: string, mtime: number): Promise<void>;
1534
1608
 
1535
1609
 
1536
1610
 
@@ -1655,6 +1729,7 @@ export declare type SandboxSettings = z.infer<ReturnType<typeof SandboxSettingsS
1655
1729
  */
1656
1730
  declare const SandboxSettingsSchema: () => z.ZodObject<{
1657
1731
  enabled: z.ZodOptional<z.ZodBoolean>;
1732
+ failIfUnavailable: z.ZodOptional<z.ZodBoolean>;
1658
1733
  autoAllowBashIfSandboxed: z.ZodOptional<z.ZodBoolean>;
1659
1734
  allowUnsandboxedCommands: z.ZodOptional<z.ZodBoolean>;
1660
1735
  network: z.ZodOptional<z.ZodObject<{
@@ -1886,7 +1961,7 @@ export declare type SDKControlRequest = {
1886
1961
  request: SDKControlRequestInner;
1887
1962
  };
1888
1963
 
1889
- declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlMcpStatusRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlMcpSetServersRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlSetProactiveRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest;
1964
+ declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlMcpStatusRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlSetProactiveRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest;
1890
1965
 
1891
1966
  export declare type SDKControlResponse = {
1892
1967
  type: 'control_response';
@@ -1902,6 +1977,15 @@ declare type SDKControlRewindFilesRequest = {
1902
1977
  dry_run?: boolean;
1903
1978
  };
1904
1979
 
1980
+ /**
1981
+ * Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.
1982
+ */
1983
+ declare type SDKControlSeedReadStateRequest = {
1984
+ subtype: 'seed_read_state';
1985
+ path: string;
1986
+ mtime: number;
1987
+ };
1988
+
1905
1989
  /**
1906
1990
  * Sets the maximum number of thinking tokens for extended thinking.
1907
1991
  */
@@ -1927,6 +2011,7 @@ declare type SDKControlSetPermissionModeRequest = {
1927
2011
  * Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
1928
2012
  */
1929
2013
  mode: coreTypes.PermissionMode;
2014
+
1930
2015
  };
1931
2016
 
1932
2017
  /**
@@ -2050,10 +2135,11 @@ export declare type SdkMcpToolDefinition<Schema extends AnyZodRawShape = AnyZodR
2050
2135
  description: string;
2051
2136
  inputSchema: Schema;
2052
2137
  annotations?: ToolAnnotations;
2138
+ _meta?: Record<string, unknown>;
2053
2139
  handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>;
2054
2140
  };
2055
2141
 
2056
- export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskProgressMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPromptSuggestionMessage;
2142
+ export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskProgressMessage | SDKSessionStateChangedMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPromptSuggestionMessage;
2057
2143
 
2058
2144
  export declare type SDKPartialAssistantMessage = {
2059
2145
  type: 'stream_event';
@@ -2282,6 +2368,17 @@ export declare type SDKSessionOptions = {
2282
2368
  permissionMode?: PermissionMode;
2283
2369
  };
2284
2370
 
2371
+ /**
2372
+ * Mirrors notifySessionStateChanged. 'idle' fires after heldBackResult flushes and the bg-agent do-while exits — authoritative turn-over signal.
2373
+ */
2374
+ export declare type SDKSessionStateChangedMessage = {
2375
+ type: 'system';
2376
+ subtype: 'session_state_changed';
2377
+ state: 'idle' | 'running' | 'requires_action';
2378
+ uuid: UUID;
2379
+ session_id: string;
2380
+ };
2381
+
2285
2382
  export declare type SDKStatus = 'compacting' | null;
2286
2383
 
2287
2384
  export declare type SDKStatusMessage = {
@@ -2317,6 +2414,7 @@ export declare type SDKSystemMessage = {
2317
2414
  plugins: {
2318
2415
  name: string;
2319
2416
  path: string;
2417
+
2320
2418
  }[];
2321
2419
  fast_mode_state?: FastModeState;
2322
2420
  uuid: UUID;
@@ -2365,6 +2463,10 @@ export declare type SDKTaskStartedMessage = {
2365
2463
  tool_use_id?: string;
2366
2464
  description: string;
2367
2465
  task_type?: string;
2466
+ /**
2467
+ * meta.name from the workflow script (e.g. 'spec'). Only set when task_type is 'local_workflow'.
2468
+ */
2469
+ workflow_name?: string;
2368
2470
  prompt?: string;
2369
2471
  uuid: UUID;
2370
2472
  session_id: string;
@@ -2460,6 +2562,7 @@ export declare type SessionStartHookSpecificOutput = {
2460
2562
  hookEventName: 'SessionStart';
2461
2563
  additionalContext?: string;
2462
2564
  initialUserMessage?: string;
2565
+ watchPaths?: string[];
2463
2566
  };
2464
2567
 
2465
2568
  /**
@@ -3434,6 +3537,10 @@ export declare interface Settings {
3434
3537
  skipWebFetchPreflight?: boolean;
3435
3538
  sandbox?: {
3436
3539
  enabled?: boolean;
3540
+ /**
3541
+ * Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate.
3542
+ */
3543
+ failIfUnavailable?: boolean;
3437
3544
  autoAllowBashIfSandboxed?: boolean;
3438
3545
  /**
3439
3546
  * Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true.
@@ -3535,6 +3642,10 @@ export declare interface Settings {
3535
3642
  * Persisted effort level for supported models.
3536
3643
  */
3537
3644
  effortLevel?: 'low' | 'medium' | 'high';
3645
+ /**
3646
+ * Advisor model for the server-side advisor tool.
3647
+ */
3648
+ advisorModel?: string;
3538
3649
  /**
3539
3650
  * When true, fast mode is enabled. When absent or false, fast mode is off.
3540
3651
  */
@@ -3601,6 +3712,17 @@ export declare interface Settings {
3601
3712
  * Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/
3602
3713
  */
3603
3714
  plansDirectory?: string;
3715
+ /**
3716
+ * Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels.
3717
+ */
3718
+ channelsEnabled?: boolean;
3719
+ /**
3720
+ * Teams/Enterprise allowlist of channel plugins. When set, replaces the default Anthropic allowlist — admins decide which plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true.
3721
+ */
3722
+ allowedChannelPlugins?: {
3723
+ marketplace: string;
3724
+ plugin: string;
3725
+ }[];
3604
3726
  /**
3605
3727
  * Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)
3606
3728
  */
@@ -3812,7 +3934,7 @@ export declare type SyncHookJSONOutput = {
3812
3934
  systemMessage?: string;
3813
3935
  reason?: string;
3814
3936
 
3815
- hookSpecificOutput?: PreToolUseHookSpecificOutput | UserPromptSubmitHookSpecificOutput | SessionStartHookSpecificOutput | SetupHookSpecificOutput | SubagentStartHookSpecificOutput | PostToolUseHookSpecificOutput | PostToolUseFailureHookSpecificOutput | NotificationHookSpecificOutput | PermissionRequestHookSpecificOutput | ElicitationHookSpecificOutput | ElicitationResultHookSpecificOutput;
3937
+ hookSpecificOutput?: PreToolUseHookSpecificOutput | UserPromptSubmitHookSpecificOutput | SessionStartHookSpecificOutput | SetupHookSpecificOutput | SubagentStartHookSpecificOutput | PostToolUseHookSpecificOutput | PostToolUseFailureHookSpecificOutput | NotificationHookSpecificOutput | PermissionRequestHookSpecificOutput | ElicitationHookSpecificOutput | ElicitationResultHookSpecificOutput | CwdChangedHookSpecificOutput | FileChangedHookSpecificOutput | WorktreeCreateHookSpecificOutput;
3816
3938
  };
3817
3939
 
3818
3940
  /**
@@ -3832,6 +3954,15 @@ export declare type TaskCompletedHookInput = BaseHookInput & {
3832
3954
  team_name?: string;
3833
3955
  };
3834
3956
 
3957
+ export declare type TaskCreatedHookInput = BaseHookInput & {
3958
+ hook_event_name: 'TaskCreated';
3959
+ task_id: string;
3960
+ task_subject: string;
3961
+ task_description?: string;
3962
+ teammate_name?: string;
3963
+ team_name?: string;
3964
+ };
3965
+
3835
3966
  export declare type TeammateIdleHookInput = BaseHookInput & {
3836
3967
  hook_event_name: 'TeammateIdle';
3837
3968
  teammate_name: string;
@@ -3867,6 +3998,7 @@ export declare type ThinkingEnabled = {
3867
3998
 
3868
3999
  export declare function tool<Schema extends AnyZodRawShape>(_name: string, _description: string, _inputSchema: Schema, _handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>, _extras?: {
3869
4000
  annotations?: ToolAnnotations;
4001
+ searchHint?: string;
3870
4002
  }): SdkMcpToolDefinition<Schema>;
3871
4003
 
3872
4004
  /**
@@ -3962,6 +4094,14 @@ export declare type WorktreeCreateHookInput = BaseHookInput & {
3962
4094
  name: string;
3963
4095
  };
3964
4096
 
4097
+ /**
4098
+ * Hook-specific output for the WorktreeCreate event. Provides the absolute path to the created worktree directory. Command hooks print the path on stdout instead.
4099
+ */
4100
+ export declare type WorktreeCreateHookSpecificOutput = {
4101
+ hookEventName: 'WorktreeCreate';
4102
+ worktreePath: string;
4103
+ };
4104
+
3965
4105
  export declare type WorktreeRemoveHookInput = BaseHookInput & {
3966
4106
  hook_event_name: 'WorktreeRemove';
3967
4107
  worktree_path: string;