@anthropic-ai/claude-agent-sdk 0.3.226 → 0.3.228

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,53 +1,51 @@
1
1
  {
2
- "version": "2.1.226",
3
- "commit": "e140b3281c1e8d834468889bd0a5c3fd2f15507c",
4
- "buildDate": "2026-08-08T01:00:56Z",
2
+ "version": "2.1.228",
3
+ "commit": "4a2077e9c39676b5c335919018dda18f476a7f70",
4
+ "buildDate": "2026-08-11T01:54:41Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "013a1cf17df5ff1dcc189d5d6fd3fdd5f097ddc3cd41aa9992e99805574febbe",
9
- "size": 279661952
8
+ "checksum": "43484b1352cef03a08346f36ef0437755b1aad646ab9313ce187857b794b7247",
9
+ "size": 289298144
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "773b095876f13ddb8336bfae202a57c62e358b1882746f1d55e3680601a32c59",
14
- "size": 289284768
13
+ "checksum": "7852f1ae0efb64d46d77a57d8852daddc4a6ffb58aeda6267bd3f3428adc09b3",
14
+ "size": 298977312
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "feb715ee066d02a400c9d83941592f11c8e8fa6628c1e3c14262bc529f950498",
19
- "size": 294566840
18
+ "checksum": "2664006219497bf7021ac43156519cd42eda64ceb2a66f434ecab83e7831f942",
19
+ "size": 305118136
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "4e9bec1177ce9690e8bd988b710ac24105e70da428dd094c5adcbbe786a55555",
24
- "size": 297831432
23
+ "checksum": "d535985e6941a3eb00179ccd7f52ceb0c6623a0305a518ebc4e6514f84a94c99",
24
+ "size": 308521992
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "8c58e37c14e09f0be1b5b42e1fc4f409f1124ccc584a8633b99b7e8e63d79bd0",
29
- "size": 287880552
28
+ "checksum": "1b8034fb30c90ea7471d6403bc610cb5173b7dedab3a92e89f6a91430c481876",
29
+ "size": 298431848
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "d199d62f2ce2fca6138256f788ecd6157cacc40edb3b50ce22b8f974f816111a",
34
- "size": 292438608
33
+ "checksum": "0285be21af52692e5d1ea2199171b45fc85d9ca62fb4a2d9f2c244c2bbca8de7",
34
+ "size": 303129168
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "cec4e772e8237357554a8a5a86f821db9081e9fb05499bc4e5fd14b73f48708c",
39
- "size": 287053472
38
+ "checksum": "841efce70b048ae03c752f79000cb6be5c2c2c4d0478f3eaaa762494ade9daf5",
39
+ "size": 296308896
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "6512422580a1f705301f7a1f6cebe436b207ed4f8a3fc23caf23295b7e8745bd",
44
- "size": 281726112
43
+ "checksum": "e1d23400b3eef8f7b2ddde782ce4d3153aa88b5397d0f42813b8abbe0b47cbcd",
44
+ "size": 290981024
45
45
  }
46
46
  },
47
47
  "sdkCompat": {
48
48
  "testedWrapperVersions": [
49
- "0.3.185",
50
- "0.3.186",
51
49
  "0.3.187",
52
50
  "0.3.190",
53
51
  "0.3.191",
@@ -73,9 +71,11 @@
73
71
  "0.3.216",
74
72
  "0.3.217",
75
73
  "0.3.218",
74
+ "0.3.219",
76
75
  "0.3.220",
77
76
  "0.3.221",
78
- "0.3.222"
77
+ "0.3.222",
78
+ "0.3.226"
79
79
  ],
80
80
  "harnessSchema": 1
81
81
  }
