@anthropic-ai/claude-agent-sdk 0.3.310 → 0.3.311

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,53 +1,52 @@
1
1
  {
2
- "version": "2.1.310",
2
+ "version": "2.1.311",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "0d2056ecf42d9452a8cd8e054600024e7c557add",
5
- "buildDate": "2026-10-23T20:13:54Z",
4
+ "commit": "e7d3b8365a0ffbe2f5dd032feb28e9fd9c7de025",
5
+ "buildDate": "2026-10-26T19:03:46Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "ffb64331bc0ee1b69efb7c2c428bd3ab516bc31b75bf60886b356c97c1c25ffd",
10
- "size": 274068224
9
+ "checksum": "85d8c08707fcfd1e78ffa0204eefbc6ec9e4fe22f375fb2767ef85d957ed3161",
10
+ "size": 276185504
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "28fdbed5a84ef7d4205b5751c7f021e79151c4e319c4a401e48fe6aae86bbb39",
15
- "size": 285291472
14
+ "checksum": "d34e1cb82015b050471a97574aa6ea6f698ecf3a97a61c980961f43ad9f838f5",
15
+ "size": 287420928
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "9c64d9a7442436b65fcd7cc02c1aa0051bb5a7041e7788576ed3b5f29c447d54",
20
- "size": 291496120
19
+ "checksum": "2e2496c9a8065df93acb0fca2d341f59a6b8777649b2e025ab8c9bcd5eef61f3",
20
+ "size": 293658808
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "b73676430af12f97316a798b8371f81d640f90a58bdcb8f3ce56a835bb47df56",
25
- "size": 291638640
24
+ "checksum": "86dc1fcc69498159eaf15f446613e847010f9036bfbbdffd4c49350be8489ada",
25
+ "size": 293776752
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "adfd1f0ef12a3bcafa66e33491fc3e4204e41aeb4a7305ffc311c16c26793825",
30
- "size": 283658112
29
+ "checksum": "172150e3f9ea07e8e2e2e29862d7d9a25f5c234d8e909e4063df237665bf09b9",
30
+ "size": 285822152
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "2ceb05e0a97b09be4c14717464a2156e8d087dea9867a399dd75d3b898ca4824",
35
- "size": 285302928
34
+ "checksum": "cd40dd327145ee47aa0deacd571801c1d782388f709d71242eee6b91de8ed11f",
35
+ "size": 287442392
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "f9a3920634ae3b961ee92c2eb58d0051f5f8852b120983d0a4f57b6a5efeba61",
40
- "size": 296791712
39
+ "checksum": "966f4b2ce962298f5dee6a942e8c47c8f97392e69e728e622319a98b259c0680",
40
+ "size": 298870432
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "91da8a2247a8806162319bcdf3e70c6ffeeb58b568481a9827fbff167a694edb",
45
- "size": 280850592
44
+ "checksum": "951b5d94bf2a5296db2c442784e68d18fa04dec2d7d2e805aa50e75d618aad5e",
45
+ "size": 282933920
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.277",
51
50
  "0.3.278",
52
51
  "0.3.280",
53
52
  "0.3.281",
package/manifest.zst.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
- "version": "2.1.310",
2
+ "version": "2.1.311",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "0d2056ecf42d9452a8cd8e054600024e7c557add",
5
- "buildDate": "2026-10-23T20:15:35Z",
4
+ "commit": "e7d3b8365a0ffbe2f5dd032feb28e9fd9c7de025",
5
+ "buildDate": "2026-10-26T19:05:12Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "0252ecc7c918fccc5a68d6f25a80c4579c4cf99fad8b315228236c2ee9c3f4af",
10
- "size": 92705677,
9
+ "checksum": "68a55ab38088b10f213be752ac47e2d88e81cf8ac2bae3a31396b2cd6c9a91ec",
10
+ "size": 93380583,
11
11
  "bundle": {
12
- "checksum": "1c80fdf086c7cc9d88430c466dfd9259fcfcc1a1824ddf11ea0803767c464891",
13
- "size": 92707820
12
+ "checksum": "75ff20c96ec39582035067231b6aa4a1b5830e53bcb1167f81f9639be0b2a842",
13
+ "size": 93383140
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "7c82300870d0b0eb565922f6e12bf7ebc0a1e3a35ebb61af55aab883af62d680",
19
- "size": 98096628,
18
+ "checksum": "066565c1d787345f945bace4f0cb2f2a41bf96800adabb0f0b0c3bb701af69d6",
19
+ "size": 98817523,
20
20
  "bundle": {
21
- "checksum": "c119f31f16e4e8380028a5516809d5f9041251af395a4a827b96238ca98e8b43",
22
- "size": 98116332
21
+ "checksum": "84cb2ff289ac3316744057fa0786c641b74ca8733f0cf75d7bb2b604444d33bb",
22
+ "size": 98818787
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "ad34932dfad2bd67c328b9358acaac7c998e8113dc065dd328958b984a73fe27",
28
- "size": 102027606
27
+ "checksum": "0b6291903c4dde17f456c8a8799a3101877321bd667aa78e793dc1fe0709893c",
28
+ "size": 102741700
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "9314f28f679546a97813f2914c4fb60a190801ef782805f47bf197317cc4ffd2",
33
- "size": 102993457
32
+ "checksum": "d0c00b80761f3030f34cf0812266f6c6f8210ff9af7242f7c6c76c5600499caf",
33
+ "size": 103729711
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "f4dc063aae358589c4b58027a5a2e0d8bdccde16109af11407301a50bb349281",
38
- "size": 100369361
37
+ "checksum": "95f37a2808a40596f1fcc005f64eaaf7975d6a46c365876845d0909714c5a91b",
38
+ "size": 101084046
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "ac75639744e4185547254e3d1054089d6a78747b4b838783f3b758ca369c77f1",
43
- "size": 101393542
42
+ "checksum": "edae71d077ea4f4c413981968cb864d3b7ab8a6010fec1dc309d7e7ba403bfec",
43
+ "size": 102122872
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "f37a98ecff44e2605a30985bff7ba7c7a87bd936539eb3681a97b0c9794180a8",
48
- "size": 106282873
47
+ "checksum": "f2966586f6f936a48b7025a8eb0604e0a1a241e4b5ea877db34e6443b10d6989",
48
+ "size": 106965057
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "691b41c2a6e91f094dbc501421eeb2a6c667ca98632894814c609ed1886c6b57",
53
- "size": 101465393
52
+ "checksum": "99648d7d1d66ff68f5238cbf59422e3db422e117863ecf02e13c4cea99179165",
53
+ "size": 102170242
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.277",
59
58
  "0.3.278",
60
59
  "0.3.280",
61
60
  "0.3.281",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.310",
3
+ "version": "0.3.311",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -32,7 +32,7 @@
32
32
  }
33
33
  },
34
34
  "engines": {
35
- "node": ">=18.0.0"
35
+ "node": ">=18.14.0"
36
36
  },
37
37
  "type": "module",
38
38
  "author": "Anthropic <support@anthropic.com>",
@@ -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.310",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.310",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.310",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.310",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.310",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.310",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.310",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.310"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.311",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.311",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.311",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.311",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.311",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.311",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.311",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.311"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -85,10 +85,10 @@
85
85
  "extractFromBunfs.d.ts",
86
86
  "manifest.json",
87
87
  "manifest.zst.json",
88
- "core-4pv47a2z.mjs",
89
- "core-bz5kkzv0.mjs",
90
- "core-c86d180z.mjs",
91
- "core-pzfwbvz7.mjs"
88
+ "core-0bjz4v5z.mjs",
89
+ "core-ptjgnrch.mjs",
90
+ "core-rbkmqzx3.mjs",
91
+ "core-zbftdwza.mjs"
92
92
  ],
