@anthropic-ai/claude-agent-sdk 0.3.191 → 0.3.195
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 +69 -69
- package/browser-sdk.d.ts +5 -0
- package/browser-sdk.js +35 -35
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +9 -2
- package/sdk.d.ts +48 -4
- package/sdk.mjs +45 -45
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-06-
|
|
2
|
+
"version": "2.1.195",
|
|
3
|
+
"commit": "4603aa3f2ea164bd0974f82eb413ae7acc99a7ee",
|
|
4
|
+
"buildDate": "2026-06-26T01:56:37Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "8b45adad93f336ab95f33e714494b19fd3377a494eb05c122c8677bc895876ad",
|
|
9
|
+
"size": 224682640
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "7eb8716e6d6e6a278d13158793529336290837fca457facfec656f1b1a287c60",
|
|
14
|
+
"size": 234066032
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "b02279999058dc80a0e1c5d39463d1545a178615492f84139aac8d61214a7e9a",
|
|
19
|
+
"size": 241154800
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "8323e70125063147a4478b957745d835a87e5e72ffd25b838ea9a841c03e6a37",
|
|
24
|
+
"size": 244276024
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "52713b5f7690764b3b4742807b1a6fab24ce5e01dabf82964b97f519e8f9e7fe",
|
|
29
|
+
"size": 234403000
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "63a2b3291369ff85e970c0cfd3767bb48065071ec12fb2d0055387ccde511541",
|
|
34
|
+
"size": 238977408
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "3ef7fb7b16e169739640fe2903ee7011cff8b43d2dbb15f9badc9b11cfad18a3",
|
|
39
|
+
"size": 234930336
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "038fb49213c0ac828b5a8a1f31cf510753d7e7891e9ae4596673a602cff251f5",
|
|
44
|
+
"size": 229410464
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-06-
|
|
2
|
+
"version": "2.1.195",
|
|
3
|
+
"commit": "4603aa3f2ea164bd0974f82eb413ae7acc99a7ee",
|
|
4
|
+
"buildDate": "2026-06-26T01:58:22Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "edd737e0b727d846b333abea409fe41b288d93a61b57c9436ba5936a95777524",
|
|
9
|
+
"size": 46324238,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "dadeba60923e54e98dc5a1a391be77839fb7f23bf1e66d69988daa951caf5e57",
|
|
12
|
+
"size": 46316695
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "d2b1b1ca02bf3f15d90e63c645c12e854cd9b860bc134278b9f5be2ccdc9ad51",
|
|
18
|
+
"size": 50621837,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "42b85b75f832b0e1ab2c2e27e7f7bdc3f7d754f26a9b09aee1ab8a3ca641ead8",
|
|
21
|
+
"size": 50626429
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "92790e9ac5e82011b13603fdc6cbd169f4404a7294dba096bfd53d4d148418ea",
|
|
27
|
+
"size": 55414570
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "502eb0186d3f2af31fc1eff3a89d440ce682cb941a09ab9f95828635e2e6cdcf",
|
|
32
|
+
"size": 56663286
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "6d318ddec8dc6bbab324ae0b70231160721f608c837a92a449c24359db87971a",
|
|
37
|
+
"size": 54087314
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "9ea3130f98bcdfa9651ce487c415787928e5392568b391628be2da4aa62f0ba2",
|
|
42
|
+
"size": 55471929
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "b1d4cfecfb3c5c617cf0c4f52406cee1f7f5c7c39ad73009c92e351066ca52f1",
|
|
47
|
+
"size": 56797947
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "7ada1c6de7e4111a7bc128389f96f013af57997f39efb46d35759ed5ce2e5ab6",
|
|
52
|
+
"size": 54835024
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
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.195",
|
|
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.195",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.195",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.195",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.195",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.195",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.195",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.195",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.195"
|
|
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.195"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -2508,7 +2508,14 @@ export interface MonitorInput {
|
|
|
2508
2508
|
/**
|
|
2509
2509
|
* Shell command or script. Each stdout line is an event; exit ends the watch.
|
|
2510
2510
|
*/
|
|
2511
|
-
command
|
|
2511
|
+
command?: string;
|
|
2512
|
+
/**
|
|
2513
|
+
* WebSocket to open. Each text frame is an event; binary frames are reported as a placeholder line. Socket close ends the watch. Cannot be combined with command.
|
|
2514
|
+
*/
|
|
2515
|
+
ws?: {
|
|
2516
|
+
url: string;
|
|
2517
|
+
protocols?: string[];
|
|
2518
|
+
};
|
|
2512
2519
|
}
|
|
2513
2520
|
export interface ArtifactInput {
|
|
2514
2521
|
/**
|
|
@@ -2520,7 +2527,7 @@ export interface ArtifactInput {
|
|
|
2520
2527
|
*/
|
|
2521
2528
|
favicon: string;
|
|
2522
2529
|
/**
|
|
2523
|
-
* Short human-readable name for this version (e.g. "fixed-background"). Shown in the version picker
|
|
2530
|
+
* Short human-readable name for this version, max 60 chars (e.g. "fixed-background"). Shown in the version picker. Not a description — keep it to a few words.
|
|
2524
2531
|
*/
|
|
2525
2532
|
label?: string;
|
|
2526
2533
|
/**
|
package/sdk.d.ts
CHANGED
|
@@ -366,6 +366,7 @@ declare namespace coreTypes {
|
|
|
366
366
|
SDKMessage,
|
|
367
367
|
SDKMirrorErrorMessage,
|
|
368
368
|
SDKModelRefusalFallbackMessage,
|
|
369
|
+
SDKModelRefusalNoFallbackMessage,
|
|
369
370
|
SDKNotificationMessage,
|
|
370
371
|
SDKPartialAssistantMessage,
|
|
371
372
|
SDKPermissionDenial,
|
|
@@ -2286,6 +2287,23 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2286
2287
|
* @returns The complete initialization response
|
|
2287
2288
|
*/
|
|
2288
2289
|
initializationResult(): Promise<SDKControlInitializeResponse>;
|
|
2290
|
+
/**
|
|
2291
|
+
* Re-send the `initialize` control request to an already-running CLI.
|
|
2292
|
+
*
|
|
2293
|
+
* Use this after a transport gap (e.g. reattaching to a daemon whose
|
|
2294
|
+
* ring buffer evicted frames during a disconnect): the CLI's response
|
|
2295
|
+
* carries any `can_use_tool` / `request_user_dialog` control requests
|
|
2296
|
+
* the loop is still blocked on, and the SDK redelivers them to
|
|
2297
|
+
* `canUseTool` / `onUserDialog`. In-flight request_ids are deduped
|
|
2298
|
+
* SDK-side, but callbacks should be idempotent per request_id since a
|
|
2299
|
+
* request whose response was lost in the gap will be dispatched again.
|
|
2300
|
+
*
|
|
2301
|
+
* Unlike {@link Query.initializationResult}, this always sends a fresh request
|
|
2302
|
+
* rather than returning the cached first-connect result.
|
|
2303
|
+
*
|
|
2304
|
+
* @returns A fresh initialization response
|
|
2305
|
+
*/
|
|
2306
|
+
reinitialize(): Promise<SDKControlInitializeResponse>;
|
|
2289
2307
|
/**
|
|
2290
2308
|
* Get the list of available skills for the current session.
|
|
2291
2309
|
*
|
|
@@ -3696,7 +3714,7 @@ export declare type SDKMemoryRecallMessage = {
|
|
|
3696
3714
|
session_id: string;
|
|
3697
3715
|
};
|
|
3698
3716
|
|
|
3699
|
-
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKModelRefusalFallbackMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKWorkerShuttingDownMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage | SDKInformationalMessage;
|
|
3717
|
+
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKModelRefusalFallbackMessage | SDKModelRefusalNoFallbackMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKWorkerShuttingDownMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage | SDKInformationalMessage;
|
|
3700
3718
|
|
|
3701
3719
|
/**
|
|
3702
3720
|
* Provenance of a user-role message (peer session, team lead, channel). Absent or `human` means keyboard input from the user.
|
|
@@ -3762,6 +3780,26 @@ export declare type SDKModelRefusalFallbackMessage = {
|
|
|
3762
3780
|
* Wire uuids of the messages this fallback retracted — the refused partial as the consumer received it (one uuid per normalized SDK message; multi-block messages carry per-block derived uuids) plus any tombstoned tool_results. Emitted AFTER the retraction, so this is a resolution-time eviction signal: remove these messages from transcript state on receipt. Eviction is idempotent — unknown or already-removed uuids are a no-op. Absent when emitted by an older CLI.
|
|
3763
3781
|
*/
|
|
3764
3782
|
retracted_message_uuids?: string[];
|
|
3783
|
+
/**
|
|
3784
|
+
* UUID of the user message the refused request was for — the rewind target and composer prefill for edit-and-retry. This is the message's own uuid as delivered on the replay ack (not a per-block normalized uuid). null when the refused turn was not human-authored (e.g. a background task notification or auto-continuation — nothing to edit-and-retry) or otherwise cannot be identified; absent from older CLIs.
|
|
3785
|
+
*/
|
|
3786
|
+
refused_user_message_uuid?: string | null;
|
|
3787
|
+
content: string;
|
|
3788
|
+
uuid: UUID;
|
|
3789
|
+
session_id: string;
|
|
3790
|
+
};
|
|
3791
|
+
|
|
3792
|
+
/**
|
|
3793
|
+
* Emitted when the model ends the stream with stop_reason "refusal" and no fallback model is configured, so the turn ends as an error. The structured counterpart to detecting stop_reason "refusal" on the assistant error frame. Not emitted when a fallback existed but was declined or gate-failed (model_refusal_fallback covers the retry case). Absent from older CLIs.
|
|
3794
|
+
*/
|
|
3795
|
+
export declare type SDKModelRefusalNoFallbackMessage = {
|
|
3796
|
+
type: 'system';
|
|
3797
|
+
subtype: 'model_refusal_no_fallback';
|
|
3798
|
+
original_model: string;
|
|
3799
|
+
request_id: string | null;
|
|
3800
|
+
api_refusal_category?: string | null;
|
|
3801
|
+
api_refusal_explanation?: string | null;
|
|
3802
|
+
refused_user_message_uuid?: string | null;
|
|
3765
3803
|
content: string;
|
|
3766
3804
|
uuid: UUID;
|
|
3767
3805
|
session_id: string;
|
|
@@ -5172,7 +5210,7 @@ export declare interface Settings {
|
|
|
5172
5210
|
} | {
|
|
5173
5211
|
source: 'hostPattern';
|
|
5174
5212
|
/**
|
|
5175
|
-
* Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against
|
|
5213
|
+
* Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against github.com. For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\.mycompany\.com$").
|
|
5176
5214
|
*/
|
|
5177
5215
|
hostPattern: string;
|
|
5178
5216
|
} | {
|
|
@@ -5372,7 +5410,7 @@ export declare interface Settings {
|
|
|
5372
5410
|
} | {
|
|
5373
5411
|
source: 'hostPattern';
|
|
5374
5412
|
/**
|
|
5375
|
-
* Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against
|
|
5413
|
+
* Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against github.com. For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\.mycompany\.com$").
|
|
5376
5414
|
*/
|
|
5377
5415
|
hostPattern: string;
|
|
5378
5416
|
} | {
|
|
@@ -5562,7 +5600,7 @@ export declare interface Settings {
|
|
|
5562
5600
|
} | {
|
|
5563
5601
|
source: 'hostPattern';
|
|
5564
5602
|
/**
|
|
5565
|
-
* Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against
|
|
5603
|
+
* Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against github.com. For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\.mycompany\.com$").
|
|
5566
5604
|
*/
|
|
5567
5605
|
hostPattern: string;
|
|
5568
5606
|
} | {
|
|
@@ -5670,6 +5708,10 @@ export declare interface Settings {
|
|
|
5670
5708
|
url?: string;
|
|
5671
5709
|
};
|
|
5672
5710
|
})[];
|
|
5711
|
+
/**
|
|
5712
|
+
* When true (and set in managed settings), rejects the --plugin-dir, --plugin-url, --agents, and non-sdk --mcp-config CLI flags at startup. Closes the CLI-flag bypass of strictKnownMarketplaces. Pair with allowedMcpServers for per-server MCP control; this setting does not gate other MCP entry points (SDK setMcpServers, claude mcp add, .mcp.json). Also blocks surfaces that spawn the CLI with these flags internally (see settings documentation). Only honored from managed settings; ignored in user/project/local settings.
|
|
5713
|
+
*/
|
|
5714
|
+
disableSideloadFlags?: boolean;
|
|
5673
5715
|
/**
|
|
5674
5716
|
* Marketplace names whose plugins may surface as contextual install suggestions (relevance-based tips). No marketplace-declared suggestions surface without this allowlist; the built-in first-party frontend-design tip is unaffected. Only honored when set in managed settings (policy scope); the key is ignored in user, project, and local settings. A name only takes effect when the marketplace is registered on the machine AND its registered source is also declared in managed settings, either as the extraKnownMarketplaces entry for that name or as an entry of strictKnownMarketplaces. A marketplace registered from a different source under an allowlisted name is ignored. The official marketplace is exempt from the source requirement: allowlisting its name alone suffices, since that name can only register from the official Anthropic source.
|
|
5675
5717
|
*/
|
|
@@ -5929,6 +5971,8 @@ export declare interface Settings {
|
|
|
5929
5971
|
options?: {
|
|
5930
5972
|
[k: string]: string | number | boolean | string[];
|
|
5931
5973
|
};
|
|
5974
|
+
} | {
|
|
5975
|
+
[k: string]: unknown;
|
|
5932
5976
|
};
|
|
5933
5977
|
};
|
|
5934
5978
|
/**
|