@anthropic-ai/claude-agent-sdk 0.2.58 → 0.2.59

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.58",
3
- "buildDate": "2026-02-25T19:23:36Z",
2
+ "version": "2.1.59",
3
+ "buildDate": "2026-02-25T23:40:08Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude",
7
- "checksum": "182c20c6080d042e4e08a6b2a2ce8258c1a50e53c01d36ddf20a82b4693395ea",
8
- "size": 186526736
7
+ "checksum": "ef70dae6ed08b5538f6d157a8c8591f72c262fb8e570c94711bad3ae4ee44afa",
8
+ "size": 187104656
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude",
12
- "checksum": "fb2ccc6872d498fc571f302059d51aec7c89b0df4d21d247a9a249c1a3a835dc",
13
- "size": 191680848
12
+ "checksum": "b3b69beae466ac1b7659bf5710ec1d5e7b20c848418cc701019462e0923ff0e0",
13
+ "size": 192258768
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude",
17
- "checksum": "5edd4b6be6b9e9c00e5805f022ee924a98fdcf1bf0c04635a429d2666eccbc3f",
18
- "size": 224288899
17
+ "checksum": "78b0ea5a64793149f550ad3ddcfcbc7147128a600243839f703fb5b6a2194859",
18
+ "size": 224884646
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude",
22
- "checksum": "10f68e45b5ff4a80ae21e6d7a95dfe673ab3391313358ccd94e827f379f6aaa0",
23
- "size": 227285328
22
+ "checksum": "7a4a653982b07e0a8157f8d3b2c2f8e442520ab07b2fa2e692ba054dbba210c9",
23
+ "size": 227880817
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude",
27
- "checksum": "7f0986bf7db5412dd72cd45f623a417ba7a663922d8c868044bd155a55eb3f8c",
28
- "size": 216685859
27
+ "checksum": "4f16635c098b8302d5eaf83fe726c3582e00d91cf56a37d18d0c91efbcac6cd9",
28
+ "size": 217281606
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude",
32
- "checksum": "7bd4ba6b50c63ab0e39a3db338135a1808e458b37e40ef2afa231747be567139",
33
- "size": 218982568
32
+ "checksum": "3adaebe59f10524bd9d19ebb3d090c3207b67143c0f40ec1cfc544409f8ded60",
33
+ "size": 219578057
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe",
37
- "checksum": "37e012da688493c799d385e9d1aa811661a3be41e837c7d5687d010aaf5c7a35",
38
- "size": 235484832
37
+ "checksum": "6dfdfa45ce01928317abb6c3774e0c533952c471002e468dd254022acd39e268",
38
+ "size": 236043424
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe",
42
- "checksum": "17e30cc59a3e2a8913dee20383fe5d119b1a5a1214a1a989331c7bf8fc39e522",
43
- "size": 227694240
42
+ "checksum": "aadd9629f391a76e23bab6d06f8a6fe38f01137831012c96356cac178820e960",
43
+ "size": 228253856
44
44
  }
45
45
  }
46
46
  }
package/manifest.zst.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "version": "2.1.58",
3
- "buildDate": "2026-02-25T19:23:37Z",
2
+ "version": "2.1.59",
3
+ "buildDate": "2026-02-25T23:40:09Z",
4
4
  "platforms": {
5
5
  "darwin-arm64": {
6
6
  "binary": "claude.zst",
7
- "checksum": "5d31443008491cfd59b76ce9de3eb5cd30109462972fe41988ac69f6e4461bf1",
8
- "size": 39450882
7
+ "checksum": "2c7b6b64ff84b32137f4ec9192ad123e1a4307ff8c87a39bcee976f972edadc8",
8
+ "size": 39568329
9
9
  },
10
10
  "darwin-x64": {
11
11
  "binary": "claude.zst",
12
- "checksum": "f38d9b97b1ee41be4ee8f07c578ce96e4cc13e4f82e12d862111b74477c5acd6",
13
- "size": 41631791
12
+ "checksum": "a3fddc9042a929ffec3c85afb44c5e6c463e0e09ee3b52744bd48b550e34fe5d",
13
+ "size": 41753192
14
14
  },
15
15
  "linux-arm64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "e464198f3906307db2f03ad74695c6d7849115180d18944158c191cdab5c32ee",
18
- "size": 50149811
17
+ "checksum": "d88c9ccdedcaa028f9d777f5f5dfced4bc8b8f1f16fe6ccf984d4cda67d18fc4",
18
+ "size": 50268125
19
19
  },
20
20
  "linux-x64": {
21
21
  "binary": "claude.zst",
22
- "checksum": "3ce8f073fb6e5346b190b9c0a22e70aad2f7c4da5c28ebfdf66173e9bd7b6fc9",
23
- "size": 50863907
22
+ "checksum": "f736b36fcd7cd43aa4f9d49b90ade42772d93d6b0d79392febd2b403e993b0bb",
23
+ "size": 50988214
24
24
  },
