@anthropic-ai/claude-code 1.0.67 → 1.0.69
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/cli.js +1398 -1124
- package/package.json +1 -1
- package/sdk-tools.d.ts +5 -13
- package/sdk.d.ts +17 -2
- package/sdk.mjs +3 -2
- package/vendor/claude-code.vsix +0 -0
package/package.json
CHANGED
package/sdk-tools.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export type ToolInputSchemas =
|
|
|
24
24
|
| LsInput
|
|
25
25
|
| McpInput
|
|
26
26
|
| NotebookEditInput
|
|
27
|
-
| NotebookReadInput
|
|
28
27
|
| ReadMcpResourceInput
|
|
29
28
|
| TodoWriteInput
|
|
30
29
|
| WebFetchInput
|
|
@@ -81,7 +80,11 @@ export interface BashOutputInput {
|
|
|
81
80
|
/**
|
|
82
81
|
* The ID of the background shell to retrieve output from
|
|
83
82
|
*/
|
|
84
|
-
|
|
83
|
+
bash_id: string;
|
|
84
|
+
/**
|
|
85
|
+
* Optional regular expression to filter the output lines. Only lines matching this regex will be included in the result. Any lines that do not match will no longer be available to read.
|
|
86
|
+
*/
|
|
87
|
+
filter?: string;
|
|
85
88
|
}
|
|
86
89
|
export interface ExitPlanModeInput {
|
|
87
90
|
/**
|
|
@@ -279,16 +282,6 @@ export interface NotebookEditInput {
|
|
|
279
282
|
*/
|
|
280
283
|
edit_mode?: "replace" | "insert" | "delete";
|
|
281
284
|
}
|
|
282
|
-
export interface NotebookReadInput {
|
|
283
|
-
/**
|
|
284
|
-
* The absolute path to the Jupyter notebook file to read (must be absolute, not relative)
|
|
285
|
-
*/
|
|
286
|
-
notebook_path: string;
|
|
287
|
-
/**
|
|
288
|
-
* The ID of a specific cell to read. If not provided, all cells will be read.
|
|
289
|
-
*/
|
|
290
|
-
cell_id?: string;
|
|
291
|
-
}
|
|
292
285
|
export interface ReadMcpResourceInput {
|
|
293
286
|
/**
|
|
294
287
|
* The MCP server name
|
|
@@ -306,7 +299,6 @@ export interface TodoWriteInput {
|
|
|
306
299
|
todos: {
|
|
307
300
|
content: string;
|
|
308
301
|
status: "pending" | "in_progress" | "completed";
|
|
309
|
-
priority: "high" | "medium" | "low";
|
|
310
302
|
id: string;
|
|
311
303
|
}[];
|
|
312
304
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -36,6 +36,21 @@ export type McpServerConfig =
|
|
|
36
36
|
| McpSSEServerConfig
|
|
37
37
|
| McpHttpServerConfig
|
|
38
38
|
|
|
39
|
+
export type PermissionResult =
|
|
40
|
+
| {
|
|
41
|
+
behavior: 'allow'
|
|
42
|
+
updatedInput: Record<string, unknown>
|
|
43
|
+
}
|
|
44
|
+
| {
|
|
45
|
+
behavior: 'deny'
|
|
46
|
+
message: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type CanUseTool = (
|
|
50
|
+
toolName: string,
|
|
51
|
+
input: Record<string, unknown>,
|
|
52
|
+
) => Promise<PermissionResult>
|
|
53
|
+
|
|
39
54
|
export type Options = {
|
|
40
55
|
abortController?: AbortController
|
|
41
56
|
allowedTools?: string[]
|
|
@@ -56,6 +71,7 @@ export type Options = {
|
|
|
56
71
|
model?: string
|
|
57
72
|
fallbackModel?: string
|
|
58
73
|
stderr?: (data: string) => void
|
|
74
|
+
canUseTool?: CanUseTool
|
|
59
75
|
}
|
|
60
76
|
|
|
61
77
|
export type PermissionMode =
|
|
@@ -127,7 +143,6 @@ export type SDKMessage =
|
|
|
127
143
|
|
|
128
144
|
type Props = {
|
|
129
145
|
prompt: string | AsyncIterable<SDKUserMessage>
|
|
130
|
-
abortController?: AbortController
|
|
131
146
|
options?: Options
|
|
132
147
|
}
|
|
133
148
|
|
|
@@ -154,6 +169,6 @@ export interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
154
169
|
* }
|
|
155
170
|
* ```
|
|
156
171
|
*/
|
|
157
|
-
export function query({ prompt,
|
|
172
|
+
export function query({ prompt, options }: Props): Query
|
|
158
173
|
|
|
159
174
|
export class AbortError extends Error {}
|
package/sdk.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
|
|
2
2
|
|
|
3
|
-
// Version: 1.0.
|
|
3
|
+
// Version: 1.0.69
|
|
4
4
|
|
|
5
5
|
// src/entrypoints/sdk.ts
|
|
6
6
|
import { spawn } from "child_process";
|
|
@@ -186,9 +186,10 @@ function query({
|
|
|
186
186
|
throw new ReferenceError(`Claude Code executable not found at ${pathToClaudeCodeExecutable}. Is options.pathToClaudeCodeExecutable set?`);
|
|
187
187
|
}
|
|
188
188
|
logDebug(`Spawning Claude Code process: ${executable} ${[...executableArgs, pathToClaudeCodeExecutable, ...args].join(" ")}`);
|
|
189
|
+
const stderrMode = env.DEBUG || stderr ? "pipe" : "ignore";
|
|
189
190
|
const child = spawn(executable, [...executableArgs, pathToClaudeCodeExecutable, ...args], {
|
|
190
191
|
cwd,
|
|
191
|
-
stdio: ["pipe", "pipe",
|
|
192
|
+
stdio: ["pipe", "pipe", stderrMode],
|
|
192
193
|
signal: abortController.signal,
|
|
193
194
|
env
|
|
194
195
|
});
|
package/vendor/claude-code.vsix
CHANGED
|
Binary file
|