@anthropic-ai/claude-agent-sdk 0.3.217 → 0.3.219
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 +54 -54
- package/browser-sdk.js +3 -3
- package/manifest.json +22 -20
- package/manifest.zst.json +26 -24
- package/package.json +10 -10
- package/sdk-tools.d.ts +1 -1
- package/sdk.d.ts +64 -11
- package/sdk.mjs +59 -59
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-07-
|
|
2
|
+
"version": "2.1.219",
|
|
3
|
+
"commit": "7006c4c3acac98e554d3997baeda6a7fa4d1ff7c",
|
|
4
|
+
"buildDate": "2026-07-24T03:34:26Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "a8e806faaefac53c7a0f26523d8a45c60dbef3407b14ef990c75765d08febc82",
|
|
9
|
+
"size": 256908272
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "03be9f988ed88391b4a5f08e4c5dc317ce2fffa4a9dc66c01106326e7698ee76",
|
|
14
|
+
"size": 266381200
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "1f834b322ba9d1291cc7ffeff16a6795a59145bda279dbd59cd7ecebc7b7f15a",
|
|
19
|
+
"size": 271825824
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "22cfd6f5b3061c0391ba84e9cf8c9deaa37783aac18b004d42ec061e98f00691",
|
|
24
|
+
"size": 275004400
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "22b2c2e0f41ab0b7c7b8845be9c49fe6f27e4c344aab1bd174bdf84a4e6b0570",
|
|
29
|
+
"size": 265074024
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "487008769dd69599adb779205b6b371de27b4245f0ad2ad70f15baf4eac5f81e",
|
|
34
|
+
"size": 269627984
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "10f4c1f85b07f3cf6b8fff930fd26ecd475bd146a378acfafa559a6db9d89637",
|
|
39
|
+
"size": 265714848
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "6a1db10161b93e81ac55537feeae8a299f0bf67601c1c0f2016e79c850302baa",
|
|
44
|
+
"size": 260090016
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"sdkCompat": {
|
|
@@ -67,7 +67,9 @@
|
|
|
67
67
|
"0.3.207",
|
|
68
68
|
"0.3.208",
|
|
69
69
|
"0.3.209",
|
|
70
|
-
"0.3.215"
|
|
70
|
+
"0.3.215",
|
|
71
|
+
"0.3.217",
|
|
72
|
+
"0.3.218"
|
|
71
73
|
],
|
|
72
74
|
"harnessSchema": 1
|
|
73
75
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-07-
|
|
2
|
+
"version": "2.1.219",
|
|
3
|
+
"commit": "7006c4c3acac98e554d3997baeda6a7fa4d1ff7c",
|
|
4
|
+
"buildDate": "2026-07-24T03:36:23Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "c886b408ca4cda1d2959310faad132b933405a3b1bad4a9848d492d68eb47c2a",
|
|
9
|
+
"size": 52506446,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "980a7160d6db0bc8173a269e2853fa1da2c5565fc3b288cd173704b85c74c0f8",
|
|
12
|
+
"size": 52497683
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "44a0ce208070bdfb884959292e35bd231204d2a023a02022e589ea73d7f69b9f",
|
|
18
|
+
"size": 56935079,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "51c66f290fea291765a110b4f665617b2e21560a8d75bccfe8cbcf0886c886da",
|
|
21
|
+
"size": 56935309
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "799d6c5d6dff67c5cbd0bbc8ff680e6450ddbc671368e6de638d46f48ecbc4dd",
|
|
27
|
+
"size": 61249923
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "a24d9e365afe1d253518fa2cf2892430e11b06b18eaabec50dfe8e5cbba93d1d",
|
|
32
|
+
"size": 62548539
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "4134b86427f31017d709aefd83f08f2ae1c2c8b9c6ade1405c0afc7ff9acd86f",
|
|
37
|
+
"size": 59922435
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "01acb73d847bbfe6eb53488a9d002695f5ee0b0897f0e0ae42bfb147ea70600d",
|
|
42
|
+
"size": 61622798
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "f284e5c1b9591c71d00fa56724dbb93e97f2ad9062043641288b0aac197a6764",
|
|
47
|
+
"size": 62957683
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "1b11cf292eb8db6dc8c26395dc26157d09b4d0846d4f4f996cd4386704ba58c6",
|
|
52
|
+
"size": 60973807
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"sdkCompat": {
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
"0.3.207",
|
|
76
76
|
"0.3.208",
|
|
77
77
|
"0.3.209",
|
|
78
|
-
"0.3.215"
|
|
78
|
+
"0.3.215",
|
|
79
|
+
"0.3.217",
|
|
80
|
+
"0.3.218"
|
|
79
81
|
],
|
|
80
82
|
"harnessSchema": 1
|
|
81
83
|
}
|
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.219",
|
|
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.219",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.219",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.219",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.219",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.219",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.219",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.219",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.219"
|
|
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.219"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -2864,7 +2864,7 @@ export interface ArtifactInput {
|
|
|
2864
2864
|
*/
|
|
2865
2865
|
url?: string;
|
|
2866
2866
|
/**
|
|
2867
|
-
*
|
|
2867
|
+
* Last-resort overwrite that DISCARDS another session's published version. On a 409 conflict the normal fix is to re-read the artifact, merge your edits on top of the newer content, and publish again — not force. Pass force:true only when the user explicitly wants to replace the other session's version. The tracked baseVersion is still sent; with force:true the server treats it as informational and overwrites. Omit (or false) so a concurrent write 409s instead of being silently clobbered.
|
|
2868
2868
|
*/
|
|
2869
2869
|
force?: boolean;
|
|
2870
2870
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -328,11 +328,13 @@ declare namespace coreTypes {
|
|
|
328
328
|
ConfigScope,
|
|
329
329
|
CwdChangedHookInput,
|
|
330
330
|
CwdChangedHookSpecificOutput,
|
|
331
|
+
DirectoryAddedHookInput,
|
|
331
332
|
ElicitationHookInput,
|
|
332
333
|
ElicitationHookSpecificOutput,
|
|
333
334
|
ElicitationResultHookInput,
|
|
334
335
|
ElicitationResultHookSpecificOutput,
|
|
335
336
|
ExitReason,
|
|
337
|
+
FastModeDisabledReason,
|
|
336
338
|
FastModeState,
|
|
337
339
|
FileChangedHookInput,
|
|
338
340
|
FileChangedHookSpecificOutput,
|
|
@@ -527,6 +529,18 @@ export declare type CwdChangedHookSpecificOutput = {
|
|
|
527
529
|
*/
|
|
528
530
|
export declare function deleteSession(_sessionId: string, _options?: SessionMutationOptions): Promise<void>;
|
|
529
531
|
|
|
532
|
+
export declare type DirectoryAddedHookInput = BaseHookInput & {
|
|
533
|
+
hook_event_name: 'DirectoryAdded';
|
|
534
|
+
/**
|
|
535
|
+
* Absolute path of the directory that was added.
|
|
536
|
+
*/
|
|
537
|
+
directory: string;
|
|
538
|
+
/**
|
|
539
|
+
* How the directory was added: "slash_command" for /add-dir, "register_repo_root" for the SDK control_request.
|
|
540
|
+
*/
|
|
541
|
+
source: 'slash_command' | 'register_repo_root';
|
|
542
|
+
};
|
|
543
|
+
|
|
530
544
|
/**
|
|
531
545
|
* Effort level for controlling how much thinking/reasoning Claude applies.
|
|
532
546
|
*
|
|
@@ -615,6 +629,11 @@ export declare const EXIT_REASONS: readonly ["clear", "resume", "logout", "promp
|
|
|
615
629
|
|
|
616
630
|
export declare type ExitReason = 'clear' | 'resume' | 'logout' | 'prompt_input_exit' | 'other' | 'bypass_permissions_disabled';
|
|
617
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Why fast mode can't serve right now. Absent when nothing blocks it (a request may still choose standard speed). A paused-after-rate-limit run is not here; it rides fast_mode_state as 'cooldown'.
|
|
634
|
+
*/
|
|
635
|
+
export declare type FastModeDisabledReason = 'free' | 'preference' | 'extra_usage_disabled' | 'network_error' | 'unknown' | 'not_first_party' | 'disabled_by_env' | 'model_not_allowed' | 'sdk_opt_in_required' | 'pending';
|
|
636
|
+
|
|
618
637
|
/**
|
|
619
638
|
* Fast mode state: off, in cooldown after rate limit, or actively enabled.
|
|
620
639
|
*/
|
|
@@ -794,7 +813,7 @@ export declare type GetSubagentMessagesOptions = {
|
|
|
794
813
|
sessionStore?: SessionStore;
|
|
795
814
|
};
|
|
796
815
|
|
|
797
|
-
export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "PostToolBatch", "Notification", "UserPromptSubmit", "UserPromptExpansion", "SessionStart", "SessionEnd", "Stop", "StopFailure", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "PermissionRequest", "PermissionDenied", "Setup", "TeammateIdle", "TaskCreated", "TaskCompleted", "Elicitation", "ElicitationResult", "ConfigChange", "WorktreeCreate", "WorktreeRemove", "InstructionsLoaded", "CwdChanged", "FileChanged", "MessageDisplay"];
|
|
816
|
+
export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "PostToolBatch", "Notification", "UserPromptSubmit", "UserPromptExpansion", "SessionStart", "SessionEnd", "Stop", "StopFailure", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "PermissionRequest", "PermissionDenied", "Setup", "TeammateIdle", "TaskCreated", "TaskCompleted", "Elicitation", "ElicitationResult", "ConfigChange", "WorktreeCreate", "WorktreeRemove", "InstructionsLoaded", "CwdChanged", "FileChanged", "DirectoryAdded", "MessageDisplay"];
|
|
798
817
|
|
|
799
818
|
/**
|
|
800
819
|
* Hook callback function for responding to events during execution.
|
|
@@ -813,9 +832,9 @@ export declare interface HookCallbackMatcher {
|
|
|
813
832
|
timeout?: number;
|
|
814
833
|
}
|
|
815
834
|
|
|
816
|
-
export declare type HookEvent = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'PostToolBatch' | 'Notification' | 'UserPromptSubmit' | 'UserPromptExpansion' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'SubagentStart' | 'SubagentStop' | 'PreCompact' | 'PostCompact' | 'PermissionRequest' | 'PermissionDenied' | 'Setup' | 'TeammateIdle' | 'TaskCreated' | 'TaskCompleted' | 'Elicitation' | 'ElicitationResult' | 'ConfigChange' | 'WorktreeCreate' | 'WorktreeRemove' | 'InstructionsLoaded' | 'CwdChanged' | 'FileChanged' | 'MessageDisplay';
|
|
835
|
+
export declare type HookEvent = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'PostToolBatch' | 'Notification' | 'UserPromptSubmit' | 'UserPromptExpansion' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'SubagentStart' | 'SubagentStop' | 'PreCompact' | 'PostCompact' | 'PermissionRequest' | 'PermissionDenied' | 'Setup' | 'TeammateIdle' | 'TaskCreated' | 'TaskCompleted' | 'Elicitation' | 'ElicitationResult' | 'ConfigChange' | 'WorktreeCreate' | 'WorktreeRemove' | 'InstructionsLoaded' | 'CwdChanged' | 'FileChanged' | 'DirectoryAdded' | 'MessageDisplay';
|
|
817
836
|
|
|
818
|
-
export declare type HookInput = PreToolUseHookInput | PostToolUseHookInput | PostToolUseFailureHookInput | PostToolBatchHookInput | PermissionDeniedHookInput | NotificationHookInput | UserPromptSubmitHookInput | UserPromptExpansionHookInput | SessionStartHookInput | SessionEndHookInput | StopHookInput | StopFailureHookInput | SubagentStartHookInput | SubagentStopHookInput | PreCompactHookInput | PostCompactHookInput | PermissionRequestHookInput | SetupHookInput | TeammateIdleHookInput | TaskCreatedHookInput | TaskCompletedHookInput | ElicitationHookInput | ElicitationResultHookInput | ConfigChangeHookInput | InstructionsLoadedHookInput | WorktreeCreateHookInput | WorktreeRemoveHookInput | CwdChangedHookInput | FileChangedHookInput | MessageDisplayHookInput;
|
|
837
|
+
export declare type HookInput = PreToolUseHookInput | PostToolUseHookInput | PostToolUseFailureHookInput | PostToolBatchHookInput | PermissionDeniedHookInput | NotificationHookInput | UserPromptSubmitHookInput | UserPromptExpansionHookInput | SessionStartHookInput | SessionEndHookInput | StopHookInput | StopFailureHookInput | SubagentStartHookInput | SubagentStopHookInput | PreCompactHookInput | PostCompactHookInput | PermissionRequestHookInput | SetupHookInput | TeammateIdleHookInput | TaskCreatedHookInput | TaskCompletedHookInput | ElicitationHookInput | ElicitationResultHookInput | ConfigChangeHookInput | InstructionsLoadedHookInput | WorktreeCreateHookInput | WorktreeRemoveHookInput | CwdChangedHookInput | FileChangedHookInput | DirectoryAddedHookInput | MessageDisplayHookInput;
|
|
819
838
|
|
|
820
839
|
export declare type HookJSONOutput = AsyncHookJSONOutput | SyncHookJSONOutput;
|
|
821
840
|
|
|
@@ -1252,6 +1271,14 @@ export declare type ModelUsage = {
|
|
|
1252
1271
|
costUSD: number;
|
|
1253
1272
|
contextWindow: number;
|
|
1254
1273
|
maxOutputTokens: number;
|
|
1274
|
+
/**
|
|
1275
|
+
* Canonical model id used for the pricing lookup (e.g. 'claude-opus-4-7'). May differ from the raw model string this entry is keyed by (provider-specific ids, aliases).
|
|
1276
|
+
*/
|
|
1277
|
+
canonicalModel?: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* API provider that served this model ('firstParty', 'bedrock', 'vertex', 'foundry', 'anthropicAws', 'anthropicGoogleCloud', 'mantle', 'gateway').
|
|
1280
|
+
*/
|
|
1281
|
+
provider?: string;
|
|
1255
1282
|
};
|
|
1256
1283
|
|
|
1257
1284
|
export declare type NonNullableUsage = {
|
|
@@ -2717,6 +2744,7 @@ export declare type SandboxNetworkConfig = NonNullable<z.infer<ReturnType<typeof
|
|
|
2717
2744
|
declare const SandboxNetworkConfigSchema: () => z.ZodOptional<z.ZodObject<{
|
|
2718
2745
|
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2719
2746
|
deniedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2747
|
+
strictAllowlist: z.ZodOptional<z.ZodBoolean>;
|
|
2720
2748
|
allowManagedDomainsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2721
2749
|
allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2722
2750
|
allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2743,6 +2771,7 @@ declare const SandboxSettingsSchema: () => z.ZodObject<{
|
|
|
2743
2771
|
network: z.ZodOptional<z.ZodObject<{
|
|
2744
2772
|
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2745
2773
|
deniedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2774
|
+
strictAllowlist: z.ZodOptional<z.ZodBoolean>;
|
|
2746
2775
|
allowManagedDomainsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2747
2776
|
allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2748
2777
|
allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3431,6 +3460,7 @@ export declare type SDKControlInitializeResponse = {
|
|
|
3431
3460
|
|
|
3432
3461
|
|
|
3433
3462
|
fast_mode_state?: coreTypes.FastModeState;
|
|
3463
|
+
fast_mode_disabled_reason?: coreTypes.FastModeDisabledReason;
|
|
3434
3464
|
|
|
3435
3465
|
|
|
3436
3466
|
|
|
@@ -3443,6 +3473,10 @@ export declare type SDKControlInitializeResponse = {
|
|
|
3443
3473
|
declare type SDKControlInterruptRequest = {
|
|
3444
3474
|
subtype: 'interrupt';
|
|
3445
3475
|
|
|
3476
|
+
/**
|
|
3477
|
+
* When true, the interrupt also cancels every uuid-stamped main-thread command still in the queue or already dequeued for the imminent turn but not yet reachable by the abort (the first-command prewait window) — the same set the response would otherwise list under `still_queued`. Each is closed with a terminal 'cancelled' lifecycle and listed on the response's `cancelled` field. `still_queued` is always empty. (The isFoldInFlight guard cancel_async_message uses does not apply here: this request also aborts the running turn, so a fold-in-flight uuid is never delivered and is swept with the rest. A fold-in-flight uuid's queued_command attachment may already appear in the aborted turn's transcript if the abort landed after the fold's attachment yield — pre-existing leave-queued semantics; it never runs as its own turn.) Uuid-less commands (task notifications) still in the queue are also dequeued but cannot be listed; a uuid-less command already in the prewait window is unreachable by either leg and still runs. When false or absent, queued commands survive the interrupt and are listed under `still_queued` — the interrupt_receipt_v1 contract is unchanged. A Stop-means-stop-everything client (a remote UI's Stop button) sets this true so one round-trip halts the session; a wrapper that wants per-uuid control leaves it false and follows up with cancel_async_message. Advertised by the `interrupt_cancel_queued_v1` capability on system/init; older CLIs ignore the field and behave as if false.
|
|
3478
|
+
*/
|
|
3479
|
+
cancel_queued?: boolean;
|
|
3446
3480
|
};
|
|
3447
3481
|
|
|
3448
3482
|
/**
|
|
@@ -3450,9 +3484,13 @@ declare type SDKControlInterruptRequest = {
|
|
|
3450
3484
|
*/
|
|
3451
3485
|
export declare type SDKControlInterruptResponse = {
|
|
3452
3486
|
/**
|
|
3453
|
-
* Uuids of async user messages that survive this interrupt: commands still in the queue, plus any batch already dequeued for the imminent turn but not yet reachable by the abort. These WILL run unless cancelled first. Cancellation granularity: uuids still in the queue are individually cancellable via cancel_async_message; once a batch is dequeued and coalesced into one turn, cancelling a NON-representative member uuid is a no-op (its content still runs), while cancelling the batch-representative uuid drops the WHOLE coalesced batch — in both cases the cancel response reports cancelled:false because the message was no longer in the queue. Coverage caveats: only uuid-STAMPED messages appear (a message enqueued without a uuid still runs but is never listed, so [] does not mean "nothing will run"); only main-thread messages are listed (subagent-addressed messages are out of scope); and the list may include internally-enqueued uuids the client never sent (cron triggers, auto-resume continuations) — ignore unknown uuids rather than treating them as an error. Ordering: on a clean interrupt this receipt is written before the interrupted turn result; a turn that crashes during interrupt handling emits its error result on a direct-write path that may precede the receipt. Snapshot is taken synchronously with abort processing — probing the queue after the interrupted result instead always loses the race against the drain loop, which starts the next queued turn immediately.
|
|
3487
|
+
* Uuids of async user messages that survive this interrupt: commands still in the queue, plus any batch already dequeued for the imminent turn but not yet reachable by the abort. These WILL run unless cancelled first (or unless the request set cancel_queued:true, in which case this list is always empty — every uuid-stamped survivor is removed, emitted a terminal `cancelled` synchronously, and listed under `cancelled` instead). Cancellation granularity: uuids still in the queue are individually cancellable via cancel_async_message; once a batch is dequeued and coalesced into one turn, cancelling a NON-representative member uuid is a no-op (its content still runs), while cancelling the batch-representative uuid drops the WHOLE coalesced batch — in both cases the cancel response reports cancelled:false because the message was no longer in the queue. Coverage caveats: only uuid-STAMPED messages appear (a message enqueued without a uuid still runs but is never listed, so [] does not mean "nothing will run"); only main-thread messages are listed (subagent-addressed messages are out of scope); and the list may include internally-enqueued uuids the client never sent (cron triggers, auto-resume continuations) — ignore unknown uuids rather than treating them as an error. Ordering: on a clean interrupt this receipt is written before the interrupted turn result; a turn that crashes during interrupt handling emits its error result on a direct-write path that may precede the receipt. Snapshot is taken synchronously with abort processing — probing the queue after the interrupted result instead always loses the race against the drain loop, which starts the next queued turn immediately.
|
|
3454
3488
|
*/
|
|
3455
3489
|
still_queued: string[];
|
|
3490
|
+
/**
|
|
3491
|
+
* Present only when the request set cancel_queued:true — uuids of main-thread commands cancelled by this interrupt: every survivor that would otherwise have appeared under `still_queued`, including any uuid that was mid-fold at the interrupt instant (this request also aborts, so the fold never delivers it). Each listed uuid has been removed (queue-resident) or marked cancel-pending (the first-command prewait window, closed by the drain loop's backstop) and emits a terminal 'cancelled' lifecycle synchronously at the first such interrupt (a repeat interrupt over the same parked batch re-lists the uuid idempotently without re-emitting); none will run. Same coverage caveats as `still_queued` (uuid-stamped main-thread only; internally-enqueued uuids may appear). Advertised by the `interrupt_cancel_queued_v1` capability.
|
|
3492
|
+
*/
|
|
3493
|
+
cancelled?: string[];
|
|
3456
3494
|
};
|
|
3457
3495
|
|
|
3458
3496
|
/**
|
|
@@ -3624,7 +3662,7 @@ export declare type SDKControlReadFileResponse = {
|
|
|
3624
3662
|
};
|
|
3625
3663
|
|
|
3626
3664
|
/**
|
|
3627
|
-
* Add a directory as a working-directory root and optionally reload CLAUDE.md, skills, and plugins. The directory must resolve to a subdirectory of cwd.
|
|
3665
|
+
* Add a directory as a working-directory root and optionally reload CLAUDE.md, skills, and plugins. The directory must resolve to a strict subdirectory of cwd, or of a directory passed at launch via --add-dir / the SDK additionalDirectories option. A directory that is already a registered working directory (including a duplicate of an earlier request) is denied with an error; the registration pipeline and DirectoryAdded hooks do not re-run.
|
|
3628
3666
|
*/
|
|
3629
3667
|
declare type SDKControlRegisterRepoRootRequest = {
|
|
3630
3668
|
subtype: 'register_repo_root';
|
|
@@ -4243,6 +4281,7 @@ export declare type SDKResultError = {
|
|
|
4243
4281
|
errors: string[];
|
|
4244
4282
|
terminal_reason?: TerminalReason;
|
|
4245
4283
|
fast_mode_state?: FastModeState;
|
|
4284
|
+
fast_mode_disabled_reason?: FastModeDisabledReason;
|
|
4246
4285
|
origin?: SDKMessageOrigin;
|
|
4247
4286
|
uuid: UUID;
|
|
4248
4287
|
session_id: string;
|
|
@@ -4276,6 +4315,7 @@ export declare type SDKResultSuccess = {
|
|
|
4276
4315
|
deferred_tool_use?: SDKDeferredToolUse;
|
|
4277
4316
|
terminal_reason?: TerminalReason;
|
|
4278
4317
|
fast_mode_state?: FastModeState;
|
|
4318
|
+
fast_mode_disabled_reason?: FastModeDisabledReason;
|
|
4279
4319
|
origin?: SDKMessageOrigin;
|
|
4280
4320
|
uuid: UUID;
|
|
4281
4321
|
session_id: string;
|
|
@@ -4401,9 +4441,11 @@ export declare type SDKSystemMessage = {
|
|
|
4401
4441
|
}[];
|
|
4402
4442
|
|
|
4403
4443
|
|
|
4444
|
+
|
|
4404
4445
|
fast_mode_state?: FastModeState;
|
|
4446
|
+
fast_mode_disabled_reason?: FastModeDisabledReason;
|
|
4405
4447
|
/**
|
|
4406
|
-
* Protocol capabilities this CLI supports, so SDK consumers can feature-detect instead of version-sniffing. Open set — ignore unknown values; check each capability for exactly the behavior you use. 'interrupt_receipt_v1' = the interrupt control_response success payload carries still_queued (uuids of async user messages that survive the interrupt). Absent on older CLIs.
|
|
4448
|
+
* Protocol capabilities this CLI supports, so SDK consumers can feature-detect instead of version-sniffing. Open set — ignore unknown values; check each capability for exactly the behavior you use. 'interrupt_receipt_v1' = the interrupt control_response success payload carries still_queued (uuids of async user messages that survive the interrupt). 'interrupt_cancel_queued_v1' = the interrupt control_request honors cancel_queued:true (queued and pending-dispatch commands are cancelled alongside the abort, listed on the response's cancelled field; still_queued is always empty — including any uuid that was mid-fold at the interrupt instant, since this request also aborts and the fold never delivers it). Absent on older CLIs.
|
|
4407
4449
|
*/
|
|
4408
4450
|
capabilities?: string[];
|
|
4409
4451
|
|
|
@@ -4544,7 +4586,7 @@ export declare type SDKUserMessage = {
|
|
|
4544
4586
|
parent_tool_use_id: string | null;
|
|
4545
4587
|
isSynthetic?: boolean;
|
|
4546
4588
|
/**
|
|
4547
|
-
* Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is
|
|
4589
|
+
* Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text.
|
|
4548
4590
|
*/
|
|
4549
4591
|
tool_use_result?: unknown;
|
|
4550
4592
|
priority?: 'now' | 'next' | 'later';
|
|
@@ -4590,7 +4632,7 @@ export declare type SDKUserMessageReplay = {
|
|
|
4590
4632
|
parent_tool_use_id: string | null;
|
|
4591
4633
|
isSynthetic?: boolean;
|
|
4592
4634
|
/**
|
|
4593
|
-
* Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is
|
|
4635
|
+
* Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text.
|
|
4594
4636
|
*/
|
|
4595
4637
|
tool_use_result?: unknown;
|
|
4596
4638
|
priority?: 'now' | 'next' | 'later';
|
|
@@ -5350,6 +5392,10 @@ export declare interface Settings {
|
|
|
5350
5392
|
* Enable or disable the Workflows feature for this user. Unset = default by plan once the feature is available.
|
|
5351
5393
|
*/
|
|
5352
5394
|
enableWorkflows?: boolean;
|
|
5395
|
+
/**
|
|
5396
|
+
* Advisory size guideline for the dynamic workflows Claude writes: "small" aims for fewer than 5 agents, "medium" (the default) fewer than 15, "large" fewer than 50, and "unrestricted" sends no guideline. 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.
|
|
5397
|
+
*/
|
|
5398
|
+
workflowSizeGuideline?: 'unrestricted' | 'small' | 'medium' | 'large';
|
|
5353
5399
|
/**
|
|
5354
5400
|
* Enable the "ultracode" keyword trigger: including the keyword in a prompt opts that turn into the Workflow tool. Set to false to disable the trigger. Default: true.
|
|
5355
5401
|
*/
|
|
@@ -6104,6 +6150,10 @@ export declare interface Settings {
|
|
|
6104
6150
|
* Domains that are always blocked, even if matched by allowedDomains. Supports the same wildcard syntax as allowedDomains. Merged from all settings sources regardless of allowManagedDomainsOnly.
|
|
6105
6151
|
*/
|
|
6106
6152
|
deniedDomains?: string[];
|
|
6153
|
+
/**
|
|
6154
|
+
* When true, the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting. Enforced for sandboxed commands only — in-process tools such as WebFetch are not gated by this setting. Only honored from user, managed/policy, or CLI (--settings) settings — project settings (.claude/settings.json and .claude/settings.local.json) are ignored.
|
|
6155
|
+
*/
|
|
6156
|
+
strictAllowlist?: boolean;
|
|
6107
6157
|
/**
|
|
6108
6158
|
* When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources.
|
|
6109
6159
|
*/
|
|
@@ -6491,9 +6541,12 @@ export declare interface Settings {
|
|
|
6491
6541
|
* Automatically compact conversation when context fills
|
|
6492
6542
|
*/
|
|
6493
6543
|
autoCompactEnabled?: boolean;
|
|
6494
|
-
|
|
6495
6544
|
/**
|
|
6496
|
-
*
|
|
6545
|
+
* Precompute the compaction summary in the background before it is needed. Only applies when auto-compact is on.
|
|
6546
|
+
*/
|
|
6547
|
+
precomputeCompactionEnabled?: boolean;
|
|
6548
|
+
/**
|
|
6549
|
+
* When safeguards flag a message, automatically switch to a different model to keep chatting. When off, your session will pause instead.
|
|
6497
6550
|
*/
|
|
6498
6551
|
switchModelsOnFlag?: boolean;
|
|
6499
6552
|
/**
|
|
@@ -6513,7 +6566,7 @@ export declare interface Settings {
|
|
|
6513
6566
|
*/
|
|
6514
6567
|
showTurnDuration?: boolean;
|
|
6515
6568
|
/**
|
|
6516
|
-
* Stamp each
|
|
6569
|
+
* Stamp each message with its arrival time
|
|
6517
6570
|
*/
|
|
6518
6571
|
showMessageTimestamps?: boolean;
|
|
6519
6572
|
/**
|