@anthropic-ai/claude-code 2.1.1 → 2.1.3

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 (3) hide show
  1. package/cli.js +2230 -2312
  2. package/package.json +1 -1
  3. package/sdk-tools.d.ts +29 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "bin": {
5
5
  "claude": "cli.js"
6
6
  },
package/sdk-tools.d.ts CHANGED
@@ -54,6 +54,10 @@ export interface AgentInput {
54
54
  * Set to true to run this agent in the background. The tool result will include an output_file path - use Read tool or Bash tail to check on output.
55
55
  */
56
56
  run_in_background?: boolean;
57
+ /**
58
+ * Maximum number of agentic turns (API round-trips) before stopping. Used internally for warmup.
59
+ */
60
+ max_turns?: number;
57
61
  }
58
62
  export interface BashInput {
59
63
  /**
@@ -65,18 +69,17 @@ export interface BashInput {
65
69
  */
66
70
  timeout?: number;
67
71
  /**
68
- * Clear, concise description of what this command does in 5-10 words, in active voice. Examples:
69
- * Input: ls
70
- * Output: List files in current directory
71
- *
72
- * Input: git status
73
- * Output: Show working tree status
72
+ * Clear, concise description of what this command does in active voice. Never use words like "complex" or "risk" in the description - just describe what it does.
74
73
  *
75
- * Input: npm install
76
- * Output: Install package dependencies
74
+ * For simple commands (git, npm, standard CLI tools), keep it brief (5-10 words):
75
+ * - ls "List files in current directory"
76
+ * - git status → "Show working tree status"
77
+ * - npm install → "Install package dependencies"
77
78
  *
78
- * Input: mkdir foo
79
- * Output: Create directory 'foo'
79
+ * For commands that are harder to parse at a glance (piped commands, obscure flags, etc.), add enough context to clarify what it does:
80
+ * - find . -name "*.tmp" -exec rm {} \; → "Find and delete all .tmp files recursively"
81
+ * - git reset --hard origin/main → "Discard all local changes and match remote main"
82
+ * - curl -s url | jq '.data[]' → "Fetch JSON from URL and extract data array elements"
80
83
  */
81
84
  description?: string;
82
85
  /**
@@ -87,6 +90,13 @@ export interface BashInput {
87
90
  * Set this to true to dangerously override sandbox mode and run commands without sandboxing.
88
91
  */
89
92
  dangerouslyDisableSandbox?: boolean;
93
+ /**
94
+ * Internal: pre-computed sed edit result from preview
95
+ */
96
+ _simulatedSedEdit?: {
97
+ filePath: string;
98
+ newContent: string;
99
+ };
90
100
  }
91
101
  export interface TaskOutputInput {
92
102
  /**
@@ -1484,6 +1494,15 @@ export interface AskUserQuestionInput {
1484
1494
  answers?: {
1485
1495
  [k: string]: string;
1486
1496
  };
1497
+ /**
1498
+ * Optional metadata for tracking and analytics purposes. Not displayed to user.
1499
+ */
1500
+ metadata?: {
1501
+ /**
1502
+ * Optional identifier for the source of this question (e.g., "remember" for /remember command). Used for analytics tracking.
1503
+ */
1504
+ source?: string;
1505
+ };
1487
1506
  }
1488
1507
  export interface ConfigInput {
1489
1508
  /**