@anthropic-ai/claude-agent-sdk 0.1.2 → 0.1.8

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 +959 -1093
  2. package/package.json +1 -1
  3. package/sdk.mjs +2 -2
  4. package/sdkTypes.d.ts +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.8",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "engines": {
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: 0.1.2
5
+ // Version: 0.1.8
6
6
 
7
7
  // Want to see the unminified source? We're hiring!
8
8
  // https://job-boards.greenhouse.io/anthropic/jobs/4816199008
@@ -14160,7 +14160,7 @@ function query({
14160
14160
  const dirname = join(filename, "..");
14161
14161
  pathToClaudeCodeExecutable = join(dirname, "cli.js");
14162
14162
  }
14163
- process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.2";
14163
+ process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.8";
14164
14164
  return createSharedQuery({
14165
14165
  prompt,
14166
14166
  options: {
package/sdkTypes.d.ts CHANGED
@@ -293,7 +293,13 @@ export type SDKUserMessage = SDKUserMessageContent & {
293
293
  uuid?: UUID;
294
294
  session_id: string;
295
295
  };
296
- export type SDKUserMessageReplay = SDKMessageBase & SDKUserMessageContent;
296
+ export type SDKUserMessageReplay = SDKMessageBase & SDKUserMessageContent & {
297
+ /**
298
+ * True if this is a replay/acknowledgment of a user message that was already
299
+ * added to the messages array. Used internally to prevent duplicate messages.
300
+ */
301
+ isReplay: true;
302
+ };
297
303
  export type SDKAssistantMessage = SDKMessageBase & {
298
304
  type: 'assistant';
299
305
  message: APIAssistantMessage;