@anthropic-ai/claude-agent-sdk 0.2.110 → 0.2.111

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.110",
3
- "buildDate": "2026-04-15T19:43:17Z",
2
+ "version": "2.1.111",
3
+ "buildDate": "2026-04-16T14:30:47Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude",
7
- "checksum": "f45cb1b0765f9fc592d36d7153f6c1ff0ecfc3ae9cbc997eaff2b0cd25bff9f6",
8
- "size": 202932416
7
+ "checksum": "2620cc83dbee72c24858b3519ce5de050fef91f0d3d17b309176d61e679f95ee",
8
+ "size": 203956832
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude",
12
- "checksum": "d4896277920c253c2bda5e0ae02a3e39486fa203603c2b25cc236533d68518fd",
13
- "size": 204376928
12
+ "checksum": "16d897d570c93b83d100a16a7a33ca3adbd43b1b0f818ab66bef1a364b2460a6",
13
+ "size": 205442640
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude",
17
- "checksum": "ff5bf0372d1700cfb4d232021c6e0d417205c16392492da0fabc6b509eeee92a",
18
- "size": 235145792
17
+ "checksum": "99376866bf7ec367142d3be548c17184a79f30a97318441ee9a00f78e51246e7",
18
+ "size": 236128832
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude",
22
- "checksum": "7ecdde57b002d5927e704dcbce04eaafb923644d315259ba2e6ac6f0712163a4",
23
- "size": 234871424
22
+ "checksum": "5d4df970040b0f83aac434ae540b409126a4778a379e8c9b4c793560e3bfa060",
23
+ "size": 235842176
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude",
27
- "checksum": "d6878d6c32668ffda513218fe2775f6bdfb718575139ac8e6731b6b4cd485d8a",
28
- "size": 227805632
27
+ "checksum": "39f1d4b9c328ced97dae1de8ca000769e935e15aaa89f54f4c6663016c834ff5",
28
+ "size": 228854208
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude",
32
- "checksum": "aaaf37cc68acd7a83351f5e788d6a5cede0654b05c6b616ae0c9b6fbacbc1b78",
33
- "size": 229120448
32
+ "checksum": "cb789bbf32c90aa7b658f0cf1cedd7116b45afc5e0438f6fda4af0bac5996c9f",
33
+ "size": 230107584
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe",
37
- "checksum": "6d267d4bc70b98436d4e55c0c3a6cd310b2e97bb42d215abb646093fce9ea3bd",
38
- "size": 244445344
37
+ "checksum": "51024dbcd60382b6fb881b5cda6754a0fe445a90d3ad02eb5f13a2733ac3262e",
38
+ "size": 245423264
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe",
42
- "checksum": "e1d4914eead2dddb36e84c15bc1dc9655ae92f0b43a1c7964a7c99900b515bf8",
43
- "size": 241153696
42
+ "checksum": "8381c9964a39cb231e4243d5ec7bf0158719fc292de1130f7c0f07e8b3137327",
43
+ "size": 242154656
44
44
  }
45
45
  }
46
46
  }
package/manifest.zst.json CHANGED
@@ -1,54 +1,54 @@
1
1
  {
2
- "version": "2.1.110",
3
- "buildDate": "2026-04-15T19:50:40Z",
2
+ "version": "2.1.111",
3
+ "buildDate": "2026-04-16T14:39:11Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude.zst",
7
- "checksum": "1fb5c689fdaa40b678a3795d309526ab23b84b2b2b38f205f8d7a9d2222aad01",
8
- "size": 41942064,
7
+ "checksum": "06a5fe396c482384d1395baed8762267875fee044f554f9381f4b5cfa389d427",
8
+ "size": 42157993,
9
9
  "bundle": {
10
- "checksum": "06aadef14bbdbc13ed357be8448c5df15abeb1dbc111596eeea818d3b2f8e32d",
11
- "size": 41946957
10
+ "checksum": "2283a0f4b65995b48a3ef511ff7e6193b9683791a30fb897c81f316a0ec89ba3",
11
+ "size": 42162315
12
12
  }
13
13
  },
14
14
  "darwin-x64": {
15
15
  "binary": "claude.zst",
16
- "checksum": "de6801c997babd684378831681e0a06e57b4e746efeb68210f5358aeb6920b72",
17
- "size": 43628781,
16
+ "checksum": "147798474995aefdfa6c6637182d4195094a19643b81503ca23d2155c66559f1",
17
+ "size": 43839794,
18
18
  "bundle": {
19
- "checksum": "b401f944c23c9d6ba3c4133fe778d7df39957ef326431cac95bae3a1341b50f1",
20
- "size": 43630090
19
+ "checksum": "e47b03935637aa828bc8e58f827bcfb2b5e74a27def6e1471a0f2a0eb6e9d293",
20
+ "size": 43845409
21
21
  }
22
22
  },
