@anthropic-ai/claude-code 2.1.240 → 2.1.242

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 (2) hide show
  1. package/package.json +9 -9
  2. package/sdk-tools.d.ts +75 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "2.1.240",
3
+ "version": "2.1.242",
4
4
  "bin": {
5
5
  "claude": "bin/claude.exe"
6
6
  },
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {},
23
23
  "optionalDependencies": {
24
- "@anthropic-ai/claude-code-darwin-arm64": "2.1.240",
25
- "@anthropic-ai/claude-code-darwin-x64": "2.1.240",
26
- "@anthropic-ai/claude-code-linux-x64": "2.1.240",
27
- "@anthropic-ai/claude-code-linux-arm64": "2.1.240",
28
- "@anthropic-ai/claude-code-linux-x64-musl": "2.1.240",
29
- "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.240",
30
- "@anthropic-ai/claude-code-win32-x64": "2.1.240",
31
- "@anthropic-ai/claude-code-win32-arm64": "2.1.240"
24
+ "@anthropic-ai/claude-code-darwin-arm64": "2.1.242",
25
+ "@anthropic-ai/claude-code-darwin-x64": "2.1.242",
26
+ "@anthropic-ai/claude-code-linux-x64": "2.1.242",
27
+ "@anthropic-ai/claude-code-linux-arm64": "2.1.242",
28
+ "@anthropic-ai/claude-code-linux-x64-musl": "2.1.242",
29
+ "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.242",
30
+ "@anthropic-ai/claude-code-win32-x64": "2.1.242",
31
+ "@anthropic-ai/claude-code-win32-arm64": "2.1.242"
32
32
  },
33
33
  "files": [
34
34
  "bin/claude.exe",
package/sdk-tools.d.ts CHANGED
@@ -103,6 +103,22 @@ export type ToolOutputSchemas =
103
103
  export type AgentOutput =
104
104
  | {
105
105
  agentId: string;
106
+ /**
107
+ * @internal Count of leading harness-authored content blocks (hand-back provenance bookkeeping; not a stable consumer field)
108
+ */
109
+ harnessNoteCount?: number;
110
+ /**
111
+ * @internal Count of trailing harness-authored content blocks (hand-back provenance bookkeeping; not a stable consumer field)
112
+ */
113
+ harnessTailCount?: number;
114
+ /**
115
+ * @internal Fingerprint binding the harness section counts to the exact content they were computed against; a hook rewrite invalidates the counts rather than misplacing rewritten bytes
116
+ */
117
+ harnessSectionHash?: string;
118
+ /**
119
+ * @internal The handoff review was skipped because the provenance frame covers this delivery (tengu_auto_mode_config.classifyHandoff: false); the tool_result mapper MUST compose the frame when set, regardless of a fresh flag read
120
+ */
121
+ handoffReviewSkipped?: boolean;
106
122
  agentType?: string;
107
123
  content: {
108
124
  type: "text";
@@ -234,6 +250,13 @@ export type FileReadOutput =
234
250
  */
235
251
  truncatedByTokenCap?: boolean;
236
252
  };
253
+ /**
254
+ * Set when this Read completed a saved Artifact source file: the Artifact and the version of it that now counts as viewed.
255
+ */
256
+ artifactRead?: {
257
+ slug: string;
258
+ ver: string;
259
+ };
237
260
  }
238
261
  | {
239
262
  type: "image";
@@ -323,6 +346,27 @@ export type FileReadOutput =
323
346
  */
324
347
  outputDir: string;
325
348
  };
349
+ /**
350
+ * Document page number of the first extracted page (1 when no range was requested); labels the page images in the model-facing tool_result
351
+ */
352
+ firstPage?: number;
353
+ /**
354
+ * Extracted page images, in page order. Present only transiently in-process: the page image bytes are delivered solely as image blocks in the model-facing tool_result content and are not retained on the tool_use_result, so this key is absent on the emitted/persisted result
355
+ */
356
+ pages?: {
357
+ /**
358
+ * Base64-encoded page image; empty when the page could not be processed
359
+ */
360
+ base64: string;
361
+ /**
362
+ * The MIME type of the image
363
+ */
364
+ mediaType: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
365
+ /**
366
+ * Why the page could not be processed as an image; set only when base64 is empty
367
+ */
368
+ error?: string;
369
+ }[];
326
370
  }
327
371
  | {
328
372
  type: "file_unchanged";
@@ -455,6 +499,7 @@ export type ArtifactOutput =
455
499
  trigger_id?: string;
456
500
  durable_since?: string;
457
501
  status?: number;
502
+ detail?: string;
458
503
  note?: string;
459
504
  events?: string[];
460
505
  };
@@ -505,6 +550,8 @@ export type ArtifactOutput =
505
550
  next_in_s?: number;
506
551
  last_failure?: string;
507
552
  reason?: string;
553
+ detail?: string;
554
+ server_message?: string;
508
555
  at?: number;
509
556
  }[];
510
557
  }
