@anthropic-ai/claude-agent-sdk 0.3.212 → 0.3.214

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.212",
3
- "commit": "8b2783a8f907ce5c5ad1241ecdbab0ff3301c617",
4
- "buildDate": "2026-07-16T16:50:33Z",
2
+ "version": "2.1.214",
3
+ "commit": "e158e55a79995c80ed463a5d2de322bc0ac2f711",
4
+ "buildDate": "2026-07-17T23:32:51Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "09ecba2ab2df9b6ee5b0695e26f65dea60fb3b6af3d3542ee09f466838d1e574",
9
- "size": 244530512
8
+ "checksum": "59796dd18e9d77f1256f367db6d28ce4bd9cd5968e402ad3a327aac36abc6dec",
9
+ "size": 247091504
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "7681a0634c89fa4474e53c0c794e992944aebf3409a7a2b87ea9f9b0194ea341",
14
- "size": 254080272
13
+ "checksum": "d979ba15662828969e5d0f39f1367798a07ef6e031b524efdad37fe7caf84010",
14
+ "size": 256507024
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "66e88634a8573a002702e6a9de0d80cb9bb7c9072f9e6f4486778539057dfd3c",
19
- "size": 260946672
18
+ "checksum": "4c38f26a57a42619ee813f15dc39fc1fa4fe0bb403215c3cdc342b58fa689c3c",
19
+ "size": 261995424
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "044a88cf3a5180776617fd3da1238dcbf9141ddec449a39cf7d2af1ac78e684e",
24
- "size": 264096568
23
+ "checksum": "3c029136f7c81f54ed4a38e9d52e655aad536433dbbde50519c8c31bb646ad14",
24
+ "size": 265210864
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "6996b65fc90aa1e0b8f80824df77295d93fa43b12388915a762b58fd982a1d16",
29
- "size": 254194872
28
+ "checksum": "bbcdec27500f1c7f04a8697fa1d55cdae183ba9054b984ac95d82ccdcccaec3e",
29
+ "size": 255243624
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "a17757970a1f7ef0c47a31ea8fa40798fd7796854ba9422e1a4175f3f149de2c",
34
- "size": 258756992
33
+ "checksum": "1744afe6baa7d5321917bc6f807883daf4f0abda8e9e5d006c03356eb3df8945",
34
+ "size": 259838544
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "fe639693fd7e9a881c799867711abb7666dec2a5fefbaba41af6a09e71bcbefa",
39
- "size": 255334560
38
+ "checksum": "da26afacbc58d6f569d0921ff6825772220c734327f5f976c0c73bd0b7dd3cf8",
39
+ "size": 256220832
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "adaa6e3dadb8016755ccd1907a5f249c1bc9bdb6c71d3f7dcea7d5db8f72d0a5",
44
- "size": 249684640
43
+ "checksum": "4c62218523c562991ef05985af3cffa1a69a588bbcfb3b3bf7b59e9bcb69e963",
44
+ "size": 250596512
45
45
  }
46
46
  },
