@anthropic-ai/claude-agent-sdk 0.3.145 → 0.3.147

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,47 +1,47 @@
1
1
  {
2
- "version": "2.1.145",
3
- "commit": "daa4c3755d45ab0cf97bb41db8c03bd2dfd2ff5f",
4
- "buildDate": "2026-05-19T01:56:17Z",
2
+ "version": "2.1.147",
3
+ "commit": "09432314e83522f23b42b184fb69f0a4bb8a80e0",
4
+ "buildDate": "2026-05-21T16:18:26Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "368dcd9709c85534f673071e7cc8eb5422bcff367fb9bdf5ce25d9619aab7ef5",
9
- "size": 208546464
8
+ "checksum": "94a81554195edc33c2587f106bfc2e301f450f52a05cbfaed8b20f6f0882697c",
9
+ "size": 211584672
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "c23dc566214279d0708f4212261f023d8e63d5af5aef91638ebfdc090b3e33de",
14
- "size": 211044112
13
+ "checksum": "91f5a6364d8899860b20c348142fa66e18ee380e6d379b35e3d26b643603c612",
14
+ "size": 214082320
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "75ad61d690d79440c82b5841444e1b42caae55736af37c97dd0e068ef20ce390",
19
- "size": 233944712
18
+ "checksum": "c7b5b050f9a4cebdc1b369935d3f64078b587b869ae8789c06c437c559d6bb2b",
19
+ "size": 236959368
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "b3ffbc12689bfe81389d6577787fcea4cab81bd3b6bba9b719e73770b62d720e",
24
- "size": 234022608
23
+ "checksum": "d3e134bf504d6ff7db68d0a6f2206c9a15a6d2f94053845116f3303b0a0d79d4",
24
+ "size": 237037264
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "3a73f058b2225a4210931362bc9c98e486e3362ca28b339281755737fb375c7c",
29
- "size": 226799448
28
+ "checksum": "060f28ad7857553716a97f9847ea19fb3a6fa3713ba9ed95d9a3ebda19f1ab2e",
29
+ "size": 229814104
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "cfc95961a41329204405c4b0e257cb467821133eb7bdb1ca0866dfe789d5d442",
34
- "size": 228416560
33
+ "checksum": "d336583d6d65f072dea9ea1874eceb6a25db15c893969b60da0ed3ffa4f0777a",
34
+ "size": 231431216
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "1da511cee5d3a4968634174498e9148635a5908d7f6ea5ec91b04d531c20c3bc",
39
- "size": 229910176
38
+ "checksum": "1fd537873b6f2573d48be5fef95ae5ae42f8d837b64ee102f36b151de2ff7b79",
39
+ "size": 232828064
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "b6b920c757e08ff3e4f0dc211360ad7815db539d4915bb691e57ee4d34db31e5",
44
- "size": 225875616
43
+ "checksum": "3bb2d495a87df058cae050400c8815994fe6a50413ad12f726d36fd583ad362e",
44
+ "size": 228793504
45
45
  }
46
46
  }
