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

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 +2397 -2399
  2. package/package.json +1 -1
  3. package/sdk.mjs +8 -2
  4. package/sdkTypes.d.ts +3 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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.0
5
+ // Version: 0.1.2
6
6
 
7
7
  // Want to see the unminified source? We're hiring!
8
8
  // https://job-boards.greenhouse.io/anthropic/jobs/4816199008
@@ -6375,6 +6375,7 @@ class ProcessTransport {
6375
6375
  stderr,
6376
6376
  customSystemPrompt,
6377
6377
  appendSystemPrompt,
6378
+ maxThinkingTokens,
6378
6379
  maxTurns,
6379
6380
  model,
6380
6381
  fallbackModel,
@@ -6401,6 +6402,9 @@ class ProcessTransport {
6401
6402
  args.push("--system-prompt", customSystemPrompt);
6402
6403
  if (appendSystemPrompt)
6403
6404
  args.push("--append-system-prompt", appendSystemPrompt);
6405
+ if (maxThinkingTokens !== undefined) {
6406
+ args.push("--max-thinking-tokens", maxThinkingTokens.toString());
6407
+ }
6404
6408
  if (maxTurns)
6405
6409
  args.push("--max-turns", maxTurns.toString());
6406
6410
  if (model)
@@ -7167,6 +7171,7 @@ function createSharedQuery({
7167
7171
  forkSession,
7168
7172
  hooks,
7169
7173
  includePartialMessages,
7174
+ maxThinkingTokens,
7170
7175
  maxTurns,
7171
7176
  mcpServers,
7172
7177
  model,
@@ -7219,6 +7224,7 @@ function createSharedQuery({
7219
7224
  stderr,
7220
7225
  customSystemPrompt,
7221
7226
  appendSystemPrompt,
7227
+ maxThinkingTokens,
7222
7228
  maxTurns,
7223
7229
  model,
7224
7230
  fallbackModel,
@@ -14154,7 +14160,7 @@ function query({
14154
14160
  const dirname = join(filename, "..");
14155
14161
  pathToClaudeCodeExecutable = join(dirname, "cli.js");
14156
14162
  }
14157
- process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.0";
14163
+ process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.2";
14158
14164
  return createSharedQuery({
14159
14165
  prompt,
14160
14166
  options: {
package/sdkTypes.d.ts CHANGED
@@ -376,19 +376,9 @@ export interface Query extends AsyncGenerator<SDKMessage, void> {
376
376
  mcpServerStatus(): Promise<McpServerStatus[]>;
377
377
  }
378
378
  /**
379
- * Query Claude Code
380
- *
381
- * Behavior:
382
- * - Yields a message at a time
383
- * - Uses the tools and commands you give it
384
- *
385
- * Usage:
386
- * ```ts
387
- * const response = query({ prompt: "Help me write a function", options: {} })
388
- * for await (const message of response) {
389
- * console.log(message)
390
- * }
391
- * ```
379
+ * @deprecated The Claude Code SDK is now the Claude Agent SDK!
380
+ * Please install and use @anthropic-ai/claude-agent-sdk instead.
381
+ * See https://docs.claude.com/en/docs/claude-code/sdk/migration-guide for migration instructions.
392
382
  */
393
383
  export declare function query({ prompt, options, }: {
394
384
  prompt: string | AsyncIterable<SDKUserMessage>;