@anthropic-ai/claude-agent-sdk 0.3.209 → 0.3.211
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.d.ts +8 -6
- package/bridge.mjs +76 -76
- package/browser-sdk.js +12 -12
- package/manifest.json +21 -20
- package/manifest.zst.json +25 -24
- package/package.json +10 -10
- package/sdk-tools.d.ts +55 -2
- package/sdk.d.ts +78 -9
- package/sdk.mjs +58 -58
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-07-
|
|
2
|
+
"version": "2.1.211",
|
|
3
|
+
"commit": "17a4b6d7b2ee1936b95e595054c7e7d38fddafb7",
|
|
4
|
+
"buildDate": "2026-07-15T16:42:49Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "5a728a76198b6eca7f3c7cdbff43bab44b77b48c2108f7a3107d889773382629",
|
|
9
|
+
"size": 242445680
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "33049eb14cf4702b992b7eda41ec077fc6e76539f7fd046e6d32538757235da4",
|
|
14
|
+
"size": 251966736
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "1fff7e8f947c07b19d10b1fbf714b7e547e9536253b9b58230d8adbc4624f867",
|
|
19
|
+
"size": 258849520
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "8272c8a474ac9ea1bc35f19b9f7c7e7dc4dc4eb6d5ad3e484b19335ac72446b2",
|
|
24
|
+
"size": 262023992
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "ca094a85ea464b2ebec2ecfcc9e2c056573d4ca95ebe12ffae2c7dccb722e17b",
|
|
29
|
+
"size": 252097720
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "c99bd7934ac841d5be6ee7d3644cb63bccef2cd495c6c1bb982a1b1deac1b466",
|
|
34
|
+
"size": 256680320
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "3d8509ae7de11d77dbdc711aa320fc6d5064ce795464a8670696611b57093caf",
|
|
39
|
+
"size": 253293728
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "a0f9bab0dbdda9b43a8765d54e329e44484d9dd7d4f40cf31db6eee27a2da41c",
|
|
44
|
+
"size": 247643808
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"sdkCompat": {
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
"0.3.204",
|
|
64
64
|
"0.3.205",
|
|
65
65
|
"0.3.207",
|
|
66
|
-
"0.3.208"
|
|
66
|
+
"0.3.208",
|
|
67
|
+
"0.3.209"
|
|
67
68
|
],
|
|
68
69
|
"harnessSchema": 1
|
|
69
70
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-07-
|
|
2
|
+
"version": "2.1.211",
|
|
3
|
+
"commit": "17a4b6d7b2ee1936b95e595054c7e7d38fddafb7",
|
|
4
|
+
"buildDate": "2026-07-15T16:44:23Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "96e6bc497e39cecdb63ac449f26d3eca54870e1d73fe4664c816f5e38440112e",
|
|
9
|
+
"size": 49913141,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "6d0cabcaee7f2fdc7c37a14eacd5cffaafaf6fb16d59225c464de426d4634bb4",
|
|
12
|
+
"size": 49917482
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "bec7a90b476f28af6d572f07dc553b75bd31215ef13ac470fec30e23636444ee",
|
|
18
|
+
"size": 54366611,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "d97f221e917e337911e2b6b0897b22fd2361428627b6e0324e0561218858c6d4",
|
|
21
|
+
"size": 54363292
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "d9c04a9c1ce0e795c9e6de00bb77415fcdd291d2c9e2ef26f9c6d86cb666ddf3",
|
|
27
|
+
"size": 58963439
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "f90ff81999ed7d0b509db2a750d1f148d4814eef44cea68ed99c315b02672b6c",
|
|
32
|
+
"size": 60275709
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "4435a40b0ec723721a4f974d0afc26877576228ba40368f51f6ae7ef08221dac",
|
|
37
|
+
"size": 57686071
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "1b10c1ff37f4aa689c0d87ab929e01b4ecc945f9434767f0ec3b125e217863e3",
|
|
42
|
+
"size": 59054974
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "34f136939b7df0a1eca476f58ec8ba00621926963a76f1db8aa132b21042fe2b",
|
|
47
|
+
"size": 60660958
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "c923a9f914d8667443e8f4ba9ae09c6a674dd0c27f3360cdf0082c9fa28259b3",
|
|
52
|
+
"size": 58633026
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"sdkCompat": {
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
"0.3.204",
|
|
72
72
|
"0.3.205",
|
|
73
73
|
"0.3.207",
|
|
74
|
-
"0.3.208"
|
|
74
|
+
"0.3.208",
|
|
75
|
+
"0.3.209"
|
|
75
76
|
],
|
|
76
77
|
"harnessSchema": 1
|
|
77
78
|
}
|
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.211",
|
|
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.211",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.211",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.211",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.211",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.211",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.211",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.211",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.211"
|
|
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.211"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type ToolInputSchemas =
|
|
|
20
20
|
| GrepInput
|
|
21
21
|
| TaskStopInput
|
|
22
22
|
| ListMcpResourcesInput
|
|
23
|
+
| RefreshMcpToolsInput
|
|
23
24
|
| McpInput
|
|
24
25
|
| NotebookEditInput
|
|
25
26
|
| ReadMcpResourceDirInput
|
|
@@ -61,6 +62,7 @@ export type ToolOutputSchemas =
|
|
|
61
62
|
| GrepOutput
|
|
62
63
|
| TaskStopOutput
|
|
63
64
|
| ListMcpResourcesOutput
|
|
65
|
+
| RefreshMcpToolsOutput
|
|
64
66
|
| McpOutput
|
|
65
67
|
| NotebookEditOutput
|
|
66
68
|
| ReadMcpResourceDirOutput
|
|
@@ -341,6 +343,32 @@ export type ListMcpResourcesOutput = {
|
|
|
341
343
|
*/
|
|
342
344
|
server: string;
|
|
343
345
|
}[];
|
|
346
|
+
export type RefreshMcpToolsOutput = {
|
|
347
|
+
/**
|
|
348
|
+
* Server name
|
|
349
|
+
*/
|
|
350
|
+
server: string;
|
|
351
|
+
/**
|
|
352
|
+
* refreshed: tool list re-queried and applied. error: the re-query failed and the previous tool set was kept. not_connected: the server has no live connection to query (this tool never dials).
|
|
353
|
+
*/
|
|
354
|
+
status: "refreshed" | "error" | "not_connected";
|
|
355
|
+
/**
|
|
356
|
+
* Number of tools now available from this server
|
|
357
|
+
*/
|
|
358
|
+
toolCount?: number;
|
|
359
|
+
/**
|
|
360
|
+
* Tool names this refresh added
|
|
361
|
+
*/
|
|
362
|
+
added?: string[];
|
|
363
|
+
/**
|
|
364
|
+
* Tool names this refresh removed
|
|
365
|
+
*/
|
|
366
|
+
removed?: string[];
|
|
367
|
+
/**
|
|
368
|
+
* Why the refresh failed or the server was unavailable
|
|
369
|
+
*/
|
|
370
|
+
error?: string;
|
|
371
|
+
}[];
|
|
344
372
|
/**
|
|
345
373
|
* MCP tool execution result
|
|
346
374
|
*/
|
|
@@ -375,8 +403,10 @@ export type ArtifactOutput =
|
|
|
375
403
|
title: string;
|
|
376
404
|
url: string;
|
|
377
405
|
updatedAt?: string;
|
|
406
|
+
rel?: "mine" | "shared";
|
|
378
407
|
}[];
|
|
379
408
|
truncated?: boolean;
|
|
409
|
+
scope?: "shared" | "all";
|
|
380
410
|
};
|
|
381
411
|
export type ProjectsOutput =
|
|
382
412
|
| {
|
|
@@ -675,6 +705,12 @@ export interface ListMcpResourcesInput {
|
|
|
675
705
|
*/
|
|
676
706
|
server?: string;
|
|
677
707
|
}
|
|
708
|
+
export interface RefreshMcpToolsInput {
|
|
709
|
+
/**
|
|
710
|
+
* Optional server name: refresh only this server. Omit to refresh all connected servers.
|
|
711
|
+
*/
|
|
712
|
+
server?: string;
|
|
713
|
+
}
|
|
678
714
|
export interface McpInput {
|
|
679
715
|
[k: string]: unknown;
|
|
680
716
|
}
|
|
@@ -2609,11 +2645,11 @@ export interface MonitorInput {
|
|
|
2609
2645
|
}
|
|
2610
2646
|
export interface ArtifactInput {
|
|
2611
2647
|
/**
|
|
2612
|
-
* Omit (or 'publish') to publish file_path. 'list' enumerates the user's
|
|
2648
|
+
* 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.
|
|
2613
2649
|
*/
|
|
2614
2650
|
action?: "publish" | "list";
|
|
2615
2651
|
/**
|
|
2616
|
-
* Path to an .html or .md file to render. Required to publish (the default action). Use a short, distinctive basename — it is the
|
|
2652
|
+
* Path to an .html or .md file to render. Required to publish (the default action). Use a short, distinctive basename — it is the last-resort title when the HTML has no <title> and no `title` parameter is given.
|
|
2617
2653
|
*/
|
|
2618
2654
|
file_path?: string;
|
|
2619
2655
|
/**
|
|
@@ -2624,6 +2660,14 @@ export interface ArtifactInput {
|
|
|
2624
2660
|
* list only: maximum artifacts to return (default 25).
|
|
2625
2661
|
*/
|
|
2626
2662
|
limit?: number;
|
|
2663
|
+
/**
|
|
2664
|
+
* list only: 'mine' (default) lists artifacts the user owns — the only ones the update flow can target; 'shared' lists artifacts other people shared with the user (read-only); 'all' lists both. Rows are labeled (mine)/(shared) whenever scope is not 'mine'.
|
|
2665
|
+
*/
|
|
2666
|
+
scope?: "mine" | "shared" | "all";
|
|
2667
|
+
/**
|
|
2668
|
+
* Title for the artifact — the name shown in the browser tab and gallery. Prefer a <title> tag in the HTML itself; this parameter fills in only when the file lacks one and never overrides the tag. HTML publishes only — Markdown pages keep their filename identity. Content always comes from file_path — there is no inline content parameter.
|
|
2669
|
+
*/
|
|
2670
|
+
title?: string;
|
|
2627
2671
|
/**
|
|
2628
2672
|
* One-sentence subtitle shown on the gallery card. Say what the page is or does.
|
|
2629
2673
|
*/
|
|
@@ -2697,6 +2741,14 @@ export interface BashOutput {
|
|
|
2697
2741
|
* True if the user manually backgrounded the command with Ctrl+B
|
|
2698
2742
|
*/
|
|
2699
2743
|
backgroundedByUser?: boolean;
|
|
2744
|
+
/**
|
|
2745
|
+
* Set when the command hit its timeout and was auto-backgrounded; the timeout value in ms
|
|
2746
|
+
*/
|
|
2747
|
+
timedOutAfterMs?: number;
|
|
2748
|
+
/**
|
|
2749
|
+
* Model-facing note that the session cwd was not changed by a backgrounded command containing a directory-change builtin (cd/pushd/popd/chdir)
|
|
2750
|
+
*/
|
|
2751
|
+
backgroundCwdHint?: string;
|
|
2700
2752
|
/**
|
|
2701
2753
|
* Flag to indicate if sandbox mode was overridden
|
|
2702
2754
|
*/
|
|
@@ -2913,6 +2965,7 @@ export interface GrepOutput {
|
|
|
2913
2965
|
numLines?: number;
|
|
2914
2966
|
numMatches?: number;
|
|
2915
2967
|
totalFiles?: number;
|
|
2968
|
+
totalLines?: number;
|
|
2916
2969
|
appliedLimit?: number;
|
|
2917
2970
|
appliedOffset?: number;
|
|
2918
2971
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -1463,7 +1463,7 @@ export declare type Options = {
|
|
|
1463
1463
|
* Enable beta features. Currently supported:
|
|
1464
1464
|
* - `'context-1m-2025-08-07'` - Enable 1M token context window (Sonnet 4/4.5 only)
|
|
1465
1465
|
*
|
|
1466
|
-
* @see https://
|
|
1466
|
+
* @see https://platform.claude.com/docs/en/api/beta-headers
|
|
1467
1467
|
*/
|
|
1468
1468
|
betas?: SdkBeta[];
|
|
1469
1469
|
/**
|
|
@@ -1607,7 +1607,7 @@ export declare type Options = {
|
|
|
1607
1607
|
*
|
|
1608
1608
|
* When set, takes precedence over the deprecated `maxThinkingTokens`.
|
|
1609
1609
|
*
|
|
1610
|
-
* @see https://
|
|
1610
|
+
* @see https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking
|
|
1611
1611
|
*/
|
|
1612
1612
|
thinking?: ThinkingConfig;
|
|
1613
1613
|
/**
|
|
@@ -1620,7 +1620,7 @@ export declare type Options = {
|
|
|
1620
1620
|
* - `'xhigh'` — Deeper than high (Fable 5, Opus 4.7+, Sonnet 5)
|
|
1621
1621
|
* - `'max'` — Maximum effort (Fable 5, Opus 4.6+, Sonnet 4.6+)
|
|
1622
1622
|
*
|
|
1623
|
-
* @see https://
|
|
1623
|
+
* @see https://platform.claude.com/docs/en/build-with-claude/effort
|
|
1624
1624
|
*/
|
|
1625
1625
|
effort?: EffortLevel;
|
|
1626
1626
|
/**
|
|
@@ -1813,7 +1813,7 @@ export declare type Options = {
|
|
|
1813
1813
|
* }
|
|
1814
1814
|
* ```
|
|
1815
1815
|
*
|
|
1816
|
-
* @see https://
|
|
1816
|
+
* @see https://code.claude.com/docs/en/settings#sandbox-settings
|
|
1817
1817
|
*/
|
|
1818
1818
|
sandbox?: SandboxSettings;
|
|
1819
1819
|
/**
|
|
@@ -2014,6 +2014,15 @@ export declare type Options = {
|
|
|
2014
2014
|
spawnClaudeCodeProcess?: (options: SpawnOptions) => SpawnedProcess;
|
|
2015
2015
|
};
|
|
2016
2016
|
|
|
2017
|
+
/**
|
|
2018
|
+
* Emitted on the same severity:'error' path as the usage-limit bucket, but
|
|
2019
|
+
* the condition is an org policy, not an exhausted limit — consumers route
|
|
2020
|
+
* these to org-disabled presentation, never the usage-limit card.
|
|
2021
|
+
*
|
|
2022
|
+
* @alpha
|
|
2023
|
+
*/
|
|
2024
|
+
export declare const ORG_POLICY_LIMIT_PREFIXES: readonly ["This service is disabled for your org"];
|
|
2025
|
+
|
|
2017
2026
|
export declare type OutputFormat = JsonSchemaOutputFormat;
|
|
2018
2027
|
|
|
2019
2028
|
export declare type OutputFormatType = 'json_schema';
|
|
@@ -2483,9 +2492,16 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2483
2492
|
* are managed by the CLI subprocess.
|
|
2484
2493
|
*
|
|
2485
2494
|
* Note: This only affects servers added dynamically via this method or the SDK.
|
|
2486
|
-
* Servers configured via settings files are not affected.
|
|
2495
|
+
* Servers configured via settings files are not affected. Servers introduced
|
|
2496
|
+
* by plugins are also exempt: they are managed by the plugin system, so
|
|
2497
|
+
* omitting them from the payload does NOT remove them — they keep running
|
|
2498
|
+
* (unless enterprise policy denies the server) and are simply absent from
|
|
2499
|
+
* the result's `removed` list. In particular, `setMcpServers({})` no longer
|
|
2500
|
+
* guarantees a session has zero dynamic MCP surface when plugins are
|
|
2501
|
+
* loaded. Naming a plugin server explicitly in the payload still replaces
|
|
2502
|
+
* it (ownership is preserved CLI-side).
|
|
2487
2503
|
*
|
|
2488
|
-
* @param servers - Record of server name to configuration. Pass an empty object to remove all dynamic servers.
|
|
2504
|
+
* @param servers - Record of server name to configuration. Pass an empty object to remove all dynamic servers (except plugin-owned ones, which are retained).
|
|
2489
2505
|
* @returns Information about which servers were added, removed, and any connection errors
|
|
2490
2506
|
*/
|
|
2491
2507
|
setMcpServers(servers: Record<string, McpServerConfig>): Promise<McpSetServersResult>;
|
|
@@ -2792,6 +2808,10 @@ export declare type SDKAssistantMessage = {
|
|
|
2792
2808
|
uuid: UUID;
|
|
2793
2809
|
session_id: string;
|
|
2794
2810
|
request_id?: string;
|
|
2811
|
+
/**
|
|
2812
|
+
* This turn continued the preceding truncated assistant turn inside its trailing signed thinking block (max-output-tokens recovery). Its thinking signatures are cumulative over that preceding thinking-only turn, so a history replayed through the bridge must carry this flag back for the normalizer to keep the run's prefix on the wire. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model.
|
|
2813
|
+
*/
|
|
2814
|
+
resumed_from_incomplete_thinking?: true;
|
|
2795
2815
|
/**
|
|
2796
2816
|
* Wire uuids of previously-delivered messages that this message replaces (refusal-fallback supersede). The list can include tombstoned tool_result frames from the refused leg, not only assistant frames. Evict the named messages on arrival and treat this frame as their canonical replacement. Idempotent with the end-of-turn model_refusal_fallback notice, whose retracted_message_uuids remains the complete audit record for the turn.
|
|
2797
2817
|
*/
|
|
@@ -2805,7 +2825,10 @@ export declare type SDKAssistantMessage = {
|
|
|
2805
2825
|
*/
|
|
2806
2826
|
task_description?: string;
|
|
2807
2827
|
|
|
2808
|
-
|
|
2828
|
+
/**
|
|
2829
|
+
* ISO timestamp of when this content block finished on the originating process. One API assistant turn may produce several assistant messages sharing a message.id, each with its own timestamp. Uses the originating host's clock, so it's for display only; do not order messages by this field. Older emitters omit it; consumers should fall back to receive time.
|
|
2830
|
+
*/
|
|
2831
|
+
timestamp?: string;
|
|
2809
2832
|
|
|
2810
2833
|
|
|
2811
2834
|
|
|
@@ -3414,7 +3437,7 @@ declare type SDKControlListModelsRequest = {
|
|
|
3414
3437
|
};
|
|
3415
3438
|
|
|
3416
3439
|
/**
|
|
3417
|
-
* Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
|
|
3440
|
+
* Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. A target server that is not yet connected is brought up on demand: dispatch runs the deferred plugin/MCP startup resolution (the work a first model turn would have done) and waits up to 30s — shortened by expires_at when that is sooner — for the server to connect before answering "MCP server not connected", so a dispatch that races plugin startup (e.g. after an idle-wake reattach) succeeds instead of failing until a turn runs. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
|
|
3418
3441
|
*/
|
|
3419
3442
|
declare type SDKControlMcpCallRequest = {
|
|
3420
3443
|
subtype: 'mcp_call';
|
|
@@ -3909,7 +3932,7 @@ export declare type SDKMemoryRecallMessage = {
|
|
|
3909
3932
|
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKControlRequestProgressMessage | SDKModelRefusalFallbackMessage | SDKModelRefusalNoFallbackMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKBackgroundTasksChangedMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKWorkerShuttingDownMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage | SDKInformationalMessage | SDKConversationResetMessage;
|
|
3910
3933
|
|
|
3911
3934
|
/**
|
|
3912
|
-
* Provenance of a user-role message (peer session, team lead, channel).
|
|
3935
|
+
* Provenance of a user-role message (peer session, team lead, channel). A host wrapping keyboard input must stamp {kind:'human'} explicitly — absent origin is treated as unattributed and fails closed at strict isHuman() trust gates.
|
|
3913
3936
|
*/
|
|
3914
3937
|
export declare type SDKMessageOrigin = {
|
|
3915
3938
|
kind: 'human';
|
|
@@ -4816,6 +4839,10 @@ export declare interface Settings {
|
|
|
4816
4839
|
* Command to refresh GCP authentication (e.g., gcloud auth application-default login)
|
|
4817
4840
|
*/
|
|
4818
4841
|
gcpAuthRefresh?: string;
|
|
4842
|
+
/**
|
|
4843
|
+
* Corporate launcher argv prefix for the background-agent supervisor, the sessions and workers it hosts, and the other covered background processes listed in the Claude Code corporate-launcher documentation. Equivalent to the CLAUDE_CODE_PROCESS_WRAPPER environment variable, which takes precedence when set. Honored from managed settings, a --settings/SDK-supplied settings file, and user settings, in that precedence order; project and local settings are ignored.
|
|
4844
|
+
*/
|
|
4845
|
+
processWrapper?: string;
|
|
4819
4846
|
/**
|
|
4820
4847
|
* Executable that computes managed settings at startup. Honored only from admin-controlled policy sources.
|
|
4821
4848
|
*/
|
|
@@ -6494,6 +6521,12 @@ export declare interface SpawnedProcess {
|
|
|
6494
6521
|
readonly killed: boolean;
|
|
6495
6522
|
/** Exit code if the process has exited, null otherwise */
|
|
6496
6523
|
readonly exitCode: number | null;
|
|
6524
|
+
/**
|
|
6525
|
+
* Signal that terminated the process, if any. Optional: ChildProcess
|
|
6526
|
+
* provides it; custom spawners may omit it (signal exits then read as
|
|
6527
|
+
* still-running until their 'exit' event delivers the signal).
|
|
6528
|
+
*/
|
|
6529
|
+
readonly signalCode?: NodeJS.Signals | null;
|
|
6497
6530
|
/**
|
|
6498
6531
|
* Kill the process with the given signal
|
|
6499
6532
|
* @param signal - The signal to send (e.g., 'SIGTERM', 'SIGKILL')
|
|
@@ -6503,6 +6536,11 @@ export declare interface SpawnedProcess {
|
|
|
6503
6536
|
* Register a callback for when the process exits
|
|
6504
6537
|
* @param event - Must be 'exit'
|
|
6505
6538
|
* @param listener - Callback receiving exit code and signal
|
|
6539
|
+
*
|
|
6540
|
+
* ProcessTransport's built-in local spawn delivers this only after the
|
|
6541
|
+
* child's stderr has also closed (bounded by a short grace), so exit
|
|
6542
|
+
* consumers see a complete stderr tail in exit errors. Custom
|
|
6543
|
+
* `spawnClaudeCodeProcess` implementations emit plain process exit.
|
|
6506
6544
|
*/
|
|
6507
6545
|
on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): void;
|
|
6508
6546
|
/**
|
|
@@ -6827,6 +6865,33 @@ export declare interface Transport {
|
|
|
6827
6865
|
[Symbol.dispose]?(): void;
|
|
6828
6866
|
}
|
|
6829
6867
|
|
|
6868
|
+
/**
|
|
6869
|
+
* Messages meaning "a usage limit was genuinely reached" — the error-path
|
|
6870
|
+
* outputs of getLimitReachedText (rateLimitMessages.ts) and
|
|
6871
|
+
* getFableCreditsRequiredContent (api/errors.ts).
|
|
6872
|
+
*
|
|
6873
|
+
* @alpha
|
|
6874
|
+
*/
|
|
6875
|
+
export declare const USAGE_LIMIT_ERROR_PREFIXES: readonly ["You've hit your", "You've reached your", "You're out of usage credits", "Your org is out of usage · add funds to continue", "Your org is out of usage · contact your admin", "Your seat type doesn't include usage credits", "Your seat type doesn't include usage", "Your usage allocation has been disabled by your admin", "Your group's usage limit is set to $0", "Fable 5 requires usage credits", "You're out of extra usage", "Your seat type doesn't include extra usage"];
|
|
6876
|
+
|
|
6877
|
+
/**
|
|
6878
|
+
* Overage-transition notifications ("now drawing from credits"). Toast only;
|
|
6879
|
+
* these never arrive as API errors.
|
|
6880
|
+
*
|
|
6881
|
+
* @alpha
|
|
6882
|
+
*/
|
|
6883
|
+
export declare const USAGE_TRANSITION_PREFIXES: readonly ["You're now using usage credits", "You're now using your usage allocation", "Now using your usage allocation", "Now using usage credits", "You're now using extra usage", "Now using extra usage"];
|
|
6884
|
+
|
|
6885
|
+
/**
|
|
6886
|
+
* Approaching-limit warnings (severity:'warning'). Footer/toast only; these
|
|
6887
|
+
* never arrive as API errors. ("Approaching …" early warnings are
|
|
6888
|
+
* deliberately unregistered — they render in the footer without
|
|
6889
|
+
* <RateLimitMessage> styling; see the generator-coverage tests.)
|
|
6890
|
+
*
|
|
6891
|
+
* @alpha
|
|
6892
|
+
*/
|
|
6893
|
+
export declare const USAGE_WARNING_PREFIXES: readonly ["You've used", "You're close to"];
|
|
6894
|
+
|
|
6830
6895
|
/**
|
|
6831
6896
|
* A `request_user_dialog` control request from the CLI, asking the SDK
|
|
6832
6897
|
* consumer to render a blocking dialog and return the user's choice.
|
|
@@ -6877,6 +6942,10 @@ export declare type UserPromptExpansionHookSpecificOutput = {
|
|
|
6877
6942
|
export declare type UserPromptSubmitHookInput = BaseHookInput & {
|
|
6878
6943
|
hook_event_name: 'UserPromptSubmit';
|
|
6879
6944
|
prompt: string;
|
|
6945
|
+
/**
|
|
6946
|
+
* Who authored/injected the prompt: `user` = submitted from the interactive composer, `sdk` = non-interactive entrypoint (`-p` / Agent SDK), `loop_wakeup` = dynamic /loop wakeup, `schedule_wakeup` = scheduled-task fire (CronCreate/routine), `system` = other machine-injected turns (peer/channel messages, task notifications, auto-continuation). Currently only set for Anthropic-internal sessions while the field is trialed; external payloads omit it.
|
|
6947
|
+
*/
|
|
6948
|
+
source?: 'user' | 'sdk' | 'system' | 'loop_wakeup' | 'schedule_wakeup';
|
|
6880
6949
|
session_title?: string;
|
|
6881
6950
|
};
|
|
6882
6951
|
|