23
23
  "linux-arm64": {
24
24
  "binary": "claude.zst",
25
- "checksum": "cfbd59fc6711d25288500de133a9147e4fc748da0825109a60ab6af3d2c073f8",
26
- "size": 51585905
25
+ "checksum": "a6830c443d1722c882b37c2901b022c3d23c34262de2213c9a5cbeb8391329ea",
26
+ "size": 51815821
27
27
  },
28
28
  "linux-x64": {
29
29
  "binary": "claude.zst",
30
- "checksum": "d0da2a150be75b11f00a7ddc2af9060655f31a9b9b8eb4a8fa0a9d987c8d8285",
31
- "size": 52158838
30
+ "checksum": "39048ef36dbed45f21251248bfe04c9a5b3d8c32025aa7550537792543d357f4",
31
+ "size": 52369905
32
32
  },
33
33
  "linux-arm64-musl": {
34
34
  "binary": "claude.zst",
35
- "checksum": "603a19ed0ac655df3a45152e9a1747551a49012162728df7ff4dba7fc2f6cedd",
36
- "size": 50205097
35
+ "checksum": "3d4c9721533bcef05218bc56987203ae39dfb96b66b0c408c9330bac041ca3f6",
36
+ "size": 50414751
37
37
  },
38
38
  "linux-x64-musl": {
39
39
  "binary": "claude.zst",
40
- "checksum": "e09082eb2677bfbd953754f402e8d737c2e2df106fc2aee4c6dc0a9c9540e795",
41
- "size": 50842631
40
+ "checksum": "05eecc13acf12bfaee43ef4679cf288af035070411a4624702e8ac7d7e95e15c",
41
+ "size": 51067121
42
42
  },
43
43
  "win32-x64": {
44
44
  "binary": "claude.exe.zst",
45
- "checksum": "ed38429823c7751ff385d6cc6ff5ae7bce9a60238d3422f75f2a32963120c9de",
46
- "size": 53814271
45
+ "checksum": "a0089a845fe8e66adbde895a8b270513f6c871c74eabd76c374df2afc943ff5b",
46
+ "size": 54042832
47
47
  },
48
48
  "win32-arm64": {
49
49
  "binary": "claude.exe.zst",
50
- "checksum": "392a074eca73534b056e3303665d93e1955ac688fdd621a7115b3864526460ad",
51
- "size": 51977170
50
+ "checksum": "a19dd40baeb0306b65adab99f711762a06a181b906048c519f3a4b68125d922e",
51
+ "size": 52180072
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.110",
3
+ "version": "0.2.111",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -90,5 +90,5 @@
90
90
  "vendor/ripgrep/",
91
91
  "vendor/audio-capture/"
92
92
  ],
93
- "claudeCodeVersion": "2.1.110"
93
+ "claudeCodeVersion": "2.1.111"
94
94
  }
