@anthropic-ai/claude-agent-sdk 0.3.304 → 0.3.306

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,54 +1,52 @@
1
1
  {
2
- "version": "2.1.304",
2
+ "version": "2.1.306",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "17ab70404e5b632fe060207effb0b440788363ba",
5
- "buildDate": "2026-10-19T18:30:38Z",
4
+ "commit": "01ae8327ca9931db91a0802d6e8e377419dd44e6",
5
+ "buildDate": "2026-10-21T01:32:56Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "b9ac5374839f14abf3f1f45610637c332b5daee5ce0d1634726cef87aab78e6a",
10
- "size": 271161296
9
+ "checksum": "b5d795b7760032d79954b55a9cd1876dcf3a8dc9608fd6bb9f618593f69fd44b",
10
+ "size": 272984176
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "f2ae409b46b1bdc1dec7afa12c6a094ff64e7d4ca272ca09f69dd0080c846703",
15
- "size": 282334128
14
+ "checksum": "fc273f4caaeb11189bfed82251496728cf1e650563cb9b5f70d91ec6bec42c17",
15
+ "size": 284167840
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "c487117526509ab6d2ee6013e14f181faf68d6d6afe6bb0d4b2b4a9feca5ecb3",
20
- "size": 288612536
19
+ "checksum": "77d257d5e8b8730ec61d5a4992a8eb65550aaf9589f464988aa1a9684338d801",
20
+ "size": 290447544
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "ea0f135784631619a7a409d07322ecec964f9cc4fd377508ed1ba3f141f27912",
25
- "size": 288730480
24
+ "checksum": "520bc6c1f40af466bd03a278b5ae1af1a2938bc7de5b9e5cb15526da20d71cfe",
25
+ "size": 290532720
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "d15758462f08940f6d2736cd422e291258b9bcaf09c013b63dcfca6cc69a5316",
30
- "size": 280772600
29
+ "checksum": "cfd2e1ee88ed3d5653dffedccb6bdd3c9c1ec8718b7f9f9e1a4fcbcd2ab72e1f",
30
+ "size": 282608984
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "e11074c51f730bd91d0cd9568471d828d6552796b5dbcde10e7aaca19f1650c8",
35
- "size": 282384648
34
+ "checksum": "a0d3de9061d31ce3d4bea75fbe52a99764ef2eb7a68feaf6f5438d3f3a2091d9",
35
+ "size": 284192368
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "019e5174d5d954585edb1a946fe280e44a973050b4897034adf0e16306f85fdd",
40
- "size": 293227168
39
+ "checksum": "f6bc9de38f507c36c9a3bb0085a59a27e32156e2208252bf1707c4e3ef309114",
40
+ "size": 295628960
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "ac37b04c19f09bea6638d1b3ca40131566266fc7b599a405efd76cd04df9e9a7",
45
- "size": 277572256
44
+ "checksum": "4f0c6c80521987a4c649a31e9e51e40ea5736f5dc5089a7b0e5a375aadfcb16e",
45
+ "size": 279824032
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.271",
51
- "0.3.272",
52
50
  "0.3.273",
53
51
  "0.3.274",
54
52
  "0.3.275",
@@ -76,7 +74,9 @@
76
74
  "0.3.300",
77
75
  "0.3.301",
78
76
  "0.3.302",
79
- "0.3.303"
77
+ "0.3.303",
78
+ "0.3.304",
79
+ "0.3.305"
80
80
  ],
81
81
  "harnessSchema": 1
82
82
  }
