@anthropic-ai/claude-agent-sdk 0.3.144 → 0.3.145

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,47 +1,47 @@
1
1
  {
2
- "version": "2.1.144",
3
- "commit": "32281b6b930f7e2ab4f0b5e2494e263b9c1ffb7e",
4
- "buildDate": "2026-05-18T18:52:18Z",
2
+ "version": "2.1.145",
3
+ "commit": "daa4c3755d45ab0cf97bb41db8c03bd2dfd2ff5f",
4
+ "buildDate": "2026-05-19T01:56:17Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "9886baa4ec4c455f86108464f121732193ee76e5dfceb031005f59f31276a5df",
9
- "size": 207919008
8
+ "checksum": "368dcd9709c85534f673071e7cc8eb5422bcff367fb9bdf5ce25d9619aab7ef5",
9
+ "size": 208546464
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "d225c07b713615ceda54cebcfb6280942b113c64dccbaa114b12204e917087f8",
14
- "size": 210433168
13
+ "checksum": "c23dc566214279d0708f4212261f023d8e63d5af5aef91638ebfdc090b3e33de",
14
+ "size": 211044112
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "c8ccccbfce12d684588bd3af366394132f614dcf3c86beb2066f86bde2704513",
19
- "size": 233289352
18
+ "checksum": "75ad61d690d79440c82b5841444e1b42caae55736af37c97dd0e068ef20ce390",
19
+ "size": 233944712
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "147480774472e5720fd5e83617b3e9299344e7213efa84c326b25bd5a0f20b4e",
24
- "size": 233404112
23
+ "checksum": "b3ffbc12689bfe81389d6577787fcea4cab81bd3b6bba9b719e73770b62d720e",
24
+ "size": 234022608
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "68a92c68f18cd25676259b12cd799ddf1e8bdac24f927ac50defd8be26a1448d",
29
- "size": 226144088
28
+ "checksum": "3a73f058b2225a4210931362bc9c98e486e3362ca28b339281755737fb375c7c",
29
+ "size": 226799448
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "f1f736eb04632ce3f720e04a67ba0209d55726cb88e8e23f6f33b8cd6481b6ca",
34
- "size": 227798064
33
+ "checksum": "cfc95961a41329204405c4b0e257cb467821133eb7bdb1ca0866dfe789d5d442",
34
+ "size": 228416560
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "ae150c7d6100e14c67efc90c2b55e0db9cdbcef2b2c7b3cb56998331182e3d2f",
39
- "size": 229302432
38
+ "checksum": "1da511cee5d3a4968634174498e9148635a5908d7f6ea5ec91b04d531c20c3bc",
39
+ "size": 229910176
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "2871ae906ed83f826ce9fa721ec82418c15315e11ab3cb3fe821f3c056fcff4d",
44
- "size": 225266848
43
+ "checksum": "b6b920c757e08ff3e4f0dc211360ad7815db539d4915bb691e57ee4d34db31e5",
44
+ "size": 225875616
45
45
  }
46
46
  }
