@anthropic-ai/claude-agent-sdk 0.2.120 → 0.2.121
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 +93 -93
- package/bridge.mjs +67 -67
- package/browser-sdk.js +39 -39
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk.d.ts +43 -2
- package/sdk.mjs +40 -40
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-04-
|
|
2
|
+
"version": "2.1.121",
|
|
3
|
+
"commit": "16ffea721a0a39bc787a236dc19fb62307180b75",
|
|
4
|
+
"buildDate": "2026-04-27T01:51:03Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "3810e55d47ed4d413de6dc037e34d58948f779a4c6bdeeacf1748d850c5daad6",
|
|
9
|
+
"size": 215417984
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "59d817dde54eeef0d752e7bd3869586e6eb5fa2b1d785c06fb9cda8804166037",
|
|
14
|
+
"size": 216982224
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "71b78e6364f97a227b17be40dfcc237461f8d2b1d109444d24b42af0fdefac31",
|
|
19
|
+
"size": 247466560
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "b4b684bbcb3a88029ec419dbc08824b2f3c69656a0aa2374860f9525fc67c98f",
|
|
24
|
+
"size": 247265920
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "2f8e2a81f7d41a9cf3e9269fb3237df968194cc7bf8ba478392cd5217d55e8d1",
|
|
29
|
+
"size": 240191872
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "d5ad436e256291df5e2248d1026a971229dde43544db3267892afd5c89934eb1",
|
|
34
|
+
"size": 241531264
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "0a85980a38e9d8fbb2ba51f1d27c3425c7870f75e053ae4be266d23e10edde4a",
|
|
39
|
+
"size": 253241504
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "9c9e1c68d50bb80f5e8d4a91645f042d4802a4fb0f87c34a504ecbb69a54860a",
|
|
44
|
+
"size": 249304224
|
|
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-04-
|
|
2
|
+
"version": "2.1.121",
|
|
3
|
+
"commit": "16ffea721a0a39bc787a236dc19fb62307180b75",
|
|
4
|
+
"buildDate": "2026-04-27T01:58:07Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "794387f97195b7aff15193e88a260ea8718213c7f1a50ce6165bed77af435d3d",
|
|
9
|
+
"size": 44532566,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "54cb26c375f61ff3d4f6ed57e91135d324c2bd13186788fd0ac95b6882c6c103",
|
|
12
|
+
"size": 44529587
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "8c4163a2647a0da489ed7ccb78408f90603913f7b821e098b794c6ad60ba8985",
|
|
18
|
+
"size": 46240905,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "0afd90ee954cde23a1e8d53ffb4479bb327e82dec3605afb0b718f5a8d7e2f02",
|
|
21
|
+
"size": 46246963
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "ebdb26ee2f63a2f0fa3da7b4e5acdb313a91648400f5e7ef89148761f6eb905d",
|
|
27
|
+
"size": 54069121
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "49ab2b321de1c278d510129856bfd8c9ab735d5eb27496baf4d6c2159875eaa4",
|
|
32
|
+
"size": 54642591
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "3487670ab9fc8918240e025d177e7cb56559efd1fb1056782c8701736ee07345",
|
|
37
|
+
"size": 52700328
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "dac2d3b20520dd3a7308074ff779f0981bc7caec07c853725898aae532b22db2",
|
|
42
|
+
"size": 53385809
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "c40e505e1b90c631fb48cf060eee43da12a4be1030735c5cd6e4c0c387b2eafc",
|
|
47
|
+
"size": 55720411
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "00c14cbbf8ab6a7711d8c3ec5e04466d16e841fccead240b75e581e6442ea39d",
|
|
52
|
+
"size": 53850938
|
|
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.2.
|
|
3
|
+
"version": "0.2.121",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"zod": "^4.0.0"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.
|
|
59
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.
|
|
60
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.
|
|
61
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.
|
|
62
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.
|
|
63
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.
|
|
64
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.
|
|
58
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.121",
|
|
59
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.121",
|
|
60
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.121",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.121",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.121",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.121",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.121",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.121"
|
|
66
66
|
},
|
|
67
67
|
"files": [
|
|
68
68
|
"sdk.mjs",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"manifest.json",
|
|
79
79
|
"manifest.zst.json"
|
|
80
80
|
],
|
|
81
|
-
"claudeCodeVersion": "2.1.
|
|
81
|
+
"claudeCodeVersion": "2.1.121"
|
|
82
82
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -424,6 +424,14 @@ declare type CreateSdkMcpServerOptions = {
|
|
|
424
424
|
name: string;
|
|
425
425
|
version?: string;
|
|
426
426
|
tools?: Array<SdkMcpToolDefinition<any>>;
|
|
427
|
+
/**
|
|
428
|
+
* When true, all tools from this server are always included in the prompt
|
|
429
|
+
* and never deferred behind tool search. Applied via
|
|
430
|
+
* `_meta['anthropic/alwaysLoad']` on each tool. Equivalent to
|
|
431
|
+
* `defer_loading: false` on the API. Per-tool `tool({ alwaysLoad })` still
|
|
432
|
+
* works and is OR'd with this.
|
|
433
|
+
*/
|
|
434
|
+
alwaysLoad?: boolean;
|
|
427
435
|
};
|
|
428
436
|
|
|
429
437
|
export declare type CwdChangedHookInput = BaseHookInput & {
|
|
@@ -928,6 +936,10 @@ export declare type McpHttpServerConfig = {
|
|
|
928
936
|
url: string;
|
|
929
937
|
headers?: Record<string, string>;
|
|
930
938
|
tools?: McpServerToolPolicy[];
|
|
939
|
+
/**
|
|
940
|
+
* 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.
|
|
941
|
+
*/
|
|
942
|
+
alwaysLoad?: boolean;
|
|
931
943
|
};
|
|
932
944
|
|
|
933
945
|
export declare type McpSdkServerConfig = {
|
|
@@ -1029,6 +1041,10 @@ export declare type McpSSEServerConfig = {
|
|
|
1029
1041
|
url: string;
|
|
1030
1042
|
headers?: Record<string, string>;
|
|
1031
1043
|
tools?: McpServerToolPolicy[];
|
|
1044
|
+
/**
|
|
1045
|
+
* 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.
|
|
1046
|
+
*/
|
|
1047
|
+
alwaysLoad?: boolean;
|
|
1032
1048
|
};
|
|
1033
1049
|
|
|
1034
1050
|
export declare type McpStdioServerConfig = {
|
|
@@ -1036,6 +1052,10 @@ export declare type McpStdioServerConfig = {
|
|
|
1036
1052
|
command: string;
|
|
1037
1053
|
args?: string[];
|
|
1038
1054
|
env?: Record<string, string>;
|
|
1055
|
+
/**
|
|
1056
|
+
* 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.
|
|
1057
|
+
*/
|
|
1058
|
+
alwaysLoad?: boolean;
|
|
1039
1059
|
};
|
|
1040
1060
|
|
|
1041
1061
|
/**
|
|
@@ -1917,6 +1937,13 @@ export declare type PostToolUseHookInput = BaseHookInput & {
|
|
|
1917
1937
|
export declare type PostToolUseHookSpecificOutput = {
|
|
1918
1938
|
hookEventName: 'PostToolUse';
|
|
1919
1939
|
additionalContext?: string;
|
|
1940
|
+
/**
|
|
1941
|
+
* Replaces the tool output before it is sent to the model
|
|
1942
|
+
*/
|
|
1943
|
+
updatedToolOutput?: unknown;
|
|
1944
|
+
/**
|
|
1945
|
+
* Replaces the output for MCP tools only. Prefer updatedToolOutput, which works for all tools
|
|
1946
|
+
*/
|
|
1920
1947
|
updatedMCPToolOutput?: unknown;
|
|
1921
1948
|
};
|
|
1922
1949
|
|
|
@@ -2086,10 +2113,12 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2086
2113
|
* denial, missing file, or transport error.
|
|
2087
2114
|
*
|
|
2088
2115
|
* @param path - File path (relative to cwd or absolute)
|
|
2089
|
-
* @param options - Optional maxBytes cap (default 1MB)
|
|
2116
|
+
* @param options - Optional maxBytes cap (default 1MB) and encoding
|
|
2117
|
+
* (default utf-8; pass 'base64' for binary files like images)
|
|
2090
2118
|
*/
|
|
2091
2119
|
readFile(path: string, options?: {
|
|
2092
2120
|
maxBytes?: number;
|
|
2121
|
+
encoding?: 'utf-8' | 'base64';
|
|
2093
2122
|
}): Promise<SDKControlReadFileResponse | null>;
|
|
2094
2123
|
/**
|
|
2095
2124
|
* Reload plugins from disk and return the refreshed commands, agents,
|
|
@@ -2666,6 +2695,10 @@ declare type SDKControlReadFileRequest = {
|
|
|
2666
2695
|
subtype: 'read_file';
|
|
2667
2696
|
path: string;
|
|
2668
2697
|
max_bytes?: number;
|
|
2698
|
+
/**
|
|
2699
|
+
* How to encode the bytes in `contents`. Defaults to utf-8 (lossy for binary); pass 'base64' to read images.
|
|
2700
|
+
*/
|
|
2701
|
+
encoding?: 'utf-8' | 'base64';
|
|
2669
2702
|
};
|
|
2670
2703
|
|
|
2671
2704
|
/**
|
|
@@ -2675,6 +2708,10 @@ export declare type SDKControlReadFileResponse = {
|
|
|
2675
2708
|
contents: string;
|
|
2676
2709
|
absPath: string;
|
|
2677
2710
|
truncated?: boolean;
|
|
2711
|
+
/**
|
|
2712
|
+
* Set when the request asked for base64. Absent means utf-8 — including when an older CLI ignored the request's encoding field.
|
|
2713
|
+
*/
|
|
2714
|
+
encoding?: 'base64';
|
|
2678
2715
|
};
|
|
2679
2716
|
|
|
2680
2717
|
/**
|
|
@@ -4072,6 +4109,10 @@ export declare interface Settings {
|
|
|
4072
4109
|
* Disable all hooks and statusLine execution
|
|
4073
4110
|
*/
|
|
4074
4111
|
disableAllHooks?: boolean;
|
|
4112
|
+
/**
|
|
4113
|
+
* Disable the background-agents fleet (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENTS_FLEET=1.
|
|
4114
|
+
*/
|
|
4115
|
+
disableBackgroundAgents?: boolean;
|
|
4075
4116
|
/**
|
|
4076
4117
|
* 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.
|
|
4077
4118
|
*/
|
|
@@ -5063,7 +5104,7 @@ export declare interface Settings {
|
|
|
5063
5104
|
*/
|
|
5064
5105
|
remoteControlAtStartup?: boolean;
|
|
5065
5106
|
/**
|
|
5066
|
-
* When no background
|
|
5107
|
+
* When no background service is running: 'transient' spawns one for this login session; 'ask' offers to install it persistently
|
|
5067
5108
|
*/
|
|
5068
5109
|
daemonColdStart?: 'transient' | 'ask';
|
|
5069
5110
|
/**
|