@anthropic-ai/claude-agent-sdk 0.3.260 → 0.3.263
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 +100 -79
- package/browser-sdk.js +67 -59
- package/manifest.json +19 -23
- package/manifest.zst.json +23 -27
- package/package.json +10 -10
- package/sdk.d.ts +80 -8
- package/sdk.mjs +98 -77
package/manifest.json
CHANGED
|
@@ -1,56 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.263",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "37ae3f38d765199d54a6913cd61c6c9ad8576cc6",
|
|
5
|
+
"buildDate": "2026-09-06T01:17:56Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "ef5d2909c8af49f31ab6d5487e90316777bc2fac170adfe8160716caa8aaf4f9",
|
|
10
|
+
"size": 199257984
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
13
13
|
"binary": "claude",
|
|
14
|
-
"checksum": "
|
|
15
|
-
"size":
|
|
14
|
+
"checksum": "a94a8b229fa85c3a316c6b4a35e0aa22bec1aabbd3d1422826ce1d10ddc88751",
|
|
15
|
+
"size": 208025952
|
|
16
16
|
},
|
|
17
17
|
"linux-arm64": {
|
|
18
18
|
"binary": "claude",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "7d25d7c8ae6c6e009cc7dae4e817f674179fd31fb7761bcd56fee4c2902b4c03",
|
|
20
|
+
"size": 215211432
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"binary": "claude",
|
|
24
|
-
"checksum": "
|
|
25
|
-
"size":
|
|
24
|
+
"checksum": "26d020351e8112f4006790f3cfce43b4c9df0c1bb1d0e542364d64151b81d5ba",
|
|
25
|
+
"size": 215662064
|
|
26
26
|
},
|
|
27
27
|
"linux-arm64-musl": {
|
|
28
28
|
"binary": "claude",
|
|
29
|
-
"checksum": "
|
|
30
|
-
"size":
|
|
29
|
+
"checksum": "9b02e81a61d54bef3e6d190b6f2f6c4a9c31e6e068468f79d520d5ffff6b0e42",
|
|
30
|
+
"size": 208156312
|
|
31
31
|
},
|
|
32
32
|
"linux-x64-musl": {
|
|
33
33
|
"binary": "claude",
|
|
34
|
-
"checksum": "
|
|
35
|
-
"size":
|
|
34
|
+
"checksum": "b9c407e36847bcb24b953b1390f240c840ae6c99e10a76475d2fadc5d5c4adca",
|
|
35
|
+
"size": 209678288
|
|
36
36
|
},
|
|
37
37
|
"win32-x64": {
|
|
38
38
|
"binary": "claude.exe",
|
|
39
|
-
"checksum": "
|
|
40
|
-
"size":
|
|
39
|
+
"checksum": "0b35df94c1307004f07b738390bfef8dfca5e9af29aaf6517f305bf086b95b03",
|
|
40
|
+
"size": 218746016
|
|
41
41
|
},
|
|
42
42
|
"win32-arm64": {
|
|
43
43
|
"binary": "claude.exe",
|
|
44
|
-
"checksum": "
|
|
45
|
-
"size":
|
|
44
|
+
"checksum": "2ca14d6f61a39c3ad5d72424f4e347d5a570a58036ab1afe14c5e3eb668e9540",
|
|
45
|
+
"size": 209795744
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"sdkCompat": {
|
|
49
49
|
"testedWrapperVersions": [
|
|
50
|
-
"0.3.219",
|
|
51
|
-
"0.3.220",
|
|
52
|
-
"0.3.221",
|
|
53
|
-
"0.3.222",
|
|
54
50
|
"0.3.223",
|
|
55
51
|
"0.3.224",
|
|
56
52
|
"0.3.225",
|
package/manifest.zst.json
CHANGED
|
@@ -1,64 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.263",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "37ae3f38d765199d54a6913cd61c6c9ad8576cc6",
|
|
5
|
+
"buildDate": "2026-09-06T01:18:58Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude.zst",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "dfacc492242949835c71d3ca7fa0cd728d3761d91ab4a707e52a92a283684727",
|
|
10
|
+
"size": 66090434,
|
|
11
11
|
"bundle": {
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "5b5f7f63580a46496ac073e81a5731e154b420b4fc7bb568f7a512c7b47fbc9d",
|
|
13
|
+
"size": 66093112
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"darwin-x64": {
|
|
17
17
|
"binary": "claude.zst",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "39d04744aa07519e43f2f47f7e5ee5d94b0456a207a067c092a4d3697177a2aa",
|
|
19
|
+
"size": 70149197,
|
|
20
20
|
"bundle": {
|
|
21
|
-
"checksum": "
|
|
22
|
-
"size":
|
|
21
|
+
"checksum": "ae043f87449df6c66dc0a0da8c439939b83b95dcfe2c304bf49001a63c7479e3",
|
|
22
|
+
"size": 70148734
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64": {
|
|
26
26
|
"binary": "claude.zst",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "b24f793f3fda8aa2fe85e834fed9b5e4172e772b29dd6f8bec365e6d355addf0",
|
|
28
|
+
"size": 75295606
|
|
29
29
|
},
|
|
30
30
|
"linux-x64": {
|
|
31
31
|
"binary": "claude.zst",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "fb383bab72dbf2b58c1b0e7a8b73b2a84f22033dc8ad774fd794632181336df0",
|
|
33
|
+
"size": 75925087
|
|
34
34
|
},
|
|
35
35
|
"linux-arm64-musl": {
|
|
36
36
|
"binary": "claude.zst",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "57cfe09cd48b80372a27f3ae013569787ffea241cc550b0d2d6dddeff19cc54d",
|
|
38
|
+
"size": 73772408
|
|
39
39
|
},
|
|
40
40
|
"linux-x64-musl": {
|
|
41
41
|
"binary": "claude.zst",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "165b4627cdd065f1c4c8087b6901d076f41c17fcdce7c9155187173d0d523a2e",
|
|
43
|
+
"size": 74438972
|
|
44
44
|
},
|
|
45
45
|
"win32-x64": {
|
|
46
46
|
"binary": "claude.exe.zst",
|
|
47
|
-
"checksum": "
|
|
48
|
-
"size":
|
|
47
|
+
"checksum": "a07850ce01171aee27a7a234a73e0bbcc38ba2d07eb66eed3f053d8c00296329",
|
|
48
|
+
"size": 78339597
|
|
49
49
|
},
|
|
50
50
|
"win32-arm64": {
|
|
51
51
|
"binary": "claude.exe.zst",
|
|
52
|
-
"checksum": "
|
|
53
|
-
"size":
|
|
52
|
+
"checksum": "2ed0d4a3612f6fca014bd725f2e959ea6cc0db6d16b7b125e4a6c751bc869839",
|
|
53
|
+
"size": 75079270
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"sdkCompat": {
|
|
57
57
|
"testedWrapperVersions": [
|
|
58
|
-
"0.3.219",
|
|
59
|
-
"0.3.220",
|
|
60
|
-
"0.3.221",
|
|
61
|
-
"0.3.222",
|
|
62
58
|
"0.3.223",
|
|
63
59
|
"0.3.224",
|
|
64
60
|
"0.3.225",
|
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.263",
|
|
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.263",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.263",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.263",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.263",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.263",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.263",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.263",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.263"
|
|
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.263"
|
|
84
84
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -1872,6 +1872,21 @@ export declare type Options = {
|
|
|
1872
1872
|
* ```
|
|
1873
1873
|
*/
|
|
1874
1874
|
plugins?: SdkPluginConfig[];
|
|
1875
|
+
/**
|
|
1876
|
+
* How `plugins` reach the Claude Code process.
|
|
1877
|
+
* - `'argv'` (default) - One `--plugin-dir <path>` flag per plugin. Works
|
|
1878
|
+
* with any Claude Code version, but the command line grows with the
|
|
1879
|
+
* plugin count and Windows refuses to start a process whose command line
|
|
1880
|
+
* exceeds 32,767 characters.
|
|
1881
|
+
* - `'initialize'` - The list is sent over stdin in the initialize request
|
|
1882
|
+
* and Claude Code is started with `--await-initialize`, so the command
|
|
1883
|
+
* line does not depend on the plugin count. Loading is otherwise
|
|
1884
|
+
* identical. Requires Claude Code 2.1.261 or newer (the binary bundled
|
|
1885
|
+
* with this SDK qualifies); an older binary exits at startup with an
|
|
1886
|
+
* unknown-option error. `initializationResult().plugins_applied` reports
|
|
1887
|
+
* whether every listed plugin is loaded in the process.
|
|
1888
|
+
*/
|
|
1889
|
+
pluginDelivery?: 'argv' | 'initialize';
|
|
1875
1890
|
|
|
1876
1891
|
|
|
1877
1892
|
|
|
@@ -2768,13 +2783,19 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2768
2783
|
* false (and `rate_limits` null) for API key, Bedrock, Vertex, and other
|
|
2769
2784
|
* sessions where plan limits do not apply.
|
|
2770
2785
|
*
|
|
2786
|
+
* `skipBehaviors: true` skips the scan of local transcripts that fills the
|
|
2787
|
+
* response's `behaviors` section (it is null in the answer), for callers
|
|
2788
|
+
* that need only the plan rate limits. Defaults to scanning.
|
|
2789
|
+
*
|
|
2771
2790
|
* EXPERIMENTAL: this API is unstable and may change or be removed in any
|
|
2772
2791
|
* release without notice — do not rely on it yet. The method name will
|
|
2773
2792
|
* change when the API is stabilized.
|
|
2774
2793
|
*
|
|
2775
2794
|
* @returns Structured session cost/usage data and plan rate-limit utilization
|
|
2776
2795
|
*/
|
|
2777
|
-
usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET(
|
|
2796
|
+
usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET(opts?: {
|
|
2797
|
+
skipBehaviors?: boolean;
|
|
2798
|
+
}): Promise<SDKControlGetUsageResponse>;
|
|
2778
2799
|
/**
|
|
2779
2800
|
* Read a file from the session's filesystem for the remote sidebar
|
|
2780
2801
|
* viewer. Path is resolved against cwd and gated by the same
|
|
@@ -2802,6 +2823,16 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2802
2823
|
* @returns The refreshed skill commands after reload
|
|
2803
2824
|
*/
|
|
2804
2825
|
reloadSkills(): Promise<SDKControlReloadSkillsResponse>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Re-read the output-style directories from disk and return the refreshed
|
|
2828
|
+
* style names. A style file written while the session runs is otherwise
|
|
2829
|
+
* invisible to it until the next session. Also drops the shared
|
|
2830
|
+
* markdown-file scan cache, so agents, skills and routines re-read their
|
|
2831
|
+
* directories on their next use.
|
|
2832
|
+
*
|
|
2833
|
+
* @returns The refreshed output style names (built-in and custom)
|
|
2834
|
+
*/
|
|
2835
|
+
reloadOutputStyles(): Promise<SDKControlReloadOutputStylesResponse>;
|
|
2805
2836
|
/**
|
|
2806
2837
|
* Get information about the authenticated account.
|
|
2807
2838
|
*
|
|
@@ -3270,6 +3301,13 @@ export declare type SDKAPIRetryMessage = {
|
|
|
3270
3301
|
retry_delay_ms: number;
|
|
3271
3302
|
error_status: number | null;
|
|
3272
3303
|
error: SDKAssistantMessageError;
|
|
3304
|
+
/**
|
|
3305
|
+
* Present only when the API sent no response headers within the first-byte window (CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS): waited_ms is how long the failed attempt waited for headers, retry_wait_ms how long the retry will wait for them. For this cause max_retries is its own cap (normally one retry), not the session budget.
|
|
3306
|
+
*/
|
|
3307
|
+
no_response?: {
|
|
3308
|
+
waited_ms: number;
|
|
3309
|
+
retry_wait_ms: number;
|
|
3310
|
+
};
|
|
3273
3311
|
uuid: UUID;
|
|
3274
3312
|
session_id: string;
|
|
3275
3313
|
};
|
|
@@ -3368,7 +3406,7 @@ export declare type SDKBackgroundTasksChangedMessage = {
|
|
|
3368
3406
|
task_type: string;
|
|
3369
3407
|
description: string;
|
|
3370
3408
|
/**
|
|
3371
|
-
* True for
|
|
3409
|
+
* True for tasks that are not activity (every skip_transcript task, plus every live-update watcher, requested or auto-started); hosts should exclude them from activity indicators.
|
|
3372
3410
|
*/
|
|
3373
3411
|
ambient?: boolean;
|
|
3374
3412
|
}[];
|
|
@@ -3708,6 +3746,10 @@ declare type SDKControlGetSettingsRequest = {
|
|
|
3708
3746
|
*/
|
|
3709
3747
|
declare type SDKControlGetUsageRequest = {
|
|
3710
3748
|
subtype: 'get_usage';
|
|
3749
|
+
/**
|
|
3750
|
+
* Skip the scan of local transcripts that produces the response's behaviors section (it is null in the answer). For callers that need only the plan rate limits, such as a usage meter; the scan reads every transcript touched in the last seven days.
|
|
3751
|
+
*/
|
|
3752
|
+
skip_behaviors?: boolean;
|
|
3711
3753
|
};
|
|
3712
3754
|
|
|
3713
3755
|
/**
|
|
@@ -3980,6 +4022,10 @@ declare type SDKControlInitializeRequest = {
|
|
|
3980
4022
|
* Declares that this consumer renders a per-task stop control wired to the `stop_task` control request, so the user can stop an individual background task. When declared, an interrupt on an open-input (interactive stream-json) session spares running background agents/workflows (Stop only aborts the turn). Closed-input exception: a one-shot run (string prompt / -p closes stdin) still kills hold-back tasks at the held-result release regardless of the declaration — with stdin closed, a stop_task control could never be delivered, so the fail-closed kill stands. ABSENCE also fails closed: the interrupt kills background tasks, since the user would otherwise have no way to stop a runaway one. First-attached-client-wins on multi-client sessions; later initializes do not change it.
|
|
3981
4023
|
*/
|
|
3982
4024
|
perTaskStopAffordance?: boolean;
|
|
4025
|
+
/**
|
|
4026
|
+
* Plugins to load for the session, in the same shape as the SDK `plugins` option: the stdin form of one --plugin-dir flag per entry (--plugin-dir-no-mcp when skipMcpDiscovery is set), so the launch command line does not grow with the plugin count. Loaded only by a CLI launched with --await-initialize, which reads this request during startup before any plugin work. Without that flag, on a repeated initialize, or over a remote session transport the field loads nothing; plugins_applied in the response reports whether the listed plugins are in fact loaded.
|
|
4027
|
+
*/
|
|
4028
|
+
plugins?: coreTypes.SdkPluginConfig[];
|
|
3983
4029
|
|
|
3984
4030
|
};
|
|
3985
4031
|
|
|
@@ -4004,6 +4050,10 @@ export declare type SDKControlInitializeResponse = {
|
|
|
4004
4050
|
* Whether the `hooks` this initialize carried were registered: true on a session's first initialize, and on a repeated initialize from the process that owns the CLI's stdin (its set replaces the one registered earlier); false when a repeated initialize's hooks were ignored (a client joining a remote session another client configured). Absent when the request carried no hooks, and on CLIs that predate the field — those ignored `hooks` on every repeated initialize.
|
|
4005
4051
|
*/
|
|
4006
4052
|
hooks_applied?: boolean;
|
|
4053
|
+
/**
|
|
4054
|
+
* Whether every plugin this initialize listed is loaded: true when each one is among the plugins the process loaded at launch (from `plugins` under --await-initialize, or from --plugin-dir), so a re-sent initialize naming the launch set also reads true; false otherwise. The `plugins` field never loads anything after launch. Absent when the request listed no plugins, and on CLIs that predate the field (those never read `plugins`).
|
|
4055
|
+
*/
|
|
4056
|
+
plugins_applied?: boolean;
|
|
4007
4057
|
|
|
4008
4058
|
|
|
4009
4059
|
|
|
@@ -4026,7 +4076,7 @@ declare type SDKControlInterruptRequest = {
|
|
|
4026
4076
|
subtype: 'interrupt';
|
|
4027
4077
|
|
|
4028
4078
|
/**
|
|
4029
|
-
* When true, the interrupt also cancels every uuid-stamped main-thread command still in the queue or already dequeued for the imminent turn but not yet reachable by the abort (the first-command prewait window) — the same set the response would otherwise list under `still_queued`. Each is closed with a terminal 'cancelled' lifecycle and listed on the response's `cancelled` field. `still_queued` is then empty, except that a client driving a hosted session lists there what it can no longer recall (a send already in flight to that session, or the first prompt the session was created with) and, when the session's own sweep then cancels one of those or a send it had already delivered, follows up with a command_lifecycle 'cancelled' frame for it. (The isFoldInFlight guard cancel_async_message uses does not apply here: this request also aborts the running turn, so a fold-in-flight uuid is never delivered and is swept with the rest. A fold-in-flight uuid's queued_command attachment may already appear in the aborted turn's transcript if the abort landed after the fold's attachment yield — pre-existing leave-queued semantics; it never runs as its own turn.) Uuid-less commands (task notifications) still in the queue are also dequeued but cannot be listed; a uuid-less command already in the prewait window is unreachable by either leg
|
|
4079
|
+
* When true, the interrupt also cancels every uuid-stamped main-thread command still in the queue or already dequeued for the imminent turn but not yet reachable by the abort (the first-command prewait window) — the same set the response would otherwise list under `still_queued`. Each is closed with a terminal 'cancelled' lifecycle and listed on the response's `cancelled` field. `still_queued` is then empty, except that a client driving a hosted session lists there what it can no longer recall (a send already in flight to that session, or the first prompt the session was created with) and, when the session's own sweep then cancels one of those or a send it had already delivered, follows up with a command_lifecycle 'cancelled' frame for it. (The isFoldInFlight guard cancel_async_message uses does not apply here: this request also aborts the running turn, so a fold-in-flight uuid is never delivered and is swept with the rest. A fold-in-flight uuid's queued_command attachment may already appear in the aborted turn's transcript if the abort landed after the fold's attachment yield — pre-existing leave-queued semantics; it never runs as its own turn.) Uuid-less commands (task notifications) still in the queue are also dequeued but cannot be listed; a uuid-less command already in the prewait window is unreachable by either cancel leg — the first-command prewait latch covers it (this request latches exactly like a plain interrupt; see still_queued): its turn starts aborted. When false or absent, queued commands survive the interrupt and are listed under `still_queued` — the interrupt_receipt_v1 contract is unchanged. A Stop-means-stop-everything client (a remote UI's Stop button) sets this true so one round-trip halts the session; a wrapper that wants per-uuid control leaves it false and follows up with cancel_async_message. Advertised by the `interrupt_cancel_queued_v1` capability on system/init; older CLIs ignore the field and behave as if false.
|
|
4030
4080
|
*/
|
|
4031
4081
|
cancel_queued?: boolean;
|
|
4032
4082
|
};
|
|
@@ -4036,7 +4086,7 @@ declare type SDKControlInterruptRequest = {
|
|
|
4036
4086
|
*/
|
|
4037
4087
|
export declare type SDKControlInterruptResponse = {
|
|
4038
4088
|
/**
|
|
4039
|
-
* Uuids of async user messages that survive this interrupt: commands still in the queue, plus any batch already dequeued for the imminent turn but not yet reachable by the abort. These WILL run unless cancelled first (or unless the request set cancel_queued:true, in which case every uuid-stamped survivor this process holds is removed, emitted a terminal `cancelled` synchronously, and listed under `cancelled` instead — leaving here only what a client driving a hosted session can no longer recall: a send already in flight to that session, or the first prompt the session was created with; a send that client still holds on its own machine behind a send gate (today: waiting for the session to take the initial upload from that machine) has not gone out, so it is withdrawn and listed under `cancelled` like a queued one, and cancel_async_message can withdraw it too, while a plain interrupt leaves it held and lists it here). Cancellation granularity: uuids still in the queue are individually cancellable via cancel_async_message; once a batch is dequeued and coalesced into one turn, cancelling a NON-representative member uuid is a no-op (its content still runs), while cancelling the batch-representative uuid drops the WHOLE coalesced batch — in both cases the cancel response reports cancelled:false because the message was no longer in the queue. Coverage caveats: only uuid-STAMPED messages appear (a message enqueued without a uuid still runs but is never listed, so [] does not mean "nothing will run"); only main-thread messages are listed (subagent-addressed messages are out of scope); and the list may include internally-enqueued uuids the client never sent (cron triggers, auto-resume continuations) — ignore unknown uuids rather than treating them as an error. Ordering: on a clean interrupt this receipt is written before the interrupted turn result; a turn that crashes during interrupt handling emits its error result on a direct-write path that may precede the receipt. Snapshot is taken synchronously with abort processing — probing the queue after the interrupted result instead always loses the race against the drain loop, which starts the next queued turn immediately.
|
|
4089
|
+
* Uuids of async user messages that survive this interrupt: commands still in the queue, plus any batch already dequeued for the imminent turn but not yet reachable by the abort. An interrupt — plain or cancel_queued:true — that lands during the FIRST-command prewait window (before the first turn of the session has armed a controller) is additionally LATCHED, scoped to the user-intent work pending at that instant — the batch already dequeued and parked for the imminent turn, plus the user-intent main-thread commands then in the queue (the work this list enumerates): the first turn to arm that carries any of that doomed work starts already aborted, exactly once, so the listed prewait batch is delivered into an immediately-aborted turn, its frames and result flowing through the normal abort path, instead of running to completion. A turn carrying none of it arms live and leaves the latch waiting: a system delivery turn (for example a replayed host event), or a prompt enqueued after the interrupt — post-interrupt work is never coalesced with the doomed work and never dies to the latch, so the Stop kills exactly what this receipt listed. The latch is released when the doomed work is retired without arming: if a parked prewait batch is entirely cancelled, the latch is released even when other queued commands remain (those arm and run normally); with nothing parked, it is released once none of the doomed commands remains queued — work enqueued after the interrupt neither holds it up nor is aborted by it. Survivors that ride any later turn run normally. These WILL run (subject to that latch) unless cancelled first (or unless the request set cancel_queued:true, in which case every uuid-stamped survivor this process holds is removed, emitted a terminal `cancelled` synchronously, and listed under `cancelled` instead — leaving here only what a client driving a hosted session can no longer recall: a send already in flight to that session, or the first prompt the session was created with; a send that client still holds on its own machine behind a send gate (today: waiting for the session to take the initial upload from that machine) has not gone out, so it is withdrawn and listed under `cancelled` like a queued one, and cancel_async_message can withdraw it too, while a plain interrupt leaves it held and lists it here). Cancellation granularity: uuids still in the queue are individually cancellable via cancel_async_message; once a batch is dequeued and coalesced into one turn, cancelling a NON-representative member uuid is a no-op (its content still runs), while cancelling the batch-representative uuid drops the WHOLE coalesced batch — in both cases the cancel response reports cancelled:false because the message was no longer in the queue. Coverage caveats: only uuid-STAMPED messages appear (a message enqueued without a uuid still runs but is never listed, so [] does not mean "nothing will run"); only main-thread messages are listed (subagent-addressed messages are out of scope); and the list may include internally-enqueued uuids the client never sent (cron triggers, auto-resume continuations) — ignore unknown uuids rather than treating them as an error. Ordering: on a clean interrupt this receipt is written before the interrupted turn result; a turn that crashes during interrupt handling emits its error result on a direct-write path that may precede the receipt. Snapshot is taken synchronously with abort processing — probing the queue after the interrupted result instead always loses the race against the drain loop, which starts the next queued turn immediately.
|
|
4040
4090
|
*/
|
|
4041
4091
|
still_queued: string[];
|
|
4042
4092
|
/**
|
|
@@ -4231,6 +4281,20 @@ declare type SDKControlRegisterRepoRootRequest = {
|
|
|
4231
4281
|
reload_skills?: boolean;
|
|
4232
4282
|
};
|
|
4233
4283
|
|
|
4284
|
+
/**
|
|
4285
|
+
* Re-reads the output-style directories from disk (a style file written mid-session is otherwise invisible until the next session) and returns the refreshed style names. Also drops the shared markdown-file scan cache, so agents, skills and routines re-read their directories on their next use.
|
|
4286
|
+
*/
|
|
4287
|
+
declare type SDKControlReloadOutputStylesRequest = {
|
|
4288
|
+
subtype: 'reload_output_styles';
|
|
4289
|
+
};
|
|
4290
|
+
|
|
4291
|
+
/**
|
|
4292
|
+
* Refreshed output style names after reload, built-in and custom, in the order the initialize response lists them.
|
|
4293
|
+
*/
|
|
4294
|
+
export declare type SDKControlReloadOutputStylesResponse = {
|
|
4295
|
+
available_output_styles: string[];
|
|
4296
|
+
};
|
|
4297
|
+
|
|
4234
4298
|
/**
|
|
4235
4299
|
* Reloads plugins from disk and returns the refreshed session components.
|
|
4236
4300
|
*/
|
|
@@ -4291,7 +4355,7 @@ export declare type SDKControlRequest = {
|
|
|
4291
4355
|
request: SDKControlRequestInner;
|
|
4292
4356
|
};
|
|
4293
4357
|
|
|
4294
|
-
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlListModelsRequest | SDKControlGetUsageRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlRegisterRepoRootRequest | SDKControlReloadPluginsRequest | SDKControlReloadSkillsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlUpdateSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest;
|
|
4358
|
+
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlListModelsRequest | SDKControlGetUsageRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlRegisterRepoRootRequest | SDKControlReloadPluginsRequest | SDKControlReloadSkillsRequest | SDKControlReloadOutputStylesRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlUpdateSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest;
|
|
4295
4359
|
|
|
4296
4360
|
/**
|
|
4297
4361
|
* Progress for a long-running client-originated control_request (currently only side_question), correlated by request_id. status 'started' means the worker accepted the request and launched the work; 'api_retry' carries the same retry counters as SDKAPIRetryMessage and is present only for that status.
|
|
@@ -5162,7 +5226,7 @@ export declare type SDKTaskNotificationMessage = {
|
|
|
5162
5226
|
resource_links?: SDKMcpResourceLink[];
|
|
5163
5227
|
skip_transcript?: boolean;
|
|
5164
5228
|
/**
|
|
5165
|
-
* True for
|
|
5229
|
+
* True for tasks that are not activity (every skip_transcript task, plus every live-update watcher, requested or auto-started); hosts should exclude them from activity indicators.
|
|
5166
5230
|
*/
|
|
5167
5231
|
ambient?: boolean;
|
|
5168
5232
|
uuid: UUID;
|
|
@@ -5223,7 +5287,7 @@ export declare type SDKTaskStartedMessage = {
|
|
|
5223
5287
|
*/
|
|
5224
5288
|
skip_transcript?: boolean;
|
|
5225
5289
|
/**
|
|
5226
|
-
* True for
|
|
5290
|
+
* True for tasks that are not activity (every skip_transcript task, plus every live-update watcher, requested or auto-started); hosts should exclude them from activity indicators.
|
|
5227
5291
|
*/
|
|
5228
5292
|
ambient?: boolean;
|
|
5229
5293
|
uuid: UUID;
|
|
@@ -6228,6 +6292,14 @@ export declare interface Settings {
|
|
|
6228
6292
|
* Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).
|
|
6229
6293
|
*/
|
|
6230
6294
|
defaultShell?: 'bash' | 'powershell';
|
|
6295
|
+
/**
|
|
6296
|
+
* How many characters of a successful Bash or PowerShell command's output Claude receives inline (default 30000; values clamp to 4000-128000). Output past this is saved to a file and Claude receives a short preview plus the path. When set, this also replaces BASH_MAX_OUTPUT_LENGTH, which on its own only sizes the read-back window.
|
|
6297
|
+
*/
|
|
6298
|
+
bashOutputMaxChars?: number;
|
|
6299
|
+
/**
|
|
6300
|
+
* How many characters of a background task's output the TaskOutput tool hands Claude inline (default 32000; values clamp to 4000-128000). Longer output is cut to its most recent characters with the path of the full output file, except that a shell command still running returns its first characters up to this size. When set, this also replaces TASK_MAX_OUTPUT_LENGTH, which on its own only sizes that window.
|
|
6301
|
+
*/
|
|
6302
|
+
taskOutputMaxChars?: number;
|
|
6231
6303
|
/**
|
|
6232
6304
|
* Whether Claude responds after an input-box ! bash command runs. Set to false to add the command output to context without a response. Default: true.
|
|
6233
6305
|
*/
|
|
@@ -8086,7 +8158,7 @@ export declare interface Settings {
|
|
|
8086
8158
|
*/
|
|
8087
8159
|
editorMode?: 'normal' | 'vim';
|
|
8088
8160
|
/**
|
|
8089
|
-
*
|
|
8161
|
+
* Deprecated: no longer has any effect. The prompt's word-editing keys always follow Bash (readline) conventions.
|
|
8090
8162
|
*/
|
|
8091
8163
|
keybindingFlavor?: 'classic' | 'readline';
|
|
8092
8164
|
/**
|