@anthropic-ai/claude-agent-sdk 0.2.138 → 0.2.139
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/assistant.mjs +44 -44
- package/bridge.d.ts +2 -2
- package/bridge.mjs +35 -35
- package/browser-sdk.js +30 -30
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk.d.ts +41 -5
- package/sdk.mjs +31 -31
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-05-
|
|
2
|
+
"version": "2.1.139",
|
|
3
|
+
"commit": "208bf4b44f987c4c62618ae20ce1715d53693c62",
|
|
4
|
+
"buildDate": "2026-05-11T17:11:02Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "aa8a0a39f2abbd9e09518eb7268cda105b8029620a38f5a5cbc362b65331c3db",
|
|
9
|
+
"size": 205689872
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "12303d03814e76e8d09fb989286e88b7c5865facd00d71bc790112dae087acef",
|
|
14
|
+
"size": 208199920
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "3985aaf75b3bff1d8d031b726c804e4152e1530261683cdce14e954f0af2c912",
|
|
19
|
+
"size": 231126664
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "c1800a0ae51b5a4c7b33be6a32d62b6169d93f6174119b2eeb6896cf0cd5d7e6",
|
|
24
|
+
"size": 231196368
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "17a35f4f0efe03fedf773ace0bdf091fea61ae3e75f881fa7732d2d9ce5e26f3",
|
|
29
|
+
"size": 223981400
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "2593da20dfb77c9957e27d25a7f6268c251cd2c0278b5038cb15d86331709ca2",
|
|
34
|
+
"size": 225590320
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "3908a2edd0d17100338e921b6241c11dc5b115baaf14708872e64e870d517ca8",
|
|
39
|
+
"size": 227093664
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "020b89524bdcae7a60415bf8a414afc68de69fa78fb235d160d55e876b69ea84",
|
|
44
|
+
"size": 223058080
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-05-
|
|
2
|
+
"version": "2.1.139",
|
|
3
|
+
"commit": "208bf4b44f987c4c62618ae20ce1715d53693c62",
|
|
4
|
+
"buildDate": "2026-05-11T17:17:49Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "7404bec2a8a8da60c17803c9fda44a6938ceefd72eb905f6eebba4404d9032ff",
|
|
9
|
+
"size": 42630785,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "43a278b3f5851315711649d24803a762641fe3774d8eeabf2422ea4f7547c8a5",
|
|
12
|
+
"size": 42637033
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "bbf08d04605cf86542cabfaec82e113a6aae1a81c205a5da41b98857ae1b9d8d",
|
|
18
|
+
"size": 44547581,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "410a7435fd519aeaf1651f62b610cbbe3516e255565829d9caf7b915df9d39e7",
|
|
21
|
+
"size": 44553982
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "eeac65689077c02189c58e63a73850b8c3ed103a522ad41762d957cb0b784eeb",
|
|
27
|
+
"size": 50438610
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "048fe37627149df2ef6c7c75d61248ec061defc23356f3590e869f9d67956c72",
|
|
32
|
+
"size": 51067525
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "16f3e33ec80e68aa7e151d0189c5d9c359929142e07a986f32a00b3f6c47401f",
|
|
37
|
+
"size": 49069522
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "bc6b13fc2c8d340062cbc7186631eeb38fb8c121f3cc97c2deff8f1b5ae64884",
|
|
42
|
+
"size": 49772784
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "6dfd1050be6a4a71d925eaa380307d125853c2a2fce28770ec4a756194984354",
|
|
47
|
+
"size": 51777975
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "97b280b757d73656bdbb550d850aeaa0fc1ca03e4dae93ad07602643bc6b0dc2",
|
|
52
|
+
"size": 50046490
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropic-ai/claude-agent-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.139",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"zod": "^4.0.0"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.
|
|
59
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.
|
|
60
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.
|
|
61
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.
|
|
62
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.
|
|
63
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.
|
|
64
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.
|
|
58
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.139",
|
|
59
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.139",
|
|
60
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.139",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.139",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.139",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.139",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.139",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.139"
|
|
66
66
|
},
|
|
67
67
|
"files": [
|
|
68
68
|
"sdk.mjs",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"manifest.json",
|
|
79
79
|
"manifest.zst.json"
|
|
80
80
|
],
|
|
81
|
-
"claudeCodeVersion": "2.1.
|
|
81
|
+
"claudeCodeVersion": "2.1.139"
|
|
82
82
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -27,9 +27,9 @@ export declare type AccountInfo = {
|
|
|
27
27
|
tokenSource?: string;
|
|
28
28
|
apiKeySource?: string;
|
|
29
29
|
/**
|
|
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.).
|
|
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';
|
|
32
|
+
apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws' | 'mantle' | 'gateway';
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -2269,6 +2269,19 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2269
2269
|
* @param taskId - The task ID from task_notification events
|
|
2270
2270
|
*/
|
|
2271
2271
|
stopTask(taskId: string): Promise<void>;
|
|
2272
|
+
/**
|
|
2273
|
+
* Background in-flight foreground tasks (Bash commands and subagents).
|
|
2274
|
+
* With `toolUseId`, targets the single task started by that tool_use
|
|
2275
|
+
* block; without it, backgrounds all foreground tasks — equivalent to
|
|
2276
|
+
* pressing Ctrl+B in the terminal. Each blocking tool call returns
|
|
2277
|
+
* immediately with a "running in the background" tool_result and the
|
|
2278
|
+
* turn continues; the task keeps running and emits a task_notification
|
|
2279
|
+
* when it settles.
|
|
2280
|
+
* @param toolUseId - Optional tool_use block id to target a single task
|
|
2281
|
+
* @returns true when at least one task was backgrounded; false only
|
|
2282
|
+
* when `toolUseId` was given and it matched no foreground task
|
|
2283
|
+
*/
|
|
2284
|
+
backgroundTasks(toolUseId?: string): Promise<boolean>;
|
|
2272
2285
|
/**
|
|
2273
2286
|
* Close the query and terminate the underlying process.
|
|
2274
2287
|
* This forcefully ends the query, cleaning up all resources including
|
|
@@ -2532,6 +2545,17 @@ declare type SDKControlApplyFlagSettingsRequest = {
|
|
|
2532
2545
|
settings: Record<string, unknown>;
|
|
2533
2546
|
};
|
|
2534
2547
|
|
|
2548
|
+
/**
|
|
2549
|
+
* Backgrounds in-flight foreground tasks (Bash commands and subagents). With tool_use_id, targets the single task started by that tool_use block; without it, backgrounds all foreground tasks — the control-request equivalent of pressing Ctrl+B in the terminal. Each blocking tool call returns immediately with a "running in the background" tool_result and the turn continues; the task keeps running and emits a task_notification when it settles.
|
|
2550
|
+
*/
|
|
2551
|
+
declare type SDKControlBackgroundTasksRequest = {
|
|
2552
|
+
subtype: 'background_tasks';
|
|
2553
|
+
/**
|
|
2554
|
+
* When set, backgrounds only the task whose originating tool_use block has this id. When omitted, backgrounds all foreground tasks (Ctrl+B semantics).
|
|
2555
|
+
*/
|
|
2556
|
+
tool_use_id?: string;
|
|
2557
|
+
};
|
|
2558
|
+
|
|
2535
2559
|
/**
|
|
2536
2560
|
* Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.
|
|
2537
2561
|
*/
|
|
@@ -2902,7 +2926,7 @@ export declare type SDKControlRequest = {
|
|
|
2902
2926
|
request: SDKControlRequestInner;
|
|
2903
2927
|
};
|
|
2904
2928
|
|
|
2905
|
-
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlUltrareviewLaunchRequest | SDKControlMessageRatedRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlSubmitFeedbackRequest;
|
|
2929
|
+
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlUltrareviewLaunchRequest | SDKControlMessageRatedRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlSubmitFeedbackRequest;
|
|
2906
2930
|
|
|
2907
2931
|
/**
|
|
2908
2932
|
* 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.
|
|
@@ -4140,6 +4164,10 @@ export declare interface Settings {
|
|
|
4140
4164
|
* Shell command to execute
|
|
4141
4165
|
*/
|
|
4142
4166
|
command: string;
|
|
4167
|
+
/**
|
|
4168
|
+
* Argument list for exec form. When present, `command` is resolved as an executable and spawned directly with these arguments — no shell. Path placeholders like ${CLAUDE_PLUGIN_ROOT} are substituted per-element as plain strings, so paths with quotes, $, or backticks never reach a shell parser. When absent, `command` runs through a shell (bash on POSIX, PowerShell on Windows without Git Bash).
|
|
4169
|
+
*/
|
|
4170
|
+
args?: string[];
|
|
4143
4171
|
/**
|
|
4144
4172
|
* Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.
|
|
4145
4173
|
*/
|
|
@@ -4191,6 +4219,10 @@ export declare interface Settings {
|
|
|
4191
4219
|
* Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.
|
|
4192
4220
|
*/
|
|
4193
4221
|
model?: string;
|
|
4222
|
+
/**
|
|
4223
|
+
* Sets the continue value for the decision:"block" produced when ok is false. Default false (turn ends). Whether continue:true lets the turn proceed depends on the event's decision:"block" semantics. On PostToolUse, the reason is fed back to Claude and the turn continues.
|
|
4224
|
+
*/
|
|
4225
|
+
continueOnBlock?: boolean;
|
|
4194
4226
|
/**
|
|
4195
4227
|
* Custom status message to display in spinner while hook runs
|
|
4196
4228
|
*/
|
|
@@ -4323,9 +4355,9 @@ export declare interface Settings {
|
|
|
4323
4355
|
*/
|
|
4324
4356
|
disableAllHooks?: boolean;
|
|
4325
4357
|
/**
|
|
4326
|
-
* Disable
|
|
4358
|
+
* Disable agent view (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENT_VIEW=1.
|
|
4327
4359
|
*/
|
|
4328
|
-
|
|
4360
|
+
disableAgentView?: boolean;
|
|
4329
4361
|
/**
|
|
4330
4362
|
* Disable Remote Control (claude.ai/code, `claude remote-control`, `--remote-control`/`--rc`, auto-start, and the in-session toggle). Typically set in managed settings.
|
|
4331
4363
|
*/
|
|
@@ -5273,6 +5305,10 @@ export declare interface Settings {
|
|
|
5273
5305
|
*/
|
|
5274
5306
|
startDirectory?: string;
|
|
5275
5307
|
}[];
|
|
5308
|
+
/**
|
|
5309
|
+
* CLAUDE.md-style instructions injected as organization-managed memory. Only honored from managed/policy settings.
|
|
5310
|
+
*/
|
|
5311
|
+
claudeMd?: string;
|
|
5276
5312
|
/**
|
|
5277
5313
|
* Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "** /code/CLAUDE.md", "** /some-dir/.claude/rules/**"
|
|
5278
5314
|
*/
|