@anthropic-ai/claude-agent-sdk 0.2.89 → 0.2.91
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/bridge.d.ts +21 -4
- package/bridge.mjs +55 -50
- package/browser-sdk.js +24 -24
- package/cli.js +2269 -2127
- package/manifest.json +18 -18
- package/manifest.zst.json +22 -22
- package/package.json +22 -3
- package/sdk-tools.d.ts +1 -1
- package/sdk.d.ts +25 -7
- package/sdk.mjs +32 -31
- package/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/vendor/ripgrep/arm64-linux/rg +0 -0
- package/vendor/ripgrep/x64-darwin/rg +0 -0
- package/vendor/ripgrep/x64-linux/rg +0 -0
- package/bun.lock +0 -21
package/manifest.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-
|
|
2
|
+
"version": "2.1.91",
|
|
3
|
+
"buildDate": "2026-04-02T22:04:30Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "7433d76d3ec5d223a340e21d7a05f3d481d89999f228113168ad5d64c66fd376",
|
|
8
|
+
"size": 198092944
|
|
9
9
|
},
|
|
10
10
|
"darwin-x64": {
|
|
11
11
|
"binary": "claude",
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "47409dc476c199711d5c776cf359773f75cb9dc72ce7494a4e4cb100520e8ab4",
|
|
13
|
+
"size": 199574608
|
|
14
14
|
},
|
|
15
15
|
"linux-arm64": {
|
|
16
16
|
"binary": "claude",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "dddba100b352ea6d06aa7e036d5afe49749edddd1309a4aa22e47049fafcadf9",
|
|
18
|
+
"size": 230427200
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
21
|
"binary": "claude",
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "01b74e1b02e3330940b3526d2f6e00bf32f7fd9e6b3861be6a61e01cfd7296e6",
|
|
23
|
+
"size": 230161024
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64-musl": {
|
|
26
26
|
"binary": "claude",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "3dcaacefb510f6aee3573d35fe65f5dccbbbf4b6fdcca9a5a5455c03556a2f8b",
|
|
28
|
+
"size": 223480256
|
|
29
29
|
},
|
|
30
30
|
"linux-x64-musl": {
|
|
31
31
|
"binary": "claude",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "b05d9447b7d9a4fa92f936b2275ca87db3bada52d8589bf4e4c49d437366942a",
|
|
33
|
+
"size": 224459200
|
|
34
34
|
},
|
|
35
35
|
"win32-x64": {
|
|
36
36
|
"binary": "claude.exe",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "12f69849f6774749718520f41fb94f6fc30779b55d8f9b0acaaf20c755e6b55d",
|
|
38
|
+
"size": 239873184
|
|
39
39
|
},
|
|
40
40
|
"win32-arm64": {
|
|
41
41
|
"binary": "claude.exe",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "389de7f1f2b979cb4098f7752ca0099275cedabcfe3908a9886d143ef594972b",
|
|
43
|
+
"size": 236586144
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-
|
|
2
|
+
"version": "2.1.91",
|
|
3
|
+
"buildDate": "2026-04-02T22:04:31Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude.zst",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "3cbce93101acbf4af55025efc443ed38c3605e48d67b93eff79e8feaeb646ee6",
|
|
8
|
+
"size": 40979083,
|
|
9
9
|
"bundle": {
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "67979609f28865b77c37a57da948d352f23013afe261c3e06668e28f8957f21c",
|
|
11
|
+
"size": 40975507
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"darwin-x64": {
|
|
15
15
|
"binary": "claude.zst",
|
|
16
|
-
"checksum": "
|
|
17
|
-
"size":
|
|
16
|
+
"checksum": "f14816b97af313694ee025a9398e184b5c10b1f83e4b95279c4e9c7e9852650c",
|
|
17
|
+
"size": 42669756,
|
|
18
18
|
"bundle": {
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "04b781dd2d84c67f399d93d6430b58757f8b71bbc2548ea6117c6b246cf98436",
|
|
20
|
+
"size": 42671616
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"linux-arm64": {
|
|
24
24
|
"binary": "claude.zst",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "787c1311934930180f0b4f06dc879c9727cfb12e350f879a62b5d38fc93a0576",
|
|
26
|
+
"size": 50673837
|
|
27
27
|
},
|
|
28
28
|
"linux-x64": {
|
|
29
29
|
"binary": "claude.zst",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "3fe7f8bd1ec9318d90e497fee3c8a9d24390f70efe199cee6b2853b3f4f4b388",
|
|
31
|
+
"size": 51210881
|
|
32
32
|
},
|
|
33
33
|
"linux-arm64-musl": {
|
|
34
34
|
"binary": "claude.zst",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "28a3bd81a6025594397a6defd32aaab09add5d8113e170bd8b8189a019471776",
|
|
36
|
+
"size": 49318919
|
|
37
37
|
},
|
|
38
38
|
"linux-x64-musl": {
|
|
39
39
|
"binary": "claude.zst",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "67a921d74c572f2b673209c3eae8a54c73844a496b719f7ad413427c679e6097",
|
|
41
|
+
"size": 49931358
|
|
42
42
|
},
|
|
43
43
|
"win32-x64": {
|
|
44
44
|
"binary": "claude.exe.zst",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "fcafda7aa8e8d1b29fd188698d4919d99213fbe3a39561679292d5a3e797b480",
|
|
46
|
+
"size": 52880797
|
|
47
47
|
},
|
|
48
48
|
"win32-arm64": {
|
|
49
49
|
"binary": "claude.exe.zst",
|
|
50
|
-
"checksum": "
|
|
51
|
-
"size":
|
|
50
|
+
"checksum": "88af689a81ddb34cdda26be335350afec720de6e41b87180c94ebaaf07059793",
|
|
51
|
+
"size": 51050547
|
|
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.
|
|
3
|
+
"version": "0.2.91",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"code-generation"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@anthropic-ai/sdk": "^0.
|
|
51
|
+
"@anthropic-ai/sdk": "^0.80.0",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.27.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
@@ -65,5 +65,24 @@
|
|
|
65
65
|
"@img/sharp-win32-arm64": "^0.34.2",
|
|
66
66
|
"@img/sharp-win32-x64": "^0.34.2"
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"files": [
|
|
69
|
+
"cli.js",
|
|
70
|
+
"sdk.mjs",
|
|
71
|
+
"sdk.d.ts",
|
|
72
|
+
"sdk-tools.d.ts",
|
|
73
|
+
"agentSdkTypes.d.ts",
|
|
74
|
+
"bridge.mjs",
|
|
75
|
+
"bridge.d.ts",
|
|
76
|
+
"browser-sdk.js",
|
|
77
|
+
"browser-sdk.d.ts",
|
|
78
|
+
"embed.js",
|
|
79
|
+
"embed.d.ts",
|
|
80
|
+
"extractFromBunfs.js",
|
|
81
|
+
"extractFromBunfs.d.ts",
|
|
82
|
+
"manifest.json",
|
|
83
|
+
"manifest.zst.json",
|
|
84
|
+
"vendor/ripgrep/",
|
|
85
|
+
"vendor/audio-capture/"
|
|
86
|
+
],
|
|
87
|
+
"claudeCodeVersion": "2.1.91"
|
|
69
88
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -287,7 +287,7 @@ export interface AgentInput {
|
|
|
287
287
|
/**
|
|
288
288
|
* Permission mode for spawned teammate (e.g., "plan" to require plan approval).
|
|
289
289
|
*/
|
|
290
|
-
mode?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "plan";
|
|
290
|
+
mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan";
|
|
291
291
|
/**
|
|
292
292
|
* Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.
|
|
293
293
|
*/
|
package/sdk.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare type AccountInfo = {
|
|
|
29
29
|
/**
|
|
30
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.).
|
|
31
31
|
*/
|
|
32
|
-
apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry';
|
|
32
|
+
apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws';
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -335,6 +335,7 @@ declare namespace coreTypes {
|
|
|
335
335
|
TaskCompletedHookInput,
|
|
336
336
|
TaskCreatedHookInput,
|
|
337
337
|
TeammateIdleHookInput,
|
|
338
|
+
TerminalReason,
|
|
338
339
|
ThinkingAdaptive,
|
|
339
340
|
ThinkingConfig,
|
|
340
341
|
ThinkingDisabled,
|
|
@@ -1269,6 +1270,12 @@ export declare type Options = {
|
|
|
1269
1270
|
* These sandbox settings control sandbox behavior (enabled, auto-allow, etc.),
|
|
1270
1271
|
* while the actual access restrictions come from your permission configuration.
|
|
1271
1272
|
*
|
|
1273
|
+
* **Dependency check:** When `enabled: true` is passed via this option,
|
|
1274
|
+
* `failIfUnavailable` defaults to `true` — if sandbox dependencies are missing
|
|
1275
|
+
* (e.g. `bubblewrap` on Linux) or the platform is unsupported, `query()` will
|
|
1276
|
+
* emit an error result and exit rather than silently running commands
|
|
1277
|
+
* unsandboxed. Set `failIfUnavailable: false` to allow graceful degradation.
|
|
1278
|
+
*
|
|
1272
1279
|
* @example Enable sandboxing with auto-allow
|
|
1273
1280
|
* ```typescript
|
|
1274
1281
|
* sandbox: {
|
|
@@ -1411,9 +1418,9 @@ export declare type PermissionDeniedHookSpecificOutput = {
|
|
|
1411
1418
|
};
|
|
1412
1419
|
|
|
1413
1420
|
/**
|
|
1414
|
-
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
|
|
1421
|
+
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved. 'auto' - Use a model classifier to approve/deny permission prompts.
|
|
1415
1422
|
*/
|
|
1416
|
-
export declare type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'dontAsk';
|
|
1423
|
+
export declare type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'dontAsk' | 'auto';
|
|
1417
1424
|
|
|
1418
1425
|
export declare type PermissionRequestHookInput = BaseHookInput & {
|
|
1419
1426
|
hook_event_name: 'PermissionRequest';
|
|
@@ -2242,7 +2249,7 @@ declare type SDKControlSetModelRequest = {
|
|
|
2242
2249
|
declare type SDKControlSetPermissionModeRequest = {
|
|
2243
2250
|
subtype: 'set_permission_mode';
|
|
2244
2251
|
/**
|
|
2245
|
-
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
|
|
2252
|
+
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved. 'auto' - Use a model classifier to approve/deny permission prompts.
|
|
2246
2253
|
*/
|
|
2247
2254
|
mode: coreTypes.PermissionMode;
|
|
2248
2255
|
|
|
@@ -2460,6 +2467,7 @@ export declare type SDKResultError = {
|
|
|
2460
2467
|
modelUsage: Record<string, ModelUsage>;
|
|
2461
2468
|
permission_denials: SDKPermissionDenial[];
|
|
2462
2469
|
errors: string[];
|
|
2470
|
+
terminal_reason?: TerminalReason;
|
|
2463
2471
|
fast_mode_state?: FastModeState;
|
|
2464
2472
|
uuid: UUID;
|
|
2465
2473
|
session_id: string;
|
|
@@ -2482,6 +2490,7 @@ export declare type SDKResultSuccess = {
|
|
|
2482
2490
|
permission_denials: SDKPermissionDenial[];
|
|
2483
2491
|
structured_output?: unknown;
|
|
2484
2492
|
deferred_tool_use?: SDKDeferredToolUse;
|
|
2493
|
+
terminal_reason?: TerminalReason;
|
|
2485
2494
|
fast_mode_state?: FastModeState;
|
|
2486
2495
|
uuid: UUID;
|
|
2487
2496
|
session_id: string;
|
|
@@ -2646,7 +2655,7 @@ export declare type SDKSystemMessage = {
|
|
|
2646
2655
|
}[];
|
|
2647
2656
|
model: string;
|
|
2648
2657
|
/**
|
|
2649
|
-
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
|
|
2658
|
+
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved. 'auto' - Use a model classifier to approve/deny permission prompts.
|
|
2650
2659
|
*/
|
|
2651
2660
|
permissionMode: PermissionMode;
|
|
2652
2661
|
slash_commands: string[];
|
|
@@ -2897,7 +2906,7 @@ export declare interface Settings {
|
|
|
2897
2906
|
/**
|
|
2898
2907
|
* Default permission mode when Claude Code needs access
|
|
2899
2908
|
*/
|
|
2900
|
-
defaultMode?: 'acceptEdits' | 'bypassPermissions' | 'default' | 'dontAsk' | 'plan';
|
|
2909
|
+
defaultMode?: 'acceptEdits' | 'auto' | 'bypassPermissions' | 'default' | 'dontAsk' | 'plan';
|
|
2901
2910
|
/**
|
|
2902
2911
|
* Disable the ability to bypass permission prompts
|
|
2903
2912
|
*/
|
|
@@ -3134,6 +3143,10 @@ export declare interface Settings {
|
|
|
3134
3143
|
* Disable all hooks and statusLine execution
|
|
3135
3144
|
*/
|
|
3136
3145
|
disableAllHooks?: boolean;
|
|
3146
|
+
/**
|
|
3147
|
+
* Disable inline shell execution in skills and custom slash commands from user, project, or plugin sources. Commands are replaced with a placeholder instead of being run.
|
|
3148
|
+
*/
|
|
3149
|
+
disableSkillShellExecution?: boolean;
|
|
3137
3150
|
/**
|
|
3138
3151
|
* Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).
|
|
3139
3152
|
*/
|
|
@@ -4147,7 +4160,7 @@ export declare interface SpawnOptions {
|
|
|
4147
4160
|
signal: AbortSignal;
|
|
4148
4161
|
}
|
|
4149
4162
|
|
|
4150
|
-
declare type StdoutMessage = coreTypes.SDKMessage | coreTypes.
|
|
4163
|
+
declare type StdoutMessage = coreTypes.SDKMessage | coreTypes.SDKPostTurnSummaryMessage | SDKControlResponse | SDKControlRequest | SDKControlCancelRequest | SDKKeepAliveMessage;
|
|
4151
4164
|
|
|
4152
4165
|
export declare type StopFailureHookInput = BaseHookInput & {
|
|
4153
4166
|
hook_event_name: 'StopFailure';
|
|
@@ -4231,6 +4244,11 @@ export declare type TeammateIdleHookInput = BaseHookInput & {
|
|
|
4231
4244
|
team_name: string;
|
|
4232
4245
|
};
|
|
4233
4246
|
|
|
4247
|
+
/**
|
|
4248
|
+
* Why the query loop terminated. Unset when the loop was bypassed (local slash command) or interrupted externally (budget/retry limits checked between yields).
|
|
4249
|
+
*/
|
|
4250
|
+
export declare type TerminalReason = 'blocking_limit' | 'rapid_refill_breaker' | 'prompt_too_long' | 'image_error' | 'model_error' | 'aborted_streaming' | 'aborted_tools' | 'stop_hook_prevented' | 'hook_stopped' | 'tool_deferred' | 'max_turns' | 'completed';
|
|
4251
|
+
|
|
4234
4252
|
/**
|
|
4235
4253
|
* Claude decides when and how much to think (Opus 4.6+).
|
|
4236
4254
|
*/
|