package/manifest.zst.json CHANGED
@@ -1,62 +1,60 @@
1
1
  {
2
- "version": "2.1.304",
2
+ "version": "2.1.306",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "17ab70404e5b632fe060207effb0b440788363ba",
5
- "buildDate": "2026-10-19T18:32:13Z",
4
+ "commit": "01ae8327ca9931db91a0802d6e8e377419dd44e6",
5
+ "buildDate": "2026-10-21T01:34:20Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "d4d21e296a055068be83a9cd0753817eb5033233d6c471cc60491745766441c5",
10
- "size": 91631244,
9
+ "checksum": "5716c3679354804b7cf338de9a9c49941e53c2f3264181851f98959d7a74dd2e",
10
+ "size": 92227028,
11
11
  "bundle": {
12
- "checksum": "6bbba6adc37fb46d351afb122c7406f4bb3b2ee42818222c310ce57a0594eac8",
13
- "size": 91633634
12
+ "checksum": "ddf9e2f17afc54c1a76d4dde4fdd43c52465e7784cc31929cd34950ea3ab6a55",
13
+ "size": 92223341
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "051693ea6644f29bc6d9f3a675d99464a04b46087ef29f5d92b09cd85a7a7f75",
19
- "size": 97010027,
18
+ "checksum": "e436143d59c1daa4a14201437ba8bbea01ba8567f1fc76368735221156a7c7af",
19
+ "size": 97603863,
20
20
  "bundle": {
21
- "checksum": "3a0ab2425f5f78011ff3bc0e2db9502f80a5b349fd701f9bee5887319334b2a2",
22
- "size": 97018270
21
+ "checksum": "0d4c2a03d7fece0d5056bcf4a75f3c7773e6934c52a888a9563beae2403dfa18",
22
+ "size": 97598348
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "3df0f416c511c97d8d87e748eef7f7b479db1b530209e53bebe51e8a3e4a0e6d",
28
- "size": 100907378
27
+ "checksum": "0af97e326ddc5260d40d50192f5b46a17237aabd90f8768c3ee38111975ff2d7",
28
+ "size": 101510822
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "0f3468fa285f112650feb3bec2913425b7ba5c83cd4eb411b5c75b4086416bb6",
33
- "size": 101910048
32
+ "checksum": "e5a0284d14ae555ef208c6d2987e29f298cb3bb69a7497c9f24217980233acd3",
33
+ "size": 102479145
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "b442bc1ecd24dd5de0e60d014c26325c977169ab0e6d1e83931327e047aca0d6",
38
- "size": 99268661
37
+ "checksum": "316e694b2dea6e0502db3ff595448492d271e9814d78ec1c0fb8e05e18d40b80",
38
+ "size": 99865566
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "eeafe1d2f76a9ecb2829b7dcc96cb0c14382907ef95200fc5c09071e9f62daed",
43
- "size": 100322776
42
+ "checksum": "ee11a8e707490ed7daf66f8e7d18bf29eaa6adb79a83e025e66e1e377df9efc1",
43
+ "size": 100891610
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "aed62990b91e94efb35482fd7068cc616c6c2414084c6aa32148ca2a359e4e81",
48
- "size": 104965652
47
+ "checksum": "85e3413cd24d8cd2f85989a1a036359d95aed8eda79996ba5b4ed9c3e69549d0",
48
+ "size": 105764835
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "6f2711964649cdfa3832e87c2d46aec76f225f310a451570ace133e1fb70f665",
53
- "size": 100206011
52
+ "checksum": "d09b903089029892058b6479e7146af612c70602b3496c0a7c6acebc55eeece7",
53
+ "size": 101002089
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.271",
59
- "0.3.272",
60
58
  "0.3.273",
61
59
  "0.3.274",
62
60
  "0.3.275",
@@ -84,7 +82,9 @@
84
82
  "0.3.300",
85
83
  "0.3.301",
86
84
  "0.3.302",
87
- "0.3.303"
85
+ "0.3.303",
86
+ "0.3.304",
87
+ "0.3.305"
88
88
  ],
89
89
  "harnessSchema": 1
90
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.304",
3
+ "version": "0.3.306",
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.304",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.304",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.304",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.304",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.304",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.304",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.304",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.304"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.306",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.306",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.306",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.306",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.306",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.306",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.306",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.306"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -85,8 +85,10 @@
85
85
  "extractFromBunfs.d.ts",
86
86
  "manifest.json",
87
87
  "manifest.zst.json",
88
- "core-2hp8y6j3.mjs",
89
- "core-kjmgdn1p.mjs"
88
+ "core-50f20fv8.mjs",
89
+ "core-mh5qmqqf.mjs",
90
+ "core-p79weg14.mjs",
91
+ "core-x5tcx9zy.mjs"
90
92
  ],
91
- "claudeCodeVersion": "2.1.304"
93
+ "claudeCodeVersion": "2.1.306"
92
94
  }
package/sdk.d.ts CHANGED
@@ -3613,6 +3613,7 @@ declare const SandboxSettingsSchema: () => z.ZodObject<{
3613
3613
  }, z.core.$strip>>;