package/manifest.zst.json CHANGED
@@ -1,61 +1,59 @@
1
1
  {
2
- "version": "2.1.226",
3
- "commit": "e140b3281c1e8d834468889bd0a5c3fd2f15507c",
4
- "buildDate": "2026-08-08T01:03:06Z",
2
+ "version": "2.1.228",
3
+ "commit": "4a2077e9c39676b5c335919018dda18f476a7f70",
4
+ "buildDate": "2026-08-11T01:56:29Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "6dc9312381e5d68645864121037b7143bdaab6fd4f3c808bcfce6e0b8d507342",
9
- "size": 56020044,
8
+ "checksum": "21df99480ffce8781bd357d6f3f2844b03a81ac3f71727ffd1d3e0d6cc765bbf",
9
+ "size": 57935761,
10
10
  "bundle": {
11
- "checksum": "6caab5729f74a0f4b49527f1e2299511d62c3023d6d2c6d4954e58b90a96cac5",
12
- "size": 56017628
11
+ "checksum": "95d8bc5a12b9c21564c55709295a1d8de9a7532bcd2e7dc031b33a6f8eceee4d",
12
+ "size": 57935873
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "a5460eac3acbdc8b4c549dd5a4fbdbcd6acc1e8442bc8510e2040ae85fac1476",
18
- "size": 60662642,
17
+ "checksum": "5266fd1abe8b8cea84c1a4f859a0adeffd23beb99b8d85b1539ca2449a3df008",
18
+ "size": 62783370,
19
19
  "bundle": {
20
- "checksum": "8c4d2d76a4e2ecb7d6de675549682ca4fa00977b9b77cf7dfd14f3a5d9626aac",
21
- "size": 60658255
20
+ "checksum": "b8ae6943413bf0051dc36ba247b8fc93bca1627788ee943dd8551cfcf3a87a3f",
21
+ "size": 62791085
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "4b93a92c7604583d5cede463212d50d650c7fa73fe24986532cc6b90f8b28417",
27
- "size": 64773738
26
+ "checksum": "271ec60acbb9b5a2aa7ed0377efe5b59bc5f886abcb18641a9e658326e9b62c4",
27
+ "size": 67104530
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "b36fed0065ec4a1ea68cda8227842ee04edbf140bf5cd628e67c7d5131c937b4",
32
- "size": 66134389
31
+ "checksum": "7d8f14807313c7e49391def5437e8d0114ac8e6bbe37d69de19b6a820721e78f",
32
+ "size": 68448270
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "e827ad149ac6162c94999e1ee5b4310820675316ea3ea7f9614a2d8586a5e47f",
37
- "size": 63548327
36
+ "checksum": "4fdea2b6f3a078db41fdd4683e7662fe6fd546a678e0f6d7d8085c73a8b466b3",
37
+ "size": 65900011
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "dd91233775c9aff5b51473aecb8097afb0468db83c019536996fb2eccfd1e696",
42
- "size": 64943293
41
+ "checksum": "4be5575eaae712ee5a3215104837bc24b92856454e14fa00c3e3fa8e13da085a",
42
+ "size": 67280962
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "6a640ec9418707e47edd394dc169cde3e67a738ed2aca6fc0fd532c0903cbfdc",
47
- "size": 66256320
46
+ "checksum": "9dfbd1c18bab440bd92f1aac6080e81b20ef37b9042b64b0dd9ce73961abdca8",
47
+ "size": 68451362
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "8a1b005c7dbdccf430868e407302beec8629cf3f00dbb451d097f955e4984ee3",
52
- "size": 64367219
51
+ "checksum": "135dc669e2edbe2edab2d262316fd07e0fff0b554547050d08091c412ee2e8e7",
52
+ "size": 66489564
53
53
  }
54
54
  },
55
55
  "sdkCompat": {
56
56
  "testedWrapperVersions": [
57
- "0.3.185",
58
- "0.3.186",
59
57
  "0.3.187",
60
58
  "0.3.190",
61
59
  "0.3.191",
@@ -81,9 +79,11 @@
81
79
  "0.3.216",
82
80
  "0.3.217",
83
81
  "0.3.218",
82
+ "0.3.219",
84
83
  "0.3.220",
85
84
  "0.3.221",
86
- "0.3.222"
85
+ "0.3.222",
86
+ "0.3.226"
87
87
  ],
88
88
  "harnessSchema": 1
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.226",
3
+ "version": "0.3.228",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -57,14 +57,14 @@
57
57
  "zod": "^4.0.0"
58
58
  },
59
59
  "optionalDependencies": {
60
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.226",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.226",
62
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.226",
63
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.226",
64
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.226",
65
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.226",
66
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.226",
67
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.226"
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.228",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.228",
62
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.228",
63
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.228",
64
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.228",
65
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.228",
66
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.228",
67
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.228"
68
68
  },
69
69
  "files": [
70
70
  "sdk.mjs",
@@ -80,5 +80,5 @@
80
80
  "manifest.json",
81
81
  "manifest.zst.json"
82
82
  ],
83
- "claudeCodeVersion": "2.1.226"
83
+ "claudeCodeVersion": "2.1.228"
84
84
  }
