secure-exec 0.2.0-rc.1 → 0.2.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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/runtime.js +9 -1
- package/dist/shared/in-memory-fs.d.ts +1 -1
- package/dist/shared/in-memory-fs.js +1 -1
- package/package.json +8 -11
- package/dist/browser/index.d.ts +0 -5
- package/dist/browser/index.js +0 -4
- package/dist/browser/worker.d.ts +0 -1
- package/dist/browser/worker.js +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export type { ResourceBudgets } from "./runtime-driver.js";
|
|
|
4
4
|
export type { NodeRuntimeDriver, NodeRuntimeDriverFactory, NetworkAdapter, Permissions, VirtualFileSystem, } from "./types.js";
|
|
5
5
|
export type { DirEntry, StatInfo } from "./fs-helpers.js";
|
|
6
6
|
export type { StdioChannel, StdioEvent, StdioHook, ExecOptions, ExecResult, OSConfig, ProcessConfig, RunResult, TimingMitigation, } from "./shared/api-types.js";
|
|
7
|
-
export { createDefaultNetworkAdapter, createNodeDriver, createNodeRuntimeDriverFactory, NodeExecutionDriver, NodeFileSystem, } from "@secure-exec/nodejs";
|
|
8
|
-
export type { ModuleAccessOptions, NodeRuntimeDriverFactoryOptions, } from "@secure-exec/nodejs";
|
|
7
|
+
export { createDefaultNetworkAdapter, createNodeDriver, createNodeHostCommandExecutor, createNodeRuntimeDriverFactory, NodeExecutionDriver, NodeFileSystem, } from "@secure-exec/nodejs";
|
|
8
|
+
export type { DefaultNetworkAdapterOptions, ModuleAccessOptions, NodeRuntimeDriverFactoryOptions, } from "@secure-exec/nodejs";
|
|
9
9
|
export { createKernel } from "@secure-exec/core";
|
|
10
10
|
export type { Kernel, KernelInterface } from "@secure-exec/core";
|
|
11
11
|
export { createNodeRuntime } from "@secure-exec/nodejs";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Re-export core runtime surface.
|
|
2
2
|
export { NodeRuntime } from "./runtime.js";
|
|
3
3
|
// Re-export Node driver factories.
|
|
4
|
-
export { createDefaultNetworkAdapter, createNodeDriver, createNodeRuntimeDriverFactory, NodeExecutionDriver, NodeFileSystem, } from "@secure-exec/nodejs";
|
|
4
|
+
export { createDefaultNetworkAdapter, createNodeDriver, createNodeHostCommandExecutor, createNodeRuntimeDriverFactory, NodeExecutionDriver, NodeFileSystem, } from "@secure-exec/nodejs";
|
|
5
5
|
// Re-export kernel API.
|
|
6
6
|
export { createKernel } from "@secure-exec/core";
|
|
7
7
|
// Re-export kernel Node runtime factory.
|
package/dist/runtime.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { createNetworkStub, filterEnv } from "@secure-exec/core";
|
|
2
|
+
import { createSandboxCommandExecutor } from "@secure-exec/nodejs";
|
|
2
3
|
const DEFAULT_SANDBOX_CWD = "/root";
|
|
3
4
|
const DEFAULT_SANDBOX_HOME = "/root";
|
|
4
5
|
const DEFAULT_SANDBOX_TMPDIR = "/tmp";
|
|
5
6
|
export class NodeRuntime {
|
|
6
7
|
runtimeDriver;
|
|
7
8
|
constructor(options) {
|
|
8
|
-
const {
|
|
9
|
+
const { runtimeDriverFactory } = options;
|
|
10
|
+
// Auto-inject sandbox command executor when none is configured
|
|
11
|
+
const systemDriver = options.systemDriver.commandExecutor
|
|
12
|
+
? options.systemDriver
|
|
13
|
+
: {
|
|
14
|
+
...options.systemDriver,
|
|
15
|
+
commandExecutor: createSandboxCommandExecutor(runtimeDriverFactory, options.systemDriver),
|
|
16
|
+
};
|
|
9
17
|
const processConfig = {
|
|
10
18
|
...(systemDriver.runtime.process ?? {}),
|
|
11
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createInMemoryFileSystem
|
|
1
|
+
export { createInMemoryFileSystem } from "@secure-exec/core";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Re-exported from @secure-exec/core
|
|
2
|
-
export { createInMemoryFileSystem
|
|
2
|
+
export { createInMemoryFileSystem } from "@secure-exec/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "secure-exec",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,12 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@secure-exec/
|
|
26
|
-
"@secure-exec/
|
|
27
|
-
},
|
|
28
|
-
"optionalDependencies": {
|
|
29
|
-
"@secure-exec/browser": "0.2.0-rc.1",
|
|
30
|
-
"@secure-exec/python": "0.2.0-rc.1"
|
|
25
|
+
"@secure-exec/core": "0.2.0",
|
|
26
|
+
"@secure-exec/nodejs": "0.2.0"
|
|
31
27
|
},
|
|
32
28
|
"devDependencies": {
|
|
33
29
|
"@mariozechner/pi-coding-agent": "^0.60.0",
|
|
@@ -36,20 +32,21 @@
|
|
|
36
32
|
"@vitest/browser": "^2.1.8",
|
|
37
33
|
"@xterm/headless": "^6.0.0",
|
|
38
34
|
"minimatch": "^10.2.4",
|
|
35
|
+
"node-pty": "^1.1.0",
|
|
36
|
+
"opencode-ai": "1.3.3",
|
|
39
37
|
"playwright": "^1.52.0",
|
|
40
38
|
"tsx": "^4.19.2",
|
|
41
39
|
"typescript": "^5.7.2",
|
|
42
40
|
"vitest": "^2.1.8",
|
|
43
|
-
"@secure-exec/v8": "0.2.0
|
|
41
|
+
"@secure-exec/v8": "0.2.0"
|
|
44
42
|
},
|
|
45
43
|
"scripts": {
|
|
46
44
|
"check-types": "tsc --noEmit",
|
|
47
45
|
"check-types:test": "vitest --typecheck --run tests/types/",
|
|
48
46
|
"build": "tsc",
|
|
49
|
-
"test:test-suite": "vitest run tests/test-suite
|
|
50
|
-
"test:runtime-driver": "vitest run tests/runtime-driver
|
|
47
|
+
"test:test-suite": "vitest run tests/test-suite/node.test.ts",
|
|
48
|
+
"test:runtime-driver": "vitest run tests/runtime-driver/node/",
|
|
51
49
|
"test:integration:node": "pnpm run test:test-suite && pnpm run test:runtime-driver",
|
|
52
|
-
"test:integration:browser": "vitest run --config vitest.browser.config.ts tests/test-suite/node.test.ts tests/runtime-driver/browser/runtime.test.ts",
|
|
53
50
|
"test:project-matrix": "vitest run tests/project-matrix.test.ts",
|
|
54
51
|
"test:e2e-docker": "vitest run tests/e2e-docker.test.ts",
|
|
55
52
|
"test": "vitest run",
|
package/dist/browser/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { createBrowserDriver, createBrowserNetworkAdapter, createOpfsFileSystem, } from "@secure-exec/browser";
|
|
2
|
-
export type { BrowserDriverOptions, BrowserRuntimeSystemOptions, } from "@secure-exec/browser";
|
|
3
|
-
export { createBrowserRuntimeDriverFactory, } from "@secure-exec/browser";
|
|
4
|
-
export type { BrowserRuntimeDriverFactoryOptions, } from "@secure-exec/browser";
|
|
5
|
-
export { createInMemoryFileSystem } from "@secure-exec/core";
|
package/dist/browser/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Re-export browser driver factories from @secure-exec/browser.
|
|
2
|
-
export { createBrowserDriver, createBrowserNetworkAdapter, createOpfsFileSystem, } from "@secure-exec/browser";
|
|
3
|
-
export { createBrowserRuntimeDriverFactory, } from "@secure-exec/browser";
|
|
4
|
-
export { createInMemoryFileSystem } from "@secure-exec/core";
|
package/dist/browser/worker.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "@secure-exec/browser/internal/worker";
|
package/dist/browser/worker.js
DELETED