@anthropic-ai/claude-agent-sdk 0.2.92 → 0.2.94

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/manifest.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "version": "2.1.92",
3
- "buildDate": "2026-04-03T23:31:32Z",
2
+ "version": "2.1.94",
3
+ "buildDate": "2026-04-07T20:31:15Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude",
7
- "checksum": "6d1b9657727dce81332b3cda11bfe0a8c83e2392e3c062a31022e10b0e71cdd1",
8
- "size": 198736976
7
+ "checksum": "cf1c5db5e87610eca1e8f06dc2b2a2a9c0c04c179c55c7e1fcdfc9a2c014b31c",
8
+ "size": 199397456
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude",
12
- "checksum": "d422b5cc974b3bc4b28f698144fd0316f3e17774babe0bc1eb76c2bb0858d0aa",
13
- "size": 200226896
12
+ "checksum": "e3d29d0febf982112e977b7d732adf3167f229521c8697e5253c90a6d2d4a332",
13
+ "size": 200870864
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude",
17
- "checksum": "08deb3d56477496eb92e624f492e25b123f4527dd5674f71afff58a48eccd953",
18
- "size": 231082560
17
+ "checksum": "b3524791b50b314b17dac9978cb9568fa2e11a46562ae6f798d0dac453a0604a",
18
+ "size": 231672384
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude",
22
- "checksum": "e22324514967ff2d5e9f91f0ee37e4675bf8b6dfec27fafb19cb25cc5b23fcaf",
23
- "size": 230787712
22
+ "checksum": "7cbc939cb52e09d49fd82092061543d21100b04c321e19fecf06f087dc908667",
23
+ "size": 231434880
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude",
27
- "checksum": "d0163f8857511b8f9dad7de1f072de2ca8c4e881d006b3b43525af3534050ae3",
28
- "size": 224201152
27
+ "checksum": "2ab810a4cecec5ca1d141cadd132afdfc4b49d214156e83d9317c69d1688dd73",
28
+ "size": 224790976
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude",
32
- "checksum": "e0f4a300ff9d0d9cb9c3ee37c706a9db239e3bbce96118245196ae6bc1b0492e",
33
- "size": 225102272
32
+ "checksum": "a841044e81d09b03b844cf231037430416befdc5e50c74df7d71d72c362db542",
33
+ "size": 225749440
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe",
37
- "checksum": "ebd9007c464d912593418f133a61d9f24866428530a81e88e910a24823066415",
38
- "size": 240482464
37
+ "checksum": "08d0a5abf80510f1539d242214fdfe16f8b40866875f4ab44e8a5f86f2409aa4",
38
+ "size": 241112736
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe",
42
- "checksum": "c258bce79aefac609f909e5abde92d1653bcef47d3577656d299d1d56f1604bb",
43
- "size": 237192864
42
+ "checksum": "1bc64b539ab98661305ffffe17a005d86d895da8be4de45895f371096d078ab2",
43
+ "size": 237823136
44
44
  }
45
45
  }
46
46
  }
package/manifest.zst.json CHANGED
@@ -1,54 +1,54 @@
1
1
  {
2
- "version": "2.1.92",
3
- "buildDate": "2026-04-03T23:31:33Z",
2
+ "version": "2.1.94",
3
+ "buildDate": "2026-04-07T20:31:16Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude.zst",
7
- "checksum": "6fec908f28273216d437bbcf34fcc1b3bc9eb7e1c4c492b3c075f522bf4f8fc1",
8
- "size": 41115236,
7
+ "checksum": "369163ad5c903eec187d12b208275c0cc034b932efe124dbfa64d0703d07441d",
8
+ "size": 41242270,
9
9
  "bundle": {
10
- "checksum": "d9bfbe986a1d42644ff2d30bb341bc8e6358f8f986cba357b96f0c80474e6f89",
11
- "size": 41118218
10
+ "checksum": "1540988376cc72774eb0f5b5451ddcdf2053794459c9ba6301c44e38e0a0cc48",
11
+ "size": 41246676
12
12
  }
13
13
  },