47
47
  "sdkCompat": {
@@ -58,6 +58,7 @@
58
58
  "0.3.196",
59
59
  "0.3.197",
60
60
  "0.3.198",
61
+ "0.3.200",
61
62
  "0.3.201",
62
63
  "0.3.202",
63
64
  "0.3.204",
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.212",
3
- "commit": "8b2783a8f907ce5c5ad1241ecdbab0ff3301c617",
4
- "buildDate": "2026-07-16T16:52:29Z",
2
+ "version": "2.1.214",
3
+ "commit": "e158e55a79995c80ed463a5d2de322bc0ac2f711",
4
+ "buildDate": "2026-07-17T23:34:18Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "4afeb33da8c8d0fbf9842cfa2fad92e9bac12f64ed1a641f40ac4d96f7f56b83",
9
- "size": 50362208,
8
+ "checksum": "d976310faa248a0d7a86645f041a794d5f057ad200c1e0f17ece0cb5ec5bc785",
9
+ "size": 50869290,
10
10
  "bundle": {
11
- "checksum": "1e94f91aa86cd787e51ade2c6a16f7f6b5afa76c9a711fe6e52d3fbca781337d",
12
- "size": 50361635
11
+ "checksum": "a090425b2e4e17bac005f4c41b6e15de737653ebef367ae4cd9d9041379a375d",
12
+ "size": 50868040
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "e8e49c3af629ff02294ca185b772e26f9536197a0b31b938ed5f248e9284169f",
18
- "size": 54828362,
17
+ "checksum": "8e69bf7965b77f44a4c849aa2f6e1e56c69d263bb9a0c4aa0bb75e143ddb28cf",
18
+ "size": 55349540,
19
19
  "bundle": {
20
- "checksum": "767e1e6699a6eb4ca3e47dc4f6387784ba61885c9bb712ab22ee48947a24de38",
21
- "size": 54840118
20
+ "checksum": "55cd10863ec65465baf3e55bdf9c6cd32df956d69643197d14555c7903e5525c",
21
+ "size": 55357716
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "049caf6fd9d1f3546357a2320b4b1fb9ebc22a25a7a1f68145a61d4afd817671",
27
- "size": 59416638
26
+ "checksum": "8af92745f65c6c1844dcf054b8d7608179cc51291bd46b38e1e987fb023681fe",
27
+ "size": 59984866
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "c032c91ff8aec8bde1268894fb814feca72c2fb1c23a72170614f1c0653752f7",
32
- "size": 60717166
31
+ "checksum": "4b1442222e1e149ff4f4e9f6bfcc9596ae6b99ac4ee899ff7fe774b83941bc71",
32
+ "size": 61299114
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "78005d68d8d6946f799a7d2b2623f3ba5e83307d5e3ac841c7a8123dffe34568",
37
- "size": 58118921
36
+ "checksum": "6bc3724d4d5a786d9d377a86e84c5585eeae50497ec3ed15564db828acb08eeb",
37
+ "size": 58652236
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "cf43fc080395b8bf6244be1bb6533d106f7d270851cc6666f196adb8b87e3189",
42
- "size": 59510975
41
+ "checksum": "f51ab4a7113c45253da38b75d5c68585dc384f140ba04210f5647adf74d8eba1",
42
+ "size": 60071294
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "c50a658c6d0316cf13baed33b6b647d014202aaf99ffa0f235c9371824cf84d4",
47
- "size": 61087093
46
+ "checksum": "e1116a175262e6020953a052c210fd53c4f31a47f2701c67cb48bd38f4b18366",
47
+ "size": 61299595
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "bb2c14cfbdf5efa277555e13c8f48461593d9e31ac6f4240340e3803ce059620",
52
- "size": 59085353
51
+ "checksum": "d088506cba6ad5a232c4b955949ce0593e3dab86c42f0f425e55610cae722ab1",
52
+ "size": 59335695
53
53
  }
54
54
  },
55
55
  "sdkCompat": {
@@ -66,6 +66,7 @@
66
66
  "0.3.196",
67
67
  "0.3.197",
68
68
  "0.3.198",
69
+ "0.3.200",
69
70
  "0.3.201",
70
71
  "0.3.202",
71
72
  "0.3.204",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.212",
3
+ "version": "0.3.214",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -57,14 +57,14 @@
57
57
  "zod": "^4.0.0"
58
58
  },
59
59
  "optionalDependencies": {
60
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.212",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.212",
62
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.212",
63
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.212",
64
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.212",
65
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.212",
66
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.212",
67
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.212"
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.214",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.214",
62
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.214",
63
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.214",
64
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.214",
65
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.214",
66
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.214",
67
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.214"
68
68
  },
69
69
  "files": [
70
70
  "sdk.mjs",
@@ -80,5 +80,5 @@
80
80
  "manifest.json",
81
81
  "manifest.zst.json"
82
82
  ],
83
- "claudeCodeVersion": "2.1.212"
83
+ "claudeCodeVersion": "2.1.214"
84
84
  }
package/sdk.d.ts CHANGED
@@ -29,7 +29,7 @@ export declare type AccountInfo = {
29
29
  /**
30
30
  * Active API backend. Anthropic OAuth login only applies when "firstParty"; for 3P providers the other fields are absent and auth is external (AWS creds, gcloud ADC, etc.). "gateway" means the CLI is authenticated against an enterprise gateway.
31
31
  */
32
- apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws' | 'mantle' | 'gateway';
32
+ apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws' | 'anthropicGoogleCloud' | 'mantle' | 'gateway';
33
33
  };
34
34
 
35
35
  /**
@@ -251,6 +251,18 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
251
251
  * must echo this value for the worker to match it.
252
252
  */
253
253
  requestId: string;
254
+ /**
255
+ * Set when a user-configured ask RULE (permissions.ask) forced this
256
+ * prompt while the ask carries the tool's own decisionReason. Hosts
257
+ * making policy on the reason (e.g. auto-deny a safetyCheck) or
258
+ * running host-side auto-approval should treat asks carrying this
259
+ * field as rule-forced: the user's stated intent is a human prompt.
260
+ */
261
+ matchedAskRule?: {
262
+ source: string;
263
+ toolName: string;
264
+ ruleContent?: string;
265
+ };
254
266
  }) => Promise<PermissionResult | null>;