3614
3614
  ignoreViolations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
3615
3615
  enableWeakerNestedSandbox: z.ZodOptional<z.ZodBoolean>;
3616
+ allowNestedUserNamespaces: z.ZodOptional<z.ZodBoolean>;
3616
3617
  enableWeakerNetworkIsolation: z.ZodOptional<z.ZodBoolean>;
3617
3618
  allowAppleEvents: z.ZodOptional<z.ZodBoolean>;
3618
3619
  excludedCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -4486,6 +4487,40 @@ export declare type SDKControlGetUsageResponse = {
4486
4487
  */
4487
4488
  count: number;
4488
4489
  }[];
4490
+ /**
4491
+ * One recommended change per notable behavior or source, largest share first, worded for display.
4492
+ */
4493
+ recommendations?: {
4494
+ /**
4495
+ * The behavior key, or 'agent', 'skill', 'plugin' or 'mcp_server' for a named source.
4496
+ */
4497
+ key: string;
4498
+ /**
4499
+ * Share of the weighted local usage this touches, 0-100.
4500
+ */
4501
+ pct: number;
4502
+ /**
4503
+ * What to do, verb first.
4504
+ */
4505
+ title: string;
4506
+ /**
4507
+ * A few words: what the scan saw, or the command to run.
4508
+ */
4509
+ detail?: string;
4510
+ }[];
4511
+ /**
4512
+ * What one "fix" action does. Absent when nothing can be fixed in the session that answered.
4513
+ */
4514
+ fix?: {
4515
+ /**
4516
+ * The recommendations it covers.
4517
+ */
4518
+ keys: string[];
4519
+ /**
4520
+ * User messages to send for the person, one each and in order, at priority 'later' so a running turn cannot reorder them: any /effort commands first, then one prompt for the rest, which goes with client_composed set.
4521
+ */
4522
+ messages: string[];
4523
+ };
4489
4524
  agents: {
4490
4525
  name: string;
4491
4526
  /**
@@ -4541,6 +4576,40 @@ export declare type SDKControlGetUsageResponse = {
4541
4576
  */
4542
4577
  count: number;
4543
4578
  }[];
4579
+ /**
4580
+ * One recommended change per notable behavior or source, largest share first, worded for display.
4581
+ */
4582
+ recommendations?: {
4583
+ /**
4584
+ * The behavior key, or 'agent', 'skill', 'plugin' or 'mcp_server' for a named source.
4585
+ */
4586
+ key: string;
4587
+ /**
4588
+ * Share of the weighted local usage this touches, 0-100.
4589
+ */
4590
+ pct: number;
4591
+ /**
4592
+ * What to do, verb first.
4593
+ */
4594
+ title: string;
4595
+ /**
4596
+ * A few words: what the scan saw, or the command to run.
4597
+ */
4598
+ detail?: string;
4599
+ }[];
4600
+ /**
4601
+ * What one "fix" action does. Absent when nothing can be fixed in the session that answered.
4602
+ */
4603
+ fix?: {
4604
+ /**
4605
+ * The recommendations it covers.
4606
+ */
4607
+ keys: string[];
4608
+ /**
4609
+ * User messages to send for the person, one each and in order, at priority 'later' so a running turn cannot reorder them: any /effort commands first, then one prompt for the rest, which goes with client_composed set.
4610
+ */
4611
+ messages: string[];
4612
+ };
4544
4613
  agents: {
4545
4614
  name: string;
4546
4615
  /**
@@ -6502,6 +6571,7 @@ export declare type SDKUserMessage = {
6502
6571
 
6503
6572
 
6504
6573
 
6574
+
6505
6575
  uuid?: UUID;
6506
6576
  /**
6507
6577
  * Content the user pasted into the prompt rather than typed: each entry a string or an array of content blocks. The CLI appends the text of each entry after the typed text, in order, and may wrap it in `<pasted_content>` tags. Blocks other than text are ignored; send images and documents in `message.content`. A list of over 1,000 entries and blocks in all is ignored.
@@ -6597,6 +6667,7 @@ export declare type SDKUserMessageReplay = {
6597
6667
 
6598
6668
 
6599
6669
 
6670
+
6600
6671
  uuid: UUID;
6601
6672
  session_id: string;
6602
6673
  isReplay: true;
@@ -6996,6 +7067,19 @@ export declare interface Settings {
6996
7067
  sessionUrl?: boolean;
6997
7068
  [k: string]: unknown;
6998
7069
  };
7070
+ /**
7071
+ * The claude.ai Project this session names for your organization's usage reports: the Project's UUID, or its ID starting with "claude_proj_". An empty string names none and stops lower-precedence files from naming one; the organization default still applies. Sent only when Claude Code uses your claude.ai login, connects directly to the Anthropic API, is not in a cloud session, and CLAUDE_CODE_ATTRIBUTION_HEADER is not 0. CLAUDE_CODE_ATTRIBUTION_PROJECT takes precedence over it. Set in managed settings, it overrides people's own settings files. A project's .claude/settings.json and settings.local.json count only once the folder is trusted; for runs in a folder nobody has trusted, such as CI, use CLAUDE_CODE_ATTRIBUTION_PROJECT.
7072
+ */
7073
+ attributionProject?: string;
7074
+ /**
7075
+ * Your organization's default for attributionProject. Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json); ignored in user, project, local and --settings sources.
7076
+ */
7077
+ attributionProjectPolicy?: {
7078
+ /**
7079
+ * The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its UUID, or its ID starting with "claude_proj_".
7080
+ */
7081
+ default?: string;
7082
+ };
6999
7083
  /**
7000
7084
  * Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)
7001
7085
  */
@@ -7147,7 +7231,7 @@ export declare interface Settings {
7147
7231
  };
7148
7232
  };
