@anthropic-ai/claude-agent-sdk 0.3.144 → 0.3.146
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 +85 -85
- package/bridge.mjs +75 -75
- package/browser-sdk.js +5 -5
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +5 -1
- package/sdk.d.ts +101 -2
- package/sdk.mjs +46 -46
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-05-
|
|
2
|
+
"version": "2.1.146",
|
|
3
|
+
"commit": "c900a8c71aa966a1a8bf14c49139d87fac9ae881",
|
|
4
|
+
"buildDate": "2026-05-20T01:57:57Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "b16f466a2213a04cecf1ad958201655148a49f42952134e6ae182257ccfc08f3",
|
|
9
|
+
"size": 211056288
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "6bc14f45e28ea6c8c34220c88327bb72a38c5f978b9aa44d0cb34375cbf78837",
|
|
14
|
+
"size": 213570448
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "af25334c7a2632a531b34e3f4c0d69763b997149d31d5f0d748e44813758806f",
|
|
19
|
+
"size": 236435080
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "825d5301380f1f5f466c5268de25a062927be658938fc1d630cfa02c521b8185",
|
|
24
|
+
"size": 236512976
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "256703637576ef323b8f87695b81e65a7bdc66327f1512dacc9257b7896e7a0f",
|
|
29
|
+
"size": 229289816
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "e8ab94b1ffb9d9213134d4addfe5d3fe6fd10c524aa2927667e543ac165a7242",
|
|
34
|
+
"size": 230906928
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "b585bbaf085554757b627e5ed87aa5c153abb90ef408fb43b0311453b72e8bc2",
|
|
39
|
+
"size": 232326816
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "159488363d937bbac11c55364246513f677e94e681d7431e1622336250091c00",
|
|
44
|
+
"size": 228292256
|
|
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.146",
|
|
3
|
+
"commit": "c900a8c71aa966a1a8bf14c49139d87fac9ae881",
|
|
4
|
+
"buildDate": "2026-05-20T02:05:27Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "36a21463866a850a146ea03a506123424d9ea6a5b8f105b83993466e6c626d98",
|
|
9
|
+
"size": 43693790,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "d388a11849a8f2576733c572ce55bd4fea25d465b36af4efd85f3e510121d87c",
|
|
12
|
+
"size": 43694485
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "d50073947f829a3d1cb7a21efff4f035bd6938852ac7b8c30c4aeacac8830329",
|
|
18
|
+
"size": 45615774,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "29c340be5c3255da0cf0f1af126c461a51251d0d6defce7e764ecc5fdb0d884d",
|
|
21
|
+
"size": 45619469
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "84bd9dd9e85cacaec55dcfd28ec49e05131c3cc0244d906804559cb73cb731e6",
|
|
27
|
+
"size": 51446658
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "8c6c61ca6fc7fafb4936de6a40815bf5d440ddedb477800510f2a2cf7a1595dc",
|
|
32
|
+
"size": 52071854
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "ecd65f1abe5a6b889f81f9e28a572d3e7186dac90ce9fb1deaf8cc97bb33e5a4",
|
|
37
|
+
"size": 50095507
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "23a02176f38c45ce93440ee4aea6009d614fb7020ce98bb95fe034c1c0d27701",
|
|
42
|
+
"size": 50779496
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "5d0cf87f8a331f98397f8a5608e77d5e453ae02c8ee4f6774d91a0755f9e7570",
|
|
47
|
+
"size": 52800733
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "efebea1875409013c62dfe783d6c24590ca7944e69ff33f08ad9a3e169bdddcd",
|
|
52
|
+
"size": 51081079
|
|
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.146",
|
|
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.146",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.146",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.146",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.146",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.146",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.146",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.146",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.146"
|
|
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.146"
|
|
90
90
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -143,6 +143,10 @@ export type FileReadOutput =
|
|
|
143
143
|
* Total number of lines in the file
|
|
144
144
|
*/
|
|
145
145
|
totalLines: number;
|
|
146
|
+
/**
|
|
147
|
+
* True when a whole-file read was auto-paginated because it exceeded the token cap (the content is a partial first page). A programmatic signal for internal consumers; survives output reconstruction (unlike the render-time banner).
|
|
148
|
+
*/
|
|
149
|
+
truncatedByTokenCap?: boolean;
|
|
146
150
|
};
|
|
147
151
|
}
|
|
148
152
|
| {
|
|
@@ -310,7 +314,7 @@ export interface AgentInput {
|
|
|
310
314
|
/**
|
|
311
315
|
* Permission mode for spawned teammate (e.g., "plan" to require plan approval).
|
|
312
316
|
*/
|
|
313
|
-
mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan";
|
|
317
|
+
mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan" | "bubble";
|
|
314
318
|
/**
|
|
315
319
|
* Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.
|
|
316
320
|
*/
|
package/sdk.d.ts
CHANGED
|
@@ -120,6 +120,39 @@ export declare type AsyncHookJSONOutput = {
|
|
|
120
120
|
asyncTimeout?: number;
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
+
export declare type BackgroundTaskSummary = {
|
|
124
|
+
id: string;
|
|
125
|
+
/**
|
|
126
|
+
* Friendly task-type label (e.g. 'shell', 'subagent', 'monitor', 'workflow'). Falls back to the raw discriminant for unknown types.
|
|
127
|
+
*/
|
|
128
|
+
type: string;
|
|
129
|
+
status: string;
|
|
130
|
+
/**
|
|
131
|
+
* Free-text description. Capped at 1000 chars; clipped values append an in-string "… [+N chars]" marker.
|
|
132
|
+
*/
|
|
133
|
+
description: string;
|
|
134
|
+
/**
|
|
135
|
+
* Shell command line. Only present for 'shell' tasks. Capped at 1000 chars with the same "… [+N chars]" marker.
|
|
136
|
+
*/
|
|
137
|
+
command?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Subagent type name. Only present for 'subagent' tasks.
|
|
140
|
+
*/
|
|
141
|
+
agent_type?: string;
|
|
142
|
+
/**
|
|
143
|
+
* MCP server name. Only present for 'monitor' / 'MCP task' tasks.
|
|
144
|
+
*/
|
|
145
|
+
server?: string;
|
|
146
|
+
/**
|
|
147
|
+
* MCP tool name. Only present for 'monitor' / 'MCP task' tasks.
|
|
148
|
+
*/
|
|
149
|
+
tool?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Workflow name. Only present for 'workflow' tasks.
|
|
152
|
+
*/
|
|
153
|
+
name?: string;
|
|
154
|
+
};
|
|
155
|
+
|
|
123
156
|
export declare type BaseHookInput = {
|
|
124
157
|
session_id: string;
|
|
125
158
|
transcript_path: string;
|
|
@@ -286,6 +319,7 @@ declare namespace coreTypes {
|
|
|
286
319
|
AgentMcpServerSpec,
|
|
287
320
|
ApiKeySource,
|
|
288
321
|
AsyncHookJSONOutput,
|
|
322
|
+
BackgroundTaskSummary,
|
|
289
323
|
BaseHookInput,
|
|
290
324
|
BaseOutputFormat,
|
|
291
325
|
ConfigChangeHookInput,
|
|
@@ -388,6 +422,7 @@ declare namespace coreTypes {
|
|
|
388
422
|
SDKUserMessage,
|
|
389
423
|
SdkBeta,
|
|
390
424
|
SdkPluginConfig,
|
|
425
|
+
SessionCronSummary,
|
|
391
426
|
SessionEndHookInput,
|
|
392
427
|
SessionStartHookInput,
|
|
393
428
|
SessionStartHookSpecificOutput,
|
|
@@ -430,6 +465,13 @@ export declare function createSdkMcpServer(_options: CreateSdkMcpServerOptions):
|
|
|
430
465
|
declare type CreateSdkMcpServerOptions = {
|
|
431
466
|
name: string;
|
|
432
467
|
version?: string;
|
|
468
|
+
/**
|
|
469
|
+
* Server instructions returned from `initialize` and surfaced to the model
|
|
470
|
+
* as an MCP instructions block. When proxying a real MCP server through the
|
|
471
|
+
* SDK transport, pass the underlying server's `getInstructions()` here so
|
|
472
|
+
* it isn't dropped.
|
|
473
|
+
*/
|
|
474
|
+
instructions?: string;
|
|
433
475
|
tools?: Array<SdkMcpToolDefinition<any>>;
|
|
434
476
|
/**
|
|
435
477
|
* When true, all tools from this server are always included in the prompt
|
|
@@ -1563,6 +1605,7 @@ export declare type Options = {
|
|
|
1563
1605
|
|
|
1564
1606
|
|
|
1565
1607
|
|
|
1608
|
+
|
|
1566
1609
|
/**
|
|
1567
1610
|
* Enable prompt suggestions. When true, the agent emits a `prompt_suggestion`
|
|
1568
1611
|
* message after each turn with a predicted next user prompt.
|
|
@@ -1828,6 +1871,9 @@ export declare type Options = {
|
|
|
1828
1871
|
* spawnClaudeCodeProcess: (options) => {
|
|
1829
1872
|
* // Custom spawn logic for VM execution
|
|
1830
1873
|
* // options contains: command, args, cwd, env, signal
|
|
1874
|
+
* // `signal` is forwarded — it aborts only AFTER the SDK's
|
|
1875
|
+
* // stdin-EOF + ~2 s grace window, so passing it to spawn()/your
|
|
1876
|
+
* // VM API is safe (force-kill fires after the graceful chance).
|
|
1831
1877
|
* return myVMProcess; // Must satisfy SpawnedProcess interface
|
|
1832
1878
|
* }
|
|
1833
1879
|
* ```
|
|
@@ -2939,7 +2985,7 @@ export declare type SDKControlRequest = {
|
|
|
2939
2985
|
request: SDKControlRequestInner;
|
|
2940
2986
|
};
|
|
2941
2987
|
|
|
2942
|
-
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlUltrareviewLaunchRequest | SDKControlMessageRatedRequest | SDKControlOAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlSubmitFeedbackRequest;
|
|
2988
|
+
declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlReloadPluginsRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlChannelEnableRequest | SDKControlEndSessionRequest | SDKControlMcpAuthenticateRequest | SDKControlMcpClearAuthRequest | SDKControlMcpOAuthCallbackUrlRequest | SDKControlClaudeAuthenticateRequest | SDKControlClaudeOAuthCallbackRequest | SDKControlClaudeOAuthWaitForCompletionRequest | SDKControlRemoteControlRequest | SDKControlGenerateSessionTitleRequest | SDKControlSideQuestionRequest | SDKControlUltrareviewLaunchRequest | SDKControlMessageRatedRequest | SDKControlOAuthTokenRefreshRequest | SDKControlHostAuthTokenRefreshRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlSubmitFeedbackRequest;
|
|
2943
2989
|
|
|
2944
2990
|
/**
|
|
2945
2991
|
* Requests the SDK consumer to render a tool-driven blocking dialog and return the user choice. Used by tools that previously rendered Ink JSX via setToolJSX with an onDone callback.
|
|
@@ -3654,6 +3700,22 @@ export declare type SDKUserMessageReplay = {
|
|
|
3654
3700
|
file_attachments?: unknown[];
|
|
3655
3701
|
};
|
|
3656
3702
|
|
|
3703
|
+
export declare type SessionCronSummary = {
|
|
3704
|
+
id: string;
|
|
3705
|
+
/**
|
|
3706
|
+
* Cron expression, e.g. "0 9 * * 1-5".
|
|
3707
|
+
*/
|
|
3708
|
+
schedule: string;
|
|
3709
|
+
/**
|
|
3710
|
+
* False for one-shot wakeups whose cron field encodes a single fire time; true for tasks that re-fire on every match.
|
|
3711
|
+
*/
|
|
3712
|
+
recurring: boolean;
|
|
3713
|
+
/**
|
|
3714
|
+
* Prompt text submitted when the cron fires. Capped at 1000 chars; clipped values append an in-string "… [+N chars]" marker.
|
|
3715
|
+
*/
|
|
3716
|
+
prompt: string;
|
|
3717
|
+
};
|
|
3718
|
+
|
|
3657
3719
|
export declare type SessionEndHookInput = BaseHookInput & {
|
|
3658
3720
|
hook_event_name: 'SessionEnd';
|
|
3659
3721
|
reason: ExitReason;
|
|
@@ -5439,7 +5501,28 @@ export declare interface SpawnOptions {
|
|
|
5439
5501
|
env: {
|
|
5440
5502
|
[envVar: string]: string | undefined;
|
|
5441
5503
|
};
|
|
5442
|
-
/**
|
|
5504
|
+
/**
|
|
5505
|
+
* Abort signal for cancellation.
|
|
5506
|
+
*
|
|
5507
|
+
* This is a **forwarded** signal owned by `ProcessTransport`, not the
|
|
5508
|
+
* caller's `Options.abortController.signal` directly. It aborts only
|
|
5509
|
+
* after the SDK's graceful-close path has run: stdin EOF →
|
|
5510
|
+
* `GRACEFUL_EXIT_TIMEOUT_MS` (~2 s) grace window. Anything you hang on
|
|
5511
|
+
* it (Node `spawn({signal})` → `child.kill()`, VM/container teardown,
|
|
5512
|
+
* fetch cancellation) fires **after** the child has had a chance to
|
|
5513
|
+
* shut down cleanly via stdin close.
|
|
5514
|
+
*
|
|
5515
|
+
* Why: passing the caller's raw signal to Node `spawn()` registers
|
|
5516
|
+
* Node's own abort listener that calls `child.kill()` — on Windows
|
|
5517
|
+
* that's `TerminateProcess` (instant, uncatchable), and AbortSignal
|
|
5518
|
+
* listeners fire synchronously in registration order, so it would race
|
|
5519
|
+
* ahead of the SDK's stdin-EOF + grace path and the CLI's
|
|
5520
|
+
* `gracefulShutdown` would never run.
|
|
5521
|
+
*
|
|
5522
|
+
* If you need the caller's *immediate* signal (no grace), it's the
|
|
5523
|
+
* `AbortController` you passed to `Options.abortController` — capture
|
|
5524
|
+
* it in closure.
|
|
5525
|
+
*/
|
|
5443
5526
|
signal: AbortSignal;
|
|
5444
5527
|
}
|
|
5445
5528
|
|
|
@@ -5468,6 +5551,14 @@ export declare type StopHookInput = BaseHookInput & {
|
|
|
5468
5551
|
* Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
|
|
5469
5552
|
*/
|
|
5470
5553
|
last_assistant_message?: string;
|
|
5554
|
+
/**
|
|
5555
|
+
* In-flight background work (running/pending + backgrounded) registered in this session. Lets hooks distinguish "session is done" from "session is paused waiting for background work to wake it". Empty array when nothing is in flight.
|
|
5556
|
+
*/
|
|
5557
|
+
background_tasks?: BackgroundTaskSummary[];
|
|
5558
|
+
/**
|
|
5559
|
+
* Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled.
|
|
5560
|
+
*/
|
|
5561
|
+
session_crons?: SessionCronSummary[];
|
|
5471
5562
|
|
|
5472
5563
|
|
|
5473
5564
|
};
|
|
@@ -5493,6 +5584,14 @@ export declare type SubagentStopHookInput = BaseHookInput & {
|
|
|
5493
5584
|
* Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
|
|
5494
5585
|
*/
|
|
5495
5586
|
last_assistant_message?: string;
|
|
5587
|
+
/**
|
|
5588
|
+
* In-flight background work (running/pending + backgrounded) registered in this session. Lets hooks distinguish "session is done" from "session is paused waiting for background work to wake it". Empty array when nothing is in flight.
|
|
5589
|
+
*/
|
|
5590
|
+
background_tasks?: BackgroundTaskSummary[];
|
|
5591
|
+
/**
|
|
5592
|
+
* Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled.
|
|
5593
|
+
*/
|
|
5594
|
+
session_crons?: SessionCronSummary[];
|
|
5496
5595
|
|
|
5497
5596
|
|
|
5498
5597
|
};
|