@anthropic-ai/claude-agent-sdk 0.1.60 → 0.1.62
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 +1254 -1232
- package/package.json +1 -1
- package/sandboxTypes.d.ts +12 -0
- package/sdk.mjs +11 -2
package/package.json
CHANGED
package/sandboxTypes.d.ts
CHANGED
|
@@ -9,18 +9,21 @@ import { z } from 'zod';
|
|
|
9
9
|
* Network configuration schema for sandbox.
|
|
10
10
|
*/
|
|
11
11
|
export declare const SandboxNetworkConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
13
|
allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
13
14
|
allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
|
|
14
15
|
allowLocalBinding: z.ZodOptional<z.ZodBoolean>;
|
|
15
16
|
httpProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
16
17
|
socksProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
17
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
allowedDomains?: string[];
|
|
18
20
|
allowUnixSockets?: string[];
|
|
19
21
|
allowAllUnixSockets?: boolean;
|
|
20
22
|
allowLocalBinding?: boolean;
|
|
21
23
|
httpProxyPort?: number;
|
|
22
24
|
socksProxyPort?: number;
|
|
23
25
|
}, {
|
|
26
|
+
allowedDomains?: string[];
|
|
24
27
|
allowUnixSockets?: string[];
|
|
25
28
|
allowAllUnixSockets?: boolean;
|
|
26
29
|
allowLocalBinding?: boolean;
|
|
@@ -35,18 +38,21 @@ export declare const SandboxSettingsSchema: z.ZodObject<{
|
|
|
35
38
|
autoAllowBashIfSandboxed: z.ZodOptional<z.ZodBoolean>;
|
|
36
39
|
allowUnsandboxedCommands: z.ZodOptional<z.ZodBoolean>;
|
|
37
40
|
network: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
38
42
|
allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
43
|
allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
|
|
40
44
|
allowLocalBinding: z.ZodOptional<z.ZodBoolean>;
|
|
41
45
|
httpProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
42
46
|
socksProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
43
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
allowedDomains?: string[];
|
|
44
49
|
allowUnixSockets?: string[];
|
|
45
50
|
allowAllUnixSockets?: boolean;
|
|
46
51
|
allowLocalBinding?: boolean;
|
|
47
52
|
httpProxyPort?: number;
|
|
48
53
|
socksProxyPort?: number;
|
|
49
54
|
}, {
|
|
55
|
+
allowedDomains?: string[];
|
|
50
56
|
allowUnixSockets?: string[];
|
|
51
57
|
allowAllUnixSockets?: boolean;
|
|
52
58
|
allowLocalBinding?: boolean;
|
|
@@ -71,18 +77,21 @@ export declare const SandboxSettingsSchema: z.ZodObject<{
|
|
|
71
77
|
autoAllowBashIfSandboxed: z.ZodOptional<z.ZodBoolean>;
|
|
72
78
|
allowUnsandboxedCommands: z.ZodOptional<z.ZodBoolean>;
|
|
73
79
|
network: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
81
|
allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
82
|
allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
|
|
76
83
|
allowLocalBinding: z.ZodOptional<z.ZodBoolean>;
|
|
77
84
|
httpProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
78
85
|
socksProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
79
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
allowedDomains?: string[];
|
|
80
88
|
allowUnixSockets?: string[];
|
|
81
89
|
allowAllUnixSockets?: boolean;
|
|
82
90
|
allowLocalBinding?: boolean;
|
|
83
91
|
httpProxyPort?: number;
|
|
84
92
|
socksProxyPort?: number;
|
|
85
93
|
}, {
|
|
94
|
+
allowedDomains?: string[];
|
|
86
95
|
allowUnixSockets?: string[];
|
|
87
96
|
allowAllUnixSockets?: boolean;
|
|
88
97
|
allowLocalBinding?: boolean;
|
|
@@ -107,18 +116,21 @@ export declare const SandboxSettingsSchema: z.ZodObject<{
|
|
|
107
116
|
autoAllowBashIfSandboxed: z.ZodOptional<z.ZodBoolean>;
|
|
108
117
|
allowUnsandboxedCommands: z.ZodOptional<z.ZodBoolean>;
|
|
109
118
|
network: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
110
120
|
allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
111
121
|
allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
|
|
112
122
|
allowLocalBinding: z.ZodOptional<z.ZodBoolean>;
|
|
113
123
|
httpProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
114
124
|
socksProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
115
125
|
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
allowedDomains?: string[];
|
|
116
127
|
allowUnixSockets?: string[];
|
|
117
128
|
allowAllUnixSockets?: boolean;
|
|
118
129
|
allowLocalBinding?: boolean;
|
|
119
130
|
httpProxyPort?: number;
|
|
120
131
|
socksProxyPort?: number;
|
|
121
132
|
}, {
|
|
133
|
+
allowedDomains?: string[];
|
|
122
134
|
allowUnixSockets?: string[];
|
|
123
135
|
allowAllUnixSockets?: boolean;
|
|
124
136
|
allowLocalBinding?: boolean;
|
package/sdk.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.
|
|
3
3
|
|
|
4
|
-
// Version: 0.1.
|
|
4
|
+
// Version: 0.1.62
|
|
5
5
|
|
|
6
6
|
// Want to see the unminified source? We're hiring!
|
|
7
7
|
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
|
|
@@ -7545,6 +7545,7 @@ function getInitialState() {
|
|
|
7545
7545
|
inlinePlugins: [],
|
|
7546
7546
|
sessionBypassPermissionsMode: false,
|
|
7547
7547
|
hasExitedPlanMode: false,
|
|
7548
|
+
needsPlanModeExitAttachment: false,
|
|
7548
7549
|
initJsonSchema: null,
|
|
7549
7550
|
registeredHooks: null,
|
|
7550
7551
|
planSlugCache: new Map
|
|
@@ -7751,6 +7752,14 @@ class Query {
|
|
|
7751
7752
|
this.transport.close();
|
|
7752
7753
|
this.pendingControlResponses.clear();
|
|
7753
7754
|
this.pendingMcpResponses.clear();
|
|
7755
|
+
this.cancelControllers.clear();
|
|
7756
|
+
this.hookCallbacks.clear();
|
|
7757
|
+
for (const transport of this.sdkMcpTransports.values()) {
|
|
7758
|
+
try {
|
|
7759
|
+
transport.close();
|
|
7760
|
+
} catch {}
|
|
7761
|
+
}
|
|
7762
|
+
this.sdkMcpTransports.clear();
|
|
7754
7763
|
if (error) {
|
|
7755
7764
|
this.inputStream.error(error);
|
|
7756
7765
|
} else {
|
|
@@ -15104,7 +15113,7 @@ function query({
|
|
|
15104
15113
|
const dirname2 = join5(filename, "..");
|
|
15105
15114
|
pathToClaudeCodeExecutable = join5(dirname2, "cli.js");
|
|
15106
15115
|
}
|
|
15107
|
-
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.
|
|
15116
|
+
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.62";
|
|
15108
15117
|
const {
|
|
15109
15118
|
abortController = createAbortController(),
|
|
15110
15119
|
additionalDirectories = [],
|