@@ -2570,7 +2617,7 @@ export interface SendFeedbackInput {
2570
2617
  */
2571
2618
  title: string;
2572
2619
  /**
2573
- * Labeled bullets, in order: **What happened:** (observed vs. expected, exact error text if short); **What the user said:** (quoted, or "User didn't comment; observed by the model."); **Repro:** (minimal steps); **Evidence:** (request IDs, timestamps, paths, versions omit if none); optionally a final **Cause:** only if verified in-session. One to three lines per bullet. No narrative paragraphs, no speculation, no secrets.
2620
+ * Labeled bullets, in order: **What happened:** (observed vs. expected, exact error text if short); **What the user said:** (quoted, or "User didn't comment; observed by the model."); **Repro:** (minimal steps); **Evidence:** (request IDs, timestamps, paths, versions; omit if none); optionally a final **Cause:** only if verified in-session. One to three lines per bullet. No narrative paragraphs, no speculation, no secrets.
2574
2621
  */
2575
2622
  details: string;
2576
2623
  /**
@@ -2578,7 +2625,7 @@ export interface SendFeedbackInput {
2578
2625
  */
2579
2626
  area?: string;
2580
2627
  /**
2581
- * When the report is about MODEL BEHAVIOR (not a product bug), the closest failure mode or `other` when it is a model-behavior issue that fits no listed value. Omit only when the report is a product/tool bug with no model-behavior component.
2628
+ * When the report is about MODEL BEHAVIOR (not a product bug), the closest failure mode, or `other` when it is a model-behavior issue that fits no listed value. Omit only when the report is a product/tool bug with no model-behavior component.
2582
2629
  */
2583
2630
  failure_mode?:
2584
2631
  | "instruction_following"
@@ -2598,7 +2645,7 @@ export interface SendFeedbackInput {
2598
2645
  | "unwanted_scope"
2599
2646
  | "other";
2600
2647
  /**
2601
- * What kind of task the session was doing when the issue occurred or `other` when it is a clear task that fits no listed value. Omit only if genuinely unclear.
2648
+ * What kind of task the session was doing when the issue occurred, or `other` when it is a clear task that fits no listed value. Omit only if genuinely unclear.
2602
2649
  */
2603
2650
  task_category?: "code_edit" | "debug" | "explain" | "plan" | "shell" | "search" | "review" | "other";
2604
2651
  }
@@ -2797,6 +2844,10 @@ export interface ScheduleWakeupInput {
2797
2844
  * Set to true to end the dynamic loop immediately instead of scheduling another wakeup. When true, all other fields are ignored and no further wakeups fire.
2798
2845
  */
2799
2846
  stop?: boolean;
2847
+ /**
2848
+ * true = nothing changed (you checked and there is nothing to report). false = something happened worth keeping (edited a file, posted a message, advanced state, surfaced a finding). Consecutive noop:true ticks are collapsed in the user's terminal view and tracked as a streak. Required unless `stop` is true.
2849
+ */
2850
+ noop?: boolean;
2800
2851
  }
2801
2852
  export interface RemoteTriggerInput {
2802
2853
  action: "list" | "get" | "create" | "update" | "run" | "create_webhook_trigger" | "list_runs" | "get_run_log";
@@ -3059,7 +3110,7 @@ export interface ArtifactInput {
3059
3110
  */
3060
3111
  prompt?: string;
3061
3112
  /**
3062
- * Last-resort overwrite that DISCARDS the newer published version — another session's publish, or someone's save from a page that can publish new versions of itself. On a conflict the fix is to merge your changes onto the newer content (handed to you in the rejection, or re-read) and publish again — not force. Pass force:true only when the user has explicitly said to discard that specific version; never to get past a conflict on your own judgment. The tracked baseVersion is still sent; with force:true the server treats it as informational and overwrites, unless it refuses force over a version saved from inside the page. Omit (or false) so a concurrent write conflicts instead of being silently clobbered.
3113
+ * Last-resort overwrite that DISCARDS the newer published version's page — another session's publish, or someone's save from a page that can publish new versions of itself. On a conflict the fix is to merge your changes onto the newer content (handed to you in the rejection, or re-read) and publish again — not force. Pass force:true only when the user has explicitly said to discard that specific version; never to get past a conflict on your own judgment. The tracked baseVersion is still sent; with force:true the server treats it as informational and overwrites, unless it refuses force over a version saved from inside the page. Omit (or false) so a concurrent write conflicts instead of being silently clobbered.
3063
3114
  */
3064
3115
  force?: boolean;
3065
3116
  /**
@@ -3987,12 +4038,32 @@ export interface REPLOutput {
3987
4038
  base64: string;
3988
4039
  mediaType: string;
3989
4040
  }[];
4041
+ /**
4042
+ * Count of inner-Read images dropped by the per-result image cap; surfaced as a note in the tool_result
4043
+ */
4044
+ imagesOmitted?: number;
4045
+ /**
4046
+ * Pages of inner page-range Reads that could not be processed as an image; surfaced as one note each in the tool_result
4047
+ */
4048
+ imagePagesFailed?: {
4049
+ page: number;
4050
+ file?: string;
4051
+ error?: string;
4052
+ }[];
4053
+ /**
4054
+ * Count of failed-page notes dropped by the per-result note cap; surfaced as a note in the tool_result
4055
+ */
4056
+ imagePagesFailedOmitted?: number;
3990
4057
  /**
3991
4058
  * PDFs returned by inner Read calls — surfaced as document content blocks
3992
4059
  */
3993
4060
  documents?: {
3994
4061
  base64: string;
3995
4062
  }[];
4063
+ /**
4064
+ * Count of inner-Read PDFs dropped by the per-result document cap; surfaced as a note in the tool_result
4065
+ */
4066
+ documentsOmitted?: number;
3996
4067
  }
3997
4068
  export interface WorkflowOutput {
3998
4069
  status: "async_launched" | "remote_launched";