@anthropic-ai/claude-agent-sdk 0.2.74 → 0.2.75

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.74",
3
- "buildDate": "2026-03-11T23:35:46Z",
2
+ "version": "2.1.75",
3
+ "buildDate": "2026-03-13T15:55:01Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude",
7
- "checksum": "48a07e2887cd4879219d319e48ac5cc6e2098238c7c0abe01c57a35430941cb7",
8
- "size": 190412928
7
+ "checksum": "8c541a5e924eda2070eaf1702a48047af671c4dff6a11a5e762076614a082675",
8
+ "size": 190611072
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude",
12
- "checksum": "31fa7ebd424719406cb123f95781c5e795f7a9899611ff1a9213092458d346eb",
13
- "size": 196493184
12
+ "checksum": "82c90b91a0a18f60191f817b9b42304d8b17dbed75795b715c41f4fdfe4c782d",
13
+ "size": 196691328
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude",
17
- "checksum": "bfa883897a26433c5132a641b32d1fce00e1eff04a61bf52cd9ab85aeac2ea95",
18
- "size": 232315636
17
+ "checksum": "ec8f4f7f7bb50611dae70c109a76ee1da6a3ab45511c65f117df215848ecc905",
18
+ "size": 232510985
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude",
22
- "checksum": "e5613610deee76cd32bc9b8e9e364da074fcd880705f837a4c9ee1ec38f9b73b",
23
- "size": 235079569
22
+ "checksum": "328b0a429c05a04f911157d886be5123cf1824a19ba8ca1f9d594c004eac32c9",
23
+ "size": 235274982
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude",
27
- "checksum": "72f4bc8e016357111229e9a026b4ff322dd5fa5b2782f59368bd788f78e9af75",
28
- "size": 222834724
27
+ "checksum": "7a2fac946817aec1565d7d31bc553984dbae65f7024b7af1b621a01bd620a41b",
28
+ "size": 223030073
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude",
32
- "checksum": "08fbc3f3f6d95a5817bff74ef02145196e2d0e5947bd6cc52fd3ea8a8b47a51c",
33
- "size": 225677057
32
+ "checksum": "ba25f78e7b337dd31479fda1203205b20821c69f439f08759710d74db263cde9",
33
+ "size": 225872470
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe",
37
- "checksum": "f84f832c0661157b38262595f3228353079d8d44c3f24cefe2d67b6d56fd9042",
38
- "size": 238872736
37
+ "checksum": "f1a4f5eafcb702607bc01acb6e80d60013e3e3e164b24196e29f616aa5b58b68",
38
+ "size": 239061152
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe",
42
- "checksum": "ee6523a7a53256c0000853f032e185cbe3f9e611c2e9fa0c4285c6c6a9869da4",
43
- "size": 233458848
42
+ "checksum": "6ea22ee1275efdf8bdd0ac1e5e73002a21bf4db6e3d238bfdab7b21fe7ba5078",
43
+ "size": 233647776
44
44
  }
45
45
  }
46
46
  }
package/manifest.zst.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "version": "2.1.74",
3
- "buildDate": "2026-03-11T23:35:47Z",
2
+ "version": "2.1.75",
3
+ "buildDate": "2026-03-13T15:55:02Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude.zst",
7
- "checksum": "50c27b1f3a01925e48b04bfd3e503a1012de8a78bd132dda6049a936f049b334",
8
- "size": 40487878
7
+ "checksum": "391ef143a82ceaa6f59d380b6e8ead40dfcf5bc35db5fd5751c760298afdbbde",
8
+ "size": 40566832
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude.zst",
12
- "checksum": "49a834f737e6bc10595323d601d826397c3057784791e5606d2b4af3058252b1",
13
- "size": 42912089
12
+ "checksum": "d6ce3efaae428548b2730c24eec168b0b9b244c15b6a7f4c80289e8ccd550e9c",
13
+ "size": 42978259
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "a8125293b6a4b287cb4bdb3d12b05934a52e4ae041a9e96b0c26cf47021b7192",
18
- "size": 52381195
17
+ "checksum": "9e2f4fed48dd190806fd1203f5232ae712c15a782133364323e157d889bc8e4e",
18
+ "size": 52459272
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude.zst",
22
- "checksum": "0cf4a7438018c0fabbf7c30b5f37d52655ad07949189ea15aaecdd4307eda9e8",
23
- "size": 53129648
22
+ "checksum": "9ca39181bd31367fa9ca92e6cfab7267ab96caf26eb405957f9109f024426b2f",
23
+ "size": 53213745
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude.zst",
27
- "checksum": "1db57ebe9c6b1f1d6e40754e232eb1a5aa4b825597365e25ad93a2894735683f",
28
- "size": 50360579
27
+ "checksum": "91026e00e6f8af75ee199f27dfb0d4320b386699a7c176afff9fd5ba075e3e03",
28
+ "size": 50426167
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude.zst",
32
- "checksum": "9a6b36a8868b2d7edf81fd8b8536d305970543c7921f7a302fe8ea3d93d55822",
33
- "size": 51139139
32
+ "checksum": "c7298eb29275f048cf64d8dad5afed60062e95a6e224902f89bc553723040ae9",
33
+ "size": 51209611
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe.zst",
37
- "checksum": "420fce72a88bb0d06e21b608e9628d0c0a327080c7c1d4a215d845bd91db3ace",
38
- "size": 53630454
37
+ "checksum": "741a84b1b9ba083ec36d63e1600b445efe738ca9a12eeba2f8c8e751784718d0",
38
+ "size": 53695392
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe.zst",
42
- "checksum": "60c7e19a47a2aed64f02e5b8e3d507d9074be70e67adfd24d2e733662c4b17c8",
43
- "size": 51698053
42
+ "checksum": "d1ad85da558e2d9e4fb81e284bf462977e97a193e3b61f43d40a1d76cb49d277",
43
+ "size": 51783581
44
44
  }
