@multiplayer-app/sandbox 1.0.0-wip-yjs-state-changes.0 → 3.0.0-wip-yjs-state-changes.0

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.
Files changed (69) hide show
  1. package/README.md +30 -3
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +3011 -59
  4. package/dist/cli.js.map +7 -1
  5. package/dist/executor/detect.d.ts +1 -1
  6. package/dist/executor/docker-executor.d.ts +1 -1
  7. package/dist/executor/docker-sandbox-executor.d.ts +1 -1
  8. package/dist/executor/fargate-executor.d.ts +1 -1
  9. package/dist/executor/firecracker-executor.d.ts +1 -1
  10. package/dist/executor/index.d.ts +1 -1
  11. package/dist/executor/lambda-microvm-executor.d.ts +1 -1
  12. package/dist/executor/mock-executor.d.ts +1 -1
  13. package/dist/executor/qemu-executor.d.ts +1 -1
  14. package/dist/executor/remote-executor.d.ts +1 -1
  15. package/dist/executor/types.d.ts +1 -1
  16. package/dist/images.d.ts +1 -1
  17. package/dist/index.js +3005 -29
  18. package/dist/index.js.map +7 -1
  19. package/dist/vendor/builder-types/access.d.ts +25 -0
  20. package/dist/vendor/builder-types/access.d.ts.map +1 -0
  21. package/dist/vendor/builder-types/events.d.ts +80 -0
  22. package/dist/vendor/builder-types/events.d.ts.map +1 -0
  23. package/dist/vendor/builder-types/index.d.ts +11 -0
  24. package/dist/vendor/builder-types/index.d.ts.map +1 -0
  25. package/dist/vendor/builder-types/release.d.ts +49 -0
  26. package/dist/vendor/builder-types/release.d.ts.map +1 -0
  27. package/dist/vendor/builder-types/vm.d.ts +101 -0
  28. package/dist/vendor/builder-types/vm.d.ts.map +1 -0
  29. package/dist/vendor/builder-types/worker.d.ts +25 -0
  30. package/dist/vendor/builder-types/worker.d.ts.map +1 -0
  31. package/package.json +20 -8
  32. package/dist/config.js +0 -144
  33. package/dist/config.js.map +0 -1
  34. package/dist/console-relays.js +0 -46
  35. package/dist/console-relays.js.map +0 -1
  36. package/dist/executor/detect.js +0 -184
  37. package/dist/executor/detect.js.map +0 -1
  38. package/dist/executor/docker-executor.js +0 -331
  39. package/dist/executor/docker-executor.js.map +0 -1
  40. package/dist/executor/docker-sandbox-executor.js +0 -343
  41. package/dist/executor/docker-sandbox-executor.js.map +0 -1
  42. package/dist/executor/fargate-executor.js +0 -293
  43. package/dist/executor/fargate-executor.js.map +0 -1
  44. package/dist/executor/firecracker-executor.js +0 -352
  45. package/dist/executor/firecracker-executor.js.map +0 -1
  46. package/dist/executor/index.js +0 -166
  47. package/dist/executor/index.js.map +0 -1
  48. package/dist/executor/lambda-microvm-executor.js +0 -211
  49. package/dist/executor/lambda-microvm-executor.js.map +0 -1
  50. package/dist/executor/mock-executor.js +0 -198
  51. package/dist/executor/mock-executor.js.map +0 -1
  52. package/dist/executor/mock-executor.test.js +0 -81
  53. package/dist/executor/mock-executor.test.js.map +0 -1
  54. package/dist/executor/qemu-executor.js +0 -383
  55. package/dist/executor/qemu-executor.js.map +0 -1
  56. package/dist/executor/reattach-utils.js +0 -11
  57. package/dist/executor/reattach-utils.js.map +0 -1
  58. package/dist/executor/remote-executor.js +0 -125
  59. package/dist/executor/remote-executor.js.map +0 -1
  60. package/dist/executor/types.js +0 -3
  61. package/dist/executor/types.js.map +0 -1
  62. package/dist/images.js +0 -163
  63. package/dist/images.js.map +0 -1
  64. package/dist/services/serial-relay.js +0 -74
  65. package/dist/services/serial-relay.js.map +0 -1
  66. package/dist/services/vnc-relay.js +0 -101
  67. package/dist/services/vnc-relay.js.map +0 -1
  68. package/dist/socket-client.js +0 -119
  69. package/dist/socket-client.js.map +0 -1
package/README.md CHANGED
@@ -8,12 +8,39 @@ WebSocket, so the worker needs **no inbound ports**.
8
8
  Supported engines (auto-detected): `qemu`, `firecracker`, `docker`, `docker-sandbox`,
9
9
  `lambda-microvm`, `fargate`, `remote`, and `mock`.
10
10
 
11
- `vm-gateway` imports this package directly and runs the worker in-process (see
12
- `services/vm-gateway/src/index.ts`) there is no standalone worker service or CLI
13
- `start` command. Engine configuration is entirely env-driven and auto-detected —
11
+ `vm-gateway` can import this package directly and run the worker in-process (see
12
+ `services/vm-gateway/src/index.ts`). The published package also installs a standalone
13
+ `sandbox` executable. Engine configuration is env-driven and auto-detected —
14
14
  `WORKER_ID`, `WORKER_TOKEN`, `SANDBOX_URL`, `MAX_VMS`, `WORKER_REGION`, plus per-engine
15
15
  vars like `QEMU_IMAGES_DIR`, `DOCKER_STACK_IMAGES`, `MICROVM_IMAGE_ARN`,
16
16
  `FARGATE_CLUSTER`, `AGENT_URL` — see `src/config.ts` for the full list.
17
+ `WORKER_TOKEN` is required. `WORKER_ID` is optional and defaults to the machine
18
+ hostname; set it explicitly when multiple workers could report the same hostname.
19
+ `SANDBOX_URL` is optional and defaults to
20
+ `https://api.sandbox.filingramp.com`; set it explicitly for local or self-hosted
21
+ control planes.
22
+
23
+ ## Start a worker
24
+
25
+ Install the package globally and start the worker with its authentication token:
26
+
27
+ ```sh
28
+ npm install --global @multiplayer-app/sandbox
29
+ WORKER_TOKEN=<token> sandbox start
30
+ ```
31
+
32
+ The published runtime bundles the repository's internal `builder-types` and
33
+ `logger` libraries, so installing the CLI does not require those workspace
34
+ packages to be published separately.
35
+
36
+ The worker ID defaults to the hostname and the control-plane URL defaults to
37
+ `https://api.sandbox.filingramp.com`. Both can be overridden with environment
38
+ variables or flags:
39
+
40
+ ```sh
41
+ sandbox start --token <token> --worker-id worker-eu-01 \
42
+ --sandbox-url http://localhost:3011 --max-vms 5
43
+ ```
17
44
 
18
45
  For the `qemu` engine, the host needs QEMU (`qemu-system-*`) installed; for
19
46
  `firecracker`, a Linux host with `/dev/kvm`; for `docker`, just a running Docker
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAKA,OAAO,eAAe,CAAA"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAIA,OAAO,eAAe,CAAA"}