@anthropic-ai/claude-agent-sdk 0.3.147 → 0.3.149
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 +80 -80
- package/bridge.mjs +67 -67
- package/browser-sdk.js +29 -29
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +277 -1
- package/sdk.d.ts +14 -3
- 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.149",
|
|
3
|
+
"commit": "6c2dbc3fdfb7e88180d4729eeedd40244aa540cf",
|
|
4
|
+
"buildDate": "2026-05-22T15:35:21Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "659d1a65cfd439bb43708fd1cfbe8346b59370a27f7f60f789e05f4604dee9a5",
|
|
9
|
+
"size": 213070752
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "666a20a19d0119ced88dd386c3503700ee14f508c7ce3b0047277256a420226d",
|
|
14
|
+
"size": 215584912
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "ab11cb6a2c43ef2dd1e68244b2dd470af07de163419a8b073a9b0e157ef64fc3",
|
|
19
|
+
"size": 238401160
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "2959c02a605a616fb39cfa23e2f76356b254699dfdd5e5e838fcfb0414e48984",
|
|
24
|
+
"size": 238524112
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "31201feb4f2956d4482f9d85e9497ba042f3a0dd89a5e57bbd6955d198c519be",
|
|
29
|
+
"size": 231255896
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "784e833811198887ac55d508379748f1ca60f387523cf2f3c8f0c9f07a9b83ee",
|
|
34
|
+
"size": 232918064
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "7e6192bc6a5c421556dcfa40f108cf9401b8860b3f671bd6cadad8ae3dd2d3ca",
|
|
39
|
+
"size": 234249376
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "6a59576f6f42714e81ce49b609d02056cc9a4e3c7457d4a1ad70bba1619025bf",
|
|
44
|
+
"size": 230213792
|
|
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.149",
|
|
3
|
+
"commit": "6c2dbc3fdfb7e88180d4729eeedd40244aa540cf",
|
|
4
|
+
"buildDate": "2026-05-22T15:42:52Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "ebfc2dfcc885e79ab4e6a15fd981d7c488393f3cc5ff3aa4b4d00c44026daa39",
|
|
9
|
+
"size": 43968862,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "a98fa9db037f7cf82b1d189e36340010a6460d1794bde236bf2ce750c146fa91",
|
|
12
|
+
"size": 43971827
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "f18c8d22e048521409d58e28ae3afb0d884d13129af6b6a972a81b18796940df",
|
|
18
|
+
"size": 45880939,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "311e18f6c43c30feb387aa84b91c55ef4b8d546126a507f37239254dba85efdb",
|
|
21
|
+
"size": 45889328
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "96038122e29d59fa3de470793d5650f4974018d602b7ea2f203ad74c70497af4",
|
|
27
|
+
"size": 51705747
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "a0bf9fe661c31f883191ffc9766daf665a824c2171e2374df569bdd1a87a20cf",
|
|
32
|
+
"size": 52311840
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "76199b801b78de74098b31c15e8f17e2430f79401f97f46a40ede8bf96886e49",
|
|
37
|
+
"size": 50322050
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "97c5f5b8f72e7aa3bd29f42c649e0b2626f5ae4fd0914d3cd033f8a19b0b0c4f",
|
|
42
|
+
"size": 51008664
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "eec034178ebb2d23983b6f09acf64ba097c79b3b4111ee30867d5a1647df0cd5",
|
|
47
|
+
"size": 53048610
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "9630098e077f59a37fd6ce7a376b7401cdffc43028b5ccab33335567e9ddc06d",
|
|
52
|
+
"size": 51332335
|
|
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.149",
|
|
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.149",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.149",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.149",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.149",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.149",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.149",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.149",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.149"
|
|
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.149"
|
|
90
90
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -27,10 +27,20 @@ export type ToolInputSchemas =
|
|
|
27
27
|
| WebFetchInput
|
|
28
28
|
| WebSearchInput
|
|
29
29
|
| AskUserQuestionInput
|
|
30
|
+
| EnterPlanModeInput
|
|
30
31
|
| TaskCreateInput
|
|
31
32
|
| TaskGetInput
|
|
32
33
|
| TaskUpdateInput
|
|
33
34
|
| TaskListInput
|
|
35
|
+
| REPLInput
|
|
36
|
+
| WorkflowInput
|
|
37
|
+
| CronCreateInput
|
|
38
|
+
| CronDeleteInput
|
|
39
|
+
| CronListInput
|
|
40
|
+
| ScheduleWakeupInput
|
|
41
|
+
| RemoteTriggerInput
|
|
42
|
+
| MonitorInput
|
|
43
|
+
| PushNotificationInput
|
|
34
44
|
| EnterWorktreeInput
|
|
35
45
|
| ExitWorktreeInput
|
|
36
46
|
| ToolOutputSchemas;
|
|
@@ -57,7 +67,17 @@ export type ToolOutputSchemas =
|
|
|
57
67
|
| TaskCreateOutput
|
|
58
68
|
| TaskGetOutput
|
|
59
69
|
| TaskUpdateOutput
|
|
60
|
-
| TaskListOutput
|
|
70
|
+
| TaskListOutput
|
|
71
|
+
| RemoteTriggerOutput
|
|
72
|
+
| ScheduleWakeupOutput
|
|
73
|
+
| MonitorOutput
|
|
74
|
+
| EnterPlanModeOutput
|
|
75
|
+
| REPLOutput
|
|
76
|
+
| WorkflowOutput
|
|
77
|
+
| CronCreateOutput
|
|
78
|
+
| CronDeleteOutput
|
|
79
|
+
| CronListOutput
|
|
80
|
+
| PushNotificationOutput;
|
|
61
81
|
export type AgentOutput =
|
|
62
82
|
| {
|
|
63
83
|
agentId: string;
|
|
@@ -2162,6 +2182,7 @@ export interface AskUserQuestionInput {
|
|
|
2162
2182
|
source?: string;
|
|
2163
2183
|
};
|
|
2164
2184
|
}
|
|
2185
|
+
export interface EnterPlanModeInput {}
|
|
2165
2186
|
export interface TaskCreateInput {
|
|
2166
2187
|
/**
|
|
2167
2188
|
* A brief title for the task
|
|
@@ -2229,6 +2250,121 @@ export interface TaskUpdateInput {
|
|
|
2229
2250
|
};
|
|
2230
2251
|
}
|
|
2231
2252
|
export interface TaskListInput {}
|
|
2253
|
+
export interface REPLInput {
|
|
2254
|
+
/**
|
|
2255
|
+
* JavaScript code to execute. Supports top-level await. State persists across calls.
|
|
2256
|
+
*/
|
|
2257
|
+
code: string;
|
|
2258
|
+
/**
|
|
2259
|
+
* Clear, concise description of what this script does in active voice (5-10 words). E.g. "Trace upgrade message to its GrowthBook flag"
|
|
2260
|
+
*/
|
|
2261
|
+
description?: string;
|
|
2262
|
+
/**
|
|
2263
|
+
* Optional timeout in milliseconds (default 30000, max 600000)
|
|
2264
|
+
*/
|
|
2265
|
+
timeout?: number;
|
|
2266
|
+
}
|
|
2267
|
+
export interface WorkflowInput {
|
|
2268
|
+
/**
|
|
2269
|
+
* Self-contained workflow script. Must begin with `export const meta = { name, description, phases }` (pure literal, no computed values) followed by the script body using agent()/parallel()/pipeline()/phase().
|
|
2270
|
+
*/
|
|
2271
|
+
script?: string;
|
|
2272
|
+
/**
|
|
2273
|
+
* Name of a predefined workflow (built-in or from .claude/workflows/). Resolves to a self-contained script.
|
|
2274
|
+
*/
|
|
2275
|
+
name?: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* Optional input value exposed to the script as the global `args`. Use for parameterized named workflows (e.g. a research question).
|
|
2278
|
+
*/
|
|
2279
|
+
args?: {
|
|
2280
|
+
[k: string]: unknown;
|
|
2281
|
+
};
|
|
2282
|
+
/**
|
|
2283
|
+
* Path to a workflow script file on disk. Every Workflow invocation persists its script under the session directory and returns the path in the tool result. To iterate, edit that file with Write/Edit and re-invoke Workflow with the same `scriptPath` instead of re-sending the full script. Takes precedence over `script` and `name`.
|
|
2284
|
+
*/
|
|
2285
|
+
scriptPath?: string;
|
|
2286
|
+
/**
|
|
2287
|
+
* Run ID of a prior Workflow invocation to resume from. Completed agent() calls with unchanged (prompt, opts) return their cached results instantly; only edited or new calls re-run. Same-session only. Stop the prior run first (TaskStop) before resuming.
|
|
2288
|
+
*/
|
|
2289
|
+
resumeFromRunId?: string;
|
|
2290
|
+
}
|
|
2291
|
+
export interface CronCreateInput {
|
|
2292
|
+
/**
|
|
2293
|
+
* Standard 5-field cron expression in local time: "M H DoM Mon DoW" (e.g. "* /5 * * * *" = every 5 minutes, "30 14 28 2 *" = Feb 28 at 2:30pm local once).
|
|
2294
|
+
*/
|
|
2295
|
+
cron: string;
|
|
2296
|
+
/**
|
|
2297
|
+
* The prompt to enqueue at each fire time.
|
|
2298
|
+
*/
|
|
2299
|
+
prompt: string;
|
|
2300
|
+
/**
|
|
2301
|
+
* true (default) = fire on every cron match until deleted or auto-expired after 7 days. false = fire once at the next match, then auto-delete. Use false for "remind me at X" one-shot requests with pinned minute/hour/dom/month.
|
|
2302
|
+
*/
|
|
2303
|
+
recurring?: boolean;
|
|
2304
|
+
/**
|
|
2305
|
+
* true = persist to .claude/scheduled_tasks.json and survive restarts. false (default) = in-memory only, dies when this Claude session ends. Use true only when the user asks the task to survive across sessions.
|
|
2306
|
+
*/
|
|
2307
|
+
durable?: boolean;
|
|
2308
|
+
}
|
|
2309
|
+
export interface CronDeleteInput {
|
|
2310
|
+
/**
|
|
2311
|
+
* Job ID returned by CronCreate.
|
|
2312
|
+
*/
|
|
2313
|
+
id: string;
|
|
2314
|
+
}
|
|
2315
|
+
export interface CronListInput {}
|
|
2316
|
+
export interface ScheduleWakeupInput {
|
|
2317
|
+
/**
|
|
2318
|
+
* Seconds from now to wake up. Clamped to [60, 3600] by the runtime.
|
|
2319
|
+
*/
|
|
2320
|
+
delaySeconds: number;
|
|
2321
|
+
/**
|
|
2322
|
+
* One short sentence explaining the chosen delay. Goes to telemetry and is shown to the user. Be specific.
|
|
2323
|
+
*/
|
|
2324
|
+
reason: string;
|
|
2325
|
+
/**
|
|
2326
|
+
* The /loop input to fire on wake-up. Pass the same /loop input verbatim each turn so the next firing re-enters the skill and continues the loop. For autonomous /loop (no user prompt), pass the literal sentinel `<<autonomous-loop-dynamic>>` instead (the dynamic-pacing variant, not the CronCreate-mode `<<autonomous-loop>>`).
|
|
2327
|
+
*/
|
|
2328
|
+
prompt: string;
|
|
2329
|
+
}
|
|
2330
|
+
export interface RemoteTriggerInput {
|
|
2331
|
+
action: "list" | "get" | "create" | "update" | "run";
|
|
2332
|
+
/**
|
|
2333
|
+
* Required for get, update, and run
|
|
2334
|
+
*/
|
|
2335
|
+
trigger_id?: string;
|
|
2336
|
+
/**
|
|
2337
|
+
* Required for create and update; optional for run
|
|
2338
|
+
*/
|
|
2339
|
+
body?: {
|
|
2340
|
+
[k: string]: unknown;
|
|
2341
|
+
};
|
|
2342
|
+
}
|
|
2343
|
+
export interface MonitorInput {
|
|
2344
|
+
/**
|
|
2345
|
+
* Short human-readable description of what you are monitoring (shown in notifications).
|
|
2346
|
+
*/
|
|
2347
|
+
description: string;
|
|
2348
|
+
/**
|
|
2349
|
+
* Kill the monitor after this deadline. Default 300000ms, max 3600000ms. Ignored when persistent is true.
|
|
2350
|
+
*/
|
|
2351
|
+
timeout_ms: number;
|
|
2352
|
+
/**
|
|
2353
|
+
* Run for the lifetime of the session (no timeout). Use for session-length watches like PR monitoring or log tails. Stop with TaskStop.
|
|
2354
|
+
*/
|
|
2355
|
+
persistent: boolean;
|
|
2356
|
+
/**
|
|
2357
|
+
* Shell command or script. Each stdout line is an event; exit ends the watch.
|
|
2358
|
+
*/
|
|
2359
|
+
command: string;
|
|
2360
|
+
}
|
|
2361
|
+
export interface PushNotificationInput {
|
|
2362
|
+
/**
|
|
2363
|
+
* The notification body. Keep it under 200 characters; mobile OSes truncate.
|
|
2364
|
+
*/
|
|
2365
|
+
message: string;
|
|
2366
|
+
status: "proactive";
|
|
2367
|
+
}
|
|
2232
2368
|
export interface EnterWorktreeInput {
|
|
2233
2369
|
/**
|
|
2234
2370
|
* Optional name for a new worktree. Each "/"-separated segment may contain only letters, digits, dots, underscores, and dashes; max 64 chars total. A random name is generated if not provided. Mutually exclusive with `path`.
|
|
@@ -2850,3 +2986,143 @@ export interface TaskListOutput {
|
|
|
2850
2986
|
blockedBy: string[];
|
|
2851
2987
|
}[];
|
|
2852
2988
|
}
|
|
2989
|
+
export interface RemoteTriggerOutput {
|
|
2990
|
+
status: number;
|
|
2991
|
+
json: string;
|
|
2992
|
+
summary?: string;
|
|
2993
|
+
}
|
|
2994
|
+
export interface ScheduleWakeupOutput {
|
|
2995
|
+
/**
|
|
2996
|
+
* Epoch ms timestamp when the next wakeup will fire
|
|
2997
|
+
*/
|
|
2998
|
+
scheduledFor: number;
|
|
2999
|
+
/**
|
|
3000
|
+
* Actual delay used after clamping to runtime bounds
|
|
3001
|
+
*/
|
|
3002
|
+
clampedDelaySeconds: number;
|
|
3003
|
+
/**
|
|
3004
|
+
* True if the requested delaySeconds was outside [60, 3600]
|
|
3005
|
+
*/
|
|
3006
|
+
wasClamped: boolean;
|
|
3007
|
+
}
|
|
3008
|
+
export interface MonitorOutput {
|
|
3009
|
+
/**
|
|
3010
|
+
* ID of the background monitor task.
|
|
3011
|
+
*/
|
|
3012
|
+
taskId: string;
|
|
3013
|
+
/**
|
|
3014
|
+
* Timeout deadline in milliseconds (0 when persistent).
|
|
3015
|
+
*/
|
|
3016
|
+
timeoutMs: number;
|
|
3017
|
+
/**
|
|
3018
|
+
* No timeout — runs until TaskStop or session end.
|
|
3019
|
+
*/
|
|
3020
|
+
persistent?: boolean;
|
|
3021
|
+
}
|
|
3022
|
+
export interface EnterPlanModeOutput {
|
|
3023
|
+
/**
|
|
3024
|
+
* Confirmation that plan mode was entered
|
|
3025
|
+
*/
|
|
3026
|
+
message: string;
|
|
3027
|
+
}
|
|
3028
|
+
export interface REPLOutput {
|
|
3029
|
+
/**
|
|
3030
|
+
* The code that was executed
|
|
3031
|
+
*/
|
|
3032
|
+
code: string;
|
|
3033
|
+
/**
|
|
3034
|
+
* Return value from the code execution
|
|
3035
|
+
*/
|
|
3036
|
+
result: {
|
|
3037
|
+
[k: string]: unknown;
|
|
3038
|
+
};
|
|
3039
|
+
/**
|
|
3040
|
+
* Captured console.log output
|
|
3041
|
+
*/
|
|
3042
|
+
stdout: string;
|
|
3043
|
+
/**
|
|
3044
|
+
* Captured console.error output
|
|
3045
|
+
*/
|
|
3046
|
+
stderr: string;
|
|
3047
|
+
/**
|
|
3048
|
+
* Error message if execution failed
|
|
3049
|
+
*/
|
|
3050
|
+
error?: string;
|
|
3051
|
+
/**
|
|
3052
|
+
* Names of tools registered during this execution
|
|
3053
|
+
*/
|
|
3054
|
+
registeredTools?: string[];
|
|
3055
|
+
/**
|
|
3056
|
+
* Images returned by inner Read calls — surfaced as image content blocks
|
|
3057
|
+
*/
|
|
3058
|
+
images?: {
|
|
3059
|
+
base64: string;
|
|
3060
|
+
mediaType: string;
|
|
3061
|
+
}[];
|
|
3062
|
+
/**
|
|
3063
|
+
* PDFs returned by inner Read calls — surfaced as document content blocks
|
|
3064
|
+
*/
|
|
3065
|
+
documents?: {
|
|
3066
|
+
base64: string;
|
|
3067
|
+
}[];
|
|
3068
|
+
}
|
|
3069
|
+
export interface WorkflowOutput {
|
|
3070
|
+
status: "async_launched" | "remote_launched";
|
|
3071
|
+
taskId: string;
|
|
3072
|
+
/**
|
|
3073
|
+
* Local workflow run identifier for resumeFromRunId. Absent for remote_launched (the CCR session URL is the resume handle there) and on transcripts written before this field existed.
|
|
3074
|
+
*/
|
|
3075
|
+
runId?: string;
|
|
3076
|
+
summary?: string;
|
|
3077
|
+
/**
|
|
3078
|
+
* Directory where subagent transcripts are written during execution
|
|
3079
|
+
*/
|
|
3080
|
+
transcriptDir?: string;
|
|
3081
|
+
/**
|
|
3082
|
+
* Path to the persisted workflow script for this invocation. Editable via Write/Edit; pass back as `scriptPath` to re-run without resending the script.
|
|
3083
|
+
*/
|
|
3084
|
+
scriptPath?: string;
|
|
3085
|
+
/**
|
|
3086
|
+
* CCR session URL when status is remote_launched
|
|
3087
|
+
*/
|
|
3088
|
+
sessionUrl?: string;
|
|
3089
|
+
/**
|
|
3090
|
+
* Non-blocking heads-up (e.g. local git state diverges from the pushed branch the remote session will clone)
|
|
3091
|
+
*/
|
|
3092
|
+
warning?: string;
|
|
3093
|
+
/**
|
|
3094
|
+
* Set if syntax check failed
|
|
3095
|
+
*/
|
|
3096
|
+
error?: string;
|
|
3097
|
+
}
|
|
3098
|
+
export interface CronCreateOutput {
|
|
3099
|
+
id: string;
|
|
3100
|
+
humanSchedule: string;
|
|
3101
|
+
recurring: boolean;
|
|
3102
|
+
durable?: boolean;
|
|
3103
|
+
}
|
|
3104
|
+
export interface CronDeleteOutput {
|
|
3105
|
+
id: string;
|
|
3106
|
+
}
|
|
3107
|
+
export interface CronListOutput {
|
|
3108
|
+
jobs: {
|
|
3109
|
+
id: string;
|
|
3110
|
+
cron: string;
|
|
3111
|
+
humanSchedule: string;
|
|
3112
|
+
prompt: string;
|
|
3113
|
+
recurring?: boolean;
|
|
3114
|
+
durable?: boolean;
|
|
3115
|
+
}[];
|
|
3116
|
+
}
|
|
3117
|
+
export interface PushNotificationOutput {
|
|
3118
|
+
message: string;
|
|
3119
|
+
pushSent?: boolean;
|
|
3120
|
+
localSent?: boolean;
|
|
3121
|
+
disabledReason?: "config_off" | "user_present" | "no_transport";
|
|
3122
|
+
idleSec?: number;
|
|
3123
|
+
hasFocus?: boolean;
|
|
3124
|
+
/**
|
|
3125
|
+
* ISO timestamp captured at tool execution on the emitting process. Optional — resumed sessions replay pre-sentAt outputs verbatim.
|
|
3126
|
+
*/
|
|
3127
|
+
sentAt?: string;
|
|
3128
|
+
}
|
package/sdk.d.ts
CHANGED
|
@@ -1324,15 +1324,19 @@ export declare type Options = {
|
|
|
1324
1324
|
preset: 'claude_code';
|
|
1325
1325
|
};
|
|
1326
1326
|
/**
|
|
1327
|
-
* Environment variables
|
|
1328
|
-
*
|
|
1327
|
+
* Environment variables for the Claude Code process.
|
|
1328
|
+
*
|
|
1329
|
+
* When set, this value REPLACES the subprocess environment entirely — it is
|
|
1330
|
+
* not merged with `process.env`. Spread `process.env` yourself if the
|
|
1331
|
+
* subprocess still needs inherited variables like `PATH`, `HOME`, or
|
|
1332
|
+
* `ANTHROPIC_API_KEY`. When omitted, the subprocess inherits `process.env`.
|
|
1329
1333
|
*
|
|
1330
1334
|
* SDK consumers can identify their app/library to include in the User-Agent header by setting:
|
|
1331
1335
|
* - `CLAUDE_AGENT_SDK_CLIENT_APP` - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")
|
|
1332
1336
|
*
|
|
1333
1337
|
* @example
|
|
1334
1338
|
* ```typescript
|
|
1335
|
-
* env: { CLAUDE_AGENT_SDK_CLIENT_APP: 'my-app/1.0.0' }
|
|
1339
|
+
* env: { ...process.env, CLAUDE_AGENT_SDK_CLIENT_APP: 'my-app/1.0.0' }
|
|
1336
1340
|
* ```
|
|
1337
1341
|
*/
|
|
1338
1342
|
env?: {
|
|
@@ -3558,6 +3562,7 @@ export declare type SDKSystemMessage = {
|
|
|
3558
3562
|
fast_mode_state?: FastModeState;
|
|
3559
3563
|
|
|
3560
3564
|
|
|
3565
|
+
|
|
3561
3566
|
uuid: UUID;
|
|
3562
3567
|
session_id: string;
|
|
3563
3568
|
};
|
|
@@ -4006,6 +4011,8 @@ export declare interface Settings {
|
|
|
4006
4011
|
* Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected.
|
|
4007
4012
|
*/
|
|
4008
4013
|
respectGitignore?: boolean;
|
|
4014
|
+
|
|
4015
|
+
|
|
4009
4016
|
/**
|
|
4010
4017
|
* Number of days to retain chat transcripts before automatic cleanup (default: 30). Minimum 1. Use a large value for long retention; use --no-session-persistence to disable transcript writes entirely.
|
|
4011
4018
|
*/
|
|
@@ -4400,6 +4407,10 @@ export declare interface Settings {
|
|
|
4400
4407
|
* When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies.
|
|
4401
4408
|
*/
|
|
4402
4409
|
allowManagedMcpServersOnly?: boolean;
|
|
4410
|
+
/**
|
|
4411
|
+
* When true (and set in managed settings), claude.ai cloud MCP connectors load alongside managed-mcp.json instead of being suppressed by its exclusive-control lockdown. Default off preserves the lockdown. Read from managed settings only.
|
|
4412
|
+
*/
|
|
4413
|
+
allowAllClaudeAiMcps?: boolean;
|
|
4403
4414
|
/**
|
|
4404
4415
|
* When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by marketplace allowlist, everything else blocked here.
|
|
4405
4416
|
*/
|