7149
7233
  /**
7150
- * Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries that use no ${VAR} expansion) are allowed without being listed; a managed-mcp.json entry that uses ${VAR} expansion is still checked against this list. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied.
7234
+ * Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries with no ${VAR} in their command, args, url or header values) are allowed without being listed; a managed-mcp.json entry with ${VAR} in any of those must match this list. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied.
7151
7235
  */
7152
7236
  allowedMcpServers?: {
7153
7237
  /**
@@ -7482,7 +7566,7 @@ export declare interface Settings {
7482
7566
  */
7483
7567
  httpHookAllowedEnvVars?: string[];
7484
7568
  /**
7485
- * When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins, the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name — unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched), and npm-direct (package\@npm) plugins whose recorded resolution a registry-pinned managed npm strictKnownMarketplaces entry names (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. --disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply.
7569
+ * When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins (in Claude Desktop, only while this is not set by the organization's own managed settings), the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name — unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched), and npm-direct (package\@npm) plugins whose recorded resolution a registry-pinned managed npm strictKnownMarketplaces entry names (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. --disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply.
7486
7570
  */
7487
7571
  allowManagedPermissionRulesOnly?: boolean;
7488
7572
  /**
@@ -9060,6 +9144,10 @@ export declare interface Settings {
9060
9144
  * Linux only: Run without the fresh /proc mount, for hosts such as unprivileged Docker containers that cannot create one. **Reduces security** — the host /proc stays readable by sandboxed commands. Default: false. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, true from project settings (.claude/settings.json and .claude/settings.local.json) is ignored (false there still applies).
9061
9145
  */
9062
9146
  enableWeakerNestedSandbox?: boolean;
9147
+ /**
9148
+ * Linux/WSL only: Let sandboxed commands create user namespaces of their own, which the sandbox refuses by default. Needed by tools that sandbox themselves that way, such as Chromium's and Electron's sandbox, rootless podman or buildah, a nested bubblewrap, and `unshare`. **Removes code-execution isolation** — in any folder a hostile command may write, it can then bypass filesystem.denyWrite, filesystem.denyRead, credentials.files entries and the paths the sandbox always write-protects (such as .claude/settings.json, git hooks and git config), and so plant code that later runs outside the sandbox; while autoAllowBashIfSandboxed is on, the command that plants it needs no approval. Default: false. Only honored from user, managed/policy, or CLI (--settings) settings — true from project settings (.claude/settings.json and .claude/settings.local.json) is ignored (false there still applies).
9149
+ */
9150
+ allowNestedUserNamespaces?: boolean;
9063
9151
  /**
9064
9152
  * macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. **Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, true from project settings (.claude/settings.json and .claude/settings.local.json) is ignored (false there still applies).
9065
9153
  */