45
45
  }
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.2.74",
3
+ "version": "0.2.75",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -54,5 +54,5 @@
54
54
  "@img/sharp-win32-arm64": "^0.34.2",
55
55
  "@img/sharp-win32-x64": "^0.34.2"
56
56
  },
57
- "claudeCodeVersion": "2.1.74"
57
+ "claudeCodeVersion": "2.1.75"
58
58
  }
package/sdk-tools.d.ts CHANGED
@@ -110,6 +110,17 @@ export type AgentOutput =
110
110
  * Whether the calling agent has Read/Bash tools to check progress
111
111
  */
112
112
  canReadOutputFile?: boolean;
113
+ }
114
+ | {
115
+ status: "queued_to_running";
116
+ /**
117
+ * The ID of the running agent
118
+ */
119
+ agentId: string;
120
+ /**
121
+ * The prompt that was queued
122
+ */
123
+ prompt: string;
113
124
  };
114
125
  export type FileReadOutput =
115
126
  | {
@@ -135,6 +146,10 @@ export type FileReadOutput =
135
146
  * Total number of lines in the file
136
147
  */
137
148
  totalLines: number;
149
+ /**
150
+ * True when output was clipped to the byte cap (partial content)
151
+ */
152
+ resultWasTruncated?: boolean;
138
153
  };
139
154
  }
