@anthropic-ai/claude-code 1.0.67 → 1.0.68
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 +1186 -1112
- package/package.json +1 -1
- package/sdk-tools.d.ts +0 -11
- package/sdk.d.ts +16 -0
- 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
|
|
@@ -279,16 +278,6 @@ export interface NotebookEditInput {
|
|
|
279
278
|
*/
|
|
280
279
|
edit_mode?: "replace" | "insert" | "delete";
|
|
281
280
|
}
|
|
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
281
|
export interface ReadMcpResourceInput {
|
|
293
282
|
/**
|
|
294
283
|
* The MCP server name
|
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 =
|
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.68
|
|
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
|