@anthropic-ai/claude-code 1.0.127 → 2.0.0
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/README.md +6 -4
- package/cli.js +1162 -1245
- package/package.json +1 -1
- package/sdk-tools.d.ts +0 -46
- package/sdk.mjs +5 -5
package/package.json
CHANGED
package/sdk-tools.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export type ToolInputSchemas =
|
|
|
14
14
|
| BashOutputInput
|
|
15
15
|
| ExitPlanModeInput
|
|
16
16
|
| FileEditInput
|
|
17
|
-
| FileMultiEditInput
|
|
18
17
|
| FileReadInput
|
|
19
18
|
| FileWriteInput
|
|
20
19
|
| GlobInput
|
|
@@ -70,10 +69,6 @@ export interface BashInput {
|
|
|
70
69
|
* Set to true to run this command in the background. Use BashOutput to read the output later.
|
|
71
70
|
*/
|
|
72
71
|
run_in_background?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Set this to true to dangerously override sandbox mode and run commands without sandboxing.
|
|
75
|
-
*/
|
|
76
|
-
dangerouslyOverrideSandbox?: boolean;
|
|
77
72
|
}
|
|
78
73
|
export interface BashOutputInput {
|
|
79
74
|
/**
|
|
@@ -109,47 +104,6 @@ export interface FileEditInput {
|
|
|
109
104
|
*/
|
|
110
105
|
replace_all?: boolean;
|
|
111
106
|
}
|
|
112
|
-
export interface FileMultiEditInput {
|
|
113
|
-
/**
|
|
114
|
-
* The absolute path to the file to modify
|
|
115
|
-
*/
|
|
116
|
-
file_path: string;
|
|
117
|
-
/**
|
|
118
|
-
* Array of edit operations to perform sequentially on the file
|
|
119
|
-
*
|
|
120
|
-
* @minItems 1
|
|
121
|
-
*/
|
|
122
|
-
edits: [
|
|
123
|
-
{
|
|
124
|
-
/**
|
|
125
|
-
* The text to replace
|
|
126
|
-
*/
|
|
127
|
-
old_string: string;
|
|
128
|
-
/**
|
|
129
|
-
* The text to replace it with
|
|
130
|
-
*/
|
|
131
|
-
new_string: string;
|
|
132
|
-
/**
|
|
133
|
-
* Replace all occurences of old_string (default false).
|
|
134
|
-
*/
|
|
135
|
-
replace_all?: boolean;
|
|
136
|
-
},
|
|
137
|
-
...{
|
|
138
|
-
/**
|
|
139
|
-
* The text to replace
|
|
140
|
-
*/
|
|
141
|
-
old_string: string;
|
|
142
|
-
/**
|
|
143
|
-
* The text to replace it with
|
|
144
|
-
*/
|
|
145
|
-
new_string: string;
|
|
146
|
-
/**
|
|
147
|
-
* Replace all occurences of old_string (default false).
|
|
148
|
-
*/
|
|
149
|
-
replace_all?: boolean;
|
|
150
|
-
}[]
|
|
151
|
-
];
|
|
152
|
-
}
|
|
153
107
|
export interface FileReadInput {
|
|
154
108
|
/**
|
|
155
109
|
* The absolute path to the file to read
|
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:
|
|
5
|
+
// Version: 2.0.0
|
|
6
6
|
|
|
7
7
|
// Want to see the unminified source? We're hiring!
|
|
8
8
|
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
|
|
@@ -6220,7 +6220,7 @@ import { createInterface } from "readline";
|
|
|
6220
6220
|
|
|
6221
6221
|
// src/utils/fsOperations.ts
|
|
6222
6222
|
import * as fs from "fs";
|
|
6223
|
-
import { stat as statPromise } from "fs/promises";
|
|
6223
|
+
import { stat as statPromise, open } from "fs/promises";
|
|
6224
6224
|
var NodeFsOperations = {
|
|
6225
6225
|
accessSync(fsPath, mode) {
|
|
6226
6226
|
fs.accessSync(fsPath, mode);
|
|
@@ -6397,7 +6397,7 @@ class ProcessTransport {
|
|
|
6397
6397
|
"--input-format",
|
|
6398
6398
|
"stream-json"
|
|
6399
6399
|
];
|
|
6400
|
-
if (customSystemPrompt)
|
|
6400
|
+
if (typeof customSystemPrompt === "string")
|
|
6401
6401
|
args.push("--system-prompt", customSystemPrompt);
|
|
6402
6402
|
if (appendSystemPrompt)
|
|
6403
6403
|
args.push("--append-system-prompt", appendSystemPrompt);
|
|
@@ -6431,13 +6431,13 @@ class ProcessTransport {
|
|
|
6431
6431
|
if (agents && Object.keys(agents).length > 0) {
|
|
6432
6432
|
args.push("--agents", JSON.stringify(agents));
|
|
6433
6433
|
}
|
|
6434
|
-
if (settingSources
|
|
6434
|
+
if (settingSources) {
|
|
6435
6435
|
args.push("--setting-sources", settingSources.join(","));
|
|
6436
6436
|
}
|
|
6437
6437
|
if (strictMcpConfig) {
|
|
6438
6438
|
args.push("--strict-mcp-config");
|
|
6439
6439
|
}
|
|
6440
|
-
if (permissionMode
|
|
6440
|
+
if (permissionMode) {
|
|
6441
6441
|
args.push("--permission-mode", permissionMode);
|
|
6442
6442
|
}
|
|
6443
6443
|
if (fallbackModel) {
|