140
155
  | {
@@ -279,7 +294,7 @@ export interface AgentInput {
279
294
  */
280
295
  run_in_background?: boolean;
281
296
  /**
282
- * Name for the spawned agent
297
+ * Name for the spawned agent. Makes it addressable via SendMessage({to: name}) while running.
283
298
  */
284
299
  name?: string;
285
300
  /**
package/sdk.d.ts CHANGED
@@ -370,6 +370,28 @@ export declare type ExitReason = 'clear' | 'logout' | 'prompt_input_exit' | 'oth
370
370
  */
371
371
  export declare type FastModeState = 'off' | 'cooldown' | 'on';
372
372
 
373
+ /**
374
+ * Reads metadata for a single session by ID. Unlike `listSessions`, this only
375
+ * reads the single session file rather than every session in the project.
376
+ * Returns undefined if the session file is not found, is a sidechain session,
377
+ * or has no extractable summary.
378
+ *
379
+ * @param sessionId - UUID of the session
380
+ * @param options - `{ dir?: string }` project path; omit to search all project directories
381
+ */
382
+ export declare function getSessionInfo(_sessionId: string, _options?: GetSessionInfoOptions): Promise<SDKSessionInfo | undefined>;
383
+
384
+ /**
385
+ * Options for getSessionInfo.
386
+ */
387
+ export declare type GetSessionInfoOptions = {
388
+ /**
389
+ * Project directory path (same semantics as `listSessions({ dir })`).
390
+ * When omitted, all project directories are searched for the session file.
391
+ */
392
+ dir?: string;
393
+ };
394
+
373
395
  /**
374
396
  * Reads a session's conversation messages from its JSONL transcript file.
375
397
  *
@@ -447,13 +469,16 @@ export declare type JsonSchemaOutputFormat = {
447
469
  * and its git worktrees. When omitted, returns sessions across all
448
470
  * projects.
449
471
  *
472
+ * Use `limit` and `offset` for pagination.
473
+ *
450
474
  * @example
451
475
  * ```typescript
452
476
  * // List sessions for a specific project
453
477
  * const sessions = await listSessions({ dir: '/path/to/project' })
454
478
  *
455
- * // List all sessions across all projects
456
- * const allSessions = await listSessions()
479
+ * // Paginate
480
+ * const page1 = await listSessions({ limit: 50 })
481
+ * const page2 = await listSessions({ limit: 50, offset: 50 })
457
482
  * ```
458
483
  */
459
484
  export declare function listSessions(_options?: ListSessionsOptions): Promise<SDKSessionInfo[]>;
@@ -470,6 +495,11 @@ export declare type ListSessionsOptions = {
470
495
  dir?: string;
471
496
  /** Maximum number of sessions to return. */
472
497
  limit?: number;
498
+ /**
499
+ * Number of sessions to skip from the start of the sorted result set.
500
+ * Use with `limit` for pagination. Defaults to 0.
501
+ */
502
+ offset?: number;
473
503
  /**
474
504
  * When `dir` is provided and the directory is inside a git repository,
475
505
  * include sessions from all git worktree paths. Defaults to `true`.
@@ -2020,7 +2050,7 @@ export declare interface SDKSession {
2020
2050
  }
2021
2051
 
2022
2052
  /**
2023
- * Session metadata returned by listSessions.
2053
+ * Session metadata returned by listSessions and getSessionInfo.
2024
2054
  */
2025
2055
  export declare type SDKSessionInfo = {
2026
2056
  /**
@@ -2036,9 +2066,9 @@ export declare type SDKSessionInfo = {
2036
2066
  */
2037
2067
  lastModified: number;
2038
2068
  /**
2039
- * Session file size in bytes.
2069
+ * File size in bytes. Only populated for local JSONL storage.
2040
2070
  */
2041
- fileSize: number;
2071
+ fileSize?: number;
2042
2072
  /**
2043
2073
  * User-set session title via /rename.
2044
2074
  */
@@ -2055,6 +2085,14 @@ export declare type SDKSessionInfo = {
2055
2085
  * Working directory for the session.
2056
2086
  */
2057
2087
  cwd?: string;
2088
+ /**
2089
+ * User-set session tag.
2090
+ */
2091
+ tag?: string;
2092
+ /**
2093
+ * Creation time in milliseconds since epoch, extracted from the first entry's timestamp.
2094
+ */
2095
+ createdAt?: number;
2058
2096
  };
2059
2097
 
2060
2098
  /**
@@ -3028,6 +3066,12 @@ export declare interface Settings {
3028
3066
  [k: string]: string | number | boolean | string[];
3029
3067
  };
3030
3068
  };
3069
+ /**
3070
+ * Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.
3071
+ */
3072
+ options?: {
3073
+ [k: string]: string | number | boolean | string[];
3074
+ };
3031
3075
  };
3032
3076
  };
3033
3077
  /**
@@ -3099,6 +3143,10 @@ export declare interface Settings {
3099
3143
  * Path to SSH identity file (private key)
3100
3144
  */
3101
3145
  sshIdentityFile?: string;
3146
+ /**
3147
+ * Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.
3148
+ */
3149
+ startDirectory?: string;
3102
3150
  }[];
3103
3151
  /**
3104
3152
  * Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "** /code/CLAUDE.md", "** /some-dir/.claude/rules/**"
@@ -3249,6 +3297,14 @@ export declare type SyncHookJSONOutput = {
3249
3297
  hookSpecificOutput?: PreToolUseHookSpecificOutput | UserPromptSubmitHookSpecificOutput | SessionStartHookSpecificOutput | SetupHookSpecificOutput | SubagentStartHookSpecificOutput | PostToolUseHookSpecificOutput | PostToolUseFailureHookSpecificOutput | NotificationHookSpecificOutput | PermissionRequestHookSpecificOutput | ElicitationHookSpecificOutput | ElicitationResultHookSpecificOutput;
3250
3298
  };
3251
3299
 
3300
+ /**
3301
+ * Tag a session. Pass null to clear the tag.
3302
+ * @param sessionId - UUID of the session
3303
+ * @param tag - Tag string, or null to clear
3304
+ * @param options - `{ dir?: string }` project path; omit to search all projects
3305
+ */
3306
+ export declare function tagSession(_sessionId: string, _tag: string | null, _options?: SessionMutationOptions): Promise<void>;
3307
+
3252
3308
  export declare type TaskCompletedHookInput = BaseHookInput & {
3253
3309
  hook_event_name: 'TaskCompleted';
3254
3310
  task_id: string;