@anthropic-ai/claude-agent-sdk 0.3.273 → 0.3.274
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/bridge.mjs +87 -86
- package/browser-sdk.js +47 -47
- package/manifest.json +23 -23
- package/manifest.zst.json +27 -27
- package/package.json +10 -10
- package/sdk-tools.d.ts +2 -1
- package/sdk.d.ts +65 -10
- package/sdk.mjs +85 -79
package/manifest.json
CHANGED
|
@@ -1,55 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.274",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "1efcc1361e649ab98800b43a7df307043397a9ba",
|
|
5
|
+
"modsCommit": "744fb6ab02aca7c50c43f1676a870cff184e1fca",
|
|
6
|
+
"buildDate": "2026-09-16T21:56:00Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "3509913f9d1576316c8845b88837f8fd3bbbcf26625833ac82cfb6b8985da94a",
|
|
11
|
+
"size": 214149552
|
|
12
12
|
},
|
|
13
13
|
"darwin-x64": {
|
|
14
14
|
"binary": "claude",
|
|
15
|
-
"checksum": "
|
|
16
|
-
"size":
|
|
15
|
+
"checksum": "b18e8c9d7666d8987a174ac65e0019f4ba6befa73d2f75c05cbe92e5093431eb",
|
|
16
|
+
"size": 222955360
|
|
17
17
|
},
|
|
18
18
|
"linux-arm64": {
|
|
19
19
|
"binary": "claude",
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "2db904daea17addff9de557ba26a725916888aa7b546e2c5dd989c20d9d49ab3",
|
|
21
|
+
"size": 230482160
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
24
|
"binary": "claude",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "15e2d05148f801b5774032faad87e624ecd172e9903288bda448b892eb58fa07",
|
|
26
|
+
"size": 230580536
|
|
27
27
|
},
|
|
28
28
|
"linux-arm64-musl": {
|
|
29
29
|
"binary": "claude",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "5d50bd99667904879d95142dbd604b24d0273c13fb79f3abc2346cb00048049f",
|
|
31
|
+
"size": 223098528
|
|
32
32
|
},
|
|
33
33
|
"linux-x64-musl": {
|
|
34
34
|
"binary": "claude",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "9f64fb9e79752c676234087573f05a794e2a8fbd49c91482c6567be258752e15",
|
|
36
|
+
"size": 224501720
|
|
37
37
|
},
|
|
38
38
|
"win32-x64": {
|
|
39
39
|
"binary": "claude.exe",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "4e4c1746aff835bb05e5ed14cda72d21ee6fbda4147aa99b3135718614da117e",
|
|
41
|
+
"size": 233691808
|
|
42
42
|
},
|
|
43
43
|
"win32-arm64": {
|
|
44
44
|
"binary": "claude.exe",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "da93e462c34ec86efee80c70ac791d3232ed98bd44c6abbafb1b5ffa2a9185c4",
|
|
46
|
+
"size": 224916128
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"sdkCompat": {
|
|
50
50
|
"testedWrapperVersions": [
|
|
51
|
-
"0.3.233",
|
|
52
|
-
"0.3.234",
|
|
53
51
|
"0.3.235",
|
|
54
52
|
"0.3.236",
|
|
55
53
|
"0.3.237",
|
|
@@ -66,6 +64,7 @@
|
|
|
66
64
|
"0.3.250",
|
|
67
65
|
"0.3.251",
|
|
68
66
|
"0.3.252",
|
|
67
|
+
"0.3.257",
|
|
69
68
|
"0.3.258",
|
|
70
69
|
"0.3.259",
|
|
71
70
|
"0.3.260",
|
|
@@ -77,7 +76,8 @@
|
|
|
77
76
|
"0.3.269",
|
|
78
77
|
"0.3.270",
|
|
79
78
|
"0.3.271",
|
|
80
|
-
"0.3.272"
|
|
79
|
+
"0.3.272",
|
|
80
|
+
"0.3.273"
|
|
81
81
|
],
|
|
82
82
|
"harnessSchema": 1
|
|
83
83
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,63 +1,61 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.274",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "1efcc1361e649ab98800b43a7df307043397a9ba",
|
|
5
|
+
"modsCommit": "744fb6ab02aca7c50c43f1676a870cff184e1fca",
|
|
6
|
+
"buildDate": "2026-09-16T21:57:10Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude.zst",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "7b1d7e51232bf46da0ad4d84d3c9821933275b3712111c4a94c18c4ede8e9694",
|
|
11
|
+
"size": 70548622,
|
|
12
12
|
"bundle": {
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "e655712248ebb48efe48daf7c8920be45989d77fcd4c9b812bf7e259393a95a6",
|
|
14
|
+
"size": 70550725
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"darwin-x64": {
|
|
18
18
|
"binary": "claude.zst",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "90b036a45b6d99de8b01051148953617060fd464e9f1f18996f3799e57e8f198",
|
|
20
|
+
"size": 74720985,
|
|
21
21
|
"bundle": {
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "17faafe638136427f4d719d7ea060298ee7e6f3e38803f4809c26556dd0efc1b",
|
|
23
|
+
"size": 74724749
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64": {
|
|
27
27
|
"binary": "claude.zst",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "5873a7beb9793643b9c0287f5873ea507e92f33477b1bbb86f0451caaf08b8fd",
|
|
29
|
+
"size": 79737410
|
|
30
30
|
},
|
|
31
31
|
"linux-x64": {
|
|
32
32
|
"binary": "claude.zst",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "ea049d5d46d5e6deaaadef9549f45879917d39a196d912c99bd3981a0cfdc7d8",
|
|
34
|
+
"size": 80357615
|
|
35
35
|
},
|
|
36
36
|
"linux-arm64-musl": {
|
|
37
37
|
"binary": "claude.zst",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "21b69fbc9fdc9021317dcd6fc236c38216664e6def4a5127d40e3c2434db59fb",
|
|
39
|
+
"size": 78191631
|
|
40
40
|
},
|
|
41
41
|
"linux-x64-musl": {
|
|
42
42
|
"binary": "claude.zst",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "0bd16f3afb6b87b06ca70f80f17a6436da6acb4310c08b7453dcdf1a62913a70",
|
|
44
|
+
"size": 78856280
|
|
45
45
|
},
|
|
46
46
|
"win32-x64": {
|
|
47
47
|
"binary": "claude.exe.zst",
|
|
48
|
-
"checksum": "
|
|
49
|
-
"size":
|
|
48
|
+
"checksum": "37f1c37f19824b021cbc043076d6db4aa2e4ff5a4327812c40a3ad85243659aa",
|
|
49
|
+
"size": 82752486
|
|
50
50
|
},
|
|
51
51
|
"win32-arm64": {
|
|
52
52
|
"binary": "claude.exe.zst",
|
|
53
|
-
"checksum": "
|
|
54
|
-
"size":
|
|
53
|
+
"checksum": "936419143051d84621a3d84cef019d0498d40fc00d2fc1f5a6d3672aac1224fb",
|
|
54
|
+
"size": 79501465
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"sdkCompat": {
|
|
58
58
|
"testedWrapperVersions": [
|
|
59
|
-
"0.3.233",
|
|
60
|
-
"0.3.234",
|
|
61
59
|
"0.3.235",
|
|
62
60
|
"0.3.236",
|
|
63
61
|
"0.3.237",
|
|
@@ -74,6 +72,7 @@
|
|
|
74
72
|
"0.3.250",
|
|
75
73
|
"0.3.251",
|
|
76
74
|
"0.3.252",
|
|
75
|
+
"0.3.257",
|
|
77
76
|
"0.3.258",
|
|
78
77
|
"0.3.259",
|
|
79
78
|
"0.3.260",
|
|
@@ -85,7 +84,8 @@
|
|
|
85
84
|
"0.3.269",
|
|
86
85
|
"0.3.270",
|
|
87
86
|
"0.3.271",
|
|
88
|
-
"0.3.272"
|
|
87
|
+
"0.3.272",
|
|
88
|
+
"0.3.273"
|
|
89
89
|
],
|
|
90
90
|
"harnessSchema": 1
|
|
91
91
|
}
|
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.274",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"zod": "^4.0.0"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
60
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.
|
|
61
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.
|
|
62
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.
|
|
63
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.
|
|
64
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.
|
|
67
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.
|
|
60
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.274",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.274",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.274",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.274",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.274",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.274",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.274",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.274"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
70
|
"sdk.mjs",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"manifest.json",
|
|
81
81
|
"manifest.zst.json"
|
|
82
82
|
],
|
|
83
|
-
"claudeCodeVersion": "2.1.
|
|
83
|
+
"claudeCodeVersion": "2.1.274"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -595,6 +595,7 @@ export type ArtifactOutput =
|
|
|
595
595
|
sha256: string;
|
|
596
596
|
cowritten?: true;
|
|
597
597
|
outside_writer?: true;
|
|
598
|
+
public_read?: true;
|
|
598
599
|
foreign?: true;
|
|
599
600
|
};
|
|
600
601
|
}
|
|
@@ -3090,7 +3091,7 @@ export interface ProposeGoalInput {
|
|
|
3090
3091
|
}
|
|
3091
3092
|
export interface ArtifactInput {
|
|
3092
3093
|
/**
|
|
3093
|
-
* Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it. 'read' returns the content of the published artifact at `url` (raw HTML for the user's own; an isolated summary, steered by the optional `prompt`, for one shared with them, though a page published in this session's own Slack channel can come back in full as untrusted content) — see **Calls**. 'watch', 'unwatch', and 'status' manage live-update subscriptions
|
|
3094
|
+
* Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it. 'read' returns the content of the published artifact at `url` (raw HTML for the user's own; an isolated summary, steered by the optional `prompt`, for one shared with them, though a page published in this session's own Slack channel can come back in full as untrusted content) — see **Calls**. 'watch', 'unwatch', and 'status' manage live-update subscriptions through which a session keeps track of new versions of an artifact published elsewhere, and those aren't available in this session: 'watch' only reports that — this session does not keep track of new versions — and 'status' lists this session's artifact watches (pass `url` to check one). 'upload_asset' adds one local media, PDF, font, or text file to an existing artifact — pass `url` and `file_path`. 'list_assets' lists the files in an artifact's asset store (pass `url`; `after` continues a listing), 'read_asset' saves one of them to a local file named by its id (pass `url` and `asset_id`, optionally `out_dir`), and 'delete_asset' permanently removes one (pass `url` and `asset_id`). See **Artifact assets** above.
|
|
3094
3095
|
*/
|
|
3095
3096
|
action?:
|
|
3096
3097
|
| "publish"
|
package/sdk.d.ts
CHANGED
|
@@ -227,6 +227,21 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
|
|
|
227
227
|
* For example, when a Bash command tries to access a path outside allowed directories.
|
|
228
228
|
*/
|
|
229
229
|
blockedPath?: string;
|
|
230
|
+
/**
|
|
231
|
+
* For `mcp__*` tools: the MCP server serving the tool and where its
|
|
232
|
+
* definition came from. `source: 'sdk'` means one of the in-process
|
|
233
|
+
* servers this SDK host registered (its `name` is the key you registered;
|
|
234
|
+
* only the host can register one); any other value (`plugin`, `user`,
|
|
235
|
+
* `project`, `local`, `dynamic`, `managed`, …) is a server from
|
|
236
|
+
* configuration, whose `name` is the key as authored there — untrusted
|
|
237
|
+
* text, escape it before display. Key trust decisions on `source`, not on
|
|
238
|
+
* the name or the tool-name prefix. Absent for non-MCP tools and on CLIs
|
|
239
|
+
* that predate the field.
|
|
240
|
+
*/
|
|
241
|
+
mcpServer?: {
|
|
242
|
+
name: string;
|
|
243
|
+
source: string;
|
|
244
|
+
};
|
|
230
245
|
/** Explains why this permission request was triggered. */
|
|
231
246
|
decisionReason?: string;
|
|
232
247
|
/**
|
|
@@ -384,6 +399,7 @@ declare namespace coreTypes {
|
|
|
384
399
|
McpSSEServerConfig,
|
|
385
400
|
McpSdkServerConfig,
|
|
386
401
|
McpServerConfigForProcessTransport,
|
|
402
|
+
McpServerProvenance,
|
|
387
403
|
McpServerStatusConfig,
|
|
388
404
|
McpServerStatus,
|
|
389
405
|
McpServerToolPolicy,
|
|
@@ -465,6 +481,7 @@ declare namespace coreTypes {
|
|
|
465
481
|
SDKSessionInfo,
|
|
466
482
|
SDKSessionStateChangedMessage,
|
|
467
483
|
SDKSettingsParseError,
|
|
484
|
+
SDKStartupFailureReason,
|
|
468
485
|
SDKStatusMessage,
|
|
469
486
|
SDKStatus,
|
|
470
487
|
SDKSystemMessage,
|
|
@@ -1126,6 +1143,17 @@ export declare type McpServerConfig = McpStdioServerConfig | McpSSEServerConfig
|
|
|
1126
1143
|
|
|
1127
1144
|
export declare type McpServerConfigForProcessTransport = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig | McpSdkServerConfig;
|
|
1128
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: "sdk"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools.
|
|
1148
|
+
*/
|
|
1149
|
+
export declare type McpServerProvenance = {
|
|
1150
|
+
name: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* sdk | plugin | user | project | local | dynamic | managed | enterprise | claudeai | agent — an open set; treat unknown values as an unrecognized configured source, never as sdk.
|
|
1153
|
+
*/
|
|
1154
|
+
source: string;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1129
1157
|
/**
|
|
1130
1158
|
* Status information for an MCP server connection.
|
|
1131
1159
|
*/
|
|
@@ -1157,6 +1185,10 @@ export declare type McpServerStatus = {
|
|
|
1157
1185
|
* Configuration scope (e.g., project, user, local, claudeai, managed)
|
|
1158
1186
|
*/
|
|
1159
1187
|
scope?: string;
|
|
1188
|
+
/**
|
|
1189
|
+
* Where the server definition came from: sdk (an in-process server the SDK host registered — only the host can register one), plugin (a server a plugin ships or registers at runtime), or the config scope (user, project, local, dynamic, managed, enterprise, claudeai, agent). Key trust on this, not on the name. Absent on CLIs that predate the field.
|
|
1190
|
+
*/
|
|
1191
|
+
source?: string;
|
|
1160
1192
|
/**
|
|
1161
1193
|
* Tools provided by this server (available when connected)
|
|
1162
1194
|
*/
|
|
@@ -2320,6 +2352,7 @@ export declare type PermissionDeniedHookInput = BaseHookInput & {
|
|
|
2320
2352
|
tool_input: unknown;
|
|
2321
2353
|
tool_use_id: string;
|
|
2322
2354
|
reason: string;
|
|
2355
|
+
mcp_server?: McpServerProvenance;
|
|
2323
2356
|
};
|
|
2324
2357
|
|
|
2325
2358
|
export declare type PermissionDeniedHookSpecificOutput = {
|
|
@@ -2337,6 +2370,7 @@ export declare type PermissionRequestHookInput = BaseHookInput & {
|
|
|
2337
2370
|
tool_name: string;
|
|
2338
2371
|
tool_input: unknown;
|
|
2339
2372
|
permission_suggestions?: PermissionUpdate[];
|
|
2373
|
+
mcp_server?: McpServerProvenance;
|
|
2340
2374
|
};
|
|
2341
2375
|
|
|
2342
2376
|
export declare type PermissionRequestHookSpecificOutput = {
|
|
@@ -2494,6 +2528,7 @@ export declare type PostToolUseFailureHookInput = BaseHookInput & {
|
|
|
2494
2528
|
* Tool execution time in milliseconds. Excludes permission-prompt and hook time.
|
|
2495
2529
|
*/
|
|
2496
2530
|
duration_ms?: number;
|
|
2531
|
+
mcp_server?: McpServerProvenance;
|
|
2497
2532
|
};
|
|
2498
2533
|
|
|
2499
2534
|
export declare type PostToolUseFailureHookSpecificOutput = {
|
|
@@ -2511,6 +2546,7 @@ export declare type PostToolUseHookInput = BaseHookInput & {
|
|
|
2511
2546
|
* Tool execution time in milliseconds. Excludes permission-prompt and hook time.
|
|
2512
2547
|
*/
|
|
2513
2548
|
duration_ms?: number;
|
|
2549
|
+
mcp_server?: McpServerProvenance;
|
|
2514
2550
|
};
|
|
2515
2551
|
|
|
2516
2552
|
export declare type PostToolUseHookSpecificOutput = {
|
|
@@ -2588,6 +2624,7 @@ export declare type PreToolUseHookInput = BaseHookInput & {
|
|
|
2588
2624
|
tool_name: string;
|
|
2589
2625
|
tool_input: unknown;
|
|
2590
2626
|
tool_use_id: string;
|
|
2627
|
+
mcp_server?: McpServerProvenance;
|
|
2591
2628
|
};
|
|
2592
2629
|
|
|
2593
2630
|
export declare type PreToolUseHookSpecificOutput = {
|
|
@@ -2656,6 +2693,7 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2656
2693
|
warning?: string;
|
|
2657
2694
|
}>;
|
|
2658
2695
|
|
|
2696
|
+
|
|
2659
2697
|
/**
|
|
2660
2698
|
* Change the model used for subsequent responses.
|
|
2661
2699
|
* Only available in streaming input mode.
|
|
@@ -3417,6 +3455,8 @@ export declare type SDKAssistantMessage = {
|
|
|
3417
3455
|
|
|
3418
3456
|
|
|
3419
3457
|
|
|
3458
|
+
|
|
3459
|
+
|
|
3420
3460
|
};
|
|
3421
3461
|
|
|
3422
3462
|
export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'account_on_hold' | 'verification_required' | 'billing_error' | 'rate_limit' | 'overloaded' | 'invalid_request' | 'model_not_found' | 'server_error' | 'unknown' | 'max_output_tokens' | 'cloud_credential_error';
|
|
@@ -4432,6 +4472,7 @@ declare type SDKControlMcpToggleRequest = {
|
|
|
4432
4472
|
declare type SDKControlPermissionRequest = {
|
|
4433
4473
|
subtype: 'can_use_tool';
|
|
4434
4474
|
tool_name: string;
|
|
4475
|
+
mcp_server?: coreTypes.McpServerProvenance;
|
|
4435
4476
|
input: Record<string, unknown>;
|
|
4436
4477
|
permission_suggestions?: coreTypes.PermissionUpdate[];
|
|
4437
4478
|
blocked_path?: string;
|
|
@@ -5317,6 +5358,10 @@ export declare type SDKResultError = {
|
|
|
5317
5358
|
queued_turn_count?: number;
|
|
5318
5359
|
errors: string[];
|
|
5319
5360
|
|
|
5361
|
+
/**
|
|
5362
|
+
* Set on the zeroed error_during_execution result a stream-json run writes before exiting on a known startup failure; errors carries the same text as stderr. Failures that used to end with stderr alone write that result only when the host sets CLAUDE_CODE_STARTUP_FAILURE_RESULTS. Absent on every other result, on startup failures without a known cause, and from older producers.
|
|
5363
|
+
*/
|
|
5364
|
+
startup_failure_reason?: SDKStartupFailureReason;
|
|
5320
5365
|
/**
|
|
5321
5366
|
* Client uuid of the user message that triggered this turn (submitMessage options.uuid), echoed back so a consumer can link this error result to the send it answers — the same join key the success variant echoes, carried alone (error turns have no request_sent_wall_ms to report). A delivery-failure result from the remote-session client echoes the failed send's queue key, which is client-minted when the host sent no uuid of its own. A synthetic/scheduled (meta) turn's own uuid is echoed only when the host vouches it is the client event's own (delivered content such as a Slack owner ping or a Slack-bot observation); a meta turn that folded queued user messages in mid-turn, vouched or not, echoes the LAST of them. Absent on turns that neither had a client uuid nor folded a user message in, on session-scoped failures with no single triggering send (a crashed worker's zeroed result), and from older producers.
|
|
5322
5367
|
*/
|
|
@@ -5368,6 +5413,7 @@ export declare type SDKResultSuccess = {
|
|
|
5368
5413
|
time_origin_ms?: number;
|
|
5369
5414
|
is_error: boolean;
|
|
5370
5415
|
api_error_status?: number | null;
|
|
5416
|
+
|
|
5371
5417
|
num_turns: number;
|
|
5372
5418
|
result: string;
|
|
5373
5419
|
stop_reason: string | null;
|
|
@@ -5478,6 +5524,11 @@ export declare type SDKSettingsParseError = {
|
|
|
5478
5524
|
message: string;
|
|
5479
5525
|
};
|
|
5480
5526
|
|
|
5527
|
+
/**
|
|
5528
|
+
* Why Claude Code refused to start, so a host can offer the fix instead of a retry. org_pin_api_key_conflict: managed settings pin a first-party or Cloud gateway sign-in, and an Anthropic API key or auth token is configured instead. org_verify_failed: the sign-in's organization could not be verified against the pin (network, or a revoked token). org_pin_mismatch: the sign-in belongs to an organization the pin does not allow. managed_settings_invalid: managed policy settings could not be read, or the pin names no organization. remote_settings_required_unavailable: managed settings the organization requires could not be loaded. gateway_signin_required: the Cloud gateway ended this sign-in. gateway_access_denied: the Cloud gateway refused managed settings for this account. proxy_invalid: a proxy setting is not a complete URL. temp_dir_unusable: the per-user temp directory is unsafe or could not be created. cwd_unavailable: the working directory was deleted, moved or cannot be read. shell_tool_missing: Windows has no shell tool: Git Bash is missing, and PowerShell is missing or turned off by CLAUDE_CODE_USE_POWERSHELL_TOOL. session_held_by_background: the conversation to resume or continue is running as a background session. worktree_resume_refused: the resume was refused because the session's worktree failed its safety checks or the resume was launched from inside it; errors says whether a re-run continues without the worktree. worktree_unverified: the session's worktree could not be verified right now; retrying may succeed. cli_version_too_old: this Claude Code version is below the minimum Anthropic requires. bypass_root: bypass permissions mode was requested while running as root.
|
|
5529
|
+
*/
|
|
5530
|
+
export declare type SDKStartupFailureReason = 'org_pin_api_key_conflict' | 'org_verify_failed' | 'org_pin_mismatch' | 'managed_settings_invalid' | 'remote_settings_required_unavailable' | 'gateway_signin_required' | 'gateway_access_denied' | 'proxy_invalid' | 'temp_dir_unusable' | 'cwd_unavailable' | 'shell_tool_missing' | 'session_held_by_background' | 'worktree_resume_refused' | 'worktree_unverified' | 'cli_version_too_old' | 'bypass_root';
|
|
5531
|
+
|
|
5481
5532
|
export declare type SDKStatus = 'compacting' | 'requesting' | null;
|
|
5482
5533
|
|
|
5483
5534
|
export declare type SDKStatusMessage = {
|
|
@@ -5511,6 +5562,10 @@ export declare type SDKSystemMessage = {
|
|
|
5511
5562
|
mcp_servers: {
|
|
5512
5563
|
name: string;
|
|
5513
5564
|
status: string;
|
|
5565
|
+
/**
|
|
5566
|
+
* Where the server definition came from — same values as McpServerStatus.source (sdk | plugin | a config scope). Absent on CLIs that predate the field.
|
|
5567
|
+
*/
|
|
5568
|
+
source?: string;
|
|
5514
5569
|
}[];
|
|
5515
5570
|
model: string;
|
|
5516
5571
|
/**
|
|
@@ -6926,7 +6981,7 @@ export declare interface Settings {
|
|
|
6926
6981
|
*/
|
|
6927
6982
|
sparsePaths?: string[];
|
|
6928
6983
|
/**
|
|
6929
|
-
*
|
|
6984
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
6930
6985
|
*/
|
|
6931
6986
|
skipLfs?: boolean;
|
|
6932
6987
|
} | {
|
|
@@ -6948,7 +7003,7 @@ export declare interface Settings {
|
|
|
6948
7003
|
*/
|
|
6949
7004
|
sparsePaths?: string[];
|
|
6950
7005
|
/**
|
|
6951
|
-
*
|
|
7006
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
6952
7007
|
*/
|
|
6953
7008
|
skipLfs?: boolean;
|
|
6954
7009
|
} | {
|
|
@@ -7170,7 +7225,7 @@ export declare interface Settings {
|
|
|
7170
7225
|
*/
|
|
7171
7226
|
sparsePaths?: string[];
|
|
7172
7227
|
/**
|
|
7173
|
-
*
|
|
7228
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7174
7229
|
*/
|
|
7175
7230
|
skipLfs?: boolean;
|
|
7176
7231
|
} | {
|
|
@@ -7192,7 +7247,7 @@ export declare interface Settings {
|
|
|
7192
7247
|
*/
|
|
7193
7248
|
sparsePaths?: string[];
|
|
7194
7249
|
/**
|
|
7195
|
-
*
|
|
7250
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7196
7251
|
*/
|
|
7197
7252
|
skipLfs?: boolean;
|
|
7198
7253
|
} | {
|
|
@@ -7409,7 +7464,7 @@ export declare interface Settings {
|
|
|
7409
7464
|
*/
|
|
7410
7465
|
sparsePaths?: string[];
|
|
7411
7466
|
/**
|
|
7412
|
-
*
|
|
7467
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7413
7468
|
*/
|
|
7414
7469
|
skipLfs?: boolean;
|
|
7415
7470
|
} | {
|
|
@@ -7431,7 +7486,7 @@ export declare interface Settings {
|
|
|
7431
7486
|
*/
|
|
7432
7487
|
sparsePaths?: string[];
|
|
7433
7488
|
/**
|
|
7434
|
-
*
|
|
7489
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7435
7490
|
*/
|
|
7436
7491
|
skipLfs?: boolean;
|
|
7437
7492
|
} | {
|
|
@@ -7638,7 +7693,7 @@ export declare interface Settings {
|
|
|
7638
7693
|
*/
|
|
7639
7694
|
sparsePaths?: string[];
|
|
7640
7695
|
/**
|
|
7641
|
-
*
|
|
7696
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7642
7697
|
*/
|
|
7643
7698
|
skipLfs?: boolean;
|
|
7644
7699
|
} | {
|
|
@@ -7660,7 +7715,7 @@ export declare interface Settings {
|
|
|
7660
7715
|
*/
|
|
7661
7716
|
sparsePaths?: string[];
|
|
7662
7717
|
/**
|
|
7663
|
-
*
|
|
7718
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7664
7719
|
*/
|
|
7665
7720
|
skipLfs?: boolean;
|
|
7666
7721
|
} | {
|
|
@@ -7867,7 +7922,7 @@ export declare interface Settings {
|
|
|
7867
7922
|
*/
|
|
7868
7923
|
sparsePaths?: string[];
|
|
7869
7924
|
/**
|
|
7870
|
-
*
|
|
7925
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7871
7926
|
*/
|
|
7872
7927
|
skipLfs?: boolean;
|
|
7873
7928
|
} | {
|
|
@@ -7889,7 +7944,7 @@ export declare interface Settings {
|
|
|
7889
7944
|
*/
|
|
7890
7945
|
sparsePaths?: string[];
|
|
7891
7946
|
/**
|
|
7892
|
-
*
|
|
7947
|
+
* Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
|
|
7893
7948
|
*/
|
|
7894
7949
|
skipLfs?: boolean;
|
|
7895
7950
|
} | {
|