@multiplayer-app/sandbox 7.0.0 → 7.0.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 +21 -11
- package/dist/cli.js +511 -111
- package/dist/cli.js.map +4 -4
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/console-relays.d.ts +4 -4
- package/dist/console-relays.d.ts.map +1 -1
- package/dist/executor/index.d.ts +12 -1
- package/dist/executor/index.d.ts.map +1 -1
- package/dist/executor/lambda-microvm-executor.d.ts +13 -3
- package/dist/executor/lambda-microvm-executor.d.ts.map +1 -1
- package/dist/executor/types.d.ts +16 -2
- package/dist/executor/types.d.ts.map +1 -1
- package/dist/images.d.ts.map +1 -1
- package/dist/index.js +416 -59
- package/dist/index.js.map +4 -4
- package/dist/services/serial-relay.d.ts +11 -0
- package/dist/services/serial-relay.d.ts.map +1 -1
- package/dist/socket-client.d.ts.map +1 -1
- package/dist/vendor/builder-types/events.d.ts +10 -0
- package/dist/vendor/builder-types/events.d.ts.map +1 -1
- package/dist/vendor/builder-types/index.d.ts +1 -0
- package/dist/vendor/builder-types/index.d.ts.map +1 -1
- package/dist/vendor/builder-types/release.d.ts +5 -5
- package/dist/vendor/builder-types/release.d.ts.map +1 -1
- package/dist/vendor/builder-types/vm-cost.d.ts +88 -0
- package/dist/vendor/builder-types/vm-cost.d.ts.map +1 -0
- package/dist/vendor/builder-types/vm.d.ts +5 -0
- package/dist/vendor/builder-types/vm.d.ts.map +1 -1
- package/dist/worker-identity.d.ts +11 -0
- package/dist/worker-identity.d.ts.map +1 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -21,10 +21,12 @@ for the public worker endpoint. Create one with the control plane's
|
|
|
21
21
|
defaults to the machine hostname; set it explicitly when multiple workers could
|
|
22
22
|
report the same hostname.
|
|
23
23
|
`SANDBOX_URL` is optional and defaults to
|
|
24
|
-
`https://api.sandbox.filingramp.com/v0`; set it explicitly for local or
|
|
25
|
-
self-hosted control planes. Its pathname
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
`https://api.sandbox.filingramp.com/v0/gapi`; set it explicitly for local or
|
|
25
|
+
self-hosted control planes. Its pathname is the sole source of the worker
|
|
26
|
+
socket path — `/workers/ws` is appended to it verbatim, so the full base
|
|
27
|
+
(including the `/gapi` segment) must be included: `/v0/gapi` selects the
|
|
28
|
+
public authenticated worker endpoint, while `/internal/v0/gapi` selects the
|
|
29
|
+
private tokenless endpoint.
|
|
28
30
|
|
|
29
31
|
The sandbox worker exposes probes on `SANDBOX_HEALTH_PORT` (default `3000`)
|
|
30
32
|
under `API_PREFIX` (default `/v0/api`): `GET /v0/api/healthz` is its
|
|
@@ -42,23 +44,24 @@ WORKER_TOKEN=<token> sandbox start
|
|
|
42
44
|
|
|
43
45
|
For a trusted deployment on the same Kubernetes cluster or private Docker
|
|
44
46
|
Compose network, leave `WORKER_TOKEN` unset and set
|
|
45
|
-
`SANDBOX_URL=http://builder-
|
|
46
|
-
`/internal/v0/
|
|
47
|
-
exposed by the public ingress. A client URL such as
|
|
48
|
-
`https://api.sandbox.filingramp.com/v0` resolves to
|
|
49
|
-
requires a valid, user-created API key as
|
|
47
|
+
`SANDBOX_URL=http://builder-gateway-service:3000/internal/v0/gapi`. This
|
|
48
|
+
resolves to `/internal/v0/gapi/workers/ws`, which does not require a token and
|
|
49
|
+
must not be exposed by the public ingress. A client URL such as
|
|
50
|
+
`https://api.sandbox.filingramp.com/v0/gapi` resolves to
|
|
51
|
+
`/v0/gapi/workers/ws`, which requires a valid, user-created API key as
|
|
52
|
+
`WORKER_TOKEN`.
|
|
50
53
|
|
|
51
54
|
The published runtime bundles the repository's internal `builder-types` and
|
|
52
55
|
`logger` libraries, so installing the CLI does not require those workspace
|
|
53
56
|
packages to be published separately.
|
|
54
57
|
|
|
55
58
|
The worker ID defaults to the hostname and the control-plane URL defaults to
|
|
56
|
-
`https://api.sandbox.filingramp.com/v0`. Both can be overridden with environment
|
|
59
|
+
`https://api.sandbox.filingramp.com/v0/gapi`. Both can be overridden with environment
|
|
57
60
|
variables or flags:
|
|
58
61
|
|
|
59
62
|
```sh
|
|
60
63
|
sandbox start --token <token> --worker-id worker-eu-01 \
|
|
61
|
-
--sandbox-url http://localhost:3011/v0 --max-vms 5
|
|
64
|
+
--sandbox-url http://localhost:3011/v0/gapi --max-vms 5
|
|
62
65
|
```
|
|
63
66
|
|
|
64
67
|
## Run as a Docker container
|
|
@@ -123,6 +126,13 @@ Firecracker requires a compatible Linux host, `/dev/kvm`, and the Firecracker
|
|
|
123
126
|
binary. Cloud runners use the normal AWS environment variables or workload
|
|
124
127
|
credentials.
|
|
125
128
|
|
|
129
|
+
Lambda MicroVMs automatically receive the AWS-managed `SHELL_INGRESS` connector so
|
|
130
|
+
`/vm-console` can open a terminal. The worker role therefore needs
|
|
131
|
+
`lambda:CreateMicrovmShellAuthToken` and permission to pass that connector. Any
|
|
132
|
+
`MICROVM_INGRESS_CONNECTORS` configured for application traffic are preserved. Release
|
|
133
|
+
artifacts and custom per-VM environment variables travel in the unique run-hook payload;
|
|
134
|
+
the guest exposes the presigned release URL to the launched app as `APP_URL`.
|
|
135
|
+
|
|
126
136
|
For the `qemu` engine, the host needs QEMU (`qemu-system-*`) installed; for
|
|
127
137
|
`firecracker`, a Linux host with `/dev/kvm`; for `docker`, just a running Docker
|
|
128
138
|
daemon (Docker Desktop/OrbStack) plus local images from
|