@anthropic-ai/claude-code 2.0.9 → 2.0.11

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 +1040 -1068
  2. package/package.json +1 -1
  3. package/sdk.d.ts +10 -0
  4. package/sdk.mjs +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "bin": {
package/sdk.d.ts CHANGED
@@ -204,6 +204,7 @@ export type SyncHookJSONOutput = {
204
204
  hookEventName: 'PreToolUse';
205
205
  permissionDecision?: 'allow' | 'deny' | 'ask';
206
206
  permissionDecisionReason?: string;
207
+ updatedInput?: Record<string, unknown>;
207
208
  } | {
208
209
  hookEventName: 'UserPromptSubmit';
209
210
  additionalContext?: string;
@@ -267,6 +268,14 @@ export type ModelInfo = {
267
268
  displayName: string;
268
269
  description: string;
269
270
  };
271
+ /** Information about the logged in user's account. */
272
+ export type AccountInfo = {
273
+ email?: string;
274
+ organization?: string;
275
+ subscriptionType?: string;
276
+ tokenSource?: string;
277
+ apiKeySource?: string;
278
+ };
270
279
  export type McpServerStatus = {
271
280
  name: string;
272
281
  status: 'connected' | 'failed' | 'needs-auth' | 'pending';
@@ -380,6 +389,7 @@ export interface Query extends AsyncGenerator<SDKMessage, void> {
380
389
  supportedCommands(): Promise<SlashCommand[]>;
381
390
  supportedModels(): Promise<ModelInfo[]>;
382
391
  mcpServerStatus(): Promise<McpServerStatus[]>;
392
+ accountInfo(): Promise<AccountInfo>;
383
393
  }
384
394
  /**
385
395
  * @deprecated The Claude Code SDK is now the Claude Agent SDK!
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 Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
3
3
 
4
- // Version: 2.0.9
4
+ // Version: 2.0.11
5
5
 
6
6
  // Want to see the unminified source? We're hiring!
7
7
  // https://job-boards.greenhouse.io/anthropic/jobs/4816199008
@@ -7046,6 +7046,9 @@ class Query {
7046
7046
  const mcpStatusResponse = response.response;
7047
7047
  return mcpStatusResponse.mcpServers;
7048
7048
  }
7049
+ async accountInfo() {
7050
+ return (await this.initialization).account;
7051
+ }
7049
7052
  async streamInput(stream) {
7050
7053
  try {
7051
7054
  for await (const message of stream) {