47
47
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.145",
3
- "commit": "daa4c3755d45ab0cf97bb41db8c03bd2dfd2ff5f",
4
- "buildDate": "2026-05-19T02:03:37Z",
2
+ "version": "2.1.147",
3
+ "commit": "09432314e83522f23b42b184fb69f0a4bb8a80e0",
4
+ "buildDate": "2026-05-21T16:25:55Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "7bedcf3a0a6e2f79b3b0008e7a056984a47a30747cc4ef988dd6d7095cff5c2c",
9
- "size": 43195831,
8
+ "checksum": "d44b2eafc9047aaaa9e33b215801f67a830966e9345dcb8b5d6d7fda246ff98c",
9
+ "size": 43820535,
10
10
  "bundle": {
11
- "checksum": "815e4f3505e2b005a9510a9427846b5fe55cf0702aa838eb293315133ea3376f",
12
- "size": 43200202
11
+ "checksum": "ca64c67307c9dfd35d808ba34e80fb7afc0a8172b6853dbd739fbf9578b5f96d",
12
+ "size": 43815620
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "3ba937418f3f2e2155b45e330d2f5d75f09bceb6e3cefc3a6b314e6c806f05e6",
18
- "size": 45109754,
17
+ "checksum": "12eeb0200fc60d6ced6d566d7581ca3a2903ded2937a78466b6330c09c31f749",
18
+ "size": 45727099,
19
19
  "bundle": {
20
- "checksum": "c936efab1b00100fb114c2a82c79ac23b9948610adc26b99579ef65606a717ef",
21
- "size": 45119954
20
+ "checksum": "9d3a1da8e687e8499da944e779d0176b8aec5b094479b6b54a9657ce31d70f87",
21
+ "size": 45738513
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "7bffc295920723dd531ff9937f6dd6e953ac52051d643df69d5aa29cd7d87584",
27
- "size": 50982967
26
+ "checksum": "03ac9583ff487f084144121f39305b41ce09e6751496fa1b27aaae134ec2f801",
27
+ "size": 51548280
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "5ba6f8e411bd4aa8a967818a5deece65e74ea2c99bb08adf20554070ebdff6db",
32
- "size": 51607210
31
+ "checksum": "db95687a8ade4f38641c5fa29b0a8d0bb87064092aba869eb7d890885b27be63",
32
+ "size": 52179875
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "1e6e9ddba6e57144b3700a318f944308bfe0887db7c50445e2dc4c912a7b1c20",
37
- "size": 49605775
36
+ "checksum": "f1c0cf829c0abc8d359eca21b1f8317a5014dcce345138535d38cbbd6a90c141",
37
+ "size": 50160745
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "a14758fa127cc8d02df3f63146e8e6b819252ee3f8618095ab26e6b703b3042e",
42
- "size": 50320268
41
+ "checksum": "5c55ba03b368484f94ddb906983652842d607cf8e19c4a293870ad011bd230a0",
42
+ "size": 50896557
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "2e359b72a4e8a74e6c2059bd469fb9a7ecc73427f3666ad3b748fd86e01e58a4",
47
- "size": 52313300
46
+ "checksum": "1bdd36b4f0503f460eac798199f4b36fd809a2c71d6e5d056073f45953e3bb4d",
47
+ "size": 52896816
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "86c1464594dafb9126204a9d853610ba67d85cecdcdbee222e76ec6e8f01c070",
52
- "size": 50612912
51
+ "checksum": "ae4ecb6941a62d52084ee3ce7998645bfffa820a0dd447de36e8a574d3c505b6",
52
+ "size": 51172676
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.3.145",
3
+ "version": "0.3.147",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -61,14 +61,14 @@
61
61
  "zod": "^4.0.0"
62
62
  },
63
63
  "optionalDependencies": {
64
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.145",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.145",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.145",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.145",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.145",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.145",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.145",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.145"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.147",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.147",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.147",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.147",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.147",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.147",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.147",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.147"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -86,5 +86,5 @@
86
86
  "manifest.json",
87
87
  "manifest.zst.json"
88
88
  ],
89
- "claudeCodeVersion": "2.1.145"
89
+ "claudeCodeVersion": "2.1.147"
90
90
  }
