@anthropic-ai/claude-agent-sdk 0.3.204 → 0.3.206
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 +85 -84
- package/browser-sdk.js +34 -34
- package/extractFromBunfs.js +2 -2
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +6 -1
- package/sdk.d.ts +70 -7
- package/sdk.mjs +47 -47
package/extractFromBunfs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* oxlint-disable custom-rules/no-sync-fs */
|
|
2
2
|
// Extracts a file from Bun's $bunfs virtual filesystem to a real temp directory
|
|
3
3
|
// so it can be spawned as a subprocess (child processes cannot access $bunfs).
|
|
4
4
|
//
|
|
@@ -28,7 +28,7 @@ function tmpdir() {
|
|
|
28
28
|
return process.env.CLAUDE_CODE_TMPDIR
|
|
29
29
|
}
|
|
30
30
|
if (process.platform === 'darwin') {
|
|
31
|
-
//
|
|
31
|
+
// oxlint-disable-next-line custom-rules/no-hardcoded-tmp -- mirrors tempfile.ts: macOS /tmp works fine; os.tmpdir() below is for Android-on-Linux where /tmp isn't writable.
|
|
32
32
|
return '/tmp'
|
|
33
33
|
}
|
|
34
34
|
return osTmpdir()
|
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-07-
|
|
2
|
+
"version": "2.1.206",
|
|
3
|
+
"commit": "edc8ebf7f852d3abffad32a5bf8e49e439f92afb",
|
|
4
|
+
"buildDate": "2026-07-09T01:48:20Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "3197aba4442dbd5b3df42b6f35e6d7bd03b5e48ce18b7a3c5c6f5f8c28e03b7f",
|
|
9
|
+
"size": 240395024
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "b1e1636917a12c7d4e1fa54cd13f7f76ba3779fb988180610b6ca483258c2f46",
|
|
14
|
+
"size": 248431568
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "cb8ccaf4ae6beb558747227a362010c6b32b4f4a5868c3a7e96aa9972fc6ef58",
|
|
19
|
+
"size": 255376112
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "d131494be407ff56a62f4e99a96ba60102002d01e3b6b1494db16bef4b7f060f",
|
|
24
|
+
"size": 258566968
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "b1920556c3b077694d52397f4e5221df2419ad9b44af641be0f49647b51f87ad",
|
|
29
|
+
"size": 248624312
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "b0d780783401de979024c25f14a2cae665873afbcfe718c090b73e13c4cd08a0",
|
|
34
|
+
"size": 253251968
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "d5072b25b9a20bffb24625d36129a05ed2be4d2eb7e35625aad6aa35596892c2",
|
|
39
|
+
"size": 248682144
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "c17ac3a5a8edf5cfa658e82bd41fcf83170af21538e51cc9d4cbaeefe382aba3",
|
|
44
|
+
"size": 243149984
|
|
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-07-
|
|
2
|
+
"version": "2.1.206",
|
|
3
|
+
"commit": "edc8ebf7f852d3abffad32a5bf8e49e439f92afb",
|
|
4
|
+
"buildDate": "2026-07-09T01:50:10Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "f82b3ad6293ce2c991e63a7e5af05ad7d8b78c6a5f454838b928116ea8506b45",
|
|
9
|
+
"size": 50458380,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "6a7ff1b3d4fc5739a9befc4df3a6419dedab342579f9f9fb4c26a356dddec052",
|
|
12
|
+
"size": 50456788
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "25419961c3d901b18b0d63bb2efe3e68c47629239f9872ac08139f8f7559216e",
|
|
18
|
+
"size": 53474125,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "6cbf6ee82fedf869ccde175ae739ed8740e517a5caad1f2c5a9aa400ec5b0161",
|
|
21
|
+
"size": 53484346
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "a6a1698b6dc9438deab622618756e735f29e22a624bdf5d382e9a9dd835438fd",
|
|
27
|
+
"size": 58141512
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "a224eb404540adc8f3bbd29165ff3c070c1550c1e629e62d7effd6c673d1d79b",
|
|
32
|
+
"size": 59407746
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "ef98d868f5695fbd05fdf3b83f1df52e81a5024022b22fb999a1f3e48d5b3d3b",
|
|
37
|
+
"size": 56828247
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "316fdfb584e22897aea3c6532f93f00f93b86f9af64d2422295a7a93da809758",
|
|
42
|
+
"size": 58218590
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "a5733df130abe206b7ba95d1c1c8bcc40c661a8284b1c11409cc072eb41944bd",
|
|
47
|
+
"size": 59528232
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "e2f74a9b7c5bc2ba9b9650cc654c87b4a71f1df453f99ab427788bd081ba681e",
|
|
52
|
+
"size": 57558450
|
|
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.206",
|
|
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.206",
|
|
61
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.206",
|
|
62
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.206",
|
|
63
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.206",
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.206",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.206",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.206",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.206"
|
|
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.206"
|
|
84
84
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -360,6 +360,7 @@ export type ArtifactOutput =
|
|
|
360
360
|
};
|
|
361
361
|
warnings?: string[];
|
|
362
362
|
contract?: string;
|
|
363
|
+
updated?: boolean;
|
|
363
364
|
}
|
|
364
365
|
| {
|
|
365
366
|
artifacts: {
|
|
@@ -518,7 +519,7 @@ export interface TaskOutputInput {
|
|
|
518
519
|
}
|
|
519
520
|
export interface ExitPlanModeInput {
|
|
520
521
|
/**
|
|
521
|
-
*
|
|
522
|
+
* Deprecated: no longer used.
|
|
522
523
|
*/
|
|
523
524
|
allowedPrompts?: {
|
|
524
525
|
/**
|
|
@@ -3406,6 +3407,10 @@ export interface ScheduleWakeupOutput {
|
|
|
3406
3407
|
* True when the model ended the loop via `stop: true`
|
|
3407
3408
|
*/
|
|
3408
3409
|
stopped?: boolean;
|
|
3410
|
+
/**
|
|
3411
|
+
* How many pending dynamic-loop wakeups stop:true cancelled. 0 means nothing was pending — a recurring /loop cron is not cancelled by stop:true.
|
|
3412
|
+
*/
|
|
3413
|
+
cancelledWakeups?: number;
|
|
3409
3414
|
}
|
|
3410
3415
|
export interface MonitorOutput {
|
|
3411
3416
|
/**
|
package/sdk.d.ts
CHANGED
|
@@ -2235,9 +2235,13 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
2235
2235
|
*/
|
|
2236
2236
|
/**
|
|
2237
2237
|
* Interrupt the current query execution. The query will stop processing
|
|
2238
|
-
* and return control to the caller.
|
|
2238
|
+
* and return control to the caller. On CLIs advertising the
|
|
2239
|
+
* `interrupt_receipt_v1` capability (system/init `capabilities`) the
|
|
2240
|
+
* resolved value is the interrupt receipt — `still_queued` uuids of async
|
|
2241
|
+
* user messages that WILL still run unless cancelled first. Older CLIs
|
|
2242
|
+
* resolve to `undefined`.
|
|
2239
2243
|
*/
|
|
2240
|
-
interrupt(): Promise<
|
|
2244
|
+
interrupt(): Promise<SDKControlInterruptResponse | undefined>;
|
|
2241
2245
|
/**
|
|
2242
2246
|
* Change the permission mode for the current session.
|
|
2243
2247
|
* Only available in streaming input mode.
|
|
@@ -3391,6 +3395,16 @@ declare type SDKControlInterruptRequest = {
|
|
|
3391
3395
|
|
|
3392
3396
|
};
|
|
3393
3397
|
|
|
3398
|
+
/**
|
|
3399
|
+
* Result of an interrupt operation. Advertised by the interrupt_receipt_v1 capability on system/init; older CLIs send an empty success response with no still_queued field.
|
|
3400
|
+
*/
|
|
3401
|
+
export declare type SDKControlInterruptResponse = {
|
|
3402
|
+
/**
|
|
3403
|
+
* 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.
|
|
3404
|
+
*/
|
|
3405
|
+
still_queued: string[];
|
|
3406
|
+
};
|
|
3407
|
+
|
|
3394
3408
|
/**
|
|
3395
3409
|
* Requests the worker's selectable model catalog. Fulfills the caps.modelCatalog capability: in a remote thin-client session the worker's provider, settings cascade, and enforcement policy decide which models the session can run, so the thin client must ask rather than read its own getModelOptions().
|
|
3396
3410
|
*/
|
|
@@ -3399,15 +3413,53 @@ declare type SDKControlListModelsRequest = {
|
|
|
3399
3413
|
};
|
|
3400
3414
|
|
|
3401
3415
|
/**
|
|
3402
|
-
* Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call.
|
|
3416
|
+
* Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
|
|
3403
3417
|
*/
|
|
3404
3418
|
declare type SDKControlMcpCallRequest = {
|
|
3405
3419
|
subtype: 'mcp_call';
|
|
3406
3420
|
/**
|
|
3407
|
-
* Fully-qualified MCP tool name, e.g. mcp__server__tool_name.
|
|
3421
|
+
* Fully-qualified MCP tool name, e.g. mcp__server__tool_name. Plugin-hosted servers are ordinary MCP servers here — e.g. mcp__plugin_documents_docs__doc_export (server names are normalized: non-[a-zA-Z0-9_-] becomes _).
|
|
3408
3422
|
*/
|
|
3409
3423
|
tool: string;
|
|
3424
|
+
/**
|
|
3425
|
+
* Tool arguments. When input_files/output_files are declared, any string VALUE that exactly equals "{{in:NAME}}" or "{{out:NAME}}" (whole string, not a substring) is replaced with the worker-chosen absolute path of that named staged file before the call; a token naming no declared file fails the request with staging error_code=tool_error, and every declared output's "{{out:NAME}}" token must appear in arguments (the substituted path is the only way the tool learns where to write, so an unreferenced output fails the request before the tool runs). With no files declared — including expires_at/timeout_ms-only staged calls — passed through unchanged.
|
|
3426
|
+
*/
|
|
3410
3427
|
arguments?: Record<string, unknown>;
|
|
3428
|
+
/**
|
|
3429
|
+
* RFC3339 deadline, REQUIRED when output_files are declared (a stale buffered drain must not overwrite rows written since). Sending expires_at routes the call through the staging engine, same as timeout_ms — the response gains a staging result. UNDELIVERED requests buffer durably and drain after reattach; a drain past this instant is dropped with staging error_code=expired instead of executing stale. Once delivered to a live worker the request is acked immediately and never redelivered — a worker killed mid-run surfaces as a missing response (apply your own deadline), not a later drain. An unparseable value is treated as already expired (fail closed).
|
|
3430
|
+
*/
|
|
3431
|
+
expires_at?: string;
|
|
3432
|
+
/**
|
|
3433
|
+
* Tool-execution timeout (staging and collection have their own transport timeouts). Clamped to [1000, 600000]; default 120000. Sending timeout_ms routes the call through the staging engine — so it is always enforced when present and the response carries a staging result; omit it for a plain call. Staged calls are POSIX-worker-only: on a Windows worker any staged-field call fails with a typed staging refusal.
|
|
3434
|
+
*/
|
|
3435
|
+
timeout_ms?: number;
|
|
3436
|
+
/**
|
|
3437
|
+
* Declaring input_files or output_files makes this a STAGED call: rows are fetched from the synced-file lane into a private per-request temp dir the WORKER chooses (random, per-UID — the caller never sees or computes paths; it references files via tokens in arguments), the tool runs, and declared outputs are written back as lane rows (durable-at-ack PUT). The response then carries a `staging` result the caller switches on.
|
|
3438
|
+
*/
|
|
3439
|
+
input_files?: {
|
|
3440
|
+
/**
|
|
3441
|
+
* Handle referenced from arguments as "{{in:NAME}}". Unique within the request.
|
|
3442
|
+
*/
|
|
3443
|
+
name: string;
|
|
3444
|
+
/**
|
|
3445
|
+
* Synced-file lane row to stage, e.g. /working/.cowork/originals/a.docx. A missing row fails with staging error_code=input_missing; the etag actually staged is echoed back in staging.inputs_used.
|
|
3446
|
+
*/
|
|
3447
|
+
lane_path: string;
|
|
3448
|
+
}[];
|
|
3449
|
+
output_files?: {
|
|
3450
|
+
/**
|
|
3451
|
+
* Handle referenced from arguments as "{{out:NAME}}" — the tool is told (via the substituted path) where to write; the worker collects from exactly that path. Unique within the request.
|
|
3452
|
+
*/
|
|
3453
|
+
name: string;
|
|
3454
|
+
/**
|
|
3455
|
+
* Synced-file lane row to write, e.g. /working/report.cd. Unique within the request (two outputs on one row would self-conflict under CAS). Outputs over the 25 MiB lane cap fail with staging error_code=output_too_large.
|
|
3456
|
+
*/
|
|
3457
|
+
lane_path: string;
|
|
3458
|
+
/**
|
|
3459
|
+
* Opaque lane etag the output row must still carry for the write to land (CAS). Omitted = unconditional last-writer-wins (an empty string is rejected, not treated as unconditional). A row that moved since fails that output with staging error_code=output_conflict and the requested bytes are not written. Redelivery of a completed CAS write re-runs and conflicts with its own prior write — treat output_conflict on a retry as possible-prior-success and reconcile by etag.
|
|
3460
|
+
*/
|
|
3461
|
+
if_match?: string;
|
|
3462
|
+
}[];
|
|
3411
3463
|
};
|
|
3412
3464
|
|
|
3413
3465
|
/**
|
|
@@ -3866,12 +3918,19 @@ export declare type SDKMessageOrigin = {
|
|
|
3866
3918
|
} | {
|
|
3867
3919
|
kind: 'peer';
|
|
3868
3920
|
from: string;
|
|
3921
|
+
/**
|
|
3922
|
+
* Sender display name, normalized by the harness: Unicode control, format, surrogate, and line/paragraph-separator code points stripped (categories Cc/Cf/Cs/Zl/Zp — covers bidi controls, zero-width characters, and tag characters), trimmed, at most 64 code points (+ ellipsis, never splitting a surrogate pair). Sender-asserted display text (the addressable identity is `from`) — render it as reported speech, but no client-side character sanitization is needed. Absent when the wire is not exactly one harness-formed envelope and on messages from older senders.
|
|
3923
|
+
*/
|
|
3869
3924
|
name?: string;
|
|
3870
3925
|
|
|
3871
3926
|
/**
|
|
3872
3927
|
* Task id of the in-process background subagent that sent this message, stamped by the harness from the sending loop (never from tool input). Absent for cross-session peers.
|
|
3873
3928
|
*/
|
|
3874
3929
|
senderTaskId?: string;
|
|
3930
|
+
/**
|
|
3931
|
+
* Decoded message body with the peer envelope stripped — byte-exact with what the model sees. Present only when the turn is exactly one harness-formed envelope (or an in-process agent message); render this instead of re-parsing the message text.
|
|
3932
|
+
*/
|
|
3933
|
+
body?: string;
|
|
3875
3934
|
} | {
|
|
3876
3935
|
kind: 'task-notification';
|
|
3877
3936
|
} | {
|
|
@@ -3935,7 +3994,7 @@ export declare type SDKModelRefusalFallbackMessage = {
|
|
|
3935
3994
|
};
|
|
3936
3995
|
|
|
3937
3996
|
/**
|
|
3938
|
-
* Emitted when the model ends the stream with stop_reason "refusal" and no fallback model is configured,
|
|
3997
|
+
* Emitted when the model ends the stream with stop_reason "refusal" and no retry runs: no fallback model is configured, or per-category routing declined the retry (the refusal category has no fallback map entry). The structured counterpart to detecting stop_reason "refusal" on the assistant error frame. Not emitted when the retry ran or the user declined the retry dialog (model_refusal_fallback covers the retry case). Absent from older CLIs.
|
|
3939
3998
|
*/
|
|
3940
3999
|
export declare type SDKModelRefusalNoFallbackMessage = {
|
|
3941
4000
|
type: 'system';
|
|
@@ -4251,6 +4310,10 @@ export declare type SDKSystemMessage = {
|
|
|
4251
4310
|
|
|
4252
4311
|
|
|
4253
4312
|
fast_mode_state?: FastModeState;
|
|
4313
|
+
/**
|
|
4314
|
+
* 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.
|
|
4315
|
+
*/
|
|
4316
|
+
capabilities?: string[];
|
|
4254
4317
|
|
|
4255
4318
|
|
|
4256
4319
|
|
|
@@ -6640,9 +6703,9 @@ export declare type TeammateIdleHookInput = BaseHookInput & {
|
|
|
6640
6703
|
};
|
|
6641
6704
|
|
|
6642
6705
|
/**
|
|
6643
|
-
* Why the query loop terminated. Unset when the loop was bypassed (local slash command)
|
|
6706
|
+
* Why the query loop terminated. Unset when the loop was bypassed (local slash command).
|
|
6644
6707
|
*/
|
|
6645
|
-
export declare type TerminalReason = 'blocking_limit' | 'rapid_refill_breaker' | 'prompt_too_long' | 'image_error' | 'model_error' | 'aborted_streaming' | 'aborted_tools' | 'stop_hook_prevented' | 'hook_stopped' | 'tool_deferred' | 'max_turns' | 'background_requested' | 'completed';
|
|
6708
|
+
export declare type TerminalReason = 'blocking_limit' | 'rapid_refill_breaker' | 'prompt_too_long' | 'image_error' | 'model_error' | 'api_error' | 'malformed_tool_use_exhausted' | 'aborted_streaming' | 'aborted_tools' | 'stop_hook_prevented' | 'hook_stopped' | 'tool_deferred' | 'max_turns' | 'background_requested' | 'completed' | 'budget_exhausted' | 'structured_output_retry_exhausted' | 'tool_deferred_unavailable' | 'turn_setup_failed';
|
|
6646
6709
|
|
|
6647
6710
|
/**
|
|
6648
6711
|
* Claude decides when and how much to think (Opus 4.6+).
|