agent-neckbeard 1.1.15 → 1.1.16
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 +19 -0
- package/dist/index.cjs +8 -1
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +8 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -95,6 +95,21 @@ export ANTHROPIC_API_KEY=your-key
|
|
|
95
95
|
|
|
96
96
|
Pick the sandbox backend explicitly with `sandbox.provider`. The public `sandbox.template` field maps to an E2B template or a Daytona snapshot.
|
|
97
97
|
|
|
98
|
+
Daytona sandboxes can also receive network policy options supported by the Daytona SDK. Use `domainAllowList` for domains and wildcard domains, or `networkAllowList` for comma-separated CIDR ranges:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
new Agent({
|
|
102
|
+
sandbox: {
|
|
103
|
+
provider: 'daytona',
|
|
104
|
+
template: 'daytona-small',
|
|
105
|
+
domainAllowList: '*.example.com',
|
|
106
|
+
},
|
|
107
|
+
// ...
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Set `networkBlockAll: true` only when you want to block all outbound network access. Daytona rejects `networkBlockAll: true` combined with non-empty allow lists.
|
|
112
|
+
|
|
98
113
|
## Run-Output Agents
|
|
99
114
|
|
|
100
115
|
Use `run` when each invocation should produce one validated output:
|
|
@@ -210,6 +225,10 @@ new Agent({
|
|
|
210
225
|
sandbox: {
|
|
211
226
|
provider: 'e2b' | 'daytona',
|
|
212
227
|
template: string,
|
|
228
|
+
// Daytona only:
|
|
229
|
+
networkBlockAll?: boolean,
|
|
230
|
+
networkAllowList?: string,
|
|
231
|
+
domainAllowList?: string,
|
|
213
232
|
},
|
|
214
233
|
inputSchema: ZodSchema,
|
|
215
234
|
maxDuration?: number,
|
package/dist/index.cjs
CHANGED
|
@@ -1253,6 +1253,9 @@ async function createProviderSandboxHandle(options) {
|
|
|
1253
1253
|
const sandbox2 = await daytona.create(
|
|
1254
1254
|
{
|
|
1255
1255
|
...options.template ? { snapshot: options.template } : {},
|
|
1256
|
+
...options.networkBlockAll === void 0 ? {} : { networkBlockAll: options.networkBlockAll },
|
|
1257
|
+
...options.networkAllowList === void 0 ? {} : { networkAllowList: options.networkAllowList },
|
|
1258
|
+
...options.domainAllowList === void 0 ? {} : { domainAllowList: options.domainAllowList },
|
|
1256
1259
|
envVars: filterDefinedEnvs(options.envs ?? {}),
|
|
1257
1260
|
autoDeleteInterval: options.autoDeleteInterval ?? -1
|
|
1258
1261
|
},
|
|
@@ -1498,10 +1501,14 @@ var Agent = class {
|
|
|
1498
1501
|
allowPublicTraffic: false
|
|
1499
1502
|
});
|
|
1500
1503
|
}
|
|
1504
|
+
const sandbox = this.sandbox;
|
|
1501
1505
|
return createProviderSandboxHandle({
|
|
1502
1506
|
provider: "daytona",
|
|
1503
1507
|
template: this.template,
|
|
1504
|
-
envs: this.sandboxEnv
|
|
1508
|
+
envs: this.sandboxEnv,
|
|
1509
|
+
networkBlockAll: sandbox.networkBlockAll,
|
|
1510
|
+
networkAllowList: sandbox.networkAllowList,
|
|
1511
|
+
domainAllowList: sandbox.domainAllowList
|
|
1505
1512
|
});
|
|
1506
1513
|
}
|
|
1507
1514
|
async connectSandboxHandle(sandboxId) {
|
package/dist/index.d.cts
CHANGED
|
@@ -280,6 +280,25 @@ interface DaytonaSandboxConfig {
|
|
|
280
280
|
* This is the Daytona equivalent of choosing a base sandbox environment.
|
|
281
281
|
*/
|
|
282
282
|
template: string;
|
|
283
|
+
/**
|
|
284
|
+
* Whether Daytona should block all sandbox network access by default.
|
|
285
|
+
*
|
|
286
|
+
* Daytona does not allow this to be combined with non-empty allow lists.
|
|
287
|
+
*/
|
|
288
|
+
networkBlockAll?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Comma-separated CIDR network allow list for Daytona sandbox egress.
|
|
291
|
+
*
|
|
292
|
+
* Example: '203.0.113.0/24,198.51.100.10/32'
|
|
293
|
+
*/
|
|
294
|
+
networkAllowList?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Comma-separated DNS domain allow list for Daytona sandbox egress.
|
|
297
|
+
*
|
|
298
|
+
* Wildcards are supported with a leading `*.`.
|
|
299
|
+
* Example: '*.example.com,api.openai.com'
|
|
300
|
+
*/
|
|
301
|
+
domainAllowList?: string;
|
|
283
302
|
}
|
|
284
303
|
type SandboxConfig = E2BSandboxConfig | DaytonaSandboxConfig;
|
|
285
304
|
/**
|
|
@@ -320,6 +339,9 @@ type SandboxClientCreateOptions = {
|
|
|
320
339
|
envs?: Record<string, string | undefined>;
|
|
321
340
|
createTimeoutSec?: number;
|
|
322
341
|
autoDeleteInterval?: number;
|
|
342
|
+
networkBlockAll?: boolean;
|
|
343
|
+
networkAllowList?: string;
|
|
344
|
+
domainAllowList?: string;
|
|
323
345
|
};
|
|
324
346
|
type SandboxClientConnectOptions = {
|
|
325
347
|
provider: 'e2b';
|
package/dist/index.d.ts
CHANGED
|
@@ -280,6 +280,25 @@ interface DaytonaSandboxConfig {
|
|
|
280
280
|
* This is the Daytona equivalent of choosing a base sandbox environment.
|
|
281
281
|
*/
|
|
282
282
|
template: string;
|
|
283
|
+
/**
|
|
284
|
+
* Whether Daytona should block all sandbox network access by default.
|
|
285
|
+
*
|
|
286
|
+
* Daytona does not allow this to be combined with non-empty allow lists.
|
|
287
|
+
*/
|
|
288
|
+
networkBlockAll?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Comma-separated CIDR network allow list for Daytona sandbox egress.
|
|
291
|
+
*
|
|
292
|
+
* Example: '203.0.113.0/24,198.51.100.10/32'
|
|
293
|
+
*/
|
|
294
|
+
networkAllowList?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Comma-separated DNS domain allow list for Daytona sandbox egress.
|
|
297
|
+
*
|
|
298
|
+
* Wildcards are supported with a leading `*.`.
|
|
299
|
+
* Example: '*.example.com,api.openai.com'
|
|
300
|
+
*/
|
|
301
|
+
domainAllowList?: string;
|
|
283
302
|
}
|
|
284
303
|
type SandboxConfig = E2BSandboxConfig | DaytonaSandboxConfig;
|
|
285
304
|
/**
|
|
@@ -320,6 +339,9 @@ type SandboxClientCreateOptions = {
|
|
|
320
339
|
envs?: Record<string, string | undefined>;
|
|
321
340
|
createTimeoutSec?: number;
|
|
322
341
|
autoDeleteInterval?: number;
|
|
342
|
+
networkBlockAll?: boolean;
|
|
343
|
+
networkAllowList?: string;
|
|
344
|
+
domainAllowList?: string;
|
|
323
345
|
};
|
|
324
346
|
type SandboxClientConnectOptions = {
|
|
325
347
|
provider: 'e2b';
|
package/dist/index.js
CHANGED
|
@@ -1019,6 +1019,9 @@ async function createProviderSandboxHandle(options) {
|
|
|
1019
1019
|
const sandbox2 = await daytona.create(
|
|
1020
1020
|
{
|
|
1021
1021
|
...options.template ? { snapshot: options.template } : {},
|
|
1022
|
+
...options.networkBlockAll === void 0 ? {} : { networkBlockAll: options.networkBlockAll },
|
|
1023
|
+
...options.networkAllowList === void 0 ? {} : { networkAllowList: options.networkAllowList },
|
|
1024
|
+
...options.domainAllowList === void 0 ? {} : { domainAllowList: options.domainAllowList },
|
|
1022
1025
|
envVars: filterDefinedEnvs(options.envs ?? {}),
|
|
1023
1026
|
autoDeleteInterval: options.autoDeleteInterval ?? -1
|
|
1024
1027
|
},
|
|
@@ -1264,10 +1267,14 @@ var Agent = class {
|
|
|
1264
1267
|
allowPublicTraffic: false
|
|
1265
1268
|
});
|
|
1266
1269
|
}
|
|
1270
|
+
const sandbox = this.sandbox;
|
|
1267
1271
|
return createProviderSandboxHandle({
|
|
1268
1272
|
provider: "daytona",
|
|
1269
1273
|
template: this.template,
|
|
1270
|
-
envs: this.sandboxEnv
|
|
1274
|
+
envs: this.sandboxEnv,
|
|
1275
|
+
networkBlockAll: sandbox.networkBlockAll,
|
|
1276
|
+
networkAllowList: sandbox.networkAllowList,
|
|
1277
|
+
domainAllowList: sandbox.domainAllowList
|
|
1271
1278
|
});
|
|
1272
1279
|
}
|
|
1273
1280
|
async connectSandboxHandle(sandboxId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-neckbeard",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "Deploy AI agents to E2B and Daytona sandboxes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"prepare": "npm run build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@daytona/sdk": "^0.
|
|
48
|
+
"@daytona/sdk": "^0.192.0",
|
|
49
49
|
"e2b": "^2.2.0",
|
|
50
50
|
"esbuild": "^0.24.0"
|
|
51
51
|
},
|