@anthropic-ai/claude-agent-sdk 0.3.272 → 0.3.273
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 +110 -110
- package/browser-sdk.d.ts +1 -1
- package/browser-sdk.js +46 -46
- package/manifest.json +22 -22
- package/manifest.zst.json +26 -26
- package/package.json +10 -10
- package/sdk-tools.d.ts +2 -0
- package/sdk.d.ts +81 -0
- package/sdk.mjs +77 -77
package/manifest.json
CHANGED
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.273",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "d48ecfd7a41c16c42e0564f7a94947d6e4c50db1",
|
|
5
|
+
"modsCommit": "f96c3b49c4c8721685206aaab23609b2d399df4e",
|
|
6
|
+
"buildDate": "2026-09-15T17:19:22Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "953e9880dbcb0b70f31c1f508de6a3fd389753d131688557fd992da9184693fb",
|
|
11
|
+
"size": 212228880
|
|
12
12
|
},
|
|
13
13
|
"darwin-x64": {
|
|
14
14
|
"binary": "claude",
|
|
15
|
-
"checksum": "
|
|
16
|
-
"size":
|
|
15
|
+
"checksum": "2030ecf911e301e778b3c5a49068d6751384c830e48ea14f11eb61dd23622cee",
|
|
16
|
+
"size": 221023456
|
|
17
17
|
},
|
|
18
18
|
"linux-arm64": {
|
|
19
19
|
"binary": "claude",
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "103cfab4d6ae898b6af692336fb662ffcc607075cc6408892bd350b3f549ebee",
|
|
21
|
+
"size": 228581616
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
24
|
"binary": "claude",
|
|
25
|
-
"checksum": "
|
|
26
|
-
"size":
|
|
25
|
+
"checksum": "6c752e2cc7c110c9df15f26d8d134d438c5ae95dbd610efc1a308bf7f9c5f6c1",
|
|
26
|
+
"size": 228663608
|
|
27
27
|
},
|
|
28
28
|
"linux-arm64-musl": {
|
|
29
29
|
"binary": "claude",
|
|
30
|
-
"checksum": "
|
|
31
|
-
"size":
|
|
30
|
+
"checksum": "0ea64e932c6fac35ce4e992140612157fe1cecab052d59539873b350a594d3c6",
|
|
31
|
+
"size": 221197984
|
|
32
32
|
},
|
|
33
33
|
"linux-x64-musl": {
|
|
34
34
|
"binary": "claude",
|
|
35
|
-
"checksum": "
|
|
36
|
-
"size":
|
|
35
|
+
"checksum": "19305145028dfb774ff16fd2066b8991cb93d1afbe4b8ff6389aec54f1b309f0",
|
|
36
|
+
"size": 222584792
|
|
37
37
|
},
|
|
38
38
|
"win32-x64": {
|
|
39
39
|
"binary": "claude.exe",
|
|
40
|
-
"checksum": "
|
|
41
|
-
"size":
|
|
40
|
+
"checksum": "19654006672b6da7c945115eea99ca10051796016df563a65b3f0c7d72720ef0",
|
|
41
|
+
"size": 231776416
|
|
42
42
|
},
|
|
43
43
|
"win32-arm64": {
|
|
44
44
|
"binary": "claude.exe",
|
|
45
|
-
"checksum": "
|
|
46
|
-
"size":
|
|
45
|
+
"checksum": "1257608d7a34515d98c23a6884fbe658195f2de430ae1679f047f4d8afda20d6",
|
|
46
|
+
"size": 223001248
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"sdkCompat": {
|
|
50
50
|
"testedWrapperVersions": [
|
|
51
|
-
"0.3.232",
|
|
52
51
|
"0.3.233",
|
|
53
52
|
"0.3.234",
|
|
54
53
|
"0.3.235",
|
|
@@ -77,7 +76,8 @@
|
|
|
77
76
|
"0.3.268",
|
|
78
77
|
"0.3.269",
|
|
79
78
|
"0.3.270",
|
|
80
|
-
"0.3.271"
|
|
79
|
+
"0.3.271",
|
|
80
|
+
"0.3.272"
|
|
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.273",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"modsCommit": "
|
|
6
|
-
"buildDate": "2026-09-
|
|
4
|
+
"commit": "d48ecfd7a41c16c42e0564f7a94947d6e4c50db1",
|
|
5
|
+
"modsCommit": "f96c3b49c4c8721685206aaab23609b2d399df4e",
|
|
6
|
+
"buildDate": "2026-09-15T17:20:34Z",
|
|
7
7
|
"platforms": {
|
|
8
8
|
"darwin-arm64": {
|
|
9
9
|
"binary": "claude.zst",
|
|
10
|
-
"checksum": "
|
|
11
|
-
"size":
|
|
10
|
+
"checksum": "128317be44690b575b3447f5dd9112a6e41e7f711053fa7267b95544032997aa",
|
|
11
|
+
"size": 69757000,
|
|
12
12
|
"bundle": {
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "22244d9986cb90304b84dfc5fbdecfe57479402f2ff4895c97477e30b07c6707",
|
|
14
|
+
"size": 69755593
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"darwin-x64": {
|
|
18
18
|
"binary": "claude.zst",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "e4dacf712b8bc3645ef7a7125e8ddcb0be054df720c7c30b6e644601216ee2a8",
|
|
20
|
+
"size": 73918437,
|
|
21
21
|
"bundle": {
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "b5666114faddd2e4d5a57d1c31a92bb4ce56a2da545f48a481ed7466cc106c79",
|
|
23
|
+
"size": 73920827
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64": {
|
|
27
27
|
"binary": "claude.zst",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "5e17b6500f0343ed4415cfc2084156936de88c7597338fa6ecb59c906ff1cba9",
|
|
29
|
+
"size": 78956031
|
|
30
30
|
},
|
|
31
31
|
"linux-x64": {
|
|
32
32
|
"binary": "claude.zst",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "27dd8ce401c3946776f4b7800b242ab05f6a28785e963fb7449dd4ff1872343c",
|
|
34
|
+
"size": 79576689
|
|
35
35
|
},
|
|
36
36
|
"linux-arm64-musl": {
|
|
37
37
|
"binary": "claude.zst",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "08a2e7faf6018919b20f829f13e22cd9a480f717fbb7ebccc85b812b1e58bc66",
|
|
39
|
+
"size": 77408806
|
|
40
40
|
},
|
|
41
41
|
"linux-x64-musl": {
|
|
42
42
|
"binary": "claude.zst",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "64de35cae23431fb683f1d269a3452fc69a2b586f30c43b8e206f8189f69c0e5",
|
|
44
|
+
"size": 78076423
|
|
45
45
|
},
|
|
46
46
|
"win32-x64": {
|
|
47
47
|
"binary": "claude.exe.zst",
|
|
48
|
-
"checksum": "
|
|
49
|
-
"size":
|
|
48
|
+
"checksum": "020f1380cea35120a345b083a3eb25be0c65568b11c8ca93f6cd68054c7d74c5",
|
|
49
|
+
"size": 81979440
|
|
50
50
|
},
|
|
51
51
|
"win32-arm64": {
|
|
52
52
|
"binary": "claude.exe.zst",
|
|
53
|
-
"checksum": "
|
|
54
|
-
"size":
|
|
53
|
+
"checksum": "dcbd9048a5efaf6d492b010d45d11896c241be533c68738d27cde070c2632102",
|
|
54
|
+
"size": 78728441
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"sdkCompat": {
|
|
58
58
|
"testedWrapperVersions": [
|
|
59
|
-
"0.3.232",
|
|
60
59
|
"0.3.233",
|
|
61
60
|
"0.3.234",
|
|
62
61
|
"0.3.235",
|
|
@@ -85,7 +84,8 @@
|
|
|
85
84
|
"0.3.268",
|
|
86
85
|
"0.3.269",
|
|
87
86
|
"0.3.270",
|
|
88
|
-
"0.3.271"
|
|
87
|
+
"0.3.271",
|
|
88
|
+
"0.3.272"
|
|
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.273",
|
|
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.273",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.273",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.273",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.273",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.273",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.273",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.273",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.273"
|
|
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.273"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -583,6 +583,7 @@ export type ArtifactOutput =
|
|
|
583
583
|
};
|
|
584
584
|
next?: string;
|
|
585
585
|
cowritten?: true;
|
|
586
|
+
outside_writer?: true;
|
|
586
587
|
};
|
|
587
588
|
}
|
|
588
589
|
| {
|
|
@@ -593,6 +594,7 @@ export type ArtifactOutput =
|
|
|
593
594
|
content_type: string;
|
|
594
595
|
sha256: string;
|
|
595
596
|
cowritten?: true;
|
|
597
|
+
outside_writer?: true;
|
|
596
598
|
foreign?: true;
|
|
597
599
|
};
|
|
598
600
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -475,6 +475,7 @@ declare namespace coreTypes {
|
|
|
475
475
|
SDKThinkingTokensMessage,
|
|
476
476
|
SDKToolProgressMessage,
|
|
477
477
|
SDKToolUseSummaryMessage,
|
|
478
|
+
SDKUsageReport,
|
|
478
479
|
SDKUserMessageReplay,
|
|
479
480
|
SDKUserMessage,
|
|
480
481
|
SDKWorkerShuttingDownMessage,
|
|
@@ -3396,6 +3397,10 @@ export declare type SDKAssistantMessage = {
|
|
|
3396
3397
|
* Structured twin of the /context report, carried on the synthetic assistant message that delivers the markdown table. Present only on /context results from CLIs new enough to attach it; the markdown in message.content remains the canonical fallback. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model.
|
|
3397
3398
|
*/
|
|
3398
3399
|
context_usage?: SDKContextUsage;
|
|
3400
|
+
/**
|
|
3401
|
+
* Structured twin of the /usage report, carried on the synthetic assistant message that delivers its text: the session totals, the plan's usage rows and extra-usage spend, for remote clients that render a card from data. Present only on /usage results from CLIs new enough to attach it and from claude.ai-subscriber sessions; the text in message.content remains the canonical fallback. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model.
|
|
3402
|
+
*/
|
|
3403
|
+
usage_report?: SDKUsageReport;
|
|
3399
3404
|
|
|
3400
3405
|
|
|
3401
3406
|
|
|
@@ -5559,6 +5564,10 @@ export declare type SDKTaskNotificationMessage = {
|
|
|
5559
5564
|
task_id: string;
|
|
5560
5565
|
tool_use_id?: string;
|
|
5561
5566
|
status: 'completed' | 'failed' | 'stopped';
|
|
5567
|
+
/**
|
|
5568
|
+
* Machine-readable cause, set only when the task did not end through an ordinary completion, failure, or stop. 'worker_restart': the worker process restarted and the resumed process found the task orphaned (always with status 'stopped').
|
|
5569
|
+
*/
|
|
5570
|
+
reason?: 'worker_restart';
|
|
5562
5571
|
output_file: string;
|
|
5563
5572
|
summary: string;
|
|
5564
5573
|
usage?: {
|
|
@@ -5705,6 +5714,78 @@ export declare type SDKToolUseSummaryMessage = {
|
|
|
5705
5714
|
|
|
5706
5715
|
};
|
|
5707
5716
|
|
|
5717
|
+
/**
|
|
5718
|
+
* Structured twin of a /usage result, carried beside its text: the session's totals, the plan's usage rows as the server sent them and the extra-usage spend, and nothing else from the usage body (the get_usage control reply carries the rest). Experimental — the shape may change.
|
|
5719
|
+
*/
|
|
5720
|
+
export declare type SDKUsageReport = {
|
|
5721
|
+
/**
|
|
5722
|
+
* Cost and usage accumulated by the current session.
|
|
5723
|
+
*/
|
|
5724
|
+
session: {
|
|
5725
|
+
total_cost_usd: number;
|
|
5726
|
+
total_api_duration_ms: number;
|
|
5727
|
+
total_duration_ms: number;
|
|
5728
|
+
total_lines_added: number;
|
|
5729
|
+
total_lines_removed: number;
|
|
5730
|
+
model_usage: Record<string, ModelUsage>;
|
|
5731
|
+
};
|
|
5732
|
+
/**
|
|
5733
|
+
* The plan's usage rows and extra-usage spend from the claude.ai usage endpoint; null when the CLI could not fetch them (no plan on this lane, or a token without the profile scope).
|
|
5734
|
+
*/
|
|
5735
|
+
rate_limits: {
|
|
5736
|
+
/**
|
|
5737
|
+
* 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). When the usage fetch failed and the CLI fell back to rate-limit response headers, this holds at most the one row it synthesizes from them (the overage-included weekly window, shaped like the server's), or null when the headers carried none.
|
|
5738
|
+
*/
|
|
5739
|
+
limits: {
|
|
5740
|
+
/**
|
|
5741
|
+
* The server's meter kind, e.g. 'session', 'weekly_all' or 'weekly_scoped'. Classify a row on this, never on a label.
|
|
5742
|
+
*/
|
|
5743
|
+
kind: string;
|
|
5744
|
+
/**
|
|
5745
|
+
* The server's row group, e.g. 'session' or 'weekly'; rows render grouped under it, in the server's order.
|
|
5746
|
+
*/
|
|
5747
|
+
group: string;
|
|
5748
|
+
/**
|
|
5749
|
+
* Share of the window used, 0-100.
|
|
5750
|
+
*/
|
|
5751
|
+
percent: number;
|
|
5752
|
+
/**
|
|
5753
|
+
* ISO 8601 timestamp when the window resets.
|
|
5754
|
+
*/
|
|
5755
|
+
resets_at: string | null;
|
|
5756
|
+
/**
|
|
5757
|
+
* What a scoped row is for, a model or a surface, with the server's display label.
|
|
5758
|
+
*/
|
|
5759
|
+
scope?: {
|
|
5760
|
+
model?: {
|
|
5761
|
+
display_name: string;
|
|
5762
|
+
} | null;
|
|
5763
|
+
surface?: {
|
|
5764
|
+
display_name: string;
|
|
5765
|
+
} | null;
|
|
5766
|
+
} | null;
|
|
5767
|
+
/**
|
|
5768
|
+
* The server's reading of the row for a meter's colour, e.g. 'normal', 'warning' or 'critical'; a client falls back to its own thresholds without it.
|
|
5769
|
+
*/
|
|
5770
|
+
severity?: string | null;
|
|
5771
|
+
/**
|
|
5772
|
+
* The server's headline pick: the row a single-value indicator shows.
|
|
5773
|
+
*/
|
|
5774
|
+
is_active?: boolean | null;
|
|
5775
|
+
}[] | null;
|
|
5776
|
+
/**
|
|
5777
|
+
* 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.
|
|
5778
|
+
*/
|
|
5779
|
+
extra_usage?: {
|
|
5780
|
+
is_enabled: boolean;
|
|
5781
|
+
monthly_limit: number | null;
|
|
5782
|
+
used_credits: number | null;
|
|
5783
|
+
utilization: number | null;
|
|
5784
|
+
currency?: string | null;
|
|
5785
|
+
} | null;
|
|
5786
|
+
} | null;
|
|
5787
|
+
};
|
|
5788
|
+
|
|
5708
5789
|
/**
|
|
5709
5790
|
* A user-role message. A client writes one to the CLI to submit a prompt (this starts a turn); the CLI emits them for user-role content it adds to the conversation itself, chiefly the tool_result blocks answering the assistant's tool_use blocks.
|
|
5710
5791
|
*/
|