@agentsh/secure-sandbox 0.1.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.
Files changed (52) hide show
  1. package/README.md +198 -0
  2. package/dist/adapters/blaxel.d.ts +5 -0
  3. package/dist/adapters/blaxel.js +9 -0
  4. package/dist/adapters/blaxel.js.map +1 -0
  5. package/dist/adapters/cloudflare.d.ts +5 -0
  6. package/dist/adapters/cloudflare.js +9 -0
  7. package/dist/adapters/cloudflare.js.map +1 -0
  8. package/dist/adapters/daytona.d.ts +5 -0
  9. package/dist/adapters/daytona.js +9 -0
  10. package/dist/adapters/daytona.js.map +1 -0
  11. package/dist/adapters/e2b.d.ts +5 -0
  12. package/dist/adapters/e2b.js +9 -0
  13. package/dist/adapters/e2b.js.map +1 -0
  14. package/dist/adapters/index.d.ts +6 -0
  15. package/dist/adapters/index.js +26 -0
  16. package/dist/adapters/index.js.map +1 -0
  17. package/dist/adapters/vercel.d.ts +5 -0
  18. package/dist/adapters/vercel.js +8 -0
  19. package/dist/adapters/vercel.js.map +1 -0
  20. package/dist/chunk-2P37YGN7.js +52 -0
  21. package/dist/chunk-2P37YGN7.js.map +1 -0
  22. package/dist/chunk-45FKFVMC.js +55 -0
  23. package/dist/chunk-45FKFVMC.js.map +1 -0
  24. package/dist/chunk-JY5ERJTX.js +49 -0
  25. package/dist/chunk-JY5ERJTX.js.map +1 -0
  26. package/dist/chunk-L4KFLVNU.js +33 -0
  27. package/dist/chunk-L4KFLVNU.js.map +1 -0
  28. package/dist/chunk-LMN3KM53.js +48 -0
  29. package/dist/chunk-LMN3KM53.js.map +1 -0
  30. package/dist/chunk-NWHVZ3DG.js +599 -0
  31. package/dist/chunk-NWHVZ3DG.js.map +1 -0
  32. package/dist/chunk-OANLKSOD.js +28 -0
  33. package/dist/chunk-OANLKSOD.js.map +1 -0
  34. package/dist/chunk-PZ5AY32C.js +10 -0
  35. package/dist/chunk-PZ5AY32C.js.map +1 -0
  36. package/dist/chunk-UYEAO27E.js +65 -0
  37. package/dist/chunk-UYEAO27E.js.map +1 -0
  38. package/dist/esm-7TZRRYDK.js +1375 -0
  39. package/dist/esm-7TZRRYDK.js.map +1 -0
  40. package/dist/index-D0UvBOzr.d.ts +463 -0
  41. package/dist/index-aQ1TVPtG.d.ts +16 -0
  42. package/dist/index.d.ts +77 -0
  43. package/dist/index.js +774 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/policies/index.d.ts +2 -0
  46. package/dist/policies/index.js +26 -0
  47. package/dist/policies/index.js.map +1 -0
  48. package/dist/testing/index.d.ts +13 -0
  49. package/dist/testing/index.js +32 -0
  50. package/dist/testing/index.js.map +1 -0
  51. package/dist/types-BwEbraFo.d.ts +194 -0
  52. package/package.json +99 -0
