sandboxedjs 0.1.83 → 0.1.86
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/dist/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/{container-DtVUncWL.d.ts → container-BGmhPbSD.d.cts} +10 -1
- package/dist/{container-B14Q03ng.d.cts → container-DCwYX_Cx.d.ts} +10 -1
- package/dist/{contracts-DNkSvBCM.d.cts → contracts-BkWBTH8E.d.cts} +22 -3
- package/dist/{contracts-DNkSvBCM.d.ts → contracts-BkWBTH8E.d.ts} +22 -3
- package/dist/index.cjs +2386 -397
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -9
- package/dist/index.d.ts +19 -9
- package/dist/index.js +2386 -397
- package/dist/index.js.map +1 -1
- package/dist/{memory-volume-n-LY8Vdv.d.cts → memory-volume-DCm-DiXH.d.cts} +1 -1
- package/dist/{memory-volume-D4FLjyEU.d.ts → memory-volume-DJA-vFYW.d.ts} +1 -1
- package/dist/python/python.data +140 -145
- package/dist/python/python.js +1 -1
- package/dist/python/python.wasm +0 -0
- package/dist/python/runtime.json +3 -3
- package/dist/python-abi.cjs +18 -4
- package/dist/python-abi.cjs.map +1 -1
- package/dist/python-abi.d.cts +3 -3
- package/dist/python-abi.d.ts +3 -3
- package/dist/python-abi.js +18 -4
- package/dist/python-abi.js.map +1 -1
- package/dist/worker-entry.js +1407 -212
- package/dist/worker-entry.js.map +1 -1
- package/package.json +5 -5
package/dist/agent.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Container } from './container-
|
|
2
|
-
import './contracts-
|
|
1
|
+
import { C as Container } from './container-BGmhPbSD.cjs';
|
|
2
|
+
import './contracts-BkWBTH8E.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Structural copies of the LangChain Deep Agents backend contract.
|
package/dist/agent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as Vfs, C as Cred, f as RuntimePod, O as OutboundPolicy, D as DirEntry, p as Stats } from './contracts-
|
|
1
|
+
import { V as Vfs, C as Cred, f as RuntimePod, O as OutboundPolicy, D as DirEntry, p as Stats } from './contracts-BkWBTH8E.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Byte streams for stdin/stdout/stderr, pipelines and redirections.
|
|
@@ -210,6 +210,8 @@ interface ProcessOptions {
|
|
|
210
210
|
pgid?: number;
|
|
211
211
|
sid?: number;
|
|
212
212
|
stdio?: Partial<Stdio>;
|
|
213
|
+
/** Descriptors above 2, readable and writable from this process's side. */
|
|
214
|
+
fds?: Record<number, InputStream & OutputStream>;
|
|
213
215
|
tty?: string | null;
|
|
214
216
|
/** Marks the process as a shell builtin frame rather than a real command. */
|
|
215
217
|
kind?: ProcessKind;
|
|
@@ -235,6 +237,8 @@ declare class Process {
|
|
|
235
237
|
stdin: InputStream;
|
|
236
238
|
stdout: OutputStream;
|
|
237
239
|
stderr: OutputStream;
|
|
240
|
+
/** Descriptors above 2 the parent handed over, such as Chromium's fds 3 and 4. */
|
|
241
|
+
readonly fds: Map<number, InputStream & OutputStream>;
|
|
238
242
|
readonly children: Set<Process>;
|
|
239
243
|
private readonly aborter;
|
|
240
244
|
private readonly exitWaiters;
|
|
@@ -610,6 +614,11 @@ interface RunOptions {
|
|
|
610
614
|
tty?: string | null;
|
|
611
615
|
/** Wall-clock budget; the process is sent SIGKILL when it expires. */
|
|
612
616
|
timeoutMs?: number;
|
|
617
|
+
/**
|
|
618
|
+
* Descriptors above 2, keyed by number. Each is readable and writable from
|
|
619
|
+
* the child's side, the way an inherited socketpair end is.
|
|
620
|
+
*/
|
|
621
|
+
fds?: Record<number, InputStream & OutputStream>;
|
|
613
622
|
}
|
|
614
623
|
interface RunResult {
|
|
615
624
|
exitCode: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as Vfs, C as Cred, f as RuntimePod, O as OutboundPolicy, D as DirEntry, p as Stats } from './contracts-
|
|
1
|
+
import { V as Vfs, C as Cred, f as RuntimePod, O as OutboundPolicy, D as DirEntry, p as Stats } from './contracts-BkWBTH8E.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Byte streams for stdin/stdout/stderr, pipelines and redirections.
|
|
@@ -210,6 +210,8 @@ interface ProcessOptions {
|
|
|
210
210
|
pgid?: number;
|
|
211
211
|
sid?: number;
|
|
212
212
|
stdio?: Partial<Stdio>;
|
|
213
|
+
/** Descriptors above 2, readable and writable from this process's side. */
|
|
214
|
+
fds?: Record<number, InputStream & OutputStream>;
|
|
213
215
|
tty?: string | null;
|
|
214
216
|
/** Marks the process as a shell builtin frame rather than a real command. */
|
|
215
217
|
kind?: ProcessKind;
|
|
@@ -235,6 +237,8 @@ declare class Process {
|
|
|
235
237
|
stdin: InputStream;
|
|
236
238
|
stdout: OutputStream;
|
|
237
239
|
stderr: OutputStream;
|
|
240
|
+
/** Descriptors above 2 the parent handed over, such as Chromium's fds 3 and 4. */
|
|
241
|
+
readonly fds: Map<number, InputStream & OutputStream>;
|
|
238
242
|
readonly children: Set<Process>;
|
|
239
243
|
private readonly aborter;
|
|
240
244
|
private readonly exitWaiters;
|
|
@@ -610,6 +614,11 @@ interface RunOptions {
|
|
|
610
614
|
tty?: string | null;
|
|
611
615
|
/** Wall-clock budget; the process is sent SIGKILL when it expires. */
|
|
612
616
|
timeoutMs?: number;
|
|
617
|
+
/**
|
|
618
|
+
* Descriptors above 2, keyed by number. Each is readable and writable from
|
|
619
|
+
* the child's side, the way an inherited socketpair end is.
|
|
620
|
+
*/
|
|
621
|
+
fds?: Record<number, InputStream & OutputStream>;
|
|
613
622
|
}
|
|
614
623
|
interface RunResult {
|
|
615
624
|
exitCode: number;
|
|
@@ -14,7 +14,7 @@ interface ChildHandle {
|
|
|
14
14
|
pid: number;
|
|
15
15
|
state: "starting" | "running" | "exited";
|
|
16
16
|
exitCode: number | undefined;
|
|
17
|
-
on(event: "stdout" | "stderr" | "exit" | "rawmode", listener: (...args: any[]) => void): unknown;
|
|
17
|
+
on(event: "stdout" | "stderr" | "exit" | "rawmode" | "fd", listener: (...args: any[]) => void): unknown;
|
|
18
18
|
exec(): void;
|
|
19
19
|
sendStdin(data: string): void;
|
|
20
20
|
/**
|
|
@@ -25,6 +25,17 @@ interface ChildHandle {
|
|
|
25
25
|
* an end that never comes, and the parent waits on its exit.
|
|
26
26
|
*/
|
|
27
27
|
endStdin?(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Write to, or close, a descriptor above 2 that the parent asked for with
|
|
30
|
+
* `stdio[n] = "pipe"`. Output on those descriptors arrives as `fd` events
|
|
31
|
+
* carrying `(fd, text)`.
|
|
32
|
+
*
|
|
33
|
+
* Chromium's `--remote-debugging-pipe` is the reason: Playwright speaks the
|
|
34
|
+
* DevTools protocol over fds 3 and 4, and a child without them cannot be
|
|
35
|
+
* driven at all.
|
|
36
|
+
*/
|
|
37
|
+
writeFd?(fd: number, data: string): void;
|
|
38
|
+
endFd?(fd: number): void;
|
|
28
39
|
kill(signal?: string): void;
|
|
29
40
|
}
|
|
30
41
|
interface ChildSpawnConfig {
|
|
@@ -48,6 +59,8 @@ interface ChildSpawnConfig {
|
|
|
48
59
|
* left open on a parent that will never write to it.
|
|
49
60
|
*/
|
|
50
61
|
stdinIgnored?: boolean;
|
|
62
|
+
/** Descriptors above 2 the parent opened as pipes, e.g. `[3, 4]`. */
|
|
63
|
+
extraPipes?: number[];
|
|
51
64
|
}
|
|
52
65
|
type SpawnChild = (config: ChildSpawnConfig) => ChildHandle;
|
|
53
66
|
/**
|
|
@@ -450,8 +463,14 @@ interface RuntimeProcess {
|
|
|
450
463
|
* reports the program turning terminal raw mode on or off, which a terminal
|
|
451
464
|
* needs so that it stops echoing input the program is drawing itself.
|
|
452
465
|
*/
|
|
453
|
-
|
|
454
|
-
|
|
466
|
+
/**
|
|
467
|
+
* `raw-output` is optional: a process that sets `rawOutput` emits stdout
|
|
468
|
+
* there as written, bytes included, alongside the decoded `output`.
|
|
469
|
+
*/
|
|
470
|
+
on(event: "output" | "raw-output" | "error" | "exit" | "rawmode", listener: (...args: any[]) => void): this;
|
|
471
|
+
readonly rawOutput?: boolean;
|
|
472
|
+
/** Input for the program. Bytes are delivered as bytes: a pipe may carry binary framing. */
|
|
473
|
+
write(data: string | Uint8Array): void;
|
|
455
474
|
kill(signal?: string): void;
|
|
456
475
|
}
|
|
457
476
|
interface RuntimeHttpResponse {
|
|
@@ -14,7 +14,7 @@ interface ChildHandle {
|
|
|
14
14
|
pid: number;
|
|
15
15
|
state: "starting" | "running" | "exited";
|
|
16
16
|
exitCode: number | undefined;
|
|
17
|
-
on(event: "stdout" | "stderr" | "exit" | "rawmode", listener: (...args: any[]) => void): unknown;
|
|
17
|
+
on(event: "stdout" | "stderr" | "exit" | "rawmode" | "fd", listener: (...args: any[]) => void): unknown;
|
|
18
18
|
exec(): void;
|
|
19
19
|
sendStdin(data: string): void;
|
|
20
20
|
/**
|
|
@@ -25,6 +25,17 @@ interface ChildHandle {
|
|
|
25
25
|
* an end that never comes, and the parent waits on its exit.
|
|
26
26
|
*/
|
|
27
27
|
endStdin?(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Write to, or close, a descriptor above 2 that the parent asked for with
|
|
30
|
+
* `stdio[n] = "pipe"`. Output on those descriptors arrives as `fd` events
|
|
31
|
+
* carrying `(fd, text)`.
|
|
32
|
+
*
|
|
33
|
+
* Chromium's `--remote-debugging-pipe` is the reason: Playwright speaks the
|
|
34
|
+
* DevTools protocol over fds 3 and 4, and a child without them cannot be
|
|
35
|
+
* driven at all.
|
|
36
|
+
*/
|
|
37
|
+
writeFd?(fd: number, data: string): void;
|
|
38
|
+
endFd?(fd: number): void;
|
|
28
39
|
kill(signal?: string): void;
|
|
29
40
|
}
|
|
30
41
|
interface ChildSpawnConfig {
|
|
@@ -48,6 +59,8 @@ interface ChildSpawnConfig {
|
|
|
48
59
|
* left open on a parent that will never write to it.
|
|
49
60
|
*/
|
|
50
61
|
stdinIgnored?: boolean;
|
|
62
|
+
/** Descriptors above 2 the parent opened as pipes, e.g. `[3, 4]`. */
|
|
63
|
+
extraPipes?: number[];
|
|
51
64
|
}
|
|
52
65
|
type SpawnChild = (config: ChildSpawnConfig) => ChildHandle;
|
|
53
66
|
/**
|
|
@@ -450,8 +463,14 @@ interface RuntimeProcess {
|
|
|
450
463
|
* reports the program turning terminal raw mode on or off, which a terminal
|
|
451
464
|
* needs so that it stops echoing input the program is drawing itself.
|
|
452
465
|
*/
|
|
453
|
-
|
|
454
|
-
|
|
466
|
+
/**
|
|
467
|
+
* `raw-output` is optional: a process that sets `rawOutput` emits stdout
|
|
468
|
+
* there as written, bytes included, alongside the decoded `output`.
|
|
469
|
+
*/
|
|
470
|
+
on(event: "output" | "raw-output" | "error" | "exit" | "rawmode", listener: (...args: any[]) => void): this;
|
|
471
|
+
readonly rawOutput?: boolean;
|
|
472
|
+
/** Input for the program. Bytes are delivered as bytes: a pipe may carry binary framing. */
|
|
473
|
+
write(data: string | Uint8Array): void;
|
|
455
474
|
kill(signal?: string): void;
|
|
456
475
|
}
|
|
457
476
|
interface RuntimeHttpResponse {
|