255
267
 
256
268
  export declare type ConfigChangeHookInput = BaseHookInput & {
@@ -2326,9 +2338,13 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
2326
2338
  *
2327
2339
  * @param settings - A partial settings object to merge into the flag settings.
2328
2340
  * Each top-level key also accepts `null` to clear it from the flag layer.
2341
+ * `effortLevel` additionally accepts `'max'`, which is session-scoped: it
2342
+ * applies for the rest of the session on models that support it and is
2343
+ * never persisted to settings files (the persisted
2344
+ * {@link Settings.effortLevel} excludes it for that reason).
2329
2345
  */
2330
2346
  applyFlagSettings(settings: {
2331
- [K in keyof Settings]?: Settings[K] | null;
2347
+ [K in keyof Settings]?: K extends 'effortLevel' ? EffortLevel | null : Settings[K] | null;
2332
2348
  }): Promise<void>;
2333
2349
  /**
2334
2350
  * Get the full initialization result, including supported commands, models,
@@ -2816,6 +2832,10 @@ export declare type SDKAssistantMessage = {
2816
2832
  * Wire uuids of previously-delivered messages that this message replaces (refusal-fallback supersede). The list can include tombstoned tool_result frames from the refused leg, not only assistant frames. Evict the named messages on arrival and treat this frame as their canonical replacement. Idempotent with the end-of-turn model_refusal_fallback notice, whose retracted_message_uuids remains the complete audit record for the turn.
2817
2833
  */
2818
2834
  supersedes?: UUID[];
2835
+ /**
2836
+ * True when this assistant message was truncated by an interrupt/abort before the stream completed: stop_reason was never received and the content may end mid-word. Absent on normally completed messages.
2837
+ */
2838
+ aborted?: true;
2819
2839
  /**
2820
2840
  * Subagent type that produced this message.
2821
2841
  */
@@ -3536,22 +3556,37 @@ declare type SDKControlPermissionRequest = {
3536
3556
  input: Record<string, unknown>;
3537
3557
  permission_suggestions?: coreTypes.PermissionUpdate[];
3538
3558
  blocked_path?: string;
3559
+ /**
3560
+ * Human-readable reason the ask escalated, for the consent line of the host's dialog. For decision_reason_type "subcommandResults" (compound bash), this is the NESTED safety check's warning text — the wrapper itself has no text — preferring a check that requires manual approval (classifier_approvable false); treat it with the same display/policy care as a "safetyCheck" reason. May carry ANSI escapes; sanitize before rendering.
3561
+ */
3539
3562
  decision_reason?: string;
3540
3563
  /**
3541
- * Structured discriminator for why auto-mode escalated. Lets SDK hosts make policy (e.g. auto-deny safetyCheck) without parsing decision_reason text. For compound bash commands this is "subcommandResults" even when a safetyCheck is nested inside — check classifier_approvable for that case.
3564
+ * Structured discriminator for why auto-mode escalated. Lets SDK hosts make policy (e.g. auto-deny safetyCheck) without parsing decision_reason text. For compound bash commands this is "subcommandResults" even when a safetyCheck is nested inside — check classifier_approvable for that case, and see decision_reason: for this variant it carries the nested safety check's warning text.
3542
3565
  */
3543
3566
  decision_reason_type?: 'rule' | 'mode' | 'subcommandResults' | 'permissionPromptTool' | 'hook' | 'asyncAgent' | 'sandboxOverride' | 'workingDir' | 'safetyCheck' | 'classifier' | 'other';
3544
3567
  /**
3545
3568
  * Set when a safetyCheck is present anywhere in the decision reason (including nested inside subcommandResults for compound bash). false = at least one safety check requires manual approval (e.g. Windows path bypass, dangerous rm); true = all safety checks MAY be classifier-approved (e.g. sensitive-file paths). Absent when no safetyCheck is involved.
3546
3569
  */
3547
3570
  classifier_approvable?: boolean;
3571
+ /**
3572
+ * True when the dialog must not offer the persistent "don't ask again" row for this ask: accepting it would write a whole-tool allow rule broader than the ask's own verb (PermissionAskDecision.suppressAlwaysAllowRule). Hosts rendering approve options should omit any persistent-rule affordance when set.
3573
+ */
3574
+ suppress_always_allow_rule?: boolean;
3575
+ /**
3576
+ * Set when a user-configured ask RULE (permissions.ask) forced this prompt but the ask carries the tool's own decision_reason — the ask-rule substitution keeps the richer tool-minted ask, so the rule rides here instead of decision_reason_type 'rule'. Hosts making policy on decision_reason_type (e.g. auto-deny safetyCheck) or running host-side auto-approval should treat asks carrying this field as rule-forced: the user's stated intent is a human prompt. Values are producer-authored but render-unsafe like decision_reason; sanitize before display.
3577
+ */
3578
+ matched_ask_rule?: {
3579
+ source: string;
3580
+ tool_name: string;
3581
+ rule_content?: string;
3582
+ };
3548
3583
  title?: string;
3549
3584
  display_name?: string;
3550
3585
  tool_use_id: string;
3551
3586
  agent_id?: string;
3552
3587
  description?: string;
3553
3588
  /**
3554
- * True when the tool's approval card IS the user-interaction surface (Tool.requiresUserInteraction()). SDK hosts must not offer one-tap Approve/Deny for these the user has to open the session and respond on the card itself.
3589
+ * True when one-tap Approve/Deny must not be offered: the tool's approval card IS the user-interaction surface (Tool.requiresUserInteraction() — the user responds on the card itself), OR the pending ask is localDisplayOnly (its consent disclosure cannot ride this wire and only the local dialog renders it). Either way the user has to open the session to answer.
3555
3590
  */
3556
3591
  requires_user_interaction?: boolean;
3557
3592
  };
@@ -3610,6 +3645,10 @@ export declare type SDKControlReloadPluginsResponse = {
3610
3645
  name: string;
3611
3646
  path: string;
3612
3647
  source?: string;
3648
+ /**
3649
+ * The plugin's version as declared in its plugin.json manifest, emitted verbatim (plugin-author-controlled — validate before trusting). Omitted when the manifest declares no version.
3650
+ */
3651
+ version?: string;
3613
3652
  }[];
3614
3653
  mcpServers: coreTypes.McpServerStatus[];
3615
3654
  error_count: number;
@@ -3726,6 +3765,7 @@ declare type SDKControlSetMaxThinkingTokensRequest = {
3726
3765
  declare type SDKControlSetModelRequest = {
3727
3766
  subtype: 'set_model';
3728
3767
  model?: string;
3768
+
3729
3769
  };
3730
3770
 
3731
3771
  /**
@@ -3957,6 +3997,10 @@ export declare type SDKMessageOrigin = {
3957
3997
  body?: string;
3958
3998
  } | {
3959
3999
  kind: 'task-notification';
4000
+ /**
4001
+ * Present when the delivery is the fired stored prompt of a scheduled task/routine (stamped from server-asserted provenance; the schedule attests storage, not authorship). The harness frames it as the session's assigned task instead of the generic background-notification frame. Absent on webhook, PR-steward, plugin, and background-event deliveries.
4002
+ */
4003
+ subkind?: 'scheduled-trigger';
3960
4004
  } | {
3961
4005
  kind: 'coordinator';
3962
4006
  } | {
@@ -4330,6 +4374,10 @@ export declare type SDKSystemMessage = {
4330
4374
  name: string;
4331
4375
  path: string;
4332
4376
 
4377
+ /**
4378
+ * The plugin's version as declared in its plugin.json manifest, emitted verbatim (plugin-author-controlled — validate before trusting). Omitted when the manifest declares no version.
4379
+ */
4380
+ version?: string;
4333
4381
  }[];
4334
4382
 
4335
4383
 
@@ -4449,6 +4497,16 @@ export declare type SDKToolProgressMessage = {
4449
4497
  task_id?: string;
4450
4498
  uuid: UUID;
4451
4499
  session_id: string;
4500
+ heartbeat?: boolean;
4501
+ subagent_type?: string;
4502
+ subagent_retry?: {
4503
+ agent_id: string;
4504
+ attempt: number;
4505
+ max_retries: number;
4506
+ retry_delay_ms: number;
4507
+ error_status: number | null;
4508
+ error_category: string;
4509
+ };
4452
4510
  };
4453
4511
 
4454
4512
  export declare type SDKToolUseSummaryMessage = {
@@ -4637,7 +4695,7 @@ export declare type SessionMutationOptions = {
4637
4695
 
4638
4696
  export declare type SessionStartHookInput = BaseHookInput & {
4639
4697
  hook_event_name: 'SessionStart';
4640
- source: 'startup' | 'resume' | 'clear' | 'compact';
4698
+ source: 'startup' | 'resume' | 'clear' | 'compact' | 'fork';
4641
4699
  agent_type?: string;
4642
4700
  model?: string;
4643
4701
  session_title?: string;