From cd91f2a2fe790829f44b9016d443998471b27877 Mon Sep 17 00:00:00 2001 From: Adaptive Liquidity Labs Date: Sat, 22 Aug 2026 05:08:04 +0000 Subject: [PATCH 1/2] feat(c3): replace Daytona with Runloop Devboxes as production-v1 C3A compute substrate: RunloopProvider behind ComputerProvider. Official @runloop/api-client@1.28.0 RunloopSDK. argv exec via JSON/base64 Python execvp. Workspace jail /home/user/flok. Suspend preserves disk, not RAM. Computer Use/VNC deferred to C3B. Paid live tests are workflow_dispatch only and were not run. --- .github/workflows/daytona-c3.yml | 45 - .github/workflows/runloop-c3.yml | 43 + .github/workflows/verify.yml | 2 +- AGENTS.md | 4 +- AUTHORITY.md | 6 +- FLOKS_PC_BUILD_OPERATING_INSTRUCTIONS.md | 4 +- PHASES.md | 49 +- README.md | 28 +- docs/computers/ARCHITECTURE.md | 4 +- docs/computers/PROVIDER_CONTRACT.md | 27 +- package-lock.json | 2182 ++--------------- package.json | 4 +- src/lib/computers/flags.ts | 2 +- src/lib/computers/index.ts | 13 +- src/lib/computers/providers/daytona-client.ts | 108 - src/lib/computers/providers/daytona-sdk.ts | 431 ---- src/lib/computers/providers/docker-dev.ts | 2 +- src/lib/computers/providers/index.ts | 16 +- src/lib/computers/providers/provider.ts | 2 +- src/lib/computers/providers/runloop-client.ts | 114 + .../{daytona-memory.ts => runloop-memory.ts} | 157 +- src/lib/computers/providers/runloop-sdk.ts | 400 +++ .../providers/{daytona.ts => runloop.ts} | 216 +- src/lib/computers/schemas.ts | 2 +- src/lib/computers/types.ts | 2 +- tests/domain/fake-provider.test.ts | 2 +- tests/live/daytona.live.test.ts | 16 - tests/live/runloop.live.test.ts | 14 + tests/providers/daytona.isolation.test.ts | 191 -- tests/providers/daytona.test.ts | 225 -- tests/providers/runloop.isolation.test.ts | 219 ++ tests/providers/runloop.test.ts | 237 ++ tests/security/daytona-secrets.test.ts | 39 - tests/security/runloop-secrets.test.ts | 46 + 34 files changed, 1523 insertions(+), 3329 deletions(-) delete mode 100644 .github/workflows/daytona-c3.yml create mode 100644 .github/workflows/runloop-c3.yml delete mode 100644 src/lib/computers/providers/daytona-client.ts delete mode 100644 src/lib/computers/providers/daytona-sdk.ts create mode 100644 src/lib/computers/providers/runloop-client.ts rename src/lib/computers/providers/{daytona-memory.ts => runloop-memory.ts} (61%) create mode 100644 src/lib/computers/providers/runloop-sdk.ts rename src/lib/computers/providers/{daytona.ts => runloop.ts} (61%) delete mode 100644 tests/live/daytona.live.test.ts create mode 100644 tests/live/runloop.live.test.ts delete mode 100644 tests/providers/daytona.isolation.test.ts delete mode 100644 tests/providers/daytona.test.ts create mode 100644 tests/providers/runloop.isolation.test.ts create mode 100644 tests/providers/runloop.test.ts delete mode 100644 tests/security/daytona-secrets.test.ts create mode 100644 tests/security/runloop-secrets.test.ts diff --git a/.github/workflows/daytona-c3.yml b/.github/workflows/daytona-c3.yml deleted file mode 100644 index 07edb67..0000000 --- a/.github/workflows/daytona-c3.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Manual Daytona Linux VM live tests. -# Not on pull_request. Not on push. Burns paid VM time. -# DAYTONA_API_KEY stays in GitHub secrets; never in git, guest env, or logs. -# -# GitHub does not allow `secrets` in job-level `if:` expressions, so presence -# is checked in a step (`test -n`) and missing config FAILs instead of skipping. -name: daytona-c3 - -on: - workflow_dispatch: - -concurrency: - group: daytona-c3 - cancel-in-progress: false - -permissions: - contents: read - -jobs: - daytona-live: - name: Daytona VM live test - runs-on: ubuntu-24.04 - timeout-minutes: 20 - env: - DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }} - FLOK_DAYTONA_SNAPSHOT: ${{ vars.FLOK_DAYTONA_SNAPSHOT }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 - with: - node-version: "22.16" - cache: npm - - run: npm ci - - name: Verify Daytona configuration - run: | - test -n "$DAYTONA_API_KEY" - test -n "$FLOK_DAYTONA_SNAPSHOT" - echo "Daytona snapshot: $FLOK_DAYTONA_SNAPSHOT" - echo "DAYTONA_API_KEY length=${#DAYTONA_API_KEY}" - - name: Run Daytona live tests - env: - FLOK_LIVE_COMPUTER_TEST: "1" - run: npm run test:live:daytona diff --git a/.github/workflows/runloop-c3.yml b/.github/workflows/runloop-c3.yml new file mode 100644 index 0000000..128564d --- /dev/null +++ b/.github/workflows/runloop-c3.yml @@ -0,0 +1,43 @@ +# Manual Runloop Devbox live tests (C3A). +# Not on pull_request. Not on push. Burns trial credits. +# Do NOT use runloopai/deploy-agent — FLOKS tests Devboxes, not Runloop Agents. +# RUNLOOP_API_KEY stays in GitHub secrets; never in git, guest env, or logs. +name: runloop-c3 + +on: + workflow_dispatch: + +concurrency: + group: runloop-c3 + cancel-in-progress: false + +permissions: + contents: read + +jobs: + runloop-live: + name: Runloop Devbox live test + runs-on: ubuntu-24.04 + timeout-minutes: 20 + env: + RUNLOOP_API_KEY: ${{ secrets.RUNLOOP_API_KEY }} + FLOK_RUNLOOP_BLUEPRINT: ${{ vars.FLOK_RUNLOOP_BLUEPRINT }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 + with: + node-version: "22.16" + cache: npm + - run: npm ci + - name: Verify Runloop configuration + run: | + test -n "$RUNLOOP_API_KEY" + test -n "$FLOK_RUNLOOP_BLUEPRINT" + echo "Runloop blueprint: $FLOK_RUNLOOP_BLUEPRINT" + echo "RUNLOOP_API_KEY length=${#RUNLOOP_API_KEY}" + - name: Run Runloop live tests + env: + FLOK_LIVE_RUNLOOP_TEST: "1" + run: npm run test:live:runloop diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index ff1ee44..3c9f8ee 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,5 +1,5 @@ # Non-paid verification for Adaptive-Liquidity/floks-pc. -# `verify` does NOT run Daytona live tests (paid). +# `verify` does NOT run Runloop live tests (paid). # `docker-c2` runs live Docker isolation on a GitHub-hosted ubuntu-24.04 runner. name: verify diff --git a/AGENTS.md b/AGENTS.md index 257cca4..b3a991f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,7 +28,7 @@ Violations are stop-the-line. Revert immediately. Work only on the currently open phase listed in `PHASES.md`. - Phase 0 / Gate C0: docs + types + interface only (this scaffold). -- Do not implement FakeProvider body, DockerDev, Daytona, migrations, worker, or MCP server until the corresponding phase is open. +- Do not implement FakeProvider body, DockerDev, Runloop, migrations, worker, or MCP server until the corresponding phase is open. - Do not enable or import Nexus-IQ, AEON, Graphiti, or any memory plane until Gate G0 is explicitly marked PASSED. ## Hard locks (never relax) @@ -51,7 +51,7 @@ Nexus-IQ work begins only after the standalone Flok Computer has passed full end - Capability tokens are 256-bit, stored as digests only - Pair codes are one-use, short TTL, rate-limited - Never persist terminal output, screenshots, cookies, or page contents by default -- Never put provider API keys (Daytona etc.) into a Node VM or MCP response +- Never put provider API keys (Runloop etc.) into a Node VM or MCP response ## Verification (must stay green) diff --git a/AUTHORITY.md b/AUTHORITY.md index 9538672..9977f70 100644 --- a/AUTHORITY.md +++ b/AUTHORITY.md @@ -66,7 +66,7 @@ It provides: ┌───────────────────┼────────────────────┐ │ │ │ ▼ ▼ ▼ - Fake / DockerDev Daytona VM Kata / Firecracker + Fake / DockerDev Runloop Devbox Kata / Firecracker DEV PRODUCTION V1 OWN COMPUTE │ one VM per Node @@ -108,10 +108,10 @@ ComputerService ↓ ComputerProvider ← only interface that talks to compute ↓ -Fake | DockerDev | Daytona | Kata +Fake | DockerDev | Runloop | Kata ``` -No route or MCP tool may call Daytona (or any provider) directly. +No route or MCP tool may call Runloop (or any provider) directly. ## 6. Feature flags (defaults) diff --git a/FLOKS_PC_BUILD_OPERATING_INSTRUCTIONS.md b/FLOKS_PC_BUILD_OPERATING_INSTRUCTIONS.md index 4170a71..042f1ae 100644 --- a/FLOKS_PC_BUILD_OPERATING_INSTRUCTIONS.md +++ b/FLOKS_PC_BUILD_OPERATING_INSTRUCTIONS.md @@ -358,7 +358,7 @@ Conceptually: Phase-specific Docker/MCP/security checks may be separate jobs. -Paid provider tests such as Daytona live tests remain opt-in or scheduled. +Paid provider tests such as Runloop live tests remain opt-in or scheduled. --- @@ -385,7 +385,7 @@ security tests container scanning ``` -Do not require paid Daytona live tests on every PR. +Do not require paid Runloop live tests on every PR. --- diff --git a/PHASES.md b/PHASES.md index e1f8264..898ebff 100644 --- a/PHASES.md +++ b/PHASES.md @@ -39,7 +39,7 @@ Work only on the currently open phase. Nexus-IQ / AEON / Graphiti are **forbidde - Domain unit tests under `tests/domain/` (state-machine, service, fake-provider, pairing, path) ### Non-goals (do not invent) -- Real network, Docker, Daytona client, MCP server, worker process, S3, Kysely wiring +- Real network, Docker, paid provider clients, MCP server, worker process, S3, Kysely wiring ### Gate C1 - [x] state helpers + tests (legal succeed, illegal throw, deleted terminal) — files present @@ -90,30 +90,41 @@ Work only on the currently open phase. Nexus-IQ / AEON / Graphiti are **forbidde --- -## Phase 3 — Daytona production provider ← CURRENT - -**Goal:** Linux VM class, real lifecycle + exec + fs + observe + act + VNC + checkpoint. - -### Implement -- `providers/daytona.ts` — DaytonaProvider (`name: "daytona"`) -- Linux **VM** snapshot only (not the default container class) -- Official `@daytona/sdk` (`new Daytona({ apiKey })` → `create()` / `get()`) -- `DAYTONA_API_KEY` stays in the control plane; never in Node env, workspace, exec env, MCP, or audit -- argv[] exec (shell mode rejected); path jail at `/home/flok` -- observe / act via Computer Use; takeover via signed noVNC preview URL -- checkpoint via `createSnapshot`; restore from snapshot +## Phase 3 — Runloop production provider ← CURRENT + +**Goal:** Runloop Devboxes as production-v1 ComputerProvider. C3A is the compute substrate. C3B (interactive computer / browser / noVNC) is deferred until C3A is green. + +### Implement (C3A) +- `providers/runloop.ts` — RunloopProvider (`name: "runloop"`) +- Official `@runloop/api-client` **1.28.0** via `RunloopSDK` (not the legacy client, not `runloopai/deploy-agent`) +- Default blueprint `FLOK_RUNLOOP_BLUEPRINT=runloop/universal-ubuntu-24.04-x86_64-dnd`, arch `x86_64` +- Workspace jail `/home/user/flok` +- `RUNLOOP_API_KEY` stays in the control plane; never in Devbox env, workspace, exec env, MCP, or audit +- argv[] exec (shell mode rejected) via JSON/base64 → Python `os.execvp` wrapper +- `pause` → `suspend` + `awaitSuspended` (disk preserved, **not** RAM) +- `wake` → `resume` + `awaitRunning` +- `stop` / `destroy` → idempotent `shutdown` +- `checkpoint` → `snapshotDisk`; `restore` creates a new Devbox from the snapshot (forks allowed) - Non-live tests with an injected control-plane fake (zero network) -- Live tests opt-in: `FLOK_LIVE_COMPUTER_TEST=1` — missing key/snapshot **FAILS**, never silent skip +- Live tests opt-in: `FLOK_LIVE_RUNLOOP_TEST=1` — missing key/blueprint **FAILS**, never silent skip + +### C3B (do not implement until C3A is green) +Chromium + display + noVNC / Browserbase-or-Kernel. Authenticated Runloop tunnels later. Do not add those dependencies now. ### Non-goals (do not invent) - Provider factory, MCP gateway, pairing/capability wiring, worker, Kysely, Nexus/AEON/Graphiti +- Daytona (removed from the active C3 path) + +### Gate C3A +Two live Devboxes prove different provider IDs, isolated filesystems, distinct `boot_id`, independent lifecycle, suspend/resume disk persist, snapshot → forked Devbox with independent mutation, and shutdown of every paid Devbox. -### Gate C3 -Two live Linux VMs prove different provider IDs, filesystems, browser profiles, process namespaces, independent lifecycle. -Live tests are **opt-in only** (`FLOK_LIVE_COMPUTER_TEST=1`). Not part of required PR CI. +Live tests are **opt-in only** (`FLOK_LIVE_RUNLOOP_TEST=1`, manual `runloop-c3` workflow). Not part of required PR CI. **Status:** OPEN +### Gate C3B +Deferred. Interactive computer layer after C3A PASS. + --- ## Phase 4 — Node pairing and capability security @@ -223,7 +234,7 @@ All of the following must PASS: ## Phase 13 — Self-hosted high-performance compute (optional optimization) KataProvider + containerd + Kata 4 + Firecracker. -Provider parity tests against Fake / DockerDev / Daytona / Kata. +Provider parity tests against Fake / DockerDev / Runloop / Kata. --- @@ -260,7 +271,7 @@ memory_context memory_remember ``` -Infrastructure tools (daytona_*, firecracker_*, nexus_*, graphiti_*, postgres_*) remain internal. +Infrastructure tools (runloop_*, firecracker_*, nexus_*, graphiti_*, postgres_*) remain internal. --- diff --git a/README.md b/README.md index 7e9179f..0f5c759 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ All computer domain logic, providers, migrations, worker, and MCP surface live h | **C0** — scaffold, authority, domain types, ComputerProvider interface | **CLOSED / PASSED** | | **C1** — domain logic, FakeProvider, ComputerService, unit tests | **CLOSED / PASSED** | | **C2** — DockerDevProvider + isolation/persistence | **CLOSED / PASSED** | -| **C3** — Daytona Linux VM provider | CURRENT | +| **C3** — Runloop Devbox provider (C3A compute substrate) | CURRENT | | C4+ | Not started (Nexus-IQ remains hard-locked until G0) | ## Authority files (read in this order) @@ -33,7 +33,7 @@ All computer domain logic, providers, migrations, worker, and MCP surface live h - `FLOK_NEXUS_IQ_ENABLED=false` until Gate G0 passes - `FLOK_GRAPH_MEMORY_ENABLED=false` until after Nexus core -- Production isolation boundary is a **VM** (Daytona Linux VM → later Kata/Firecracker), never a shared-kernel container +- Production isolation boundary is a **VM** (Runloop Devboxes → later Kata/Firecracker), never a shared-kernel container ## Quick start @@ -52,23 +52,31 @@ FLOK_LIVE_DOCKER_TEST=1 npm run test:live:docker When the flag is set, Docker unavailability **fails** the suite; it never silent-skips. These live tests are **not** part of `npm run verify`. -Live Daytona tests (paid Linux VMs) skip unless `FLOK_LIVE_COMPUTER_TEST=1`. They require `DAYTONA_API_KEY` and `FLOK_DAYTONA_SNAPSHOT` (a **Linux VM** snapshot, not the default container class): +Live Runloop tests (paid Devboxes) skip unless `FLOK_LIVE_RUNLOOP_TEST=1`. They require `RUNLOOP_API_KEY` and `FLOK_RUNLOOP_BLUEPRINT` (default `runloop/universal-ubuntu-24.04-x86_64-dnd`): ```bash -FLOK_LIVE_COMPUTER_TEST=1 npm run test:live:daytona +FLOK_LIVE_RUNLOOP_TEST=1 npm run test:live:runloop ``` -When either live flag is set, missing credentials **fail** the suite. Live Daytona is **not** part of `npm run verify` or required PR CI. +When the flag is set, missing credentials **fail** the suite. Live Runloop is **not** part of `npm run verify` or required PR CI. -Store production credentials in GitHub Actions only (never in git, `.env` committed to the repo, or a Node VM): +Store production credentials in GitHub Actions only (never in git, `.env` committed to the repo, or a Node VM / Devbox): | Name | Where | Purpose | |------|--------|---------| -| `DAYTONA_API_KEY` | Repository **secret** | Daytona control-plane API key | -| `FLOK_DAYTONA_SNAPSHOT` | Repository **variable** (or secret) | Linux VM snapshot name/id | -| `DAYTONA_API_URL` | Repository **variable**, optional | Override API URL | +| `RUNLOOP_API_KEY` | Repository **secret** | Runloop control-plane API key | +| `FLOK_RUNLOOP_BLUEPRINT` | Repository **variable** | Blueprint name (e.g. `runloop/universal-ubuntu-24.04-x86_64-dnd`) | + +```text +PR +├─ verify ← every PR (free) +├─ docker-c2 ← every PR (GitHub-hosted Docker) +└─ runloop-live ← manual workflow_dispatch only + ├─ secrets.RUNLOOP_API_KEY + └─ vars.FLOK_RUNLOOP_BLUEPRINT +``` -The `daytona-c3` workflow reads those secrets on `workflow_dispatch` and on `main` pushes that touch the Daytona provider. It is skipped when the secret is empty. Do not make it a required status check. +Run it from Actions → **runloop-c3** → Run workflow. Do not use `runloopai/deploy-agent`. Do not make it a required status check. Do **not** enable Nexus, AEON, or Graphiti until Gate G0 is marked PASSED in `PHASES.md`. diff --git a/docs/computers/ARCHITECTURE.md b/docs/computers/ARCHITECTURE.md index acc4550..bbbf480 100644 --- a/docs/computers/ARCHITECTURE.md +++ b/docs/computers/ARCHITECTURE.md @@ -15,7 +15,7 @@ Flok Node Runtime (this package) ├─ ComputerProvider interface │ ├─ FakeProvider (unit / contract tests) │ ├─ DockerDevProvider (local integration only) - │ ├─ DaytonaProvider (production v1 — Linux VM) + │ ├─ RunloopProvider (production v1 — Devboxes) │ └─ KataProvider (self-host, Phase 13) ├─ MCP Gateway (eight tools) ├─ Checkpoints → S3-compatible object storage @@ -62,7 +62,7 @@ provider machine unavailable ## Security boundary -Production isolation is a **VM** (Daytona Linux VM class, later Kata + Firecracker). +Production isolation is a **VM** (Runloop Devboxes, later Kata + Firecracker). Ordinary containers share the host kernel and are not the production security architecture. Docker is useful for local testing and for optional tool containers *inside* a Node, not as the Node boundary itself. ## Nexus-IQ (Phase 14+) diff --git a/docs/computers/PROVIDER_CONTRACT.md b/docs/computers/PROVIDER_CONTRACT.md index f5fb466..ea9c32e 100644 --- a/docs/computers/PROVIDER_CONTRACT.md +++ b/docs/computers/PROVIDER_CONTRACT.md @@ -9,7 +9,7 @@ ComputerService ↓ ComputerProvider ← only interface that talks to compute ↓ -Fake | DockerDev | Daytona | Kata +Fake | DockerDev | Runloop | Kata ``` No route or MCP tool may import or call a concrete provider. @@ -18,7 +18,7 @@ No route or MCP tool may import or call a concrete provider. ```ts interface ComputerProvider { - readonly name: ComputerProviderName; // "fake" | "docker-dev" | "daytona" (C3) + readonly name: ComputerProviderName; // "fake" | "docker-dev" | "runloop" (C3) capabilities(): ProviderCapabilities; @@ -69,18 +69,21 @@ interface ProviderCapabilities { |--------------|-----------------------|--------------------|--------------|-----------|--------------------------------| | Fake | Unit / contract tests | In-memory | Simulated | Simulated | Injectable failures | | DockerDev | Local integration | Container + volume | No | Volume | Forbidden when NODE_ENV=production | -| Daytona | Production v1 | Linux VM | Yes | Yes | Official `@daytona/sdk` | +| Runloop | Production v1 | Devbox (C3A) | Disk only | Yes | Official `@runloop/api-client` 1.28.0 | | Kata | Self-host (Phase 13) | Kata + Firecracker | Yes | Yes | High density | -## Daytona notes (for Phase 3) - -- Package: `@daytona/sdk` -- Prefer **Linux VM** class (not basic container) for memory-preserving pause/resume, hot snapshots, and forks. -- Computer Use: `computer_use.start()`, mouse/keyboard/screenshot, accessibility tree (AT-SPI). -- VNC / noVNC for human takeover. -- Control plane for lifecycle; Toolbox API inside the sandbox for fs/process/computer_use. -- Constraint: VM sandboxes are currently created from existing VM snapshots → base-image / snapshot pipeline is required before live tests. -- Auth: `DAYTONA_API_KEY`. Never place the key inside a Node or log it. +## Runloop notes (Phase 3 / C3A) + +- Package: `@runloop/api-client@1.28.0` via **RunloopSDK** (not the legacy client). +- Default blueprint: `runloop/universal-ubuntu-24.04-x86_64-dnd`, architecture `x86_64`. +- Workspace jail: `/home/user/flok`. +- `pause` is `suspend` — **disk** is preserved, in-memory process state is not (`pauseMemory: false`). +- `checkpoint` is `snapshotDisk`; restore creates a **new** Devbox from that snapshot (forks supported). +- argv exec: serialize `{argv,cwd,env}` JSON → base64 → Python `os.execvp`. `mode: "shell"` rejected. +- Native Computer Use / VNC / accessibility are **C3B**, not claimed on C3A. +- Auth: `RUNLOOP_API_KEY`. Never place the key inside a Devbox, exec env, log, or MCP response. +- Do **not** use `runloopai/deploy-agent`. C3 tests Devboxes, not Runloop Agents. +- Live lifetime: `keep_alive_time_seconds=900`. Do not combine with `lifecycle.after_idle`. ## MCP notes (for Phase 5) diff --git a/package-lock.json b/package-lock.json index a6cc721..48f8902 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "flok-node-runtime", "version": "0.0.1", "dependencies": { - "@daytona/sdk": "0.205.1", + "@runloop/api-client": "1.28.0", "zod": "^4.4.0" }, "devDependencies": { @@ -20,396 +20,6 @@ "node": ">=22.12.0 <23" } }, - "node_modules/@aws-sdk/checksums": { - "version": "3.1000.29", - "resolved": "https://registry.npmjs.org/@aws-sdk/checksums/-/checksums-3.1000.29.tgz", - "integrity": "sha512-Dtu0gr4dnATZAPwEYbpCsG+MpLM7OAliy2gTepEFQwl1vZ6DL3QMH2FveMa3HLvPsOdhJsPRB3KtxVhph9T75A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/client-s3": { - "version": "3.1116.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.1116.0.tgz", - "integrity": "sha512-UKRl9qSVW0rZpvSOauQNpYAy8+ONBAVYnpfKVtCyOF+FZVT1tl6MunYuHvuarCrroD2/YJs+tHTALYNgAlec3Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/checksums": "^3.1000.29", - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/credential-provider-node": "^3.972.81", - "@aws-sdk/middleware-sdk-s3": "^3.972.75", - "@aws-sdk/signature-v4-multi-region": "^3.996.46", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/fetch-http-handler": "^5.7.2", - "@smithy/node-http-handler": "^4.11.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/core": { - "version": "3.977.9", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.977.9.tgz", - "integrity": "sha512-reqPFEQrZxDZpeGj4PFMepBeR5LGYHRqq/L0motTzgFkCRBA4rFdaVXDSLYyGHhxVz7sT2PDnPN9CluGSfgyJA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.974.5", - "@aws-sdk/xml-builder": "^3.972.40", - "@aws/lambda-invoke-store": "^0.3.0", - "@smithy/core": "^3.33.3", - "@smithy/signature-v4": "^5.6.12", - "@smithy/types": "^4.17.2", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.972.70", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.70.tgz", - "integrity": "sha512-H404B7dJl2mCrBqahDEYsanB0xhdDp6tXnXcTUnXmmpy2Q3J0Ho0bUajZ2jr/RdwzCyS59Gi8xXIFwPLGBl6Uw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.972.72", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.72.tgz", - "integrity": "sha512-X98zYOrVOeuosCX+6ktf29FC2N2GHPLia7qv6mzPzTc+RPAuHWCDS++Z6JK7eGYqb/v6uaW7bAXaOvDBfol+0w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/fetch-http-handler": "^5.7.2", - "@smithy/node-http-handler": "^4.11.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.973.15", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.973.15.tgz", - "integrity": "sha512-Rykg6s5ceBuynMOGWgoowO4N+27JfnqXAnVaSunZl0hOO1XodSrxGNz6sCEbnmS0lAfQZDKyb3fbr46gSuv6Sg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/credential-provider-env": "^3.972.70", - "@aws-sdk/credential-provider-http": "^3.972.72", - "@aws-sdk/credential-provider-login": "^3.972.77", - "@aws-sdk/credential-provider-process": "^3.972.70", - "@aws-sdk/credential-provider-sso": "^3.973.14", - "@aws-sdk/credential-provider-web-identity": "^3.972.76", - "@aws-sdk/nested-clients": "^3.997.44", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/credential-provider-imds": "^4.4.16", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-login": { - "version": "3.972.77", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.77.tgz", - "integrity": "sha512-Jb59xfEISoN5mmbnA+HYqdtrSX3CgCtJoof+V5D8/TgUI56W63GEEd5Y58WijU3Ou6+WEgaLD1feVzaRXV5IDQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/nested-clients": "^3.997.44", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.972.81", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.81.tgz", - "integrity": "sha512-Rml+WitoFvXmv6JZ18U/xGdGDGGvB/mOin0ya0lTnTrdC0Z1lrVxTYh7iNklZBcvcRMrs4DoEf6xy1KWyrLQQw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "^3.972.70", - "@aws-sdk/credential-provider-http": "^3.972.72", - "@aws-sdk/credential-provider-ini": "^3.973.15", - "@aws-sdk/credential-provider-process": "^3.972.70", - "@aws-sdk/credential-provider-sso": "^3.973.14", - "@aws-sdk/credential-provider-web-identity": "^3.972.76", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/credential-provider-imds": "^4.4.16", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.972.70", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.70.tgz", - "integrity": "sha512-2ry03fGRJr4sV3jI+ocjj5JqALnFD6ymM5KiNCDZMvq8bX2GSbE0vji4aM43TVCl2nXqqLRZaUxdq/KeWRAY4Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.973.14", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.973.14.tgz", - "integrity": "sha512-jkhg/8ocAAoc0RFyLMhCw+/zZh7gystQgd4F4hznNa8P4Cc501PQmxd+jGLiMHodPJ+7Zv/3znM62gZojyasmA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/nested-clients": "^3.997.44", - "@aws-sdk/token-providers": "3.1116.0", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.972.76", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.76.tgz", - "integrity": "sha512-d3AGyVu759PGr35mEB2s22xxlNEA5rpdxtSPJthfPFJvoQ8dt357iVPECqWfUxXp1toJAvKmbtcIYVGigaGsCA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/nested-clients": "^3.997.44", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage": { - "version": "3.1116.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.1116.0.tgz", - "integrity": "sha512-40z1NyzCbRX9bD6g3dJ6E4WDbYPDod6XHTIbNZPnGDYMYH2TPIj6LyRZ94fWPKGYnJpO0Q0Uhi2lSnn2E7PIdg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "buffer": "5.6.0", - "events": "3.3.0", - "stream-browserify": "3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-s3": "^3.1116.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.972.75", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.972.75.tgz", - "integrity": "sha512-wMIsNumRVKaNMKhvU/s9VrdEwE8S6gSzXp4RygFG5BEMnGkkXf8cjh8zf7cKJBpUDpqTWqwbz5isEgp9rH6Lng==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/signature-v4-multi-region": "^3.996.46", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients": { - "version": "3.997.44", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.44.tgz", - "integrity": "sha512-NhEgryjlBF9w38ZXqGymQV28IhkYa1mKhlbYnqIis57AYwWGVYfUPgg/qC2rLRqOUfblxx++irvju10kVTa8Vw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/signature-v4-multi-region": "^3.996.46", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/fetch-http-handler": "^5.7.2", - "@smithy/node-http-handler": "^4.11.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.996.46", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.46.tgz", - "integrity": "sha512-L+2xZTye/2T96f3lwCws0Zw6GG2JHZW9e8FpVgGBeeExSKyeoZ6CWRpBml/7DNiK/O26jrgPM9F+Ay8VkgzUWQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.974.5", - "@smithy/signature-v4": "^5.6.12", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/token-providers": { - "version": "3.1116.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1116.0.tgz", - "integrity": "sha512-ygIivKqh8aHzNkucOCXHyIBgBpLPfrSI0mCqXF+vLBsPTUKqj0VSqAY0GFPe7lQl4HntjOcQ+KSyS7oUV2C54Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.977.9", - "@aws-sdk/nested-clients": "^3.997.44", - "@aws-sdk/types": "^3.974.5", - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/types": { - "version": "3.974.5", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.974.5.tgz", - "integrity": "sha512-LkwLL2BLbC6wNNm4JaH9mbEqBMdOZCct6VAYqhdN4U1xrWM+fUJQEfbHwQgDypapOWTRtlk25akb5afM0P8CIQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/xml-builder": { - "version": "3.972.40", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.40.tgz", - "integrity": "sha512-wlFmCIGUlwF4zx/kncw+bmxTQh1HeSJq4mYV/V5cZUSJadDP3kXvGW8Rn21cimj/7y9ju+47oYWXi97vF7czaA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws/lambda-invoke-store": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.3.0.tgz", - "integrity": "sha512-sl4Bm6yiMNYrZKkqqDFWN0UfnWhlS8ivKxrYl+6t0gCLrqr8y3B2IqZZbFRkfaVVp7C/baApyh71P+LeE1A2sQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@daytona/analytics-api-client": { - "version": "0.205.1", - "resolved": "https://registry.npmjs.org/@daytona/analytics-api-client/-/analytics-api-client-0.205.1.tgz", - "integrity": "sha512-/kGNw6RGI7psf5OYqOPTfyN2tDW/206XBMXFQxmD3Ljuor/xk17WrONRah35OJy62lk+BzvCRtnkGBNEL4EjhQ==", - "license": "Apache-2.0", - "dependencies": { - "axios": "^1.6.1" - } - }, - "node_modules/@daytona/api-client": { - "version": "0.205.1", - "resolved": "https://registry.npmjs.org/@daytona/api-client/-/api-client-0.205.1.tgz", - "integrity": "sha512-Rmeny9+8jm+7mx/0B4FnfddqXSRuQmMTRxlbYaI8ekVidvXFA5YsNExBzzijPZW2piCDfUhlJDt6qKVsrhZe4Q==", - "license": "Apache-2.0", - "dependencies": { - "axios": "^1.6.1" - } - }, - "node_modules/@daytona/sdk": { - "version": "0.205.1", - "resolved": "https://registry.npmjs.org/@daytona/sdk/-/sdk-0.205.1.tgz", - "integrity": "sha512-gSqWNvNXmFJEdmsB+Z/XbWagnt6xkf6AWYtfAmemvY56Ji5oMYQ3Fk6VyeQpArvYCLQTgQy/MifiUXMLlChwYA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-s3": "^3.1106.0", - "@aws-sdk/lib-storage": "^3.1106.0", - "@daytona/analytics-api-client": "0.205.1", - "@daytona/api-client": "0.205.1", - "@daytona/toolbox-api-client": "0.205.1", - "@iarna/toml": "^2.2.5", - "@opentelemetry/api": "^1.9.1", - "@opentelemetry/exporter-trace-otlp-http": "^0.221.0", - "@opentelemetry/instrumentation-http": "^0.221.0", - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-node": "^0.221.0", - "@opentelemetry/sdk-trace-base": "^2.10.0", - "@opentelemetry/semantic-conventions": "^1.43.0", - "axios": "^1.19.0", - "busboy": "^1.0.0", - "dotenv": "^17.4.2", - "expand-tilde": "^2.0.2", - "fast-glob": "^3.3.0", - "form-data": "^4.0.4", - "isomorphic-ws": "^5.0.0", - "pathe": "^2.0.3", - "shell-quote": "^1.8.2", - "socket.io-client": "^4.8.1", - "tar": "^7.5.22", - "tslib": "2.8.1", - "ws": "^8.21.3" - } - }, - "node_modules/@daytona/toolbox-api-client": { - "version": "0.205.1", - "resolved": "https://registry.npmjs.org/@daytona/toolbox-api-client/-/toolbox-api-client-0.205.1.tgz", - "integrity": "sha512-FmiNbaAdeOiV12No+cRqs7bwklu+q4iA1QW1gA+x235imHaJ5Y8nYOjMV20tOhytGhNm0W23nz7WqyVao6A2pw==", - "license": "Apache-2.0", - "dependencies": { - "axios": "^1.6.1" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", @@ -852,43 +462,6 @@ "node": ">=18" } }, - "node_modules/@grpc/grpc-js": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz", - "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.1.tgz", - "integrity": "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg==", - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.5", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@iarna/toml": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", - "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", - "license": "ISC" - }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -901,1021 +474,172 @@ "node": ">=18.0.0" } }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "node_modules/@runloop/api-client": { + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@runloop/api-client/-/api-client-1.28.0.tgz", + "integrity": "sha512-ZQVSbSutqknTjgRpsfiiI5WXSkx5KgQvWkUpZQwGMsHR+dPCyM6QQegbAYqQaKuhIxEwxsLkJrSTm2fJkXmunw==", "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7", + "tar": "^7.5.2", + "uuidv7": "^1.0.2", + "zod": "^3.24.1" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@runloop/api-client/node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", "license": "MIT", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" + "undici-types": "~5.26.4" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@runloop/api-client/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, + "node_modules/@runloop/api-client/node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", - "engines": { - "node": ">= 8" + "funding": { + "url": "https://github.com/sponsors/colinhacks" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@types/node": { + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", "license": "MIT", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" + "undici-types": "~6.21.0" } }, - "node_modules/@opentelemetry/api": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz", - "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==", - "license": "Apache-2.0", - "engines": { - "node": ">=8.0.0" + "node_modules/@types/node-fetch": { + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.4" } }, - "node_modules/@opentelemetry/api-logs": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.221.0.tgz", - "integrity": "sha512-OlanaW1vv7ufTqQ3/fPLI4arGt5ZoM+P8abOMki6uEYnpRazepSWDwDnnw+la7kE26SHVC18//SMccrDvLKOXQ==", - "license": "Apache-2.0", + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", "dependencies": { - "@opentelemetry/api": "^1.3.0" + "event-target-shim": "^5.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=6.5" } }, - "node_modules/@opentelemetry/configuration": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/configuration/-/configuration-0.221.0.tgz", - "integrity": "sha512-uE9y56Zdi9Gt/RdxYnVOo3YmFZkKJJMA0gqtBe8wh8gdtF5Asqe+Oh/TWiDtFb1s+31jNY4CWgnfIB1KOITfFA==", - "license": "Apache-2.0", + "node_modules/agentkeepalive": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", + "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", + "license": "MIT", "dependencies": { - "@opentelemetry/core": "2.10.0", - "yaml": "^2.8.3" + "humanize-ms": "^1.2.1" }, "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.9.0" + "node": ">= 8.0.0" } }, - "node_modules/@opentelemetry/context-async-hooks": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.10.0.tgz", - "integrity": "sha512-bvyMcgLEkozzSzpEEEo1OMoeQ97bxj6Qs2uN3mPrSdDvObMI1myffD/BPqcLlzZO9//d1SqQA/WPw7Cz2AiqhA==", - "license": "Apache-2.0", - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, - "node_modules/@opentelemetry/core": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.10.0.tgz", - "integrity": "sha512-/wNZ8twnEQQA4HoHu22+vcsdru6pWPWxW+7w+FlxT6Id7PE/WIbZmVKkte+PF72e0F2dnImFeHD2syyE1Mw6MQ==", - "license": "Apache-2.0", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" }, "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "node": ">= 0.4" } }, - "node_modules/@opentelemetry/exporter-logs-otlp-grpc": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.221.0.tgz", - "integrity": "sha512-txG1G0IrYSsKKMeiWZfj/i5cQmWB+h+hf3HzPpF3RqZVwp+iQQEIsv8Vtmzy6RWVdHdJZfygmVrBI39YTBvWcw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/sdk-logs": "0.221.0" - }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "node": ">=18" } }, - "node_modules/@opentelemetry/exporter-logs-otlp-http": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.221.0.tgz", - "integrity": "sha512-nKXkr4Tomi6fjYVOf+ytcW3dZAVr4v4Bv5gsT6dr2gvpUPJpKgHB4XbMufMsPotRE3g0XH2GwVVCkN2w6SON+Q==", - "license": "Apache-2.0", + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/sdk-logs": "0.221.0" + "delayed-stream": "~1.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "node": ">= 0.8" } }, - "node_modules/@opentelemetry/exporter-logs-otlp-proto": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.221.0.tgz", - "integrity": "sha512-AH6EY+47gXFaWYgG3hfeOneGiE9xIZGtDBk+9g0sM8NZWzsQhhmqPbQQXJzS7pyCh5jRRr2nYNXVrkCmoojRvQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/sdk-logs": "0.221.0" - }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "node": ">=0.4.0" } }, - "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.221.0.tgz", - "integrity": "sha512-KOgCtO15FC6C1T/xOqBcr7EyUs7B+7yomGNb5Y97d3s38rPbCCk5sewkmE2b0/itOkQ/PptX8CLlD+kn2mEtTg==", - "license": "Apache-2.0", + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { - "@opentelemetry/exporter-metrics-otlp-http": "0.221.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "node": ">= 0.4" } }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.221.0.tgz", - "integrity": "sha512-sRfCKbOzgy8xZQV2as0RzIZlnCmCseCKZGLfRcrpo2CBngJDr+rPtX0zkG0+oUCV5kfQPUoW3W3C96Ag3Y/Clg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-metrics": "2.10.0" - }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "node": ">= 0.4" } }, - "node_modules/@opentelemetry/exporter-metrics-otlp-proto": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.221.0.tgz", - "integrity": "sha512-YMF4LveY2I3yhw61rn6nmC9FE8U24IZHPeKU1Duc5+sbwjMd8FwZAwba318ImdThCg/HuVQvhm2y6bfgNPnfYg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/exporter-metrics-otlp-http": "0.221.0", - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-prometheus": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.221.0.tgz", - "integrity": "sha512-kW79a20qWESIuAdDrxzg9WKM98twV/NBWBFRAH57ap/+ssZhiCo0hckzKT0zpuwR/gSHrFAQhJL0bYDrnEM34g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-metrics": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-grpc": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.221.0.tgz", - "integrity": "sha512-zXminlZedtq9LvOW64CnNkOqk15zV75k8JgtdTuWFge6+jk2m4GmAUm6L2eIiG1o2a2bZxXw2PDrszm+bps0IA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/sdk-trace": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.221.0.tgz", - "integrity": "sha512-AySXiKoC+meiWm6zdVj5T2LnPDZuatveBby1cMOeQteIWsYXAUxs8Sru13G2pVSPrUXz6vF+og7QVBX6GdC/oQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/sdk-trace": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.221.0.tgz", - "integrity": "sha512-Z9i2T7vgZbWe9rSLYxXVIbeW+XyzUq4rZanW3ZyVNwVDqCsh0EJKUgBWWQ0CZfeuUA+RQPzKgJQHMuWAUnKqXw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0", - "@opentelemetry/sdk-trace": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-zipkin": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.10.0.tgz", - "integrity": "sha512-7gsvgf0UDoJ4l9ObrwBmz5G/ZogiPk+lq+g5GpLp24YQF/vPM/BSsnOfcLnfinast5ASUgLo78uSC/ObjlnXgg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-trace": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - } - }, - "node_modules/@opentelemetry/instrumentation": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.221.0.tgz", - "integrity": "sha512-cCk80Z/iRDf/5gfsKMB4f74LqVA5yKETB/9ojPzVW/6/f70iu89nJvGxsFCxx4XfSohaOofkU19kiYm84AiAlw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.221.0", - "import-in-the-middle": "^3.0.0", - "require-in-the-middle": "^8.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.221.0.tgz", - "integrity": "sha512-oIP91CPIANuYr09tGFElPFKAh6JUar+awJf1kBRYlaeo9b0gDwZHEB2zBfFlvdNFHm0wAVutMZODVi5smKT30g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/instrumentation": "0.221.0", - "@opentelemetry/semantic-conventions": "^1.29.0", - "forwarded-parse": "2.1.2" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.221.0.tgz", - "integrity": "sha512-UFPIq80OH3Ns/oPFHRj14d4DTOxUo+MUFU8hUiCq5jTqFhdeJnfVSANHT+xp92409cA+oxzvlZCe6NM1wvCuBA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/otlp-transformer": "0.221.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-grpc-exporter-base": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.221.0.tgz", - "integrity": "sha512-rQDmNgyiGCTrescjnzH2ntVyUKVIq6I2UjuK8+stT/Xg0ZOT71FVJqwjFdspQl6Yol/Yqsut9bDo+ame8oTmDQ==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.14.3", - "@opentelemetry/core": "2.10.0", - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-transformer": "0.221.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.221.0.tgz", - "integrity": "sha512-lg6lkOU08Az23jVcn/0Els9HP+V8PnR4Km6p0KgpTggS0n/WuhnmY64rSh83Of9iR9nD+dpWr6adlcX8KzAwjg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.221.0", - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-logs": "0.221.0", - "@opentelemetry/sdk-metrics": "2.10.0", - "@opentelemetry/sdk-trace": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/propagator-b3": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.10.0.tgz", - "integrity": "sha512-GnA5B24H+1w8BO21J0q+IWNB0z1v+AGbcquTdIt/dufibhnhgxaA8YKvz0I3akRZhB1jHT+/tlzK+qlAjEDybQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.10.0.tgz", - "integrity": "sha512-yw/IX8DL470dSMZJoE82ScfYGp7JWZ/G8kFJo35ZILUVTB2jFPTOaioN+8s09pH0RHsWNhweVZb+ZnjJJpCChg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/resources": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.10.0.tgz", - "integrity": "sha512-q6MMm2zhggzsHVNbabYwut+a6nbuQQe3URUoxaojM/8K1IBfwwPzvxIjNi2/lI1TFe+fMHMW9MWhrtDLEXEnkA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-logs": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.221.0.tgz", - "integrity": "sha512-FaDcazjyMp7TZZZAsqbo4IkovP0UegoCu0EBkiNt+qCqvUf7FPAsfcrZ3+ZEkKgXZ/jHafop+JoGPDk3A0SmLg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.221.0", - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.4.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-metrics": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.10.0.tgz", - "integrity": "sha512-t6r1VSvXNtSDnPXU1FbZeetJb7yyovHmgu0wRSoftxtE0g2rSNhQZQUy69sRUCL+iioJpX8SN/S6wq6ZtvLySQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-node": { - "version": "0.221.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.221.0.tgz", - "integrity": "sha512-UbYuvtBrQQB5Prsh9KOKy4kxzexFxfMs5MkteHeWMoswsEB7kiNhyUVkAOFW/qsEzNHtrkgyghrD2ilZJa+5YA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.221.0", - "@opentelemetry/configuration": "0.221.0", - "@opentelemetry/context-async-hooks": "2.10.0", - "@opentelemetry/core": "2.10.0", - "@opentelemetry/exporter-logs-otlp-grpc": "0.221.0", - "@opentelemetry/exporter-logs-otlp-http": "0.221.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.221.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.221.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.221.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.221.0", - "@opentelemetry/exporter-prometheus": "0.221.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.221.0", - "@opentelemetry/exporter-trace-otlp-http": "0.221.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.221.0", - "@opentelemetry/exporter-zipkin": "2.10.0", - "@opentelemetry/instrumentation": "0.221.0", - "@opentelemetry/otlp-exporter-base": "0.221.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.221.0", - "@opentelemetry/propagator-b3": "2.10.0", - "@opentelemetry/propagator-jaeger": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-logs": "0.221.0", - "@opentelemetry/sdk-metrics": "2.10.0", - "@opentelemetry/sdk-trace": "2.10.0", - "@opentelemetry/sdk-trace-base": "2.10.0", - "@opentelemetry/sdk-trace-node": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace/-/sdk-trace-2.10.0.tgz", - "integrity": "sha512-MfQGq3GRmTh5fM/y+OjaO0vj6+luCB1XO2gfXCalKCfgKw0eHL++sm75DNweC6ohlp+aFvACqeE0fYayqdRaoQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.10.0.tgz", - "integrity": "sha512-GuYQQT7QD2EeO8lcZLRQzcbOyhqAzL+6WWTKTU9mSUBYBazkEDl+VrQcXQhbB08OWM9anD1aHleVadzulpOaUQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.10.0", - "@opentelemetry/resources": "2.10.0", - "@opentelemetry/sdk-trace": "2.10.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.10.0.tgz", - "integrity": "sha512-GZK/G6oZyBLGlH1pUgeDch7D91KoHd2uotUGIkWCPi9GI5T9X0p4L7nNAMDR1BQjkRYoDqo+ddfVx9t5Uhys+Q==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/context-async-hooks": "2.10.0", - "@opentelemetry/core": "2.10.0", - "@opentelemetry/sdk-trace-base": "2.10.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.43.0.tgz", - "integrity": "sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", - "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz", - "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz", - "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.2.tgz", - "integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==", - "license": "BSD-3-Clause" - }, - "node_modules/@smithy/core": { - "version": "3.33.3", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.33.3.tgz", - "integrity": "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.5.2.tgz", - "integrity": "sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.33.2", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/fetch-http-handler": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.7.2.tgz", - "integrity": "sha512-nZyWTmSpJEXl6VtWVMBJve/7x12DZu6sIX1z1a+ZMaHlQQRs9Zpu6NbTe/gmxYXVRpkjxyDYpZ5gx2IM6f/Wkw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.33.2", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/node-http-handler": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.11.3.tgz", - "integrity": "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/signature-v4": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.7.3.tgz", - "integrity": "sha512-7ImGm+FkHRLcBaRttIAMZ6bzJZWb2cJGoYjq46F2UjycujWzrL9GEN9h4w7eQyXJYnltrUhxbbieBAIRrdqpow==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.33.3", - "@smithy/types": "^4.17.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/types": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.17.2.tgz", - "integrity": "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", - "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.20.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", - "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/axios": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz", - "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.16.0", - "form-data": "^4.0.6", - "https-proxy-agent": "^5.0.1", - "proxy-from-env": "^2.1.0" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bowser": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz", - "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", - "license": "MIT" - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/cjs-module-lexer": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.1.tgz", - "integrity": "sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==", - "license": "MIT" - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/dotenv": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", - "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/engine.io-client": { - "version": "6.6.6", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.6.tgz", - "integrity": "sha512-iY6QdftLQ9pyiPoX082bpf/u1UewnOaJrtJIF9T0++QB34lZrj0uP+Q/bj8AlUsAxqhnkTV2BS8SBZSxOmoV5Q==", - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.4.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.21.0", - "xmlhttprequest-ssl": "~2.1.1" - } - }, - "node_modules/engine.io-parser": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", - "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", - "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", - "license": "MIT" - }, "node_modules/es-object-atoms": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", @@ -1985,91 +709,13 @@ "@esbuild/win32-x64": "0.28.2" } }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "license": "MIT", "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "node": ">=6" } }, "node_modules/form-data": { @@ -2088,12 +734,25 @@ "node": ">= 6" } }, - "node_modules/forwarded-parse": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz", - "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==", + "node_modules/form-data-encoder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", "license": "MIT" }, + "node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "license": "MIT", + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2118,15 +777,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -2164,18 +814,6 @@ "node": ">= 0.4" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -2227,131 +865,15 @@ "node": ">= 0.4" } }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "license": "MIT", - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/ieee754": { + "node_modules/humanize-ms": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/import-in-the-middle": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.3.3.tgz", - "integrity": "sha512-AiohS3H80sXO6owEltjGX+glb7qXaDhBoJb9XcQVH4UI207xu/bDLUcadVKp7Qe576reg9yr/PXZjV5qx8gfbA==", - "license": "Apache-2.0", - "dependencies": { - "cjs-module-lexer": "^2.2.0", - "es-module-lexer": "^2.2.0", - "module-details-from-path": "^1.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "license": "MIT", "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "license": "MIT", - "peerDependencies": { - "ws": "*" + "ms": "^2.0.0" } }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -2361,28 +883,6 @@ "node": ">= 0.4" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -2425,277 +925,50 @@ "node": ">= 18" } }, - "node_modules/module-details-from-path": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", - "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==", - "license": "MIT" - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, - "node_modules/parse-passwd": { + "node_modules/node-domexception": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "license": "MIT" - }, - "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/protobufjs": { - "version": "7.6.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.5.tgz", - "integrity": "sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.5", - "@protobufjs/eventemitter": "^1.1.1", - "@protobufjs/fetch": "^1.1.1", - "@protobufjs/float": "^1.0.2", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.1", - "@types/node": ">=13.7.0", - "long": "^5.3.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", - "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-in-the-middle": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz", - "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "module-details-from-path": "^1.0.3" - }, - "engines": { - "node": ">=9.3.0 || >=8.10.0 <9.0.0" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", "funding": [ { "type": "github", - "url": "https://github.com/sponsors/feross" + "url": "https://github.com/sponsors/jimmywarting" }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ { "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" + "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT" - }, - "node_modules/shell-quote": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz", - "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/socket.io-client": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.3.tgz", - "integrity": "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g==", "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.4.1", - "engine.io-client": "~6.6.1", - "socket.io-parser": "~4.2.4" - }, "engines": { - "node": ">=10.0.0" + "node": ">=10.5.0" } }, - "node_modules/socket.io-parser": { - "version": "4.2.7", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.7.tgz", - "integrity": "sha512-IH/iSeO9T6gz1KkFleGDWkG9N3dl4jXVYUtMhIqH10Md0ttMer8nUNWiP1DKuNrybD2xBrixLJdCC9J6ECoYkg==", + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "license": "MIT", "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.4.1" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "license": "MIT", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "node": "4.x || >=6.0.0" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" + "peerDependencies": { + "encoding": "^0.1.0" }, - "engines": { - "node": ">=8" + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/tar": { @@ -2714,23 +987,11 @@ "node": ">=18" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" }, "node_modules/tsx": { "version": "4.23.12", @@ -2771,65 +1032,38 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node_modules/uuidv7": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/uuidv7/-/uuidv7-1.2.1.tgz", + "integrity": "sha512-4kPkK3/XTQW9Hbm4CaqfICn+kY9LJtDVEOfgsRRra/+n2Ofg4NqzRFceAkxvQ/Ud/6BpHOPzj8cirqM7TzTN5Q==", + "license": "Apache-2.0", + "bin": { + "uuidv7": "cli.js" } }, - "node_modules/ws": { - "version": "8.21.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", - "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "node_modules/web-streams-polyfill": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", + "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", "license": "MIT", "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">= 14" } }, - "node_modules/xmlhttprequest-ssl": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz", - "integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==", - "engines": { - "node": ">=0.4.0" - } + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/yallist": { @@ -2841,48 +1075,6 @@ "node": ">=18" } }, - "node_modules/yaml": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", - "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } - }, - "node_modules/yargs": { - "version": "17.7.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", - "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/zod": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", diff --git a/package.json b/package.json index bd5e524..11d255e 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,12 @@ "test:providers": "node --experimental-vm-modules node_modules/tsx/dist/cli.mjs --test tests/providers/**/*.test.ts", "test:live": "node --experimental-vm-modules node_modules/tsx/dist/cli.mjs --test tests/live/**/*.test.ts", "test:live:docker": "node --experimental-vm-modules node_modules/tsx/dist/cli.mjs --test tests/providers/docker-dev.isolation.test.ts", - "test:live:daytona": "node --experimental-vm-modules node_modules/tsx/dist/cli.mjs --test tests/providers/daytona.isolation.test.ts tests/live/daytona.live.test.ts", + "test:live:runloop": "node --experimental-vm-modules node_modules/tsx/dist/cli.mjs --test tests/providers/runloop.isolation.test.ts tests/live/runloop.live.test.ts", "build": "tsc", "verify": "npm run typecheck && npm test && npm run build" }, "dependencies": { - "@daytona/sdk": "0.205.1", + "@runloop/api-client": "1.28.0", "zod": "^4.4.0" }, "devDependencies": { diff --git a/src/lib/computers/flags.ts b/src/lib/computers/flags.ts index 2cd49c7..4075155 100644 --- a/src/lib/computers/flags.ts +++ b/src/lib/computers/flags.ts @@ -12,7 +12,7 @@ export const FLAGS = { /** Master switch for the computer system */ FLOK_COMPUTERS_ENABLED: false, - /** Active provider. C3 implements fake + docker-dev + daytona. */ + /** Active provider. C3 implements fake + docker-dev + runloop. */ FLOK_COMPUTER_PROVIDER: "fake" as ComputerProviderName, /** Whether the MCP computer tools are registered */ diff --git a/src/lib/computers/index.ts b/src/lib/computers/index.ts index 3d35e41..9248837 100644 --- a/src/lib/computers/index.ts +++ b/src/lib/computers/index.ts @@ -77,12 +77,13 @@ export { DOCKER_DEV_WORKSPACE_ROOT, } from "./providers/docker-dev.js"; export { - DaytonaProvider, - DaytonaLinuxVmRequired, - DAYTONA_PROVIDER_NAME, - DAYTONA_WORKSPACE_ROOT, - MemoryDaytonaControlPlane, -} from "./providers/daytona.js"; + RunloopProvider, + RunloopBlueprintRequired, + ComputerUseNotAvailable, + RUNLOOP_PROVIDER_NAME, + RUNLOOP_WORKSPACE_ROOT, + MemoryRunloopControlPlane, +} from "./providers/runloop.js"; export { FLAGS, assertNexusDisabled } from "./flags.js"; export { diff --git a/src/lib/computers/providers/daytona-client.ts b/src/lib/computers/providers/daytona-client.ts deleted file mode 100644 index 43d95de..0000000 --- a/src/lib/computers/providers/daytona-client.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Control-plane adapter for Daytona. - * DaytonaProvider talks only to this interface so unit tests inject an in-memory - * fake and never construct the official SDK / never touch the network. - * - * DAYTONA_API_KEY must never appear in create envVars, exec env, or guest files. - */ - -import type { - ActionBatch, - ActionResult, - Observation, - ObserveRequest, - TakeoverGrant, -} from "../types.js"; - -export const DAYTONA_WORKSPACE_ROOT = "/home/flok"; - -/** Env keys that must never be copied into a Node VM. */ -export const CONTROL_PLANE_SECRET_ENV_KEYS = [ - "DAYTONA_API_KEY", - "DAYTONA_JWT_TOKEN", - "DAYTONA_ORGANIZATION_ID", -] as const; - -export interface DaytonaCreateParams { - birdId: string; - flockId: string; - /** Linux VM snapshot name/id. Required for the real SDK. */ - snapshot: string; - labels: Record; - /** Guest environment. Must not contain control-plane secrets. */ - envVars: Record; - cpu?: number; - memoryGb?: number; - diskGb?: number; -} - -export interface DaytonaExecResult { - exitCode: number; - stdout: string; - stderr: string; - timedOut: boolean; -} - -export interface DaytonaFsOk { - ok: true; - data?: T; -} - -export interface DaytonaFsErr { - ok: false; - errorCode: string; -} - -export type DaytonaFsResult = DaytonaFsOk | DaytonaFsErr; - -export interface DaytonaSandboxSession { - readonly id: string; - readonly birdId: string; - readonly flockId: string; - /** Unique per-VM identity used to prove distinct process namespaces. */ - readonly bootId: string; - /** Unique per-VM browser-profile marker. */ - readonly browserProfileId: string; - - state(): Promise<"started" | "stopped" | "paused" | "archived" | "destroyed" | "error">; - start(): Promise; - stop(): Promise; - pause(): Promise; - delete(): Promise; - - exec(req: { - argv: string[]; - cwd: string; - env?: Record; - timeoutMs: number; - }): Promise; - - fsStat(path: string): Promise>; - fsList(path: string): Promise>; - fsRead(path: string): Promise>; - fsWrite(path: string, body: Buffer): Promise; - fsMkdir(path: string): Promise; - fsDelete(path: string): Promise; - fsMove(from: string, to: string): Promise; - fsCopy(from: string, to: string): Promise; - - observe(request: ObserveRequest): Promise; - act(request: ActionBatch): Promise; - takeover(): Promise; - checkpoint(name: string): Promise; -} - -export interface DaytonaControlPlane { - create(params: DaytonaCreateParams): Promise; - get(id: string): Promise; - restore(snapshotRef: string, params: DaytonaCreateParams): Promise; -} - -export function assertNoControlPlaneSecrets(env: Record | undefined): void { - if (!env) return; - for (const key of CONTROL_PLANE_SECRET_ENV_KEYS) { - if (Object.prototype.hasOwnProperty.call(env, key)) { - throw new Error(`refusing to place control-plane secret ${key} inside a Node VM`); - } - } -} diff --git a/src/lib/computers/providers/daytona-sdk.ts b/src/lib/computers/providers/daytona-sdk.ts deleted file mode 100644 index e341e46..0000000 --- a/src/lib/computers/providers/daytona-sdk.ts +++ /dev/null @@ -1,431 +0,0 @@ -/** - * Official @daytona/sdk adapter. - * Loaded only by DaytonaProvider.fromEnv() / live tests — never by unit tests. - * - * Equivalent of: - * config = DaytonaConfig(api_key=...) - * daytona = Daytona(config) - * sandbox = daytona.create() - */ - -import { Daytona } from "@daytona/sdk"; -import { PathEscape, ProviderUnavailable } from "../errors.js"; -import { assertInsideRoot } from "../path.js"; -import type { - ActionBatch, - ActionResult, - Observation, - ObserveRequest, - TakeoverGrant, -} from "../types.js"; -import { - assertNoControlPlaneSecrets, - DAYTONA_WORKSPACE_ROOT, - type DaytonaControlPlane, - type DaytonaCreateParams, - type DaytonaExecResult, - type DaytonaFsResult, - type DaytonaSandboxSession, -} from "./daytona-client.js"; - -interface SdkSandbox { - id: string; - state?: string; - process: { - executeCommand: ( - command: string, - cwd?: string, - env?: Record, - timeout?: number, - ) => Promise<{ exitCode: number; result: string }>; - }; - fs: { - createFolder: (path: string, mode: string) => Promise; - deleteFile: (path: string, recursive?: boolean) => Promise; - downloadFile: (remotePath: string, timeout?: number) => Promise; - getFileDetails: (path: string) => Promise<{ name: string; isDir: boolean; size: number }>; - listFiles: (path: string) => Promise>; - moveFiles: (source: string, destination: string) => Promise; - uploadFile: (file: Buffer, remotePath: string, timeout?: number) => Promise; - }; - computerUse: { - start: () => Promise; - screenshot: { - takeFullScreen: (showCursor?: boolean) => Promise<{ - width?: number; - height?: number; - screenshot?: string; - cursor_screenshot?: string; - }>; - }; - mouse: { - click: (x: number, y: number, button?: string) => Promise; - move: (x: number, y: number) => Promise; - scroll: (x: number, y: number, direction: string, amount: number) => Promise; - }; - keyboard: { - type: (text: string) => Promise; - press: (key: string, modifiers?: string[]) => Promise; - }; - accessibility?: { - getTree?: (opts?: unknown) => Promise; - }; - }; - start: (timeout?: number) => Promise; - stop: (timeout?: number) => Promise; - pause: (timeout?: number) => Promise; - delete: (timeout?: number, wait?: boolean) => Promise; - createSnapshot: (name: string, timeout?: number) => Promise; - getSignedPreviewUrl: ( - port: number, - expiresInSeconds?: number, - ) => Promise<{ url: string; token?: string }>; - getUserHomeDir: () => Promise; - refreshData: () => Promise; -} - -export async function createSdkDaytonaPlane(opts: { - apiKey: string; - snapshot: string; - apiUrl?: string; -}): Promise { - const config: { apiKey: string; apiUrl?: string } = { apiKey: opts.apiKey }; - const apiUrl = opts.apiUrl ?? process.env.DAYTONA_API_URL; - if (apiUrl) config.apiUrl = apiUrl; - const daytona = new Daytona(config); - return new SdkDaytonaControlPlane(daytona, opts.snapshot); -} - -class SdkDaytonaControlPlane implements DaytonaControlPlane { - constructor( - private readonly daytona: Daytona, - private readonly defaultSnapshot: string, - ) {} - - async create(params: DaytonaCreateParams): Promise { - assertNoControlPlaneSecrets(params.envVars); - const snapshot = params.snapshot || this.defaultSnapshot; - if (!snapshot) { - throw new ProviderUnavailable("daytona", "Linux VM snapshot required"); - } - const createArgs: { - snapshot: string; - language: string; - labels: Record; - envVars: Record; - autoStopInterval: number; - public: boolean; - resources?: { cpu?: number; memory?: number; disk?: number }; - } = { - snapshot, - language: "typescript", - labels: params.labels, - envVars: params.envVars, - autoStopInterval: 0, - public: false, - }; - if (params.cpu !== undefined || params.memoryGb !== undefined || params.diskGb !== undefined) { - const resources: { cpu?: number; memory?: number; disk?: number } = {}; - if (params.cpu !== undefined) resources.cpu = params.cpu; - if (params.memoryGb !== undefined) resources.memory = params.memoryGb; - if (params.diskGb !== undefined) resources.disk = params.diskGb; - createArgs.resources = resources; - } - const sandbox = (await this.daytona.create( - createArgs, - { timeout: 180 }, - )) as unknown as SdkSandbox; - const session = new SdkDaytonaSandbox(sandbox, params.birdId, params.flockId); - await session.ensureWorkspace(); - return session; - } - - async get(id: string): Promise { - const sandbox = (await this.daytona.get(id)) as unknown as SdkSandbox; - return new SdkDaytonaSandbox(sandbox, "unknown", "unknown"); - } - - async restore( - snapshotRef: string, - params: DaytonaCreateParams, - ): Promise { - return this.create({ ...params, snapshot: snapshotRef }); - } -} - -class SdkDaytonaSandbox implements DaytonaSandboxSession { - readonly id: string; - readonly birdId: string; - readonly flockId: string; - readonly bootId: string; - readonly browserProfileId: string; - private desktopReady = false; - - constructor( - private readonly sandbox: SdkSandbox, - birdId: string, - flockId: string, - ) { - this.id = sandbox.id; - this.birdId = birdId; - this.flockId = flockId; - this.bootId = sandbox.id; - this.browserProfileId = `daytona-${sandbox.id}`; - } - - async ensureWorkspace(): Promise { - await this.sandbox.fs.createFolder(DAYTONA_WORKSPACE_ROOT, "755").catch(() => undefined); - } - - async state() { - await this.sandbox.refreshData().catch(() => undefined); - const raw = (this.sandbox.state ?? "started").toLowerCase(); - if (raw.includes("pause")) return "paused" as const; - if (raw.includes("stop") || raw.includes("archiv")) { - return raw.includes("archiv") ? ("archived" as const) : ("stopped" as const); - } - if (raw.includes("destroy") || raw.includes("delet")) return "destroyed" as const; - if (raw.includes("error") || raw.includes("fail")) return "error" as const; - return "started" as const; - } - - async start(): Promise { - await this.sandbox.start(120); - } - - async stop(): Promise { - await this.sandbox.stop(120); - } - - async pause(): Promise { - await this.sandbox.pause(120); - } - - async delete(): Promise { - await this.sandbox.delete(120, true); - } - - async exec(req: { - argv: string[]; - cwd: string; - env?: Record; - timeoutMs: number; - }): Promise { - assertNoControlPlaneSecrets(req.env); - const timeoutSec = Math.max(1, Math.ceil(req.timeoutMs / 1000)); - const env: Record = { - ...(req.env ?? {}), - FLOK_EXEC_ARGV: JSON.stringify(req.argv), - }; - assertNoControlPlaneSecrets(env); - // argv never interpolated into the shell string. - const wrapper = - 'python3 -c \'import json,os; a=json.loads(os.environ["FLOK_EXEC_ARGV"]); os.execvp(a[0], a)\''; - try { - const res = await this.sandbox.process.executeCommand( - wrapper, - req.cwd, - env, - timeoutSec, - ); - return { - exitCode: res.exitCode, - stdout: res.result ?? "", - stderr: "", - timedOut: res.exitCode === 124, - }; - } catch (e) { - const msg = e instanceof Error ? e.message : String(e); - if (/timeout/i.test(msg)) { - return { exitCode: 124, stdout: "", stderr: msg, timedOut: true }; - } - throw e; - } - } - - async fsStat( - path: string, - ): Promise> { - try { - const info = await this.sandbox.fs.getFileDetails(path); - return { - ok: true, - data: { path, isDir: Boolean(info.isDir), size: Number(info.size) || 0 }, - }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsList(path: string): Promise> { - try { - const files = await this.sandbox.fs.listFiles(path); - return { ok: true, data: files.map((f) => f.name) }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsRead(path: string): Promise> { - try { - const buf = await this.sandbox.fs.downloadFile(path); - return { ok: true, data: buf }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsWrite(path: string, body: Buffer): Promise { - try { - await this.sandbox.fs.uploadFile(body, path); - return { ok: true }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsMkdir(path: string): Promise { - try { - await this.sandbox.fs.createFolder(path, "755"); - return { ok: true }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsDelete(path: string): Promise { - try { - await this.sandbox.fs.deleteFile(path, true); - return { ok: true }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsMove(from: string, to: string): Promise { - try { - await this.sandbox.fs.moveFiles(from, to); - return { ok: true }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async fsCopy(from: string, to: string): Promise { - try { - const buf = await this.sandbox.fs.downloadFile(from); - await this.sandbox.fs.uploadFile(buf, to); - return { ok: true }; - } catch (e) { - return { ok: false, errorCode: classifyFs(e) }; - } - } - - async observe(request: ObserveRequest): Promise { - await this.ensureDesktop(); - const shot = request.includeScreenshot - ? await this.sandbox.computerUse.screenshot.takeFullScreen() - : undefined; - const obs: Observation = { - screenWidth: shot?.width ?? 0, - screenHeight: shot?.height ?? 0, - }; - if (shot?.screenshot) obs.screenshotBase64 = shot.screenshot; - if (request.includeAccessibility && this.sandbox.computerUse.accessibility?.getTree) { - obs.accessibilitySummary = await this.sandbox.computerUse.accessibility.getTree({ - scope: "focused", - maxDepth: 2, - }); - } - return obs; - } - - async act(request: ActionBatch): Promise { - await this.ensureDesktop(); - const results: ActionResult["results"] = []; - for (const action of request.actions) { - try { - switch (action.type) { - case "click_coordinates": - await this.sandbox.computerUse.mouse.click(action.x ?? 0, action.y ?? 0); - break; - case "type": - if (action.text) await this.sandbox.computerUse.keyboard.type(action.text); - break; - case "key": - if (action.key) await this.sandbox.computerUse.keyboard.press(action.key); - break; - case "scroll": - await this.sandbox.computerUse.mouse.scroll( - action.x ?? 0, - action.y ?? 0, - "down", - 3, - ); - break; - default: - results.push({ - action, - success: false, - error: `unsupported action ${action.type}`, - }); - continue; - } - results.push({ action, success: true }); - } catch (e) { - results.push({ - action, - success: false, - error: e instanceof Error ? e.message : "act failed", - }); - } - } - return { ok: results.every((r) => r.success), results }; - } - - async takeover(): Promise { - await this.ensureDesktop(); - const preview = await this.sandbox.getSignedPreviewUrl(6080, 60); - return { - url: preview.url, - expiresAt: new Date(Date.now() + 60_000), - singleUse: true, - }; - } - - async checkpoint(name: string): Promise { - await this.sandbox.createSnapshot(name, 180); - return name; - } - - private async ensureDesktop(): Promise { - if (this.desktopReady) return; - await this.sandbox.computerUse.start(); - this.desktopReady = true; - } -} - -function classifyFs(err: unknown): string { - const s = err instanceof Error ? err.message.toLowerCase() : String(err).toLowerCase(); - if (s.includes("permission") || s.includes("denied") || s.includes("read-only")) { - return "PERMISSION_DENIED"; - } - if (s.includes("not found") || s.includes("no such") || s.includes("404")) { - return "NOT_FOUND"; - } - return "IO_ERROR"; -} - -/** Resolve a guest path inside /home/flok; used by live jail tests. */ -export function jailDaytonaPath(userPath: string): string { - return assertInsideRoot(userPath, DAYTONA_WORKSPACE_ROOT); -} - -export function mustJail(userPath: string): string { - try { - return jailDaytonaPath(userPath); - } catch (e) { - if (e instanceof PathEscape) throw e; - throw new PathEscape(userPath); - } -} diff --git a/src/lib/computers/providers/docker-dev.ts b/src/lib/computers/providers/docker-dev.ts index 1b5a708..1c3103d 100644 --- a/src/lib/computers/providers/docker-dev.ts +++ b/src/lib/computers/providers/docker-dev.ts @@ -2,7 +2,7 @@ * DockerDevProvider — local-integration ComputerProvider. * One container + one named volume per Node. DEV ONLY. * Forbidden when NODE_ENV=production. Not a production isolation boundary - * (shared kernel). Production isolation is a VM (Daytona / later Kata). + * (shared kernel). Production isolation is a VM (Runloop Devboxes / later Kata). * * Zero extra deps: docker CLI via argv[] only. No shell interpolation. */ diff --git a/src/lib/computers/providers/index.ts b/src/lib/computers/providers/index.ts index 0adce0f..c5c310d 100644 --- a/src/lib/computers/providers/index.ts +++ b/src/lib/computers/providers/index.ts @@ -8,13 +8,15 @@ export { isUnpinnedImage, } from "./docker-dev.js"; export { - DaytonaProvider, - DaytonaLinuxVmRequired, - DAYTONA_PROVIDER_NAME, - DAYTONA_WORKSPACE_ROOT, - MemoryDaytonaControlPlane, -} from "./daytona.js"; + RunloopProvider, + RunloopBlueprintRequired, + ComputerUseNotAvailable, + RUNLOOP_PROVIDER_NAME, + RUNLOOP_WORKSPACE_ROOT, + MemoryRunloopControlPlane, + DEFAULT_RUNLOOP_BLUEPRINT, +} from "./runloop.js"; export { assertNoControlPlaneSecrets, CONTROL_PLANE_SECRET_ENV_KEYS, -} from "./daytona-client.js"; +} from "./runloop-client.js"; diff --git a/src/lib/computers/providers/provider.ts b/src/lib/computers/providers/provider.ts index 0fb6983..51bce65 100644 --- a/src/lib/computers/providers/provider.ts +++ b/src/lib/computers/providers/provider.ts @@ -4,7 +4,7 @@ * Routes and MCP tools must never call a concrete provider directly. * They call ComputerService, which calls this interface. * - * Implementations: Fake (tests), DockerDev (local), Daytona (prod v1), + * Implementations: Fake (tests), DockerDev (local), Runloop (prod v1), * Kata (self-host later). */ diff --git a/src/lib/computers/providers/runloop-client.ts b/src/lib/computers/providers/runloop-client.ts new file mode 100644 index 0000000..c9010b4 --- /dev/null +++ b/src/lib/computers/providers/runloop-client.ts @@ -0,0 +1,114 @@ +/** + * Control-plane adapter for Runloop Devboxes. + * RunloopProvider talks only to this interface so unit tests inject an in-memory + * fake and never construct RunloopSDK / never touch the network. + * + * RUNLOOP_API_KEY must never appear in create env, exec env, or guest files. + */ + +export const RUNLOOP_WORKSPACE_ROOT = "/home/user/flok"; +export const RUNLOOP_PROVIDER_NAME = "runloop" as const; +export const DEFAULT_RUNLOOP_BLUEPRINT = + "runloop/universal-ubuntu-24.04-x86_64-dnd"; +export const DEFAULT_RUNLOOP_ARCH = "x86_64" as const; +/** Live CI max lifetime. Do not combine with lifecycle.after_idle. */ +export const LIVE_KEEP_ALIVE_SECONDS = 15 * 60; + +export const CONTROL_PLANE_SECRET_ENV_KEYS = [ + "RUNLOOP_API_KEY", + "DAYTONA_API_KEY", + "DAYTONA_JWT_TOKEN", +] as const; + +export type RunloopDevboxState = + | "provisioning" + | "running" + | "paused" + | "stopped" + | "deleted" + | "error"; + +export interface RunloopCreateParams { + birdId: string; + flockId: string; + blueprint: string; + architecture: "x86_64" | "arm64"; + keepAliveSeconds: number; + labels: Record; + /** Guest environment. Must not contain control-plane secrets. */ + envVars: Record; +} + +export interface RunloopExecResult { + exitCode: number; + stdout: string; + stderr: string; + timedOut: boolean; +} + +export interface RunloopFsOk { + ok: true; + data?: T; +} + +export interface RunloopFsErr { + ok: false; + errorCode: string; +} + +export type RunloopFsResult = RunloopFsOk | RunloopFsErr; + +export interface RunloopDevboxSession { + readonly id: string; + readonly birdId: string; + readonly flockId: string; + readonly bootId: string; + + state(): Promise; + /** disk-preserving suspend; RAM is discarded */ + suspend(): Promise; + resume(): Promise; + /** Idempotent shutdown. */ + shutdown(): Promise; + + exec(req: { + argv: string[]; + cwd: string; + env?: Record; + timeoutMs: number; + }): Promise; + + fsStat(path: string): Promise>; + fsList(path: string): Promise>; + fsRead(path: string): Promise>; + fsWrite(path: string, body: Buffer): Promise; + fsMkdir(path: string): Promise; + fsDelete(path: string): Promise; + fsMove(from: string, to: string): Promise; + fsCopy(from: string, to: string): Promise; + + snapshotDisk(name: string): Promise; +} + +export interface RunloopControlPlane { + create(params: RunloopCreateParams): Promise; + get(id: string): Promise; + restore(snapshotRef: string, params: RunloopCreateParams): Promise; +} + +export function assertNoControlPlaneSecrets(env: Record | undefined): void { + if (!env) return; + for (const key of CONTROL_PLANE_SECRET_ENV_KEYS) { + if (Object.prototype.hasOwnProperty.call(env, key)) { + throw new Error(`refusing to place control-plane secret ${key} inside a Node VM`); + } + } + for (const [k, v] of Object.entries(env)) { + if (/api[_-]?key/i.test(k) || /runloop/i.test(k) && /key|token|secret/i.test(k)) { + throw new Error(`refusing to place control-plane secret ${k} inside a Node VM`); + } + if (typeof v === "string" && v.length > 8 && process.env.RUNLOOP_API_KEY === v) { + throw new Error("refusing to place RUNLOOP_API_KEY value inside a Node VM"); + } + } +} diff --git a/src/lib/computers/providers/daytona-memory.ts b/src/lib/computers/providers/runloop-memory.ts similarity index 61% rename from src/lib/computers/providers/daytona-memory.ts rename to src/lib/computers/providers/runloop-memory.ts index b69fedc..6acbd10 100644 --- a/src/lib/computers/providers/daytona-memory.ts +++ b/src/lib/computers/providers/runloop-memory.ts @@ -1,28 +1,22 @@ /** - * In-memory Daytona control plane for unit/contract tests. + * In-memory Runloop control plane for unit/contract tests. * Zero network. Two sessions have independent filesystems, boot IDs, - * browser-profile markers, and lifecycle. + * and lifecycle. Suspend preserves disk, not RAM. */ import { randomBytes } from "node:crypto"; import { posix as pathPosix } from "node:path"; import { PathEscape } from "../errors.js"; -import type { - ActionBatch, - ActionResult, - Observation, - ObserveRequest, - TakeoverGrant, -} from "../types.js"; import { assertNoControlPlaneSecrets, - DAYTONA_WORKSPACE_ROOT, - type DaytonaControlPlane, - type DaytonaCreateParams, - type DaytonaExecResult, - type DaytonaFsResult, - type DaytonaSandboxSession, -} from "./daytona-client.js"; + RUNLOOP_WORKSPACE_ROOT, + type RunloopControlPlane, + type RunloopCreateParams, + type RunloopDevboxSession, + type RunloopDevboxState, + type RunloopExecResult, + type RunloopFsResult, +} from "./runloop-client.js"; interface MemFile { isDir: boolean; @@ -33,102 +27,85 @@ function newId(prefix: string): string { return `${prefix}-${randomBytes(6).toString("hex")}`; } -export class MemoryDaytonaControlPlane implements DaytonaControlPlane { - private readonly sessions = new Map(); - /** Snapshots: name → cloned filesystem. */ +export class MemoryRunloopControlPlane implements RunloopControlPlane { + private readonly sessions = new Map(); private readonly snapshots = new Map>(); - async create(params: DaytonaCreateParams): Promise { + async create(params: RunloopCreateParams): Promise { assertNoControlPlaneSecrets(params.envVars); - const id = newId("dton"); - const session = new MemoryDaytonaSandbox(id, params, this.snapshots); + const id = newId("rlbox"); + const session = new MemoryRunloopDevbox(id, params, this.snapshots); this.sessions.set(id, session); return session; } - async get(id: string): Promise { + async get(id: string): Promise { const s = this.sessions.get(id); if (!s || s.destroyed) { - throw new Error(`daytona sandbox ${id} not found`); + throw new Error(`runloop devbox ${id} not found`); } return s; } - async restore(snapshotRef: string, params: DaytonaCreateParams): Promise { + async restore( + snapshotRef: string, + params: RunloopCreateParams, + ): Promise { assertNoControlPlaneSecrets(params.envVars); const snap = this.snapshots.get(snapshotRef); if (!snap) throw new Error(`snapshot ${snapshotRef} not found`); - const session = (await this.create(params)) as MemoryDaytonaSandbox; + const session = (await this.create(params)) as MemoryRunloopDevbox; session.replaceFs(cloneFs(snap)); return session; } } -class MemoryDaytonaSandbox implements DaytonaSandboxSession { +class MemoryRunloopDevbox implements RunloopDevboxSession { readonly id: string; readonly birdId: string; readonly flockId: string; readonly bootId: string; - readonly browserProfileId: string; destroyed = false; - private current: "started" | "stopped" | "paused" | "archived" | "destroyed" | "error" = - "started"; + private current: RunloopDevboxState = "running"; private fs: Map; private readonly snapshots: Map>; constructor( id: string, - params: DaytonaCreateParams, + params: RunloopCreateParams, snapshots: Map>, ) { this.id = id; this.birdId = params.birdId; this.flockId = params.flockId; this.bootId = randomBytes(16).toString("hex"); - this.browserProfileId = `profile-${randomBytes(8).toString("hex")}`; this.snapshots = snapshots; this.fs = new Map(); - this.fs.set(DAYTONA_WORKSPACE_ROOT, { isDir: true, content: Buffer.alloc(0) }); - this.fs.set(`${DAYTONA_WORKSPACE_ROOT}/.flok-browser-profile`, { - isDir: true, - content: Buffer.alloc(0), - }); - this.fs.set(`${DAYTONA_WORKSPACE_ROOT}/.flok-browser-profile/id`, { - isDir: false, - content: Buffer.from(this.browserProfileId, "utf8"), - }); + this.fs.set(RUNLOOP_WORKSPACE_ROOT, { isDir: true, content: Buffer.alloc(0) }); } replaceFs(fs: Map): void { this.fs = fs; } - async state() { + async state(): Promise { return this.current; } - async start(): Promise { + async suspend(): Promise { this.assertAlive(); - if (this.current === "paused" || this.current === "stopped") { - this.current = "started"; - } - } - - async stop(): Promise { - this.assertAlive(); - this.current = "stopped"; + this.current = "paused"; } - async pause(): Promise { + async resume(): Promise { this.assertAlive(); - if (this.current !== "started") { - throw new Error("pause requires a running Linux VM"); + if (this.current === "paused" || this.current === "stopped") { + this.current = "running"; } - this.current = "paused"; } - async delete(): Promise { - this.current = "destroyed"; + async shutdown(): Promise { + this.current = "deleted"; this.destroyed = true; } @@ -137,7 +114,7 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { cwd: string; env?: Record; timeoutMs: number; - }): Promise { + }): Promise { this.assertRunning(); assertNoControlPlaneSecrets(req.env); const argv = req.argv; @@ -176,21 +153,21 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { exitCode: 127, stdout: "", - stderr: `memory-daytona: unsupported argv ${JSON.stringify(argv)}`, + stderr: `memory-runloop: unsupported argv ${JSON.stringify(argv)}`, timedOut: false, }; } async fsStat( path: string, - ): Promise> { + ): Promise> { this.assertRunning(); const file = this.fs.get(path); if (!file) return { ok: false, errorCode: "NOT_FOUND" }; return { ok: true, data: { path, isDir: file.isDir, size: file.content.length } }; } - async fsList(path: string): Promise> { + async fsList(path: string): Promise> { this.assertRunning(); const dir = this.fs.get(path); if (!dir) return { ok: false, errorCode: "NOT_FOUND" }; @@ -206,14 +183,14 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { ok: true, data: [...children].sort() }; } - async fsRead(path: string): Promise> { + async fsRead(path: string): Promise> { this.assertRunning(); const file = this.fs.get(path); if (!file || file.isDir) return { ok: false, errorCode: "NOT_FOUND" }; return { ok: true, data: file.content }; } - async fsWrite(path: string, body: Buffer): Promise { + async fsWrite(path: string, body: Buffer): Promise { this.assertRunning(); const parent = pathPosix.dirname(path); if (parent !== path && !this.fs.get(parent)?.isDir) { @@ -223,7 +200,7 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { ok: true }; } - async fsMkdir(path: string): Promise { + async fsMkdir(path: string): Promise { this.assertRunning(); const parts = path.split("/").filter(Boolean); let acc = ""; @@ -236,9 +213,9 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { ok: true }; } - async fsDelete(path: string): Promise { + async fsDelete(path: string): Promise { this.assertRunning(); - if (path === DAYTONA_WORKSPACE_ROOT) return { ok: false, errorCode: "PATH_ESCAPE" }; + if (path === RUNLOOP_WORKSPACE_ROOT) return { ok: false, errorCode: "PATH_ESCAPE" }; if (!this.fs.has(path)) return { ok: false, errorCode: "NOT_FOUND" }; for (const key of [...this.fs.keys()]) { if (key === path || key.startsWith(`${path}/`)) this.fs.delete(key); @@ -246,7 +223,7 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { ok: true }; } - async fsMove(from: string, to: string): Promise { + async fsMove(from: string, to: string): Promise { this.assertRunning(); const src = this.fs.get(from); if (!src) return { ok: false, errorCode: "NOT_FOUND" }; @@ -255,7 +232,7 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { ok: true }; } - async fsCopy(from: string, to: string): Promise { + async fsCopy(from: string, to: string): Promise { this.assertRunning(); const src = this.fs.get(from); if (!src) return { ok: false, errorCode: "NOT_FOUND" }; @@ -263,56 +240,22 @@ class MemoryDaytonaSandbox implements DaytonaSandboxSession { return { ok: true }; } - async observe(request: ObserveRequest): Promise { - this.assertRunning(); - const obs: Observation = { - screenWidth: 1280, - screenHeight: 720, - activeWindow: `flok-${this.birdId}`, - }; - if (request.includeScreenshot) { - obs.screenshotBase64 = Buffer.from(`screen-${this.id}`).toString("base64"); - } - if (request.includeAccessibility) { - obs.accessibilitySummary = { profile: this.browserProfileId, birdId: this.birdId }; - } - return obs; - } - - async act(request: ActionBatch): Promise { - this.assertRunning(); - return { - ok: true, - results: request.actions.map((action) => ({ action, success: true })), - }; - } - - async takeover(): Promise { - this.assertRunning(); - const expiresAt = new Date(Date.now() + 60_000); - return { - url: `https://novnc.example.invalid/${this.id}?token=${randomBytes(8).toString("hex")}`, - expiresAt, - singleUse: true, - }; - } - - async checkpoint(name: string): Promise { + async snapshotDisk(name: string): Promise { this.assertAlive(); this.snapshots.set(name, cloneFs(this.fs)); return name; } private assertAlive(): void { - if (this.destroyed || this.current === "destroyed") { - throw new Error(`daytona sandbox ${this.id} destroyed`); + if (this.destroyed || this.current === "deleted") { + throw new Error(`runloop devbox ${this.id} destroyed`); } } private assertRunning(): void { this.assertAlive(); - if (this.current !== "started") { - throw new Error(`daytona sandbox ${this.id} is ${this.current}`); + if (this.current !== "running") { + throw new Error(`runloop devbox ${this.id} is ${this.current}`); } } } diff --git a/src/lib/computers/providers/runloop-sdk.ts b/src/lib/computers/providers/runloop-sdk.ts new file mode 100644 index 0000000..d7f8a7c --- /dev/null +++ b/src/lib/computers/providers/runloop-sdk.ts @@ -0,0 +1,400 @@ +/** + * Official @runloop/api-client adapter (RunloopSDK). + * Loaded only by RunloopProvider.fromEnv() / live tests — never by unit tests. + */ + +import { RunloopSDK } from "@runloop/api-client"; +import { posix as pathPosix } from "node:path"; +import { ProviderUnavailable } from "../errors.js"; +import { assertInsideRoot } from "../path.js"; +import { + assertNoControlPlaneSecrets, + DEFAULT_RUNLOOP_ARCH, + LIVE_KEEP_ALIVE_SECONDS, + RUNLOOP_WORKSPACE_ROOT, + type RunloopControlPlane, + type RunloopCreateParams, + type RunloopDevboxSession, + type RunloopDevboxState, + type RunloopExecResult, + type RunloopFsResult, +} from "./runloop-client.js"; + +const EXECVP_PY = [ + "import os, sys, json, base64", + "spec = json.loads(base64.b64decode(sys.argv[1]))", + "cwd = spec.get('cwd') or '/home/user/flok'", + "os.chdir(cwd)", + "env = os.environ.copy()", + "for k, v in (spec.get('env') or {}).items():", + " env[str(k)] = str(v)", + "argv = spec['argv']", + "os.execvpe(argv[0], argv, env)", + "", +].join("\n"); + +const EXECVP_PATH = `${RUNLOOP_WORKSPACE_ROOT}/.flok/execvp.py`; + +type SdkDevbox = { + id: string; + getInfo(): Promise<{ status: string }>; + cmd: { + exec( + command: string, + params?: { optimistic_timeout?: number | null }, + ): Promise<{ + exitCode: number | null; + stdout(n?: number): Promise; + stderr(n?: number): Promise; + }>; + }; + file: { + read(params: { file_path: string }): Promise; + write(params: { file_path: string; contents: string }): Promise; + download(params: { path: string }): Promise<{ arrayBuffer(): Promise }>; + upload(params: { path: string; file: File }): Promise; + }; + suspend(): Promise; + awaitSuspended(): Promise; + resume(): Promise; + awaitRunning(): Promise; + shutdown(): Promise; + snapshotDisk(params?: { name?: string }): Promise<{ id: string }>; +}; + +export async function createSdkRunloopPlane(opts: { + apiKey: string; + blueprint: string; + keepAliveSeconds?: number; +}): Promise { + const sdk = new RunloopSDK({ bearerToken: opts.apiKey }); + return new SdkRunloopControlPlane( + sdk, + opts.blueprint, + opts.keepAliveSeconds ?? LIVE_KEEP_ALIVE_SECONDS, + ); +} + +class SdkRunloopControlPlane implements RunloopControlPlane { + constructor( + private readonly sdk: RunloopSDK, + private readonly blueprint: string, + private readonly keepAliveSeconds: number, + ) {} + + async create(params: RunloopCreateParams): Promise { + assertNoControlPlaneSecrets(params.envVars); + const launch = { + architecture: params.architecture || DEFAULT_RUNLOOP_ARCH, + keep_alive_time_seconds: params.keepAliveSeconds || this.keepAliveSeconds, + }; + const created = (await this.sdk.devbox.createFromBlueprintName(this.blueprint, { + name: `flok-${params.birdId}`.slice(0, 48), + metadata: params.labels, + launch_parameters: launch, + })) as unknown as SdkDevbox; + const session = new SdkRunloopDevbox(created, params.birdId, params.flockId); + await session.ensureWorkspace(); + return session; + } + + async get(id: string): Promise { + const box = this.sdk.devbox.fromId(id) as unknown as SdkDevbox; + return new SdkRunloopDevbox(box, "unknown", "unknown"); + } + + async restore( + snapshotRef: string, + params: RunloopCreateParams, + ): Promise { + assertNoControlPlaneSecrets(params.envVars); + const launch = { + architecture: params.architecture || DEFAULT_RUNLOOP_ARCH, + keep_alive_time_seconds: params.keepAliveSeconds || this.keepAliveSeconds, + }; + const created = (await this.sdk.devbox.createFromSnapshot(snapshotRef, { + name: `flok-restore-${params.birdId}`.slice(0, 48), + metadata: params.labels, + launch_parameters: launch, + })) as unknown as SdkDevbox; + return new SdkRunloopDevbox(created, params.birdId, params.flockId); + } +} + +class SdkRunloopDevbox implements RunloopDevboxSession { + readonly id: string; + readonly birdId: string; + readonly flockId: string; + bootId = ""; + + constructor( + private readonly box: SdkDevbox, + birdId: string, + flockId: string, + ) { + this.id = box.id; + this.birdId = birdId; + this.flockId = flockId; + } + + async ensureWorkspace(): Promise { + await this.box.cmd.exec(`mkdir -p ${shellSingle(RUNLOOP_WORKSPACE_ROOT + "/.flok")}`); + await this.box.file.write({ file_path: EXECVP_PATH, contents: EXECVP_PY }); + const boot = await this.box.cmd.exec("cat /proc/sys/kernel/random/boot_id"); + this.bootId = ((await boot.stdout()) ?? "").trim(); + } + + async state(): Promise { + const info = await this.box.getInfo(); + return mapStatus(info.status); + } + + async suspend(): Promise { + await this.box.suspend(); + await this.box.awaitSuspended(); + } + + async resume(): Promise { + await this.box.resume(); + await this.box.awaitRunning(); + } + + async shutdown(): Promise { + try { + await this.box.shutdown(); + } catch { + // idempotent + } + } + + async exec(req: { + argv: string[]; + cwd: string; + env?: Record; + timeoutMs: number; + }): Promise { + assertNoControlPlaneSecrets(req.env); + const payload: { argv: string[]; cwd: string; env?: Record } = { + argv: req.argv, + cwd: req.cwd, + }; + if (req.env) payload.env = req.env; + const b64 = Buffer.from(JSON.stringify(payload), "utf8").toString("base64"); + const command = `python3 ${shellSingle(EXECVP_PATH)} ${b64}`; + const timeoutSec = Math.max(1, Math.min(25, Math.ceil(req.timeoutMs / 1000))); + try { + const result = await this.box.cmd.exec(command, { + optimistic_timeout: timeoutSec, + }); + const stdout = await result.stdout(); + const stderr = await result.stderr(); + const exitCode = result.exitCode ?? 1; + return { + exitCode, + stdout, + stderr, + timedOut: false, + }; + } catch (e) { + throw new ProviderUnavailable( + "runloop", + e instanceof Error ? e.message : "exec failed", + ); + } + } + + async fsStat( + path: string, + ): Promise> { + const jailed = await this.enforceResolved(path); + if (!jailed.ok) return jailed; + const r = await this.execPython( + `import os,json,sys; p=sys.argv[1]; st=os.stat(p); print(json.dumps({"isDir":os.path.isdir(p),"size":st.st_size}))`, + [path], + ); + if (r.exitCode !== 0) return { ok: false, errorCode: classifyFs(r.stderr) }; + const data = JSON.parse(r.stdout) as { isDir: boolean; size: number }; + return { ok: true, data: { path, isDir: data.isDir, size: data.size } }; + } + + async fsList(path: string): Promise> { + const jailed = await this.enforceResolved(path); + if (!jailed.ok) return jailed; + const r = await this.execPython( + `import os,json,sys; p=sys.argv[1]; print(json.dumps(sorted(os.listdir(p))))`, + [path], + ); + if (r.exitCode !== 0) return { ok: false, errorCode: classifyFs(r.stderr) }; + return { ok: true, data: JSON.parse(r.stdout) as string[] }; + } + + async fsRead(path: string): Promise> { + const jailed = await this.enforceResolved(path); + if (!jailed.ok) return jailed; + try { + const resp = await this.box.file.download({ path }); + const buf = Buffer.from(await resp.arrayBuffer()); + return { ok: true, data: buf }; + } catch (e) { + return { ok: false, errorCode: classifyFs(e) }; + } + } + + async fsWrite(path: string, body: Buffer): Promise { + const jailed = await this.enforceResolved(path); + if (!jailed.ok) return jailed; + try { + const parent = pathPosix.dirname(path); + await this.fsMkdir(parent); + await this.box.file.upload({ + path, + file: new File([body], pathPosix.basename(path)), + }); + return { ok: true }; + } catch (e) { + return { ok: false, errorCode: classifyFs(e) }; + } + } + + async fsMkdir(path: string): Promise { + const jailed = await this.enforceResolved(path); + if (!jailed.ok) return jailed; + const r = await this.execPython(`import os,sys; os.makedirs(sys.argv[1], exist_ok=True)`, [ + path, + ]); + if (r.exitCode !== 0) return { ok: false, errorCode: classifyFs(r.stderr) }; + return { ok: true }; + } + + async fsDelete(path: string): Promise { + if (path === RUNLOOP_WORKSPACE_ROOT) return { ok: false, errorCode: "PATH_ESCAPE" }; + const jailed = await this.enforceResolved(path); + if (!jailed.ok) return jailed; + const r = await this.execPython( + `import os,shutil,sys,pathlib; p=sys.argv[1];\n` + + `p_=pathlib.Path(p);\n` + + `shutil.rmtree(p) if p_.is_dir() else os.remove(p)`, + [path], + ); + if (r.exitCode !== 0) return { ok: false, errorCode: classifyFs(r.stderr) }; + return { ok: true }; + } + + async fsMove(from: string, to: string): Promise { + const a = await this.enforceResolved(from); + if (!a.ok) return a; + const b = await this.enforceResolved(to); + if (!b.ok) return b; + const r = await this.execPython(`import os,sys; os.rename(sys.argv[1], sys.argv[2])`, [ + from, + to, + ]); + if (r.exitCode !== 0) return { ok: false, errorCode: classifyFs(r.stderr) }; + return { ok: true }; + } + + async fsCopy(from: string, to: string): Promise { + const a = await this.enforceResolved(from); + if (!a.ok) return a; + const b = await this.enforceResolved(to); + if (!b.ok) return b; + const r = await this.execPython( + `import shutil,sys; shutil.copy2(sys.argv[1], sys.argv[2])`, + [from, to], + ); + if (r.exitCode !== 0) return { ok: false, errorCode: classifyFs(r.stderr) }; + return { ok: true }; + } + + async snapshotDisk(name: string): Promise { + const snap = await this.box.snapshotDisk({ name }); + return snap.id; + } + + private async enforceResolved(path: string): Promise { + try { + assertInsideRoot(path, RUNLOOP_WORKSPACE_ROOT); + } catch { + return { ok: false, errorCode: "PATH_ESCAPE" }; + } + const r = await this.execPython( + `import os,sys; print(os.path.realpath(sys.argv[1]))`, + [path], + ); + if (r.exitCode !== 0) { + // path may not exist yet (mkdir/write); lexical jail already applied + return { ok: true }; + } + const resolved = r.stdout.trim(); + try { + assertInsideRoot(resolved, RUNLOOP_WORKSPACE_ROOT); + return { ok: true }; + } catch { + return { ok: false, errorCode: "PATH_ESCAPE" }; + } + } + + private async execPython(code: string, argv: string[]): Promise { + const payload = { + argv: ["python3", "-c", code, ...argv], + cwd: RUNLOOP_WORKSPACE_ROOT, + }; + const b64 = Buffer.from(JSON.stringify(payload), "utf8").toString("base64"); + const command = `python3 ${shellSingle(EXECVP_PATH)} ${b64}`; + try { + const result = await this.box.cmd.exec(command, { optimistic_timeout: 15 }); + return { + exitCode: result.exitCode ?? 1, + stdout: await result.stdout(), + stderr: await result.stderr(), + timedOut: false, + }; + } catch (e) { + return { + exitCode: 1, + stdout: "", + stderr: e instanceof Error ? e.message : String(e), + timedOut: false, + }; + } + } +} + +function mapStatus(status: string): RunloopDevboxState { + switch (status) { + case "running": + return "running"; + case "suspended": + case "suspending": + return "paused"; + case "shutdown": + return "stopped"; + case "failure": + return "error"; + case "provisioning": + case "initializing": + case "queued": + case "scheduled": + case "resuming": + return "provisioning"; + default: + return "error"; + } +} + +function classifyFs(err: unknown): string { + const s = err instanceof Error ? err.message.toLowerCase() : String(err).toLowerCase(); + if (s.includes("permission") || s.includes("denied") || s.includes("read-only")) { + return "PERMISSION_DENIED"; + } + if (s.includes("not found") || s.includes("no such") || s.includes("404")) { + return "NOT_FOUND"; + } + return "IO_ERROR"; +} + +/** Quote a path that contains no single quotes (workspace paths we control). */ +function shellSingle(p: string): string { + if (p.includes("'")) throw new Error("refusing path with quote"); + return `'${p}'`; +} diff --git a/src/lib/computers/providers/daytona.ts b/src/lib/computers/providers/runloop.ts similarity index 61% rename from src/lib/computers/providers/daytona.ts rename to src/lib/computers/providers/runloop.ts index 2e29223..75e02c2 100644 --- a/src/lib/computers/providers/daytona.ts +++ b/src/lib/computers/providers/runloop.ts @@ -1,9 +1,12 @@ /** - * DaytonaProvider — production v1 ComputerProvider. - * Linux VM class only. Official @daytona/sdk behind DaytonaControlPlane. + * RunloopProvider — production v1 ComputerProvider (C3A compute substrate). + * Official @runloop/api-client RunloopSDK behind RunloopControlPlane. * - * Control-plane secrets (DAYTONA_API_KEY) never enter the guest. - * Shell mode is rejected. Filesystem is jailed to /home/flok. + * Control-plane secrets (RUNLOOP_API_KEY) never enter the guest. + * Shell mode is rejected. Filesystem is jailed to /home/user/flok. + * + * Suspend preserves disk, not RAM (pauseMemory: false). + * Native Computer Use / VNC are C3B — not claimed here. */ import { posix as pathPosix } from "node:path"; @@ -29,81 +32,97 @@ import { ComputerError, PathEscape, ProviderUnavailable } from "../errors.js"; import { assertInsideRoot } from "../path.js"; import { assertNoControlPlaneSecrets, - DAYTONA_WORKSPACE_ROOT, - type DaytonaControlPlane, - type DaytonaCreateParams, - type DaytonaSandboxSession, -} from "./daytona-client.js"; -import { MemoryDaytonaControlPlane } from "./daytona-memory.js"; + DEFAULT_RUNLOOP_ARCH, + DEFAULT_RUNLOOP_BLUEPRINT, + LIVE_KEEP_ALIVE_SECONDS, + RUNLOOP_PROVIDER_NAME, + RUNLOOP_WORKSPACE_ROOT, + type RunloopControlPlane, + type RunloopCreateParams, + type RunloopDevboxSession, +} from "./runloop-client.js"; +import { MemoryRunloopControlPlane } from "./runloop-memory.js"; const ENV_KEY = /^[A-Za-z_][A-Za-z0-9_]*$/; +const MAX_OUTPUT = 1_000_000; -export const DAYTONA_PROVIDER_NAME = "daytona" as const; - -export class DaytonaLinuxVmRequired extends ComputerError { +export class RunloopBlueprintRequired extends ComputerError { constructor(detail: string) { - super("DAYTONA_LINUX_VM_REQUIRED", detail); - this.name = "DaytonaLinuxVmRequired"; + super("RUNLOOP_BLUEPRINT_REQUIRED", detail); + this.name = "RunloopBlueprintRequired"; } } -export class DaytonaProvider implements ComputerProvider { - readonly name = DAYTONA_PROVIDER_NAME; - private readonly plane: DaytonaControlPlane; - private readonly snapshot: string; - private readonly sessions = new Map(); +export class ComputerUseNotAvailable extends ComputerError { + constructor() { + super( + "C3B_NOT_IMPLEMENTED", + "Interactive computer layer is C3B; Runloop C3A has no native Computer Use/VNC", + ); + this.name = "ComputerUseNotAvailable"; + } +} + +export class RunloopProvider implements ComputerProvider { + readonly name = RUNLOOP_PROVIDER_NAME; + private readonly plane: RunloopControlPlane; + private readonly blueprint: string; + private readonly keepAliveSeconds: number; + private readonly sessions = new Map(); constructor(opts?: { - client?: DaytonaControlPlane; - snapshot?: string; + client?: RunloopControlPlane; + blueprint?: string; apiKey?: string; + keepAliveSeconds?: number; }) { - this.snapshot = - opts?.snapshot ?? process.env.FLOK_DAYTONA_SNAPSHOT ?? ""; + this.blueprint = + opts?.blueprint ?? process.env.FLOK_RUNLOOP_BLUEPRINT ?? DEFAULT_RUNLOOP_BLUEPRINT; + this.keepAliveSeconds = opts?.keepAliveSeconds ?? LIVE_KEEP_ALIVE_SECONDS; if (opts?.client) { this.plane = opts.client; return; } - const apiKey = opts?.apiKey ?? process.env.DAYTONA_API_KEY ?? ""; + const apiKey = opts?.apiKey ?? process.env.RUNLOOP_API_KEY ?? ""; if (!apiKey) { - throw new ProviderUnavailable("daytona", "DAYTONA_API_KEY is required"); + throw new ProviderUnavailable("runloop", "RUNLOOP_API_KEY is required"); } - if (!this.snapshot) { - throw new DaytonaLinuxVmRequired( - "FLOK_DAYTONA_SNAPSHOT must name a Linux VM snapshot (not the default container class)", - ); + if (!this.blueprint) { + throw new RunloopBlueprintRequired("FLOK_RUNLOOP_BLUEPRINT is required"); } throw new ProviderUnavailable( - "daytona", - "use DaytonaProvider.fromEnv() to load @daytona/sdk, or inject { client }", + "runloop", + "use RunloopProvider.fromEnv() to load @runloop/api-client, or inject { client }", ); } - /** Production/live constructor. Loads official @daytona/sdk. */ - static async fromEnv(): Promise { - const apiKey = process.env.DAYTONA_API_KEY ?? ""; - const snapshot = process.env.FLOK_DAYTONA_SNAPSHOT ?? ""; + static async fromEnv(): Promise { + const apiKey = process.env.RUNLOOP_API_KEY ?? ""; + const blueprint = + process.env.FLOK_RUNLOOP_BLUEPRINT ?? DEFAULT_RUNLOOP_BLUEPRINT; if (!apiKey) { - throw new ProviderUnavailable("daytona", "DAYTONA_API_KEY is required"); + throw new ProviderUnavailable("runloop", "RUNLOOP_API_KEY is required"); } - if (!snapshot) { - throw new DaytonaLinuxVmRequired( - "FLOK_DAYTONA_SNAPSHOT must name a Linux VM snapshot (not the default container class)", - ); + if (!blueprint) { + throw new RunloopBlueprintRequired("FLOK_RUNLOOP_BLUEPRINT is required"); } - const { createSdkDaytonaPlane } = await import("./daytona-sdk.js"); - const client = await createSdkDaytonaPlane({ apiKey, snapshot }); - return new DaytonaProvider({ client, snapshot, apiKey }); + const { createSdkRunloopPlane } = await import("./runloop-sdk.js"); + const client = await createSdkRunloopPlane({ + apiKey, + blueprint, + keepAliveSeconds: LIVE_KEEP_ALIVE_SECONDS, + }); + return new RunloopProvider({ client, blueprint, apiKey }); } capabilities(): ProviderCapabilities { return { linuxVm: true, windowsVm: false, - computerUse: true, - accessibility: true, - vnc: true, - pauseMemory: true, + computerUse: false, + accessibility: false, + vnc: false, + pauseMemory: false, snapshots: true, forks: true, customImages: true, @@ -113,12 +132,12 @@ export class DaytonaProvider implements ComputerProvider { async provision(spec: ComputerSpec): Promise { if (spec.osType === "windows") { - throw new ProviderUnavailable("daytona", "linux VM only"); + throw new ProviderUnavailable("runloop", "linux only"); } const params = this.createParams(spec); const session = await this.plane.create(params); this.sessions.set(session.id, session); - await session.fsMkdir(DAYTONA_WORKSPACE_ROOT).catch(() => undefined); + await session.fsMkdir(RUNLOOP_WORKSPACE_ROOT).catch(() => undefined); return { providerRef: session.id, status: "ready" }; } @@ -126,33 +145,34 @@ export class DaytonaProvider implements ComputerProvider { const s = await this.requireSession(ref); const st = await s.state(); let state: ComputerStatus["state"]; - if (st === "started") state = "running"; + if (st === "running") state = "running"; else if (st === "paused") state = "paused"; - else if (st === "stopped" || st === "archived") state = "stopped"; - else if (st === "destroyed") state = "deleted"; + else if (st === "stopped") state = "stopped"; + else if (st === "deleted") state = "deleted"; + else if (st === "provisioning") state = "provisioning"; else state = "error"; - return { state, providerDetail: `daytona:${s.birdId}` }; + return { state, providerDetail: `runloop:${s.birdId}` }; } async wake(ref: string): Promise { const s = await this.requireSession(ref); - await s.start(); + await s.resume(); } async pause(ref: string): Promise { const s = await this.requireSession(ref); - await s.pause(); + await s.suspend(); } async stop(ref: string): Promise { const s = await this.requireSession(ref); - await s.stop(); + await s.shutdown(); } async destroy(ref: string): Promise { const s = await this.requireSession(ref).catch(() => null); if (s) { - await s.delete().catch(() => undefined); + await s.shutdown().catch(() => undefined); } this.sessions.delete(ref); } @@ -196,8 +216,8 @@ export class DaytonaProvider implements ComputerProvider { let cwd: string; try { cwd = request.cwd - ? assertInsideRoot(request.cwd, DAYTONA_WORKSPACE_ROOT) - : DAYTONA_WORKSPACE_ROOT; + ? assertInsideRoot(request.cwd, RUNLOOP_WORKSPACE_ROOT) + : RUNLOOP_WORKSPACE_ROOT; } catch (e) { if (e instanceof PathEscape) { return { @@ -226,13 +246,13 @@ export class DaytonaProvider implements ComputerProvider { const result = await s.exec(execReq); return { exitCode: result.exitCode, - stdout: result.stdout, - stderr: result.stderr, + stdout: result.stdout.slice(0, MAX_OUTPUT), + stderr: result.stderr.slice(0, MAX_OUTPUT), timedOut: result.timedOut, }; } catch (e) { throw new ProviderUnavailable( - "daytona", + "runloop", e instanceof Error ? e.message : "exec failed", ); } @@ -242,7 +262,7 @@ export class DaytonaProvider implements ComputerProvider { const s = await this.requireSession(ref); let canonical: string; try { - canonical = assertInsideRoot(request.path, DAYTONA_WORKSPACE_ROOT); + canonical = assertInsideRoot(request.path, RUNLOOP_WORKSPACE_ROOT); } catch (e) { if (e instanceof PathEscape) return { ok: false, errorCode: "PATH_ESCAPE" }; throw e; @@ -285,7 +305,7 @@ export class DaytonaProvider implements ComputerProvider { return { ok: true }; } case "delete": { - if (canonical === DAYTONA_WORKSPACE_ROOT) { + if (canonical === RUNLOOP_WORKSPACE_ROOT) { return { ok: false, errorCode: "PATH_ESCAPE" }; } const r = await s.fsDelete(canonical); @@ -299,7 +319,7 @@ export class DaytonaProvider implements ComputerProvider { } let dest: string; try { - dest = assertInsideRoot(request.destination, DAYTONA_WORKSPACE_ROOT); + dest = assertInsideRoot(request.destination, RUNLOOP_WORKSPACE_ROOT); } catch { return { ok: false, errorCode: "PATH_ESCAPE" }; } @@ -315,41 +335,40 @@ export class DaytonaProvider implements ComputerProvider { } } - async observe(ref: string, request: ObserveRequest): Promise { - const s = await this.requireSession(ref); - return s.observe(request); + async observe(_ref: string, _request: ObserveRequest): Promise { + throw new ComputerUseNotAvailable(); } - async act(ref: string, request: ActionBatch): Promise { - const s = await this.requireSession(ref); - return s.act(request); + async act(_ref: string, _request: ActionBatch): Promise { + throw new ComputerUseNotAvailable(); } - async takeover(ref: string): Promise { - const s = await this.requireSession(ref); - return s.takeover(); + async takeover(_ref: string): Promise { + throw new ComputerUseNotAvailable(); } async checkpoint(ref: string): Promise { const s = await this.requireSession(ref); const name = `flok-${ref}-${Date.now()}`; - const snap = await s.checkpoint(name); + const snap = await s.snapshotDisk(name); return { providerSnapshotRef: snap }; } async restore(request: RestoreRequest): Promise { if (!request.providerSnapshotRef) { - throw new ProviderUnavailable("daytona", "providerSnapshotRef required"); + throw new ProviderUnavailable("runloop", "providerSnapshotRef required"); } const existing = request.computerId ? this.sessions.get(request.computerId) : undefined; - const params: DaytonaCreateParams = { + const params: RunloopCreateParams = { birdId: existing?.birdId ?? "restore", flockId: existing?.flockId ?? "restore", - snapshot: this.snapshot || request.providerSnapshotRef, + blueprint: this.blueprint, + architecture: DEFAULT_RUNLOOP_ARCH, + keepAliveSeconds: this.keepAliveSeconds, labels: { - "flok.provider": "daytona", + "flok.provider": "runloop", "flok.isolation": "linux-vm", }, envVars: {}, @@ -359,33 +378,26 @@ export class DaytonaProvider implements ComputerProvider { return { providerRef: session.id, status: "ready" }; } - private createParams(spec: ComputerSpec): DaytonaCreateParams { - if (!this.snapshot && !(this.plane instanceof MemoryDaytonaControlPlane)) { - throw new DaytonaLinuxVmRequired( - "FLOK_DAYTONA_SNAPSHOT must name a Linux VM snapshot", - ); - } + private createParams(spec: ComputerSpec): RunloopCreateParams { const envVars: Record = {}; assertNoControlPlaneSecrets(envVars); - const params: DaytonaCreateParams = { + return { birdId: spec.birdId, flockId: spec.flockId, - snapshot: this.snapshot || "memory-linux-vm", + blueprint: this.blueprint || DEFAULT_RUNLOOP_BLUEPRINT, + architecture: DEFAULT_RUNLOOP_ARCH, + keepAliveSeconds: this.keepAliveSeconds, labels: { - "flok.provider": "daytona", + "flok.provider": "runloop", "flok.bird_id": spec.birdId, "flok.flock_id": spec.flockId, "flok.isolation": "linux-vm", }, envVars, }; - if (spec.cpu !== undefined) params.cpu = spec.cpu; - if (spec.memoryMb !== undefined) params.memoryGb = Math.max(1, Math.ceil(spec.memoryMb / 1024)); - if (spec.diskGb !== undefined) params.diskGb = spec.diskGb; - return params; } - private async requireSession(ref: string): Promise { + private async requireSession(ref: string): Promise { const cached = this.sessions.get(ref); if (cached) return cached; try { @@ -394,16 +406,20 @@ export class DaytonaProvider implements ComputerProvider { return s; } catch (e) { throw new ProviderUnavailable( - "daytona", - e instanceof Error ? e.message : `sandbox ${ref} not found`, + "runloop", + e instanceof Error ? e.message : `devbox ${ref} not found`, ); } } } -/** Join a path under the Daytona workspace (exported for tests). */ -export function daytonaJoin(rel: string): string { - return pathPosix.normalize(pathPosix.join(DAYTONA_WORKSPACE_ROOT, rel)); +export function runloopJoin(rel: string): string { + return pathPosix.normalize(pathPosix.join(RUNLOOP_WORKSPACE_ROOT, rel)); } -export { MemoryDaytonaControlPlane, DAYTONA_WORKSPACE_ROOT }; +export { + MemoryRunloopControlPlane, + RUNLOOP_WORKSPACE_ROOT, + RUNLOOP_PROVIDER_NAME, + DEFAULT_RUNLOOP_BLUEPRINT, +}; diff --git a/src/lib/computers/schemas.ts b/src/lib/computers/schemas.ts index 0c5e566..73c427f 100644 --- a/src/lib/computers/schemas.ts +++ b/src/lib/computers/schemas.ts @@ -35,7 +35,7 @@ export const ComputerSchema = z.object({ id: z.string().min(1), birdId: z.string().min(1), flockId: z.string().min(1), - provider: z.enum(["fake", "docker-dev", "daytona"]), + provider: z.enum(["fake", "docker-dev", "runloop"]), providerRef: z.string().nullable(), state: ComputerStateSchema, osType: OsTypeSchema, diff --git a/src/lib/computers/types.ts b/src/lib/computers/types.ts index c1045de..01c9728 100644 --- a/src/lib/computers/types.ts +++ b/src/lib/computers/types.ts @@ -34,7 +34,7 @@ export const LEGAL_TRANSITIONS: Readonly { - it("is covered by daytona.isolation.test.ts live describe", () => { - // Real live assertions run in the isolation file when the flag is set. - }); -}); diff --git a/tests/live/runloop.live.test.ts b/tests/live/runloop.live.test.ts new file mode 100644 index 0000000..7b86d70 --- /dev/null +++ b/tests/live/runloop.live.test.ts @@ -0,0 +1,14 @@ +/** + * Opt-in live Runloop suite alias. + * Cases live in tests/providers/runloop.isolation.test.ts. + */ + +import { describe, it } from "node:test"; + +const LIVE = process.env.FLOK_LIVE_RUNLOOP_TEST === "1"; + +describe("live Runloop entry (see tests/providers/runloop.isolation.test.ts)", { skip: !LIVE }, () => { + it("is covered by runloop.isolation.test.ts live describe", () => { + // real cases are in tests/providers/runloop.isolation.test.ts + }); +}); diff --git a/tests/providers/daytona.isolation.test.ts b/tests/providers/daytona.isolation.test.ts deleted file mode 100644 index e3518ec..0000000 --- a/tests/providers/daytona.isolation.test.ts +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Gate C3 isolation contract. - * - * Non-live: MemoryDaytonaControlPlane proves A/B isolation, distinct boot IDs, - * distinct browser profiles, independent lifecycle — zero network. - * - * Live: skipped unless FLOK_LIVE_COMPUTER_TEST=1. When the flag is set, - * missing DAYTONA_API_KEY / FLOK_DAYTONA_SNAPSHOT / API failure MUST FAIL, - * never silent skip. - */ - -import { describe, it, before } from "node:test"; -import assert from "node:assert/strict"; -import { - DaytonaProvider, - MemoryDaytonaControlPlane, - DAYTONA_WORKSPACE_ROOT, -} from "../../src/lib/computers/providers/index.js"; - -describe("Daytona C3 isolation (memory plane)", () => { - it("A cannot read B's workspace file and vice versa", async () => { - const p = new DaytonaProvider({ - client: new MemoryDaytonaControlPlane(), - snapshot: "memory-linux-vm", - }); - const a = await p.provision({ birdId: "bird-a", flockId: "flock-1" }); - const b = await p.provision({ birdId: "bird-b", flockId: "flock-1" }); - assert.notEqual(a.providerRef, b.providerRef); - - assert.equal( - ( - await p.filesystem(a.providerRef, { - operation: "write", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - content: "secret-from-A", - }) - ).ok, - true, - ); - assert.equal( - ( - await p.filesystem(b.providerRef, { - operation: "write", - path: `${DAYTONA_WORKSPACE_ROOT}/B.txt`, - content: "secret-from-B", - }) - ).ok, - true, - ); - - const readAFromB = await p.filesystem(b.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - }); - assert.equal(readAFromB.ok, false); - - const readBFromA = await p.filesystem(a.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/B.txt`, - }); - assert.equal(readBFromA.ok, false); - - const own = await p.filesystem(a.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - }); - assert.equal(own.ok, true); - assert.equal(own.data, "secret-from-A"); - }); - - it("two machines have different process-namespace and browser-profile markers", async () => { - const p = new DaytonaProvider({ - client: new MemoryDaytonaControlPlane(), - snapshot: "memory-linux-vm", - }); - const a = await p.provision({ birdId: "ns-a", flockId: "flock-1" }); - const b = await p.provision({ birdId: "ns-b", flockId: "flock-1" }); - - const bootA = await p.exec(a.providerRef, { - argv: ["cat", "/proc/sys/kernel/random/boot_id"], - }); - const bootB = await p.exec(b.providerRef, { - argv: ["cat", "/proc/sys/kernel/random/boot_id"], - }); - assert.equal(bootA.exitCode, 0); - assert.equal(bootB.exitCode, 0); - assert.notEqual(bootA.stdout.trim(), bootB.stdout.trim()); - - const profileA = await p.filesystem(a.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/.flok-browser-profile/id`, - }); - const profileB = await p.filesystem(b.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/.flok-browser-profile/id`, - }); - assert.equal(profileA.ok, true); - assert.equal(profileB.ok, true); - assert.notEqual(profileA.data, profileB.data); - }); - - it("independent lifecycle: stopping A does not stop B", async () => { - const p = new DaytonaProvider({ - client: new MemoryDaytonaControlPlane(), - snapshot: "memory-linux-vm", - }); - const a = await p.provision({ birdId: "life-a", flockId: "flock-1" }); - const b = await p.provision({ birdId: "life-b", flockId: "flock-1" }); - await p.stop(a.providerRef); - const sa = await p.status(a.providerRef); - const sb = await p.status(b.providerRef); - assert.equal(sa.state, "stopped"); - assert.equal(sb.state, "running"); - - await p.filesystem(b.providerRef, { - operation: "write", - path: `${DAYTONA_WORKSPACE_ROOT}/still.txt`, - content: "b-alive", - }); - const still = await p.filesystem(b.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/still.txt`, - }); - assert.equal(still.ok, true); - assert.equal(still.data, "b-alive"); - }); -}); - -const LIVE = process.env.FLOK_LIVE_COMPUTER_TEST === "1"; - -describe("Daytona C3 live Linux VMs", { skip: !LIVE }, () => { - before(() => { - if (!process.env.DAYTONA_API_KEY) { - throw new Error( - "FLOK_LIVE_COMPUTER_TEST=1 but DAYTONA_API_KEY is missing (must FAIL, not skip)", - ); - } - if (!process.env.FLOK_DAYTONA_SNAPSHOT) { - throw new Error( - "FLOK_LIVE_COMPUTER_TEST=1 but FLOK_DAYTONA_SNAPSHOT is missing — Linux VM snapshot required (must FAIL, not skip)", - ); - } - }); - - it("two live VMs have distinct ids, filesystems, and lifecycle", async () => { - const p = await DaytonaProvider.fromEnv(); - const refs: string[] = []; - try { - const a = await p.provision({ birdId: "live-a", flockId: "flock-live" }); - const b = await p.provision({ birdId: "live-b", flockId: "flock-live" }); - refs.push(a.providerRef, b.providerRef); - assert.notEqual(a.providerRef, b.providerRef); - - assert.equal( - ( - await p.filesystem(a.providerRef, { - operation: "write", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - content: "secret-from-A", - }) - ).ok, - true, - ); - const leaked = await p.filesystem(b.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - }); - assert.equal(leaked.ok, false); - - const bootA = await p.exec(a.providerRef, { - argv: ["cat", "/proc/sys/kernel/random/boot_id"], - }); - const bootB = await p.exec(b.providerRef, { - argv: ["cat", "/proc/sys/kernel/random/boot_id"], - }); - assert.equal(bootA.exitCode, 0, bootA.stderr); - assert.equal(bootB.exitCode, 0, bootB.stderr); - assert.notEqual(bootA.stdout.trim(), bootB.stdout.trim()); - - await p.stop(a.providerRef); - const sa = await p.status(a.providerRef); - const sb = await p.status(b.providerRef); - assert.equal(sa.state, "stopped"); - assert.notEqual(sb.state, "stopped"); - } finally { - for (const ref of refs) { - await p.destroy(ref).catch(() => undefined); - } - } - }); -}); diff --git a/tests/providers/daytona.test.ts b/tests/providers/daytona.test.ts deleted file mode 100644 index 2205469..0000000 --- a/tests/providers/daytona.test.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** - * DaytonaProvider — non-live tests. Zero network / zero Daytona API. - * Injected MemoryDaytonaControlPlane only. - */ - -import { describe, it } from "node:test"; -import assert from "node:assert/strict"; -import { - ComputerService, - DaytonaProvider, - DaytonaLinuxVmRequired, - MemoryDaytonaControlPlane, - FLAGS, - assertNexusDisabled, - ProviderUnavailable, -} from "../../src/lib/computers/index.js"; -import { - assertNoControlPlaneSecrets, - CONTROL_PLANE_SECRET_ENV_KEYS, - DAYTONA_WORKSPACE_ROOT, -} from "../../src/lib/computers/providers/index.js"; - -function provider(): DaytonaProvider { - return new DaytonaProvider({ - client: new MemoryDaytonaControlPlane(), - snapshot: "memory-linux-vm", - }); -} - -describe("DaytonaProvider (no network)", () => { - it("reports provider name daytona", () => { - assert.equal(provider().name, "daytona"); - }); - - it("advertises Linux VM capabilities", () => { - const caps = provider().capabilities(); - assert.equal(caps.linuxVm, true); - assert.equal(caps.windowsVm, false); - assert.equal(caps.pauseMemory, true); - assert.equal(caps.snapshots, true); - assert.equal(caps.computerUse, true); - assert.equal(caps.vnc, true); - assert.equal(caps.accessibility, true); - }); - - it("rejects construction without DAYTONA_API_KEY when no client is injected", () => { - const prevKey = process.env.DAYTONA_API_KEY; - const prevSnap = process.env.FLOK_DAYTONA_SNAPSHOT; - delete process.env.DAYTONA_API_KEY; - delete process.env.FLOK_DAYTONA_SNAPSHOT; - try { - assert.throws( - () => new DaytonaProvider(), - (err: unknown) => - err instanceof ProviderUnavailable && err.code === "PROVIDER_UNAVAILABLE", - ); - } finally { - if (prevKey === undefined) delete process.env.DAYTONA_API_KEY; - else process.env.DAYTONA_API_KEY = prevKey; - if (prevSnap === undefined) delete process.env.FLOK_DAYTONA_SNAPSHOT; - else process.env.FLOK_DAYTONA_SNAPSHOT = prevSnap; - } - }); - - it("rejects missing Linux VM snapshot when key is present but client is not", () => { - const prevKey = process.env.DAYTONA_API_KEY; - const prevSnap = process.env.FLOK_DAYTONA_SNAPSHOT; - process.env.DAYTONA_API_KEY = "test-key-not-for-guest"; - delete process.env.FLOK_DAYTONA_SNAPSHOT; - try { - assert.throws( - () => new DaytonaProvider(), - (err: unknown) => - err instanceof DaytonaLinuxVmRequired && - err.code === "DAYTONA_LINUX_VM_REQUIRED", - ); - } finally { - if (prevKey === undefined) delete process.env.DAYTONA_API_KEY; - else process.env.DAYTONA_API_KEY = prevKey; - if (prevSnap === undefined) delete process.env.FLOK_DAYTONA_SNAPSHOT; - else process.env.FLOK_DAYTONA_SNAPSHOT = prevSnap; - } - }); - - it("rejects windows osType", async () => { - await assert.rejects( - () => provider().provision({ birdId: "w", flockId: "f", osType: "windows" }), - (err: unknown) => err instanceof ProviderUnavailable, - ); - }); - - it("ComputerService records provider daytona", async () => { - const service = new ComputerService(provider()); - const c = await service.requestComputer({ birdId: "bird-1", flockId: "flock-1" }); - assert.equal(c.provider, "daytona"); - assert.ok(c.providerRef); - }); - - it("rejects shell mode", async () => { - const p = provider(); - const a = await p.provision({ birdId: "sh", flockId: "f" }); - const r = await p.exec(a.providerRef, { argv: ["echo", "hi"], mode: "shell" }); - assert.equal(r.exitCode, 126); - assert.match(r.stderr, /shell mode not allowed/); - }); - - it("rejects empty argv", async () => { - const p = provider(); - const a = await p.provision({ birdId: "e", flockId: "f" }); - const r = await p.exec(a.providerRef, { argv: [] }); - assert.equal(r.exitCode, 2); - }); - - it("rejects invalid env keys and control-plane secrets in exec env", async () => { - const p = provider(); - const a = await p.provision({ birdId: "env", flockId: "f" }); - const badKey = await p.exec(a.providerRef, { - argv: ["true"], - env: { "BAD-KEY": "x" }, - }); - assert.equal(badKey.exitCode, 2); - - const secret = await p.exec(a.providerRef, { - argv: ["true"], - env: { DAYTONA_API_KEY: "must-not-enter-guest" }, - }); - assert.equal(secret.exitCode, 126); - assert.match(secret.stderr, /DAYTONA_API_KEY/); - }); - - it("jails filesystem paths to /home/flok", async () => { - const p = provider(); - const a = await p.provision({ birdId: "jail", flockId: "f" }); - const escaped = await p.filesystem(a.providerRef, { - operation: "read", - path: "/etc/passwd", - }); - assert.equal(escaped.ok, false); - assert.equal(escaped.errorCode, "PATH_ESCAPE"); - - const cwd = await p.exec(a.providerRef, { - argv: ["pwd"], - cwd: "/etc", - }); - assert.equal(cwd.exitCode, 126); - assert.match(cwd.stderr, /PATH_ESCAPE/); - }); - - it("writes and reads under /home/flok", async () => { - const p = provider(); - const a = await p.provision({ birdId: "fs", flockId: "f" }); - const w = await p.filesystem(a.providerRef, { - operation: "write", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - content: "hello-daytona", - }); - assert.equal(w.ok, true); - const r = await p.filesystem(a.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/A.txt`, - }); - assert.equal(r.ok, true); - assert.equal(r.data, "hello-daytona"); - }); - - it("observe / act / takeover work on the memory plane", async () => { - const p = provider(); - const a = await p.provision({ birdId: "ui", flockId: "f" }); - const obs = await p.observe(a.providerRef, { includeScreenshot: true }); - assert.ok(obs.screenWidth > 0); - assert.ok(obs.screenshotBase64); - - const acted = await p.act(a.providerRef, { - actions: [{ type: "type", text: "hi" }], - }); - assert.equal(acted.ok, true); - - const grant = await p.takeover(a.providerRef); - assert.equal(grant.singleUse, true); - assert.ok(grant.url.includes(a.providerRef)); - assert.ok(grant.expiresAt.getTime() > Date.now()); - }); - - it("checkpoint + restore yields a new providerRef with persisted files", async () => { - const p = provider(); - const a = await p.provision({ birdId: "cp", flockId: "f" }); - await p.filesystem(a.providerRef, { - operation: "write", - path: `${DAYTONA_WORKSPACE_ROOT}/keep.txt`, - content: "persist-me", - }); - const snap = await p.checkpoint(a.providerRef); - assert.ok(snap.providerSnapshotRef); - const restored = await p.restore({ - computerId: a.providerRef, - checkpointId: "ck-1", - providerSnapshotRef: snap.providerSnapshotRef, - }); - assert.notEqual(restored.providerRef, a.providerRef); - const read = await p.filesystem(restored.providerRef, { - operation: "read", - path: `${DAYTONA_WORKSPACE_ROOT}/keep.txt`, - }); - assert.equal(read.ok, true); - assert.equal(read.data, "persist-me"); - }); - - it("hard-locks Nexus / graph flags", () => { - assert.equal(FLAGS.FLOK_NEXUS_IQ_ENABLED, false); - assert.equal(FLAGS.FLOK_GRAPH_MEMORY_ENABLED, false); - assertNexusDisabled(); - }); -}); - -describe("control-plane secret guard", () => { - it("lists DAYTONA_API_KEY among forbidden guest env keys", () => { - assert.ok(CONTROL_PLANE_SECRET_ENV_KEYS.includes("DAYTONA_API_KEY")); - }); - - it("throws if a caller tries to inject the API key into guest env", () => { - assert.throws(() => - assertNoControlPlaneSecrets({ DAYTONA_API_KEY: "leak" }), - ); - }); -}); diff --git a/tests/providers/runloop.isolation.test.ts b/tests/providers/runloop.isolation.test.ts new file mode 100644 index 0000000..1cc8757 --- /dev/null +++ b/tests/providers/runloop.isolation.test.ts @@ -0,0 +1,219 @@ +/** + * Gate C3A isolation contract. + * + * Non-live: MemoryRunloopControlPlane proves A/B isolation, distinct boot IDs, + * independent lifecycle, suspend/resume disk persist, snapshot fork — zero network. + * + * Live: skipped unless FLOK_LIVE_RUNLOOP_TEST=1. When the flag is set, + * missing RUNLOOP_API_KEY / FLOK_RUNLOOP_BLUEPRINT / API failure MUST FAIL, + * never silent skip. + */ + +import { describe, it, before } from "node:test"; +import assert from "node:assert/strict"; +import { + RunloopProvider, + MemoryRunloopControlPlane, + RUNLOOP_WORKSPACE_ROOT, +} from "../../src/lib/computers/providers/index.js"; + +function memory(): RunloopProvider { + return new RunloopProvider({ + client: new MemoryRunloopControlPlane(), + blueprint: "memory-linux-vm", + }); +} + +describe("Runloop C3A isolation (memory plane)", () => { + it("A cannot read B's workspace file and vice versa", async () => { + const p = memory(); + const a = await p.provision({ birdId: "bird-a", flockId: "flock-1" }); + const b = await p.provision({ birdId: "bird-b", flockId: "flock-1" }); + assert.notEqual(a.providerRef, b.providerRef); + + assert.equal( + ( + await p.filesystem(a.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + content: "secret-from-A", + }) + ).ok, + true, + ); + assert.equal( + ( + await p.filesystem(b.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/B.txt`, + content: "secret-from-B", + }) + ).ok, + true, + ); + + const readAFromB = await p.filesystem(b.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + }); + assert.equal(readAFromB.ok, false); + + const readBFromA = await p.filesystem(a.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/B.txt`, + }); + assert.equal(readBFromA.ok, false); + }); + + it("two machines have different boot_id values", async () => { + const p = memory(); + const a = await p.provision({ birdId: "ns-a", flockId: "flock-1" }); + const b = await p.provision({ birdId: "ns-b", flockId: "flock-1" }); + const bootA = await p.exec(a.providerRef, { + argv: ["cat", "/proc/sys/kernel/random/boot_id"], + }); + const bootB = await p.exec(b.providerRef, { + argv: ["cat", "/proc/sys/kernel/random/boot_id"], + }); + assert.equal(bootA.exitCode, 0); + assert.equal(bootB.exitCode, 0); + assert.notEqual(bootA.stdout.trim(), bootB.stdout.trim()); + }); + + it("independent lifecycle: pausing A does not pause B", async () => { + const p = memory(); + const a = await p.provision({ birdId: "life-a", flockId: "flock-1" }); + const b = await p.provision({ birdId: "life-b", flockId: "flock-1" }); + await p.pause(a.providerRef); + const sa = await p.status(a.providerRef); + const sb = await p.status(b.providerRef); + assert.equal(sa.state, "paused"); + assert.equal(sb.state, "running"); + }); + + it("suspend preserves disk files after resume", async () => { + const p = memory(); + const a = await p.provision({ birdId: "sus-a", flockId: "f" }); + await p.filesystem(a.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/persist.txt`, + content: "disk-kept", + }); + await p.pause(a.providerRef); + await p.wake(a.providerRef); + const r = await p.filesystem(a.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/persist.txt`, + }); + assert.equal(r.ok, true); + assert.equal(r.data, "disk-kept"); + }); +}); + +const LIVE = process.env.FLOK_LIVE_RUNLOOP_TEST === "1"; + +describe("Runloop C3A live Devboxes", { skip: !LIVE }, () => { + before(() => { + if (!process.env.RUNLOOP_API_KEY) { + throw new Error( + "FLOK_LIVE_RUNLOOP_TEST=1 but RUNLOOP_API_KEY is missing (must FAIL, not skip)", + ); + } + if (!process.env.FLOK_RUNLOOP_BLUEPRINT) { + throw new Error( + "FLOK_LIVE_RUNLOOP_TEST=1 but FLOK_RUNLOOP_BLUEPRINT is missing (must FAIL, not skip)", + ); + } + }); + + it("two live Devboxes prove isolation, suspend, snapshot fork, then shutdown", async () => { + const p = await RunloopProvider.fromEnv(); + const refs: string[] = []; + try { + const a = await p.provision({ birdId: "live-a", flockId: "flock-live" }); + const b = await p.provision({ birdId: "live-b", flockId: "flock-live" }); + refs.push(a.providerRef, b.providerRef); + assert.notEqual(a.providerRef, b.providerRef); + + assert.equal( + ( + await p.filesystem(a.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + content: "secret-from-A", + }) + ).ok, + true, + ); + const leaked = await p.filesystem(b.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + }); + assert.equal(leaked.ok, false); + + assert.equal( + ( + await p.filesystem(b.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/B.txt`, + content: "from-B", + }) + ).ok, + true, + ); + + const bootA = await p.exec(a.providerRef, { + argv: ["cat", "/proc/sys/kernel/random/boot_id"], + }); + const bootB = await p.exec(b.providerRef, { + argv: ["cat", "/proc/sys/kernel/random/boot_id"], + }); + assert.equal(bootA.exitCode, 0, bootA.stderr); + assert.equal(bootB.exitCode, 0, bootB.stderr); + assert.notEqual(bootA.stdout.trim(), bootB.stdout.trim()); + + await p.pause(a.providerRef); + const sa = await p.status(a.providerRef); + const sb = await p.status(b.providerRef); + assert.equal(sa.state, "paused"); + assert.equal(sb.state, "running"); + + await p.wake(a.providerRef); + const persisted = await p.filesystem(a.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + }); + assert.equal(persisted.ok, true); + assert.equal(persisted.data, "secret-from-A"); + + const ck = await p.checkpoint(a.providerRef); + const c = await p.restore({ + computerId: a.providerRef, + checkpointId: ck.providerSnapshotRef, + providerSnapshotRef: ck.providerSnapshotRef, + }); + refs.push(c.providerRef); + const fromSnap = await p.filesystem(c.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + }); + assert.equal(fromSnap.ok, true); + assert.equal(fromSnap.data, "secret-from-A"); + + await p.filesystem(c.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + content: "mutated-C", + }); + const aStill = await p.filesystem(a.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/A.txt`, + }); + assert.equal(aStill.data, "secret-from-A"); + } finally { + for (const ref of [...refs].reverse()) { + await p.destroy(ref).catch(() => undefined); + } + } + }); +}); diff --git a/tests/providers/runloop.test.ts b/tests/providers/runloop.test.ts new file mode 100644 index 0000000..5f0f4ad --- /dev/null +++ b/tests/providers/runloop.test.ts @@ -0,0 +1,237 @@ +/** + * RunloopProvider — non-live tests. Zero network / zero Runloop API. + * Injected MemoryRunloopControlPlane only. + */ + +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { + ComputerService, + RunloopProvider, + RunloopBlueprintRequired, + ComputerUseNotAvailable, + MemoryRunloopControlPlane, + FLAGS, + assertNexusDisabled, + ProviderUnavailable, +} from "../../src/lib/computers/index.js"; +import { + assertNoControlPlaneSecrets, + CONTROL_PLANE_SECRET_ENV_KEYS, + RUNLOOP_WORKSPACE_ROOT, +} from "../../src/lib/computers/providers/index.js"; + +function provider(): RunloopProvider { + return new RunloopProvider({ + client: new MemoryRunloopControlPlane(), + blueprint: "memory-linux-vm", + }); +} + +describe("RunloopProvider (no network)", () => { + it("reports provider name runloop", () => { + assert.equal(provider().name, "runloop"); + }); + + it("advertises honest C3A capabilities", () => { + const caps = provider().capabilities(); + assert.equal(caps.linuxVm, true); + assert.equal(caps.windowsVm, false); + assert.equal(caps.pauseMemory, false); + assert.equal(caps.snapshots, true); + assert.equal(caps.forks, true); + assert.equal(caps.customImages, true); + assert.equal(caps.networkPolicy, true); + assert.equal(caps.computerUse, false); + assert.equal(caps.vnc, false); + assert.equal(caps.accessibility, false); + }); + + it("hard-locks Nexus / graph flags", () => { + assert.equal(FLAGS.FLOK_NEXUS_IQ_ENABLED, false); + assert.equal(FLAGS.FLOK_GRAPH_MEMORY_ENABLED, false); + assertNexusDisabled(); + }); + + it("rejects construction without RUNLOOP_API_KEY when no client is injected", () => { + const prevKey = process.env.RUNLOOP_API_KEY; + const prevBp = process.env.FLOK_RUNLOOP_BLUEPRINT; + delete process.env.RUNLOOP_API_KEY; + delete process.env.FLOK_RUNLOOP_BLUEPRINT; + try { + assert.throws( + () => new RunloopProvider(), + (err: unknown) => + err instanceof ProviderUnavailable && err.code === "PROVIDER_UNAVAILABLE", + ); + } finally { + if (prevKey === undefined) delete process.env.RUNLOOP_API_KEY; + else process.env.RUNLOOP_API_KEY = prevKey; + if (prevBp === undefined) delete process.env.FLOK_RUNLOOP_BLUEPRINT; + else process.env.FLOK_RUNLOOP_BLUEPRINT = prevBp; + } + }); + + it("rejects missing blueprint when key is present but client is not and blueprint empty", () => { + const prevKey = process.env.RUNLOOP_API_KEY; + const prevBp = process.env.FLOK_RUNLOOP_BLUEPRINT; + process.env.RUNLOOP_API_KEY = "test-key-not-for-guest"; + process.env.FLOK_RUNLOOP_BLUEPRINT = ""; + try { + assert.throws( + () => new RunloopProvider({ blueprint: "" }), + (err: unknown) => + err instanceof RunloopBlueprintRequired || + err instanceof ProviderUnavailable, + ); + } finally { + if (prevKey === undefined) delete process.env.RUNLOOP_API_KEY; + else process.env.RUNLOOP_API_KEY = prevKey; + if (prevBp === undefined) delete process.env.FLOK_RUNLOOP_BLUEPRINT; + else process.env.FLOK_RUNLOOP_BLUEPRINT = prevBp; + } + }); + + it("rejects windows osType", async () => { + await assert.rejects( + () => provider().provision({ birdId: "w", flockId: "f", osType: "windows" }), + (err: unknown) => err instanceof ProviderUnavailable, + ); + }); + + it("ComputerService records provider runloop", async () => { + const service = new ComputerService(provider()); + const c = await service.requestComputer({ birdId: "bird-1", flockId: "flock-1" }); + assert.equal(c.provider, "runloop"); + assert.ok(c.providerRef); + }); + + it("rejects shell mode", async () => { + const p = provider(); + const a = await p.provision({ birdId: "sh", flockId: "f" }); + const r = await p.exec(a.providerRef, { argv: ["echo", "hi"], mode: "shell" }); + assert.equal(r.exitCode, 126); + assert.match(r.stderr, /shell mode not allowed/); + }); + + it("rejects empty argv", async () => { + const p = provider(); + const a = await p.provision({ birdId: "e", flockId: "f" }); + const r = await p.exec(a.providerRef, { argv: [] }); + assert.equal(r.exitCode, 2); + }); + + it("rejects invalid env keys and control-plane secrets in exec env", async () => { + const p = provider(); + const a = await p.provision({ birdId: "env", flockId: "f" }); + const badKey = await p.exec(a.providerRef, { + argv: ["true"], + env: { "BAD-KEY": "x" }, + }); + assert.equal(badKey.exitCode, 2); + + const secret = await p.exec(a.providerRef, { + argv: ["true"], + env: { RUNLOOP_API_KEY: "must-not-enter-guest" }, + }); + assert.equal(secret.exitCode, 126); + assert.match(secret.stderr, /RUNLOOP_API_KEY/); + }); + + it("jails filesystem paths to /home/user/flok", async () => { + const p = provider(); + const a = await p.provision({ birdId: "jail", flockId: "f" }); + const escaped = await p.filesystem(a.providerRef, { + operation: "read", + path: "/etc/passwd", + }); + assert.equal(escaped.ok, false); + assert.equal(escaped.errorCode, "PATH_ESCAPE"); + + const cwd = await p.exec(a.providerRef, { + argv: ["true"], + cwd: "/etc", + }); + assert.equal(cwd.exitCode, 126); + assert.match(cwd.stderr, /PATH_ESCAPE/); + }); + + it("writes and reads under /home/user/flok", async () => { + const p = provider(); + const a = await p.provision({ birdId: "rw", flockId: "f" }); + assert.equal( + ( + await p.filesystem(a.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/hello.txt`, + content: "hello-runloop", + }) + ).ok, + true, + ); + const r = await p.filesystem(a.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/hello.txt`, + }); + assert.equal(r.ok, true); + assert.equal(r.data, "hello-runloop"); + }); + + it("observe / act / takeover are C3B not implemented", async () => { + const p = provider(); + const a = await p.provision({ birdId: "c3b", flockId: "f" }); + await assert.rejects( + () => p.observe(a.providerRef, { includeScreenshot: true }), + (err: unknown) => err instanceof ComputerUseNotAvailable, + ); + await assert.rejects( + () => p.act(a.providerRef, { actions: [] }), + (err: unknown) => err instanceof ComputerUseNotAvailable, + ); + await assert.rejects( + () => p.takeover(a.providerRef), + (err: unknown) => err instanceof ComputerUseNotAvailable, + ); + }); + + it("checkpoint + restore yields a new providerRef with persisted files", async () => { + const p = provider(); + const a = await p.provision({ birdId: "snap-a", flockId: "f" }); + await p.filesystem(a.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/kept.txt`, + content: "from-a", + }); + const ck = await p.checkpoint(a.providerRef); + assert.ok(ck.providerSnapshotRef); + const c = await p.restore({ + computerId: a.providerRef, + checkpointId: ck.providerSnapshotRef, + providerSnapshotRef: ck.providerSnapshotRef, + }); + assert.notEqual(c.providerRef, a.providerRef); + const read = await p.filesystem(c.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/kept.txt`, + }); + assert.equal(read.ok, true); + assert.equal(read.data, "from-a"); + await p.filesystem(c.providerRef, { + operation: "write", + path: `${RUNLOOP_WORKSPACE_ROOT}/kept.txt`, + content: "mutated-c", + }); + const original = await p.filesystem(a.providerRef, { + operation: "read", + path: `${RUNLOOP_WORKSPACE_ROOT}/kept.txt`, + }); + assert.equal(original.data, "from-a"); + }); + + it("CONTROL_PLANE_SECRET_ENV_KEYS lists RUNLOOP_API_KEY", () => { + assert.ok(CONTROL_PLANE_SECRET_ENV_KEYS.includes("RUNLOOP_API_KEY")); + assert.throws(() => + assertNoControlPlaneSecrets({ RUNLOOP_API_KEY: "nope" }), + ); + }); +}); diff --git a/tests/security/daytona-secrets.test.ts b/tests/security/daytona-secrets.test.ts deleted file mode 100644 index 7508aac..0000000 --- a/tests/security/daytona-secrets.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * C3 secret invariant: DAYTONA_API_KEY never enters a Node. - */ - -import { describe, it } from "node:test"; -import assert from "node:assert/strict"; -import { - DaytonaProvider, - MemoryDaytonaControlPlane, - assertNoControlPlaneSecrets, -} from "../../src/lib/computers/providers/index.js"; - -describe("Daytona secret isolation", () => { - it("provision envVars object does not contain DAYTONA_API_KEY", async () => { - const prev = process.env.DAYTONA_API_KEY; - process.env.DAYTONA_API_KEY = "control-plane-secret-value"; - try { - const p = new DaytonaProvider({ - client: new MemoryDaytonaControlPlane(), - snapshot: "memory-linux-vm", - }); - const a = await p.provision({ birdId: "sec", flockId: "f" }); - const leaked = await p.exec(a.providerRef, { - argv: ["printenv", "DAYTONA_API_KEY"], - }); - assert.equal(leaked.exitCode, 0); - assert.equal(leaked.stdout, ""); - } finally { - if (prev === undefined) delete process.env.DAYTONA_API_KEY; - else process.env.DAYTONA_API_KEY = prev; - } - }); - - it("assertNoControlPlaneSecrets rejects JWT too", () => { - assert.throws(() => - assertNoControlPlaneSecrets({ DAYTONA_JWT_TOKEN: "nope" }), - ); - }); -}); diff --git a/tests/security/runloop-secrets.test.ts b/tests/security/runloop-secrets.test.ts new file mode 100644 index 0000000..d9de2a3 --- /dev/null +++ b/tests/security/runloop-secrets.test.ts @@ -0,0 +1,46 @@ +/** + * C3A secret invariant: RUNLOOP_API_KEY never enters a Node / Devbox. + */ + +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { + RunloopProvider, + MemoryRunloopControlPlane, + assertNoControlPlaneSecrets, +} from "../../src/lib/computers/providers/index.js"; + +describe("Runloop secret isolation", () => { + it("provision envVars object does not contain RUNLOOP_API_KEY", async () => { + const prev = process.env.RUNLOOP_API_KEY; + process.env.RUNLOOP_API_KEY = "control-plane-secret-value"; + try { + const p = new RunloopProvider({ + client: new MemoryRunloopControlPlane(), + blueprint: "memory-linux-vm", + }); + const a = await p.provision({ birdId: "sec", flockId: "f" }); + const leaked = await p.exec(a.providerRef, { + argv: ["printenv", "RUNLOOP_API_KEY"], + }); + assert.equal(leaked.exitCode, 0); + assert.equal(leaked.stdout, ""); + } finally { + if (prev === undefined) delete process.env.RUNLOOP_API_KEY; + else process.env.RUNLOOP_API_KEY = prev; + } + }); + + it("assertNoControlPlaneSecrets rejects injecting the live key value", () => { + const prev = process.env.RUNLOOP_API_KEY; + process.env.RUNLOOP_API_KEY = "unique-control-plane-value-xyz"; + try { + assert.throws(() => + assertNoControlPlaneSecrets({ SOMETHING: "unique-control-plane-value-xyz" }), + ); + } finally { + if (prev === undefined) delete process.env.RUNLOOP_API_KEY; + else process.env.RUNLOOP_API_KEY = prev; + } + }); +}); From bf9e6c1252236a5b5a2ff5a75321aed469d7284d Mon Sep 17 00:00:00 2001 From: Adaptive Liquidity Labs Date: Sat, 22 Aug 2026 05:18:59 +0000 Subject: [PATCH 2/2] fix(c3): map null exec exit as timedOut; restore session identity Keep Runloop optimistic_timeout at the documented 25s cap (the proposed unbounded value is invalid). Treat a missing exitCode as timedOut/124. Recover birdId/flockId from metadata on get() and call ensureWorkspace after get/restore. Parenthesize secret-key check. --- src/lib/computers/providers/runloop-client.ts | 2 +- src/lib/computers/providers/runloop-sdk.ts | 28 +++++++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/lib/computers/providers/runloop-client.ts b/src/lib/computers/providers/runloop-client.ts index c9010b4..18a2392 100644 --- a/src/lib/computers/providers/runloop-client.ts +++ b/src/lib/computers/providers/runloop-client.ts @@ -104,7 +104,7 @@ export function assertNoControlPlaneSecrets(env: Record | undefi } } for (const [k, v] of Object.entries(env)) { - if (/api[_-]?key/i.test(k) || /runloop/i.test(k) && /key|token|secret/i.test(k)) { + if (/api[_-]?key/i.test(k) || (/runloop/i.test(k) && /key|token|secret/i.test(k))) { throw new Error(`refusing to place control-plane secret ${k} inside a Node VM`); } if (typeof v === "string" && v.length > 8 && process.env.RUNLOOP_API_KEY === v) { diff --git a/src/lib/computers/providers/runloop-sdk.ts b/src/lib/computers/providers/runloop-sdk.ts index d7f8a7c..c264de5 100644 --- a/src/lib/computers/providers/runloop-sdk.ts +++ b/src/lib/computers/providers/runloop-sdk.ts @@ -37,7 +37,7 @@ const EXECVP_PATH = `${RUNLOOP_WORKSPACE_ROOT}/.flok/execvp.py`; type SdkDevbox = { id: string; - getInfo(): Promise<{ status: string }>; + getInfo(): Promise<{ status: string; metadata?: Record }>; cmd: { exec( command: string, @@ -100,7 +100,19 @@ class SdkRunloopControlPlane implements RunloopControlPlane { async get(id: string): Promise { const box = this.sdk.devbox.fromId(id) as unknown as SdkDevbox; - return new SdkRunloopDevbox(box, "unknown", "unknown"); + let birdId = "unknown"; + let flockId = "unknown"; + try { + const info = await box.getInfo(); + const meta = info.metadata ?? {}; + if (meta["flok.bird_id"]) birdId = meta["flok.bird_id"]; + if (meta["flok.flock_id"]) flockId = meta["flok.flock_id"]; + } catch { + // metadata is diagnostic only + } + const session = new SdkRunloopDevbox(box, birdId, flockId); + await session.ensureWorkspace(); + return session; } async restore( @@ -117,7 +129,9 @@ class SdkRunloopControlPlane implements RunloopControlPlane { metadata: params.labels, launch_parameters: launch, })) as unknown as SdkDevbox; - return new SdkRunloopDevbox(created, params.birdId, params.flockId); + const session = new SdkRunloopDevbox(created, params.birdId, params.flockId); + await session.ensureWorkspace(); + return session; } } @@ -181,6 +195,8 @@ class SdkRunloopDevbox implements RunloopDevboxSession { if (req.env) payload.env = req.env; const b64 = Buffer.from(JSON.stringify(payload), "utf8").toString("base64"); const command = `python3 ${shellSingle(EXECVP_PATH)} ${b64}`; + // Runloop documents optimistic_timeout as "up to 25 seconds. Operation is not killed." + // cmd.exec still waits for completion; the cap is the first-wait hint, not FLOKS's contract. const timeoutSec = Math.max(1, Math.min(25, Math.ceil(req.timeoutMs / 1000))); try { const result = await this.box.cmd.exec(command, { @@ -188,12 +204,12 @@ class SdkRunloopDevbox implements RunloopDevboxSession { }); const stdout = await result.stdout(); const stderr = await result.stderr(); - const exitCode = result.exitCode ?? 1; + const timedOut = result.exitCode == null; return { - exitCode, + exitCode: result.exitCode ?? 124, stdout, stderr, - timedOut: false, + timedOut, }; } catch (e) { throw new ProviderUnavailable(