isol8 0.5.1 → 0.6.1
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 +12 -1
- package/dist/cli.js +286 -27
- package/dist/index.js +504 -429
- package/dist/src/server/index.d.ts +7 -3
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/server/standalone.d.ts +20 -0
- package/dist/src/server/standalone.d.ts.map +1 -0
- package/package.json +7 -3
- package/dist/cli.js.map +0 -307
- package/dist/cpufeatures-tjjrgpt7.node +0 -0
- package/dist/index.js.map +0 -26
- package/docker/Dockerfile +0 -39
- package/docker/proxy.mjs +0 -127
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* and health checks. All endpoints (except `/health`) require Bearer token auth.
|
|
7
7
|
*/
|
|
8
8
|
import { Hono } from "hono";
|
|
9
|
-
import "../runtime";
|
|
10
9
|
/** Configuration for the isol8 HTTP server. */
|
|
11
10
|
export interface ServerOptions {
|
|
12
11
|
/** Port to listen on. */
|
|
@@ -17,6 +16,11 @@ export interface ServerOptions {
|
|
|
17
16
|
/**
|
|
18
17
|
* Creates and configures the isol8 HTTP server.
|
|
19
18
|
*
|
|
19
|
+
* Lazy-imports DockerIsol8 and runtime adapters to avoid eagerly loading
|
|
20
|
+
* dockerode and its transitive dependencies (ssh2/protobufjs/long) at
|
|
21
|
+
* module initialization time. This is critical for the compiled binary
|
|
22
|
+
* which crashes on Linux if these modules are loaded during bytecode init.
|
|
23
|
+
*
|
|
20
24
|
* @param options - Server configuration (port, API key).
|
|
21
25
|
* @returns Object containing the Hono `app`, `fetch` handler, and resolved `port`.
|
|
22
26
|
*
|
|
@@ -26,9 +30,9 @@ export interface ServerOptions {
|
|
|
26
30
|
* Bun.serve({ fetch: server.app.fetch, port: server.port });
|
|
27
31
|
* ```
|
|
28
32
|
*/
|
|
29
|
-
export declare function createServer(options: ServerOptions): {
|
|
33
|
+
export declare function createServer(options: ServerOptions): Promise<{
|
|
30
34
|
app: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
31
35
|
fetch: (request: Request, Env?: unknown, executionCtx?: import("hono").ExecutionContext) => Response | Promise<Response>;
|
|
32
36
|
port: number;
|
|
33
|
-
}
|
|
37
|
+
}>;
|
|
34
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQ5B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQ5B,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;CAChB;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa;;;;GAqMxD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module server/standalone
|
|
3
|
+
*
|
|
4
|
+
* Standalone entry point for the isol8 server binary.
|
|
5
|
+
* Compiled with `bun build --compile` into a self-contained executable
|
|
6
|
+
* that runs anywhere without requiring Bun or Node.js to be installed.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: This module must NOT eagerly import the server code or anything
|
|
9
|
+
* that transitively imports `dockerode`. The import chain
|
|
10
|
+
* dockerode → ssh2 → protobufjs → long crashes on Linux when compiled with
|
|
11
|
+
* `bun build --compile --minify`. Server code is lazy-imported ONLY after
|
|
12
|
+
* arg parsing (so --version and --help always work).
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* isol8-server --port 3000 --key my-secret-key
|
|
16
|
+
* isol8-server --version
|
|
17
|
+
* isol8-server --help
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=standalone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../../src/server/standalone.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isol8",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Secure code execution engine for AI agents",
|
|
5
5
|
"author": "Illusion47586",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "bun run src/cli.ts",
|
|
40
40
|
"build": "bun run scripts/build.ts",
|
|
41
|
+
"build:server": "bun run scripts/build-server.ts",
|
|
42
|
+
"build:server:all": "bun run scripts/build-server.ts --all",
|
|
41
43
|
"test": "bun test",
|
|
42
44
|
"lint:check": "ultracite check",
|
|
43
45
|
"lint:fix": "ultracite fix",
|
|
@@ -75,9 +77,11 @@
|
|
|
75
77
|
"ultracite": "^7.2.0"
|
|
76
78
|
},
|
|
77
79
|
"files": [
|
|
78
|
-
"dist",
|
|
80
|
+
"dist/cli.js",
|
|
81
|
+
"dist/index.js",
|
|
82
|
+
"dist/src",
|
|
83
|
+
"dist/docker",
|
|
79
84
|
"schema",
|
|
80
|
-
"docker",
|
|
81
85
|
"README.md",
|
|
82
86
|
"LICENSE"
|
|
83
87
|
],
|