package/sdk-tools.d.ts CHANGED
@@ -314,7 +314,7 @@ export interface AgentInput {
314
314
  /**
315
315
  * Permission mode for spawned teammate (e.g., "plan" to require plan approval).
316
316
  */
317
- mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan";
317
+ mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan" | "bubble";
318
318
  /**
319
319
  * Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.
320
320
  */
package/sdk.d.ts CHANGED
@@ -988,6 +988,10 @@ export declare type McpClaudeAIProxyServerConfig = {
988
988
  type: 'claudeai-proxy';
989
989
  url: string;
990
990
  id: string;
991
+ /**
992
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
993
+ */
994
+ timeout?: number;
991
995
  };
992
996
 
993
997
  export declare type McpHttpServerConfig = {
@@ -995,6 +999,10 @@ export declare type McpHttpServerConfig = {
995
999
  url: string;
996
1000
  headers?: Record<string, string>;
997
1001
  tools?: McpServerToolPolicy[];
1002
+ /**
1003
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1004
+ */
1005
+ timeout?: number;
998
1006
  /**
999
1007
  * When true, all tools from this server are always included in the prompt and never deferred behind tool search. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1000
1008
  */
@@ -1101,6 +1109,10 @@ export declare type McpSSEServerConfig = {
1101
1109
  url: string;
1102
1110
  headers?: Record<string, string>;
1103
1111
  tools?: McpServerToolPolicy[];
1112
+ /**
1113
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1114
+ */
1115
+ timeout?: number;
1104
1116
  /**
1105
1117
  * When true, all tools from this server are always included in the prompt and never deferred behind tool search. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1106
1118
  */
@@ -1113,6 +1125,10 @@ export declare type McpStdioServerConfig = {
1113
1125
  command: string;
1114
1126
  args?: string[];
1115
1127
  env?: Record<string, string>;
1128
+ /**
1129
+ * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Floored at 1000ms.
1130
+ */
1131
+ timeout?: number;
1116
1132
  /**
1117
1133
  * When true, all tools from this server are always included in the prompt and never deferred behind tool search. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1118
1134
  */
@@ -1871,6 +1887,9 @@ export declare type Options = {
1871
1887
  * spawnClaudeCodeProcess: (options) => {
1872
1888
  * // Custom spawn logic for VM execution
1873
1889
  * // options contains: command, args, cwd, env, signal
1890
+ * // `signal` is forwarded — it aborts only AFTER the SDK's
1891
+ * // stdin-EOF + ~2 s grace window, so passing it to spawn()/your
1892
+ * // VM API is safe (force-kill fires after the graceful chance).
1874
1893
  * return myVMProcess; // Must satisfy SpawnedProcess interface
1875
1894
  * }
1876
1895
  * ```
@@ -3202,12 +3221,12 @@ export declare type SDKMemoryRecallMessage = {
3202
3221
  mode: 'select' | 'synthesize';
3203
3222
  memories: {
3204
3223
  /**
3205
- * Absolute path to the memory file, or a synthesis sentinel of the form `<synthesis:DIR>` when mode is 'synthesize'.
3224
+ * Absolute path to the memory file, a synthesis sentinel of the form `<synthesis:DIR>` when mode is 'synthesize', or an https URL when scope is 'organization'.
3206
3225
  */
3207
3226
  path: string;
3208
- scope: 'personal' | 'team';
3227
+ scope: 'personal' | 'team' | 'organization';
3209
3228
  /**
3210
- * Synthesis paragraph. Only present when mode is 'synthesize'; always absent for 'select' (renderers lazy-load from path).
3229
+ * The surfaced memory body. Always present for 'synthesize' mode and 'organization' scope (neither has an on-disk path to lazy-load from); absent for file-backed 'select' entries (renderers lazy-load from path).
3211
3230
  */
3212
3231
  content?: string;
3213
3232
  }[];
@@ -5498,7 +5517,28 @@ export declare interface SpawnOptions {
5498
5517
  env: {
5499
5518
  [envVar: string]: string | undefined;
5500
5519
  };
5501
- /** Abort signal for cancellation */
5520
+ /**
5521
+ * Abort signal for cancellation.
5522
+ *
5523
+ * This is a **forwarded** signal owned by `ProcessTransport`, not the
5524
+ * caller's `Options.abortController.signal` directly. It aborts only
5525
+ * after the SDK's graceful-close path has run: stdin EOF →
5526
+ * `GRACEFUL_EXIT_TIMEOUT_MS` (~2 s) grace window. Anything you hang on
5527
+ * it (Node `spawn({signal})` → `child.kill()`, VM/container teardown,
5528
+ * fetch cancellation) fires **after** the child has had a chance to
5529
+ * shut down cleanly via stdin close.
5530
+ *
5531
+ * Why: passing the caller's raw signal to Node `spawn()` registers
5532
+ * Node's own abort listener that calls `child.kill()` — on Windows
5533
+ * that's `TerminateProcess` (instant, uncatchable), and AbortSignal
5534
+ * listeners fire synchronously in registration order, so it would race
5535
+ * ahead of the SDK's stdin-EOF + grace path and the CLI's
5536
+ * `gracefulShutdown` would never run.
5537
+ *
5538
+ * If you need the caller's *immediate* signal (no grace), it's the
5539
+ * `AbortController` you passed to `Options.abortController` — capture
5540
+ * it in closure.
5541
+ */
5502
5542
  signal: AbortSignal;
5503
5543
  }
5504
5544