@anthropic-ai/claude-agent-sdk 0.3.276 → 0.3.278
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.d.ts +1 -1
- package/bridge.mjs +103 -103
- package/browser-sdk.js +6 -6
- package/manifest.json +23 -23
- package/manifest.zst.json +27 -27
- package/package.json +10 -10
- package/sdk-tools.d.ts +0 -92
- package/sdk.d.ts +44 -20
- package/sdk.mjs +81 -81
package/manifest.json
CHANGED
|
@@ -1,55 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.278",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "809c980662e3525645594dc8b74f78c38a348db1",
|
|
5
|
+
"modsCommit": "31a3b00bef145a0393d9dbf840a98674fec07712",
|
|
6
|
+
"buildDate": "2026-09-19T01:22:08Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "bd245662fb8a0e321b3bf133e930371d6563c387527885f30b2613aef3ba14d6",
|
|
11
|
+
"size": 217695408
|
|
12
12
|
},
|
|
13
13
|
"darwin-x64": {
|
|
14
14
|
"binary": "claude",
|
|
15
|
-
"checksum": "
|
|
16
|
-
"size":
|
|
15
|
+
"checksum": "c522425e3d42275d2ac2238757ef8ba7f80d165a934044ec5a7a5fd7d7b9950b",
|
|
16
|
+
"size": 226521952
|
|
17
17
|
},
|
|
18
18
|
"linux-arm64": {
|
|
19
19
|
"binary": "claude",
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "7de6cab134e48321148e30182c98614118e8f4666819412bead45865190b34ed",
|
|
21
|
+
"size": 234021104
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
24
|
"binary": "claude",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "5c4735937844e84f8a93306e841a5b0e12252909b07870f789b190468da147ab",
|
|
26
|
+
"size": 234119480
|
|
27
27
|
},
|
|
28
28
|
"linux-arm64-musl": {
|
|
29
29
|
"binary": "claude",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "cc8266db086b92faa10180d8c34fb4f196022ad13d0d8800b656966f94a9f0f4",
|
|
31
|
+
"size": 226637472
|
|
32
32
|
},
|
|
33
33
|
"linux-x64-musl": {
|
|
34
34
|
"binary": "claude",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "e21d4818a7282c1b18f7949af863a58e640f017a8ffa4053f5ae927ac95d954a",
|
|
36
|
+
"size": 228036568
|
|
37
37
|
},
|
|
38
38
|
"win32-x64": {
|
|
39
39
|
"binary": "claude.exe",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "006ea5c8638f67f10a5ae66bb232fd267c9f6af294e3f03f4cfcf1fd3f2cced8",
|
|
41
|
+
"size": 237232800
|
|
42
42
|
},
|
|
43
43
|
"win32-arm64": {
|
|
44
44
|
"binary": "claude.exe",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "099128d103db9f10ca4e23c91b586ed7939f6c27deade560734fd8a8ba8e2b5f",
|
|
46
|
+
"size": 228457632
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"sdkCompat": {
|
|
50
50
|
"testedWrapperVersions": [
|
|
51
|
-
"0.3.237",
|
|
52
|
-
"0.3.238",
|
|
53
51
|
"0.3.239",
|
|
54
52
|
"0.3.240",
|
|
55
53
|
"0.3.241",
|
|
@@ -77,7 +75,9 @@
|
|
|
77
75
|
"0.3.272",
|
|
78
76
|
"0.3.273",
|
|
79
77
|
"0.3.274",
|
|
80
|
-
"0.3.275"
|
|
78
|
+
"0.3.275",
|
|
79
|
+
"0.3.276",
|
|
80
|
+
"0.3.277"
|
|
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.278",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "809c980662e3525645594dc8b74f78c38a348db1",
|
|
5
|
+
"modsCommit": "31a3b00bef145a0393d9dbf840a98674fec07712",
|
|
6
|
+
"buildDate": "2026-09-19T01:23:12Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude.zst",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "dba9162d25e74c59ad72c9df72f80cbc42ecc984137effc095d3efc6cdba5688",
|
|
11
|
+
"size": 71680385,
|
|
12
12
|
"bundle": {
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "1d99d25dd40f9e4fa26d51f243d5537fe72ee105506bf7ab2473da247e81c383",
|
|
14
|
+
"size": 71682327
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"darwin-x64": {
|
|
18
18
|
"binary": "claude.zst",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "b4b9893caa7e2a03603f957fcfeb796e44adfdb205e65e58600c096aedb92bc9",
|
|
20
|
+
"size": 75875517,
|
|
21
21
|
"bundle": {
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "35afa32d1b9bac1ff525a97666955450381cd0221d536d16cffcc9dd353f5012",
|
|
23
|
+
"size": 75883179
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64": {
|
|
27
27
|
"binary": "claude.zst",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "4b758a132d4e52d5580ff13d127f3b21aac02c780cbf8803485ab2b5a14dff1b",
|
|
29
|
+
"size": 80854910
|
|
30
30
|
},
|
|
31
31
|
"linux-x64": {
|
|
32
32
|
"binary": "claude.zst",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "5f5db204251b8457ac68b2004ed140a50c8feea62e5246cc28cde8d04ad760cb",
|
|
34
|
+
"size": 81468815
|
|
35
35
|
},
|
|
36
36
|
"linux-arm64-musl": {
|
|
37
37
|
"binary": "claude.zst",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "d23b5988351582876f3b560b75db3f838af4361358e1268ea254b43eebd745af",
|
|
39
|
+
"size": 79306049
|
|
40
40
|
},
|
|
41
41
|
"linux-x64-musl": {
|
|
42
42
|
"binary": "claude.zst",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "c02648026dd185b43a34baa0c4668fdd1d8e4a8a7ebfcc1132ffce836b95e0b0",
|
|
44
|
+
"size": 79966866
|
|
45
45
|
},
|
|
46
46
|
"win32-x64": {
|
|
47
47
|
"binary": "claude.exe.zst",
|
|
48
|
-
"checksum": "
|
|
49
|
-
"size":
|
|
48
|
+
"checksum": "29d81b3f574221ca5e354186e31297923b412b06c6d93ff96b75dbd5fb3809e4",
|
|
49
|
+
"size": 83867525
|
|
50
50
|
},
|
|
51
51
|
"win32-arm64": {
|
|
52
52
|
"binary": "claude.exe.zst",
|
|
53
|
-
"checksum": "
|
|
54
|
-
"size":
|
|
53
|
+
"checksum": "35b0714245e6a9f659af91725ea9e65fa215f87822ee7ec3520aabc6a0a28e45",
|
|
54
|
+
"size": 80611186
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"sdkCompat": {
|
|
58
58
|
"testedWrapperVersions": [
|
|
59
|
-
"0.3.237",
|
|
60
|
-
"0.3.238",
|
|
61
59
|
"0.3.239",
|
|
62
60
|
"0.3.240",
|
|
63
61
|
"0.3.241",
|
|
@@ -85,7 +83,9 @@
|
|
|
85
83
|
"0.3.272",
|
|
86
84
|
"0.3.273",
|
|
87
85
|
"0.3.274",
|
|
88
|
-
"0.3.275"
|
|
86
|
+
"0.3.275",
|
|
87
|
+
"0.3.276",
|
|
88
|
+
"0.3.277"
|
|
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.278",
|
|
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.278",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.278",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.278",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.278",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.278",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.278",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.278",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.278"
|
|
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.278"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
export type ToolInputSchemas =
|
|
12
12
|
| AgentInput
|
|
13
13
|
| BashInput
|
|
14
|
-
| TaskOutputInput
|
|
15
14
|
| ExitPlanModeInput
|
|
16
15
|
| FileEditInput
|
|
17
16
|
| FileReadInput
|
|
@@ -38,7 +37,6 @@ export type ToolInputSchemas =
|
|
|
38
37
|
| TaskGetInput
|
|
39
38
|
| TaskUpdateInput
|
|
40
39
|
| TaskListInput
|
|
41
|
-
| REPLInput
|
|
42
40
|
| WorkflowInput
|
|
43
41
|
| CronCreateInput
|
|
44
42
|
| CronDeleteInput
|
|
@@ -92,7 +90,6 @@ export type ToolOutputSchemas =
|
|
|
92
90
|
| ProposeSkillsOutput
|
|
93
91
|
| ProposeGoalOutput
|
|
94
92
|
| EnterPlanModeOutput
|
|
95
|
-
| REPLOutput
|
|
96
93
|
| WorkflowOutput
|
|
97
94
|
| CronCreateOutput
|
|
98
95
|
| CronDeleteOutput
|
|
@@ -822,20 +819,6 @@ export interface BashInput {
|
|
|
822
819
|
*/
|
|
823
820
|
dangerouslyDisableSandbox?: boolean;
|
|
824
821
|
}
|
|
825
|
-
export interface TaskOutputInput {
|
|
826
|
-
/**
|
|
827
|
-
* The task ID to get output from
|
|
828
|
-
*/
|
|
829
|
-
task_id: string;
|
|
830
|
-
/**
|
|
831
|
-
* Whether to wait for completion
|
|
832
|
-
*/
|
|
833
|
-
block: boolean;
|
|
834
|
-
/**
|
|
835
|
-
* Max wait time in ms
|
|
836
|
-
*/
|
|
837
|
-
timeout: number;
|
|
838
|
-
}
|
|
839
822
|
export interface ExitPlanModeInput {
|
|
840
823
|
/**
|
|
841
824
|
* Deprecated: no longer used.
|
|
@@ -2849,20 +2832,6 @@ export interface TaskUpdateInput {
|
|
|
2849
2832
|
};
|
|
2850
2833
|
}
|
|
2851
2834
|
export interface TaskListInput {}
|
|
2852
|
-
export interface REPLInput {
|
|
2853
|
-
/**
|
|
2854
|
-
* JavaScript code to execute. Supports top-level await. State persists across calls.
|
|
2855
|
-
*/
|
|
2856
|
-
code: string;
|
|
2857
|
-
/**
|
|
2858
|
-
* Clear, concise description of what this script does in active voice (5-10 words). E.g. "Trace upgrade message to its GrowthBook flag"
|
|
2859
|
-
*/
|
|
2860
|
-
description?: string;
|
|
2861
|
-
/**
|
|
2862
|
-
* Optional timeout in milliseconds (default 30000, max 600000)
|
|
2863
|
-
*/
|
|
2864
|
-
timeout?: number;
|
|
2865
|
-
}
|
|
2866
2835
|
export interface WorkflowInput {
|
|
2867
2836
|
/**
|
|
2868
2837
|
* Self-contained workflow script. Must begin with `export const meta = { name, description, phases }` (pure literal, no computed values) followed by the script body using agent()/parallel()/pipeline()/phase().
|
|
@@ -4109,67 +4078,6 @@ export interface EnterPlanModeOutput {
|
|
|
4109
4078
|
*/
|
|
4110
4079
|
message: string;
|
|
4111
4080
|
}
|
|
4112
|
-
export interface REPLOutput {
|
|
4113
|
-
/**
|
|
4114
|
-
* The code that was executed
|
|
4115
|
-
*/
|
|
4116
|
-
code: string;
|
|
4117
|
-
/**
|
|
4118
|
-
* Return value from the code execution
|
|
4119
|
-
*/
|
|
4120
|
-
result?: {
|
|
4121
|
-
[k: string]: unknown;
|
|
4122
|
-
};
|
|
4123
|
-
/**
|
|
4124
|
-
* Captured console.log output
|
|
4125
|
-
*/
|
|
4126
|
-
stdout: string;
|
|
4127
|
-
/**
|
|
4128
|
-
* Captured console.error output
|
|
4129
|
-
*/
|
|
4130
|
-
stderr: string;
|
|
4131
|
-
/**
|
|
4132
|
-
* Error message if execution failed
|
|
4133
|
-
*/
|
|
4134
|
-
error?: string;
|
|
4135
|
-
/**
|
|
4136
|
-
* True on an async-dispatch receipt or refusal: the script was handed to the async dispatcher (queued — outcome arrives later as a poll event — or refused at the queue cap), so this Output carries no execution output and resume replay must skip the block
|
|
4137
|
-
*/
|
|
4138
|
-
asyncDispatched?: boolean;
|
|
4139
|
-
/**
|
|
4140
|
-
* Images returned by inner Read calls — surfaced as image content blocks
|
|
4141
|
-
*/
|
|
4142
|
-
images?: {
|
|
4143
|
-
base64: string;
|
|
4144
|
-
mediaType: string;
|
|
4145
|
-
}[];
|
|
4146
|
-
/**
|
|
4147
|
-
* Count of inner-Read images dropped by the per-result image cap; surfaced as a note in the tool_result
|
|
4148
|
-
*/
|
|
4149
|
-
imagesOmitted?: number;
|
|
4150
|
-
/**
|
|
4151
|
-
* Pages of inner page-range Reads that could not be processed as an image; surfaced as one note each in the tool_result
|
|
4152
|
-
*/
|
|
4153
|
-
imagePagesFailed?: {
|
|
4154
|
-
page: number;
|
|
4155
|
-
file?: string;
|
|
4156
|
-
error?: string;
|
|
4157
|
-
}[];
|
|
4158
|
-
/**
|
|
4159
|
-
* Count of failed-page notes dropped by the per-result note cap; surfaced as a note in the tool_result
|
|
4160
|
-
*/
|
|
4161
|
-
imagePagesFailedOmitted?: number;
|
|
4162
|
-
/**
|
|
4163
|
-
* PDFs returned by inner Read calls — surfaced as document content blocks
|
|
4164
|
-
*/
|
|
4165
|
-
documents?: {
|
|
4166
|
-
base64: string;
|
|
4167
|
-
}[];
|
|
4168
|
-
/**
|
|
4169
|
-
* Count of inner-Read PDFs dropped by the per-result document cap; surfaced as a note in the tool_result
|
|
4170
|
-
*/
|
|
4171
|
-
documentsOmitted?: number;
|
|
4172
|
-
}
|
|
4173
4081
|
export interface WorkflowOutput {
|
|
4174
4082
|
status: "async_launched" | "remote_launched";
|
|
4175
4083
|
taskId: string;
|
package/sdk.d.ts
CHANGED
|
@@ -1956,6 +1956,7 @@ export declare type Options = {
|
|
|
1956
1956
|
|
|
1957
1957
|
|
|
1958
1958
|
|
|
1959
|
+
|
|
1959
1960
|
/**
|
|
1960
1961
|
* Enable prompt suggestions. When true, the agent emits a `prompt_suggestion`
|
|
1961
1962
|
* message after each turn with a predicted next user prompt.
|
|
@@ -2738,8 +2739,11 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2738
2739
|
* and when omitted the display mode from session start (`thinking.display`
|
|
2739
2740
|
* / `--thinking-display`) is kept — a session started with thinking
|
|
2740
2741
|
* disabled has none, so re-enabling without this param gets that default.
|
|
2742
|
+
* `'highlights'` (the API's one-line thinking titles) is honored by the
|
|
2743
|
+
* API only for Anthropic-hosted remote sessions; elsewhere the API rejects
|
|
2744
|
+
* it and the session falls back to `'omitted'`.
|
|
2741
2745
|
*/
|
|
2742
|
-
setMaxThinkingTokens(maxThinkingTokens: number | null, thinkingDisplay?: 'summarized' | 'omitted' | null): Promise<void>;
|
|
2746
|
+
setMaxThinkingTokens(maxThinkingTokens: number | null, thinkingDisplay?: 'summarized' | 'omitted' | 'highlights' | null): Promise<void>;
|
|
2743
2747
|
/**
|
|
2744
2748
|
* Merge settings into the flag settings layer. This is the inline `settings`
|
|
2745
2749
|
* option of `query()`, applied mid-session. Flag settings sit above
|
|
@@ -2770,12 +2774,14 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2770
2774
|
* same path /config uses (canonical store root, gitignore upkeep,
|
|
2771
2775
|
* hardened write) — and live-apply them. Unlike applyFlagSettings, which
|
|
2772
2776
|
* only touches the session-scoped flag layer. The handler accepts only an
|
|
2773
|
-
* explicit key allowlist (
|
|
2774
|
-
*
|
|
2775
|
-
*
|
|
2776
|
-
*
|
|
2777
|
+
* explicit key allowlist per file (localSettings: outputStyle; userSettings:
|
|
2778
|
+
* effortLevel, saved for the session's current model as /effort saves it,
|
|
2779
|
+
* without setting the running session's level) with string values — deletion is not
|
|
2780
|
+
* supported — and refuses remote transports and sessions whose
|
|
2781
|
+
* --setting-sources exclude the target source. Rejects with the gate's or
|
|
2782
|
+
* writer's error otherwise.
|
|
2777
2783
|
*/
|
|
2778
|
-
updateSettings(source: 'localSettings', settings: Record<string, unknown>): Promise<void>;
|
|
2784
|
+
updateSettings(source: 'localSettings' | 'userSettings', settings: Record<string, unknown>): Promise<void>;
|
|
2779
2785
|
/**
|
|
2780
2786
|
* Get the full initialization result, including supported commands, models,
|
|
2781
2787
|
* account info, and output style configuration.
|
|
@@ -4765,12 +4771,12 @@ declare type SDKControlSetColorRequest = {
|
|
|
4765
4771
|
};
|
|
4766
4772
|
|
|
4767
4773
|
/**
|
|
4768
|
-
* Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is omitted or null, thinking resets to the session default: any mid-session budget override is cleared (back to the spawn-time budget, if one was set), and thinking stays off for sessions that have it disabled. thinking_display optionally sets the thinking display mode for the rest of the session: a value replaces the session display mode, null clears that override so Claude Code's default display handling applies again, and when omitted the display mode from session start (--thinking-display) is kept.
|
|
4774
|
+
* Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is omitted or null, thinking resets to the session default: any mid-session budget override is cleared (back to the spawn-time budget, if one was set), and thinking stays off for sessions that have it disabled. thinking_display optionally sets the thinking display mode for the rest of the session: a value replaces the session display mode, null clears that override so Claude Code's default display handling applies again, and when omitted the display mode from session start (--thinking-display) is kept. 'highlights' returns one short title per stretch of thinking instead of a prose summary. The API allows it only for Claude Code sessions that Anthropic hosts; for any other client this request still succeeds and the session falls back to 'omitted' (no thinking text) once the API has rejected the value.
|
|
4769
4775
|
*/
|
|
4770
4776
|
declare type SDKControlSetMaxThinkingTokensRequest = {
|
|
4771
4777
|
subtype: 'set_max_thinking_tokens';
|
|
4772
4778
|
max_thinking_tokens?: number | null;
|
|
4773
|
-
thinking_display?: ('summarized' | 'omitted') | null;
|
|
4779
|
+
thinking_display?: ('summarized' | 'omitted' | 'highlights') | null;
|
|
4774
4780
|
};
|
|
4775
4781
|
|
|
4776
4782
|
/**
|
|
@@ -4806,14 +4812,14 @@ declare type SDKControlStopTaskRequest = {
|
|
|
4806
4812
|
};
|
|
4807
4813
|
|
|
4808
4814
|
/**
|
|
4809
|
-
*
|
|
4815
|
+
* Writes settings through the CLI's own writer. For localSettings, merges the given keys into the project's local settings file (canonical store root, gitignore upkeep, hardened write) and live-applies them — the same path /config uses; allowlist: outputStyle. For userSettings, takes effortLevel only and saves it as the default for the session's current model, under modelSettings as /effort saves it ('max' is session-only and is not written; the running session's level is not set here — send apply_flag_settings for that). Unlike apply_flag_settings, which only touches the session-scoped flag layer. Each file feeds hook and permission-rule loading, so each allowed key is a security decision. String values only (key deletion is not supported); refused on remote transports and in sessions whose --setting-sources exclude the target source.
|
|
4810
4816
|
*/
|
|
4811
4817
|
declare type SDKControlUpdateSettingsRequest = {
|
|
4812
4818
|
subtype: 'update_settings';
|
|
4813
4819
|
/**
|
|
4814
|
-
* Which settings file to write
|
|
4820
|
+
* Which settings file to write: the project's local settings file, where /config's writes land, or the user's settings file, which takes effortLevel only.
|
|
4815
4821
|
*/
|
|
4816
|
-
source: 'localSettings';
|
|
4822
|
+
source: 'localSettings' | 'userSettings';
|
|
4817
4823
|
settings: Record<string, unknown>;
|
|
4818
4824
|
};
|
|
4819
4825
|
|
|
@@ -5357,7 +5363,7 @@ export declare type SDKResultError = {
|
|
|
5357
5363
|
num_turns: number;
|
|
5358
5364
|
stop_reason: string | null;
|
|
5359
5365
|
/**
|
|
5360
|
-
* Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, resumed
|
|
5366
|
+
* Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, a resumed or forked session continues from the total its transcript saved, when it has one (so the first result already carries the earlier turns; maxBudgetUsd counts only the spend since this query() call started or last /clear), and a mid-session /clear resets the running total. An estimate, not a billing statement.
|
|
5361
5367
|
*/
|
|
5362
5368
|
total_cost_usd: number;
|
|
5363
5369
|
/**
|
|
@@ -5365,7 +5371,7 @@ export declare type SDKResultError = {
|
|
|
5365
5371
|
*/
|
|
5366
5372
|
usage: NonNullableUsage;
|
|
5367
5373
|
/**
|
|
5368
|
-
* Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, resumed
|
|
5374
|
+
* Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, a resumed or forked session continues from the totals its transcript saved, when it has them (so the first result already carries the earlier turns), and a mid-session /clear resets the running total. The correct field for token/cost accounting; treat it as an estimate, not a billing statement.
|
|
5369
5375
|
*/
|
|
5370
5376
|
modelUsage: Record<string, ModelUsage>;
|
|
5371
5377
|
|
|
@@ -5425,7 +5431,14 @@ export declare type SDKResultSuccess = {
|
|
|
5425
5431
|
first_content_frame_ms?: number;
|
|
5426
5432
|
first_stream_post_ms?: number;
|
|
5427
5433
|
first_stream_post_ack_ms?: number;
|
|
5434
|
+
first_stream_post_queue_wait_ms?: number;
|
|
5435
|
+
first_stream_post_queued_behind?: 'durable_post' | 'ephemeral_post' | 'retry_backoff' | 'hold' | 'none';
|
|
5428
5436
|
first_stream_post_wall_ms?: number;
|
|
5437
|
+
|
|
5438
|
+
|
|
5439
|
+
|
|
5440
|
+
first_text_post_ms?: number;
|
|
5441
|
+
first_text_post_wall_ms?: number;
|
|
5429
5442
|
time_to_request_from_spawn_ms?: number;
|
|
5430
5443
|
warm_spare_claimed?: boolean;
|
|
5431
5444
|
time_origin_ms?: number;
|
|
@@ -5436,7 +5449,7 @@ export declare type SDKResultSuccess = {
|
|
|
5436
5449
|
result: string;
|
|
5437
5450
|
stop_reason: string | null;
|
|
5438
5451
|
/**
|
|
5439
|
-
* Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, resumed
|
|
5452
|
+
* Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, a resumed or forked session continues from the total its transcript saved, when it has one (so the first result already carries the earlier turns; maxBudgetUsd counts only the spend since this query() call started or last /clear), and a mid-session /clear resets the running total. An estimate, not a billing statement.
|
|
5440
5453
|
*/
|
|
5441
5454
|
total_cost_usd: number;
|
|
5442
5455
|
/**
|
|
@@ -5444,7 +5457,7 @@ export declare type SDKResultSuccess = {
|
|
|
5444
5457
|
*/
|
|
5445
5458
|
usage: NonNullableUsage;
|
|
5446
5459
|
/**
|
|
5447
|
-
* Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, resumed
|
|
5460
|
+
* Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, a resumed or forked session continues from the totals its transcript saved, when it has them (so the first result already carries the earlier turns), and a mid-session /clear resets the running total. The correct field for token/cost accounting; treat it as an estimate, not a billing statement.
|
|
5448
5461
|
*/
|
|
5449
5462
|
modelUsage: Record<string, ModelUsage>;
|
|
5450
5463
|
|
|
@@ -5627,6 +5640,7 @@ export declare type SDKSystemMessage = {
|
|
|
5627
5640
|
|
|
5628
5641
|
|
|
5629
5642
|
|
|
5643
|
+
|
|
5630
5644
|
uuid: UUID;
|
|
5631
5645
|
session_id: string;
|
|
5632
5646
|
};
|
|
@@ -5807,7 +5821,7 @@ export declare type SDKUsageReport = {
|
|
|
5807
5821
|
*/
|
|
5808
5822
|
rate_limits: {
|
|
5809
5823
|
/**
|
|
5810
|
-
* The server's usage rows (the usage endpoint's limits[]), as sent: which meters apply, their scope, labels, severity and order are the server's, so a client renders them verbatim and a new meter needs no client release. Empty when the server reported no meters; null when the body carried no rows at all (a server that predates them).
|
|
5824
|
+
* The server's usage rows (the usage endpoint's limits[]), as sent: which meters apply, their scope, labels, severity and order are the server's, so a client renders them verbatim and a new meter needs no client release. Empty when the server reported no meters; null when the body carried no rows at all (a server that predates them). Null too while the usage fetch is failing: the rows here are only ever the server's current reply, so neither the row the CLI builds from rate-limit response headers for its own screen nor its snapshot of an earlier reply appears here.
|
|
5811
5825
|
*/
|
|
5812
5826
|
limits: {
|
|
5813
5827
|
/**
|
|
@@ -5838,13 +5852,13 @@ export declare type SDKUsageReport = {
|
|
|
5838
5852
|
} | null;
|
|
5839
5853
|
} | null;
|
|
5840
5854
|
/**
|
|
5841
|
-
* The server's reading of the row for a meter's colour, e.g. 'normal', 'warning' or 'critical'
|
|
5855
|
+
* The server's reading of the row for a meter's colour, e.g. 'normal', 'warning' or 'critical'. Every row here is the server's, so a client never grades a row itself.
|
|
5842
5856
|
*/
|
|
5843
|
-
severity
|
|
5857
|
+
severity: string;
|
|
5844
5858
|
/**
|
|
5845
5859
|
* The server's headline pick: the row a single-value indicator shows.
|
|
5846
5860
|
*/
|
|
5847
|
-
is_active
|
|
5861
|
+
is_active: boolean;
|
|
5848
5862
|
}[] | null;
|
|
5849
5863
|
/**
|
|
5850
5864
|
* Extra-usage (overage) spend for the billing period, when the plan has it. Amounts are in minor units of `currency` (cents for USD); is_enabled is false while extra usage cannot cover sends.
|
|
@@ -5925,7 +5939,12 @@ export declare type SDKUserMessage = {
|
|
|
5925
5939
|
|
|
5926
5940
|
|
|
5927
5941
|
|
|
5942
|
+
|
|
5928
5943
|
uuid?: UUID;
|
|
5944
|
+
/**
|
|
5945
|
+
* 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`.
|
|
5946
|
+
*/
|
|
5947
|
+
pasted_content?: MessageParam['content'][];
|
|
5929
5948
|
session_id?: string;
|
|
5930
5949
|
/**
|
|
5931
5950
|
* Subagent type that produced this message.
|
|
@@ -6001,6 +6020,7 @@ export declare type SDKUserMessageReplay = {
|
|
|
6001
6020
|
|
|
6002
6021
|
|
|
6003
6022
|
|
|
6023
|
+
|
|
6004
6024
|
uuid: UUID;
|
|
6005
6025
|
session_id: string;
|
|
6006
6026
|
isReplay: true;
|
|
@@ -6850,7 +6870,7 @@ export declare interface Settings {
|
|
|
6850
6870
|
*/
|
|
6851
6871
|
bashOutputMaxChars?: number;
|
|
6852
6872
|
/**
|
|
6853
|
-
*
|
|
6873
|
+
* Deprecated: no longer has any effect (the TaskOutput tool was removed). Read a background task's output file with the Read tool instead.
|
|
6854
6874
|
*/
|
|
6855
6875
|
taskOutputMaxChars?: number;
|
|
6856
6876
|
/**
|
|
@@ -8915,6 +8935,10 @@ export declare type SlashCommand = {
|
|
|
8915
8935
|
* Alternate names that resolve to this command (e.g., /cost and /stats both resolve to /usage)
|
|
8916
8936
|
*/
|
|
8917
8937
|
aliases?: string[];
|
|
8938
|
+
/**
|
|
8939
|
+
* True when the command is Claude Code's own; absent for a command defined by a user, project, plugin or MCP server. Rows can share a name: when a marked row carries it, /name runs that one, and an unmarked row is the one /name runs only when no marked row shares its name. The marker describes the row's name, not its aliases: a typed alias runs a command that has it as its name, when one exists, whatever this marker says.
|
|
8940
|
+
*/
|
|
8941
|
+
builtin?: boolean;
|
|
8918
8942
|
};
|
|
8919
8943
|
|
|
8920
8944
|
/**
|