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

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.303",
2
+ "version": "2.1.304",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "07df2aedd2d01d2f60907b8404acbda187b04072",
5
- "buildDate": "2026-10-18T20:40:12Z",
4
+ "commit": "17ab70404e5b632fe060207effb0b440788363ba",
5
+ "buildDate": "2026-10-19T18:30:38Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "d2da3b003dc08b88b7230469014fe3e1dc6fe94bc8f648e89b34175d30269370",
10
- "size": 267973136
9
+ "checksum": "b9ac5374839f14abf3f1f45610637c332b5daee5ce0d1634726cef87aab78e6a",
10
+ "size": 271161296
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "6c5d63b43568c5d60963d40f05b0087cb03ba44a90740d27adc505f4157806db",
15
- "size": 279275760
14
+ "checksum": "f2ae409b46b1bdc1dec7afa12c6a094ff64e7d4ca272ca09f69dd0080c846703",
15
+ "size": 282334128
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "f384f49826336d4ac0484ac6ac9d8d16f64d244d186ce227cbd7cc088c03315d",
20
- "size": 285335616
19
+ "checksum": "c487117526509ab6d2ee6013e14f181faf68d6d6afe6bb0d4b2b4a9feca5ecb3",
20
+ "size": 288612536
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "375988f457756524234695cf2d8f64ace99c5f68682e47ea24862a843c191450",
25
- "size": 285809912
24
+ "checksum": "ea0f135784631619a7a409d07322ecec964f9cc4fd377508ed1ba3f141f27912",
25
+ "size": 288730480
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "a0d9d4dcb99a1782cdfc332fed8510467e99efc7ff2f3d7443fea27d9af55e7e",
30
- "size": 277560568
29
+ "checksum": "d15758462f08940f6d2736cd422e291258b9bcaf09c013b63dcfca6cc69a5316",
30
+ "size": 280772600
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "8dfd02ad4590c6f4c419ec73af4f5462223a07f64495e2c2fce45990faf1ede6",
35
- "size": 279442960
34
+ "checksum": "e11074c51f730bd91d0cd9568471d828d6552796b5dbcde10e7aaca19f1650c8",
35
+ "size": 282384648
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "1787c60619bad78543c67e4d9d8a868869c35a904f2a85eb9ea46c4808af196b",
40
- "size": 290228384
39
+ "checksum": "019e5174d5d954585edb1a946fe280e44a973050b4897034adf0e16306f85fdd",
40
+ "size": 293227168
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "a5d5b594a639dab03da1ea0e1a1aedc1885284cc42e14cb65b7527250bc7ea90",
45
- "size": 274508960
44
+ "checksum": "ac37b04c19f09bea6638d1b3ca40131566266fc7b599a405efd76cd04df9e9a7",
45
+ "size": 277572256
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.270",
51
50
  "0.3.271",
52
51
  "0.3.272",
53
52
  "0.3.273",
@@ -76,7 +75,8 @@
76
75
  "0.3.299",
77
76
  "0.3.300",
78
77
  "0.3.301",
79
- "0.3.302"
78
+ "0.3.302",
79
+ "0.3.303"
80
80
  ],
81
81
  "harnessSchema": 1
82
82
  }
