@anthropic-ai/claude-agent-sdk 0.1.46 → 0.1.49

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.
Files changed (4) hide show
  1. package/cli.js +1396 -1347
  2. package/package.json +1 -1
  3. package/sdk.d.ts +2 -0
  4. package/sdk.mjs +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.1.46",
3
+ "version": "0.1.49",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "engines": {
package/sdk.d.ts CHANGED
@@ -329,10 +329,12 @@ export type SDKUserMessageReplay = SDKUserMessageContent & {
329
329
  */
330
330
  isReplay: true;
331
331
  };
332
+ export type SDKAssistantMessageError = 'authentication_failed' | 'billing_error' | 'rate_limit' | 'invalid_request' | 'server_error' | 'unknown';
332
333
  export type SDKAssistantMessage = {
333
334
  type: 'assistant';
334
335
  message: APIAssistantMessage;
335
336
  parent_tool_use_id: string | null;
337
+ error?: SDKAssistantMessageError;
336
338
  uuid: UUID;
337
339
  session_id: string;
338
340
  };
package/sdk.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://docs.claude.com/en/docs/claude-code/legal-and-compliance.
3
3
 
4
- // Version: 0.1.46
4
+ // Version: 0.1.49
5
5
 
6
6
  // Want to see the unminified source? We're hiring!
7
7
  // https://job-boards.greenhouse.io/anthropic/jobs/4816199008
@@ -7442,7 +7442,8 @@ function getInitialState() {
7442
7442
  lastAPIRequest: null,
7443
7443
  inMemoryErrorLog: [],
7444
7444
  inlinePlugins: [],
7445
- sessionBypassPermissionsMode: false
7445
+ sessionBypassPermissionsMode: false,
7446
+ hasExitedPlanMode: false
7446
7447
  };
7447
7448
  }
7448
7449
  var STATE = getInitialState();
@@ -14822,7 +14823,7 @@ function query({
14822
14823
  const dirname2 = join3(filename, "..");
14823
14824
  pathToClaudeCodeExecutable = join3(dirname2, "cli.js");
14824
14825
  }
14825
- process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.46";
14826
+ process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.49";
14826
14827
  const {
14827
14828
  abortController = createAbortController(),
14828
14829
  additionalDirectories = [],