@anthropic-ai/claude-code

2.0.52.0.8
sdk.mjs
~sdk.mjsModified
+8−1
Index: package/sdk.mjs
===================================================================
--- package/sdk.mjs
+++ package/sdk.mjs
@@ -1,9 +1,9 @@
 #!/usr/bin/env node
 
 // (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
 
-// Version: 2.0.5
+// Version: 2.0.8
 
 // Want to see the unminified source? We're hiring!
 // https://job-boards.greenhouse.io/anthropic/jobs/4816199008
 
@@ -6374,8 +6374,9 @@
         env = { ...process.env },
         stderr,
         customSystemPrompt,
         appendSystemPrompt,
+        maxThinkingTokens,
         maxTurns,
         model,
         fallbackModel,
         permissionMode,
@@ -6400,8 +6401,11 @@
       if (typeof customSystemPrompt === "string")
         args.push("--system-prompt", customSystemPrompt);
       if (appendSystemPrompt)
         args.push("--append-system-prompt", appendSystemPrompt);
+      if (maxThinkingTokens !== undefined) {
+        args.push("--max-thinking-tokens", maxThinkingTokens.toString());
+      }
       if (maxTurns)
         args.push("--max-turns", maxTurns.toString());
       if (model)
         args.push("--model", model);
@@ -7166,8 +7170,9 @@
     fallbackModel,
     forkSession,
     hooks,
     includePartialMessages,
+    maxThinkingTokens,
     maxTurns,
     mcpServers,
     model,
     pathToClaudeCodeExecutable,
@@ -7218,8 +7223,9 @@
     forkSession,
     stderr,
     customSystemPrompt,
     appendSystemPrompt,
+    maxThinkingTokens,
     maxTurns,
     model,
     fallbackModel,
     permissionMode,
@@ -14138,8 +14144,9 @@
 function query({
   prompt,
   options
 }) {
+  console.warn("The Claude Code SDK is now the Claude Agent SDK! " + "Please install and use @anthropic-ai/claude-agent-sdk instead. " + "See https://docs.claude.com/en/docs/claude-code/sdk/migration-guide for migration instructions.");
   let pathToClaudeCodeExecutable = options?.pathToClaudeCodeExecutable;
   if (!pathToClaudeCodeExecutable) {
     const filename = fileURLToPath(import.meta.url);
     const dirname = join(filename, "..");