@anthropic-ai/claude-agent-sdk 0.2.110 → 0.2.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assistant.mjs +86 -86
- package/bridge.mjs +58 -58
- package/browser-sdk.js +30 -30
- package/cli.js +2982 -2204
- package/manifest.json +18 -18
- package/manifest.zst.json +22 -22
- package/package.json +2 -2
- package/sdk.d.ts +67 -12
- package/sdk.mjs +48 -48
package/manifest.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-04-
|
|
2
|
+
"version": "2.1.112",
|
|
3
|
+
"buildDate": "2026-04-16T18:39:33Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "b05381f382754012b95984016000f7062a2f127a6a3a843afc37ebd7d4672340",
|
|
8
|
+
"size": 203956832
|
|
9
9
|
},
|
|
10
10
|
"darwin-x64": {
|
|
11
11
|
"binary": "claude",
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "a2a7fea41acee4c889b30132dd490ac00b1cb86c6e25755a224d91b1cba97734",
|
|
13
|
+
"size": 205442640
|
|
14
14
|
},
|
|
15
15
|
"linux-arm64": {
|
|
16
16
|
"binary": "claude",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "1015ef5747767cdac58376de4ec990253dcac49314d54e19750d5512fa7422f6",
|
|
18
|
+
"size": 236128832
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
21
|
"binary": "claude",
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "57be9406d3e5cae259552790bf7288dd6496675430ec93dbed76a33a57580d3d",
|
|
23
|
+
"size": 235846272
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64-musl": {
|
|
26
26
|
"binary": "claude",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "dcf16fc8ab6e4b504af6c66d5e5afc113a9a5da2a9d7e555cac0b301873a84f6",
|
|
28
|
+
"size": 228854208
|
|
29
29
|
},
|
|
30
30
|
"linux-x64-musl": {
|
|
31
31
|
"binary": "claude",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "4b629f61a1e280a5e3c22bad8e1ea3118f4aebcde7e6754f18331c500e5b3fe0",
|
|
33
|
+
"size": 230111680
|
|
34
34
|
},
|
|
35
35
|
"win32-x64": {
|
|
36
36
|
"binary": "claude.exe",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "7eb4916245c797f89ae7905c4cd211429264ec38b1b8164b7babdfa7746eb839",
|
|
38
|
+
"size": 245424288
|
|
39
39
|
},
|
|
40
40
|
"win32-arm64": {
|
|
41
41
|
"binary": "claude.exe",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "79336ca966d89d844eb8b198b8423cd8f75e0407d16359c1b492cc9decbbc999",
|
|
43
|
+
"size": 242155680
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-04-
|
|
2
|
+
"version": "2.1.112",
|
|
3
|
+
"buildDate": "2026-04-16T18:46:37Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude.zst",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "a8217b265ca2618e1c47f1c294c77a540caba32e70f3d7c037614e65c57b124a",
|
|
8
|
+
"size": 42163665,
|
|
9
9
|
"bundle": {
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "26893767a6f177549aa80530dc8dfb9b95e6890bf16a1877d70db66f3ce7d88c",
|
|
11
|
+
"size": 42165042
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"darwin-x64": {
|
|
15
15
|
"binary": "claude.zst",
|
|
16
|
-
"checksum": "
|
|
17
|
-
"size":
|
|
16
|
+
"checksum": "11e7bd62a925e9a0db87295d632e6f9ce261b924498c48b459e06ea53eea5863",
|
|
17
|
+
"size": 43834050,
|
|
18
18
|
"bundle": {
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "738f3f963939a11b94853a853ebf87ae3f2dcb91b806fbc2ba9396393b652ce0",
|
|
20
|
+
"size": 43835842
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"linux-arm64": {
|
|
24
24
|
"binary": "claude.zst",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "e011d6ddfaaf0a342506a0210e3b7ab1f3e96dd7272f3e02c98151c2492883e6",
|
|
26
|
+
"size": 51801672
|
|
27
27
|
},
|
|
28
28
|
"linux-x64": {
|
|
29
29
|
"binary": "claude.zst",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "10b22a9ced0140ef301d185b98cf308d2d18fdfd09e9cb58c275fb93b1a2a344",
|
|
31
|
+
"size": 52370027
|
|
32
32
|
},
|
|
33
33
|
"linux-arm64-musl": {
|
|
34
34
|
"binary": "claude.zst",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "60ccee17d1498a853d97e900d85e5fcddc13f811b0c0cef374e13f34306d5454",
|
|
36
|
+
"size": 50418347
|
|
37
37
|
},
|
|
38
38
|
"linux-x64-musl": {
|
|
39
39
|
"binary": "claude.zst",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "92f9c3e08fe052a10811d86f014b5edc84906e10576b1002e88ddd068f9e4c3b",
|
|
41
|
+
"size": 51050348
|
|
42
42
|
},
|
|
43
43
|
"win32-x64": {
|
|
44
44
|
"binary": "claude.exe.zst",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "aca902df1721b9ce7f857931d506bd5a313a35279939da47ef4c3d8776dd32af",
|
|
46
|
+
"size": 54047032
|
|
47
47
|
},
|
|
48
48
|
"win32-arm64": {
|
|
49
49
|
"binary": "claude.exe.zst",
|
|
50
|
-
"checksum": "
|
|
51
|
-
"size":
|
|
50
|
+
"checksum": "9965dff6f3c638639818a7a3358e34c5caa9ffa3efb264e4ba421ee4b3bfb1d2",
|
|
51
|
+
"size": 52182523
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropic-ai/claude-agent-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.112",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"vendor/ripgrep/",
|
|
91
91
|
"vendor/audio-capture/"
|
|
92
92
|
],
|
|
93
|
-
"claudeCodeVersion": "2.1.
|
|
93
|
+
"claudeCodeVersion": "2.1.112"
|
|
94
94
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare type AgentDefinition = {
|
|
|
84
84
|
/**
|
|
85
85
|
* Reasoning effort level for this agent. Either a named level or an integer
|
|
86
86
|
*/
|
|
87
|
-
effort?: ('low' | 'medium' | 'high' | 'max') | number;
|
|
87
|
+
effort?: ('low' | 'medium' | 'high' | 'xhigh' | 'max') | number;
|
|
88
88
|
/**
|
|
89
89
|
* Permission mode controlling how tool executions are handled
|
|
90
90
|
*/
|
|
@@ -304,6 +304,7 @@ declare namespace coreTypes {
|
|
|
304
304
|
McpServerConfigForProcessTransport,
|
|
305
305
|
McpServerStatusConfig,
|
|
306
306
|
McpServerStatus,
|
|
307
|
+
McpServerToolPolicy,
|
|
307
308
|
McpSetServersResult,
|
|
308
309
|
McpStdioServerConfig,
|
|
309
310
|
ModelInfo,
|
|
@@ -436,9 +437,10 @@ export declare type CwdChangedHookSpecificOutput = {
|
|
|
436
437
|
* - `'low'` — Minimal thinking, fastest responses
|
|
437
438
|
* - `'medium'` — Moderate thinking
|
|
438
439
|
* - `'high'` — Deep reasoning (default)
|
|
440
|
+
* - `'xhigh'` — Deeper than high (Opus 4.7 only; falls back to `'high'` elsewhere)
|
|
439
441
|
* - `'max'` — Maximum effort (select models only)
|
|
440
442
|
*/
|
|
441
|
-
export declare type EffortLevel = 'low' | 'medium' | 'high' | 'max';
|
|
443
|
+
export declare type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
442
444
|
|
|
443
445
|
/**
|
|
444
446
|
* Hook input for the Elicitation event. Fired when an MCP server requests user input. Hooks can auto-respond (accept/decline) instead of showing the dialog.
|
|
@@ -747,9 +749,7 @@ export declare type ListSessionsOptions = {
|
|
|
747
749
|
* When `dir` is provided and the directory is inside a git repository,
|
|
748
750
|
* include sessions from all git worktree paths. Defaults to `true`.
|
|
749
751
|
*
|
|
750
|
-
* Only applies
|
|
751
|
-
* is provided — worktree enumeration requires inspecting `.git/worktrees`
|
|
752
|
-
* on disk, which a SessionStore (keyed by projectKey) has no view of.
|
|
752
|
+
* Only applies when reading from the local filesystem.
|
|
753
753
|
*/
|
|
754
754
|
includeWorktrees?: boolean;
|
|
755
755
|
|
|
@@ -786,6 +786,7 @@ export declare type McpHttpServerConfig = {
|
|
|
786
786
|
type: 'http';
|
|
787
787
|
url: string;
|
|
788
788
|
headers?: Record<string, string>;
|
|
789
|
+
tools?: McpServerToolPolicy[];
|
|
789
790
|
};
|
|
790
791
|
|
|
791
792
|
export declare type McpSdkServerConfig = {
|
|
@@ -856,6 +857,14 @@ export declare type McpServerStatus = {
|
|
|
856
857
|
|
|
857
858
|
export declare type McpServerStatusConfig = McpServerConfigForProcessTransport | McpClaudeAIProxyServerConfig;
|
|
858
859
|
|
|
860
|
+
/**
|
|
861
|
+
* Per-tool permission policy carried on mcp_set_servers for remote servers.
|
|
862
|
+
*/
|
|
863
|
+
export declare type McpServerToolPolicy = {
|
|
864
|
+
name: string;
|
|
865
|
+
permission_policy: 'always_allow' | 'always_ask' | 'always_deny';
|
|
866
|
+
};
|
|
867
|
+
|
|
859
868
|
/**
|
|
860
869
|
* Result of a setMcpServers operation.
|
|
861
870
|
*/
|
|
@@ -878,6 +887,7 @@ export declare type McpSSEServerConfig = {
|
|
|
878
887
|
type: 'sse';
|
|
879
888
|
url: string;
|
|
880
889
|
headers?: Record<string, string>;
|
|
890
|
+
tools?: McpServerToolPolicy[];
|
|
881
891
|
};
|
|
882
892
|
|
|
883
893
|
export declare type McpStdioServerConfig = {
|
|
@@ -910,7 +920,7 @@ export declare type ModelInfo = {
|
|
|
910
920
|
/**
|
|
911
921
|
* Available effort levels for this model
|
|
912
922
|
*/
|
|
913
|
-
supportedEffortLevels?: ('low' | 'medium' | 'high' | 'max')[];
|
|
923
|
+
supportedEffortLevels?: ('low' | 'medium' | 'high' | 'xhigh' | 'max')[];
|
|
914
924
|
/**
|
|
915
925
|
* Whether this model supports adaptive thinking (Claude decides when and how much to think)
|
|
916
926
|
*/
|
|
@@ -1048,7 +1058,11 @@ export declare type Options = {
|
|
|
1048
1058
|
};
|
|
1049
1059
|
/**
|
|
1050
1060
|
* Environment variables to pass to the Claude Code process.
|
|
1051
|
-
*
|
|
1061
|
+
* Merged on top of `process.env` — entries here override the parent
|
|
1062
|
+
* process's variables, and anything not set here is inherited.
|
|
1063
|
+
* Set a key to `undefined` to remove an inherited variable. Note:
|
|
1064
|
+
* `GITHUB_ACTIONS` and a few SDK-managed vars are stripped and are
|
|
1065
|
+
* not inherited unless set explicitly here.
|
|
1052
1066
|
*
|
|
1053
1067
|
* SDK consumers can identify their app/library to include in the User-Agent header by setting:
|
|
1054
1068
|
* - `CLAUDE_AGENT_SDK_CLIENT_APP` - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")
|
|
@@ -1192,7 +1206,8 @@ export declare type Options = {
|
|
|
1192
1206
|
* - `'low'` — Minimal thinking, fastest responses
|
|
1193
1207
|
* - `'medium'` — Moderate thinking
|
|
1194
1208
|
* - `'high'` — Deep reasoning (default)
|
|
1195
|
-
* - `'
|
|
1209
|
+
* - `'xhigh'` — Deeper than high (Opus 4.7 only)
|
|
1210
|
+
* - `'max'` — Maximum effort (Opus 4.6/4.7 only)
|
|
1196
1211
|
*
|
|
1197
1212
|
* @see https://docs.anthropic.com/en/docs/build-with-claude/effort
|
|
1198
1213
|
*/
|
|
@@ -1243,7 +1258,7 @@ export declare type Options = {
|
|
|
1243
1258
|
mcpServers?: Record<string, McpServerConfig>;
|
|
1244
1259
|
/**
|
|
1245
1260
|
* Claude model to use. Defaults to the CLI default model.
|
|
1246
|
-
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-
|
|
1261
|
+
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-7'
|
|
1247
1262
|
*/
|
|
1248
1263
|
model?: string;
|
|
1249
1264
|
/**
|
|
@@ -1495,6 +1510,7 @@ export declare type Options = {
|
|
|
1495
1510
|
append?: string;
|
|
1496
1511
|
excludeDynamicSections?: boolean;
|
|
1497
1512
|
};
|
|
1513
|
+
|
|
1498
1514
|
/**
|
|
1499
1515
|
* Custom function to spawn the Claude Code process.
|
|
1500
1516
|
* Use this to run Claude Code in VMs, containers, or remote environments.
|
|
@@ -1847,6 +1863,7 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
1847
1863
|
|
|
1848
1864
|
|
|
1849
1865
|
|
|
1866
|
+
|
|
1850
1867
|
/**
|
|
1851
1868
|
* Reconnect an MCP server by name.
|
|
1852
1869
|
* Throws on failure.
|
|
@@ -2225,6 +2242,7 @@ declare type SDKControlInitializeRequest = {
|
|
|
2225
2242
|
jsonSchema?: Record<string, unknown>;
|
|
2226
2243
|
systemPrompt?: string[];
|
|
2227
2244
|
appendSystemPrompt?: string;
|
|
2245
|
+
|
|
2228
2246
|
/**
|
|
2229
2247
|
* 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.
|
|
2230
2248
|
*/
|
|
@@ -2352,7 +2370,7 @@ export declare type SDKControlRequest = {
|
|
|
2352
2370
|
request: SDKControlRequestInner;
|
|
2353
2371
|
};
|
|
2354
2372
|
|
|
2355
|
-
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest;
|
|
2373
|
+
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlUltrareviewLaunchRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest;
|
|
2356
2374
|
|
|
2357
2375
|
/**
|
|
2358
2376
|
* Requests the SDK consumer to render a tool-driven blocking dialog and return the user choice. Used by tools that previously rendered Ink JSX via setToolJSX with an onDone callback.
|
|
@@ -2820,7 +2838,11 @@ export declare type SDKSessionOptions = {
|
|
|
2820
2838
|
executableArgs?: string[];
|
|
2821
2839
|
/**
|
|
2822
2840
|
* Environment variables to pass to the Claude Code process.
|
|
2823
|
-
*
|
|
2841
|
+
* Merged on top of `process.env` — entries here override the parent
|
|
2842
|
+
* process's variables, and anything not set here is inherited.
|
|
2843
|
+
* Set a key to `undefined` to remove an inherited variable. Note:
|
|
2844
|
+
* `GITHUB_ACTIONS` and a few SDK-managed vars are stripped and are
|
|
2845
|
+
* not inherited unless set explicitly here.
|
|
2824
2846
|
*
|
|
2825
2847
|
* SDK consumers can identify their app/library to include in the User-Agent header by setting:
|
|
2826
2848
|
* - `CLAUDE_AGENT_SDK_CLIENT_APP` - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")
|
|
@@ -2941,6 +2963,7 @@ export declare type SDKSystemMessage = {
|
|
|
2941
2963
|
path: string;
|
|
2942
2964
|
|
|
2943
2965
|
}[];
|
|
2966
|
+
|
|
2944
2967
|
fast_mode_state?: FastModeState;
|
|
2945
2968
|
|
|
2946
2969
|
uuid: UUID;
|
|
@@ -3144,6 +3167,10 @@ export declare interface Settings {
|
|
|
3144
3167
|
* Path to a script that outputs authentication values
|
|
3145
3168
|
*/
|
|
3146
3169
|
apiKeyHelper?: string;
|
|
3170
|
+
/**
|
|
3171
|
+
* Shell command that outputs a Proxy-Authorization header value (EAP)
|
|
3172
|
+
*/
|
|
3173
|
+
proxyAuthHelper?: string;
|
|
3147
3174
|
/**
|
|
3148
3175
|
* Path to a script that exports AWS credentials
|
|
3149
3176
|
*/
|
|
@@ -4262,7 +4289,7 @@ export declare interface Settings {
|
|
|
4262
4289
|
/**
|
|
4263
4290
|
* Persisted effort level for supported models.
|
|
4264
4291
|
*/
|
|
4265
|
-
effortLevel?: 'low' | 'medium' | 'high';
|
|
4292
|
+
effortLevel?: 'low' | 'medium' | 'high' | 'xhigh';
|
|
4266
4293
|
/**
|
|
4267
4294
|
* Auto-compact window size
|
|
4268
4295
|
*/
|
|
@@ -4516,6 +4543,15 @@ export declare interface SpawnOptions {
|
|
|
4516
4543
|
signal: AbortSignal;
|
|
4517
4544
|
}
|
|
4518
4545
|
|
|
4546
|
+
/**
|
|
4547
|
+
* Pre-warms the CLI subprocess so the first `query()` resolves immediately.
|
|
4548
|
+
* Returns a {@link WarmQuery} handle.
|
|
4549
|
+
*/
|
|
4550
|
+
export declare function startup(_params?: {
|
|
4551
|
+
options?: Options;
|
|
4552
|
+
initializeTimeoutMs?: number;
|
|
4553
|
+
}): Promise<WarmQuery>;
|
|
4554
|
+
|
|
4519
4555
|
declare type StdoutMessage = coreTypes.SDKMessage | coreTypes.SDKPostTurnSummaryMessage | coreTypes.SDKTranscriptMirrorMessage | SDKControlResponse | SDKControlRequest | SDKControlCancelRequest | SDKKeepAliveMessage;
|
|
4520
4556
|
|
|
4521
4557
|
export declare type StopFailureHookInput = BaseHookInput & {
|
|
@@ -4751,6 +4787,25 @@ export declare type UserPromptSubmitHookSpecificOutput = {
|
|
|
4751
4787
|
sessionTitle?: string;
|
|
4752
4788
|
};
|
|
4753
4789
|
|
|
4790
|
+
/**
|
|
4791
|
+
* A pre-warmed query handle returned by `startup()`. The subprocess has
|
|
4792
|
+
* already been spawned and completed its initialize handshake, so calling
|
|
4793
|
+
* `query()` writes the prompt directly to a ready process — no startup
|
|
4794
|
+
* latency.
|
|
4795
|
+
*/
|
|
4796
|
+
export declare interface WarmQuery extends AsyncDisposable {
|
|
4797
|
+
/**
|
|
4798
|
+
* Send a prompt to the pre-warmed subprocess and return the Query.
|
|
4799
|
+
* Can only be called once per WarmQuery.
|
|
4800
|
+
*/
|
|
4801
|
+
query(prompt: string | AsyncIterable<SDKUserMessage>): Query;
|
|
4802
|
+
/**
|
|
4803
|
+
* Close the subprocess without sending a prompt. Use this to discard a
|
|
4804
|
+
* warm query you no longer need.
|
|
4805
|
+
*/
|
|
4806
|
+
close(): void;
|
|
4807
|
+
}
|
|
4808
|
+
|
|
4754
4809
|
export declare type WorktreeCreateHookInput = BaseHookInput & {
|
|
4755
4810
|
hook_event_name: 'WorktreeCreate';
|
|
4756
4811
|
name: string;
|