isol8 0.11.0 → 0.11.2
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/README.md +13 -2
- package/dist/cli.js +657 -403
- package/dist/index.js +196 -64
- package/dist/src/client/remote.d.ts +2 -2
- package/dist/src/client/remote.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/engine/docker.d.ts +20 -5
- package/dist/src/engine/docker.d.ts.map +1 -1
- package/dist/src/engine/image-builder.d.ts +14 -0
- package/dist/src/engine/image-builder.d.ts.map +1 -1
- package/dist/src/engine/pool.d.ts.map +1 -1
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +48 -1
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +3 -1
- package/schema/isol8.config.schema.json +31 -0
package/dist/index.js
CHANGED
|
@@ -546,6 +546,40 @@ class Semaphore {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
// src/engine/image-builder.ts
|
|
550
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
551
|
+
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
552
|
+
function resolveDockerDir() {
|
|
553
|
+
const fromBundled = new URL("./docker", import.meta.url).pathname;
|
|
554
|
+
if (existsSync3(fromBundled)) {
|
|
555
|
+
return fromBundled;
|
|
556
|
+
}
|
|
557
|
+
return new URL("../../docker", import.meta.url).pathname;
|
|
558
|
+
}
|
|
559
|
+
function computeDepsHash(runtime, packages) {
|
|
560
|
+
const hash = createHash2("sha256");
|
|
561
|
+
hash.update(runtime);
|
|
562
|
+
for (const pkg of [...packages].sort()) {
|
|
563
|
+
hash.update(pkg);
|
|
564
|
+
}
|
|
565
|
+
return hash.digest("hex");
|
|
566
|
+
}
|
|
567
|
+
function normalizePackages(packages) {
|
|
568
|
+
return [...new Set(packages.map((pkg) => pkg.trim()).filter(Boolean))].sort();
|
|
569
|
+
}
|
|
570
|
+
function getCustomImageTag(runtime, packages) {
|
|
571
|
+
const normalizedPackages = normalizePackages(packages);
|
|
572
|
+
const depsHash = computeDepsHash(runtime, normalizedPackages);
|
|
573
|
+
const shortHash = depsHash.slice(0, 12);
|
|
574
|
+
return `isol8:${runtime}-custom-${shortHash}`;
|
|
575
|
+
}
|
|
576
|
+
var DOCKERFILE_DIR;
|
|
577
|
+
var init_image_builder = __esm(() => {
|
|
578
|
+
init_runtime();
|
|
579
|
+
init_logger();
|
|
580
|
+
DOCKERFILE_DIR = resolveDockerDir();
|
|
581
|
+
});
|
|
582
|
+
|
|
549
583
|
// src/engine/pool.ts
|
|
550
584
|
class ContainerPool {
|
|
551
585
|
docker;
|
|
@@ -736,46 +770,44 @@ class ContainerPool {
|
|
|
736
770
|
}
|
|
737
771
|
replenish(image) {
|
|
738
772
|
if (this.replenishing.has(image)) {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
const pool = this.pools.get(image);
|
|
776
|
+
const currentSize = pool ? this.poolStrategy === "fast" ? pool.clean.length : pool.clean?.length ?? 0 : 0;
|
|
777
|
+
const targetSize = this.cleanPoolSize;
|
|
778
|
+
if (currentSize >= targetSize) {
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
this.replenishing.add(image);
|
|
782
|
+
const promise = this.createContainer(image).then((container) => {
|
|
783
|
+
const p = this.pools.get(image);
|
|
784
|
+
if (!p) {
|
|
785
|
+
container.remove({ force: true }).catch(() => {});
|
|
746
786
|
return;
|
|
747
787
|
}
|
|
748
|
-
this.
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
788
|
+
if (this.poolStrategy === "fast") {
|
|
789
|
+
if (p.clean.length < this.cleanPoolSize) {
|
|
790
|
+
p.clean.push({ container, createdAt: Date.now() });
|
|
791
|
+
} else {
|
|
752
792
|
container.remove({ force: true }).catch(() => {});
|
|
753
|
-
return;
|
|
754
793
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
794
|
+
} else {
|
|
795
|
+
if (!p.clean) {
|
|
796
|
+
p.clean = [];
|
|
797
|
+
}
|
|
798
|
+
if (p.clean.length < this.cleanPoolSize) {
|
|
799
|
+
p.clean.push({ container, createdAt: Date.now() });
|
|
761
800
|
} else {
|
|
762
|
-
|
|
763
|
-
p.clean = [];
|
|
764
|
-
}
|
|
765
|
-
if (p.clean.length < this.cleanPoolSize) {
|
|
766
|
-
p.clean.push({ container, createdAt: Date.now() });
|
|
767
|
-
} else {
|
|
768
|
-
container.remove({ force: true }).catch(() => {});
|
|
769
|
-
}
|
|
801
|
+
container.remove({ force: true }).catch(() => {});
|
|
770
802
|
}
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
803
|
+
}
|
|
804
|
+
}).catch((err) => {
|
|
805
|
+
logger.error(`[Pool] Error during replenishment for ${image}:`, err);
|
|
806
|
+
}).finally(() => {
|
|
807
|
+
this.replenishing.delete(image);
|
|
808
|
+
this.pendingReplenishments.delete(promise);
|
|
809
|
+
});
|
|
810
|
+
this.pendingReplenishments.add(promise);
|
|
779
811
|
}
|
|
780
812
|
}
|
|
781
813
|
var init_pool = __esm(() => {
|
|
@@ -923,7 +955,7 @@ __export(exports_docker, {
|
|
|
923
955
|
DockerIsol8: () => DockerIsol8
|
|
924
956
|
});
|
|
925
957
|
import { randomUUID } from "node:crypto";
|
|
926
|
-
import { existsSync as
|
|
958
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "node:fs";
|
|
927
959
|
import { PassThrough } from "node:stream";
|
|
928
960
|
import Docker from "dockerode";
|
|
929
961
|
async function writeFileViaExec(container, filePath, content) {
|
|
@@ -1140,6 +1172,7 @@ class DockerIsol8 {
|
|
|
1140
1172
|
logNetwork;
|
|
1141
1173
|
poolStrategy;
|
|
1142
1174
|
poolSize;
|
|
1175
|
+
dependencies;
|
|
1143
1176
|
auditLogger;
|
|
1144
1177
|
remoteCodePolicy;
|
|
1145
1178
|
container = null;
|
|
@@ -1186,6 +1219,7 @@ class DockerIsol8 {
|
|
|
1186
1219
|
this.logNetwork = options.logNetwork ?? false;
|
|
1187
1220
|
this.poolStrategy = options.poolStrategy ?? "fast";
|
|
1188
1221
|
this.poolSize = options.poolSize ?? { clean: 1, dirty: 1 };
|
|
1222
|
+
this.dependencies = options.dependencies ?? {};
|
|
1189
1223
|
this.remoteCodePolicy = options.remoteCode ?? {
|
|
1190
1224
|
enabled: false,
|
|
1191
1225
|
allowedSchemes: ["https"],
|
|
@@ -1204,7 +1238,33 @@ class DockerIsol8 {
|
|
|
1204
1238
|
logger.setDebug(true);
|
|
1205
1239
|
}
|
|
1206
1240
|
}
|
|
1207
|
-
async start() {
|
|
1241
|
+
async start(options = {}) {
|
|
1242
|
+
if (this.mode !== "ephemeral") {
|
|
1243
|
+
return;
|
|
1244
|
+
}
|
|
1245
|
+
const prewarm = options.prewarm;
|
|
1246
|
+
if (!prewarm) {
|
|
1247
|
+
return;
|
|
1248
|
+
}
|
|
1249
|
+
const pool = this.ensurePool();
|
|
1250
|
+
const images = new Set;
|
|
1251
|
+
const adapters2 = typeof prewarm === "object" && prewarm.runtimes?.length ? prewarm.runtimes.map((runtime) => RuntimeRegistry.get(runtime)) : RuntimeRegistry.list();
|
|
1252
|
+
for (const adapter of adapters2) {
|
|
1253
|
+
try {
|
|
1254
|
+
images.add(await this.resolveImage(adapter));
|
|
1255
|
+
} catch (err) {
|
|
1256
|
+
logger.debug(`[Pool] Pre-warm image resolution failed for ${adapter.name}: ${err}`);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
await Promise.all([...images].map(async (image) => {
|
|
1260
|
+
try {
|
|
1261
|
+
await pool.warm(image);
|
|
1262
|
+
logger.debug(`[Pool] Pre-warmed image: ${image}`);
|
|
1263
|
+
} catch (err) {
|
|
1264
|
+
logger.debug(`[Pool] Pre-warm failed for ${image}: ${err}`);
|
|
1265
|
+
}
|
|
1266
|
+
}));
|
|
1267
|
+
}
|
|
1208
1268
|
async stop() {
|
|
1209
1269
|
if (this.container) {
|
|
1210
1270
|
try {
|
|
@@ -1453,21 +1513,29 @@ class DockerIsol8 {
|
|
|
1453
1513
|
if (cached) {
|
|
1454
1514
|
return cached;
|
|
1455
1515
|
}
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1516
|
+
let resolvedImage = adapter.image;
|
|
1517
|
+
const configuredDeps = this.dependencies[adapter.name];
|
|
1518
|
+
const normalizedDeps = configuredDeps ? normalizePackages(configuredDeps) : [];
|
|
1519
|
+
if (normalizedDeps.length > 0) {
|
|
1520
|
+
const hashedCustomTag = getCustomImageTag(adapter.name, normalizedDeps);
|
|
1521
|
+
try {
|
|
1522
|
+
await this.docker.getImage(hashedCustomTag).inspect();
|
|
1523
|
+
resolvedImage = hashedCustomTag;
|
|
1524
|
+
} catch {
|
|
1525
|
+
logger.debug(`[ImageBuilder] Hashed custom image not found for ${adapter.name}: ${hashedCustomTag}`);
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
if (resolvedImage === adapter.image) {
|
|
1529
|
+
const legacyCustomTag = `${adapter.image}-custom`;
|
|
1530
|
+
try {
|
|
1531
|
+
await this.docker.getImage(legacyCustomTag).inspect();
|
|
1532
|
+
resolvedImage = legacyCustomTag;
|
|
1533
|
+
} catch {}
|
|
1463
1534
|
}
|
|
1464
1535
|
this.imageCache.set(cacheKey, resolvedImage);
|
|
1465
1536
|
return resolvedImage;
|
|
1466
1537
|
}
|
|
1467
|
-
|
|
1468
|
-
const adapter = this.getAdapter(req.runtime);
|
|
1469
|
-
const timeoutMs = req.timeoutMs ?? this.defaultTimeoutMs;
|
|
1470
|
-
const image = await this.resolveImage(adapter);
|
|
1538
|
+
ensurePool() {
|
|
1471
1539
|
if (!this.pool) {
|
|
1472
1540
|
this.pool = new ContainerPool({
|
|
1473
1541
|
docker: this.docker,
|
|
@@ -1485,7 +1553,14 @@ class DockerIsol8 {
|
|
|
1485
1553
|
}
|
|
1486
1554
|
});
|
|
1487
1555
|
}
|
|
1488
|
-
|
|
1556
|
+
return this.pool;
|
|
1557
|
+
}
|
|
1558
|
+
async executeEphemeral(req, startTime) {
|
|
1559
|
+
const adapter = this.getAdapter(req.runtime);
|
|
1560
|
+
const timeoutMs = req.timeoutMs ?? this.defaultTimeoutMs;
|
|
1561
|
+
const image = await this.resolveImage(adapter);
|
|
1562
|
+
const pool = this.ensurePool();
|
|
1563
|
+
const container = await pool.acquire(image);
|
|
1489
1564
|
let startStats;
|
|
1490
1565
|
if (this.auditLogger) {
|
|
1491
1566
|
try {
|
|
@@ -1499,13 +1574,26 @@ class DockerIsol8 {
|
|
|
1499
1574
|
await startProxy(container, this.networkFilter);
|
|
1500
1575
|
await setupIptables(container);
|
|
1501
1576
|
}
|
|
1502
|
-
const
|
|
1503
|
-
|
|
1504
|
-
|
|
1577
|
+
const canUseInline = !(req.stdin || req.files || req.outputPaths) && (!req.installPackages || req.installPackages.length === 0);
|
|
1578
|
+
let rawCmd;
|
|
1579
|
+
if (canUseInline) {
|
|
1580
|
+
try {
|
|
1581
|
+
rawCmd = adapter.getCommand(req.code);
|
|
1582
|
+
} catch {
|
|
1583
|
+
const ext = req.fileExtension ?? adapter.getFileExtension();
|
|
1584
|
+
const filePath = `${SANDBOX_WORKDIR}/main${ext}`;
|
|
1585
|
+
await writeFileViaExec(container, filePath, req.code);
|
|
1586
|
+
rawCmd = adapter.getCommand(req.code, filePath);
|
|
1587
|
+
}
|
|
1588
|
+
} else {
|
|
1589
|
+
const ext = req.fileExtension ?? adapter.getFileExtension();
|
|
1590
|
+
const filePath = `${SANDBOX_WORKDIR}/main${ext}`;
|
|
1591
|
+
await writeFileViaExec(container, filePath, req.code);
|
|
1592
|
+
rawCmd = adapter.getCommand(req.code, filePath);
|
|
1593
|
+
}
|
|
1505
1594
|
if (req.installPackages?.length) {
|
|
1506
1595
|
await installPackages(container, req.runtime, req.installPackages);
|
|
1507
1596
|
}
|
|
1508
|
-
const rawCmd = adapter.getCommand(req.code, filePath);
|
|
1509
1597
|
const timeoutSec = Math.ceil(timeoutMs / 1000);
|
|
1510
1598
|
let cmd;
|
|
1511
1599
|
if (req.stdin) {
|
|
@@ -1576,7 +1664,7 @@ class DockerIsol8 {
|
|
|
1576
1664
|
if (this.persist) {
|
|
1577
1665
|
logger.debug(`[Persist] Leaving container running for inspection: ${container.id}`);
|
|
1578
1666
|
} else {
|
|
1579
|
-
|
|
1667
|
+
pool.release(container, image).catch((err) => {
|
|
1580
1668
|
logger.debug(`[Pool] release failed: ${err}`);
|
|
1581
1669
|
container.remove({ force: true }).catch(() => {});
|
|
1582
1670
|
});
|
|
@@ -1752,7 +1840,7 @@ class DockerIsol8 {
|
|
|
1752
1840
|
}
|
|
1753
1841
|
if (this.security.seccomp === "custom" && this.security.customProfilePath) {
|
|
1754
1842
|
try {
|
|
1755
|
-
const profile =
|
|
1843
|
+
const profile = readFileSync3(this.security.customProfilePath, "utf-8");
|
|
1756
1844
|
opts.push(`seccomp=${profile}`);
|
|
1757
1845
|
} catch (e) {
|
|
1758
1846
|
logger.error(`Failed to load custom seccomp profile: ${e}`);
|
|
@@ -1771,12 +1859,12 @@ class DockerIsol8 {
|
|
|
1771
1859
|
}
|
|
1772
1860
|
loadDefaultSeccompProfile() {
|
|
1773
1861
|
const devPath = new URL("../../docker/seccomp-profile.json", import.meta.url);
|
|
1774
|
-
if (
|
|
1775
|
-
return
|
|
1862
|
+
if (existsSync4(devPath)) {
|
|
1863
|
+
return readFileSync3(devPath, "utf-8");
|
|
1776
1864
|
}
|
|
1777
1865
|
const prodPath = new URL("./docker/seccomp-profile.json", import.meta.url);
|
|
1778
|
-
if (
|
|
1779
|
-
return
|
|
1866
|
+
if (existsSync4(prodPath)) {
|
|
1867
|
+
return readFileSync3(prodPath, "utf-8");
|
|
1780
1868
|
}
|
|
1781
1869
|
logger.warn("Could not locate default seccomp profile. Running without seccomp filter.");
|
|
1782
1870
|
return null;
|
|
@@ -1959,7 +2047,7 @@ class DockerIsol8 {
|
|
|
1959
2047
|
static async cleanup(docker) {
|
|
1960
2048
|
const dockerInstance = docker ?? new Docker;
|
|
1961
2049
|
const containers = await dockerInstance.listContainers({ all: true });
|
|
1962
|
-
const isol8Containers = containers.filter((c) => c.Image.startsWith("isol8:")
|
|
2050
|
+
const isol8Containers = containers.filter((c) => c.Image.startsWith("isol8:"));
|
|
1963
2051
|
let removed = 0;
|
|
1964
2052
|
let failed = 0;
|
|
1965
2053
|
const errors = [];
|
|
@@ -1976,6 +2064,27 @@ class DockerIsol8 {
|
|
|
1976
2064
|
}
|
|
1977
2065
|
return { removed, failed, errors };
|
|
1978
2066
|
}
|
|
2067
|
+
static async cleanupImages(docker) {
|
|
2068
|
+
const dockerInstance = docker ?? new Docker;
|
|
2069
|
+
const images = await dockerInstance.listImages({ all: true });
|
|
2070
|
+
const isol8Images = images.filter((img) => img.RepoTags?.some((tag) => tag.startsWith("isol8:")));
|
|
2071
|
+
let removed = 0;
|
|
2072
|
+
let failed = 0;
|
|
2073
|
+
const errors = [];
|
|
2074
|
+
for (const imageInfo of isol8Images) {
|
|
2075
|
+
try {
|
|
2076
|
+
const image = dockerInstance.getImage(imageInfo.Id);
|
|
2077
|
+
await image.remove({ force: true });
|
|
2078
|
+
removed++;
|
|
2079
|
+
} catch (err) {
|
|
2080
|
+
failed++;
|
|
2081
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
2082
|
+
const imageRef = imageInfo.RepoTags?.[0] ?? imageInfo.Id.slice(0, 12);
|
|
2083
|
+
errors.push(`${imageRef}: ${errorMsg}`);
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
return { removed, failed, errors };
|
|
2087
|
+
}
|
|
1979
2088
|
}
|
|
1980
2089
|
var SANDBOX_WORKDIR = "/sandbox", MAX_OUTPUT_BYTES, PROXY_PORT = 8118, PROXY_STARTUP_TIMEOUT_MS = 5000, PROXY_POLL_INTERVAL_MS = 100;
|
|
1981
2090
|
var init_docker = __esm(() => {
|
|
@@ -1983,6 +2092,7 @@ var init_docker = __esm(() => {
|
|
|
1983
2092
|
init_logger();
|
|
1984
2093
|
init_audit();
|
|
1985
2094
|
init_code_fetcher();
|
|
2095
|
+
init_image_builder();
|
|
1986
2096
|
init_pool();
|
|
1987
2097
|
MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
1988
2098
|
});
|
|
@@ -1999,7 +2109,7 @@ class RemoteIsol8 {
|
|
|
1999
2109
|
this.sessionId = options.sessionId;
|
|
2000
2110
|
this.isol8Options = isol8Options;
|
|
2001
2111
|
}
|
|
2002
|
-
async start() {
|
|
2112
|
+
async start(_options) {
|
|
2003
2113
|
const res = await this.fetch("/health");
|
|
2004
2114
|
if (!res.ok) {
|
|
2005
2115
|
throw new Error(`Remote server health check failed: ${res.status}`);
|
|
@@ -2135,6 +2245,8 @@ var DEFAULT_CONFIG = {
|
|
|
2135
2245
|
autoPrune: true,
|
|
2136
2246
|
maxContainerAgeMs: 3600000
|
|
2137
2247
|
},
|
|
2248
|
+
poolStrategy: "fast",
|
|
2249
|
+
poolSize: { clean: 1, dirty: 1 },
|
|
2138
2250
|
dependencies: {},
|
|
2139
2251
|
security: {
|
|
2140
2252
|
seccomp: "strict"
|
|
@@ -2202,6 +2314,8 @@ function mergeConfig(defaults, overrides) {
|
|
|
2202
2314
|
...defaults.cleanup,
|
|
2203
2315
|
...overrides.cleanup
|
|
2204
2316
|
},
|
|
2317
|
+
poolStrategy: overrides.poolStrategy ?? defaults.poolStrategy,
|
|
2318
|
+
poolSize: overrides.poolSize ?? defaults.poolSize,
|
|
2205
2319
|
dependencies: {
|
|
2206
2320
|
...defaults.dependencies,
|
|
2207
2321
|
...overrides.dependencies
|
|
@@ -2235,7 +2349,7 @@ init_logger();
|
|
|
2235
2349
|
// package.json
|
|
2236
2350
|
var package_default = {
|
|
2237
2351
|
name: "isol8",
|
|
2238
|
-
version: "0.
|
|
2352
|
+
version: "0.11.1",
|
|
2239
2353
|
description: "Secure code execution engine for AI agents",
|
|
2240
2354
|
author: "Illusion47586",
|
|
2241
2355
|
license: "MIT",
|
|
@@ -2280,6 +2394,8 @@ var package_default = {
|
|
|
2280
2394
|
"lint:check": "ultracite check",
|
|
2281
2395
|
"lint:fix": "ultracite fix",
|
|
2282
2396
|
bench: "bunx tsx benchmarks/spawn.ts",
|
|
2397
|
+
"bench:tti": "bunx tsx benchmarks/tti.ts",
|
|
2398
|
+
"bench:tti:pool": "bunx tsx benchmarks/tti.ts --warm-pool --iterations 5",
|
|
2283
2399
|
"bench:pool": "bunx tsx benchmarks/spawn-pool.ts",
|
|
2284
2400
|
"bench:detailed": "bunx tsx benchmarks/spawn-detailed.ts",
|
|
2285
2401
|
"bench:cli": "bun run tests/production/bench-cli.ts",
|
|
@@ -2391,6 +2507,11 @@ async function createServer(options) {
|
|
|
2391
2507
|
const body = await c.req.json();
|
|
2392
2508
|
logger.debug(`[Server] POST /execute runtime=${body.request.runtime} sessionId=${body.sessionId ?? "ephemeral"}`);
|
|
2393
2509
|
logger.debug(`[Server] Code source: ${body.request.codeUrl ? `url=${body.request.codeUrl}` : `inline (${body.request.code?.length ?? 0} chars)`}`);
|
|
2510
|
+
const {
|
|
2511
|
+
poolStrategy: _ignoredPoolStrategy,
|
|
2512
|
+
poolSize: _ignoredPoolSize,
|
|
2513
|
+
...requestOptions
|
|
2514
|
+
} = body.options ?? {};
|
|
2394
2515
|
const engineOptions = {
|
|
2395
2516
|
network: config.defaults.network,
|
|
2396
2517
|
memoryLimit: config.defaults.memoryLimit,
|
|
@@ -2398,8 +2519,11 @@ async function createServer(options) {
|
|
|
2398
2519
|
timeoutMs: config.defaults.timeoutMs,
|
|
2399
2520
|
sandboxSize: config.defaults.sandboxSize,
|
|
2400
2521
|
tmpSize: config.defaults.tmpSize,
|
|
2522
|
+
poolStrategy: config.poolStrategy,
|
|
2523
|
+
poolSize: config.poolSize,
|
|
2524
|
+
dependencies: config.dependencies,
|
|
2401
2525
|
remoteCode: config.remoteCode,
|
|
2402
|
-
...
|
|
2526
|
+
...requestOptions,
|
|
2403
2527
|
mode: body.sessionId ? "persistent" : "ephemeral",
|
|
2404
2528
|
audit: config.audit
|
|
2405
2529
|
};
|
|
@@ -2453,6 +2577,11 @@ async function createServer(options) {
|
|
|
2453
2577
|
const body = await c.req.json();
|
|
2454
2578
|
logger.debug(`[Server] POST /execute/stream runtime=${body.request.runtime}`);
|
|
2455
2579
|
logger.debug(`[Server] Code source: ${body.request.codeUrl ? `url=${body.request.codeUrl}` : `inline (${body.request.code?.length ?? 0} chars)`}`);
|
|
2580
|
+
const {
|
|
2581
|
+
poolStrategy: _ignoredPoolStrategy,
|
|
2582
|
+
poolSize: _ignoredPoolSize,
|
|
2583
|
+
...requestOptions
|
|
2584
|
+
} = body.options ?? {};
|
|
2456
2585
|
const engineOptions = {
|
|
2457
2586
|
network: config.defaults.network,
|
|
2458
2587
|
memoryLimit: config.defaults.memoryLimit,
|
|
@@ -2460,8 +2589,11 @@ async function createServer(options) {
|
|
|
2460
2589
|
timeoutMs: config.defaults.timeoutMs,
|
|
2461
2590
|
sandboxSize: config.defaults.sandboxSize,
|
|
2462
2591
|
tmpSize: config.defaults.tmpSize,
|
|
2592
|
+
poolStrategy: config.poolStrategy,
|
|
2593
|
+
poolSize: config.poolSize,
|
|
2594
|
+
dependencies: config.dependencies,
|
|
2463
2595
|
remoteCode: config.remoteCode,
|
|
2464
|
-
...
|
|
2596
|
+
...requestOptions,
|
|
2465
2597
|
mode: "ephemeral"
|
|
2466
2598
|
};
|
|
2467
2599
|
const engine = new DockerIsol82(engineOptions, config.maxConcurrent);
|
|
@@ -2585,4 +2717,4 @@ export {
|
|
|
2585
2717
|
BunAdapter
|
|
2586
2718
|
};
|
|
2587
2719
|
|
|
2588
|
-
//# debugId=
|
|
2720
|
+
//# debugId=E6910E46B07952A064756E2164756E21
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* {@link Isol8Engine} interface, so it can be used interchangeably with
|
|
6
6
|
* {@link DockerIsol8} for local-vs-remote execution.
|
|
7
7
|
*/
|
|
8
|
-
import type { ExecutionRequest, ExecutionResult, Isol8Engine, Isol8Options, StreamEvent } from "../types";
|
|
8
|
+
import type { ExecutionRequest, ExecutionResult, Isol8Engine, Isol8Options, StartOptions, StreamEvent } from "../types";
|
|
9
9
|
/** Connection options for the remote isol8 client. */
|
|
10
10
|
export interface RemoteIsol8Options {
|
|
11
11
|
/** Base URL of the isol8 server (e.g. `"http://localhost:3000"`). */
|
|
@@ -41,7 +41,7 @@ export declare class RemoteIsol8 implements Isol8Engine {
|
|
|
41
41
|
*/
|
|
42
42
|
constructor(options: RemoteIsol8Options, isol8Options?: Isol8Options);
|
|
43
43
|
/** Verify the remote server is reachable by hitting the `/health` endpoint. */
|
|
44
|
-
start(): Promise<void>;
|
|
44
|
+
start(_options?: StartOptions): Promise<void>;
|
|
45
45
|
/** Destroy the remote session (if persistent). No-op for ephemeral mode. */
|
|
46
46
|
stop(): Promise<void>;
|
|
47
47
|
/** Execute code on the remote server and return the result. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../src/client/remote.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,WAAW,EACZ,MAAM,UAAU,CAAC;AAElB,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,0GAA0G;IAC1G,SAAS,CAAC,EAAE,MAAM,CAAC;CACp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AO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAkB9D;;;OAGG;IACI,aAAa,CAAC,GAAG,EAAE,gBAAgB,GAAG,aAAa,CAAC,WAAW,CAAC;IA0DvE;;;OAGG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBpE,wEAAwE;IAClE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgB5C,0EAA0E;YAC5D,KAAK;CAUpB"}
|
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,QAAA,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,QAAA,MAAM,cAAc,EAAE,WAyDrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,CAepD;AAgDD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* output sanitization.
|
|
7
7
|
*/
|
|
8
8
|
import Docker from "dockerode";
|
|
9
|
-
import type { ExecutionRequest, ExecutionResult, Isol8Engine, Isol8Options, StreamEvent } from "../types";
|
|
9
|
+
import type { ExecutionRequest, ExecutionResult, Isol8Engine, Isol8Options, StartOptions, StreamEvent } from "../types";
|
|
10
10
|
/** Options for constructing a {@link DockerIsol8} instance. Extends {@link Isol8Options} with Docker-specific settings. */
|
|
11
11
|
export interface DockerIsol8Options extends Isol8Options {
|
|
12
12
|
/** Custom dockerode instance. Defaults to connecting to the local Docker socket. */
|
|
@@ -48,6 +48,7 @@ export declare class DockerIsol8 implements Isol8Engine {
|
|
|
48
48
|
private readonly logNetwork;
|
|
49
49
|
private readonly poolStrategy;
|
|
50
50
|
private readonly poolSize;
|
|
51
|
+
private readonly dependencies;
|
|
51
52
|
private readonly auditLogger?;
|
|
52
53
|
private readonly remoteCodePolicy;
|
|
53
54
|
private container;
|
|
@@ -61,10 +62,12 @@ export declare class DockerIsol8 implements Isol8Engine {
|
|
|
61
62
|
*/
|
|
62
63
|
constructor(options?: DockerIsol8Options, maxConcurrent?: number);
|
|
63
64
|
/**
|
|
64
|
-
* Initialize isol8.
|
|
65
|
-
*
|
|
65
|
+
* Initialize isol8.
|
|
66
|
+
*
|
|
67
|
+
* In ephemeral mode this can optionally pre-warm the container pool.
|
|
68
|
+
* In persistent mode the container is created lazily on first execute.
|
|
66
69
|
*/
|
|
67
|
-
start(): Promise<void>;
|
|
70
|
+
start(options?: StartOptions): Promise<void>;
|
|
68
71
|
/** Stop and remove the container (if one exists). Safe to call multiple times. */
|
|
69
72
|
stop(): Promise<void>;
|
|
70
73
|
/**
|
|
@@ -109,6 +112,7 @@ export declare class DockerIsol8 implements Isol8Engine {
|
|
|
109
112
|
*/
|
|
110
113
|
executeStream(req: ExecutionRequest): AsyncIterable<StreamEvent>;
|
|
111
114
|
private resolveImage;
|
|
115
|
+
private ensurePool;
|
|
112
116
|
private executeEphemeral;
|
|
113
117
|
private executePersistent;
|
|
114
118
|
private retrieveFiles;
|
|
@@ -126,7 +130,7 @@ export declare class DockerIsol8 implements Isol8Engine {
|
|
|
126
130
|
* Remove all isol8 containers (both running and stopped).
|
|
127
131
|
*
|
|
128
132
|
* This static utility method finds and removes all containers created by isol8,
|
|
129
|
-
* identified by images starting with `isol8
|
|
133
|
+
* identified by images starting with `isol8:`.
|
|
130
134
|
*
|
|
131
135
|
* @param docker - Optional Docker instance. If not provided, creates a new one.
|
|
132
136
|
* @returns Promise resolving to an object with counts of removed and failed containers.
|
|
@@ -148,5 +152,16 @@ export declare class DockerIsol8 implements Isol8Engine {
|
|
|
148
152
|
failed: number;
|
|
149
153
|
errors: string[];
|
|
150
154
|
}>;
|
|
155
|
+
/**
|
|
156
|
+
* Remove all isol8 Docker images.
|
|
157
|
+
*
|
|
158
|
+
* Images are identified by repo tags starting with `isol8:`
|
|
159
|
+
* (for example `isol8:python` or `isol8:python-custom-<hash>`).
|
|
160
|
+
*/
|
|
161
|
+
static cleanupImages(docker?: Docker): Promise<{
|
|
162
|
+
removed: number;
|
|
163
|
+
failed: number;
|
|
164
|
+
errors: string[];
|
|
165
|
+
}>;
|
|
151
166
|
}
|
|
152
167
|
//# sourceMappingURL=docker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/engine/docker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/engine/docker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAEf,WAAW,EAEX,YAAY,EAKZ,YAAY,EACZ,WAAW,EACZ,MAAM,UAAU,CAAC;AA2UlB,2HAA2H;AAC3H,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,O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,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CA2BlE"}
|
|
@@ -7,6 +7,20 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type Docker from "dockerode";
|
|
9
9
|
import type { Isol8Config } from "../types";
|
|
10
|
+
/**
|
|
11
|
+
* Normalize package lists for stable tags/cache hits.
|
|
12
|
+
* - trims whitespace
|
|
13
|
+
* - removes empty entries
|
|
14
|
+
* - de-duplicates
|
|
15
|
+
* - sorts lexicographically
|
|
16
|
+
*/
|
|
17
|
+
export declare function normalizePackages(packages: string[]): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Returns deterministic custom image tag for a runtime + package set.
|
|
20
|
+
* Uses a short deps hash suffix to avoid tag collisions across different
|
|
21
|
+
* dependency sets for the same runtime.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getCustomImageTag(runtime: string, packages: string[]): string;
|
|
10
24
|
/** Progress update emitted during image builds. */
|
|
11
25
|
interface BuildProgress {
|
|
12
26
|
/** Runtime being built (e.g. `"python"`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-builder.d.ts","sourceRoot":"","sources":["../../../src/engine/image-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"image-builder.d.ts","sourceRoot":"","sources":["../../../src/engine/image-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAmE5C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAE9D;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"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAS5B,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAaD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa;;;;GAmRxD"}
|