47
47
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.144",
3
- "commit": "32281b6b930f7e2ab4f0b5e2494e263b9c1ffb7e",
4
- "buildDate": "2026-05-18T18:59:24Z",
2
+ "version": "2.1.145",
3
+ "commit": "daa4c3755d45ab0cf97bb41db8c03bd2dfd2ff5f",
4
+ "buildDate": "2026-05-19T02:03:37Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "ee45631e54620b1493a186c3f68737a586bb9743e8bedd7d40d663ef1488ef72",
9
- "size": 43055466,
8
+ "checksum": "7bedcf3a0a6e2f79b3b0008e7a056984a47a30747cc4ef988dd6d7095cff5c2c",
9
+ "size": 43195831,
10
10
  "bundle": {
11
- "checksum": "ca17f3dffb8230ec6ccedf35bec149e9ab3a616509d2bc55ae90ed84f88d13e3",
12
- "size": 43067561
11
+ "checksum": "815e4f3505e2b005a9510a9427846b5fe55cf0702aa838eb293315133ea3376f",
12
+ "size": 43200202
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "d4023e18885bda3f0edea593cabe97f1d71912b8f3d1daeebb28551fdca2ccb1",
18
- "size": 44977785,
17
+ "checksum": "3ba937418f3f2e2155b45e330d2f5d75f09bceb6e3cefc3a6b314e6c806f05e6",
18
+ "size": 45109754,
19
19
  "bundle": {
20
- "checksum": "0c04c6b629f308b19e1f4048c37fd6705c8e75c236e8f9350b8b20449f06eb1a",
21
- "size": 44989436
20
+ "checksum": "c936efab1b00100fb114c2a82c79ac23b9948610adc26b99579ef65606a717ef",
21
+ "size": 45119954
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "9e1043902191323aa6e2798d6810028241d8ca166d52133e0565a1cb9b3e2f58",
27
- "size": 50842663
26
+ "checksum": "7bffc295920723dd531ff9937f6dd6e953ac52051d643df69d5aa29cd7d87584",
27
+ "size": 50982967
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "11faccc6f4fc49184d8e4a847eb2feb7cda225722395f47cd6b61a93751f3edc",
32
- "size": 51470721
31
+ "checksum": "5ba6f8e411bd4aa8a967818a5deece65e74ea2c99bb08adf20554070ebdff6db",
32
+ "size": 51607210
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "f9c4091a1ba8664c20c1e6f77e99a5a76e772e2a1ca5bf217f88567fbb29fb0e",
37
- "size": 49480624
36
+ "checksum": "1e6e9ddba6e57144b3700a318f944308bfe0887db7c50445e2dc4c912a7b1c20",
37
+ "size": 49605775
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "4a9a7daa9ff2e36e476196ecc07c305c3e68f36af5dad1a0decdd158525ff204",
42
- "size": 50191473
41
+ "checksum": "a14758fa127cc8d02df3f63146e8e6b819252ee3f8618095ab26e6b703b3042e",
42
+ "size": 50320268
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "09ace0211e4eb689df96fca870421a7674ffb15876f1fdb8f887e397141778d1",
47
- "size": 52206852
46
+ "checksum": "2e359b72a4e8a74e6c2059bd469fb9a7ecc73427f3666ad3b748fd86e01e58a4",
47
+ "size": 52313300
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "c061d3098ee1a261375347ffd2350d64d2b8a23a220b68ce3214ebe679395434",
52
- "size": 50477031
51
+ "checksum": "86c1464594dafb9126204a9d853610ba67d85cecdcdbee222e76ec6e8f01c070",
52
+ "size": 50612912
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.144",
3
+ "version": "0.3.145",
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.144",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.144",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.144",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.144",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.144",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.144",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.144",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.144"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.145",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.145",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.145",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.145",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.145",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.145",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.145",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.145"
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.144"
89
+ "claudeCodeVersion": "2.1.145"
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
  | {
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.
@@ -2939,7 +2982,7 @@ export declare type SDKControlRequest = {
2939
2982
  request: SDKControlRequestInner;
2940
2983
  };
2941
2984
 
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;
2985
+ 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
2986
 
2944
2987
  /**
2945
2988
  * 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 +3697,22 @@ export declare type SDKUserMessageReplay = {
3654
3697
  file_attachments?: unknown[];
3655
3698
  };
3656
3699
 
3700
+ export declare type SessionCronSummary = {
3701
+ id: string;
3702
+ /**
3703
+ * Cron expression, e.g. "0 9 * * 1-5".
3704
+ */
3705
+ schedule: string;
3706
+ /**
3707
+ * False for one-shot wakeups whose cron field encodes a single fire time; true for tasks that re-fire on every match.
3708
+ */
3709
+ recurring: boolean;
3710
+ /**
3711
+ * Prompt text submitted when the cron fires. Capped at 1000 chars; clipped values append an in-string "… [+N chars]" marker.
3712
+ */
3713
+ prompt: string;
3714
+ };
3715
+
3657
3716
  export declare type SessionEndHookInput = BaseHookInput & {
3658
3717
  hook_event_name: 'SessionEnd';
3659
3718
  reason: ExitReason;
@@ -5468,6 +5527,14 @@ export declare type StopHookInput = BaseHookInput & {
5468
5527
  * Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
5469
5528
  */
5470
5529
  last_assistant_message?: string;
5530
+ /**
5531
+ * 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.
5532
+ */
5533
+ background_tasks?: BackgroundTaskSummary[];
5534
+ /**
5535
+ * Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled.
5536
+ */
5537
+ session_crons?: SessionCronSummary[];
5471
5538
 
5472
5539
 
5473
5540
  };
@@ -5493,6 +5560,14 @@ export declare type SubagentStopHookInput = BaseHookInput & {
5493
5560
  * Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
5494
5561
  */
5495
5562
  last_assistant_message?: string;
5563
+ /**
5564
+ * 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.
5565
+ */
5566
+ background_tasks?: BackgroundTaskSummary[];
5567
+ /**
5568
+ * Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled.
5569
+ */
5570
+ session_crons?: SessionCronSummary[];
5496
5571
 
5497
5572
 
5498
5573
  };