14
14
  "darwin-x64": {
15
15
  "binary": "claude.zst",
16
- "checksum": "008d6b8ea1d155f010d9528e9857af55fc5e6867bef86d1a33ebf50c9dbd6130",
17
- "size": 42773458,
16
+ "checksum": "8255afacbf9d4d62d14aa8bafdab697a4e8e1458cbb4c6dc81e9533244d8f681",
17
+ "size": 42927007,
18
18
  "bundle": {
19
- "checksum": "96d90798abed3b2714f0efe564c9deebc1a55c1934aeeb5576f04101d537ed6e",
20
- "size": 42770032
19
+ "checksum": "5fbe707fd6b751ceebc1a8b8a51b42d8c94e9351abe498c8beff15eaa2384dbf",
20
+ "size": 42916836
21
21
  }
22
22
  },
23
23
  "linux-arm64": {
24
24
  "binary": "claude.zst",
25
- "checksum": "c2f7369888de4c14205925fd3ea1ecda6c81307a766a5ba04abc18df5421984d",
26
- "size": 50781363
25
+ "checksum": "15a44c976954008731f8156fc558fd65a4e589ba1a742e6e7b1270c291fd6c79",
26
+ "size": 50915013
27
27
  },
28
28
  "linux-x64": {
29
29
  "binary": "claude.zst",
30
- "checksum": "f0b025b64553501b6456cd0ef15ad57818be1088cf77de14f323d6660354ca10",
31
- "size": 51333715
30
+ "checksum": "efd242158c50d2aee32c95ed17777a5ce83b56988b0cc4884252dad9e1e0067d",
31
+ "size": 51482748
32
32
  },
33
33
  "linux-arm64-musl": {
34
34
  "binary": "claude.zst",
35
- "checksum": "a1b7206b9f7dd9d8d34ca4b4e89d8d1c53a568d0b20533ddb3f602329f6b0792",
36
- "size": 49456613
35
+ "checksum": "fd8dc9488d570826dccbfbac2546ea3e2e2568b473e9db2e1dee2704400ab1d8",
36
+ "size": 49578715
37
37
  },
38
38
  "linux-x64-musl": {
39
39
  "binary": "claude.zst",
40
- "checksum": "b6ecf226171ddc90293088d618970d5c83e23f47e5dae1e7dbfebbf57135b01d",
41
- "size": 50030440
40
+ "checksum": "beabe8b9f2108752964f616ff6395e9c0e9576d067c19b3dc64ed1639b80fec4",
41
+ "size": 50143733
42
42
  },
43
43
  "win32-x64": {
44
44
  "binary": "claude.exe.zst",
45
- "checksum": "ec1b0d5dcefe9301ae26e8588aa691d6b9c5fa80f87360f76ec574233f4f624c",
46
- "size": 52979934
45
+ "checksum": "98e3585e5b9b9d7c41ac1f0a22f77e9b0f53da4f06d45d5269939173e30e2d0d",
46
+ "size": 53117708
47
47
  },
48
48
  "win32-arm64": {
49
49
  "binary": "claude.exe.zst",
50
- "checksum": "b393cb9169e6907443522ffc5e9951325f244ac19f987c3b99e8e6b815e6c5b0",
51
- "size": 51162683
50
+ "checksum": "6312426659d67d5d770101aa1346c53618af702e5848be2751405ab16a5304a7",
51
+ "size": 51266876
52
52
  }
53
53
  }
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.2.92",
3
+ "version": "0.2.94",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -20,6 +20,10 @@
20
20
  "types": "./bridge.d.ts",
21
21
  "default": "./bridge.mjs"
22
22
  },
23
+ "./assistant": {
24
+ "types": "./assistant.d.ts",
25
+ "default": "./assistant.mjs"
26
+ },
23
27
  "./sdk-tools": {
24
28
  "types": "./sdk-tools.d.ts"
25
29
  },
@@ -73,6 +77,8 @@
73
77
  "agentSdkTypes.d.ts",
74
78
  "bridge.mjs",
75
79
  "bridge.d.ts",
80
+ "assistant.mjs",
81
+ "assistant.d.ts",
76
82
  "browser-sdk.js",
77
83
  "browser-sdk.d.ts",
78
84
  "embed.js",
@@ -84,5 +90,5 @@
84
90
  "vendor/ripgrep/",
85
91
  "vendor/audio-capture/"
86
92
  ],
87
- "claudeCodeVersion": "2.1.92"
93
+ "claudeCodeVersion": "2.1.94"
88
94
  }
package/sdk.d.ts CHANGED
@@ -29,7 +29,7 @@ export declare type AccountInfo = {
29
29
  /**
30
30
  * Active API backend. Anthropic OAuth login only applies when "firstParty"; for 3P providers the other fields are absent and auth is external (AWS creds, gcloud ADC, etc.).
31
31
  */
32
- apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws';
32
+ apiProvider?: 'firstParty' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws' | 'mantle';
33
33
  };
