@jini-ai/sandbox 0.7.3-next.2 → 0.7.4
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/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -207,3 +207,12 @@ real mistakes in earlier drafts before they shipped.
|
|
|
207
207
|
## Worker execution
|
|
208
208
|
|
|
209
209
|
`./node-worker` provides bounded per-call workers with explicit entry paths, payload/result codecs, clocks and resource budgets. See [API.md](https://github.com/AINSEP/Jini/blob/main/packages/sandbox/API.md) for composition and migration. `./core` remains universal and imports no adapter; `./e2b` and `./node-worker` use Node.
|
|
210
|
+
|
|
211
|
+
`./node-worker/per-call-runner` builds a fresh-worker-per-request runner on top of `./node-worker`
|
|
212
|
+
(env allowlist, strict timeout read, `.ts`/`.js` entry choice).
|
|
213
|
+
|
|
214
|
+
## Wiring
|
|
215
|
+
|
|
216
|
+
For `./node-worker/per-call-runner` the host injects its worker entry (`entryDirectory`, `workerEntryName`,
|
|
217
|
+
its own `moduleExtension`), its `typescriptBootstrapPath`, its `timeoutEnvKey` and budgets, and the
|
|
218
|
+
`errorLabel`/`decodeResult` codec, and the `env` it reads; Jini owns no entry path or env name.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ResourceLimits } from "node:worker_threads";
|
|
2
|
+
import { type WorkerFactory, type WorkerScheduler } from "../node-worker.js";
|
|
3
|
+
/** The only environment variables a per-call worker receives. Guest code runs in that worker, so
|
|
4
|
+
* the server's environment (API keys, database URLs, site keys) must never be copied in: these
|
|
5
|
+
* are runtime/tooling settings only — `TSX_TSCONFIG_PATH` for the dev/test tsx bootstrap,
|
|
6
|
+
* `NODE_V8_COVERAGE` so a compiled worker still reports coverage. */
|
|
7
|
+
export declare const PER_CALL_WORKER_ENV_KEYS: readonly ["NODE_ENV", "TZ", "TSX_TSCONFIG_PATH", "NODE_V8_COVERAGE"];
|
|
8
|
+
/**
|
|
9
|
+
* The explicit minimal environment for one per-call worker: {@link PER_CALL_WORKER_ENV_KEYS} that
|
|
10
|
+
* are set in `env`, nothing else.
|
|
11
|
+
*
|
|
12
|
+
* @complexity O(k) for the k allowlisted keys.
|
|
13
|
+
*/
|
|
14
|
+
export declare function perCallWorkerEnv(required: {
|
|
15
|
+
readonly env: NodeJS.ProcessEnv;
|
|
16
|
+
}, _optional?: {}): NodeJS.ProcessEnv;
|
|
17
|
+
/** A host's timeout policy: the variable it reads and its default/maximum budgets in milliseconds. */
|
|
18
|
+
export interface PerCallWorkerTimeoutPolicy {
|
|
19
|
+
readonly timeoutEnvKey: string;
|
|
20
|
+
readonly defaultTimeoutMs: number;
|
|
21
|
+
readonly maxTimeoutMs: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reads the host's timeout variable strictly (no `parseInt`: "5e3" must not become 5ms).
|
|
25
|
+
*
|
|
26
|
+
* @returns The configured positive budget, or the default for a missing, malformed or over-max value.
|
|
27
|
+
* @complexity O(n) for n characters in the configured value.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolvePerCallWorkerTimeoutMs(required: PerCallWorkerTimeoutPolicy & {
|
|
30
|
+
readonly env: NodeJS.ProcessEnv;
|
|
31
|
+
}, _optional?: {}): number;
|
|
32
|
+
export interface CreatePerCallWorkerRunnerRequired<TRequest, TResult> extends PerCallWorkerTimeoutPolicy {
|
|
33
|
+
/** Read for the timeout; only its {@link perCallWorkerEnv} subset reaches the worker. The host
|
|
34
|
+
* passes its process environment (Jini never reads `process.env` itself). */
|
|
35
|
+
readonly env: NodeJS.ProcessEnv;
|
|
36
|
+
/** Directory holding the host's worker entry (`<workerEntryName><moduleExtension>`). */
|
|
37
|
+
readonly entryDirectory: string;
|
|
38
|
+
readonly workerEntryName: string;
|
|
39
|
+
/** `.ts` under tsx, `.js` in a compiled build — the host's own module extension. */
|
|
40
|
+
readonly moduleExtension: string;
|
|
41
|
+
/** The host's CommonJS registration module, used only for a `.ts` entry. */
|
|
42
|
+
readonly typescriptBootstrapPath: string;
|
|
43
|
+
readonly defaultResourceLimits: ResourceLimits;
|
|
44
|
+
/** Names the call in timeout/exit errors. */
|
|
45
|
+
readonly errorLabel: (required: {
|
|
46
|
+
readonly request: TRequest;
|
|
47
|
+
}) => string;
|
|
48
|
+
readonly decodeResult: (required: {
|
|
49
|
+
readonly message: unknown;
|
|
50
|
+
readonly request: TRequest;
|
|
51
|
+
}) => TResult;
|
|
52
|
+
}
|
|
53
|
+
export interface CreatePerCallWorkerRunnerOptional {
|
|
54
|
+
/** Per-call wall-clock budget. Omitted ⇒ {@link resolvePerCallWorkerTimeoutMs} at call time. */
|
|
55
|
+
readonly timeoutMs?: number;
|
|
56
|
+
readonly resourceLimits?: ResourceLimits;
|
|
57
|
+
/** Test seams over the worker/timer ports. */
|
|
58
|
+
readonly workerFactory?: WorkerFactory;
|
|
59
|
+
readonly scheduler?: WorkerScheduler;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Builds a runner that spawns one fresh bounded worker per request.
|
|
63
|
+
*
|
|
64
|
+
* @returns A runner that rejects on timeout, worker error, exit without reply, or invalid reply.
|
|
65
|
+
* @complexity O(1) own work per call (a fixed-size env allowlist), excluding worker startup and
|
|
66
|
+
* guest work.
|
|
67
|
+
*/
|
|
68
|
+
export declare function createPerCallWorkerRunner<TRequest, TResult>(required: CreatePerCallWorkerRunnerRequired<TRequest, TResult>, optional?: CreatePerCallWorkerRunnerOptional): (request: TRequest) => Promise<TResult>;
|
|
69
|
+
//# sourceMappingURL=per-call-runner.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PER_CALL_WORKER_ENV_KEYS = void 0;
|
|
7
|
+
exports.perCallWorkerEnv = perCallWorkerEnv;
|
|
8
|
+
exports.resolvePerCallWorkerTimeoutMs = resolvePerCallWorkerTimeoutMs;
|
|
9
|
+
exports.createPerCallWorkerRunner = createPerCallWorkerRunner;
|
|
10
|
+
/**
|
|
11
|
+
* @file `createPerCallWorkerRunner()` — runs each request in a FRESH Node worker over `../node-worker.ts`,
|
|
12
|
+
* with a wall-clock timeout and V8 heap limits, and decodes the reply with a caller-owned codec. The
|
|
13
|
+
* host owns its worker entry file, its TypeScript bootstrap module, its timeout variable name and its
|
|
14
|
+
* budgets; this module owns the env allowlist, the strict timeout read and the `.ts`/`.js` entry choice.
|
|
15
|
+
*
|
|
16
|
+
* Why a fresh worker per call (an ABI-boundary slice, not yet a real process sandbox): a
|
|
17
|
+
* main-thread `Promise.race` cannot interrupt a guest's synchronous loop, and a long-lived worker
|
|
18
|
+
* would carry one call's module state into the next. A fresh worker gives the server a termination
|
|
19
|
+
* boundary and a heap cap per call, and the guest's code never runs in the server's isolate.
|
|
20
|
+
*
|
|
21
|
+
* Every transport failure (timeout, crash, heap limit, malformed reply) rejects, so the caller can
|
|
22
|
+
* fail closed exactly as for a throwing in-process call.
|
|
23
|
+
*/
|
|
24
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
25
|
+
const node_worker_js_1 = require("../node-worker.js");
|
|
26
|
+
/** The only environment variables a per-call worker receives. Guest code runs in that worker, so
|
|
27
|
+
* the server's environment (API keys, database URLs, site keys) must never be copied in: these
|
|
28
|
+
* are runtime/tooling settings only — `TSX_TSCONFIG_PATH` for the dev/test tsx bootstrap,
|
|
29
|
+
* `NODE_V8_COVERAGE` so a compiled worker still reports coverage. */
|
|
30
|
+
exports.PER_CALL_WORKER_ENV_KEYS = ["NODE_ENV", "TZ", "TSX_TSCONFIG_PATH", "NODE_V8_COVERAGE"];
|
|
31
|
+
/**
|
|
32
|
+
* The explicit minimal environment for one per-call worker: {@link PER_CALL_WORKER_ENV_KEYS} that
|
|
33
|
+
* are set in `env`, nothing else.
|
|
34
|
+
*
|
|
35
|
+
* @complexity O(k) for the k allowlisted keys.
|
|
36
|
+
*/
|
|
37
|
+
function perCallWorkerEnv(required, _optional = {}) {
|
|
38
|
+
const workerEnv = {};
|
|
39
|
+
for (const key of exports.PER_CALL_WORKER_ENV_KEYS) {
|
|
40
|
+
const value = required.env[key];
|
|
41
|
+
if (value !== undefined)
|
|
42
|
+
workerEnv[key] = value;
|
|
43
|
+
}
|
|
44
|
+
return workerEnv;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Reads the host's timeout variable strictly (no `parseInt`: "5e3" must not become 5ms).
|
|
48
|
+
*
|
|
49
|
+
* @returns The configured positive budget, or the default for a missing, malformed or over-max value.
|
|
50
|
+
* @complexity O(n) for n characters in the configured value.
|
|
51
|
+
*/
|
|
52
|
+
function resolvePerCallWorkerTimeoutMs(required, _optional = {}) {
|
|
53
|
+
return (0, node_worker_js_1.resolveDefaultTimeoutMs)({
|
|
54
|
+
rawValue: required.env[required.timeoutEnvKey],
|
|
55
|
+
defaultTimeoutMs: required.defaultTimeoutMs,
|
|
56
|
+
maxTimeoutMs: required.maxTimeoutMs,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Builds a runner that spawns one fresh bounded worker per request.
|
|
61
|
+
*
|
|
62
|
+
* @returns A runner that rejects on timeout, worker error, exit without reply, or invalid reply.
|
|
63
|
+
* @complexity O(1) own work per call (a fixed-size env allowlist), excluding worker startup and
|
|
64
|
+
* guest work.
|
|
65
|
+
*/
|
|
66
|
+
function createPerCallWorkerRunner(required, optional = {}) {
|
|
67
|
+
return (request) => {
|
|
68
|
+
const env = required.env;
|
|
69
|
+
const workerFactory = optional.workerFactory ??
|
|
70
|
+
(0, node_worker_js_1.createNodeWorkerFactory)({ env: perCallWorkerEnv({ env }) }, {
|
|
71
|
+
// tsx's CJS hook alone cannot load a `.ts` guest through the worker's dynamic `import()`.
|
|
72
|
+
...(required.moduleExtension === ".ts"
|
|
73
|
+
? { typescriptBootstrap: { registerModulePath: required.typescriptBootstrapPath } }
|
|
74
|
+
: {}),
|
|
75
|
+
});
|
|
76
|
+
return (0, node_worker_js_1.runInWorkerSandbox)({
|
|
77
|
+
workerEntry: node_path_1.default.join(required.entryDirectory, `${required.workerEntryName}${required.moduleExtension}`),
|
|
78
|
+
input: request,
|
|
79
|
+
errorLabel: required.errorLabel({ request }),
|
|
80
|
+
defaultTimeoutMs: optional.timeoutMs ?? resolvePerCallWorkerTimeoutMs({ ...required, env }),
|
|
81
|
+
defaultResourceLimits: optional.resourceLimits ?? required.defaultResourceLimits,
|
|
82
|
+
workerFactory,
|
|
83
|
+
scheduler: optional.scheduler ?? (0, node_worker_js_1.createNodeWorkerScheduler)({}),
|
|
84
|
+
decodeResult: ({ message }) => required.decodeResult({ message, request }),
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=per-call-runner.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ResourceLimits } from "node:worker_threads";
|
|
2
|
+
import { type WorkerFactory, type WorkerScheduler } from "../node-worker.js";
|
|
3
|
+
/** The only environment variables a per-call worker receives. Guest code runs in that worker, so
|
|
4
|
+
* the server's environment (API keys, database URLs, site keys) must never be copied in: these
|
|
5
|
+
* are runtime/tooling settings only — `TSX_TSCONFIG_PATH` for the dev/test tsx bootstrap,
|
|
6
|
+
* `NODE_V8_COVERAGE` so a compiled worker still reports coverage. */
|
|
7
|
+
export declare const PER_CALL_WORKER_ENV_KEYS: readonly ["NODE_ENV", "TZ", "TSX_TSCONFIG_PATH", "NODE_V8_COVERAGE"];
|
|
8
|
+
/**
|
|
9
|
+
* The explicit minimal environment for one per-call worker: {@link PER_CALL_WORKER_ENV_KEYS} that
|
|
10
|
+
* are set in `env`, nothing else.
|
|
11
|
+
*
|
|
12
|
+
* @complexity O(k) for the k allowlisted keys.
|
|
13
|
+
*/
|
|
14
|
+
export declare function perCallWorkerEnv(required: {
|
|
15
|
+
readonly env: NodeJS.ProcessEnv;
|
|
16
|
+
}, _optional?: {}): NodeJS.ProcessEnv;
|
|
17
|
+
/** A host's timeout policy: the variable it reads and its default/maximum budgets in milliseconds. */
|
|
18
|
+
export interface PerCallWorkerTimeoutPolicy {
|
|
19
|
+
readonly timeoutEnvKey: string;
|
|
20
|
+
readonly defaultTimeoutMs: number;
|
|
21
|
+
readonly maxTimeoutMs: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reads the host's timeout variable strictly (no `parseInt`: "5e3" must not become 5ms).
|
|
25
|
+
*
|
|
26
|
+
* @returns The configured positive budget, or the default for a missing, malformed or over-max value.
|
|
27
|
+
* @complexity O(n) for n characters in the configured value.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolvePerCallWorkerTimeoutMs(required: PerCallWorkerTimeoutPolicy & {
|
|
30
|
+
readonly env: NodeJS.ProcessEnv;
|
|
31
|
+
}, _optional?: {}): number;
|
|
32
|
+
export interface CreatePerCallWorkerRunnerRequired<TRequest, TResult> extends PerCallWorkerTimeoutPolicy {
|
|
33
|
+
/** Read for the timeout; only its {@link perCallWorkerEnv} subset reaches the worker. The host
|
|
34
|
+
* passes its process environment (Jini never reads `process.env` itself). */
|
|
35
|
+
readonly env: NodeJS.ProcessEnv;
|
|
36
|
+
/** Directory holding the host's worker entry (`<workerEntryName><moduleExtension>`). */
|
|
37
|
+
readonly entryDirectory: string;
|
|
38
|
+
readonly workerEntryName: string;
|
|
39
|
+
/** `.ts` under tsx, `.js` in a compiled build — the host's own module extension. */
|
|
40
|
+
readonly moduleExtension: string;
|
|
41
|
+
/** The host's CommonJS registration module, used only for a `.ts` entry. */
|
|
42
|
+
readonly typescriptBootstrapPath: string;
|
|
43
|
+
readonly defaultResourceLimits: ResourceLimits;
|
|
44
|
+
/** Names the call in timeout/exit errors. */
|
|
45
|
+
readonly errorLabel: (required: {
|
|
46
|
+
readonly request: TRequest;
|
|
47
|
+
}) => string;
|
|
48
|
+
readonly decodeResult: (required: {
|
|
49
|
+
readonly message: unknown;
|
|
50
|
+
readonly request: TRequest;
|
|
51
|
+
}) => TResult;
|
|
52
|
+
}
|
|
53
|
+
export interface CreatePerCallWorkerRunnerOptional {
|
|
54
|
+
/** Per-call wall-clock budget. Omitted ⇒ {@link resolvePerCallWorkerTimeoutMs} at call time. */
|
|
55
|
+
readonly timeoutMs?: number;
|
|
56
|
+
readonly resourceLimits?: ResourceLimits;
|
|
57
|
+
/** Test seams over the worker/timer ports. */
|
|
58
|
+
readonly workerFactory?: WorkerFactory;
|
|
59
|
+
readonly scheduler?: WorkerScheduler;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Builds a runner that spawns one fresh bounded worker per request.
|
|
63
|
+
*
|
|
64
|
+
* @returns A runner that rejects on timeout, worker error, exit without reply, or invalid reply.
|
|
65
|
+
* @complexity O(1) own work per call (a fixed-size env allowlist), excluding worker startup and
|
|
66
|
+
* guest work.
|
|
67
|
+
*/
|
|
68
|
+
export declare function createPerCallWorkerRunner<TRequest, TResult>(required: CreatePerCallWorkerRunnerRequired<TRequest, TResult>, optional?: CreatePerCallWorkerRunnerOptional): (request: TRequest) => Promise<TResult>;
|
|
69
|
+
//# sourceMappingURL=per-call-runner.d.ts.map
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file `createPerCallWorkerRunner()` — runs each request in a FRESH Node worker over `../node-worker.ts`,
|
|
3
|
+
* with a wall-clock timeout and V8 heap limits, and decodes the reply with a caller-owned codec. The
|
|
4
|
+
* host owns its worker entry file, its TypeScript bootstrap module, its timeout variable name and its
|
|
5
|
+
* budgets; this module owns the env allowlist, the strict timeout read and the `.ts`/`.js` entry choice.
|
|
6
|
+
*
|
|
7
|
+
* Why a fresh worker per call (an ABI-boundary slice, not yet a real process sandbox): a
|
|
8
|
+
* main-thread `Promise.race` cannot interrupt a guest's synchronous loop, and a long-lived worker
|
|
9
|
+
* would carry one call's module state into the next. A fresh worker gives the server a termination
|
|
10
|
+
* boundary and a heap cap per call, and the guest's code never runs in the server's isolate.
|
|
11
|
+
*
|
|
12
|
+
* Every transport failure (timeout, crash, heap limit, malformed reply) rejects, so the caller can
|
|
13
|
+
* fail closed exactly as for a throwing in-process call.
|
|
14
|
+
*/
|
|
15
|
+
import path from "node:path";
|
|
16
|
+
import { createNodeWorkerFactory, createNodeWorkerScheduler, resolveDefaultTimeoutMs, runInWorkerSandbox, } from "../node-worker.js";
|
|
17
|
+
/** The only environment variables a per-call worker receives. Guest code runs in that worker, so
|
|
18
|
+
* the server's environment (API keys, database URLs, site keys) must never be copied in: these
|
|
19
|
+
* are runtime/tooling settings only — `TSX_TSCONFIG_PATH` for the dev/test tsx bootstrap,
|
|
20
|
+
* `NODE_V8_COVERAGE` so a compiled worker still reports coverage. */
|
|
21
|
+
export const PER_CALL_WORKER_ENV_KEYS = ["NODE_ENV", "TZ", "TSX_TSCONFIG_PATH", "NODE_V8_COVERAGE"];
|
|
22
|
+
/**
|
|
23
|
+
* The explicit minimal environment for one per-call worker: {@link PER_CALL_WORKER_ENV_KEYS} that
|
|
24
|
+
* are set in `env`, nothing else.
|
|
25
|
+
*
|
|
26
|
+
* @complexity O(k) for the k allowlisted keys.
|
|
27
|
+
*/
|
|
28
|
+
export function perCallWorkerEnv(required, _optional = {}) {
|
|
29
|
+
const workerEnv = {};
|
|
30
|
+
for (const key of PER_CALL_WORKER_ENV_KEYS) {
|
|
31
|
+
const value = required.env[key];
|
|
32
|
+
if (value !== undefined)
|
|
33
|
+
workerEnv[key] = value;
|
|
34
|
+
}
|
|
35
|
+
return workerEnv;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Reads the host's timeout variable strictly (no `parseInt`: "5e3" must not become 5ms).
|
|
39
|
+
*
|
|
40
|
+
* @returns The configured positive budget, or the default for a missing, malformed or over-max value.
|
|
41
|
+
* @complexity O(n) for n characters in the configured value.
|
|
42
|
+
*/
|
|
43
|
+
export function resolvePerCallWorkerTimeoutMs(required, _optional = {}) {
|
|
44
|
+
return resolveDefaultTimeoutMs({
|
|
45
|
+
rawValue: required.env[required.timeoutEnvKey],
|
|
46
|
+
defaultTimeoutMs: required.defaultTimeoutMs,
|
|
47
|
+
maxTimeoutMs: required.maxTimeoutMs,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Builds a runner that spawns one fresh bounded worker per request.
|
|
52
|
+
*
|
|
53
|
+
* @returns A runner that rejects on timeout, worker error, exit without reply, or invalid reply.
|
|
54
|
+
* @complexity O(1) own work per call (a fixed-size env allowlist), excluding worker startup and
|
|
55
|
+
* guest work.
|
|
56
|
+
*/
|
|
57
|
+
export function createPerCallWorkerRunner(required, optional = {}) {
|
|
58
|
+
return (request) => {
|
|
59
|
+
const env = required.env;
|
|
60
|
+
const workerFactory = optional.workerFactory ??
|
|
61
|
+
createNodeWorkerFactory({ env: perCallWorkerEnv({ env }) }, {
|
|
62
|
+
// tsx's CJS hook alone cannot load a `.ts` guest through the worker's dynamic `import()`.
|
|
63
|
+
...(required.moduleExtension === ".ts"
|
|
64
|
+
? { typescriptBootstrap: { registerModulePath: required.typescriptBootstrapPath } }
|
|
65
|
+
: {}),
|
|
66
|
+
});
|
|
67
|
+
return runInWorkerSandbox({
|
|
68
|
+
workerEntry: path.join(required.entryDirectory, `${required.workerEntryName}${required.moduleExtension}`),
|
|
69
|
+
input: request,
|
|
70
|
+
errorLabel: required.errorLabel({ request }),
|
|
71
|
+
defaultTimeoutMs: optional.timeoutMs ?? resolvePerCallWorkerTimeoutMs({ ...required, env }),
|
|
72
|
+
defaultResourceLimits: optional.resourceLimits ?? required.defaultResourceLimits,
|
|
73
|
+
workerFactory,
|
|
74
|
+
scheduler: optional.scheduler ?? createNodeWorkerScheduler({}),
|
|
75
|
+
decodeResult: ({ message }) => required.decodeResult({ message, request }),
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=per-call-runner.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/sandbox",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Execution/sandbox sibling to @jini-ai/vibecoding's edit loop: boot an environment, mount files, install deps, run commands, preview, and tear down — behind one interface with a driver-neutral core. Import `./core` with no adapter installed; add `./e2b` for the E2B (Firecracker microVM) backend.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"entries": {
|
|
15
15
|
"./core": "universal",
|
|
16
16
|
"./e2b": "node",
|
|
17
|
-
"./node-worker": "node"
|
|
17
|
+
"./node-worker": "node",
|
|
18
|
+
"./node-worker/per-call-runner": "node"
|
|
18
19
|
},
|
|
19
20
|
"runtime": "node",
|
|
20
21
|
"neutralEntries": [
|
|
@@ -56,6 +57,16 @@
|
|
|
56
57
|
"types": "./dist/cjs/node-worker.d.ts",
|
|
57
58
|
"default": "./dist/cjs/node-worker.js"
|
|
58
59
|
}
|
|
60
|
+
},
|
|
61
|
+
"./node-worker/per-call-runner": {
|
|
62
|
+
"import": {
|
|
63
|
+
"types": "./dist/node-worker/per-call-runner.d.ts",
|
|
64
|
+
"default": "./dist/node-worker/per-call-runner.js"
|
|
65
|
+
},
|
|
66
|
+
"require": {
|
|
67
|
+
"types": "./dist/cjs/node-worker/per-call-runner.d.ts",
|
|
68
|
+
"default": "./dist/cjs/node-worker/per-call-runner.js"
|
|
69
|
+
}
|
|
59
70
|
}
|
|
60
71
|
},
|
|
61
72
|
"typesVersions": {
|
|
@@ -68,6 +79,9 @@
|
|
|
68
79
|
],
|
|
69
80
|
"node-worker": [
|
|
70
81
|
"./dist/node-worker.d.ts"
|
|
82
|
+
],
|
|
83
|
+
"node-worker/per-call-runner": [
|
|
84
|
+
"./dist/node-worker/per-call-runner.d.ts"
|
|
71
85
|
]
|
|
72
86
|
}
|
|
73
87
|
},
|