@claxedo/sandbox-manager 0.9.0 → 0.10.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 +233 -26
- package/dist/checkpoint-manager.d.ts +29 -4
- package/dist/checkpoint-manager.mjs +133 -24
- package/dist/command.d.ts +9 -2
- package/dist/command.mjs +8 -8
- package/dist/contract.d.ts +687 -0
- package/dist/driver-billing.d.ts +29 -0
- package/dist/driver-catalog.d.ts +42 -7
- package/dist/driver-catalog.mjs +115 -161
- package/dist/drivers/boat-client.d.ts +95 -0
- package/dist/drivers/boat-named-snapshots.d.ts +31 -0
- package/dist/drivers/boat-template.d.ts +49 -0
- package/dist/drivers/boat-template.mjs +1196 -0
- package/dist/drivers/boat.d.ts +64 -0
- package/dist/drivers/boat.mjs +990 -0
- package/dist/drivers/cloudflare.d.ts +3 -3
- package/dist/drivers/cloudflare.mjs +208 -147
- package/dist/drivers/docker.d.ts +4 -3
- package/dist/drivers/docker.mjs +154 -126
- package/dist/drivers/local-brokering.d.ts +14 -0
- package/dist/drivers/local-brokering.mjs +1029 -0
- package/dist/drivers/modal.d.ts +2 -2
- package/dist/drivers/modal.mjs +121 -111
- package/dist/drivers/transient-error.d.ts +2 -0
- package/dist/drivers/vercel.d.ts +3 -2
- package/dist/drivers/vercel.mjs +151 -115
- package/dist/egress-policy.d.ts +134 -0
- package/dist/egress-warnings.d.ts +22 -0
- package/dist/garbage-collect.d.ts +14 -0
- package/dist/hosted-network-policy.d.ts +9 -2
- package/dist/hosted-network-policy.mjs +218 -1
- package/dist/image-name.d.ts +12 -2
- package/dist/image-name.mjs +14 -5
- package/dist/image.d.ts +1 -20
- package/dist/image.mjs +11 -88
- package/dist/index.d.ts +8 -578
- package/dist/index.mjs +1379 -320
- package/dist/lease-failure.d.ts +173 -0
- package/dist/lease-lifecycle.d.ts +65 -0
- package/dist/lease-retry-wait.d.ts +8 -0
- package/dist/lease-start.d.ts +21 -0
- package/dist/lease-types.d.ts +4 -3
- package/dist/manager.d.ts +2 -0
- package/dist/runtime-env.d.ts +4 -2
- package/dist/runtime-env.mjs +37 -2
- package/dist/runtime-snapshot.d.ts +49 -0
- package/dist/runtime-version.d.ts +9 -0
- package/dist/runtime-version.mjs +2 -0
- package/dist/service-url-exposure.d.ts +0 -1
- package/dist/service-url-exposure.mjs +0 -9
- package/dist/start-fresh.d.ts +17 -0
- package/dist/start-telemetry.d.ts +37 -0
- package/dist/stores/memory.d.ts +1 -1
- package/dist/stores/memory.mjs +63 -52
- package/package.json +26 -42
- package/dist/daytona-allow-list.d.ts +0 -16
- package/dist/daytona-allow-list.mjs +0 -11
- package/dist/drivers/box.d.ts +0 -52
- package/dist/drivers/box.mjs +0 -574
- package/dist/drivers/daytona.d.ts +0 -163
- package/dist/drivers/daytona.mjs +0 -683
- package/dist/drivers/exe.d.ts +0 -26
- package/dist/drivers/exe.mjs +0 -492
- package/dist/drivers/fetch-bridge.d.ts +0 -10
- package/dist/drivers/fetch-bridge.mjs +0 -126
- package/dist/lease-policy.d.ts +0 -52
- package/dist/lease-policy.mjs +0 -290
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type SandboxDriver, type SandboxDriverEnsureInput } from "../contract";
|
|
2
|
+
import { type WorkspaceRuntimeControlEnv } from "../runtime-env";
|
|
3
|
+
import { type BoatFetch } from "./boat-client";
|
|
4
|
+
export type { BoatFetch };
|
|
5
|
+
/**
|
|
6
|
+
* A named snapshot of a machine that already holds `image`'s trees, stub and
|
|
7
|
+
* env, and Boat's record of the files the runtime opens first; another Boat
|
|
8
|
+
* account creates a sandbox from it with the share code.
|
|
9
|
+
*/
|
|
10
|
+
export type BoatRuntimeTemplate = {
|
|
11
|
+
image: string;
|
|
12
|
+
shareCode: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function formatBoatRuntimeTemplate(template: BoatRuntimeTemplate): string;
|
|
15
|
+
export declare function parseBoatRuntimeTemplate(setting: string): BoatRuntimeTemplate;
|
|
16
|
+
export type BoatSandboxDriverOptions = {
|
|
17
|
+
apiKey: string;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
image: string;
|
|
20
|
+
runtimePort?: number;
|
|
21
|
+
runtimeCommand?: string;
|
|
22
|
+
workspaceDir?: string;
|
|
23
|
+
nativeHarness?: string;
|
|
24
|
+
controlEnv?: WorkspaceRuntimeControlEnv;
|
|
25
|
+
/** Container name used for the runtime container inside the sandbox. */
|
|
26
|
+
containerName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional `docker login` before the pull, for a private runtime registry.
|
|
29
|
+
* Omit for public images.
|
|
30
|
+
*/
|
|
31
|
+
registryAuth?: {
|
|
32
|
+
server: string;
|
|
33
|
+
username: string;
|
|
34
|
+
password: string;
|
|
35
|
+
};
|
|
36
|
+
/** Creates a sandbox that boots the template's image from the template instead of pulling and seeding the image. */
|
|
37
|
+
runtimeTemplate?: BoatRuntimeTemplate;
|
|
38
|
+
env?: (input: SandboxDriverEnsureInput, host: {
|
|
39
|
+
id: string;
|
|
40
|
+
}) => Record<string, string> | Promise<Record<string, string>>;
|
|
41
|
+
provisionTimeoutMs?: number;
|
|
42
|
+
/** The first and the longest wait between two reads of a sandbox's state, where Boat offers no wait. */
|
|
43
|
+
statePollMs?: {
|
|
44
|
+
firstMs: number;
|
|
45
|
+
maxMs: number;
|
|
46
|
+
};
|
|
47
|
+
healthTimeoutMs?: number;
|
|
48
|
+
healthIntervalMs?: number;
|
|
49
|
+
operationTimeoutMs?: number;
|
|
50
|
+
fetchImpl?: BoatFetch;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Turns a booted machine into one any workspace can start from: it keeps what
|
|
54
|
+
* every machine of the image shares (the image's trees, stub archive and env,
|
|
55
|
+
* and Boat's ~/.ascii/playbook.json) and removes what this machine's boot made
|
|
56
|
+
* (the runtime container and Boat's record and image archive of it, the
|
|
57
|
+
* workspace, the runtime's state, the boot's env). Nothing the runtime wrote
|
|
58
|
+
* into the image's trees was found there (Boat, 2026-10-16: the trees held only
|
|
59
|
+
* the image's own entries after two boots); what else differs on the machine
|
|
60
|
+
* is Boat's own, and a machine created from the template gets its own
|
|
61
|
+
* machine-id, SSH host keys, hostname and no hosted port.
|
|
62
|
+
*/
|
|
63
|
+
export declare function boatTemplateResetCommand(): string;
|
|
64
|
+
export declare function createBoatSandboxDriver(options: BoatSandboxDriverOptions): SandboxDriver;
|