@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.
@@ -13,8 +13,8 @@ import {
13
13
  renameSync,
14
14
  writeFileSync,
15
15
  } from 'fs'
16
- import { tmpdir } from 'os'
17
16
  import { join } from 'path'
17
+ import { tmpdir } from './tempfile.js'
18
18
 
19
19
  /**
20
20
  * If `embeddedPath` is inside Bun's $bunfs virtual filesystem, extract it to a
package/manifest.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "version": "2.1.90",
3
- "buildDate": "2026-04-01T22:59:02Z",
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": "73c1a7570501ca743cd2d7467cb4699103534a2138052a4e6cab53c0e09d79c8",
8
- "size": 197828752
7
+ "checksum": "6d1b9657727dce81332b3cda11bfe0a8c83e2392e3c062a31022e10b0e71cdd1",
8
+ "size": 198736976
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude",
12
- "checksum": "9934675063ea4360665b7a43f649c92e6ba5cf93257324af7af1a6b490746395",
13
- "size": 199326928
12
+ "checksum": "d422b5cc974b3bc4b28f698144fd0316f3e17774babe0bc1eb76c2bb0858d0aa",
13
+ "size": 200226896
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude",
17
- "checksum": "15d5089ee7d9981faacf5463eabd427a012814d9fc02113883bb23a4f387ad4a",
18
- "size": 230165056
17
+ "checksum": "08deb3d56477496eb92e624f492e25b123f4527dd5674f71afff58a48eccd953",
18
+ "size": 231082560
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude",
22
- "checksum": "6074e3959989b2958a9abec60adf7b441a0f6f1c7e66401abff0fe54dad04fd6",
23
- "size": 229902976
22
+ "checksum": "e22324514967ff2d5e9f91f0ee37e4675bf8b6dfec27fafb19cb25cc5b23fcaf",
23
+ "size": 230787712
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude",
27
- "checksum": "2508fa1c9c0575cf6fa26f2561ff7f0fd83be5fb4c6f9ec8281dfd5911d44371",
28
- "size": 223218112
27
+ "checksum": "d0163f8857511b8f9dad7de1f072de2ca8c4e881d006b3b43525af3534050ae3",
28
+ "size": 224201152
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude",
32
- "checksum": "854746d04db11f543ed8d3836b5316366d965e6b6cfa2ac6312e6f7a5c4b5cb1",
33
- "size": 224201152
32
+ "checksum": "e0f4a300ff9d0d9cb9c3ee37c706a9db239e3bbce96118245196ae6bc1b0492e",
33
+ "size": 225102272
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe",
37
- "checksum": "f6be38fbdcadc373e93f751d1286845f58b032690e32be8f64799380a295a79f",
38
- "size": 239622816
37
+ "checksum": "ebd9007c464d912593418f133a61d9f24866428530a81e88e910a24823066415",
38
+ "size": 240482464
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe",
42
- "checksum": "019f7210055cd7a884d13c4e6a0b6caf1a82348ee42950b7b5247a4b0484709c",
43
- "size": 236335776
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.90",
3
- "buildDate": "2026-04-01T22:59:03Z",
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": "f9e5837c6b1443c8195273693ddcd0e0d36bb1df8869b4a243476fec1cd99353",
8
- "size": 40930381,
7
+ "checksum": "6fec908f28273216d437bbcf34fcc1b3bc9eb7e1c4c492b3c075f522bf4f8fc1",
8
+ "size": 41115236,
9
9
  "bundle": {
10
- "checksum": "af98cac55f19dd7db4c291f42e8c75d34fa7320c00834f3036d2f34133080edd",
11
- "size": 40943366
10
+ "checksum": "d9bfbe986a1d42644ff2d30bb341bc8e6358f8f986cba357b96f0c80474e6f89",
11
+ "size": 41118218
12
12
  }
13
13
  },
14
14
  "darwin-x64": {
15
15
  "binary": "claude.zst",
16
- "checksum": "feba4e7545b1fcf2f5654d7f5e93d513b6866748a5661c723209c3b6e080e999",
17
- "size": 42570760,
16
+ "checksum": "008d6b8ea1d155f010d9528e9857af55fc5e6867bef86d1a33ebf50c9dbd6130",
17
+ "size": 42773458,
18
18
  "bundle": {
19
- "checksum": "f6c5188a6eed2b57e21062e10f02afc4c1f577579c1caf61f16b54c10e34e050",
20
- "size": 42576243
19
+ "checksum": "96d90798abed3b2714f0efe564c9deebc1a55c1934aeeb5576f04101d537ed6e",
20
+ "size": 42770032
21
21
  }
22
22
  },
23
23
  "linux-arm64": {
24
24
  "binary": "claude.zst",
25
- "checksum": "cfaa2f7c288ce59b5b89efa83f1bc20444d019c96317cf97a8fd82d9e484b12c",
26
- "size": 50613437
25
+ "checksum": "c2f7369888de4c14205925fd3ea1ecda6c81307a766a5ba04abc18df5421984d",
26
+ "size": 50781363
27
27
  },
28
28
  "linux-x64": {
29
29
  "binary": "claude.zst",
30
- "checksum": "1d68e9bf6f8d2068c5d846fbedff9c48a71e19e6b28f826ea22a9faf854bdbe7",
31
- "size": 51155944
30
+ "checksum": "f0b025b64553501b6456cd0ef15ad57818be1088cf77de14f323d6660354ca10",
31
+ "size": 51333715
32
32
  },
33
33
  "linux-arm64-musl": {
34
34
  "binary": "claude.zst",
35
- "checksum": "3d5be51b80e0f9296b17c8cde5f1f48691213f628c3dfd95282416d1bbe0e403",
36
- "size": 49270739
35
+ "checksum": "a1b7206b9f7dd9d8d34ca4b4e89d8d1c53a568d0b20533ddb3f602329f6b0792",
36
+ "size": 49456613
37
37
  },
38
38
  "linux-x64-musl": {
39
39
  "binary": "claude.zst",
40
- "checksum": "8821108c6d63c6994ff2118bddc95ce682dc94cce39c71548719aef020042278",
41
- "size": 49863571
40
+ "checksum": "b6ecf226171ddc90293088d618970d5c83e23f47e5dae1e7dbfebbf57135b01d",
41
+ "size": 50030440
42
42
  },
43
43
  "win32-x64": {
44
44
  "binary": "claude.exe.zst",
45
- "checksum": "8297f87c0f5b049c2eab6074ad7cd862c363fb5006ae081d9a60b49736827ab0",
46
- "size": 52814347
45
+ "checksum": "ec1b0d5dcefe9301ae26e8588aa691d6b9c5fa80f87360f76ec574233f4f624c",
46
+ "size": 52979934
47
47
  },
48
48
  "win32-arm64": {
49
49
  "binary": "claude.exe.zst",
50
- "checksum": "b22b93b33b44db2d07a8902a46a1c91386a04771e85e8c4b6b2fc18c10a10f7a",
51
- "size": 50979842
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.90",
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.74.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
- "claudeCodeVersion": "2.1.90"
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
  */