@anthropic-ai/claude-code 1.0.103 → 1.0.106

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "1.0.103",
3
+ "version": "1.0.106",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "bin": {
package/sdk.d.ts CHANGED
@@ -71,8 +71,6 @@ export type PermissionResult = {
71
71
  behavior: 'deny';
72
72
  message: string;
73
73
  interrupt?: boolean;
74
- } | {
75
- behavior: 'passthrough';
76
74
  };
77
75
  export type PermissionRuleValue = {
78
76
  toolName: string;
@@ -192,7 +190,7 @@ export type Options = {
192
190
  strictMcpConfig?: boolean;
193
191
  };
194
192
  export type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan';
195
- type SDKMessageBase = {
193
+ export type SDKMessageBase = {
196
194
  uuid: UUID;
197
195
  session_id: string;
198
196
  };
@@ -253,7 +251,15 @@ export type SDKSystemMessage = SDKMessageBase & {
253
251
  slash_commands: string[];
254
252
  output_style: string;
255
253
  };
256
- export type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage;
254
+ export type SDKCompactBoundaryMessage = SDKMessageBase & {
255
+ type: 'system';
256
+ subtype: 'compact_boundary';
257
+ compact_metadata: {
258
+ trigger: 'manual' | 'auto';
259
+ pre_tokens: number;
260
+ };
261
+ };
262
+ export type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKCompactBoundaryMessage;
257
263
  export interface Query extends AsyncGenerator<SDKMessage, void> {
258
264
  /**
259
265
  * Interrupt the query.
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.103
5
+ // Version: 1.0.106
6
6
 
7
7
  // Want to see the unminified source? We're hiring!
8
8
  // https://job-boards.greenhouse.io/anthropic/jobs/4816199008
@@ -6518,6 +6518,9 @@ class ProcessTransport {
6518
6518
  process.stderr.write(`${message}
6519
6519
  `);
6520
6520
  }
6521
+ if (this.options.stderr) {
6522
+ this.options.stderr(message);
6523
+ }
6521
6524
  }
6522
6525
  write(data) {
6523
6526
  if (this.abortController.signal.aborted) {
@@ -6848,6 +6851,9 @@ class Query {
6848
6851
  this.handleControlCancelRequest(message);
6849
6852
  continue;
6850
6853
  }
6854
+ if (message.type === "stream_event") {
6855
+ continue;
6856
+ }
6851
6857
  this.inputStream.enqueue(message);
6852
6858
  }
6853
6859
  this.inputStream.done();
Binary file