package/manifest.zst.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
- "version": "2.1.303",
2
+ "version": "2.1.304",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "07df2aedd2d01d2f60907b8404acbda187b04072",
5
- "buildDate": "2026-10-18T20:41:39Z",
4
+ "commit": "17ab70404e5b632fe060207effb0b440788363ba",
5
+ "buildDate": "2026-10-19T18:32:13Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "482aa490dc1e0328bee10a163bef7f59c7c72e14de7535696b5bd3aec0089f7d",
10
- "size": 90574412,
9
+ "checksum": "d4d21e296a055068be83a9cd0753817eb5033233d6c471cc60491745766441c5",
10
+ "size": 91631244,
11
11
  "bundle": {
12
- "checksum": "717f3621312385ad819e41bbbe799746d20fb11b1131b60bb76f6b6a7ce2213b",
13
- "size": 90574346
12
+ "checksum": "6bbba6adc37fb46d351afb122c7406f4bb3b2ee42818222c310ce57a0594eac8",
13
+ "size": 91633634
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "ee148df1424b5422ad6d348be31f084d467b74cf1fdb564e4f9ec783f6fbe075",
19
- "size": 95935669,
18
+ "checksum": "051693ea6644f29bc6d9f3a675d99464a04b46087ef29f5d92b09cd85a7a7f75",
19
+ "size": 97010027,
20
20
  "bundle": {
21
- "checksum": "efc534c2a8f942ba4c8465fb30c33dab40df443485585fa7fd6b4d43f1813a16",
22
- "size": 95934536
21
+ "checksum": "3a0ab2425f5f78011ff3bc0e2db9502f80a5b349fd701f9bee5887319334b2a2",
22
+ "size": 97018270
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "4a8c0d2e0ab4f31d2b3e1dc136cec6cd4ef10c1c34897cabdece8570a488d2c4",
28
- "size": 99886710
27
+ "checksum": "3df0f416c511c97d8d87e748eef7f7b479db1b530209e53bebe51e8a3e4a0e6d",
28
+ "size": 100907378
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "b00b9295b825169975983c9e1cd3eb2dbbc9c95827fa8b377a0bef0bb8b471a8",
33
- "size": 100914179
32
+ "checksum": "0f3468fa285f112650feb3bec2913425b7ba5c83cd4eb411b5c75b4086416bb6",
33
+ "size": 101910048
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "6ff844ea7e3ffd18ef40097f1a6bdfcfa4f2b3c77b4133e75e8084ebb08c838c",
38
- "size": 98261979
37
+ "checksum": "b442bc1ecd24dd5de0e60d014c26325c977169ab0e6d1e83931327e047aca0d6",
38
+ "size": 99268661
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "d77f7bb92a08a9e8c5c84bfe021e415b85a1caaae7b83568b0b4b418c06559fa",
43
- "size": 99329421
42
+ "checksum": "eeafe1d2f76a9ecb2829b7dcc96cb0c14382907ef95200fc5c09071e9f62daed",
43
+ "size": 100322776
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "45513220216b8e0ba71a6d0be6f6f11538f622460b5c859541bd939ced8e3084",
48
- "size": 103919182
47
+ "checksum": "aed62990b91e94efb35482fd7068cc616c6c2414084c6aa32148ca2a359e4e81",
48
+ "size": 104965652
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "58635cd47d379f6ca8a87c0bea5045f883f4d3ecb0a912fa34f4c10ea17da310",
53
- "size": 99162904
52
+ "checksum": "6f2711964649cdfa3832e87c2d46aec76f225f310a451570ace133e1fb70f665",
53
+ "size": 100206011
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.270",
59
58
  "0.3.271",
60
59
  "0.3.272",
61
60
  "0.3.273",
@@ -84,7 +83,8 @@
84
83
  "0.3.299",
85
84
  "0.3.300",
86
85
  "0.3.301",
87
- "0.3.302"
86
+ "0.3.302",
87
+ "0.3.303"
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.303",
3
+ "version": "0.3.304",
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.303",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.303",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.303",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.303",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.303",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.303",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.303",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.303"
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"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -85,8 +85,8 @@
85
85
  "extractFromBunfs.d.ts",
86
86
  "manifest.json",
87
87
  "manifest.zst.json",
88
- "core-dmg5st5c.mjs",
89
- "core-gvw0a6et.mjs"
88
+ "core-2hp8y6j3.mjs",
89
+ "core-kjmgdn1p.mjs"
90
90
  ],
91
- "claudeCodeVersion": "2.1.303"
91
+ "claudeCodeVersion": "2.1.304"
92
92
  }
package/sdk.d.ts CHANGED
@@ -261,6 +261,7 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
261
261
  decisionReason?: string;
262
262
 
263
263
 
264
+
264
265
  /**
265
266
  * Full permission prompt sentence rendered by the bridge (e.g.
266
267
  * "Claude wants to read foo.txt"). Use this as the primary prompt
@@ -1659,6 +1660,7 @@ export declare type Options = {
1659
1660
  * ```
1660
1661
  */
1661
1662
  toolAliases?: Record<string, string>;
1663
+
1662
1664
  /**
1663
1665
  * Specify the base set of available built-in tools.
1664
1666
  * - `string[]` - Array of specific tool names (e.g., `['Bash', 'Read', 'Edit']`)
@@ -2870,6 +2872,10 @@ export declare type PreToolUseHookSpecificOutput = {
2870
2872
  */
2871
2873
  export declare function prewarm(_params?: {
2872
2874
  options?: Options;
2875
+ /**
2876
+ * The most time, in milliseconds, to wait for the spare process to
2877
+ * initialize; it counts throughout. Defaults to 60000.
2878
+ */
2873
2879
  initializeTimeoutMs?: number;
2874
2880
  }): Promise<SpareProcess>;
