@anthropic-ai/claude-agent-sdk 0.3.314 → 0.3.316
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 +75 -73
- package/browser-sdk.js +42 -40
- package/core-07pvccxf.mjs +43 -0
- package/{core-kzw924e6.mjs → core-0rjxgk9e.mjs} +3 -3
- package/core-fpeb751h.mjs +33 -0
- package/{core-bb8r6h44.mjs → core-jf0rbr11.mjs} +1 -1
- package/core.mjs +9 -9
- package/manifest.json +19 -21
- package/manifest.zst.json +23 -25
- package/package.json +14 -14
- package/sdk.d.ts +22 -5
- package/sdk.mjs +61 -57
- package/core-a9vq6p1m.mjs +0 -31
- package/core-t4mxrz5y.mjs +0 -43
package/manifest.json
CHANGED
|
@@ -1,54 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.316",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-10-
|
|
4
|
+
"commit": "cd7ceb459c6864567b16a11f60101b24421475c1",
|
|
5
|
+
"buildDate": "2026-10-30T23:47:48Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "64c327e92b2c5e0f78c0a980c5a518121e1f0d140ca771ca5dd4488d1a2dcb3f",
|
|
10
|
+
"size": 310114176
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
13
13
|
"binary": "claude",
|
|
14
|
-
"checksum": "
|
|
15
|
-
"size":
|
|
14
|
+
"checksum": "203d22fbafdab9f6b0cda962ec573e32ab970894c63b1dfb0409378f28b9c344",
|
|
15
|
+
"size": 324381312
|
|
16
16
|
},
|
|
17
17
|
"linux-arm64": {
|
|
18
18
|
"binary": "claude",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "55cdb8e162d190432696ea54010e0fca2e18d06fa7a7127fd563b9ffd4f22624",
|
|
20
|
+
"size": 328459544
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"binary": "claude",
|
|
24
|
-
"checksum": "
|
|
25
|
-
"size":
|
|
24
|
+
"checksum": "fd13c70000fec3f2116dfbcbb6121210b4a29328bf0e46210a59dd594a67d824",
|
|
25
|
+
"size": 328262000
|
|
26
26
|
},
|
|
27
27
|
"linux-arm64-musl": {
|
|
28
28
|
"binary": "claude",
|
|
29
|
-
"checksum": "
|
|
30
|
-
"size":
|
|
29
|
+
"checksum": "d774cb39055cff62af476af32702f1fc4f888a7e395a37434a95d6f5a98818a0",
|
|
30
|
+
"size": 311914480
|
|
31
31
|
},
|
|
32
32
|
"linux-x64-musl": {
|
|
33
33
|
"binary": "claude",
|
|
34
|
-
"checksum": "
|
|
35
|
-
"size":
|
|
34
|
+
"checksum": "8bc3d015479b8b87dfde3f69f9bdb96c658758a8eb31892fd8fbece8d8a08bcf",
|
|
35
|
+
"size": 314779944
|
|
36
36
|
},
|
|
37
37
|
"win32-x64": {
|
|
38
38
|
"binary": "claude.exe",
|
|
39
|
-
"checksum": "
|
|
40
|
-
"size":
|
|
39
|
+
"checksum": "e896a9d8da519353a49bf69ca4a695ba7e09067752687c675b3969041e632d52",
|
|
40
|
+
"size": 335469216
|
|
41
41
|
},
|
|
42
42
|
"win32-arm64": {
|
|
43
43
|
"binary": "claude.exe",
|
|
44
|
-
"checksum": "
|
|
45
|
-
"size":
|
|
44
|
+
"checksum": "a44168f2360bf21709855321b25f1eeb021de8a8d4be5d25a8b397dcbf9043f8",
|
|
45
|
+
"size": 315967648
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"sdkCompat": {
|
|
49
49
|
"testedWrapperVersions": [
|
|
50
|
-
"0.3.281",
|
|
51
|
-
"0.3.282",
|
|
52
50
|
"0.3.283",
|
|
53
51
|
"0.3.284",
|
|
54
52
|
"0.3.285",
|
package/manifest.zst.json
CHANGED
|
@@ -1,62 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.316",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-10-
|
|
4
|
+
"commit": "cd7ceb459c6864567b16a11f60101b24421475c1",
|
|
5
|
+
"buildDate": "2026-10-30T23:49:32Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude.zst",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "e43d57df0ce383e084b22f1d4fb7be6e0bdb1d40b4ceb042f3cfba96d5ec468f",
|
|
10
|
+
"size": 106990783,
|
|
11
11
|
"bundle": {
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "a7a1259e670213d54908d0a86e933e22d6f183b4a97b8535247e9eaac0e588ea",
|
|
13
|
+
"size": 106996138
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"darwin-x64": {
|
|
17
17
|
"binary": "claude.zst",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "df7365b5c8019682aa8cf5e66b5547e9fa4980bc74ed64dbac4c1eb45ef228e5",
|
|
19
|
+
"size": 113964923,
|
|
20
20
|
"bundle": {
|
|
21
|
-
"checksum": "
|
|
22
|
-
"size":
|
|
21
|
+
"checksum": "e0adb0f83a30c29ec48bd3840c6de9810714892f40bd3fd5d499e014fa4bb309",
|
|
22
|
+
"size": 113970215
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64": {
|
|
26
26
|
"binary": "claude.zst",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "d4ed34a7ecd889497fccc0951c869867b2369196804e3d83b8e486d424b973e1",
|
|
28
|
+
"size": 117001734
|
|
29
29
|
},
|
|
30
30
|
"linux-x64": {
|
|
31
31
|
"binary": "claude.zst",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "4108764100675c0773d98011d5091f427f30eebfc567aa9f1b5f4d9a54630a10",
|
|
33
|
+
"size": 118793137
|
|
34
34
|
},
|
|
35
35
|
"linux-arm64-musl": {
|
|
36
36
|
"binary": "claude.zst",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "de9af064a067f4c2944c65751f76b671c1228465c271a8e1773ac65598ca04cc",
|
|
38
|
+
"size": 112468657
|
|
39
39
|
},
|
|
40
40
|
"linux-x64-musl": {
|
|
41
41
|
"binary": "claude.zst",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "113294cd5db89a1a8b94406622cbe2b663a7c922a43b2e0d44bfd7d93d931438",
|
|
43
|
+
"size": 113886207
|
|
44
44
|
},
|
|
45
45
|
"win32-x64": {
|
|
46
46
|
"binary": "claude.exe.zst",
|
|
47
|
-
"checksum": "
|
|
48
|
-
"size":
|
|
47
|
+
"checksum": "26af66d4fa70e980047d54c85140579de0271d79a9257ac467f90a0ecdca528d",
|
|
48
|
+
"size": 122064664
|
|
49
49
|
},
|
|
50
50
|
"win32-arm64": {
|
|
51
51
|
"binary": "claude.exe.zst",
|
|
52
|
-
"checksum": "
|
|
53
|
-
"size":
|
|
52
|
+
"checksum": "fc420bf59ecf1f27bdf8aff5d06dc6ed01187f6ada3f71411ce45ce392f210fb",
|
|
53
|
+
"size": 115553923
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"sdkCompat": {
|
|
57
57
|
"testedWrapperVersions": [
|
|
58
|
-
"0.3.281",
|
|
59
|
-
"0.3.282",
|
|
60
58
|
"0.3.283",
|
|
61
59
|
"0.3.284",
|
|
62
60
|
"0.3.285",
|
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.316",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"zod": "^4.0.0"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.
|
|
67
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.
|
|
68
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.
|
|
69
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.
|
|
70
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.
|
|
71
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.316",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.316",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.316",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.316",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.316",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.316",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.316",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.316"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"sdk.mjs",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
"extractFromBunfs.d.ts",
|
|
86
86
|
"manifest.json",
|
|
87
87
|
"manifest.zst.json",
|
|
88
|
-
"core-
|
|
89
|
-
"core-
|
|
90
|
-
"core-
|
|
91
|
-
"core-
|
|
88
|
+
"core-07pvccxf.mjs",
|
|
89
|
+
"core-0rjxgk9e.mjs",
|
|
90
|
+
"core-fpeb751h.mjs",
|
|
91
|
+
"core-jf0rbr11.mjs"
|
|
92
92
|
],
|
|
93
|
-
"claudeCodeVersion": "2.1.
|
|
93
|
+
"claudeCodeVersion": "2.1.316"
|
|
94
94
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -420,6 +420,10 @@ declare type ControlErrorResponse = {
|
|
|
420
420
|
* request_user_dialog requests this CLI process has issued and not yet resolved (sibling of pending_permission_requests, with the same inherited-prompt caveat), so a client joining an already-initialized session can re-arm in-flight dialogs. Always present (possibly empty) on a success `initialize` response from Claude Code v2.1.268 or later; earlier versions could omit it, so treat absence as an older CLI rather than as "nothing pending". Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
|
|
421
421
|
*/
|
|
422
422
|
pending_user_dialog_requests?: SDKControlRequest[];
|
|
423
|
+
/**
|
|
424
|
+
* elicitation requests that this CLI process sent and that are not yet answered or withdrawn (sibling of pending_permission_requests), each as it was sent, so a client that joins after an MCP server asked can still show the question. Present (possibly empty) on a success `initialize` response when this CLI lists them, which not every session does yet; absence says nothing about what is pending. Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
|
|
425
|
+
*/
|
|
426
|
+
pending_elicitation_requests?: SDKControlRequest[];
|
|
423
427
|
};
|
|
424
428
|
|
|
425
429
|
/**
|
|
@@ -443,6 +447,10 @@ declare type ControlResponse = {
|
|
|
443
447
|
* request_user_dialog requests this CLI process has issued and not yet resolved (sibling of pending_permission_requests, with the same inherited-prompt caveat), so a client joining an already-initialized session can re-arm in-flight dialogs. Always present (possibly empty) on a success `initialize` response from Claude Code v2.1.268 or later; earlier versions could omit it, so treat absence as an older CLI rather than as "nothing pending". Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
|
|
444
448
|
*/
|
|
445
449
|
pending_user_dialog_requests?: SDKControlRequest[];
|
|
450
|
+
/**
|
|
451
|
+
* elicitation requests that this CLI process sent and that are not yet answered or withdrawn (sibling of pending_permission_requests), each as it was sent, so a client that joins after an MCP server asked can still show the question. Present (possibly empty) on a success `initialize` response when this CLI lists them, which not every session does yet; absence says nothing about what is pending. Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
|
|
452
|
+
*/
|
|
453
|
+
pending_elicitation_requests?: SDKControlRequest[];
|
|
446
454
|
};
|
|
447
455
|
|
|
448
456
|
declare namespace coreTypes {
|
|
@@ -1297,6 +1305,7 @@ export declare type McpServerStatus = {
|
|
|
1297
1305
|
|
|
1298
1306
|
|
|
1299
1307
|
|
|
1308
|
+
|
|
1300
1309
|
/**
|
|
1301
1310
|
* Configuration scope (e.g., project, user, local, claudeai, managed)
|
|
1302
1311
|
*/
|
|
@@ -5638,11 +5647,11 @@ export declare type SDKMessageOrigin = {
|
|
|
5638
5647
|
} | {
|
|
5639
5648
|
kind: 'task-notification';
|
|
5640
5649
|
/**
|
|
5641
|
-
* Present when the delivery is the fired stored prompt of a scheduled task
|
|
5650
|
+
* Present when the delivery is the fired stored prompt of a scheduled task ('scheduled-trigger', stamped from server-asserted provenance, or declared by a local host for its own scheduled runs; the schedule attests storage, not authorship) or a coordinator co-member SendMessage delivery ('peer-send-message': model-authored text from another of the same user's sessions, verified by the server-stamped receiver co-membership — task-notification for prompt authority, but distinguishable so the receive-side crossSessionInbound setting can apply to it). The harness frames a scheduled-trigger delivery as the session's assigned task instead of the generic background-notification frame. Absent on webhook, PR-steward, plugin, and background-event deliveries.
|
|
5642
5651
|
*/
|
|
5643
5652
|
subkind?: 'scheduled-trigger' | 'peer-send-message' | 'projects-relay' | 'session-inbox';
|
|
5644
5653
|
/**
|
|
5645
|
-
* On a 'scheduled-trigger' delivery, why it fired: a short lowercase token such as 'scheduled', 'manual', 'retry', 'catch_up' or 'api'. Set by the server for cloud
|
|
5654
|
+
* On a 'scheduled-trigger' delivery, why it fired: a short lowercase token such as 'scheduled', 'manual', 'retry', 'catch_up' or 'api'. Set by the server for cloud scheduled tasks, or declared by a local host for its own scheduled runs, which is honored only in a process the host started with CLAUDE_CODE_HOST_SCHEDULED_RUN=1 (a local host's value is kept only if it is 1 to 32 lowercase letters or underscores); absent when neither sent one.
|
|
5646
5655
|
*/
|
|
5647
5656
|
fireReason?: string;
|
|
5648
5657
|
|
|
@@ -6070,6 +6079,9 @@ export declare type SDKResultSuccess = {
|
|
|
6070
6079
|
first_text_post_queue_wait_ms?: number;
|
|
6071
6080
|
first_text_post_queued_behind?: 'durable_post' | 'ephemeral_post' | 'retry_backoff' | 'hold' | 'none';
|
|
6072
6081
|
first_text_post_wall_ms?: number;
|
|
6082
|
+
|
|
6083
|
+
|
|
6084
|
+
|
|
6073
6085
|
time_to_request_from_spawn_ms?: number;
|
|
6074
6086
|
warm_spare_claimed?: boolean;
|
|
6075
6087
|
|
|
@@ -6283,6 +6295,7 @@ export declare type SDKSystemMessage = {
|
|
|
6283
6295
|
*/
|
|
6284
6296
|
effort?: ('low' | 'medium' | 'high' | 'xhigh' | 'max') | null;
|
|
6285
6297
|
|
|
6298
|
+
|
|
6286
6299
|
/**
|
|
6287
6300
|
* Whether the session's transcript is in focus view ('focus': the model is told the user sees only its final message per turn, so clients may collapse each turn to the prompt and the final response; 'default' otherwise). Toggled by /focus, including over Remote Control. Present on Remote Control bridge init frames and on the per-turn init of headless stream-json runs (`claude rc` workers, -p, the SDK's subprocess transport); absent on hosts that do not publish it (the in-process engine) and on CLIs that predate the field. Re-emitted inits carry the current value — the newest frame wins.
|
|
6288
6301
|
*/
|
|
@@ -7178,9 +7191,13 @@ export declare interface Settings {
|
|
|
7178
7191
|
*/
|
|
7179
7192
|
blockReadsOutsideWorkingDirectories?: boolean;
|
|
7180
7193
|
/**
|
|
7181
|
-
* Refuse file-tool writes (Write, Edit, NotebookEdit) outside the working directories in every permission mode; true in any settings source wins. No allow rule lifts it. Files that Claude Code keeps for the session are not refused: its plan files, scratchpad and background job folder, and the auto-memory of this project, unless
|
|
7194
|
+
* Refuse file-tool writes (Write, Edit, NotebookEdit) outside the working directories in every permission mode; true in any settings source wins. No allow rule lifts it. Files that Claude Code keeps for the session are not refused: its plan files, scratchpad and background job folder, and the auto-memory of this project, unless a repository settings file points it elsewhere. Nothing runs them unless the model asks. Also refuses file-tool writes to Claude Code settings files, inside the working directories too, and takes EnterWorktree and ExitWorktree, which move the working directory, out of the tools on offer. Does not limit shell commands, MCP tools, the programs that hooks run, or the memory tools. Cloud sessions (Claude Code on the web), whose file tools run in a container that is itself the boundary, may not apply it.
|
|
7182
7195
|
*/
|
|
7183
7196
|
blockWritesOutsideWorkingDirectories?: boolean;
|
|
7197
|
+
/**
|
|
7198
|
+
* For the program that starts Claude Code: read only from --settings and from settings that program sends while the session runs; ignored in user, project, local and managed settings. Absolute paths, each a folder with all below it or one file, that blockReadsOutsideWorkingDirectories lets through beside the working directories. It allows nothing: an allow rule, the permission mode or the user still decides each read, as with that setting off, and a shell command that hands such a path to a program is still asked about unless a Read allow rule covers it. The paths do not become working directories, so blockWritesOutsideWorkingDirectories refuses writes to them, and they are not told to MCP servers or to the model. Each path counts as written: a link in it is not followed and a pattern is not expanded, so list every spelling that a read may arrive by. Ignored: an entry that starts with ~, has a ".." segment or has white space at either end (as written or once normalized), a relative or network path, and the root of a filesystem. Does not change what sandboxed commands may read (sandbox.filesystem.allowRead does).
|
|
7199
|
+
*/
|
|
7200
|
+
blockReadsExemptPaths?: string[];
|
|
7184
7201
|
/**
|
|
7185
7202
|
* Disable auto mode
|
|
7186
7203
|
*/
|
|
@@ -7607,7 +7624,7 @@ export declare interface Settings {
|
|
|
7607
7624
|
*/
|
|
7608
7625
|
defaultShell?: 'bash' | 'powershell';
|
|
7609
7626
|
/**
|
|
7610
|
-
* Whether the Bash tool shows a diff of the files a Bash command changed (PostToolUse Bash hooks get the changed-file list in tool_response). Set to false to turn that off. Default:
|
|
7627
|
+
* Whether the Bash tool shows a diff of the files a Bash command changed (PostToolUse Bash hooks get the changed-file list in tool_response). Set to false to turn that off. Default: off, except in auto and bypassPermissions modes when the Bash tool handles file edits or the model's configuration turns it on. Only user, flag or policy settings can turn it on in other modes.
|
|
7611
7628
|
*/
|
|
7612
7629
|
bashEditDiffEnabled?: boolean;
|
|
7613
7630
|
/**
|
|
@@ -10332,7 +10349,7 @@ export declare type UserPromptSubmitHookInput = BaseHookInput & {
|
|
|
10332
10349
|
hook_event_name: 'UserPromptSubmit';
|
|
10333
10350
|
prompt: string;
|
|
10334
10351
|
/**
|
|
10335
|
-
* 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
|
|
10352
|
+
* 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 or a cloud scheduled task), `system` = other machine-injected turns (peer/channel messages, task notifications, auto-continuation), `poll_event` = the poll-event channel enqueue-time pass (the hook fires when the host submits an event, before its delivery ack exists — a blocking verdict rejects the event). Payloads may omit it while the field rolls out.
|
|
10336
10353
|
*/
|
|
10337
10354
|
source?: 'user' | 'sdk' | 'system' | 'loop_wakeup' | 'schedule_wakeup' | 'poll_event';
|
|
10338
10355
|
session_title?: string;
|