@anthropic-ai/claude-code 1.0.112 → 1.0.113

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 +893 -891
  2. package/package.json +1 -1
  3. package/sdk.d.ts +14 -0
  4. package/sdk.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "1.0.112",
3
+ "version": "1.0.113",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "bin": {
package/sdk.d.ts CHANGED
@@ -7,6 +7,14 @@ import { type z, type ZodRawShape, type ZodObject } from 'zod';
7
7
  export type NonNullableUsage = {
8
8
  [K in keyof Usage]: NonNullable<Usage[K]>;
9
9
  };
10
+ export type ModelUsage = {
11
+ inputTokens: number;
12
+ outputTokens: number;
13
+ cacheReadInputTokens: number;
14
+ cacheCreationInputTokens: number;
15
+ webSearchRequests: number;
16
+ costUSD: number;
17
+ };
10
18
  export type ApiKeySource = 'user' | 'project' | 'org' | 'temporary';
11
19
  export type ConfigScope = 'local' | 'user' | 'project';
12
20
  export type McpStdioServerConfig = {
@@ -280,6 +288,9 @@ export type SDKResultMessage = (SDKMessageBase & {
280
288
  result: string;
281
289
  total_cost_usd: number;
282
290
  usage: NonNullableUsage;
291
+ modelUsage: {
292
+ [modelName: string]: ModelUsage;
293
+ };
283
294
  permission_denials: SDKPermissionDenial[];
284
295
  }) | (SDKMessageBase & {
285
296
  type: 'result';
@@ -290,6 +301,9 @@ export type SDKResultMessage = (SDKMessageBase & {
290
301
  num_turns: number;
291
302
  total_cost_usd: number;
292
303
  usage: NonNullableUsage;
304
+ modelUsage: {
305
+ [modelName: string]: ModelUsage;
306
+ };
293
307
  permission_denials: SDKPermissionDenial[];
294
308
  });
295
309
  export type SDKSystemMessage = SDKMessageBase & {
package/sdk.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
4
4
 
5
- // Version: 1.0.112
5
+ // Version: 1.0.113
6
6
 
7
7
  // Want to see the unminified source? We're hiring!
8
8
  // https://job-boards.greenhouse.io/anthropic/jobs/4816199008