@anthropic-ai/claude-agent-sdk 0.3.270 → 0.3.271
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 -98
- package/browser-sdk.d.ts +2 -2
- package/browser-sdk.js +45 -45
- package/manifest.json +22 -22
- package/manifest.zst.json +26 -26
- package/package.json +10 -10
- package/sdk-tools.d.ts +3 -7
- package/sdk.d.ts +13 -2
- package/sdk.mjs +75 -75
package/manifest.json
CHANGED
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.271",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "3e71603b64bc71ac14d744da2a14915fd2fd5097",
|
|
5
|
+
"modsCommit": "f4ceeecabff13e814dc4302620e2da1a688e47f8",
|
|
6
|
+
"buildDate": "2026-09-14T19:16:17Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "87d119eb46782a1369d79d6e8cc00557f1b51bc9db7a51bd01fa2f909d8fe3dc",
|
|
11
|
+
"size": 210094800
|
|
12
12
|
},
|
|
13
13
|
"darwin-x64": {
|
|
14
14
|
"binary": "claude",
|
|
15
|
-
"checksum": "
|
|
16
|
-
"size":
|
|
15
|
+
"checksum": "98e796c311fd8c1d3ed40b408aff2aa48f8d2e19761fa98d3777187ad32fa9e5",
|
|
16
|
+
"size": 218876896
|
|
17
17
|
},
|
|
18
18
|
"linux-arm64": {
|
|
19
19
|
"binary": "claude",
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "daecf0a2fdae57c1603a937b60ea3e69b97750be6bce93cca5664d05a5ef50f5",
|
|
21
|
+
"size": 226418928
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
24
|
"binary": "claude",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "5e7b6fc24d0e124f68e99a0641c47b662945c6d197d768d7ad7a72cbf1897f58",
|
|
26
|
+
"size": 226509112
|
|
27
27
|
},
|
|
28
28
|
"linux-arm64-musl": {
|
|
29
29
|
"binary": "claude",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "22a65f5aeca45316dc3fdb9f7b331fe19324dd2000bd3116f92481edef0062ac",
|
|
31
|
+
"size": 219035296
|
|
32
32
|
},
|
|
33
33
|
"linux-x64-musl": {
|
|
34
34
|
"binary": "claude",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "7788f912491192b57a12bc8ba2845379e264b95f9928dfdf50953617a2ae88da",
|
|
36
|
+
"size": 220430296
|
|
37
37
|
},
|
|
38
38
|
"win32-x64": {
|
|
39
39
|
"binary": "claude.exe",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "2673fc39e91d71413b74070634738c7f85d639af5aa742366c93c949b9022f21",
|
|
41
|
+
"size": 229622944
|
|
42
42
|
},
|
|
43
43
|
"win32-arm64": {
|
|
44
44
|
"binary": "claude.exe",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "594da8bf15ba460c2c3ffd3f25ae935eb8b13aebf6dc6c7b426daa8c8496e249",
|
|
46
|
+
"size": 220847264
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"sdkCompat": {
|
|
50
50
|
"testedWrapperVersions": [
|
|
51
|
-
"0.3.229",
|
|
52
51
|
"0.3.231",
|
|
53
52
|
"0.3.232",
|
|
54
53
|
"0.3.233",
|
|
@@ -77,7 +76,8 @@
|
|
|
77
76
|
"0.3.266",
|
|
78
77
|
"0.3.267",
|
|
79
78
|
"0.3.268",
|
|
80
|
-
"0.3.269"
|
|
79
|
+
"0.3.269",
|
|
80
|
+
"0.3.270"
|
|
81
81
|
],
|
|
82
82
|
"harnessSchema": 1
|
|
83
83
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,62 +1,61 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.271",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "3e71603b64bc71ac14d744da2a14915fd2fd5097",
|
|
5
|
+
"modsCommit": "f4ceeecabff13e814dc4302620e2da1a688e47f8",
|
|
6
|
+
"buildDate": "2026-09-14T19:17:35Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude.zst",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "a72ffcf9b64ec1adaba02dacf665c5428566757d37eeff345c32f2b1413c18b2",
|
|
11
|
+
"size": 69155236,
|
|
12
12
|
"bundle": {
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "e64bf7d1a96398493ce7c59d9d5eb2ff347571781effb4cc1eece1011925c4cf",
|
|
14
|
+
"size": 69152415
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"darwin-x64": {
|
|
18
18
|
"binary": "claude.zst",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "72e14099bd969cfd606151ad7e342b8f0c48493ed8cb35c451bb133c15f6eadd",
|
|
20
|
+
"size": 73302822,
|
|
21
21
|
"bundle": {
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "14e85b77c34de089accb41a4b07c51ccae5f7c0ca62f3c23f2fdab60c4587720",
|
|
23
|
+
"size": 73306375
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64": {
|
|
27
27
|
"binary": "claude.zst",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "12b515b0c8793f81c148c06fbeddda292922c52f0ef037f7f887905f22edeb86",
|
|
29
|
+
"size": 78333371
|
|
30
30
|
},
|
|
31
31
|
"linux-x64": {
|
|
32
32
|
"binary": "claude.zst",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "33675fe80c11c8b925a457321182b32f0d0b916c40e78805c28c76ad1200d9cb",
|
|
34
|
+
"size": 78955009
|
|
35
35
|
},
|
|
36
36
|
"linux-arm64-musl": {
|
|
37
37
|
"binary": "claude.zst",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "c7f949c8cd549681f51966a905df934804a81ffe7a8bfd970e67371b3d03d9bc",
|
|
39
|
+
"size": 76787311
|
|
40
40
|
},
|
|
41
41
|
"linux-x64-musl": {
|
|
42
42
|
"binary": "claude.zst",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "1de0cc77ae789355e3ad46bb59ae78f4dcbcba152ef81e7a19eeca37710e475e",
|
|
44
|
+
"size": 77447970
|
|
45
45
|
},
|
|
46
46
|
"win32-x64": {
|
|
47
47
|
"binary": "claude.exe.zst",
|
|
48
|
-
"checksum": "
|
|
49
|
-
"size":
|
|
48
|
+
"checksum": "5f1e3fe534ea845183c78c41d33c3d1603f1642a168d16bd264efd918b807865",
|
|
49
|
+
"size": 81350260
|
|
50
50
|
},
|
|
51
51
|
"win32-arm64": {
|
|
52
52
|
"binary": "claude.exe.zst",
|
|
53
|
-
"checksum": "
|
|
54
|
-
"size":
|
|
53
|
+
"checksum": "d68bde1db5995884f2e33746d79c40bdf0000e04619e718b0465c62d7c793a60",
|
|
54
|
+
"size": 78104543
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"sdkCompat": {
|
|
58
58
|
"testedWrapperVersions": [
|
|
59
|
-
"0.3.229",
|
|
60
59
|
"0.3.231",
|
|
61
60
|
"0.3.232",
|
|
62
61
|
"0.3.233",
|
|
@@ -85,7 +84,8 @@
|
|
|
85
84
|
"0.3.266",
|
|
86
85
|
"0.3.267",
|
|
87
86
|
"0.3.268",
|
|
88
|
-
"0.3.269"
|
|
87
|
+
"0.3.269",
|
|
88
|
+
"0.3.270"
|
|
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.271",
|
|
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.271",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.271",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.271",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.271",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.271",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.271",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.271",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.271"
|
|
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.271"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -2910,13 +2910,9 @@ export interface MonitorInput {
|
|
|
2910
2910
|
*/
|
|
2911
2911
|
description: string;
|
|
2912
2912
|
/**
|
|
2913
|
-
* Kill the monitor after this deadline. Default 300000ms
|
|
2913
|
+
* Kill the monitor after this deadline. Default 300000ms. Deadlines above 1800000ms are capped to 1800000ms. You are notified at expiry and can re-arm.
|
|
2914
2914
|
*/
|
|
2915
2915
|
timeout_ms: number;
|
|
2916
|
-
/**
|
|
2917
|
-
* Run for the lifetime of the session (no timeout). Use for session-length watches like PR monitoring or log tails. Stop with TaskStop.
|
|
2918
|
-
*/
|
|
2919
|
-
persistent: boolean;
|
|
2920
2916
|
/**
|
|
2921
2917
|
* Shell command or script. Each stdout line is an event; exit ends the watch.
|
|
2922
2918
|
*/
|
|
@@ -3092,7 +3088,7 @@ export interface ProposeGoalInput {
|
|
|
3092
3088
|
}
|
|
3093
3089
|
export interface ArtifactInput {
|
|
3094
3090
|
/**
|
|
3095
|
-
* Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it. 'read' returns the content of the published artifact at `url` (raw HTML for the user's own; an isolated summary, steered by the optional `prompt`, for one shared with them, though a page published in this session's own Slack channel can come back in full as untrusted content) — see **
|
|
3091
|
+
* Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it. 'read' returns the content of the published artifact at `url` (raw HTML for the user's own; an isolated summary, steered by the optional `prompt`, for one shared with them, though a page published in this session's own Slack channel can come back in full as untrusted content) — see **Calls**. 'watch', 'unwatch', and 'status' manage live-update subscriptions that notify a session when an artifact is republished elsewhere, and those aren't available in this session: 'watch' only reports that — no republish notification reaches this session — and 'status' lists this session's artifact watches (pass `url` to check one). 'upload_asset' adds one local media, PDF, font, or text file to an existing artifact — pass `url` and `file_path`. 'list_assets' lists the files in an artifact's asset store (pass `url`; `after` continues a listing), 'read_asset' saves one of them to a local file named by its id (pass `url` and `asset_id`, optionally `out_dir`), and 'delete_asset' permanently removes one (pass `url` and `asset_id`). See **Artifact assets** above.
|
|
3096
3092
|
*/
|
|
3097
3093
|
action?:
|
|
3098
3094
|
| "publish"
|
|
@@ -3151,7 +3147,7 @@ export interface ArtifactInput {
|
|
|
3151
3147
|
*/
|
|
3152
3148
|
force?: boolean;
|
|
3153
3149
|
/**
|
|
3154
|
-
* read_asset: directory to save
|
|
3150
|
+
* read_asset: directory to save into — default: this artifact’s folder in your scratchpad directory, where saving needs no approval and which you can Read from. read_asset names the file by the asset id plus the extension for its type; saving to any directory other than the default is an ordinary file save the user may be asked to approve.
|
|
3155
3151
|
*/
|
|
3156
3152
|
out_dir?: string;
|
|
3157
3153
|
/**
|
package/sdk.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ export declare type AgentDefinition = {
|
|
|
77
77
|
* Run this agent as a background task (non-blocking, fire-and-forget) when invoked
|
|
78
78
|
*/
|
|
79
79
|
background?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Run this agent without the user, project and local CLAUDE.md instruction files when it runs as a subagent; managed policy files are kept. For agents that take everything they need from the delegation prompt. No effect on the main session agent.
|
|
82
|
+
*/
|
|
83
|
+
omitClaudeMd?: boolean;
|
|
80
84
|
/**
|
|
81
85
|
* Scope for auto-loading agent memory files. 'user' - ~/.claude/agent-memory/<agentType>/, 'project' - .claude/agent-memory/<agentType>/, 'local' - .claude/agent-memory-local/<agentType>/
|
|
82
86
|
*/
|
|
@@ -1681,6 +1685,7 @@ export declare type Options = {
|
|
|
1681
1685
|
*/
|
|
1682
1686
|
perTaskStopAffordance?: boolean;
|
|
1683
1687
|
|
|
1688
|
+
|
|
1684
1689
|
/**
|
|
1685
1690
|
* When false, disables session persistence to disk. Sessions will not be
|
|
1686
1691
|
* saved to ~/.claude/projects/ and cannot be resumed later. Useful for
|
|
@@ -3406,6 +3411,7 @@ export declare type SDKAssistantMessage = {
|
|
|
3406
3411
|
|
|
3407
3412
|
|
|
3408
3413
|
|
|
3414
|
+
|
|
3409
3415
|
};
|
|
3410
3416
|
|
|
3411
3417
|
export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'account_on_hold' | 'verification_required' | 'billing_error' | 'rate_limit' | 'overloaded' | 'invalid_request' | 'model_not_found' | 'server_error' | 'unknown' | 'max_output_tokens' | 'cloud_credential_error';
|
|
@@ -3878,6 +3884,10 @@ declare type SDKControlGetHooksListingResponse = {
|
|
|
3878
3884
|
* Hooks configured in managed settings (they run even under a non-managed disableAllHooks).
|
|
3879
3885
|
*/
|
|
3880
3886
|
policyHookCount: number;
|
|
3887
|
+
/**
|
|
3888
|
+
* Present when a managed settings source exists but could not be read: what the organization configured is unknown, so edit_hook refuses every edit (fail-closed) and a host locks its editing controls, as it does under the three locks above.
|
|
3889
|
+
*/
|
|
3890
|
+
policyUnreadable?: true;
|
|
3881
3891
|
};
|
|
3882
3892
|
/**
|
|
3883
3893
|
* Present only when the session runs under --safe-mode.
|
|
@@ -4212,6 +4222,7 @@ declare type SDKControlInitializeRequest = {
|
|
|
4212
4222
|
* 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.
|
|
4213
4223
|
*/
|
|
4214
4224
|
perTaskStopAffordance?: boolean;
|
|
4225
|
+
|
|
4215
4226
|
/**
|
|
4216
4227
|
* 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.
|
|
4217
4228
|
*/
|
|
@@ -6330,7 +6341,7 @@ export declare interface Settings {
|
|
|
6330
6341
|
replaceBuiltInOptions?: boolean;
|
|
6331
6342
|
};
|
|
6332
6343
|
/**
|
|
6333
|
-
* Price usage at your organization's contracted rates instead of list price. Affects every spend figure Claude Code reports — /cost, the status line, the SDK total_cost_usd, --max-budget-usd, and the OpenTelemetry cost metric and events — which remain USD estimates, not an invoice (the per-Mtok price labels in /model stay at list). "overrides" maps a model ID to its USD-per-million-token rates (input, output, cacheRead, cacheWrite — all four required, each 0 to 10000; cacheWrite prices both 5-minute and 1-hour cache writes). A matching row is charged exactly as written; fast-mode and US-data-residency surcharges are not added on top. A key Claude Code itself uses for a built-in model — its ID such as "claude-sonnet-4-6", or its first-party, Bedrock (any or no region prefix), Vertex or Foundry ID — covers every dated and provider form of that model; any other key — a gateway model alias, or a spelling Claude Code does not itself use — matches that model ID only (case-insensitive), and such an exact match wins over a built-in row. On Bedrock an application inference profile is matched by its backing model. An invalid row or multiplier is reported and skipped; the rest still apply. "multiplier" in (0,
|
|
6344
|
+
* Price usage at your organization's contracted rates instead of list price. Affects every spend figure Claude Code reports — /cost, the status line, the SDK total_cost_usd, --max-budget-usd, and the OpenTelemetry cost metric and events — which remain USD estimates, not an invoice (the per-Mtok price labels in /model stay at list). "overrides" maps a model ID to its USD-per-million-token rates (input, output, cacheRead, cacheWrite — all four required, each 0 to 10000; cacheWrite prices both 5-minute and 1-hour cache writes). A matching row is charged exactly as written; fast-mode and US-data-residency surcharges are not added on top. A key Claude Code itself uses for a built-in model — its ID such as "claude-sonnet-4-6", or its first-party, Bedrock (any or no region prefix), Vertex or Foundry ID — covers every dated and provider form of that model; any other key — a gateway model alias, or a spelling Claude Code does not itself use — matches that model ID only (case-insensitive), and such an exact match wins over a built-in row. On Bedrock an application inference profile is matched by its backing model. An invalid row or multiplier is reported and skipped; the rest still apply. "multiplier" in (0, 10] scales every computed cost, overridden or not (0.85 = 85% of the price, 1.2 = 120%). Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json), or — when none of those sets it — when supplied by a host application that manages the model provider; ignored in user, project, local and --settings sources.
|
|
6334
6345
|
*/
|
|
6335
6346
|
modelPricing?: {
|
|
6336
6347
|
multiplier?: number;
|
|
@@ -6661,7 +6672,7 @@ export declare interface Settings {
|
|
|
6661
6672
|
*/
|
|
6662
6673
|
enableWorkflows?: boolean;
|
|
6663
6674
|
/**
|
|
6664
|
-
* Advisory size guideline for the dynamic workflows Claude writes: "small" aims for fewer than 5 agents, "medium"
|
|
6675
|
+
* Advisory size guideline for the dynamic workflows Claude writes: "small" aims for fewer than 5 agents, "medium" fewer than 10, "large" fewer than 50, and "unrestricted" sends no guideline. Unset defaults to "medium", or "small" on Pro plans. A value here — including from managed settings — takes precedence over the "Dynamic workflow size" choice in /config, and that /config row is hidden while a settings file provides the key. This is a guideline, not an enforced limit.
|
|
6665
6676
|
*/
|
|
6666
6677
|
workflowSizeGuideline?: 'unrestricted' | 'small' | 'medium' | 'large';
|
|
6667
6678
|
/**
|