@anthropic-ai/claude-agent-sdk 0.3.169 → 0.3.172
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/assistant.mjs +73 -73
- package/bridge.mjs +60 -60
- package/browser-sdk.js +30 -30
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +38 -1
- package/sdk.d.ts +75 -9
- package/sdk.mjs +39 -39
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-06-
|
|
2
|
+
"version": "2.1.172",
|
|
3
|
+
"commit": "1b719ca2781a2dccc4a769b66bc35b4a60509ad7",
|
|
4
|
+
"buildDate": "2026-06-10T16:38:17Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "3c31f345575bf6f261c7e19981f6491bb93eeb0ffb499e95033610a7184831ce",
|
|
9
|
+
"size": 223390752
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "c507f98750c5230e4247f7eadff38e4db04c006904f85379e31c5d5e82e1c384",
|
|
14
|
+
"size": 225892528
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "4ef0d735bd4180c3bffc381f6dc38df979229a8637d294be751c6043d93d12e1",
|
|
19
|
+
"size": 248624776
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "c0915dd1691d569aeebc7978b12e029718323685ec0dd4b5c6a453108d6be1f7",
|
|
24
|
+
"size": 248743632
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "6b10aad4270348175206bd2475f82ef3c56007dfb55d7b90f1950dfa8fb9eb40",
|
|
29
|
+
"size": 241479512
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "58f2c60711f95e51d86d1af5b915cbdd0458710f1830b7c26d59b78f1ad1f861",
|
|
34
|
+
"size": 243153968
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "07132ca4bbef551c92c1ae6ca0220a5e523092c9fa9cf402f65f428450687455",
|
|
39
|
+
"size": 244181152
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "1e3e165c03de2af83c1e3516b73890b56e9785a2382338adcc28f41918bf4d2f",
|
|
44
|
+
"size": 240146080
|
|
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.172",
|
|
3
|
+
"commit": "1b719ca2781a2dccc4a769b66bc35b4a60509ad7",
|
|
4
|
+
"buildDate": "2026-06-10T16:40:02Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "759bbc3536d1a718cac24dfdd08a368bc63b64f64d199e64b354d101a4542050",
|
|
9
|
+
"size": 45892652,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "8ed897263049f1dc5d7eff8b70bd2a08cdd459a07e11702a9a51fa68e4b44130",
|
|
12
|
+
"size": 45888336
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "f8207869e2d8969e4df23d59a0ba619c9b782ba647622e5567ddd9daf3c68996",
|
|
18
|
+
"size": 47796942,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "f63edc2de24311b5baad57225f354a62622b611e3ccb009c9a4928ab1973be4b",
|
|
21
|
+
"size": 47794444
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "bfb5b7972cd5b6e8409e3f1dd259f2bb56ccbd3faa78420c030d9c1bd2c589b2",
|
|
27
|
+
"size": 53537540
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "cccc4486cb1c536918c1f54ff8509524633380f741253b00e29ce0db67fc1003",
|
|
32
|
+
"size": 54221669
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "e3e80acadc3d75733ebfdd196e3fa8d6d189ec938a28b6cb361a99a1b49beec5",
|
|
37
|
+
"size": 52160799
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "f88dba6370ab59cf918806dfae856e52c53595fca27072b78ee2a5757219dae3",
|
|
42
|
+
"size": 52864871
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "94297aa5ba27fcc918e5401b6894b9690a6671c35224f8eafb6915de4271d7ec",
|
|
47
|
+
"size": 54883060
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "e10be49737ca3feab22bd88ecfb017f32eb06978e8237daebbce8f84f79a2eb3",
|
|
52
|
+
"size": 53155326
|
|
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.172",
|
|
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.172",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.172",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.172",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.172",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.172",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.172",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.172",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.172"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"sdk.mjs",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"manifest.json",
|
|
87
87
|
"manifest.zst.json"
|
|
88
88
|
],
|
|
89
|
-
"claudeCodeVersion": "2.1.
|
|
89
|
+
"claudeCodeVersion": "2.1.172"
|
|
90
90
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -39,7 +39,9 @@ export type ToolInputSchemas =
|
|
|
39
39
|
| CronListInput
|
|
40
40
|
| ScheduleWakeupInput
|
|
41
41
|
| RemoteTriggerInput
|
|
42
|
+
| ShowOnboardingRolePickerInput
|
|
42
43
|
| MonitorInput
|
|
44
|
+
| ArtifactInput
|
|
43
45
|
| PushNotificationInput
|
|
44
46
|
| EnterWorktreeInput
|
|
45
47
|
| ExitWorktreeInput
|
|
@@ -68,7 +70,9 @@ export type ToolOutputSchemas =
|
|
|
68
70
|
| TaskGetOutput
|
|
69
71
|
| TaskUpdateOutput
|
|
70
72
|
| TaskListOutput
|
|
73
|
+
| ArtifactOutput
|
|
71
74
|
| RemoteTriggerOutput
|
|
75
|
+
| ShowOnboardingRolePickerOutput
|
|
72
76
|
| ScheduleWakeupOutput
|
|
73
77
|
| MonitorOutput
|
|
74
78
|
| EnterPlanModeOutput
|
|
@@ -318,7 +322,7 @@ export interface AgentInput {
|
|
|
318
322
|
/**
|
|
319
323
|
* Optional model override for this agent. Takes precedence over the agent definition's model frontmatter. If omitted, uses the agent definition's model, or inherits from the parent.
|
|
320
324
|
*/
|
|
321
|
-
model?: "sonnet" | "opus" | "haiku";
|
|
325
|
+
model?: "sonnet" | "opus" | "haiku" | "fable";
|
|
322
326
|
/**
|
|
323
327
|
* Set to true to run this agent in the background. You will be notified when it completes.
|
|
324
328
|
*/
|
|
@@ -2348,6 +2352,7 @@ export interface RemoteTriggerInput {
|
|
|
2348
2352
|
[k: string]: unknown;
|
|
2349
2353
|
};
|
|
2350
2354
|
}
|
|
2355
|
+
export interface ShowOnboardingRolePickerInput {}
|
|
2351
2356
|
export interface MonitorInput {
|
|
2352
2357
|
/**
|
|
2353
2358
|
* Short human-readable description of what you are monitoring (shown in notifications).
|
|
@@ -2366,6 +2371,24 @@ export interface MonitorInput {
|
|
|
2366
2371
|
*/
|
|
2367
2372
|
command: string;
|
|
2368
2373
|
}
|
|
2374
|
+
export interface ArtifactInput {
|
|
2375
|
+
/**
|
|
2376
|
+
* Path to an .html or .md file to render. Use a short, distinctive basename — it is the fallback title if the HTML has no <title>.
|
|
2377
|
+
*/
|
|
2378
|
+
file_path: string;
|
|
2379
|
+
/**
|
|
2380
|
+
* Browser-tab icon: one or two emoji (e.g. "📊"). No markup. Keep stable across redeploys; change only on a hard topic pivot.
|
|
2381
|
+
*/
|
|
2382
|
+
favicon: string;
|
|
2383
|
+
/**
|
|
2384
|
+
* Short human-readable name for this version (e.g. "fixed-background"). Shown in the version picker instead of the raw version id.
|
|
2385
|
+
*/
|
|
2386
|
+
label?: string;
|
|
2387
|
+
/**
|
|
2388
|
+
* Existing artifact URL to redeploy to. Pass when the user gives you a URL for an artifact not published in this session; omit for new artifacts or same-session redeploys. Must be an artifact the user owns.
|
|
2389
|
+
*/
|
|
2390
|
+
url?: string;
|
|
2391
|
+
}
|
|
2369
2392
|
export interface PushNotificationInput {
|
|
2370
2393
|
/**
|
|
2371
2394
|
* The notification body. Keep it under 200 characters; mobile OSes truncate.
|
|
@@ -2711,6 +2734,10 @@ export interface ReadMcpResourceOutput {
|
|
|
2711
2734
|
*/
|
|
2712
2735
|
blobSavedTo?: string;
|
|
2713
2736
|
}[];
|
|
2737
|
+
/**
|
|
2738
|
+
* Human-readable error when the server could not read the resource
|
|
2739
|
+
*/
|
|
2740
|
+
error?: string;
|
|
2714
2741
|
}
|
|
2715
2742
|
export interface TodoWriteOutput {
|
|
2716
2743
|
/**
|
|
@@ -3028,11 +3055,21 @@ export interface TaskListOutput {
|
|
|
3028
3055
|
blockedBy: string[];
|
|
3029
3056
|
}[];
|
|
3030
3057
|
}
|
|
3058
|
+
export interface ArtifactOutput {
|
|
3059
|
+
url: string;
|
|
3060
|
+
path: string;
|
|
3061
|
+
title?: string;
|
|
3062
|
+
mcpDropped?: string;
|
|
3063
|
+
}
|
|
3031
3064
|
export interface RemoteTriggerOutput {
|
|
3032
3065
|
status: number;
|
|
3033
3066
|
json: string;
|
|
3034
3067
|
summary?: string;
|
|
3035
3068
|
}
|
|
3069
|
+
export interface ShowOnboardingRolePickerOutput {
|
|
3070
|
+
role?: string;
|
|
3071
|
+
dismissed?: boolean;
|
|
3072
|
+
}
|
|
3036
3073
|
export interface ScheduleWakeupOutput {
|
|
3037
3074
|
/**
|
|
3038
3075
|
* Epoch ms timestamp when the next wakeup will fire
|
package/sdk.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare type AgentDefinition = {
|
|
|
53
53
|
*/
|
|
54
54
|
prompt: string;
|
|
55
55
|
/**
|
|
56
|
-
* Model alias (e.g. '
|
|
56
|
+
* Model alias (e.g. 'fable', 'opus', 'sonnet', 'haiku') or full model ID (e.g. 'claude-fable-5'). If omitted or 'inherit', uses the main model
|
|
57
57
|
*/
|
|
58
58
|
model?: string;
|
|
59
59
|
mcpServers?: AgentMcpServerSpec[];
|
|
@@ -413,6 +413,7 @@ declare namespace coreTypes {
|
|
|
413
413
|
SDKMessageOrigin,
|
|
414
414
|
SDKMessage,
|
|
415
415
|
SDKMirrorErrorMessage,
|
|
416
|
+
SDKModelRefusalFallbackMessage,
|
|
416
417
|
SDKNotificationMessage,
|
|
417
418
|
SDKPartialAssistantMessage,
|
|
418
419
|
SDKPermissionDenial,
|
|
@@ -537,7 +538,7 @@ export declare function deleteSession(_sessionId: string, _options?: SessionMuta
|
|
|
537
538
|
* - `'low'` — Minimal thinking, fastest responses
|
|
538
539
|
* - `'medium'` — Moderate thinking
|
|
539
540
|
* - `'high'` — Deep reasoning (default)
|
|
540
|
-
* - `'xhigh'` — Deeper than high (Opus 4.7+; falls back to `'high'` elsewhere)
|
|
541
|
+
* - `'xhigh'` — Deeper than high (Fable 5, Opus 4.7+; falls back to `'high'` elsewhere)
|
|
541
542
|
* - `'max'` — Maximum effort (select models only)
|
|
542
543
|
*/
|
|
543
544
|
export declare type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
@@ -1518,7 +1519,28 @@ export declare type Options = {
|
|
|
1518
1519
|
* park deadline.
|
|
1519
1520
|
*/
|
|
1520
1521
|
onUserDialog?: OnUserDialog;
|
|
1521
|
-
|
|
1522
|
+
/**
|
|
1523
|
+
* Dialog kinds this consumer's `onUserDialog` can actually render
|
|
1524
|
+
* (`request_user_dialog` `dialog_kind` values, e.g.
|
|
1525
|
+
* 'refusal_fallback_prompt'). Declare only kinds your UI genuinely
|
|
1526
|
+
* displays and answers. Providing `onUserDialog` alone does NOT opt the
|
|
1527
|
+
* consumer into receiving dialogs — the CLI only emits a dialog kind
|
|
1528
|
+
* declared here.
|
|
1529
|
+
*
|
|
1530
|
+
* The CLI fails closed on absence: a dialog kind not declared here is
|
|
1531
|
+
* never emitted to this session — the flow behind it degrades to its
|
|
1532
|
+
* no-dialog behavior instead (for 'refusal_fallback_prompt', the classic
|
|
1533
|
+
* refusal error message ends the turn). Omitting the option entirely
|
|
1534
|
+
* means no dialogs are emitted, even with `onUserDialog` wired.
|
|
1535
|
+
*
|
|
1536
|
+
* Requires `onUserDialog`; passing a non-empty list without the callback
|
|
1537
|
+
* throws at option intake. On multi-client (remote) sessions the first
|
|
1538
|
+
* attached client's declaration wins for the worker's lifetime, and the
|
|
1539
|
+
* winning declaration is persisted to worker metadata so it survives
|
|
1540
|
+
* worker restarts (restored as a default that the next epoch's first
|
|
1541
|
+
* explicit declaration overrides).
|
|
1542
|
+
*/
|
|
1543
|
+
supportedDialogKinds?: string[];
|
|
1522
1544
|
/**
|
|
1523
1545
|
* When false, disables session persistence to disk. Sessions will not be
|
|
1524
1546
|
* saved to ~/.claude/projects/ and cannot be resumed later. Useful for
|
|
@@ -1599,8 +1621,8 @@ export declare type Options = {
|
|
|
1599
1621
|
* - `'low'` — Minimal thinking, fastest responses
|
|
1600
1622
|
* - `'medium'` — Moderate thinking
|
|
1601
1623
|
* - `'high'` — Deep reasoning (default)
|
|
1602
|
-
* - `'xhigh'` — Deeper than high (Opus 4.7+)
|
|
1603
|
-
* - `'max'` — Maximum effort (Opus 4.6+, Sonnet 4.6)
|
|
1624
|
+
* - `'xhigh'` — Deeper than high (Fable 5, Opus 4.7+)
|
|
1625
|
+
* - `'max'` — Maximum effort (Fable 5, Opus 4.6+, Sonnet 4.6)
|
|
1604
1626
|
*
|
|
1605
1627
|
* @see https://docs.anthropic.com/en/docs/build-with-claude/effort
|
|
1606
1628
|
*/
|
|
@@ -1651,7 +1673,7 @@ export declare type Options = {
|
|
|
1651
1673
|
mcpServers?: Record<string, McpServerConfig>;
|
|
1652
1674
|
/**
|
|
1653
1675
|
* Claude model to use. Defaults to the CLI default model.
|
|
1654
|
-
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-8'
|
|
1676
|
+
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-8', 'claude-fable-5'
|
|
1655
1677
|
*/
|
|
1656
1678
|
model?: string;
|
|
1657
1679
|
/**
|
|
@@ -2675,7 +2697,10 @@ export declare type SDKAssistantMessage = {
|
|
|
2675
2697
|
uuid: UUID;
|
|
2676
2698
|
session_id: string;
|
|
2677
2699
|
request_id?: string;
|
|
2678
|
-
|
|
2700
|
+
/**
|
|
2701
|
+
* Wire uuids of previously-delivered messages that this message replaces (refusal-fallback supersede). The list can include tombstoned tool_result frames from the refused leg, not only assistant frames. Evict the named messages on arrival and treat this frame as their canonical replacement. Idempotent with the end-of-turn model_refusal_fallback notice, whose retracted_message_uuids remains the complete audit record for the turn.
|
|
2702
|
+
*/
|
|
2703
|
+
supersedes?: UUID[];
|
|
2679
2704
|
/**
|
|
2680
2705
|
* Subagent type that produced this message.
|
|
2681
2706
|
*/
|
|
@@ -3193,7 +3218,10 @@ declare type SDKControlInitializeRequest = {
|
|
|
3193
3218
|
promptSuggestions?: boolean;
|
|
3194
3219
|
agentProgressSummaries?: boolean;
|
|
3195
3220
|
forwardSubagentText?: boolean;
|
|
3196
|
-
|
|
3221
|
+
/**
|
|
3222
|
+
* Dialog kinds (request_user_dialog `dialog_kind` values) this consumer's onUserDialog can actually render. The CLI treats ABSENCE as 'cannot display' and fails closed: without the kind declared here, a dialog-gated flow degrades to its no-dialog behavior (for 'refusal_fallback_prompt', the classic refusal error) instead of parking a dialog the consumer may mishandle. First-attached-client-wins on multi-client sessions; later initializes do not change it.
|
|
3223
|
+
*/
|
|
3224
|
+
supportedDialogKinds?: string[];
|
|
3197
3225
|
};
|
|
3198
3226
|
|
|
3199
3227
|
/**
|
|
@@ -3220,6 +3248,7 @@ export declare type SDKControlInitializeResponse = {
|
|
|
3220
3248
|
*/
|
|
3221
3249
|
declare type SDKControlInterruptRequest = {
|
|
3222
3250
|
subtype: 'interrupt';
|
|
3251
|
+
|
|
3223
3252
|
};
|
|
3224
3253
|
|
|
3225
3254
|
/**
|
|
@@ -3620,7 +3649,7 @@ export declare type SDKMemoryRecallMessage = {
|
|
|
3620
3649
|
session_id: string;
|
|
3621
3650
|
};
|
|
3622
3651
|
|
|
3623
|
-
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
|
|
3652
|
+
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 | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
|
|
3624
3653
|
|
|
3625
3654
|
/**
|
|
3626
3655
|
* Provenance of a user-role message (peer session, team lead, channel). Absent or `human` means keyboard input from the user.
|
|
@@ -3658,6 +3687,34 @@ export declare type SDKMirrorErrorMessage = {
|
|
|
3658
3687
|
session_id: string;
|
|
3659
3688
|
};
|
|
3660
3689
|
|
|
3690
|
+
/**
|
|
3691
|
+
* Emitted when the primary model ends the stream with stop_reason "refusal" and the turn is retried once on a fallback model with the swap made persistent for the session (direction: "retry"). "revert" and "sticky" are retained in the enum for SDK-consumer compat and are no longer emitted.
|
|
3692
|
+
*/
|
|
3693
|
+
export declare type SDKModelRefusalFallbackMessage = {
|
|
3694
|
+
type: 'system';
|
|
3695
|
+
subtype: 'model_refusal_fallback';
|
|
3696
|
+
trigger: 'refusal';
|
|
3697
|
+
direction: 'retry' | 'revert' | 'sticky';
|
|
3698
|
+
original_model: string;
|
|
3699
|
+
fallback_model: string;
|
|
3700
|
+
request_id: string | null;
|
|
3701
|
+
/**
|
|
3702
|
+
* stop_details.category from the refused API response ("cyber", "bio", …). Open string — new categories ship on the wire ahead of schema updates. null when the response carried no category (normal, not an error). Absent when emitted by an older CLI.
|
|
3703
|
+
*/
|
|
3704
|
+
api_refusal_category?: string | null;
|
|
3705
|
+
/**
|
|
3706
|
+
* stop_details.explanation from the refused API response. Unstable human prose — display only, never parse. null/absent under the same rules as api_refusal_category.
|
|
3707
|
+
*/
|
|
3708
|
+
api_refusal_explanation?: string | null;
|
|
3709
|
+
/**
|
|
3710
|
+
* 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.
|
|
3711
|
+
*/
|
|
3712
|
+
retracted_message_uuids?: string[];
|
|
3713
|
+
content: string;
|
|
3714
|
+
uuid: UUID;
|
|
3715
|
+
session_id: string;
|
|
3716
|
+
};
|
|
3717
|
+
|
|
3661
3718
|
/**
|
|
3662
3719
|
* Loop-side text notification. Mirrors the interactive REPL notification queue (key/priority/timeout). JSX notifications are not emitted on this channel.
|
|
3663
3720
|
*/
|
|
@@ -3728,6 +3785,10 @@ export declare type SdkPluginConfig = {
|
|
|
3728
3785
|
* Absolute or relative path to the plugin directory
|
|
3729
3786
|
*/
|
|
3730
3787
|
path: string;
|
|
3788
|
+
/**
|
|
3789
|
+
* When true, the engine loads skills/hooks/agents/commands from this plugin but does NOT read its .mcp.json or manifest mcpServers. Use when the SDK host owns this plugin's MCP connections.
|
|
3790
|
+
*/
|
|
3791
|
+
skipMcpDiscovery?: boolean;
|
|
3731
3792
|
};
|
|
3732
3793
|
|
|
3733
3794
|
/**
|
|
@@ -3778,6 +3839,7 @@ export declare type SDKRateLimitInfo = {
|
|
|
3778
3839
|
overageResetsAt?: number;
|
|
3779
3840
|
overageDisabledReason?: 'overage_not_provisioned' | 'org_level_disabled' | 'org_level_disabled_until' | 'out_of_credits' | 'seat_tier_level_disabled' | 'member_level_disabled' | 'seat_tier_zero_credit_limit' | 'group_zero_credit_limit' | 'member_zero_credit_limit' | 'org_service_level_disabled' | 'no_limits_configured' | 'fetch_error' | 'unknown';
|
|
3780
3841
|
isUsingOverage?: boolean;
|
|
3842
|
+
overageInUse?: boolean;
|
|
3781
3843
|
surpassedThreshold?: number;
|
|
3782
3844
|
};
|
|
3783
3845
|
|
|
@@ -4822,6 +4884,10 @@ export declare interface Settings {
|
|
|
4822
4884
|
* Disable the Workflows feature (also via CLAUDE_CODE_DISABLE_WORKFLOWS).
|
|
4823
4885
|
*/
|
|
4824
4886
|
disableWorkflows?: boolean;
|
|
4887
|
+
/**
|
|
4888
|
+
* Disable the Artifact tool (also via CLAUDE_CODE_DISABLE_ARTIFACT).
|
|
4889
|
+
*/
|
|
4890
|
+
disableArtifact?: boolean;
|
|
4825
4891
|
/**
|
|
4826
4892
|
* Enable or disable the Workflows feature for this user. Unset = default by plan once the feature is available.
|
|
4827
4893
|
*/
|