package/sdk.d.ts CHANGED
@@ -84,7 +84,7 @@ export declare type AgentDefinition = {
84
84
  /**
85
85
  * Reasoning effort level for this agent. Either a named level or an integer
86
86
  */
87
- effort?: ('low' | 'medium' | 'high' | 'max') | number;
87
+ effort?: ('low' | 'medium' | 'high' | 'xhigh' | 'max') | number;
88
88
  /**
89
89
  * Permission mode controlling how tool executions are handled
90
90
  */
@@ -304,6 +304,7 @@ declare namespace coreTypes {
304
304
  McpServerConfigForProcessTransport,
305
305
  McpServerStatusConfig,
306
306
  McpServerStatus,
307
+ McpServerToolPolicy,
307
308
  McpSetServersResult,
308
309
  McpStdioServerConfig,
309
310
  ModelInfo,
@@ -436,9 +437,10 @@ export declare type CwdChangedHookSpecificOutput = {
436
437
  * - `'low'` — Minimal thinking, fastest responses
437
438
  * - `'medium'` — Moderate thinking
438
439
  * - `'high'` — Deep reasoning (default)
440
+ * - `'xhigh'` — Deeper than high (Opus 4.7 only; falls back to `'high'` elsewhere)
439
441
  * - `'max'` — Maximum effort (select models only)
440
442
  */
441
- export declare type EffortLevel = 'low' | 'medium' | 'high' | 'max';
443
+ export declare type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
442
444
 
443
445
  /**
444
446
  * 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.
@@ -747,9 +749,7 @@ export declare type ListSessionsOptions = {
747
749
  * When `dir` is provided and the directory is inside a git repository,
748
750
  * include sessions from all git worktree paths. Defaults to `true`.
749
751
  *
750
- * Only applies to the local-filesystem path. Ignored when `sessionStore`
751
- * is provided — worktree enumeration requires inspecting `.git/worktrees`
752
- * on disk, which a SessionStore (keyed by projectKey) has no view of.
752
+ * Only applies when reading from the local filesystem.
753
753
  */
754
754
  includeWorktrees?: boolean;
755
755
 
@@ -786,6 +786,7 @@ export declare type McpHttpServerConfig = {
786
786
  type: 'http';
787
787
  url: string;
788
788
  headers?: Record<string, string>;
789
+ tools?: McpServerToolPolicy[];
789
790
  };
790
791
 
791
792
  export declare type McpSdkServerConfig = {
@@ -856,6 +857,14 @@ export declare type McpServerStatus = {
856
857
 
857
858
  export declare type McpServerStatusConfig = McpServerConfigForProcessTransport | McpClaudeAIProxyServerConfig;
858
859
 
860
+ /**
861
+ * Per-tool permission policy carried on mcp_set_servers for remote servers.
862
+ */
863
+ export declare type McpServerToolPolicy = {
864
+ name: string;
865
+ permission_policy: 'always_allow' | 'always_ask' | 'always_deny';
866
+ };
867
+
859
868
  /**
860
869
  * Result of a setMcpServers operation.
861
870
  */
@@ -878,6 +887,7 @@ export declare type McpSSEServerConfig = {
878
887
  type: 'sse';
879
888
  url: string;
880
889
  headers?: Record<string, string>;
890
+ tools?: McpServerToolPolicy[];
881
891
  };
882
892
 
883
893
  export declare type McpStdioServerConfig = {
@@ -910,7 +920,7 @@ export declare type ModelInfo = {
910
920
  /**
911
921
  * Available effort levels for this model
912
922
  */
913
- supportedEffortLevels?: ('low' | 'medium' | 'high' | 'max')[];
923
+ supportedEffortLevels?: ('low' | 'medium' | 'high' | 'xhigh' | 'max')[];
914
924
  /**
915
925
  * Whether this model supports adaptive thinking (Claude decides when and how much to think)
916
926
  */
@@ -1048,7 +1058,11 @@ export declare type Options = {
1048
1058
  };
1049
1059
  /**
1050
1060
  * Environment variables to pass to the Claude Code process.
1051
- * Defaults to `process.env`.
1061
+ * Merged on top of `process.env` — entries here override the parent
1062
+ * process's variables, and anything not set here is inherited.
1063
+ * Set a key to `undefined` to remove an inherited variable. Note:
1064
+ * `GITHUB_ACTIONS` and a few SDK-managed vars are stripped and are
1065
+ * not inherited unless set explicitly here.
1052
1066
  *
1053
1067
  * SDK consumers can identify their app/library to include in the User-Agent header by setting:
1054
1068
  * - `CLAUDE_AGENT_SDK_CLIENT_APP` - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")
@@ -1192,7 +1206,8 @@ export declare type Options = {
1192
1206
  * - `'low'` — Minimal thinking, fastest responses
1193
1207
  * - `'medium'` — Moderate thinking
1194
1208
  * - `'high'` — Deep reasoning (default)
1195
- * - `'max'` — Maximum effort (Opus 4.6 only)
1209
+ * - `'xhigh'` — Deeper than high (Opus 4.7 only)
1210
+ * - `'max'` — Maximum effort (Opus 4.6/4.7 only)
1196
1211
  *
1197
1212
  * @see https://docs.anthropic.com/en/docs/build-with-claude/effort
1198
1213
  */
@@ -1243,7 +1258,7 @@ export declare type Options = {
1243
1258
  mcpServers?: Record<string, McpServerConfig>;
1244
1259
  /**
1245
1260
  * Claude model to use. Defaults to the CLI default model.
1246
- * Examples: 'claude-sonnet-4-6', 'claude-opus-4-6'
1261
+ * Examples: 'claude-sonnet-4-6', 'claude-opus-4-7'
1247
1262
  */
1248
1263
  model?: string;
1249
1264
  /**
@@ -1495,6 +1510,7 @@ export declare type Options = {
1495
1510
  append?: string;
1496
1511
  excludeDynamicSections?: boolean;
1497
1512
  };
1513
+
1498
1514
  /**
1499
1515
  * Custom function to spawn the Claude Code process.
1500
1516
  * Use this to run Claude Code in VMs, containers, or remote environments.
@@ -1847,6 +1863,7 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
1847
1863
 
1848
1864
 
1849
1865
 
1866
+
1850
1867
  /**
1851
1868
  * Reconnect an MCP server by name.
1852
1869
  * Throws on failure.
@@ -2225,6 +2242,7 @@ declare type SDKControlInitializeRequest = {
2225
2242
  jsonSchema?: Record<string, unknown>;
2226
2243
  systemPrompt?: string[];
2227
2244
  appendSystemPrompt?: string;
2245
+
2228
2246
  /**
2229
2247
  * 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.
2230
2248
  */
@@ -2352,7 +2370,7 @@ export declare type SDKControlRequest = {
2352
2370
  request: SDKControlRequestInner;
2353
2371
  };
2354
2372
 
2355
- declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest;
2373
+ declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlUltrareviewLaunchRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest;
2356
2374
 
2357
2375
  /**
2358
2376
  * Requests the SDK consumer to render a tool-driven blocking dialog and return the user choice. Used by tools that previously rendered Ink JSX via setToolJSX with an onDone callback.
@@ -2820,7 +2838,11 @@ export declare type SDKSessionOptions = {
2820
2838
  executableArgs?: string[];
2821
2839
  /**
2822
2840
  * Environment variables to pass to the Claude Code process.
2823
- * Defaults to `process.env`.
2841
+ * Merged on top of `process.env` — entries here override the parent
2842
+ * process's variables, and anything not set here is inherited.
2843
+ * Set a key to `undefined` to remove an inherited variable. Note:
2844
+ * `GITHUB_ACTIONS` and a few SDK-managed vars are stripped and are
2845
+ * not inherited unless set explicitly here.
2824
2846
  *
2825
2847
  * SDK consumers can identify their app/library to include in the User-Agent header by setting:
2826
2848
  * - `CLAUDE_AGENT_SDK_CLIENT_APP` - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")
@@ -2941,6 +2963,7 @@ export declare type SDKSystemMessage = {
2941
2963
  path: string;
2942
2964
 
2943
2965
  }[];
2966
+
2944
2967
  fast_mode_state?: FastModeState;
2945
2968
 
2946
2969
  uuid: UUID;
@@ -3144,6 +3167,10 @@ export declare interface Settings {
3144
3167
  * Path to a script that outputs authentication values
3145
3168
  */
3146
3169
  apiKeyHelper?: string;
3170
+ /**
3171
+ * Shell command that outputs a Proxy-Authorization header value (EAP)
3172
+ */
3173
+ proxyAuthHelper?: string;
3147
3174
  /**
3148
3175
  * Path to a script that exports AWS credentials
3149
3176
  */
@@ -4262,7 +4289,7 @@ export declare interface Settings {
4262
4289
  /**
4263
4290
  * Persisted effort level for supported models.
4264
4291
  */
4265
- effortLevel?: 'low' | 'medium' | 'high';
4292
+ effortLevel?: 'low' | 'medium' | 'high' | 'xhigh';
4266
4293
  /**
4267
4294
  * Auto-compact window size
4268
4295
  */
@@ -4516,6 +4543,15 @@ export declare interface SpawnOptions {
4516
4543
  signal: AbortSignal;
4517
4544
  }
4518
4545
 
4546
+ /**
4547
+ * Pre-warms the CLI subprocess so the first `query()` resolves immediately.
4548
+ * Returns a {@link WarmQuery} handle.
4549
+ */
4550
+ export declare function startup(_params?: {
4551
+ options?: Options;
4552
+ initializeTimeoutMs?: number;
4553
+ }): Promise<WarmQuery>;
4554
+
4519
4555
  declare type StdoutMessage = coreTypes.SDKMessage | coreTypes.SDKPostTurnSummaryMessage | coreTypes.SDKTranscriptMirrorMessage | SDKControlResponse | SDKControlRequest | SDKControlCancelRequest | SDKKeepAliveMessage;
4520
4556
 
4521
4557
  export declare type StopFailureHookInput = BaseHookInput & {
@@ -4751,6 +4787,25 @@ export declare type UserPromptSubmitHookSpecificOutput = {
4751
4787
  sessionTitle?: string;
4752
4788
  };
4753
4789
 
4790
+ /**
4791
+ * A pre-warmed query handle returned by `startup()`. The subprocess has
4792
+ * already been spawned and completed its initialize handshake, so calling
4793
+ * `query()` writes the prompt directly to a ready process — no startup
4794
+ * latency.
4795
+ */
4796
+ export declare interface WarmQuery extends AsyncDisposable {
4797
+ /**
4798
+ * Send a prompt to the pre-warmed subprocess and return the Query.
4799
+ * Can only be called once per WarmQuery.
4800
+ */
4801
+ query(prompt: string | AsyncIterable<SDKUserMessage>): Query;
4802
+ /**
4803
+ * Close the subprocess without sending a prompt. Use this to discard a
4804
+ * warm query you no longer need.
4805
+ */
4806
+ close(): void;
4807
+ }
4808
+
4754
4809
  export declare type WorktreeCreateHookInput = BaseHookInput & {
4755
4810
  hook_event_name: 'WorktreeCreate';
4756
4811
  name: string;