@anthropic-ai/claude-agent-sdk 0.3.303 → 0.3.305
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/README.md +1 -1
- package/bridge.mjs +60 -58
- package/browser-sdk.d.ts +17 -0
- package/browser-sdk.js +47 -47
- package/core-3z5ypevg.mjs +40 -0
- package/core-be3nes5v.mjs +27 -0
- package/core-cpeswmq9.mjs +52 -0
- package/core-thy7v25j.mjs +26 -0
- package/core.mjs +11 -18
- package/manifest.json +22 -22
- package/manifest.zst.json +26 -26
- package/package.json +14 -12
- package/sdk.d.ts +143 -4
- package/sdk.mjs +63 -63
- package/core-dmg5st5c.mjs +0 -52
- package/core-gvw0a6et.mjs +0 -35
package/manifest.json
CHANGED
|
@@ -1,54 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.305",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-10-
|
|
4
|
+
"commit": "6e723756d1226ddc2a4fefe5586e02bcc6a0501f",
|
|
5
|
+
"buildDate": "2026-10-20T18:24:45Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "ea3ea3c08d2a9634a4651e687fcf900d410c489bce2b00f22bd7352b91ba704f",
|
|
10
|
+
"size": 272984176
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
13
13
|
"binary": "claude",
|
|
14
|
-
"checksum": "
|
|
15
|
-
"size":
|
|
14
|
+
"checksum": "af7ad8d6d8b1e49059988f6657d91bb8b9feac127bf8bec005c4c27d0093f153",
|
|
15
|
+
"size": 284167840
|
|
16
16
|
},
|
|
17
17
|
"linux-arm64": {
|
|
18
18
|
"binary": "claude",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "5265a60217e667b75e126e887b49ac0f168ad8bb13c605c3e3df528519876dc0",
|
|
20
|
+
"size": 290447544
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"binary": "claude",
|
|
24
|
-
"checksum": "
|
|
25
|
-
"size":
|
|
24
|
+
"checksum": "86cb722ab68348877dba7971e4d0c659919e05e6228c05e006e83da320e656ef",
|
|
25
|
+
"size": 290532720
|
|
26
26
|
},
|
|
27
27
|
"linux-arm64-musl": {
|
|
28
28
|
"binary": "claude",
|
|
29
|
-
"checksum": "
|
|
30
|
-
"size":
|
|
29
|
+
"checksum": "7fc83af6edf609219dd6412ae2c9a592a1903b912baf61779adc5b41159af333",
|
|
30
|
+
"size": 282608984
|
|
31
31
|
},
|
|
32
32
|
"linux-x64-musl": {
|
|
33
33
|
"binary": "claude",
|
|
34
|
-
"checksum": "
|
|
35
|
-
"size":
|
|
34
|
+
"checksum": "9c517d738c8bd608c0ea97f12ad20655a5f28470c99181d626cba370c1dbddba",
|
|
35
|
+
"size": 284192368
|
|
36
36
|
},
|
|
37
37
|
"win32-x64": {
|
|
38
38
|
"binary": "claude.exe",
|
|
39
|
-
"checksum": "
|
|
40
|
-
"size":
|
|
39
|
+
"checksum": "0ce7a3942cdd0c89b3e32173362b713aea9e8c24e1219976bad3984e8efadfd1",
|
|
40
|
+
"size": 295628448
|
|
41
41
|
},
|
|
42
42
|
"win32-arm64": {
|
|
43
43
|
"binary": "claude.exe",
|
|
44
|
-
"checksum": "
|
|
45
|
-
"size":
|
|
44
|
+
"checksum": "16f5e4ece22ab453298403d38f065b6eb83c465ed07ae8e6fa7a2025e0e4fbe2",
|
|
45
|
+
"size": 279823008
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"sdkCompat": {
|
|
49
49
|
"testedWrapperVersions": [
|
|
50
|
-
"0.3.270",
|
|
51
|
-
"0.3.271",
|
|
52
50
|
"0.3.272",
|
|
53
51
|
"0.3.273",
|
|
54
52
|
"0.3.274",
|
|
@@ -76,7 +74,9 @@
|
|
|
76
74
|
"0.3.299",
|
|
77
75
|
"0.3.300",
|
|
78
76
|
"0.3.301",
|
|
79
|
-
"0.3.302"
|
|
77
|
+
"0.3.302",
|
|
78
|
+
"0.3.303",
|
|
79
|
+
"0.3.304"
|
|
80
80
|
],
|
|
81
81
|
"harnessSchema": 1
|
|
82
82
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,62 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.305",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-10-
|
|
4
|
+
"commit": "6e723756d1226ddc2a4fefe5586e02bcc6a0501f",
|
|
5
|
+
"buildDate": "2026-10-20T18:26:25Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude.zst",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "1dddc458ce8aacc49677b37c97efbba37a1b8f12bb3cbaf26388a47fbda4a6a9",
|
|
10
|
+
"size": 92225972,
|
|
11
11
|
"bundle": {
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "f5b6a20ff4823fc0485f3edb0ac4b5b2bd681eb8865318918b8ff403e5ab19c9",
|
|
13
|
+
"size": 92219351
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"darwin-x64": {
|
|
17
17
|
"binary": "claude.zst",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "5ea2f243cbd5f7821a5502abb973ee236cea93d342137b5ce1828a10030eacdd",
|
|
19
|
+
"size": 97602705,
|
|
20
20
|
"bundle": {
|
|
21
|
-
"checksum": "
|
|
22
|
-
"size":
|
|
21
|
+
"checksum": "34ecf434b86ae2d5b2644abfae7a7a1682eaa00f711c618017a75e096b635819",
|
|
22
|
+
"size": 97597227
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64": {
|
|
26
26
|
"binary": "claude.zst",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "2823ad5678a72913e8b2f747e4a82fc6b157cb4896e13b8abafc07fbe278446b",
|
|
28
|
+
"size": 101510529
|
|
29
29
|
},
|
|
30
30
|
"linux-x64": {
|
|
31
31
|
"binary": "claude.zst",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "45cfa7d4f6244024a3b1f0a1e6806afa254013f8065e8ea9ba937d7d696a26a3",
|
|
33
|
+
"size": 102476450
|
|
34
34
|
},
|
|
35
35
|
"linux-arm64-musl": {
|
|
36
36
|
"binary": "claude.zst",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "bddf5553e8857e3322d8a64df1ea6c2d0f601e9b9b4cf5034f94fb4c1d7aa722",
|
|
38
|
+
"size": 99865148
|
|
39
39
|
},
|
|
40
40
|
"linux-x64-musl": {
|
|
41
41
|
"binary": "claude.zst",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "60e88b5ab52e05e8391a156c6c580dc26957fe372f9816f3d46e5378f3efd4e9",
|
|
43
|
+
"size": 100893284
|
|
44
44
|
},
|
|
45
45
|
"win32-x64": {
|
|
46
46
|
"binary": "claude.exe.zst",
|
|
47
|
-
"checksum": "
|
|
48
|
-
"size":
|
|
47
|
+
"checksum": "344d107ee9f9104263abed67c78adde0152da9031bb64128fa29cf96986ad134",
|
|
48
|
+
"size": 105764570
|
|
49
49
|
},
|
|
50
50
|
"win32-arm64": {
|
|
51
51
|
"binary": "claude.exe.zst",
|
|
52
|
-
"checksum": "
|
|
53
|
-
"size":
|
|
52
|
+
"checksum": "451ec407bf94b5470dbc98e20266d85c1fdcdb15a11fa74f1263528b0cbde719",
|
|
53
|
+
"size": 101001199
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"sdkCompat": {
|
|
57
57
|
"testedWrapperVersions": [
|
|
58
|
-
"0.3.270",
|
|
59
|
-
"0.3.271",
|
|
60
58
|
"0.3.272",
|
|
61
59
|
"0.3.273",
|
|
62
60
|
"0.3.274",
|
|
@@ -84,7 +82,9 @@
|
|
|
84
82
|
"0.3.299",
|
|
85
83
|
"0.3.300",
|
|
86
84
|
"0.3.301",
|
|
87
|
-
"0.3.302"
|
|
85
|
+
"0.3.302",
|
|
86
|
+
"0.3.303",
|
|
87
|
+
"0.3.304"
|
|
88
88
|
],
|
|
89
89
|
"harnessSchema": 1
|
|
90
90
|
}
|
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.305",
|
|
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.305",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.305",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.305",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.305",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.305",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.305",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.305",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.305"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"sdk.mjs",
|
|
@@ -85,8 +85,10 @@
|
|
|
85
85
|
"extractFromBunfs.d.ts",
|
|
86
86
|
"manifest.json",
|
|
87
87
|
"manifest.zst.json",
|
|
88
|
-
"core-
|
|
89
|
-
"core-
|
|
88
|
+
"core-3z5ypevg.mjs",
|
|
89
|
+
"core-be3nes5v.mjs",
|
|
90
|
+
"core-cpeswmq9.mjs",
|
|
91
|
+
"core-thy7v25j.mjs"
|
|
90
92
|
],
|
|
91
|
-
"claudeCodeVersion": "2.1.
|
|
93
|
+
"claudeCodeVersion": "2.1.305"
|
|
92
94
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -261,6 +261,7 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
|
|
|
261
261
|
decisionReason?: string;
|
|
262
262
|
|
|
263
263
|
|
|
264
|
+
|
|
264
265
|
/**
|
|
265
266
|
* Full permission prompt sentence rendered by the bridge (e.g.
|
|
266
267
|
* "Claude wants to read foo.txt"). Use this as the primary prompt
|
|
@@ -1659,6 +1660,7 @@ export declare type Options = {
|
|
|
1659
1660
|
* ```
|
|
1660
1661
|
*/
|
|
1661
1662
|
toolAliases?: Record<string, string>;
|
|
1663
|
+
|
|
1662
1664
|
/**
|
|
1663
1665
|
* Specify the base set of available built-in tools.
|
|
1664
1666
|
* - `string[]` - Array of specific tool names (e.g., `['Bash', 'Read', 'Edit']`)
|
|
@@ -2870,6 +2872,10 @@ export declare type PreToolUseHookSpecificOutput = {
|
|
|
2870
2872
|
*/
|
|
2871
2873
|
export declare function prewarm(_params?: {
|
|
2872
2874
|
options?: Options;
|
|
2875
|
+
/**
|
|
2876
|
+
* The most time, in milliseconds, to wait for the spare process to
|
|
2877
|
+
* initialize; it counts throughout. Defaults to 60000.
|
|
2878
|
+
*/
|
|
2873
2879
|
initializeTimeoutMs?: number;
|
|
2874
2880
|
}): Promise<SpareProcess>;
|
|
2875
2881
|
|
|
@@ -3607,6 +3613,7 @@ declare const SandboxSettingsSchema: () => z.ZodObject<{
|
|
|
3607
3613
|
}, z.core.$strip>>;
|
|
3608
3614
|
ignoreViolations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
3609
3615
|
enableWeakerNestedSandbox: z.ZodOptional<z.ZodBoolean>;
|
|
3616
|
+
allowNestedUserNamespaces: z.ZodOptional<z.ZodBoolean>;
|
|
3610
3617
|
enableWeakerNetworkIsolation: z.ZodOptional<z.ZodBoolean>;
|
|
3611
3618
|
allowAppleEvents: z.ZodOptional<z.ZodBoolean>;
|
|
3612
3619
|
excludedCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -4023,6 +4030,10 @@ declare type SDKControlGetContextUsageRequest = {
|
|
|
4023
4030
|
*/
|
|
4024
4031
|
export declare type SDKControlGetContextUsageResponse = {
|
|
4025
4032
|
categories: {
|
|
4033
|
+
/**
|
|
4034
|
+
* Which row this is. Stable where the English name is not: match a particular row on this. Absent from a CLI that predates it. A later CLI may add values: treat an unknown value as absent.
|
|
4035
|
+
*/
|
|
4036
|
+
id?: 'system_prompt' | 'system_tools' | 'mcp_tools' | 'mcp_instructions' | 'mcp_tools_deferred' | 'system_tools_deferred' | 'custom_agents' | 'memory_files' | 'skills' | 'messages' | 'autocompact_buffer' | 'compact_buffer' | 'free_space';
|
|
4026
4037
|
name: string;
|
|
4027
4038
|
tokens: number;
|
|
4028
4039
|
color: string;
|
|
@@ -4056,6 +4067,16 @@ export declare type SDKControlGetContextUsageResponse = {
|
|
|
4056
4067
|
tokens: number;
|
|
4057
4068
|
isLoaded?: boolean;
|
|
4058
4069
|
}[];
|
|
4070
|
+
/**
|
|
4071
|
+
* The 'mcp_instructions' row by server. Only the row's total is counted: each server's share of it is estimated from the length of its text. Present only where the CLI answers on its own stdio and no server stores or forwards the reply.
|
|
4072
|
+
*/
|
|
4073
|
+
mcpInstructions?: {
|
|
4074
|
+
/**
|
|
4075
|
+
* Server name, as mcp_status reports it and mcp_toggle takes it (not normalized, unlike mcpTools[].serverName).
|
|
4076
|
+
*/
|
|
4077
|
+
serverName: string;
|
|
4078
|
+
tokens: number;
|
|
4079
|
+
}[];
|
|
4059
4080
|
deferredBuiltinTools?: {
|
|
4060
4081
|
name: string;
|
|
4061
4082
|
tokens: number;
|
|
@@ -4072,6 +4093,14 @@ export declare type SDKControlGetContextUsageResponse = {
|
|
|
4072
4093
|
agents: {
|
|
4073
4094
|
agentType: string;
|
|
4074
4095
|
source: string;
|
|
4096
|
+
/**
|
|
4097
|
+
* Id of the providing plugin (its name and marketplace), when there is one. Present only where the CLI answers on its own stdio and no server stores or forwards the reply.
|
|
4098
|
+
*/
|
|
4099
|
+
pluginId?: string;
|
|
4100
|
+
/**
|
|
4101
|
+
* Absolute path of the agent's file on the machine the CLI runs on, which over SSH or WSL is not the host's. Present only where the CLI answers on its own stdio and no server stores or forwards the reply: absent on cloud, self-hosted runner and Remote Control connections, and for an agent with no file.
|
|
4102
|
+
*/
|
|
4103
|
+
path?: string;
|
|
4075
4104
|
tokens: number;
|
|
4076
4105
|
}[];
|
|
4077
4106
|
slashCommands?: {
|
|
@@ -4086,6 +4115,18 @@ export declare type SDKControlGetContextUsageResponse = {
|
|
|
4086
4115
|
skillFrontmatter: {
|
|
4087
4116
|
name: string;
|
|
4088
4117
|
source: string;
|
|
4118
|
+
/**
|
|
4119
|
+
* Name of the providing plugin, when there is one. Not unique across marketplaces: pluginId is.
|
|
4120
|
+
*/
|
|
4121
|
+
pluginName?: string;
|
|
4122
|
+
/**
|
|
4123
|
+
* Id of the providing plugin (its name and marketplace), when there is one. Present only where the CLI answers on its own stdio and no server stores or forwards the reply.
|
|
4124
|
+
*/
|
|
4125
|
+
pluginId?: string;
|
|
4126
|
+
/**
|
|
4127
|
+
* Absolute path of the skill's file on the machine the CLI runs on, which over SSH or WSL is not the host's. Present only where the CLI answers on its own stdio and no server stores or forwards the reply: absent on cloud, self-hosted runner and Remote Control connections, and for a skill with no file.
|
|
4128
|
+
*/
|
|
4129
|
+
path?: string;
|
|
4089
4130
|
tokens: number;
|
|
4090
4131
|
}[];
|
|
4091
4132
|
};
|
|
@@ -4446,6 +4487,40 @@ export declare type SDKControlGetUsageResponse = {
|
|
|
4446
4487
|
*/
|
|
4447
4488
|
count: number;
|
|
4448
4489
|
}[];
|
|
4490
|
+
/**
|
|
4491
|
+
* One recommended change per notable behavior or source, largest share first, worded for display.
|
|
4492
|
+
*/
|
|
4493
|
+
recommendations?: {
|
|
4494
|
+
/**
|
|
4495
|
+
* The behavior key, or 'agent', 'skill', 'plugin' or 'mcp_server' for a named source.
|
|
4496
|
+
*/
|
|
4497
|
+
key: string;
|
|
4498
|
+
/**
|
|
4499
|
+
* Share of the weighted local usage this touches, 0-100.
|
|
4500
|
+
*/
|
|
4501
|
+
pct: number;
|
|
4502
|
+
/**
|
|
4503
|
+
* What to do, verb first.
|
|
4504
|
+
*/
|
|
4505
|
+
title: string;
|
|
4506
|
+
/**
|
|
4507
|
+
* A few words: what the scan saw, or the command to run.
|
|
4508
|
+
*/
|
|
4509
|
+
detail?: string;
|
|
4510
|
+
}[];
|
|
4511
|
+
/**
|
|
4512
|
+
* What one "fix" action does. Absent when nothing can be fixed in the session that answered.
|
|
4513
|
+
*/
|
|
4514
|
+
fix?: {
|
|
4515
|
+
/**
|
|
4516
|
+
* The recommendations it covers.
|
|
4517
|
+
*/
|
|
4518
|
+
keys: string[];
|
|
4519
|
+
/**
|
|
4520
|
+
* User messages to send for the person, one each and in order, at priority 'later' so a running turn cannot reorder them: any /effort commands first, then one prompt for the rest, which goes with client_composed set.
|
|
4521
|
+
*/
|
|
4522
|
+
messages: string[];
|
|
4523
|
+
};
|
|
4449
4524
|
agents: {
|
|
4450
4525
|
name: string;
|
|
4451
4526
|
/**
|
|
@@ -4501,6 +4576,40 @@ export declare type SDKControlGetUsageResponse = {
|
|
|
4501
4576
|
*/
|
|
4502
4577
|
count: number;
|
|
4503
4578
|
}[];
|
|
4579
|
+
/**
|
|
4580
|
+
* One recommended change per notable behavior or source, largest share first, worded for display.
|
|
4581
|
+
*/
|
|
4582
|
+
recommendations?: {
|
|
4583
|
+
/**
|
|
4584
|
+
* The behavior key, or 'agent', 'skill', 'plugin' or 'mcp_server' for a named source.
|
|
4585
|
+
*/
|
|
4586
|
+
key: string;
|
|
4587
|
+
/**
|
|
4588
|
+
* Share of the weighted local usage this touches, 0-100.
|
|
4589
|
+
*/
|
|
4590
|
+
pct: number;
|
|
4591
|
+
/**
|
|
4592
|
+
* What to do, verb first.
|
|
4593
|
+
*/
|
|
4594
|
+
title: string;
|
|
4595
|
+
/**
|
|
4596
|
+
* A few words: what the scan saw, or the command to run.
|
|
4597
|
+
*/
|
|
4598
|
+
detail?: string;
|
|
4599
|
+
}[];
|
|
4600
|
+
/**
|
|
4601
|
+
* What one "fix" action does. Absent when nothing can be fixed in the session that answered.
|
|
4602
|
+
*/
|
|
4603
|
+
fix?: {
|
|
4604
|
+
/**
|
|
4605
|
+
* The recommendations it covers.
|
|
4606
|
+
*/
|
|
4607
|
+
keys: string[];
|
|
4608
|
+
/**
|
|
4609
|
+
* User messages to send for the person, one each and in order, at priority 'later' so a running turn cannot reorder them: any /effort commands first, then one prompt for the rest, which goes with client_composed set.
|
|
4610
|
+
*/
|
|
4611
|
+
messages: string[];
|
|
4612
|
+
};
|
|
4504
4613
|
agents: {
|
|
4505
4614
|
name: string;
|
|
4506
4615
|
/**
|
|
@@ -4587,6 +4696,7 @@ declare type SDKControlInitializeRequest = {
|
|
|
4587
4696
|
* Map of tool-name aliases applied before name resolution. When the model emits a tool_use whose name is a key in this map, the tool execution path resolves the mapped name instead. Single-hop (no chains). See Options.toolAliases.
|
|
4588
4697
|
*/
|
|
4589
4698
|
toolAliases?: Record<string, string>;
|
|
4699
|
+
|
|
4590
4700
|
/**
|
|
4591
4701
|
* When true, omit per-user dynamic sections (working directory, auto-memory path) from the cached system prompt and re-inject them as the first user message. Lets cross-user prompt caching hit on a static system prompt prefix. Tradeoff: the model sees this context slightly later in the prompt, so steering on the working directory and memory location is marginally less authoritative. Has no effect when a custom (non-preset) system prompt is in use.
|
|
4592
4702
|
*/
|
|
@@ -4647,6 +4757,7 @@ export declare type SDKControlInitializeResponse = {
|
|
|
4647
4757
|
* Whether the `hooks` this initialize carried were registered: true on a session's first initialize, and on a repeated initialize from the process that owns the CLI's stdin (its set replaces the one registered earlier); false when a repeated initialize's hooks were ignored (a client joining a remote session another client configured). Absent when the request carried no hooks, and on CLIs that predate the field — those ignored `hooks` on every repeated initialize.
|
|
4648
4758
|
*/
|
|
4649
4759
|
hooks_applied?: boolean;
|
|
4760
|
+
|
|
4650
4761
|
/**
|
|
4651
4762
|
* Whether every plugin this initialize listed is loaded: true when each one is among the plugins the process loaded at launch (from `plugins` under --await-initialize, or from --plugin-dir), so a re-sent initialize naming the launch set also reads true; false otherwise. The `plugins` field never loads anything after launch. Absent when the request listed no plugins, and on CLIs that predate the field (those never read `plugins`).
|
|
4652
4763
|
*/
|
|
@@ -5121,7 +5232,7 @@ export declare type SDKControlRequestProgressMessage = {
|
|
|
5121
5232
|
declare type SDKControlRequestUserDialogRequest = {
|
|
5122
5233
|
subtype: 'request_user_dialog';
|
|
5123
5234
|
/**
|
|
5124
|
-
* Identifier for the dialog the host should render. Open string union — new kinds may be added without bumping the protocol. A kind is only sent in sessions where some attached client declared it in initialize.supportedDialogKinds (declare exactly the kinds you can render); on multi-client transports the request still reaches every attached client. A host that receives a kind it did not declare must not answer it (an error-subtype response is discarded and the dialog stays pending) — never with {behavior: "cancelled"}, which is a real settlement treated as the user dismissing the dialog. An unanswered dialog is cancelled by the CLI after its dialog deadline.
|
|
5235
|
+
* Identifier for the dialog the host should render. Open string union — new kinds may be added without bumping the protocol. A kind is only sent in sessions where some attached client declared it in initialize.supportedDialogKinds (declare exactly the kinds you can render); on multi-client transports the request still reaches every attached client. A host that receives a kind it did not declare must not answer it (an error-subtype response is discarded and the dialog stays pending) — never with {behavior: "cancelled"}, which is a real settlement treated as the user dismissing the dialog. An unanswered dialog is cancelled by the CLI after its dialog deadline; the CLI may send one that has no deadline, which stays up until it is answered or the CLI withdraws it with a control_cancel_request.
|
|
5125
5236
|
*/
|
|
5126
5237
|
dialog_kind: string;
|
|
5127
5238
|
/**
|
|
@@ -5370,7 +5481,7 @@ export declare type SDKInformationalMessage = {
|
|
|
5370
5481
|
};
|
|
5371
5482
|
|
|
5372
5483
|
/**
|
|
5373
|
-
* Liveness heartbeat
|
|
5484
|
+
* Liveness heartbeat. Either side may send it at any time (the CLI emits it periodically, for example while a long-running control request is in progress); receivers must ignore it. It has no payload. One use is not part of this schema: for startup() and prewarm() of the Agent SDK, which set CLAUDE_CODE_SDK_READS_STARTUP_MARKS, the CLI writes lines of this type with a `startup_mark` field, the name of a start-up checkpoint that it has passed, before the initialize response.
|
|
5374
5485
|
*/
|
|
5375
5486
|
declare type SDKKeepAliveMessage = {
|
|
5376
5487
|
type: 'keep_alive';
|
|
@@ -5789,6 +5900,7 @@ export declare type SDKRateLimitInfo = {
|
|
|
5789
5900
|
errorCode?: 'credits_required';
|
|
5790
5901
|
canUserPurchaseCredits?: boolean;
|
|
5791
5902
|
hasChargeableSavedPaymentMethod?: boolean;
|
|
5903
|
+
|
|
5792
5904
|
};
|
|
5793
5905
|
|
|
5794
5906
|
export declare type SDKResultError = {
|
|
@@ -6459,6 +6571,7 @@ export declare type SDKUserMessage = {
|
|
|
6459
6571
|
|
|
6460
6572
|
|
|
6461
6573
|
|
|
6574
|
+
|
|
6462
6575
|
uuid?: UUID;
|
|
6463
6576
|
/**
|
|
6464
6577
|
* Content the user pasted into the prompt rather than typed: each entry a string or an array of content blocks. The CLI appends the text of each entry after the typed text, in order, and may wrap it in `<pasted_content>` tags. Blocks other than text are ignored; send images and documents in `message.content`. A list of over 1,000 entries and blocks in all is ignored.
|
|
@@ -6554,6 +6667,7 @@ export declare type SDKUserMessageReplay = {
|
|
|
6554
6667
|
|
|
6555
6668
|
|
|
6556
6669
|
|
|
6670
|
+
|
|
6557
6671
|
uuid: UUID;
|
|
6558
6672
|
session_id: string;
|
|
6559
6673
|
isReplay: true;
|
|
@@ -6953,6 +7067,19 @@ export declare interface Settings {
|
|
|
6953
7067
|
sessionUrl?: boolean;
|
|
6954
7068
|
[k: string]: unknown;
|
|
6955
7069
|
};
|
|
7070
|
+
/**
|
|
7071
|
+
* The claude.ai Project this session names for your organization's usage reports: the Project's UUID, or its ID starting with "claude_proj_". An empty string names none and stops lower-precedence files from naming one; the organization default still applies. Sent only when Claude Code uses your claude.ai login, connects directly to the Anthropic API, is not in a cloud session, and CLAUDE_CODE_ATTRIBUTION_HEADER is not 0. CLAUDE_CODE_ATTRIBUTION_PROJECT takes precedence over it. Set in managed settings, it overrides people's own settings files. A project's .claude/settings.json and settings.local.json count only once the folder is trusted; for runs in a folder nobody has trusted, such as CI, use CLAUDE_CODE_ATTRIBUTION_PROJECT.
|
|
7072
|
+
*/
|
|
7073
|
+
attributionProject?: string;
|
|
7074
|
+
/**
|
|
7075
|
+
* Your organization's default for attributionProject. Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json); ignored in user, project, local and --settings sources.
|
|
7076
|
+
*/
|
|
7077
|
+
attributionProjectPolicy?: {
|
|
7078
|
+
/**
|
|
7079
|
+
* The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its UUID, or its ID starting with "claude_proj_".
|
|
7080
|
+
*/
|
|
7081
|
+
default?: string;
|
|
7082
|
+
};
|
|
6956
7083
|
/**
|
|
6957
7084
|
* Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)
|
|
6958
7085
|
*/
|
|
@@ -7104,7 +7231,7 @@ export declare interface Settings {
|
|
|
7104
7231
|
};
|
|
7105
7232
|
};
|
|
7106
7233
|
/**
|
|
7107
|
-
* Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries
|
|
7234
|
+
* Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries with no ${VAR} in their command, args, url or header values) are allowed without being listed; a managed-mcp.json entry with ${VAR} in any of those must match this list. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied.
|
|
7108
7235
|
*/
|
|
7109
7236
|
allowedMcpServers?: {
|
|
7110
7237
|
/**
|
|
@@ -7439,7 +7566,7 @@ export declare interface Settings {
|
|
|
7439
7566
|
*/
|
|
7440
7567
|
httpHookAllowedEnvVars?: string[];
|
|
7441
7568
|
/**
|
|
7442
|
-
* When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins, the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name — unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched), and npm-direct (package\@npm) plugins whose recorded resolution a registry-pinned managed npm strictKnownMarketplaces entry names (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. --disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply.
|
|
7569
|
+
* When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins (in Claude Desktop, only while this is not set by the organization's own managed settings), the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name — unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched), and npm-direct (package\@npm) plugins whose recorded resolution a registry-pinned managed npm strictKnownMarketplaces entry names (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. --disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply.
|
|
7443
7570
|
*/
|
|
7444
7571
|
allowManagedPermissionRulesOnly?: boolean;
|
|
7445
7572
|
/**
|
|
@@ -9017,6 +9144,10 @@ export declare interface Settings {
|
|
|
9017
9144
|
* Linux only: Run without the fresh /proc mount, for hosts such as unprivileged Docker containers that cannot create one. **Reduces security** — the host /proc stays readable by sandboxed commands. Default: false. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, true from project settings (.claude/settings.json and .claude/settings.local.json) is ignored (false there still applies).
|
|
9018
9145
|
*/
|
|
9019
9146
|
enableWeakerNestedSandbox?: boolean;
|
|
9147
|
+
/**
|
|
9148
|
+
* Linux/WSL only: Let sandboxed commands create user namespaces of their own, which the sandbox refuses by default. Needed by tools that sandbox themselves that way, such as Chromium's and Electron's sandbox, rootless podman or buildah, a nested bubblewrap, and `unshare`. **Removes code-execution isolation** — in any folder a hostile command may write, it can then bypass filesystem.denyWrite, filesystem.denyRead, credentials.files entries and the paths the sandbox always write-protects (such as .claude/settings.json, git hooks and git config), and so plant code that later runs outside the sandbox; while autoAllowBashIfSandboxed is on, the command that plants it needs no approval. Default: false. Only honored from user, managed/policy, or CLI (--settings) settings — true from project settings (.claude/settings.json and .claude/settings.local.json) is ignored (false there still applies).
|
|
9149
|
+
*/
|
|
9150
|
+
allowNestedUserNamespaces?: boolean;
|
|
9020
9151
|
/**
|
|
9021
9152
|
* macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. **Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, true from project settings (.claude/settings.json and .claude/settings.local.json) is ignored (false there still applies).
|
|
9022
9153
|
*/
|
|
@@ -9717,6 +9848,14 @@ export declare interface SpawnOptions {
|
|
|
9717
9848
|
*/
|
|
9718
9849
|
export declare function startup(_params?: {
|
|
9719
9850
|
options?: Options;
|
|
9851
|
+
/**
|
|
9852
|
+
* The most time, in milliseconds, that startup() counts while it waits for
|
|
9853
|
+
* the subprocess to initialize; when that time is used up, the promise
|
|
9854
|
+
* rejects with a timeout error. Defaults to 60000. When no value is passed,
|
|
9855
|
+
* time in which the subprocess reports a SessionStart or Setup hook running
|
|
9856
|
+
* is not counted, for at most 10 minutes in total. A value that is passed
|
|
9857
|
+
* counts throughout.
|
|
9858
|
+
*/
|
|
9720
9859
|
initializeTimeoutMs?: number;
|
|
9721
9860
|
}): Promise<WarmQuery>;
|
|
9722
9861
|
|