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/README.md
CHANGED
|
@@ -145,7 +145,7 @@ isol8 run --github user/repo/main/script.py --hash <sha256> --runtime python
|
|
|
145
145
|
|
|
146
146
|
### `isol8 cleanup`
|
|
147
147
|
|
|
148
|
-
Remove orphaned isol8 containers.
|
|
148
|
+
Remove orphaned isol8 containers, and optionally isol8 images.
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
151
|
# Interactive (prompts for confirmation)
|
|
@@ -153,6 +153,9 @@ isol8 cleanup
|
|
|
153
153
|
|
|
154
154
|
# Force (skip confirmation)
|
|
155
155
|
isol8 cleanup --force
|
|
156
|
+
|
|
157
|
+
# Also remove isol8 images
|
|
158
|
+
isol8 cleanup --images --force
|
|
156
159
|
```
|
|
157
160
|
|
|
158
161
|
### `isol8 serve`
|
|
@@ -166,11 +169,13 @@ isol8 serve --update # Force re-download the server binary
|
|
|
166
169
|
|
|
167
170
|
| Flag | Description | Default |
|
|
168
171
|
|------|-------------|---------|
|
|
169
|
-
| `-p, --port <port>` | Port to listen on | `3000` |
|
|
172
|
+
| `-p, --port <port>` | Port to listen on | `--port` > `$ISOL8_PORT` > `$PORT` > `3000` |
|
|
170
173
|
| `-k, --key <key>` | API key for Bearer token auth | `$ISOL8_API_KEY` |
|
|
171
174
|
| `--update` | Force re-download the server binary | `false` |
|
|
172
175
|
| `--debug` | Enable debug logging for server operations | `false` |
|
|
173
176
|
|
|
177
|
+
If the selected port is already in use, `isol8 serve` now prompts to enter another port or auto-select an available one. In non-interactive environments, it auto-falls back to a free port.
|
|
178
|
+
|
|
174
179
|
### `isol8 config`
|
|
175
180
|
|
|
176
181
|
Display the resolved configuration (merged defaults + config file). Shows the source file, defaults, network rules, cleanup policy, and dependencies.
|
|
@@ -202,6 +207,10 @@ console.log(result.exitCode); // 0
|
|
|
202
207
|
console.log(result.durationMs); // ~120-140ms (warm pool)
|
|
203
208
|
|
|
204
209
|
await isol8.stop();
|
|
210
|
+
|
|
211
|
+
// Optional manual cleanup helpers
|
|
212
|
+
await DockerIsol8.cleanup(); // remove isol8 containers
|
|
213
|
+
await DockerIsol8.cleanupImages(); // remove isol8 images
|
|
205
214
|
```
|
|
206
215
|
|
|
207
216
|
### Pool Strategy
|
|
@@ -231,6 +240,8 @@ const secureEngine = new DockerIsol8({
|
|
|
231
240
|
**Fast mode details:**
|
|
232
241
|
- Maintains two pools: `clean` (ready to use) and `dirty` (need cleanup)
|
|
233
242
|
- `acquire()` returns instantly from clean pool if available
|
|
243
|
+
- Every clean-pool acquire triggers async replenishment to restore warm capacity
|
|
244
|
+
- Simple no-artifact executions use inline runtime commands, skipping code-file injection overhead
|
|
234
245
|
- If clean pool is empty but dirty has containers, tries immediate cleanup
|
|
235
246
|
- Background cleanup runs every 5 seconds to process dirty containers
|
|
236
247
|
- Best performance with minimal memory overhead
|