34
34
 
35
35
  /**
@@ -198,6 +198,56 @@ export declare type ConfigChangeHookInput = BaseHookInput & {
198
198
  */
199
199
  export declare type ConfigScope = 'local' | 'user' | 'project';
200
200
 
201
+ /**
202
+ * Structured failure from connectRemoteControl.
203
+ * @alpha
204
+ */
205
+ export declare type ConnectRemoteControlError = {
206
+ kind: 'conflict' | 'auth' | 'network' | 'unknown';
207
+ detail: string;
208
+ };
209
+
210
+ /**
211
+ * Options for connectRemoteControl.
212
+ * @alpha
213
+ */
214
+ export declare type ConnectRemoteControlOptions = {
215
+ dir: string;
216
+ /** Override directory sent to backend for env registration. */
217
+ registrationDir?: string;
218
+ name?: string;
219
+ workerType?: string;
220
+ branch?: string;
221
+ gitRepoUrl?: string | null;
222
+ getAccessToken: () => string | undefined;
223
+ baseUrl: string;
224
+ orgUUID: string;
225
+ model: string;
226
+ /** Reuse env+session across restarts (reads bridge-pointer.json). */
227
+ perpetual?: boolean;
228
+ /** SSE high-water mark so reconnect sends from_sequence_num. */
229
+ initialSSESequenceNum?: number;
230
+ /** Called on 401; return true after refreshing token to retry. */
231
+ onAuth401?: (staleAccessToken: string) => Promise<boolean>;
232
+ /** Called on 409 conflict; return 'takeover' to deregister + retry. */
233
+ onConflict?: (detail: {
234
+ machineName: string;
235
+ message: string;
236
+ }) => Promise<'takeover' | 'abort'>;
237
+ };
238
+
239
+ /**
240
+ * Discriminated result from connectRemoteControl.
241
+ * @alpha
242
+ */
243
+ export declare type ConnectRemoteControlResult = {
244
+ ok: true;
245
+ handle: RemoteControlHandle;
246
+ } | {
247
+ ok: false;
248
+ error: ConnectRemoteControlError;
249
+ };
250
+
201
251
  declare type ControlErrorResponse = {
202
252
  subtype: 'error';
203
253
  request_id: string;
@@ -307,6 +357,7 @@ declare namespace coreTypes {
307
357
  SDKResultSuccess,
308
358
  SDKSessionInfo,
309
359
  SDKSessionStateChangedMessage,
360
+ SDKSettingsParseError,
310
361
  SDKStatusMessage,
311
362
  SDKStatus,
312
363
  SDKSystemMessage,
@@ -421,6 +472,12 @@ export declare type ElicitationRequest = {
421
472
  elicitationId?: string;
422
473
  /** JSON Schema for the requested input (only for 'form' mode) */
423
474
  requestedSchema?: Record<string, unknown>;
475
+ /** Permission-display title from MCP `_meta['anthropic/permissionDisplay']` — header for elicitation-driven permission prompts */
476
+ title?: string;
477
+ /** Short tool/server label from MCP `_meta['anthropic/permissionDisplay'].displayName` */
478
+ displayName?: string;
479
+ /** Permission-display subtitle from MCP `_meta['anthropic/permissionDisplay'].description` */
480
+ description?: string;
424
481
  };
425
482
 
426
483
  /**
@@ -609,6 +666,15 @@ export declare type HookJSONOutput = AsyncHookJSONOutput | SyncHookJSONOutput;
609
666
 
610
667
  export declare type HookPermissionDecision = 'allow' | 'deny' | 'ask' | 'defer';
611
668
 
669
+ /**
670
+ * A user message typed on claude.ai, extracted from the bridge WS.
671
+ * @alpha
672
+ */
673
+ export declare type InboundPrompt = {
674
+ content: string | unknown[];
675
+ uuid?: string;
676
+ };
677
+
612
678
  export declare type InferShape<T extends AnyZodRawShape> = {
613
679
  [K in keyof T]: T[K] extends {
614
680
  _output: infer O;
@@ -1968,6 +2034,18 @@ declare type SDKControlElicitationRequest = {
1968
2034
  url?: string;
1969
2035
  elicitation_id?: string;
1970
2036
  requested_schema?: Record<string, unknown>;
2037
+ /**
2038
+ * Permission-display title from the MCP server's _meta['anthropic/permissionDisplay']. Mirrors can_use_tool.title so SDK consumers can render elicitation-driven permission prompts with structured headers instead of parsing `message`.
2039
+ */
2040
+ title?: string;
2041
+ /**
2042
+ * Short tool/server label from _meta['anthropic/permissionDisplay'].displayName. Mirrors can_use_tool.display_name.
2043
+ */
2044
+ display_name?: string;
2045
+ /**
2046
+ * Permission-display subtitle from _meta['anthropic/permissionDisplay'].description. Mirrors can_use_tool.description.
2047
+ */
2048
+ description?: string;
1971
2049
  };
1972
2050
 
1973
2051
  /**
@@ -2219,7 +2297,7 @@ declare type SDKControlRewindFilesRequest = {
2219
2297
  };
2220
2298
 
2221
2299
  /**
2222
- * Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.
2300
+ * Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.
2223
2301
  */
2224
2302
  declare type SDKControlSeedReadStateRequest = {
2225
2303
  subtype: 'seed_read_state';
@@ -2629,6 +2707,24 @@ export declare type SDKSessionStateChangedMessage = {
2629
2707
  session_id: string;
2630
2708
  };
2631
2709
 
2710
+ /**
2711
+ * A settings file parse or validation error. When a settings.json file fails to parse (invalid JSON, JSON comments, schema mismatch), the file is skipped and any rules it contained — including permission allow/deny lists — are not applied.
2712
+ */
2713
+ export declare type SDKSettingsParseError = {
2714
+ /**
2715
+ * Path to the settings file that failed to parse or validate.
2716
+ */
2717
+ file?: string;
2718
+ /**
2719
+ * Dot-notation path to the field with the error, or empty string for whole-file errors.
2720
+ */
2721
+ path: string;
2722
+ /**
2723
+ * Human-readable error message.
2724
+ */
2725
+ message: string;
2726
+ };
2727
+
2632
2728
  export declare type SDKStatus = 'compacting' | null;
2633
2729
 
2634
2730
  export declare type SDKStatusMessage = {
@@ -4190,6 +4286,8 @@ export declare type StopHookInput = BaseHookInput & {
4190
4286
  * Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
4191
4287
  */
4192
4288
  last_assistant_message?: string;
4289
+
4290
+
4193
4291
  };
4194
4292
 
4195
4293
  export declare type SubagentStartHookInput = BaseHookInput & {
@@ -4213,6 +4311,8 @@ export declare type SubagentStopHookInput = BaseHookInput & {
4213
4311
  * Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
4214
4312
  */
4215
4313
  last_assistant_message?: string;
4314
+
4315
+
4216
4316
  };
4217
4317
 
4218
4318
  export declare type SyncHookJSONOutput = {
@@ -4268,6 +4368,7 @@ export declare type TerminalReason = 'blocking_limit' | 'rapid_refill_breaker' |
4268
4368
  */
4269
4369
  export declare type ThinkingAdaptive = {
4270
4370
  type: 'adaptive';
4371
+ display?: 'summarized' | 'omitted';
4271
4372
  };
4272
4373
 
4273
4374
  /**
@@ -4288,6 +4389,7 @@ export declare type ThinkingDisabled = {
4288
4389
  export declare type ThinkingEnabled = {
4289
4390
  type: 'enabled';
4290
4391
  budgetTokens?: number;
4392
+ display?: 'summarized' | 'omitted';
4291
4393
  };
4292
4394
 
4293
4395
  export declare function tool<Schema extends AnyZodRawShape>(_name: string, _description: string, _inputSchema: Schema, _handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>, _extras?: {
@@ -4377,11 +4479,13 @@ export declare function unstable_v2_resumeSession(_sessionId: string, _options:
4377
4479
  export declare type UserPromptSubmitHookInput = BaseHookInput & {
4378
4480
  hook_event_name: 'UserPromptSubmit';
4379
4481
  prompt: string;
4482
+ session_title?: string;
4380
4483
  };
4381
4484
 
4382
4485
  export declare type UserPromptSubmitHookSpecificOutput = {
4383
4486
  hookEventName: 'UserPromptSubmit';
4384
4487
  additionalContext?: string;
4488
+ sessionTitle?: string;
4385
4489
  };
4386
4490
 
4387
4491
  export declare type WorktreeCreateHookInput = BaseHookInput & {