sandboxedjs 0.1.76 → 0.1.77
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 +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/{container-X8yZRFvW.d.ts → container-CUB12Moo.d.ts} +18 -53
- package/dist/{container-NoLUp_fd.d.cts → container-LwAV9JTH.d.cts} +18 -53
- package/dist/index.cjs +110 -1323
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +111 -1322
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
package/dist/agent.d.cts
CHANGED
package/dist/agent.d.ts
CHANGED
|
@@ -1249,67 +1249,25 @@ interface WheelIndex {
|
|
|
1249
1249
|
* gates in docs/python/release-gates.md pass.
|
|
1250
1250
|
*/
|
|
1251
1251
|
|
|
1252
|
-
type PythonBackendName = "
|
|
1253
|
-
|
|
1254
|
-
/**
|
|
1255
|
-
* The CPython runtime: Pyodide, wired to the container the same way
|
|
1256
|
-
* the other runtimes are — filesystem, argv, environment and standard streams.
|
|
1257
|
-
*
|
|
1258
|
-
* This is real CPython, so `sqlite3`, `dataclasses`, `decimal`, `typing` and
|
|
1259
|
-
* the rest of the standard library are present, and `micropip` can install
|
|
1260
|
-
* pure-Python wheels.
|
|
1261
|
-
*
|
|
1262
|
-
* CPython keeps its own library inside the Emscripten filesystem, so:
|
|
1263
|
-
*
|
|
1264
|
-
* - the container is mounted subtree by subtree rather than over `/`, so
|
|
1265
|
-
* Pyodide's standard-library files survive;
|
|
1266
|
-
* - an interpreter costs roughly a second and a half to start, so one is kept
|
|
1267
|
-
* per container and each program is run in a fresh namespace instead.
|
|
1268
|
-
*/
|
|
1269
|
-
|
|
1270
|
-
interface CPythonOptions {
|
|
1271
|
-
/**
|
|
1272
|
-
* Where Pyodide's own assets live.
|
|
1273
|
-
*
|
|
1274
|
-
* Node resolves them from the installed package, so this is only needed in a
|
|
1275
|
-
* browser, where they are served or taken from a CDN.
|
|
1276
|
-
*/
|
|
1277
|
-
indexURL?: string;
|
|
1278
|
-
/**
|
|
1279
|
-
* URL of the Pyodide ES module, for hosts that cannot resolve the package by
|
|
1280
|
-
* name — a browser without a bundler, typically.
|
|
1281
|
-
*/
|
|
1282
|
-
moduleURL?: string;
|
|
1283
|
-
}
|
|
1284
|
-
declare function configureCPython(options?: CPythonOptions): void;
|
|
1285
|
-
/** True when this host can start CPython at all. */
|
|
1286
|
-
declare function isCPythonAvailable(): Promise<boolean>;
|
|
1252
|
+
type PythonBackendName = "sbx-cpython-wasm";
|
|
1287
1253
|
|
|
1288
1254
|
/**
|
|
1289
1255
|
* The `python3` command.
|
|
1290
1256
|
*
|
|
1291
|
-
*
|
|
1292
|
-
* interpreter cached per container, with each program given fresh globals —
|
|
1293
|
-
* which is why `sys.modules` leaks between unrelated programs and every
|
|
1294
|
-
* program reports the same PID (see docs/python/baseline-inventory.md).
|
|
1295
|
-
* `sbx-cpython-wasm` is the owned distribution: CPython built from source, one
|
|
1257
|
+
* One backend: the owned distribution. CPython built from source, one
|
|
1296
1258
|
* interpreter per process, everything reached through the `sbx_host_v1` kernel
|
|
1297
|
-
* ABI.
|
|
1259
|
+
* ABI. The Pyodide integration it replaced cached a single interpreter per
|
|
1260
|
+
* container and gave each program fresh globals, so `sys.modules` leaked
|
|
1261
|
+
* between unrelated programs and every program reported the same pid.
|
|
1298
1262
|
*
|
|
1299
|
-
* The
|
|
1300
|
-
*
|
|
1263
|
+
* The command line is handed to the interpreter verbatim. Re-parsing Python's
|
|
1264
|
+
* flags here to decide what to do with them is how `-X`, `-W` and `-I` come to
|
|
1265
|
+
* be silently dropped; the interpreter's own entry point already knows them all.
|
|
1301
1266
|
*/
|
|
1302
1267
|
|
|
1303
1268
|
declare const PYTHON_VERSION = "3.13";
|
|
1304
1269
|
interface PythonOptions {
|
|
1305
|
-
/**
|
|
1306
|
-
indexURL?: string;
|
|
1307
|
-
/** URL of pyodide.mjs, for browsers without package resolution. */
|
|
1308
|
-
pyodideURL?: string;
|
|
1309
|
-
/**
|
|
1310
|
-
* Which interpreter to run. Defaults to `pyodide` until the parity gates in
|
|
1311
|
-
* docs/python/release-gates.md pass.
|
|
1312
|
-
*/
|
|
1270
|
+
/** Which interpreter to run. There is one, and it is the default. */
|
|
1313
1271
|
backend?: PythonBackendName;
|
|
1314
1272
|
/** The owned runtime's release manifest. Required by `sbx-cpython-wasm`. */
|
|
1315
1273
|
manifest?: PythonRuntimeManifest;
|
|
@@ -1333,7 +1291,14 @@ interface PythonOptions {
|
|
|
1333
1291
|
buildFromSource?: boolean | string;
|
|
1334
1292
|
}
|
|
1335
1293
|
declare function configurePython(options?: PythonOptions): void;
|
|
1336
|
-
|
|
1294
|
+
/**
|
|
1295
|
+
* Whether this host can run Python at all.
|
|
1296
|
+
*
|
|
1297
|
+
* The release manifest is what names the interpreter's assets, so without one
|
|
1298
|
+
* there is nothing to load. Reporting that here lets a caller choose another
|
|
1299
|
+
* path rather than discovering it when a program fails to start.
|
|
1300
|
+
*/
|
|
1301
|
+
declare function isPythonAvailable(): Promise<boolean>;
|
|
1337
1302
|
|
|
1338
1303
|
/**
|
|
1339
1304
|
* A promise-based filesystem façade for host code, shaped like `fs/promises`
|
|
@@ -1713,4 +1678,4 @@ declare class Container {
|
|
|
1713
1678
|
/** Boot a container. The one function most callers need. */
|
|
1714
1679
|
declare function createContainer(opts?: ContainerOptions): Promise<Container>;
|
|
1715
1680
|
|
|
1716
|
-
export { type
|
|
1681
|
+
export { type PythonOptions as $, NullInput as A, type BinaryBackend as B, Container as C, NullOutput as D, type ExecContext as E, type FileData as F, type GroupEntry as G, type HttpResponse as H, type InputStream as I, type Job as J, Kernel as K, type ListeningPort as L, MANIFEST_FORMAT as M, type Node as N, type OutputStream as O, PYTHON_VERSION as P, type PasswdEntry as Q, Pipe as R, Shell as S, type Preparation as T, type PreparedBinary as U, Process as V, type ProcessKind as W, type ProcessOptions as X, type ProcessState as Y, ProcessTable as Z, type PythonCapabilities as _, type ShellIO as a, type PythonProfile as a0, type PythonRuntimeManifest as a1, type ResolvedExecutable as a2, type RunOptions as a3, type RunResult as a4, type SessionInit as a5, type SessionResult as a6, type SessionRunOptions as a7, ShellExit as a8, type ShellInit as a9, type ShellOptions as aa, type SpawnHandle as ab, type Stdio as ac, TeeOutput as ad, UserDatabase as ae, Variables as af, type WasmCommandArtifact as ag, type WasmTranslator as ah, binaryDigest as ai, braceExpand as aj, captureStdio as ak, configurePython as al, createContext as am, createTranslationBackend as an, createWasmCompatibilityBackend as ao, defineCommand as ap, expandWord as aq, expandWords as ar, inspectElf as as, installWasmCommands as at, isElfBinary as au, isPythonAvailable as av, resetPidCounter as aw, shellQuote as ax, validateManifest as ay, Session as b, type Command as c, createContainer as d, BinaryExecutionRegistry as e, type BinaryInfo as f, type BinaryRequest as g, BufferSink as h, CallbackSink as i, CommandRegistry as j, ContainerFs as k, type ContainerOptions as l, type ContextInit as m, type Env as n, type ExecOptions as o, type ExecResult as p, type ExecutionDecision as q, type ExecutionTier as r, FileInput as s, FileOutput as t, type KernelOptions as u, MANIFEST_SCHEMA_VERSION as v, type MountEntry as w, type NetInterface as x, type NetworkOptions as y, NetworkStack as z };
|
|
@@ -1249,67 +1249,25 @@ interface WheelIndex {
|
|
|
1249
1249
|
* gates in docs/python/release-gates.md pass.
|
|
1250
1250
|
*/
|
|
1251
1251
|
|
|
1252
|
-
type PythonBackendName = "
|
|
1253
|
-
|
|
1254
|
-
/**
|
|
1255
|
-
* The CPython runtime: Pyodide, wired to the container the same way
|
|
1256
|
-
* the other runtimes are — filesystem, argv, environment and standard streams.
|
|
1257
|
-
*
|
|
1258
|
-
* This is real CPython, so `sqlite3`, `dataclasses`, `decimal`, `typing` and
|
|
1259
|
-
* the rest of the standard library are present, and `micropip` can install
|
|
1260
|
-
* pure-Python wheels.
|
|
1261
|
-
*
|
|
1262
|
-
* CPython keeps its own library inside the Emscripten filesystem, so:
|
|
1263
|
-
*
|
|
1264
|
-
* - the container is mounted subtree by subtree rather than over `/`, so
|
|
1265
|
-
* Pyodide's standard-library files survive;
|
|
1266
|
-
* - an interpreter costs roughly a second and a half to start, so one is kept
|
|
1267
|
-
* per container and each program is run in a fresh namespace instead.
|
|
1268
|
-
*/
|
|
1269
|
-
|
|
1270
|
-
interface CPythonOptions {
|
|
1271
|
-
/**
|
|
1272
|
-
* Where Pyodide's own assets live.
|
|
1273
|
-
*
|
|
1274
|
-
* Node resolves them from the installed package, so this is only needed in a
|
|
1275
|
-
* browser, where they are served or taken from a CDN.
|
|
1276
|
-
*/
|
|
1277
|
-
indexURL?: string;
|
|
1278
|
-
/**
|
|
1279
|
-
* URL of the Pyodide ES module, for hosts that cannot resolve the package by
|
|
1280
|
-
* name — a browser without a bundler, typically.
|
|
1281
|
-
*/
|
|
1282
|
-
moduleURL?: string;
|
|
1283
|
-
}
|
|
1284
|
-
declare function configureCPython(options?: CPythonOptions): void;
|
|
1285
|
-
/** True when this host can start CPython at all. */
|
|
1286
|
-
declare function isCPythonAvailable(): Promise<boolean>;
|
|
1252
|
+
type PythonBackendName = "sbx-cpython-wasm";
|
|
1287
1253
|
|
|
1288
1254
|
/**
|
|
1289
1255
|
* The `python3` command.
|
|
1290
1256
|
*
|
|
1291
|
-
*
|
|
1292
|
-
* interpreter cached per container, with each program given fresh globals —
|
|
1293
|
-
* which is why `sys.modules` leaks between unrelated programs and every
|
|
1294
|
-
* program reports the same PID (see docs/python/baseline-inventory.md).
|
|
1295
|
-
* `sbx-cpython-wasm` is the owned distribution: CPython built from source, one
|
|
1257
|
+
* One backend: the owned distribution. CPython built from source, one
|
|
1296
1258
|
* interpreter per process, everything reached through the `sbx_host_v1` kernel
|
|
1297
|
-
* ABI.
|
|
1259
|
+
* ABI. The Pyodide integration it replaced cached a single interpreter per
|
|
1260
|
+
* container and gave each program fresh globals, so `sys.modules` leaked
|
|
1261
|
+
* between unrelated programs and every program reported the same pid.
|
|
1298
1262
|
*
|
|
1299
|
-
* The
|
|
1300
|
-
*
|
|
1263
|
+
* The command line is handed to the interpreter verbatim. Re-parsing Python's
|
|
1264
|
+
* flags here to decide what to do with them is how `-X`, `-W` and `-I` come to
|
|
1265
|
+
* be silently dropped; the interpreter's own entry point already knows them all.
|
|
1301
1266
|
*/
|
|
1302
1267
|
|
|
1303
1268
|
declare const PYTHON_VERSION = "3.13";
|
|
1304
1269
|
interface PythonOptions {
|
|
1305
|
-
/**
|
|
1306
|
-
indexURL?: string;
|
|
1307
|
-
/** URL of pyodide.mjs, for browsers without package resolution. */
|
|
1308
|
-
pyodideURL?: string;
|
|
1309
|
-
/**
|
|
1310
|
-
* Which interpreter to run. Defaults to `pyodide` until the parity gates in
|
|
1311
|
-
* docs/python/release-gates.md pass.
|
|
1312
|
-
*/
|
|
1270
|
+
/** Which interpreter to run. There is one, and it is the default. */
|
|
1313
1271
|
backend?: PythonBackendName;
|
|
1314
1272
|
/** The owned runtime's release manifest. Required by `sbx-cpython-wasm`. */
|
|
1315
1273
|
manifest?: PythonRuntimeManifest;
|
|
@@ -1333,7 +1291,14 @@ interface PythonOptions {
|
|
|
1333
1291
|
buildFromSource?: boolean | string;
|
|
1334
1292
|
}
|
|
1335
1293
|
declare function configurePython(options?: PythonOptions): void;
|
|
1336
|
-
|
|
1294
|
+
/**
|
|
1295
|
+
* Whether this host can run Python at all.
|
|
1296
|
+
*
|
|
1297
|
+
* The release manifest is what names the interpreter's assets, so without one
|
|
1298
|
+
* there is nothing to load. Reporting that here lets a caller choose another
|
|
1299
|
+
* path rather than discovering it when a program fails to start.
|
|
1300
|
+
*/
|
|
1301
|
+
declare function isPythonAvailable(): Promise<boolean>;
|
|
1337
1302
|
|
|
1338
1303
|
/**
|
|
1339
1304
|
* A promise-based filesystem façade for host code, shaped like `fs/promises`
|
|
@@ -1713,4 +1678,4 @@ declare class Container {
|
|
|
1713
1678
|
/** Boot a container. The one function most callers need. */
|
|
1714
1679
|
declare function createContainer(opts?: ContainerOptions): Promise<Container>;
|
|
1715
1680
|
|
|
1716
|
-
export { type
|
|
1681
|
+
export { type PythonOptions as $, NullInput as A, type BinaryBackend as B, Container as C, NullOutput as D, type ExecContext as E, type FileData as F, type GroupEntry as G, type HttpResponse as H, type InputStream as I, type Job as J, Kernel as K, type ListeningPort as L, MANIFEST_FORMAT as M, type Node as N, type OutputStream as O, PYTHON_VERSION as P, type PasswdEntry as Q, Pipe as R, Shell as S, type Preparation as T, type PreparedBinary as U, Process as V, type ProcessKind as W, type ProcessOptions as X, type ProcessState as Y, ProcessTable as Z, type PythonCapabilities as _, type ShellIO as a, type PythonProfile as a0, type PythonRuntimeManifest as a1, type ResolvedExecutable as a2, type RunOptions as a3, type RunResult as a4, type SessionInit as a5, type SessionResult as a6, type SessionRunOptions as a7, ShellExit as a8, type ShellInit as a9, type ShellOptions as aa, type SpawnHandle as ab, type Stdio as ac, TeeOutput as ad, UserDatabase as ae, Variables as af, type WasmCommandArtifact as ag, type WasmTranslator as ah, binaryDigest as ai, braceExpand as aj, captureStdio as ak, configurePython as al, createContext as am, createTranslationBackend as an, createWasmCompatibilityBackend as ao, defineCommand as ap, expandWord as aq, expandWords as ar, inspectElf as as, installWasmCommands as at, isElfBinary as au, isPythonAvailable as av, resetPidCounter as aw, shellQuote as ax, validateManifest as ay, Session as b, type Command as c, createContainer as d, BinaryExecutionRegistry as e, type BinaryInfo as f, type BinaryRequest as g, BufferSink as h, CallbackSink as i, CommandRegistry as j, ContainerFs as k, type ContainerOptions as l, type ContextInit as m, type Env as n, type ExecOptions as o, type ExecResult as p, type ExecutionDecision as q, type ExecutionTier as r, FileInput as s, FileOutput as t, type KernelOptions as u, MANIFEST_SCHEMA_VERSION as v, type MountEntry as w, type NetInterface as x, type NetworkOptions as y, NetworkStack as z };
|