@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/assistant.mjs +107 -105
- package/bridge.mjs +88 -86
- package/browser-sdk.js +2 -2
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +1 -1
- package/sdk.d.ts +44 -4
- package/sdk.mjs +47 -47
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-05-
|
|
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": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "94a81554195edc33c2587f106bfc2e301f450f52a05cbfaed8b20f6f0882697c",
|
|
9
|
+
"size": 211584672
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "91f5a6364d8899860b20c348142fa66e18ee380e6d379b35e3d26b643603c612",
|
|
14
|
+
"size": 214082320
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "c7b5b050f9a4cebdc1b369935d3f64078b587b869ae8789c06c437c559d6bb2b",
|
|
19
|
+
"size": 236959368
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "d3e134bf504d6ff7db68d0a6f2206c9a15a6d2f94053845116f3303b0a0d79d4",
|
|
24
|
+
"size": 237037264
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "060f28ad7857553716a97f9847ea19fb3a6fa3713ba9ed95d9a3ebda19f1ab2e",
|
|
29
|
+
"size": 229814104
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "d336583d6d65f072dea9ea1874eceb6a25db15c893969b60da0ed3ffa4f0777a",
|
|
34
|
+
"size": 231431216
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "1fd537873b6f2573d48be5fef95ae5ae42f8d837b64ee102f36b151de2ff7b79",
|
|
39
|
+
"size": 232828064
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
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.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-05-
|
|
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": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "d44b2eafc9047aaaa9e33b215801f67a830966e9345dcb8b5d6d7fda246ff98c",
|
|
9
|
+
"size": 43820535,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "ca64c67307c9dfd35d808ba34e80fb7afc0a8172b6853dbd739fbf9578b5f96d",
|
|
12
|
+
"size": 43815620
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "12eeb0200fc60d6ced6d566d7581ca3a2903ded2937a78466b6330c09c31f749",
|
|
18
|
+
"size": 45727099,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "9d3a1da8e687e8499da944e779d0176b8aec5b094479b6b54a9657ce31d70f87",
|
|
21
|
+
"size": 45738513
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "03ac9583ff487f084144121f39305b41ce09e6751496fa1b27aaae134ec2f801",
|
|
27
|
+
"size": 51548280
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "db95687a8ade4f38641c5fa29b0a8d0bb87064092aba869eb7d890885b27be63",
|
|
32
|
+
"size": 52179875
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "f1c0cf829c0abc8d359eca21b1f8317a5014dcce345138535d38cbbd6a90c141",
|
|
37
|
+
"size": 50160745
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "5c55ba03b368484f94ddb906983652842d607cf8e19c4a293870ad011bd230a0",
|
|
42
|
+
"size": 50896557
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "1bdd36b4f0503f460eac798199f4b36fd809a2c71d6e5d056073f45953e3bb4d",
|
|
47
|
+
"size": 52896816
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
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.
|
|
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.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.
|
|
67
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.
|
|
68
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.
|
|
69
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.
|
|
70
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.
|
|
71
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.
|
|
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.
|
|
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,
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
|