@anthropic-ai/claude-agent-sdk 0.2.133 → 0.2.137
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 +106 -105
- package/bridge.mjs +74 -71
- package/browser-sdk.js +50 -49
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +9 -1
- package/sdk.d.ts +164 -2
- package/sdk.mjs +73 -63
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-05-
|
|
2
|
+
"version": "2.1.137",
|
|
3
|
+
"commit": "88a017e5d1d4c7de4e6de6a496ac08c9c1b77d79",
|
|
4
|
+
"buildDate": "2026-05-08T23:09:27Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "6d91ce741b8aa129fd43c2f844b39dcc1fec8cfd77e8e5a1ed0f0e7ba54cfea9",
|
|
9
|
+
"size": 205062416
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "bc71e2701a196c1eee65d0cda675f40118aaf11ce469831bb45092fc342527ff",
|
|
14
|
+
"size": 207568336
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "8198e7c845a4f3806504b7350424158970c24c56724de400675d6597507d6183",
|
|
19
|
+
"size": 230471304
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "ae29f87fdee2d42b5e9ff05c84256bf50a0e7edaa2d58975f9b4b2bd2c29897c",
|
|
24
|
+
"size": 230577872
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "a0fc2fc56e36e281bf2849c6edb7403fa2d97a4ca68d555cfa18c9232fdd7d8d",
|
|
29
|
+
"size": 223326040
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "35e6c7fd0e03717a74e3fe8b016ca7ee448131d3edf060f82164a573cb818449",
|
|
34
|
+
"size": 224971824
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "4bb6443d136278fbb8acf637cdf3481e5db5c547a7f9bc4658dcd8630279dfe4",
|
|
39
|
+
"size": 226494112
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "83db287224382522157ecbb733f63f51cbc1fb5d048a3950ee2a05c779edbfb5",
|
|
44
|
+
"size": 222451872
|
|
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-05-
|
|
2
|
+
"version": "2.1.137",
|
|
3
|
+
"commit": "88a017e5d1d4c7de4e6de6a496ac08c9c1b77d79",
|
|
4
|
+
"buildDate": "2026-05-08T23:16:16Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "b381dc330330a8e3165f10f36e0f7b9741cc2ae81e9c30b9de27fc87aac42ccf",
|
|
9
|
+
"size": 42514413,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "b498ae41fb58a3f53fe628408c0dcceee0f0a105c2aaee8f92cbad5f6b81eb54",
|
|
12
|
+
"size": 42522515
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "5d658e16017805881635c16057b5354eca1f2d86d6112892456e708e06f600a4",
|
|
18
|
+
"size": 44416297,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "a7ddd624dc877c1bea9fcda689cb9a4a6ee09fac9baf328a8aea805ae8c79b6b",
|
|
21
|
+
"size": 44415877
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "20e1967c32839d5042b48b7b72a551a0bf3f23ec45424913b9482dcc3b000bd0",
|
|
27
|
+
"size": 50314251
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "f28707885240752a318f0b527d00fb2bb9dde98c0066bef9af80524fc386eaec",
|
|
32
|
+
"size": 50919636
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "8ee8dbf6fcc56a2a72b16e46019903424665f28f9815833d2eeedafd84469a30",
|
|
37
|
+
"size": 48945786
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "14bf7ce7badc63f66c316f0fea83b26b5a89dbea4627e1783f510ccb8d31d86b",
|
|
42
|
+
"size": 49642958
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "e186c6c7662de8352f5df83db2457de4313242d040773467a81032303a7e799a",
|
|
47
|
+
"size": 51649755
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "75a3d6e63a57bc8133974376b7f86de0363da033c24db588a416b0c5df759f29",
|
|
52
|
+
"size": 49912570
|
|
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.2.
|
|
3
|
+
"version": "0.2.137",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"zod": "^4.0.0"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.
|
|
59
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.
|
|
60
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.
|
|
61
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.
|
|
62
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.
|
|
63
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.
|
|
64
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.
|
|
58
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.137",
|
|
59
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.137",
|
|
60
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.137",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.137",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.137",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.137",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.137",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.137"
|
|
66
66
|
},
|
|
67
67
|
"files": [
|
|
68
68
|
"sdk.mjs",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"manifest.json",
|
|
79
79
|
"manifest.zst.json"
|
|
80
80
|
],
|
|
81
|
-
"claudeCodeVersion": "2.1.
|
|
81
|
+
"claudeCodeVersion": "2.1.137"
|
|
82
82
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -260,7 +260,15 @@ export type ListMcpResourcesOutput = {
|
|
|
260
260
|
/**
|
|
261
261
|
* MCP tool execution result
|
|
262
262
|
*/
|
|
263
|
-
export type McpOutput =
|
|
263
|
+
export type McpOutput =
|
|
264
|
+
| string
|
|
265
|
+
| {
|
|
266
|
+
type: string;
|
|
267
|
+
[k: string]: unknown;
|
|
268
|
+
}[]
|
|
269
|
+
| {
|
|
270
|
+
[k: string]: unknown;
|
|
271
|
+
};
|
|
264
272
|
|
|
265
273
|
export interface AgentInput {
|
|
266
274
|
/**
|
package/sdk.d.ts
CHANGED
|
@@ -367,6 +367,7 @@ declare namespace coreTypes {
|
|
|
367
367
|
SDKNotificationMessage,
|
|
368
368
|
SDKPartialAssistantMessage,
|
|
369
369
|
SDKPermissionDenial,
|
|
370
|
+
SDKPermissionDeniedMessage,
|
|
370
371
|
SDKPluginInstallMessage,
|
|
371
372
|
SDKPromptSuggestionMessage,
|
|
372
373
|
SDKRateLimitEvent,
|
|
@@ -574,6 +575,16 @@ export declare type FileChangedHookSpecificOutput = {
|
|
|
574
575
|
watchPaths?: string[];
|
|
575
576
|
};
|
|
576
577
|
|
|
578
|
+
/**
|
|
579
|
+
* Apply the same trust-tier filter the CLI applies before honoring escalating
|
|
580
|
+
* permission modes from settings: if `permissions.defaultMode` is escalating
|
|
581
|
+
* (`bypassPermissions`/`auto`/`acceptEdits`) AND was set by a repo-committed
|
|
582
|
+
* tier (`project`), drop it from the returned `effective`.
|
|
583
|
+
*
|
|
584
|
+
* @alpha
|
|
585
|
+
*/
|
|
586
|
+
export declare function filterEscalatingDefaultMode(_resolved: ResolvedSettings): Settings;
|
|
587
|
+
|
|
577
588
|
/**
|
|
578
589
|
* Fold a batch of appended entries into the running summary for `key`.
|
|
579
590
|
*
|
|
@@ -1410,7 +1421,7 @@ export declare type Options = {
|
|
|
1410
1421
|
* - `'medium'` — Moderate thinking
|
|
1411
1422
|
* - `'high'` — Deep reasoning (default)
|
|
1412
1423
|
* - `'xhigh'` — Deeper than high (Opus 4.7 only)
|
|
1413
|
-
* - `'max'` — Maximum effort (Opus 4.6/4.7
|
|
1424
|
+
* - `'max'` — Maximum effort (Opus 4.6/4.7, Sonnet 4.6)
|
|
1414
1425
|
*
|
|
1415
1426
|
* @see https://docs.anthropic.com/en/docs/build-with-claude/effort
|
|
1416
1427
|
*/
|
|
@@ -1897,6 +1908,12 @@ export declare type PermissionUpdate = {
|
|
|
1897
1908
|
|
|
1898
1909
|
export declare type PermissionUpdateDestination = 'userSettings' | 'projectSettings' | 'localSettings' | 'session' | 'cliArg';
|
|
1899
1910
|
|
|
1911
|
+
/**
|
|
1912
|
+
* Which policy sub-source supplied a `'managed'` value.
|
|
1913
|
+
* @alpha
|
|
1914
|
+
*/
|
|
1915
|
+
export declare type PolicySettingsOrigin = 'helper' | 'remote' | 'plist' | 'hklm' | 'file' | 'parent' | 'hkcu';
|
|
1916
|
+
|
|
1900
1917
|
export declare type PostCompactHookInput = BaseHookInput & {
|
|
1901
1918
|
hook_event_name: 'PostCompact';
|
|
1902
1919
|
trigger: 'manual' | 'auto';
|
|
@@ -2031,6 +2048,18 @@ export declare type PromptResponse = {
|
|
|
2031
2048
|
selected: string;
|
|
2032
2049
|
};
|
|
2033
2050
|
|
|
2051
|
+
/**
|
|
2052
|
+
* Per-key provenance entry.
|
|
2053
|
+
* @alpha
|
|
2054
|
+
*/
|
|
2055
|
+
export declare type ProvenanceEntry = {
|
|
2056
|
+
source: ResolvedSettingSource;
|
|
2057
|
+
/** Absolute path to the settings file, for filesystem-backed sources. */
|
|
2058
|
+
path?: string;
|
|
2059
|
+
/** Which policy sub-source supplied the value, when `source === 'managed'`. */
|
|
2060
|
+
policyOrigin?: PolicySettingsOrigin;
|
|
2061
|
+
};
|
|
2062
|
+
|
|
2034
2063
|
/**
|
|
2035
2064
|
* Query interface with methods for controlling query execution.
|
|
2036
2065
|
* Extends AsyncGenerator and has methods, so not serializable.
|
|
@@ -2264,6 +2293,96 @@ export declare function query(_params: {
|
|
|
2264
2293
|
*/
|
|
2265
2294
|
export declare function renameSession(_sessionId: string, _title: string, _options?: SessionMutationOptions): Promise<void>;
|
|
2266
2295
|
|
|
2296
|
+
/**
|
|
2297
|
+
* Result of {@link resolveSettings}.
|
|
2298
|
+
* @alpha
|
|
2299
|
+
*/
|
|
2300
|
+
export declare type ResolvedSettings = {
|
|
2301
|
+
/** Merged settings after applying all enabled sources in precedence order. */
|
|
2302
|
+
effective: Settings;
|
|
2303
|
+
/** For each top-level key in `effective`, which source supplied the value. */
|
|
2304
|
+
provenance: Partial<Record<keyof Settings, ProvenanceEntry>>;
|
|
2305
|
+
/**
|
|
2306
|
+
* Per-source raw settings, low→high precedence. Use this when per-top-level
|
|
2307
|
+
* provenance is too coarse (e.g. checking which tier set a nested key).
|
|
2308
|
+
*/
|
|
2309
|
+
sources: Array<{
|
|
2310
|
+
source: ResolvedSettingSource;
|
|
2311
|
+
settings: Settings;
|
|
2312
|
+
path?: string;
|
|
2313
|
+
policyOrigin?: PolicySettingsOrigin;
|
|
2314
|
+
}>;
|
|
2315
|
+
};
|
|
2316
|
+
|
|
2317
|
+
/**
|
|
2318
|
+
* Source that contributed an effective setting value. Filesystem sources use
|
|
2319
|
+
* the same names as {@link SettingSource}; `'managed'` is the policy tier
|
|
2320
|
+
* (managed-settings.json / `managedSettings` option); `'flag'` is the
|
|
2321
|
+
* `--settings` CLI flag tier.
|
|
2322
|
+
* @alpha
|
|
2323
|
+
*/
|
|
2324
|
+
export declare type ResolvedSettingSource = SettingSource | 'managed' | 'flag';
|
|
2325
|
+
|
|
2326
|
+
/**
|
|
2327
|
+
* Resolve the effective Claude Code settings for the given options using the
|
|
2328
|
+
* same merge engine as the CLI, without spawning the Claude CLI. Useful for
|
|
2329
|
+
* inspecting what configuration a `query()` call would see.
|
|
2330
|
+
*
|
|
2331
|
+
* @remarks
|
|
2332
|
+
* This reports the **raw settings cascade**, not a security decision. Two
|
|
2333
|
+
* caveats:
|
|
2334
|
+
*
|
|
2335
|
+
* - **The policy tier matches CLI startup** (managed-settings.json,
|
|
2336
|
+
* remote-cached managed settings, MDM via macOS plist / Windows
|
|
2337
|
+
* HKLM/HKCU, and `managedSettings`) **except** the admin-configured
|
|
2338
|
+
* `policyHelper` subprocess is not executed. MDM resolution may invoke
|
|
2339
|
+
* `plutil` (macOS, when an MDM plist exists) or `reg.exe` (Windows/WSL)
|
|
2340
|
+
* on the first call per process. If your deployment relies on
|
|
2341
|
+
* policyHelper to inject managed settings, results will differ.
|
|
2342
|
+
* - **`permissions.defaultMode` is reported as-is across all tiers**
|
|
2343
|
+
* including project. The CLI applies a separate trust filter before
|
|
2344
|
+
* honoring escalating modes (`bypassPermissions`, `auto`, `acceptEdits`)
|
|
2345
|
+
* from repo-committed files; pass the result through
|
|
2346
|
+
* {@link filterEscalatingDefaultMode} before acting on `defaultMode`.
|
|
2347
|
+
*
|
|
2348
|
+
* @alpha
|
|
2349
|
+
*/
|
|
2350
|
+
export declare function resolveSettings(_opts?: ResolveSettingsOptions): Promise<ResolvedSettings>;
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Options for {@link resolveSettings}.
|
|
2354
|
+
* @alpha
|
|
2355
|
+
*/
|
|
2356
|
+
export declare type ResolveSettingsOptions = {
|
|
2357
|
+
/**
|
|
2358
|
+
* Directory to resolve project/local settings relative to. Defaults to the
|
|
2359
|
+
* current process's working directory.
|
|
2360
|
+
*/
|
|
2361
|
+
cwd?: string;
|
|
2362
|
+
/**
|
|
2363
|
+
* Which filesystem settings sources to load. When omitted, all sources are
|
|
2364
|
+
* loaded (matches CLI defaults). Pass `[]` to skip user/project/local
|
|
2365
|
+
* sources — the managed-settings policy tier is still read from disk.
|
|
2366
|
+
*/
|
|
2367
|
+
settingSources?: SettingSource[];
|
|
2368
|
+
/**
|
|
2369
|
+
* Restrictive policy-tier settings — equivalent to `Options.managedSettings`
|
|
2370
|
+
* on `query()`. Feeds the lowest-precedence policy sub-source and is
|
|
2371
|
+
* filtered through a restrictive-key allowlist (`allowManaged*Only` locks,
|
|
2372
|
+
* `permissions.deny`/`ask`, sandbox restrictions); non-restrictive keys
|
|
2373
|
+
* such as `model`, `env`, `cleanupPeriodDays` are silently dropped.
|
|
2374
|
+
*/
|
|
2375
|
+
managedSettings?: Settings;
|
|
2376
|
+
/**
|
|
2377
|
+
* Server-managed settings payload (the result of fetching
|
|
2378
|
+
* `/api/claude_code/settings`). Feeds the `'remote'` policy sub-source —
|
|
2379
|
+
* same trust level as the on-disk cache it replaces, so non-restrictive
|
|
2380
|
+
* keys flow through unfiltered. Use this when the embedding host has a
|
|
2381
|
+
* fresher result than the CLI's `~/.claude/remote-settings.json` cache.
|
|
2382
|
+
*/
|
|
2383
|
+
serverManagedSettings?: Settings;
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2267
2386
|
/**
|
|
2268
2387
|
* Result of a rewindFiles operation.
|
|
2269
2388
|
*/
|
|
@@ -3016,7 +3135,7 @@ export declare type SDKMemoryRecallMessage = {
|
|
|
3016
3135
|
session_id: string;
|
|
3017
3136
|
};
|
|
3018
3137
|
|
|
3019
|
-
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKSessionStateChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
|
|
3138
|
+
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKSessionStateChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
|
|
3020
3139
|
|
|
3021
3140
|
/**
|
|
3022
3141
|
* Provenance of a user-role message (peer session, team lead, channel). Absent or `human` means keyboard input from the user.
|
|
@@ -3082,6 +3201,34 @@ export declare type SDKPermissionDenial = {
|
|
|
3082
3201
|
tool_input: Record<string, unknown>;
|
|
3083
3202
|
};
|
|
3084
3203
|
|
|
3204
|
+
/**
|
|
3205
|
+
* Emitted when a tool call is auto-denied without an interactive permission prompt (e.g. auto-mode classifier, dontAsk mode, headless-agent auto-deny, or a deny rule). The 'ask' path surfaces via a can_use_tool control_request; this event covers the 'deny' short-circuit in canUseTool so SDK hosts can render the denial instead of only seeing an is_error tool_result. PreToolUse hook denies bypass canUseTool and are not covered here.
|
|
3206
|
+
*/
|
|
3207
|
+
export declare type SDKPermissionDeniedMessage = {
|
|
3208
|
+
type: 'system';
|
|
3209
|
+
subtype: 'permission_denied';
|
|
3210
|
+
tool_name: string;
|
|
3211
|
+
tool_use_id: string;
|
|
3212
|
+
/**
|
|
3213
|
+
* Subagent ID when the denied tool call originated inside a subagent. Mirrors can_use_tool for host-side routing.
|
|
3214
|
+
*/
|
|
3215
|
+
agent_id?: string;
|
|
3216
|
+
/**
|
|
3217
|
+
* Discriminator from PermissionDecisionReason (e.g. 'classifier', 'asyncAgent', 'mode', 'rule').
|
|
3218
|
+
*/
|
|
3219
|
+
decision_reason_type?: string;
|
|
3220
|
+
/**
|
|
3221
|
+
* Human-readable reason from the deciding component, when available.
|
|
3222
|
+
*/
|
|
3223
|
+
decision_reason?: string;
|
|
3224
|
+
/**
|
|
3225
|
+
* The rejection message returned to the model in the tool_result.
|
|
3226
|
+
*/
|
|
3227
|
+
message: string;
|
|
3228
|
+
uuid: UUID;
|
|
3229
|
+
session_id: string;
|
|
3230
|
+
};
|
|
3231
|
+
|
|
3085
3232
|
/**
|
|
3086
3233
|
* Configuration for loading a plugin.
|
|
3087
3234
|
*/
|
|
@@ -3807,6 +3954,17 @@ export declare interface Settings {
|
|
|
3807
3954
|
* Command to refresh GCP authentication (e.g., gcloud auth application-default login)
|
|
3808
3955
|
*/
|
|
3809
3956
|
gcpAuthRefresh?: string;
|
|
3957
|
+
/**
|
|
3958
|
+
* Executable that computes managed settings at startup. Honored only from admin-controlled policy sources.
|
|
3959
|
+
*/
|
|
3960
|
+
policyHelper?: {
|
|
3961
|
+
/**
|
|
3962
|
+
* Absolute path to the helper executable
|
|
3963
|
+
*/
|
|
3964
|
+
path: string;
|
|
3965
|
+
timeoutMs?: number;
|
|
3966
|
+
refreshIntervalMs?: 0 | number;
|
|
3967
|
+
};
|
|
3810
3968
|
/**
|
|
3811
3969
|
* Custom file suggestion configuration for \@ mentions
|
|
3812
3970
|
*/
|
|
@@ -5199,6 +5357,10 @@ export declare interface Settings {
|
|
|
5199
5357
|
* Prevent claude-cli:// protocol handler registration with the OS
|
|
5200
5358
|
*/
|
|
5201
5359
|
disableDeepLinkRegistration?: 'disable';
|
|
5360
|
+
/**
|
|
5361
|
+
* Default transcript view: chat (SendUserMessage checkpoints only) or transcript (full)
|
|
5362
|
+
*/
|
|
5363
|
+
defaultView?: 'chat' | 'transcript';
|
|
5202
5364
|
[k: string]: unknown;
|
|
5203
5365
|
}
|
|
5204
5366
|
|