25
25
  "linux-arm64-musl": {
26
26
  "binary": "claude.zst",
27
- "checksum": "781a7d389e31c303b1114c44b9f009fe464d01613c4fcde5ab2e2807d6d05666",
28
- "size": 48466812
27
+ "checksum": "e365ca494621cc22ab1f0a6529313c60fd61545864bb5125b345422a8914d385",
28
+ "size": 48590016
29
29
  },
30
30
  "linux-x64-musl": {
31
31
  "binary": "claude.zst",
32
- "checksum": "ba083e65cfaf95708272470f1bbe5f75348282a865399ef493688c06ffad1dd5",
33
- "size": 49097157
32
+ "checksum": "8c542251bb243ffdf49edd102268a669759a064a232e44c321f5492e5e2328dd",
33
+ "size": 49199121
34
34
  },
35
35
  "win32-x64": {
36
36
  "binary": "claude.exe.zst",
37
- "checksum": "9e0b5ca4dd486be664f8230004b1e85325a56a90afcd6c9f913fb3430ee68b7b",
38
- "size": 52770528
37
+ "checksum": "6d67ce0325ddc4540a454974fab51d265cdefeaa221deb5e9d2797eb7937e8bc",
38
+ "size": 52890200
39
39
  },
40
40
  "win32-arm64": {
41
41
  "binary": "claude.exe.zst",
42
- "checksum": "dc9c42213bb09c19222cfe79aae0c1e2b62d07d871dd7ec83eb60bd109ef6d72",
43
- "size": 50149908
42
+ "checksum": "a4fcfd2c60fed9b75d2c5d26f49c749a46477759533e558d7f2c616d5491746b",
43
+ "size": 50267589
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.58",
3
+ "version": "0.2.59",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "engines": {
@@ -38,5 +38,5 @@
38
38
  "@img/sharp-win32-arm64": "^0.34.2",
39
39
  "@img/sharp-win32-x64": "^0.34.2"
40
40
  },
41
- "claudeCodeVersion": "2.1.58"
41
+ "claudeCodeVersion": "2.1.59"
42
42
  }
package/sdk.d.ts CHANGED
@@ -268,6 +268,30 @@ export declare const EXIT_REASONS: readonly ["clear", "logout", "prompt_input_ex
268
268
 
269
269
  export declare type ExitReason = 'clear' | 'logout' | 'prompt_input_exit' | 'other' | 'bypass_permissions_disabled';
270
270
 
271
+ /**
272
+ * Reads a session's conversation messages from its JSONL transcript file.
273
+ *
274
+ * Parses the transcript, builds the conversation chain via parentUuid links,
275
+ * and returns user/assistant messages in chronological order.
276
+ *
277
+ * @param sessionId - UUID of the session to read
278
+ * @param options - Optional dir, limit, and offset
279
+ * @returns Array of user/assistant messages, or empty array if session not found
280
+ */
281
+ export declare function getSessionMessages(_sessionId: string, _options?: GetSessionMessagesOptions): Promise<SessionMessage[]>;
282
+
283
+ /**
284
+ * Options for retrieving session messages.
285
+ */
286
+ export declare type GetSessionMessagesOptions = {
287
+ /** Project directory to find the session in. If omitted, searches all projects. */
288
+ dir?: string;
289
+ /** Maximum number of messages to return. */
290
+ limit?: number;
291
+ /** Number of messages to skip from the start. */
292
+ offset?: number;
293
+ };
294
+
271
295
  export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "Notification", "UserPromptSubmit", "SessionStart", "SessionEnd", "Stop", "SubagentStart", "SubagentStop", "PreCompact", "PermissionRequest", "Setup", "TeammateIdle", "TaskCompleted", "ConfigChange", "WorktreeCreate", "WorktreeRemove"];
272
296
 
273
297
  /**
@@ -1876,6 +1900,18 @@ export declare type SessionEndHookInput = BaseHookInput & {
1876
1900
  reason: ExitReason;
1877
1901
  };
1878
1902
 
1903
+ /**
1904
+ * A user or assistant message from a session transcript.
1905
+ * Returned by `getSessionMessages` for reading historical session data.
1906
+ */
1907
+ export declare type SessionMessage = {
1908
+ type: 'user' | 'assistant';
1909
+ uuid: string;
1910
+ session_id: string;
1911
+ message: unknown;
1912
+ parent_tool_use_id: null;
1913
+ };
1914
+
1879
1915
  export declare type SessionStartHookInput = BaseHookInput & {
1880
1916
  hook_event_name: 'SessionStart';
1881
1917
  source: 'startup' | 'resume' | 'clear' | 'compact';