package/sdk-tools.d.ts CHANGED
@@ -48,6 +48,7 @@ export type ToolInputSchemas =
48
48
  | ShowOnboardingRolePickerInput
49
49
  | MonitorInput
50
50
  | ProposeSkillsInput
51
+ | ProposeGoalInput
51
52
  | ArtifactInput
52
53
  | PushNotificationInput
53
54
  | EnterWorktreeInput
@@ -87,6 +88,7 @@ export type ToolOutputSchemas =
87
88
  | ScheduleWakeupOutput
88
89
  | MonitorOutput
89
90
  | ProposeSkillsOutput
91
+ | ProposeGoalOutput
90
92
  | EnterPlanModeOutput
91
93
  | REPLOutput
92
94
  | WorkflowOutput
@@ -127,6 +129,9 @@ export type AgentOutput =
127
129
  inference_geo?: string | null;
128
130
  speed?: string | null;
129
131
  iterations?: unknown;
132
+ output_tokens_details?: {
133
+ thinking_tokens?: number | null;
134
+ } | null;
130
135
  };
131
136
  toolStats?: {
132
137
  readCount: number;
@@ -499,7 +504,7 @@ export interface AgentInput {
499
504
  */
500
505
  model?: "sonnet" | "opus" | "haiku" | "fable";
501
506
  /**
502
- * Agents run in the background by default; you will be notified when one completes. Set to false to run this agent synchronously when you need its result before continuing.
507
+ * Agents run in the background by default; you will be notified when one completes. Set to false only when your very next action depends on this agent's result and nothing else could usefully happen while it runs — otherwise leave it in the background so the user can hand you other work.
503
508
  */
504
509
  run_in_background?: boolean;
505
510
  /**
@@ -2661,11 +2666,19 @@ export interface ScheduleWakeupInput {
2661
2666
  stop?: boolean;
2662
2667
  }
2663
2668
  export interface RemoteTriggerInput {
2664
- action: "list" | "get" | "create" | "update" | "run" | "create_webhook_trigger";
2669
+ action: "list" | "get" | "create" | "update" | "run" | "create_webhook_trigger" | "list_runs" | "get_run_log";
2665
2670
  /**
2666
- * Required for get, update, and run
2671
+ * Required for get, update, run, and list_runs
2667
2672
  */
2668
2673
  trigger_id?: string;
2674
+ /**
2675
+ * Required for get_run_log: a run session id (cse_… or session_…, from list_runs)
2676
+ */
2677
+ session_id?: string;
2678
+ /**
2679
+ * next_cursor from a previous list_runs or get_run_log page
2680
+ */
2681
+ cursor?: string;
2669
2682
  /**
2670
2683
  * Required for create and update; optional for run
2671
2684
  */
@@ -2850,6 +2863,16 @@ export interface ProposeSkillsInput {
2850
2863
  }
2851
2864
  ];
2852
2865
  }
