@anthropic-ai/claude-agent-sdk 0.2.90 → 0.2.92
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 +47 -47
- package/browser-sdk.js +28 -28
- package/cli.js +2450 -2423
- package/extractFromBunfs.js +1 -1
- 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 +37 -5
- package/sdk.mjs +33 -33
- package/bun.lock +0 -21
package/extractFromBunfs.js
CHANGED
package/manifest.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-04-
|
|
2
|
+
"version": "2.1.92",
|
|
3
|
+
"buildDate": "2026-04-03T23:31:32Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "6d1b9657727dce81332b3cda11bfe0a8c83e2392e3c062a31022e10b0e71cdd1",
|
|
8
|
+
"size": 198736976
|
|
9
9
|
},
|
|
10
10
|
"darwin-x64": {
|
|
11
11
|
"binary": "claude",
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "d422b5cc974b3bc4b28f698144fd0316f3e17774babe0bc1eb76c2bb0858d0aa",
|
|
13
|
+
"size": 200226896
|
|
14
14
|
},
|
|
15
15
|
"linux-arm64": {
|
|
16
16
|
"binary": "claude",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "08deb3d56477496eb92e624f492e25b123f4527dd5674f71afff58a48eccd953",
|
|
18
|
+
"size": 231082560
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
21
|
"binary": "claude",
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "e22324514967ff2d5e9f91f0ee37e4675bf8b6dfec27fafb19cb25cc5b23fcaf",
|
|
23
|
+
"size": 230787712
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64-musl": {
|
|
26
26
|
"binary": "claude",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "d0163f8857511b8f9dad7de1f072de2ca8c4e881d006b3b43525af3534050ae3",
|
|
28
|
+
"size": 224201152
|
|
29
29
|
},
|
|
30
30
|
"linux-x64-musl": {
|
|
31
31
|
"binary": "claude",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "e0f4a300ff9d0d9cb9c3ee37c706a9db239e3bbce96118245196ae6bc1b0492e",
|
|
33
|
+
"size": 225102272
|
|
34
34
|
},
|
|
35
35
|
"win32-x64": {
|
|
36
36
|
"binary": "claude.exe",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "ebd9007c464d912593418f133a61d9f24866428530a81e88e910a24823066415",
|
|
38
|
+
"size": 240482464
|
|
39
39
|
},
|
|
40
40
|
"win32-arm64": {
|
|
41
41
|
"binary": "claude.exe",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "c258bce79aefac609f909e5abde92d1653bcef47d3577656d299d1d56f1604bb",
|
|
43
|
+
"size": 237192864
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-04-
|
|
2
|
+
"version": "2.1.92",
|
|
3
|
+
"buildDate": "2026-04-03T23:31:33Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude.zst",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "6fec908f28273216d437bbcf34fcc1b3bc9eb7e1c4c492b3c075f522bf4f8fc1",
|
|
8
|
+
"size": 41115236,
|
|
9
9
|
"bundle": {
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "d9bfbe986a1d42644ff2d30bb341bc8e6358f8f986cba357b96f0c80474e6f89",
|
|
11
|
+
"size": 41118218
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"darwin-x64": {
|
|
15
15
|
"binary": "claude.zst",
|
|
16
|
-
"checksum": "
|
|
17
|
-
"size":
|
|
16
|
+
"checksum": "008d6b8ea1d155f010d9528e9857af55fc5e6867bef86d1a33ebf50c9dbd6130",
|
|
17
|
+
"size": 42773458,
|
|
18
18
|
"bundle": {
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "96d90798abed3b2714f0efe564c9deebc1a55c1934aeeb5576f04101d537ed6e",
|
|
20
|
+
"size": 42770032
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"linux-arm64": {
|
|
24
24
|
"binary": "claude.zst",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "c2f7369888de4c14205925fd3ea1ecda6c81307a766a5ba04abc18df5421984d",
|
|
26
|
+
"size": 50781363
|
|
27
27
|
},
|
|
28
28
|
"linux-x64": {
|
|
29
29
|
"binary": "claude.zst",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "f0b025b64553501b6456cd0ef15ad57818be1088cf77de14f323d6660354ca10",
|
|
31
|
+
"size": 51333715
|
|
32
32
|
},
|
|
33
33
|
"linux-arm64-musl": {
|
|
34
34
|
"binary": "claude.zst",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "a1b7206b9f7dd9d8d34ca4b4e89d8d1c53a568d0b20533ddb3f602329f6b0792",
|
|
36
|
+
"size": 49456613
|
|
37
37
|
},
|
|
38
38
|
"linux-x64-musl": {
|
|
39
39
|
"binary": "claude.zst",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "b6ecf226171ddc90293088d618970d5c83e23f47e5dae1e7dbfebbf57135b01d",
|
|
41
|
+
"size": 50030440
|
|
42
42
|
},
|
|
43
43
|
"win32-x64": {
|
|
44
44
|
"binary": "claude.exe.zst",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "ec1b0d5dcefe9301ae26e8588aa691d6b9c5fa80f87360f76ec574233f4f624c",
|
|
46
|
+
"size": 52979934
|
|
47
47
|
},
|
|
48
48
|
"win32-arm64": {
|
|
49
49
|
"binary": "claude.exe.zst",
|
|
50
|
-
"checksum": "
|
|
51
|
-
"size":
|
|
50
|
+
"checksum": "b393cb9169e6907443522ffc5e9951325f244ac19f987c3b99e8e6b815e6c5b0",
|
|
51
|
+
"size": 51162683
|
|
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.92",
|
|
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.92"
|
|
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
|
@@ -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
|
*/
|
|
@@ -3777,6 +3790,10 @@ export declare interface Settings {
|
|
|
3777
3790
|
* Organization UUID to require for OAuth login. Accepts a single UUID string or an array of UUIDs (any one is permitted). When set in managed settings, login fails if the authenticated account does not belong to a listed organization.
|
|
3778
3791
|
*/
|
|
3779
3792
|
forceLoginOrgUUID?: string | string[];
|
|
3793
|
+
/**
|
|
3794
|
+
* When set in managed settings, the CLI blocks startup until remote managed settings are freshly fetched, and exits if the fetch fails
|
|
3795
|
+
*/
|
|
3796
|
+
forceRemoteSettingsRefresh?: boolean;
|
|
3780
3797
|
/**
|
|
3781
3798
|
* Path to a script that outputs OpenTelemetry headers
|
|
3782
3799
|
*/
|
|
@@ -3974,6 +3991,16 @@ export declare interface Settings {
|
|
|
3974
3991
|
* Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/
|
|
3975
3992
|
*/
|
|
3976
3993
|
plansDirectory?: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* Autonomous background operation configuration
|
|
3996
|
+
*/
|
|
3997
|
+
proactive?: {
|
|
3998
|
+
/**
|
|
3999
|
+
* When true, autonomous background operation is activated automatically at launch (if entitled). When false or null, the user must opt in via the /proactive command or --proactive flag. Existing entitlement gates (GrowthBook flag, ZDR, managed-settings) still apply.
|
|
4000
|
+
*/
|
|
4001
|
+
autoEnable?: boolean | null;
|
|
4002
|
+
};
|
|
4003
|
+
|
|
3977
4004
|
/**
|
|
3978
4005
|
* Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels.
|
|
3979
4006
|
*/
|
|
@@ -4231,6 +4258,11 @@ export declare type TeammateIdleHookInput = BaseHookInput & {
|
|
|
4231
4258
|
team_name: string;
|
|
4232
4259
|
};
|
|
4233
4260
|
|
|
4261
|
+
/**
|
|
4262
|
+
* Why the query loop terminated. Unset when the loop was bypassed (local slash command) or interrupted externally (budget/retry limits checked between yields).
|
|
4263
|
+
*/
|
|
4264
|
+
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';
|
|
4265
|
+
|
|
4234
4266
|
/**
|
|
4235
4267
|
* Claude decides when and how much to think (Opus 4.6+).
|
|
4236
4268
|
*/
|