93
- "claudeCodeVersion": "2.1.310"
93
+ "claudeCodeVersion": "2.1.311"
94
94
  }
package/sdk-tools.d.ts CHANGED
@@ -135,6 +135,7 @@ export type AgentOutput =
135
135
  } | null;
136
136
  fallback_credit?: unknown;
137
137
  };
138
+ toolsUsed?: string[];
138
139
  toolStats?: {
139
140
  readCount: number;
140
141
  searchCount: number;
@@ -689,6 +690,7 @@ export type ProjectsOutput =
689
690
  | {
690
691
  method: "project_info";
691
692
  notice?: string;
693
+ local_file?: string;
692
694
  name: string;
693
695
  description: string;
694
696
  instructions: string;
package/sdk.d.ts CHANGED
@@ -1475,6 +1475,14 @@ export declare type ModelUsage = {
1475
1475
  thinkingTokens?: number;
1476
1476
  cacheReadInputTokens: number;
1477
1477
  cacheCreationInputTokens: number;
1478
+ /**
1479
+ * Cache writes with a 5-minute lifetime, already counted inside cacheCreationInputTokens. This and cacheCreationEphemeral1hInputTokens can add up to less than cacheCreationInputTokens, because a response that does not report how long its cache writes live adds to neither. costUSD prices those writes at the 5-minute rate. Counts only turns run on CLI versions that record this field: absent when none did, and an undercount when part of the session ran on an older version.
1480
+ */
1481
+ cacheCreationEphemeral5mInputTokens?: number;
1482
+ /**
1483
+ * Cache writes with a 1-hour lifetime, already counted inside cacheCreationInputTokens. costUSD prices them at the 1-hour rate when the model's price table has one. The built-in list prices do. A managed-settings modelPricing row does not: its one cache-write rate applies to both lifetimes. costUSD never uses the 1-hour rate for a response that a fallback model served after a refusal. Absent or an undercount in the same cases as cacheCreationEphemeral5mInputTokens.
1484
+ */
1485
+ cacheCreationEphemeral1hInputTokens?: number;
1478
1486
  webSearchRequests: number;
1479
1487
  costUSD: number;
1480
1488
  contextWindow: number;
@@ -5816,7 +5824,7 @@ export declare type SDKPermissionRuleEntry = {
5816
5824
  /**
5817
5825
  * Where the rule comes from. Mirrors PermissionRuleSource (permissionRuleLookup.ts PERMISSION_RULE_SOURCES); the parity test in test/cli/headlessControl/listPermissionRules.test.ts keeps the two aligned.
5818
5826
  */
5819
- source: 'userSettings' | 'projectSettings' | 'localSettings' | 'flagSettings' | 'policySettings' | 'cliArg' | 'command' | 'session' | 'toolsNarrowing' | 'mcpServerPolicy' | 'hostCredential';
5827
+ source: 'userSettings' | 'projectSettings' | 'localSettings' | 'flagSettings' | 'policySettings' | 'cliArg' | 'command' | 'session' | 'mcpMount' | 'toolsNarrowing' | 'mcpServerPolicy' | 'hostCredential';
5820
5828
  /**
5821
5829
  * The stored rule string VERBATIM, exactly as the session holds it. Two stored spellings that parse identically each get their own entry. Can carry invisible or control characters by design — escape at display.
5822
5830
  */
@@ -5976,6 +5984,9 @@ export declare type SDKResultError = {
5976
5984
  * Why this turn continued one that a worker restart interrupted. Such a turn is the automatic re-run of the interrupted turn (CLAUDE_CODE_RESUME_INTERRUPTED_TURN), or one that goes on from the answer to the permission prompt the new worker took over, or from that turn's tool calls still in flight. The value is the host's CLAUDE_CODE_RESUME_REASON when it set one (host_draining, checkpoint_restore, container_recreated, …), else 'interrupted_turn'. Present on such a headless turn's result, success or error, with or without an echo (a turn whose opening user prompt could not be vouched for still carries the reason); absent on every other turn (also one that goes on from the answer to any other permission prompt), on the Remote Control bridge's per-turn synthetic results, and from older producers.
5977
5985
  */
5978
5986
  resume_reason?: string;
5987
+
5988
+
5989
+
5979
5990
  terminal_reason?: TerminalReason;
5980
5991
 
5981
5992
  /**
@@ -6017,6 +6028,11 @@ export declare type SDKResultSuccess = {
6017
6028
 
6018
6029
 
6019
6030
 
6031
+
6032
+
6033
+
6034
+
6035
+
6020
6036
 
6021
6037
 
6022
6038
 
@@ -6047,6 +6063,9 @@ export declare type SDKResultSuccess = {
6047
6063
  warm_spare_claimed?: boolean;
6048
6064
 
6049
6065
  time_origin_ms?: number;
6066
+
6067
+
6068
+
6050
6069
  is_error: boolean;
6051
6070
  api_error_status?: number | null;
6052
6071
 
@@ -7937,6 +7956,12 @@ export declare interface Settings {
7937
7956
  * Whether to automatically update this marketplace and its installed plugins on startup
7938
7957
  */
7939
7958
  autoUpdate?: boolean;
7959
+ /**
7960
+ * Managed settings only: the plugins of this marketplace that an organization delivers with its own tier, by plugin name, each with the digests of its releases. A plugin also enabled and listed in prependPlugins or appendPlugins by managed settings the session vouches for loads its hooks module only from a folder that proves one of them, and is then seated in that tier; any other copy does not load. A digest is sha256- and the base64 SHA-256 of, for every regular file in the folder in UTF-16 code unit order of its path, not normalized, "f PATH" NUL BYTE-LENGTH NUL BYTES, with / in paths; .git, .in_use, .orphaned_at, .claude-plugin-link and .links_materialized at the root are left out. The plugin keeps its manifest at .claude-plugin/plugin.json and names one module in hooks/hooks.json. A string of any other form, or a list that is empty or of any other shape, matches no folder. A symbolic link, or a surface module, proves nothing. A proved plugin ships bundled with no install step: the digest covers the whole folder, node_modules included. A checkout whose line endings were converted proves nothing.
7961
+ */
7962
+ pluginDigests?: {
7963
+ [k: string]: string[];
7964
+ };
7940
7965
  };
7941
7966
  };
7942
7967
  /**
@@ -8189,6 +8214,12 @@ export declare interface Settings {
8189
8214
  * Whether to automatically update this marketplace and its installed plugins on startup
8190
8215
  */
8191
8216
  autoUpdate?: boolean;
8217
+ /**
8218
+ * Managed settings only: the plugins of this marketplace that an organization delivers with its own tier, by plugin name, each with the digests of its releases. A plugin also enabled and listed in prependPlugins or appendPlugins by managed settings the session vouches for loads its hooks module only from a folder that proves one of them, and is then seated in that tier; any other copy does not load. A digest is sha256- and the base64 SHA-256 of, for every regular file in the folder in UTF-16 code unit order of its path, not normalized, "f PATH" NUL BYTE-LENGTH NUL BYTES, with / in paths; .git, .in_use, .orphaned_at, .claude-plugin-link and .links_materialized at the root are left out. The plugin keeps its manifest at .claude-plugin/plugin.json and names one module in hooks/hooks.json. A string of any other form, or a list that is empty or of any other shape, matches no folder. A symbolic link, or a surface module, proves nothing. A proved plugin ships bundled with no install step: the digest covers the whole folder, node_modules included. A checkout whose line endings were converted proves nothing.
8219
+ */
8220
+ pluginDigests?: {
8221
+ [k: string]: string[];
8222
+ };
8192
8223
  };
8193
8224
  };
8194
8225
  /**