2866
+ export interface ProposeGoalInput {
2867
+ /**
2868
+ * The completion condition to propose, written so a separate evaluator can verify it from the conversation (e.g. "all tests in test/auth pass (bun test exits 0)"). At most 500 characters — the user must be able to read the whole condition in the approval dialog.
2869
+ */
2870
+ condition: string;
2871
+ /**
2872
+ * Whether to ask the user for approval before the goal is set. Defaults to true — an approval dialog is shown. Set false ONLY when the user's own words in this conversation stated this outcome as what they want; the goal is then set directly, with a visible notice in the transcript, and the user can clear it with /goal clear.
2873
+ */
2874
+ ask_user?: boolean;
2875
+ }
2853
2876
  export interface ArtifactInput {
2854
2877
  /**
2855
2878
  * Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it.
@@ -2872,7 +2895,7 @@ export interface ArtifactInput {
2872
2895
  */
2873
2896
  scope?: "mine" | "shared" | "all";
2874
2897
  /**
2875
- * Title for the artifact — the name shown in the browser tab and gallery. Prefer a <title> tag in the HTML itself; this parameter fills in only when the file lacks one and never overrides the tag. HTML publishes only — Markdown pages keep their filename identity. Content always comes from file_path — there is no inline content parameter.
2898
+ * Title for the artifact — the name shown in the browser tab and gallery. A short, distinctive noun-phrase name — not a generic label, a summary, or a name with an appended explainer. Prefer a <title> tag at the top of the HTML itself; this parameter fills in only when the file lacks one in the first 8KB of the file, and never overrides the tag. HTML publishes only — Markdown pages keep their filename identity. Content always comes from file_path — there is no inline content parameter.
2876
2899
  */
2877
2900
  title?: string;
2878
2901
  /**
@@ -2884,7 +2907,7 @@ export interface ArtifactInput {
2884
2907
  */
2885
2908
  label?: string;
2886
2909
  /**
2887
- * Existing artifact URL to update in place. Pass whenever the user wants to update an artifact this conversation did not publish — "update my artifact", "keep the same link", a pasted artifact URL — and find the URL with action: "list" if you don't have it; without this, a conversation that didn't publish the artifact always mints a new URL. Omit for new artifacts and same-conversation redeploys. Must be an artifact the user owns.
2910
+ * Existing artifact URL to update in place. Pass whenever the user wants to update an artifact this conversation did not publish — "update my artifact", "keep the same link", a pasted artifact URL — and find the URL with action: "list" or ask the user for the link if you don't have it; without this, the publish creates a separate artifact instead of updating the existing one. Omit for new artifacts and same-conversation redeploys. Must be an artifact the user owns.
2888
2911
  */
2889
2912
  url?: string;
2890
2913
  /**
@@ -2956,6 +2979,10 @@ export interface BashOutput {
2956
2979
  * Model-facing note that the session cwd was not changed by a backgrounded command containing a directory-change builtin (cd/pushd/popd/chdir)
2957
2980
  */
2958
2981
  backgroundCwdHint?: string;
2982
+ /**
2983
+ * True when this backgrounded command is owned by a synchronous subagent and is therefore terminated when that agent gives its final response; absent when the command survives (main loop, async subagents)
2984
+ */
2985
+ backgroundEndsWithFinalResponse?: true;
2959
2986
  /**
2960
2987
  * Flag to indicate if sandbox mode was overridden
2961
2988
  */
@@ -2995,6 +3022,7 @@ export interface BashOutput {
2995
3022
  commit?: {
2996
3023
  sha: string;
2997
3024
  kind: "committed" | "amended" | "cherry-picked";
3025
+ branch?: string;
2998
3026
  };
2999
3027
  push?: {
3000
3028
  branch: string;
@@ -3709,6 +3737,16 @@ export interface ProposeSkillsOutput {
3709
3737
  */
3710
3738
  proposalCount: number;
3711
3739
  }
3740
+ export interface ProposeGoalOutput {
3741
+ /**
3742
+ * The condition shown to the user for approval, or set directly when ask_user was false
3743
+ */
3744
+ condition: string;
3745
+ /**
3746
+ * Whether the user was asked for approval (true) or the goal was set directly (false)
3747
+ */
3748
+ askUser: boolean;
3749
+ }
3712
3750
  export interface EnterPlanModeOutput {
3713
3751
  /**
3714
3752
  * Confirmation that plan mode was entered
package/sdk.d.ts CHANGED
@@ -2716,7 +2716,7 @@ export declare type ResolvedSettingSource = SettingSource | 'managed' | 'flag';
2716
2716
  * - **The policy tier matches CLI startup** (managed-settings.json,
2717
2717
  * remote-cached managed settings, MDM via macOS plist / Windows
2718
2718
  * HKLM/HKCU, and `managedSettings`) **except** the admin-configured
2719
- * `policyHelper` subprocess is not executed. MDM resolution may invoke
2719
+ * `policyHelper`/`policyHelpers` subprocess is not executed. MDM resolution may invoke
2720
2720
  * `plutil` (macOS, when an MDM plist exists) or `reg.exe` (Windows/WSL)
2721
2721
  * on the first call per process. If your deployment relies on
2722
2722
  * policyHelper to inject managed settings, results will differ.
@@ -5166,6 +5166,43 @@ export declare interface Settings {
5166
5166
  timeoutMs?: number;
5167
5167
  refreshIntervalMs?: 0 | number;
5168
5168
  };
5169
+ /**
5170
+ * Per-OS variant of policyHelper, keyed by platform: macos, linux, windows, wsl. The entry for the current platform wins over policyHelper; a platform with no entry falls back to policyHelper (wsl falls back to the linux entry first). Honored only from admin-controlled policy sources.
5171
+ */
5172
+ policyHelpers?: {
5173
+ macos?: {
5174
+ /**
5175
+ * Absolute path to the helper executable
5176
+ */
5177
+ path: string;
5178
+ timeoutMs?: number;
5179
+ refreshIntervalMs?: 0 | number;
5180
+ };
5181
+ linux?: {
5182
+ /**
5183
+ * Absolute path to the helper executable
5184
+ */
5185
+ path: string;
5186
+ timeoutMs?: number;
5187
+ refreshIntervalMs?: 0 | number;
5188
+ };
5189
+ windows?: {
5190
+ /**
5191
+ * Absolute path to the helper executable
5192
+ */
5193
+ path: string;
5194
+ timeoutMs?: number;
5195
+ refreshIntervalMs?: 0 | number;
5196
+ };
5197
+ wsl?: {
5198
+ /**
5199
+ * Absolute path to the helper executable
5200
+ */
5201
+ path: string;
5202
+ timeoutMs?: number;
5203
+ refreshIntervalMs?: 0 | number;
5204
+ };
5205
+ };
5169
5206
  /**
5170
5207
  * Custom file suggestion configuration for \@ mentions
5171
5208
  */
@@ -6322,7 +6359,10 @@ export declare interface Settings {
6322
6359
  * Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow
6323
6360
  */
6324
6361
  forceLoginMethod?: 'claudeai' | 'console' | 'gateway';
6325
-
6362
+ /**
6363
+ * Cloud gateway URL to pre-fill and auto-connect to during login, alongside forceLoginMethod: "gateway". Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings.
6364
+ */
6365
+ forceLoginGatewayUrl?: string;
6326
6366
  /**
6327
6367
  * Controls whether the SDK parent tier (Options.managedSettings / --managed-settings) layers under this admin tier. "first-wins" (default): parent is dropped — admin tiers are the only policy source. "merge": parent's restrictive-only-filtered settings union under the admin winner. Has no effect when no admin tier exists (parent applies as the sole policy tier, still filtered restrictive-only).
6328
6368
  */
@@ -6656,6 +6696,7 @@ export declare interface Settings {
6656
6696
  * Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model.
6657
6697
  */
6658
6698
  agent?: string;
6699
+
6659
6700
  /**
6660
6701
  * Company announcements to display at startup (one will be randomly selected if multiple are provided)
6661
6702
  */