@@ -0,0 +1,463 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const FileRuleSchema: z.ZodUnion<[z.ZodObject<{
4
+ allow: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
5
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
6
+ }, "strict", z.ZodTypeAny, {
7
+ allow: string | string[];
8
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
9
+ }, {
10
+ allow: string | string[];
11
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
12
+ }>, z.ZodObject<{
13
+ deny: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
14
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
15
+ }, "strict", z.ZodTypeAny, {
16
+ deny: string | string[];
17
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
18
+ }, {
19
+ deny: string | string[];
20
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
21
+ }>, z.ZodObject<{
22
+ redirect: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
23
+ to: z.ZodString;
24
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
25
+ }, "strict", z.ZodTypeAny, {
26
+ redirect: string | string[];
27
+ to: string;
28
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
29
+ }, {
30
+ redirect: string | string[];
31
+ to: string;
32
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
33
+ }>, z.ZodObject<{
34
+ audit: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
35
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
36
+ }, "strict", z.ZodTypeAny, {
37
+ audit: string | string[];
38
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
39
+ }, {
40
+ audit: string | string[];
41
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
42
+ }>, z.ZodObject<{
43
+ softDelete: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
44
+ }, "strict", z.ZodTypeAny, {
45
+ softDelete: string | string[];
46
+ }, {
47
+ softDelete: string | string[];
48
+ }>]>;
49
+ declare const NetworkRuleSchema: z.ZodUnion<[z.ZodObject<{
50
+ allow: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
51
+ ports: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
52
+ }, "strict", z.ZodTypeAny, {
53
+ allow: string | string[];
54
+ ports?: number[] | undefined;
55
+ }, {
56
+ allow: string | string[];
57
+ ports?: number[] | undefined;
58
+ }>, z.ZodObject<{
59
+ deny: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
60
+ }, "strict", z.ZodTypeAny, {
61
+ deny: string | string[];
62
+ }, {
63
+ deny: string | string[];
64
+ }>, z.ZodObject<{
65
+ redirect: z.ZodString;
66
+ to: z.ZodString;
67
+ }, "strict", z.ZodTypeAny, {
68
+ redirect: string;
69
+ to: string;
70
+ }, {
71
+ redirect: string;
72
+ to: string;
73
+ }>]>;
74
+ declare const CommandRuleSchema: z.ZodUnion<[z.ZodObject<{
75
+ allow: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
76
+ }, "strict", z.ZodTypeAny, {
77
+ allow: string | string[];
78
+ }, {
79
+ allow: string | string[];
80
+ }>, z.ZodObject<{
81
+ deny: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
82
+ }, "strict", z.ZodTypeAny, {
83
+ deny: string | string[];
84
+ }, {
85
+ deny: string | string[];
86
+ }>, z.ZodObject<{
87
+ redirect: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
88
+ to: z.ZodUnion<[z.ZodString, z.ZodObject<{
89
+ cmd: z.ZodString;
90
+ args: z.ZodArray<z.ZodString, "many">;
91
+ }, "strict", z.ZodTypeAny, {
92
+ cmd: string;
93
+ args: string[];
94
+ }, {
95
+ cmd: string;
96
+ args: string[];
97
+ }>]>;
98
+ }, "strict", z.ZodTypeAny, {
99
+ redirect: string | string[];
100
+ to: string | {
101
+ cmd: string;
102
+ args: string[];
103
+ };
104
+ }, {
105
+ redirect: string | string[];
106
+ to: string | {
107
+ cmd: string;
108
+ args: string[];
109
+ };
110
+ }>]>;
111
+ declare const EnvRuleSchema: z.ZodObject<{
112
+ commands: z.ZodArray<z.ZodString, "many">;
113
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
114
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
115
+ }, "strict", z.ZodTypeAny, {
116
+ commands: string[];
117
+ deny?: string[] | undefined;
118
+ allow?: string[] | undefined;
119
+ }, {
120
+ commands: string[];
121
+ deny?: string[] | undefined;
122
+ allow?: string[] | undefined;
123
+ }>;
124
+ declare const DnsRedirectSchema: z.ZodObject<{
125
+ match: z.ZodString;
126
+ resolveTo: z.ZodString;
127
+ }, "strict", z.ZodTypeAny, {
128
+ match: string;
129
+ resolveTo: string;
130
+ }, {
131
+ match: string;
132
+ resolveTo: string;
133
+ }>;
134
+ declare const ConnectRedirectSchema: z.ZodObject<{
135
+ match: z.ZodString;
136
+ redirectTo: z.ZodString;
137
+ }, "strict", z.ZodTypeAny, {
138
+ match: string;
139
+ redirectTo: string;
140
+ }, {
141
+ match: string;
142
+ redirectTo: string;
143
+ }>;
144
+ declare const PolicyDefinitionSchema: z.ZodObject<{
145
+ file: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
146
+ allow: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
147
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
148
+ }, "strict", z.ZodTypeAny, {
149
+ allow: string | string[];
150
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
151
+ }, {
152
+ allow: string | string[];
153
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
154
+ }>, z.ZodObject<{
155
+ deny: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
156
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
157
+ }, "strict", z.ZodTypeAny, {
158
+ deny: string | string[];
159
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
160
+ }, {
161
+ deny: string | string[];
162
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
163
+ }>, z.ZodObject<{
164
+ redirect: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
165
+ to: z.ZodString;
166
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
167
+ }, "strict", z.ZodTypeAny, {
168
+ redirect: string | string[];
169
+ to: string;
170
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
171
+ }, {
172
+ redirect: string | string[];
173
+ to: string;
174
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
175
+ }>, z.ZodObject<{
176
+ audit: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
177
+ ops: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "create", "delete"]>, "many">>;
178
+ }, "strict", z.ZodTypeAny, {
179
+ audit: string | string[];
180
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
181
+ }, {
182
+ audit: string | string[];
183
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
184
+ }>, z.ZodObject<{
185
+ softDelete: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
186
+ }, "strict", z.ZodTypeAny, {
187
+ softDelete: string | string[];
188
+ }, {
189
+ softDelete: string | string[];
190
+ }>]>, "many">>;
191
+ network: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
192
+ allow: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
193
+ ports: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
194
+ }, "strict", z.ZodTypeAny, {
195
+ allow: string | string[];
196
+ ports?: number[] | undefined;
197
+ }, {
198
+ allow: string | string[];
199
+ ports?: number[] | undefined;
200
+ }>, z.ZodObject<{
201
+ deny: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
202
+ }, "strict", z.ZodTypeAny, {
203
+ deny: string | string[];
204
+ }, {
205
+ deny: string | string[];
206
+ }>, z.ZodObject<{
207
+ redirect: z.ZodString;
208
+ to: z.ZodString;
209
+ }, "strict", z.ZodTypeAny, {
210
+ redirect: string;
211
+ to: string;
212
+ }, {
213
+ redirect: string;
214
+ to: string;
215
+ }>]>, "many">>;
216
+ commands: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
217
+ allow: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
218
+ }, "strict", z.ZodTypeAny, {
219
+ allow: string | string[];
220
+ }, {
221
+ allow: string | string[];
222
+ }>, z.ZodObject<{
223
+ deny: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
224
+ }, "strict", z.ZodTypeAny, {
225
+ deny: string | string[];
226
+ }, {
227
+ deny: string | string[];
228
+ }>, z.ZodObject<{
229
+ redirect: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
230
+ to: z.ZodUnion<[z.ZodString, z.ZodObject<{
231
+ cmd: z.ZodString;
232
+ args: z.ZodArray<z.ZodString, "many">;
233
+ }, "strict", z.ZodTypeAny, {
234
+ cmd: string;
235
+ args: string[];
236
+ }, {
237
+ cmd: string;
238
+ args: string[];
239
+ }>]>;
240
+ }, "strict", z.ZodTypeAny, {
241
+ redirect: string | string[];
242
+ to: string | {
243
+ cmd: string;
244
+ args: string[];
245
+ };
246
+ }, {
247
+ redirect: string | string[];
248
+ to: string | {
249
+ cmd: string;
250
+ args: string[];
251
+ };
252
+ }>]>, "many">>;
253
+ env: z.ZodOptional<z.ZodArray<z.ZodObject<{
254
+ commands: z.ZodArray<z.ZodString, "many">;
255
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
256
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
257
+ }, "strict", z.ZodTypeAny, {
258
+ commands: string[];
259
+ deny?: string[] | undefined;
260
+ allow?: string[] | undefined;
261
+ }, {
262
+ commands: string[];
263
+ deny?: string[] | undefined;
264
+ allow?: string[] | undefined;
265
+ }>, "many">>;
266
+ dns: z.ZodOptional<z.ZodArray<z.ZodObject<{
267
+ match: z.ZodString;
268
+ resolveTo: z.ZodString;
269
+ }, "strict", z.ZodTypeAny, {
270
+ match: string;
271
+ resolveTo: string;
272
+ }, {
273
+ match: string;
274
+ resolveTo: string;
275
+ }>, "many">>;
276
+ connect: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
+ match: z.ZodString;
278
+ redirectTo: z.ZodString;
279
+ }, "strict", z.ZodTypeAny, {
280
+ match: string;
281
+ redirectTo: string;
282
+ }, {
283
+ match: string;
284
+ redirectTo: string;
285
+ }>, "many">>;
286
+ }, "strict", z.ZodTypeAny, {
287
+ commands?: ({
288
+ allow: string | string[];
289
+ } | {
290
+ deny: string | string[];
291
+ } | {
292
+ redirect: string | string[];
293
+ to: string | {
294
+ cmd: string;
295
+ args: string[];
296
+ };
297
+ })[] | undefined;
298
+ file?: ({
299
+ allow: string | string[];
300
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
301
+ } | {
302
+ deny: string | string[];
303
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
304
+ } | {
305
+ redirect: string | string[];
306
+ to: string;
307
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
308
+ } | {
309
+ audit: string | string[];
310
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
311
+ } | {
312
+ softDelete: string | string[];
313
+ })[] | undefined;
314
+ network?: ({
315
+ allow: string | string[];
316
+ ports?: number[] | undefined;
317
+ } | {
318
+ deny: string | string[];
319
+ } | {
320
+ redirect: string;
321
+ to: string;
322
+ })[] | undefined;
323
+ env?: {
324
+ commands: string[];
325
+ deny?: string[] | undefined;
326
+ allow?: string[] | undefined;
327
+ }[] | undefined;
328
+ dns?: {
329
+ match: string;
330
+ resolveTo: string;
331
+ }[] | undefined;
332
+ connect?: {
333
+ match: string;
334
+ redirectTo: string;
335
+ }[] | undefined;
336
+ }, {
337
+ commands?: ({
338
+ allow: string | string[];
339
+ } | {
340
+ deny: string | string[];
341
+ } | {
342
+ redirect: string | string[];
343
+ to: string | {
344
+ cmd: string;
345
+ args: string[];
346
+ };
347
+ })[] | undefined;
348
+ file?: ({
349
+ allow: string | string[];
350
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
351
+ } | {
352
+ deny: string | string[];
353
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
354
+ } | {
355
+ redirect: string | string[];
356
+ to: string;
357
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
358
+ } | {
359
+ audit: string | string[];
360
+ ops?: ("read" | "write" | "create" | "delete")[] | undefined;
361
+ } | {
362
+ softDelete: string | string[];
363
+ })[] | undefined;
364
+ network?: ({
365
+ allow: string | string[];
366
+ ports?: number[] | undefined;
367
+ } | {
368
+ deny: string | string[];
369
+ } | {
370
+ redirect: string;
371
+ to: string;
372
+ })[] | undefined;
373
+ env?: {
374
+ commands: string[];
375
+ deny?: string[] | undefined;
376
+ allow?: string[] | undefined;
377
+ }[] | undefined;
378
+ dns?: {
379
+ match: string;
380
+ resolveTo: string;
381
+ }[] | undefined;
382
+ connect?: {
383
+ match: string;
384
+ redirectTo: string;
385
+ }[] | undefined;
386
+ }>;
387
+ type PolicyDefinition = z.infer<typeof PolicyDefinitionSchema>;
388
+ type FileRule = z.infer<typeof FileRuleSchema>;
389
+ type NetworkRule = z.infer<typeof NetworkRuleSchema>;
390
+ type CommandRule = z.infer<typeof CommandRuleSchema>;
391
+ type EnvRule = z.infer<typeof EnvRuleSchema>;
392
+ type DnsRedirect = z.infer<typeof DnsRedirectSchema>;
393
+ type ConnectRedirect = z.infer<typeof ConnectRedirectSchema>;
394
+ declare function validatePolicy(policy: unknown): PolicyDefinition;
395
+
396
+ /**
397
+ * Comprehensive policy for AI coding agents. This is the DEFAULT policy
398
+ * used when no policy is specified. Based on agentsh v0.13's agent-default
399
+ * policy.
400
+ */
401
+ declare function agentDefault(extensions?: Partial<PolicyDefinition>): PolicyDefinition;
402
+ /**
403
+ * Permissive defaults for local development. Not recommended for production.
404
+ */
405
+ declare function devSafe(extensions?: Partial<PolicyDefinition>): PolicyDefinition;
406
+ /**
407
+ * Locked down for CI/CD runners.
408
+ */
409
+ declare function ciStrict(extensions?: Partial<PolicyDefinition>): PolicyDefinition;
410
+ /**
411
+ * Maximum restriction for untrusted code. Read-only workspace, no network.
412
+ */
413
+ declare function agentSandbox(extensions?: Partial<PolicyDefinition>): PolicyDefinition;
414
+
415
+ /**
416
+ * Merge policy overrides AFTER base rules for each category.
417
+ * Since agentsh evaluates first-match-wins, appended rules only apply
418
+ * to paths not already matched by base.
419
+ */
420
+ declare function merge(base: PolicyDefinition, ...overrides: Partial<PolicyDefinition>[]): PolicyDefinition;
421
+ /**
422
+ * Merge policy overrides BEFORE base rules for each category,
423
+ * making overrides take priority in first-match-wins evaluation.
424
+ */
425
+ declare function mergePrepend(base: PolicyDefinition, ...overrides: Partial<PolicyDefinition>[]): PolicyDefinition;
426
+
427
+ /**
428
+ * Converts a PolicyDefinition to agentsh YAML format.
429
+ *
430
+ * Omits empty categories from output.
431
+ */
432
+ declare function serializePolicy(policy: PolicyDefinition): string;
433
+ /**
434
+ * Returns the fixed system policy YAML from the spec (Section 9.4).
435
+ *
436
+ * This static set of rules protects agentsh's own configuration, binaries,
437
+ * and processes from tampering by the agent. These rules are written to a
438
+ * separate system policy directory evaluated before user policy.
439
+ */
440
+ declare function systemPolicyYaml(): string;
441
+
442
+ type index_CommandRule = CommandRule;
443
+ type index_ConnectRedirect = ConnectRedirect;
444
+ type index_DnsRedirect = DnsRedirect;
445
+ type index_EnvRule = EnvRule;
446
+ type index_FileRule = FileRule;
447
+ type index_NetworkRule = NetworkRule;
448
+ type index_PolicyDefinition = PolicyDefinition;
449
+ declare const index_PolicyDefinitionSchema: typeof PolicyDefinitionSchema;
450
+ declare const index_agentDefault: typeof agentDefault;
451
+ declare const index_agentSandbox: typeof agentSandbox;
452
+ declare const index_ciStrict: typeof ciStrict;
453
+ declare const index_devSafe: typeof devSafe;
454
+ declare const index_merge: typeof merge;
455
+ declare const index_mergePrepend: typeof mergePrepend;
456
+ declare const index_serializePolicy: typeof serializePolicy;
457
+ declare const index_systemPolicyYaml: typeof systemPolicyYaml;
458
+ declare const index_validatePolicy: typeof validatePolicy;
459
+ declare namespace index {
460
+ export { type index_CommandRule as CommandRule, type index_ConnectRedirect as ConnectRedirect, type index_DnsRedirect as DnsRedirect, type index_EnvRule as EnvRule, type index_FileRule as FileRule, type index_NetworkRule as NetworkRule, type index_PolicyDefinition as PolicyDefinition, index_PolicyDefinitionSchema as PolicyDefinitionSchema, index_agentDefault as agentDefault, index_agentSandbox as agentSandbox, index_ciStrict as ciStrict, index_devSafe as devSafe, index_merge as merge, index_mergePrepend as mergePrepend, index_serializePolicy as serializePolicy, index_systemPolicyYaml as systemPolicyYaml, index_validatePolicy as validatePolicy };
461
+ }
462
+
463
+ export { type CommandRule as C, type DnsRedirect as D, type EnvRule as E, type FileRule as F, type NetworkRule as N, type PolicyDefinition as P, type ConnectRedirect as a, PolicyDefinitionSchema as b, agentDefault as c, agentSandbox as d, ciStrict as e, devSafe as f, mergePrepend as g, systemPolicyYaml as h, index as i, merge as m, serializePolicy as s, validatePolicy as v };
@@ -0,0 +1,16 @@
1
+ import { vercel } from './adapters/vercel.js';
2
+ import { e2b } from './adapters/e2b.js';
3
+ import { daytona } from './adapters/daytona.js';
4
+ import { cloudflare } from './adapters/cloudflare.js';
5
+ import { blaxel } from './adapters/blaxel.js';
6
+
7
+ declare const index_blaxel: typeof blaxel;
8
+ declare const index_cloudflare: typeof cloudflare;
9
+ declare const index_daytona: typeof daytona;
10
+ declare const index_e2b: typeof e2b;
11
+ declare const index_vercel: typeof vercel;
12
+ declare namespace index {
13
+ export { index_blaxel as blaxel, index_cloudflare as cloudflare, index_daytona as daytona, index_e2b as e2b, index_vercel as vercel };
14
+ }
15
+
16
+ export { index as i };
@@ -0,0 +1,77 @@
1
+ import { S as SandboxAdapter, a as SecureConfig, b as SecuredSandbox, T as ThreatFeedsConfig } from './types-BwEbraFo.js';
2
+ export { E as ExecResult, I as InstallStrategy, R as ReadFileResult, c as SecurityMode, d as ThreatFeed, W as WriteFileResult } from './types-BwEbraFo.js';
3
+ export { P as PolicyDefinition, i as policies } from './index-D0UvBOzr.js';
4
+ import { ZodIssue } from 'zod';
5
+ export { i as adapters } from './index-aQ1TVPtG.js';
6
+ import './adapters/vercel.js';
7
+ import './adapters/e2b.js';
8
+ import './adapters/daytona.js';
9
+ import './adapters/cloudflare.js';
10
+ import './adapters/blaxel.js';
11
+
12
+ declare function secureSandbox(adapter: SandboxAdapter, config?: SecureConfig): Promise<SecuredSandbox>;
13
+
14
+ /**
15
+ * Default threat feeds: URLhaus (malware) + Phishing.Database (phishing).
16
+ * Both are free, open source, and updated frequently.
17
+ */
18
+ declare const defaultThreatFeeds: ThreatFeedsConfig;
19
+
20
+ declare class AgentSHError extends Error {
21
+ constructor(message: string);
22
+ }
23
+ declare class PolicyValidationError extends AgentSHError {
24
+ readonly issues: ZodIssue[];
25
+ constructor({ issues }: {
26
+ issues: ZodIssue[];
27
+ });
28
+ }
29
+ declare class MissingPeerDependencyError extends AgentSHError {
30
+ readonly packageName: string;
31
+ readonly versionRange: string;
32
+ constructor({ packageName, versionRange, }: {
33
+ packageName: string;
34
+ versionRange: string;
35
+ });
36
+ }
37
+ declare class IncompatibleProviderVersionError extends AgentSHError {
38
+ readonly installed: string;
39
+ readonly required: string;
40
+ readonly packageName: string;
41
+ constructor({ installed, required, packageName, }: {
42
+ installed: string;
43
+ required: string;
44
+ packageName: string;
45
+ });
46
+ }
47
+ declare class ProvisioningError extends AgentSHError {
48
+ readonly phase: string;
49
+ readonly command: string;
50
+ readonly stderr: string;
51
+ constructor({ phase, command, stderr, }: {
52
+ phase: string;
53
+ command: string;
54
+ stderr: string;
55
+ });
56
+ }
57
+ declare class IntegrityError extends AgentSHError {
58
+ readonly expected: string;
59
+ readonly actual: string;
60
+ constructor({ expected, actual, message, }: {
61
+ expected: string;
62
+ actual: string;
63
+ message?: string;
64
+ });
65
+ }
66
+ declare class RuntimeError extends AgentSHError {
67
+ readonly sessionId: string;
68
+ readonly command: string;
69
+ readonly stderr: string;
70
+ constructor({ sessionId, command, stderr, }: {
71
+ sessionId: string;
72
+ command: string;
73
+ stderr: string;
74
+ });
75
+ }
76
+
77
+ export { AgentSHError, IncompatibleProviderVersionError, IntegrityError, MissingPeerDependencyError, PolicyValidationError, ProvisioningError, RuntimeError, SandboxAdapter, SecureConfig, SecuredSandbox, ThreatFeedsConfig, defaultThreatFeeds, secureSandbox };