2875
2881
 
@@ -4023,6 +4029,10 @@ declare type SDKControlGetContextUsageRequest = {
4023
4029
  */
4024
4030
  export declare type SDKControlGetContextUsageResponse = {
4025
4031
  categories: {
4032
+ /**
4033
+ * Which row this is. Stable where the English name is not: match a particular row on this. Absent from a CLI that predates it. A later CLI may add values: treat an unknown value as absent.
4034
+ */
4035
+ id?: 'system_prompt' | 'system_tools' | 'mcp_tools' | 'mcp_instructions' | 'mcp_tools_deferred' | 'system_tools_deferred' | 'custom_agents' | 'memory_files' | 'skills' | 'messages' | 'autocompact_buffer' | 'compact_buffer' | 'free_space';
4026
4036
  name: string;
4027
4037
  tokens: number;
4028
4038
  color: string;
@@ -4056,6 +4066,16 @@ export declare type SDKControlGetContextUsageResponse = {
4056
4066
  tokens: number;
4057
4067
  isLoaded?: boolean;
4058
4068
  }[];
4069
+ /**
4070
+ * The 'mcp_instructions' row by server. Only the row's total is counted: each server's share of it is estimated from the length of its text. Present only where the CLI answers on its own stdio and no server stores or forwards the reply.
4071
+ */
4072
+ mcpInstructions?: {
4073
+ /**
4074
+ * Server name, as mcp_status reports it and mcp_toggle takes it (not normalized, unlike mcpTools[].serverName).
4075
+ */
4076
+ serverName: string;
4077
+ tokens: number;
4078
+ }[];
4059
4079
  deferredBuiltinTools?: {
4060
4080
  name: string;
4061
4081
  tokens: number;
@@ -4072,6 +4092,14 @@ export declare type SDKControlGetContextUsageResponse = {
4072
4092
  agents: {
4073
4093
  agentType: string;
4074
4094
  source: string;
4095
+ /**
4096
+ * Id of the providing plugin (its name and marketplace), when there is one. Present only where the CLI answers on its own stdio and no server stores or forwards the reply.
4097
+ */
4098
+ pluginId?: string;
4099
+ /**
4100
+ * Absolute path of the agent's file on the machine the CLI runs on, which over SSH or WSL is not the host's. Present only where the CLI answers on its own stdio and no server stores or forwards the reply: absent on cloud, self-hosted runner and Remote Control connections, and for an agent with no file.
4101
+ */
4102
+ path?: string;
4075
4103
  tokens: number;
4076
4104
  }[];
4077
4105
  slashCommands?: {
@@ -4086,6 +4114,18 @@ export declare type SDKControlGetContextUsageResponse = {
4086
4114
  skillFrontmatter: {
4087
4115
  name: string;
4088
4116
  source: string;
4117
+ /**
4118
+ * Name of the providing plugin, when there is one. Not unique across marketplaces: pluginId is.
4119
+ */
4120
+ pluginName?: string;
4121
+ /**
4122
+ * Id of the providing plugin (its name and marketplace), when there is one. Present only where the CLI answers on its own stdio and no server stores or forwards the reply.
4123
+ */
4124
+ pluginId?: string;
4125
+ /**
4126
+ * Absolute path of the skill's file on the machine the CLI runs on, which over SSH or WSL is not the host's. Present only where the CLI answers on its own stdio and no server stores or forwards the reply: absent on cloud, self-hosted runner and Remote Control connections, and for a skill with no file.
4127
+ */
4128
+ path?: string;
4089
4129
  tokens: number;
4090
4130
  }[];
4091
4131
  };
@@ -4587,6 +4627,7 @@ declare type SDKControlInitializeRequest = {
4587
4627
  * Map of tool-name aliases applied before name resolution. When the model emits a tool_use whose name is a key in this map, the tool execution path resolves the mapped name instead. Single-hop (no chains). See Options.toolAliases.
4588
4628
  */
4589
4629
  toolAliases?: Record<string, string>;
4630
+
4590
4631
  /**
4591
4632
  * When true, omit per-user dynamic sections (working directory, auto-memory path) from the cached system prompt and re-inject them as the first user message. Lets cross-user prompt caching hit on a static system prompt prefix. Tradeoff: the model sees this context slightly later in the prompt, so steering on the working directory and memory location is marginally less authoritative. Has no effect when a custom (non-preset) system prompt is in use.
4592
4633
  */
@@ -4647,6 +4688,7 @@ export declare type SDKControlInitializeResponse = {
4647
4688
  * Whether the `hooks` this initialize carried were registered: true on a session's first initialize, and on a repeated initialize from the process that owns the CLI's stdin (its set replaces the one registered earlier); false when a repeated initialize's hooks were ignored (a client joining a remote session another client configured). Absent when the request carried no hooks, and on CLIs that predate the field — those ignored `hooks` on every repeated initialize.
4648
4689
  */
4649
4690
  hooks_applied?: boolean;
4691
+
4650
4692
  /**
4651
4693
  * Whether every plugin this initialize listed is loaded: true when each one is among the plugins the process loaded at launch (from `plugins` under --await-initialize, or from --plugin-dir), so a re-sent initialize naming the launch set also reads true; false otherwise. The `plugins` field never loads anything after launch. Absent when the request listed no plugins, and on CLIs that predate the field (those never read `plugins`).
4652
4694
  */
@@ -5121,7 +5163,7 @@ export declare type SDKControlRequestProgressMessage = {
5121
5163
  declare type SDKControlRequestUserDialogRequest = {
5122
5164
  subtype: 'request_user_dialog';
5123
5165
  /**
5124
- * Identifier for the dialog the host should render. Open string union — new kinds may be added without bumping the protocol. A kind is only sent in sessions where some attached client declared it in initialize.supportedDialogKinds (declare exactly the kinds you can render); on multi-client transports the request still reaches every attached client. A host that receives a kind it did not declare must not answer it (an error-subtype response is discarded and the dialog stays pending) — never with {behavior: "cancelled"}, which is a real settlement treated as the user dismissing the dialog. An unanswered dialog is cancelled by the CLI after its dialog deadline.
5166
+ * Identifier for the dialog the host should render. Open string union — new kinds may be added without bumping the protocol. A kind is only sent in sessions where some attached client declared it in initialize.supportedDialogKinds (declare exactly the kinds you can render); on multi-client transports the request still reaches every attached client. A host that receives a kind it did not declare must not answer it (an error-subtype response is discarded and the dialog stays pending) — never with {behavior: "cancelled"}, which is a real settlement treated as the user dismissing the dialog. An unanswered dialog is cancelled by the CLI after its dialog deadline; the CLI may send one that has no deadline, which stays up until it is answered or the CLI withdraws it with a control_cancel_request.
5125
5167
  */
5126
5168
  dialog_kind: string;
5127
5169
  /**
@@ -5370,7 +5412,7 @@ export declare type SDKInformationalMessage = {
5370
5412
  };
5371
5413
 
5372
5414
  /**
5373
- * Liveness heartbeat with no payload. Either side may send it at any time (the CLI emits it periodically, for example while a long-running control request is in progress); receivers must ignore it.
5415
+ * Liveness heartbeat. Either side may send it at any time (the CLI emits it periodically, for example while a long-running control request is in progress); receivers must ignore it. It has no payload. One use is not part of this schema: for startup() and prewarm() of the Agent SDK, which set CLAUDE_CODE_SDK_READS_STARTUP_MARKS, the CLI writes lines of this type with a `startup_mark` field, the name of a start-up checkpoint that it has passed, before the initialize response.
5374
5416
  */
5375
5417
  declare type SDKKeepAliveMessage = {
5376
5418
  type: 'keep_alive';
@@ -5789,6 +5831,7 @@ export declare type SDKRateLimitInfo = {
5789
5831
  errorCode?: 'credits_required';
5790
5832
  canUserPurchaseCredits?: boolean;
5791
5833
  hasChargeableSavedPaymentMethod?: boolean;
5834
+
5792
5835
  };
5793
5836
 
5794
5837
  export declare type SDKResultError = {
@@ -9717,6 +9760,14 @@ export declare interface SpawnOptions {
9717
9760
  */
9718
9761
  export declare function startup(_params?: {
9719
9762
  options?: Options;
9763
+ /**
9764
+ * The most time, in milliseconds, that startup() counts while it waits for
9765
+ * the subprocess to initialize; when that time is used up, the promise
9766
+ * rejects with a timeout error. Defaults to 60000. When no value is passed,
9767
+ * time in which the subprocess reports a SessionStart or Setup hook running
9768
+ * is not counted, for at most 10 minutes in total. A value that is passed
9769
+ * counts throughout.
9770
+ */
9720
9771
  initializeTimeoutMs?: number;
9721
9772
  }): Promise<WarmQuery>;
9722
9773