Skip to content

An open-source, faster Devin alternative

TypeScript

Delete the vm-do, events-ingest and billing-rollup Workers and their deploy workflows (097 step 7.2)

Mohamed Habib via Computer5cce1cc86a3a
diff --git a/.github/workflows/deploy-events-ingest.yml b/.github/workflows/deploy-events-ingest.yml
deleted file mode 100644
index 01bf23bb..00000000
--- a/.github/workflows/deploy-events-ingest.yml
+++ /dev/null
@@ -1,106 +0,0 @@
-name: Deploy Events Ingest
-
-# Mirrors deploy-api-edge.yml for the events-ingest Worker, which had no CI deploy
-# (it was deployed by hand). On merge to main touching its sources, deploy to prod.
-
-on:
- push:
- branches: [main]
- paths:
- - 'cloudflare-workers/events-ingest/**'
- - 'cloudflare-workers/shared/**'
- - '.github/workflows/deploy-events-ingest.yml'
- workflow_dispatch:
- inputs:
- target:
- description: 'Cloudflare Worker target'
- required: true
- default: 'prod'
- type: choice
- options:
- - prod
- - dev
-
-concurrency:
- group: deploy-events-ingest
- cancel-in-progress: false
-
-jobs:
- deploy:
- name: Deploy Events Ingest
- runs-on: ubuntu-latest
- permissions:
- contents: read
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-node@v4
- with:
- node-version: '22'
-
- - name: Resolve target
- id: target
- run: |
- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
- TARGET="${{ inputs.target }}"
- else
- TARGET="prod"
- fi
-
- case "$TARGET" in
- prod)
- echo "config=wrangler.prod.toml" >> "$GITHUB_OUTPUT"
- echo "name=opencomputer-events-ingest-prod" >> "$GITHUB_OUTPUT"
- ;;
- dev)
- echo "config=wrangler.toml" >> "$GITHUB_OUTPUT"
- echo "name=opensandbox-events-ingest-dev" >> "$GITHUB_OUTPUT"
- ;;
- *)
- echo "unknown target: $TARGET" >&2
- exit 1
- ;;
- esac
-
- - name: Install events-ingest dependencies
- working-directory: cloudflare-workers/events-ingest
- run: npm ci
-
- - name: Prepare CI deploy config
- working-directory: cloudflare-workers/events-ingest
- run: |
- # Strip any `routes = [...]` block — the CI token may lack zone perms,
- # and the worker is reached directly (CP forwarder / custom domain),
- # not via a route. Mirrors the api-edge deploy.
- python3 - <<'PY'
- from pathlib import Path
-
- src = Path("${{ steps.target.outputs.config }}")
- dst = Path("wrangler.ci.toml")
- lines = src.read_text().splitlines()
-
- out = []
- skipping_routes = False
- for line in lines:
- if line.startswith("routes = ["):
- skipping_routes = True
- continue
- if skipping_routes:
- if line.strip() == "]":
- skipping_routes = False
- continue
- out.append(line)
-
- dst.write_text("\n".join(out).rstrip() + "\n")
- PY
-
- - name: Deploy ${{ steps.target.outputs.name }}
- working-directory: cloudflare-workers/events-ingest
- env:
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- run: |
- if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
- echo "CLOUDFLARE_API_TOKEN GitHub secret is required for Wrangler deploys" >&2
- exit 1
- fi
- npx wrangler deploy -c wrangler.ci.toml
diff --git a/.github/workflows/deploy-vm-do.yml b/.github/workflows/deploy-vm-do.yml
deleted file mode 100644
index 9b1037ee..00000000
--- a/.github/workflows/deploy-vm-do.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-name: Deploy VM-DO Worker
-
-# The vm-do worker owns the VmSession Durable Object class (VM-DO exec data
-# plane) and is deployed ONLY when its own code changes. Keep it that way:
-# every deploy of this worker resets the DOs and severs all host-dialed VM
-# WebSockets once (hosts redial in ~1s). Do NOT add broader paths here — the
-# whole point of the split is that api-edge's deploy cadence (web/ + edge
-# merges) never touches these DOs. See cloudflare-workers/vm-do/src/index.ts.
-on:
- push:
- branches: [main]
- paths:
- - 'cloudflare-workers/vm-do/**'
- - '.github/workflows/deploy-vm-do.yml'
- workflow_dispatch:
-
-concurrency:
- group: deploy-vm-do
- cancel-in-progress: false
-
-jobs:
- deploy:
- name: Deploy VM-DO Worker
- runs-on: ubuntu-latest
- permissions:
- contents: read
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-node@v4
- with:
- node-version: '22'
-
- - name: Install dependencies
- working-directory: cloudflare-workers/vm-do
- run: npm ci
-
- - name: Typecheck
- working-directory: cloudflare-workers/vm-do
- run: npx tsc --noEmit
-
- - name: Deploy opencomputer-vmdo-prod
- working-directory: cloudflare-workers/vm-do
- env:
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- run: |
- if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
- echo "CLOUDFLARE_API_TOKEN GitHub secret is required for Wrangler deploys" >&2
- exit 1
- fi
- npx wrangler deploy -c wrangler.prod.toml
diff --git a/cloudflare-workers/billing-rollup/package.json b/cloudflare-workers/billing-rollup/package.json
deleted file mode 100644
index c0875722..00000000
--- a/cloudflare-workers/billing-rollup/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "opensandbox-billing-rollup",
- "version": "0.1.0",
- "private": true,
- "type": "module",
- "scripts": {
- "dev": "wrangler dev",
- "deploy": "wrangler deploy",
- "test": "vitest"
- },
- "devDependencies": {
- "@cloudflare/workers-types": "^4.20240924.0",
- "typescript": "^5.5.0",
- "vitest": "^2.0.0",
- "wrangler": "^4.86.0"
- }
-}
diff --git a/cloudflare-workers/billing-rollup/src/index.ts b/cloudflare-workers/billing-rollup/src/index.ts
deleted file mode 100644
index c6800be1..00000000
--- a/cloudflare-workers/billing-rollup/src/index.ts
+++ /dev/null
@@ -1,367 +0,0 @@
-// billing-rollup Worker — the global Pro-billing rollup cron.
-//
-// Runs on a schedule (see wrangler [triggers]). Each run:
-// 1. ROLL: aggregate closed buckets of D1 `usage_samples` into the
-// `usage_meter_events` outbox — one row per Stripe meter event. Pricing is
-// billing_mode-aware: unified orgs get a single flat GB-second overage
-// meter; legacy orgs get one per-tier seconds meter per memory tier. Marks
-// the consumed samples rolled_up=1.
-// 2. SEND: ship pending outbox rows to Stripe meter events, mark them 'sent'.
-// Skipped entirely in shadow mode (rows are written as 'shadow' and never
-// ship) — that's the parity-validation phase: the edge computes meter
-// events next to the cell's billable_events so they can be diffed before
-// the edge ever bills a customer.
-//
-// This is the edge analog of the cell's capacity allocator + BillableEventsSender,
-// reading edge `usage_samples` (the `sandbox_scale_events` analog) instead of
-// Postgres. Reserved capacity and disk overage are NOT handled here — they don't
-// come from per-sandbox ticks and need their own paths.
-//
-// Idempotency: outbox `id` is deterministic ("{org}:{bucket_start}:{meter}"), so
-// re-running a bucket recomputes identical ids (ON CONFLICT DO NOTHING), and the
-// same id is the Stripe meter-event Identifier (Stripe dedups within 24h). A
-// crash anywhere in roll→send→mark is safe to replay.
-
-import { legacyMeterEventName, overageMeterEventName } from "./pricing";
-
-export interface Env {
- OPENCOMPUTER_DB: D1Database;
- STRIPE_API_KEY: string;
- WORKER_ENV: string;
- // "false" => live (ship to Stripe). Anything else (incl. unset) => shadow.
- // Defaults to shadow so we never bill before the cutover is explicitly armed.
- SHADOW?: string;
- BUCKET_SECONDS?: string; // default 3600 (hourly)
- GRACE_SECONDS?: string; // default 600 — watermark so late samples settle
- // Cutover boundary (unix seconds). Buckets that START before this are
- // consumed (samples marked rolled_up) but emit NO meter events — the cell
- // bills everything before the boundary, the edge bills from it. Unset/0 =
- // bill everything (steady state). Set it to the chosen handoff time T at
- // cutover so the edge and cell hand off at a bucket boundary with no overlap
- // (double-bill) and no gap (under-bill). Also cleanly drops late stragglers
- // below T, which the cell already billed.
- BILL_FROM?: string;
-}
-
-const BUCKET_SECONDS_DEFAULT = 3600;
-const GRACE_SECONDS_DEFAULT = 600;
-const SEND_LIMIT = 500;
-
-function isShadow(env: Env): boolean {
- return env.SHADOW !== "false";
-}
-function billFromSeconds(env: Env): number {
- const t = Number.parseInt(env.BILL_FROM ?? "", 10);
- return Number.isFinite(t) && t > 0 ? t : 0;
-}
-function bucketSeconds(env: Env): number {
- return Number.parseInt(env.BUCKET_SECONDS ?? "", 10) || BUCKET_SECONDS_DEFAULT;
-}
-function graceSeconds(env: Env): number {
- const g = Number.parseInt(env.GRACE_SECONDS ?? "", 10);
- return Number.isFinite(g) && g >= 0 ? g : GRACE_SECONDS_DEFAULT;
-}
-
-interface RollupStats {
- buckets: number;
- meterRows: number;
- samplesRolled: number;
-}
-interface SendStats {
- sent: number;
- failed: number;
- skippedNoCustomer: number;
-}
-
-export default {
- async scheduled(_event: ScheduledController, env: Env, _ctx: ExecutionContext): Promise<void> {
- const nowMs = Date.now();
- const shadow = isShadow(env);
- try {
- const roll = await runRollup(env, nowMs);
- console.log(
- `billing-rollup: rolled ${roll.buckets} bucket(s) → ${roll.meterRows} meter row(s), ${roll.samplesRolled} sample(s) consumed (shadow=${shadow})`,
- );
- if (!shadow) {
- const send = await sendPending(env, nowMs);
- console.log(
- `billing-rollup: sent=${send.sent} failed=${send.failed} skippedNoCustomer=${send.skippedNoCustomer} (failed rows stay pending for retry)`,
- );
- } else {
- console.log("billing-rollup: shadow mode — outbox written as 'shadow', nothing shipped to Stripe");
- }
- } catch (err) {
- console.error("billing-rollup: run failed", err);
- throw err; // surface to CF so the failure is visible in dashboards
- }
- },
-
- // Health + dev-only manual trigger. The manual /run is handy for dev smoke
- // tests (the scheduled trigger fires hourly); it's disabled in prod so the
- // cron is the only thing that can move money.
- async fetch(req: Request, env: Env): Promise<Response> {
- const url = new URL(req.url);
- if (url.pathname === "/health") {
- return json({ ok: true, env: env.WORKER_ENV, shadow: isShadow(env) });
- }
- if (url.pathname === "/run" && req.method === "POST") {
- if (env.WORKER_ENV === "prod") return new Response("not found", { status: 404 });
- const nowMs = Date.now();
- const roll = await runRollup(env, nowMs);
- const send = isShadow(env) ? null : await sendPending(env, nowMs);
- return json({
- ok: true,
- shadow: isShadow(env),
- cfg: { billFrom: billFromSeconds(env), bucketSec: bucketSeconds(env), grace: graceSeconds(env), nowSec: Math.floor(nowMs / 1000) },
- roll,
- send,
- });
- }
- return new Response("not found", { status: 404 });
- },
-} satisfies ExportedHandler<Env>;
-
-// runRollup processes every closed bucket (bucket_end ≤ now − grace) that still
-// has unrolled samples. The grace window lets late-delivered samples (Redis
-// poll + forwarder + ingest latency, or PEL retries) land before we freeze a
-// bucket — a sample arriving after its bucket is rolled is a known, bounded
-// straggler (see runbook "acceptable drift").
-async function runRollup(env: Env, nowMs: number): Promise<RollupStats> {
- const bucketSec = bucketSeconds(env);
- const watermark = Math.floor(nowMs / 1000) - graceSeconds(env);
-
- const bucketsRes = await env.OPENCOMPUTER_DB.prepare(
- `SELECT DISTINCT ((ts / 1000) / ?1) * ?1 AS bucket_start
- FROM usage_samples
- WHERE rolled_up = 0
- AND ((ts / 1000) / ?1) * ?1 + ?1 <= ?2
- ORDER BY bucket_start`,
- )
- .bind(bucketSec, watermark)
- .all<{ bucket_start: number }>();
-
- const stats: RollupStats = { buckets: 0, meterRows: 0, samplesRolled: 0 };
- for (const row of bucketsRes.results ?? []) {
- const r = await rollBucket(env, row.bucket_start, bucketSec, nowMs);
- stats.buckets += 1;
- stats.meterRows += r.meterRows;
- stats.samplesRolled += r.samplesRolled;
- }
- return stats;
-}
-
-interface TierAgg {
- org_id: string;
- memory_mb: number;
- secs: number;
- mem_mb_secs: number;
- billing_mode: string;
-}
-
-async function rollBucket(
- env: Env,
- bucketStart: number,
- bucketSec: number,
- nowMs: number,
-): Promise<{ meterRows: number; samplesRolled: number }> {
- const bucketEnd = bucketStart + bucketSec;
- const startMs = bucketStart * 1000;
- const endMs = bucketEnd * 1000;
-
- // Cutover boundary: buckets that start before BILL_FROM belong to the cell
- // (it bills everything up to the handoff). Consume the samples (mark them
- // rolled so they don't pile up) but emit NO meter events — that's what makes
- // the edge↔cell handoff at T overlap-free (no double-bill) and gap-free, and
- // it absorbs late stragglers below T (already billed by the cell).
- const billFrom = billFromSeconds(env);
- if (billFrom > 0 && bucketStart < billFrom) {
- const res = await env.OPENCOMPUTER_DB.prepare(
- `UPDATE usage_samples SET rolled_up = 1 WHERE rolled_up = 0 AND ts >= ?1 AND ts < ?2`,
- )
- .bind(startMs, endMs)
- .run();
- return { meterRows: 0, samplesRolled: res.meta?.changes ?? 0 };
- }
-
- // Aggregate unrolled samples in the bucket by (org, tier). We carry both
- // seconds (legacy per-tier unit) and memory_mb·seconds (→ GB-seconds for
- // unified) so the per-org branch below can pick whichever the mode needs.
- const aggRes = await env.OPENCOMPUTER_DB.prepare(
- `SELECT s.org_id AS org_id,
- s.memory_mb AS memory_mb,
- SUM(s.interval_s) AS secs,
- SUM(s.memory_mb * s.interval_s) AS mem_mb_secs,
- o.billing_mode AS billing_mode
- FROM usage_samples s
- JOIN orgs o ON o.id = s.org_id
- WHERE s.rolled_up = 0 AND s.ts >= ?1 AND s.ts < ?2
- AND o.billing_provider != 'autumn'
- GROUP BY s.org_id, s.memory_mb`,
- )
- .bind(startMs, endMs)
- .all<TierAgg>();
-
- // Group tier rows by org so we can decide the meter shape per billing_mode.
- const byOrg = new Map<string, TierAgg[]>();
- for (const r of aggRes.results ?? []) {
- const list = byOrg.get(r.org_id);
- if (list) list.push(r);
- else byOrg.set(r.org_id, [r]);
- }
-
- const state = isShadow(env) ? "shadow" : "pending";
- const nowSec = Math.floor(nowMs / 1000);
- const insert = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO usage_meter_events
- (id, org_id, meter_event_name, value, billing_mode, bucket_start, bucket_end, state, created_at)
- VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9)
- ON CONFLICT(id) DO NOTHING`,
- );
-
- const stmts: D1PreparedStatement[] = [];
- for (const [orgId, tiers] of byOrg) {
- const mode = tiers[0].billing_mode;
- if (mode === "legacy") {
- // One meter event per memory tier; value = seconds at that tier.
- for (const t of tiers) {
- const meter = legacyMeterEventName(t.memory_mb);
- if (!meter) {
- console.warn(`billing-rollup: org=${orgId} unknown tier memory_mb=${t.memory_mb} — skipping (no legacy meter)`);
- continue;
- }
- if (t.secs <= 0) continue;
- stmts.push(
- insert.bind(`${orgId}:${bucketStart}:${meter}`, orgId, meter, t.secs, "legacy", bucketStart, bucketEnd, state, nowSec),
- );
- }
- } else {
- // unified — single flat overage meter; value = GB-seconds across tiers.
- let memMbSecs = 0;
- for (const t of tiers) memMbSecs += t.mem_mb_secs;
- const gbSeconds = memMbSecs / 1024;
- if (gbSeconds <= 0) continue;
- const meter = overageMeterEventName();
- stmts.push(
- insert.bind(`${orgId}:${bucketStart}:${meter}`, orgId, meter, gbSeconds, "unified", bucketStart, bucketEnd, state, nowSec),
- );
- }
- }
-
- // Outbox-first, then mark samples rolled — so a crash between the two just
- // replays: re-aggregating recomputes identical deterministic ids (deduped),
- // and the unmarked samples get picked up and marked next run. Marking first
- // would risk dropping samples whose meter rows never landed (underbilling).
- // Mark the whole bucket window rolled — including autumn rows, which are
- // excluded from the aggregation above (they bill to Autumn via the edge
- // autumn-meter cron, keyed off a per-org watermark, not rolled_up). Marking
- // them here just keeps autumn-only buckets from being rediscovered forever;
- // it never affects autumn billing.
- const markRolled = env.OPENCOMPUTER_DB.prepare(
- `UPDATE usage_samples SET rolled_up = 1 WHERE rolled_up = 0 AND ts >= ?1 AND ts < ?2`,
- ).bind(startMs, endMs);
-
- const batchRes = await env.OPENCOMPUTER_DB.batch([...stmts, markRolled]);
- const marked = batchRes[batchRes.length - 1]?.meta?.changes ?? 0;
- return { meterRows: stmts.length, samplesRolled: marked };
-}
-
-interface PendingMeterRow {
- id: string;
- org_id: string;
- meter_event_name: string;
- value: number;
- bucket_end: number;
- cust: string | null;
-}
-
-// sendPending ships pending outbox rows to Stripe. stripe_customer_id is read
-// fresh from orgs at send time (it can be set after the usage was incurred —
-// e.g. an org metered while still finishing Stripe onboarding). Rows for an org
-// with no customer yet stay pending and retry on a later run.
-async function sendPending(env: Env, nowMs: number): Promise<SendStats> {
- const res = await env.OPENCOMPUTER_DB.prepare(
- `SELECT m.id AS id, m.org_id AS org_id, m.meter_event_name AS meter_event_name,
- m.value AS value, m.bucket_end AS bucket_end, o.stripe_customer_id AS cust
- FROM usage_meter_events m
- JOIN orgs o ON o.id = m.org_id
- WHERE m.state = 'pending'
- ORDER BY m.bucket_start
- LIMIT ?1`,
- )
- .bind(SEND_LIMIT)
- .all<PendingMeterRow>();
-
- const stats: SendStats = { sent: 0, failed: 0, skippedNoCustomer: 0 };
- const nowSec = Math.floor(nowMs / 1000);
- for (const r of res.results ?? []) {
- if (!r.cust) {
- stats.skippedNoCustomer += 1;
- continue;
- }
- try {
- const identifier = await reportMeterEvent(env, r.meter_event_name, r.cust, r.value, r.id, r.bucket_end);
- await env.OPENCOMPUTER_DB.prepare(
- `UPDATE usage_meter_events SET state = 'sent', stripe_identifier = ?1, sent_at = ?2 WHERE id = ?3`,
- )
- .bind(identifier, nowSec, r.id)
- .run();
- stats.sent += 1;
- } catch (err) {
- // Leave the row 'pending' — Stripe dedups on identifier, so re-send next
- // run is safe even if Stripe actually accepted it but we failed to mark.
- console.error(`billing-rollup: send ${r.id} (meter=${r.meter_event_name} org=${r.org_id}) failed`, err);
- stats.failed += 1;
- }
- }
- return stats;
-}
-
-// reportMeterEvent POSTs one Stripe meter event. identifier = outbox id makes
-// at-least-once shipping safe (Stripe dedups within 24h). timestamp = bucket_end,
-// the moment usage was "incurred" — stable across retries. Mirrors the Go
-// StripeClient.ReportMeterEvent; value is high-precision so fractional
-// GB-seconds aren't truncated.
-async function reportMeterEvent(
- env: Env,
- eventName: string,
- customerID: string,
- value: number,
- identifier: string,
- timestampSec: number,
-): Promise<string> {
- const body = new URLSearchParams({
- event_name: eventName,
- identifier,
- timestamp: String(timestampSec),
- "payload[stripe_customer_id]": customerID,
- "payload[value]": value.toFixed(6),
- });
- const resp = await fetch("https://api.stripe.com/v1/billing/meter_events", {
- method: "POST",
- headers: {
- authorization: "Bearer " + env.STRIPE_API_KEY,
- "stripe-version": "2024-06-20",
- "content-type": "application/x-www-form-urlencoded",
- },
- body: body.toString(),
- });
- const text = await resp.text();
- let parsed: any;
- try {
- parsed = JSON.parse(text);
- } catch {
- parsed = { raw: text };
- }
- if (!resp.ok) {
- throw new Error(parsed?.error?.message ?? parsed?.raw ?? `stripe meter_events returned ${resp.status}`);
- }
- // Stripe echoes the identifier on success; fall back to ours if absent.
- return parsed?.identifier ?? identifier;
-}
-
-function json(body: unknown, status = 200): Response {
- return new Response(JSON.stringify(body), {
- status,
- headers: { "content-type": "application/json" },
- });
-}
diff --git a/cloudflare-workers/billing-rollup/src/pricing.ts b/cloudflare-workers/billing-rollup/src/pricing.ts
deleted file mode 100644
index 2d44dce9..00000000
--- a/cloudflare-workers/billing-rollup/src/pricing.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// Pricing constants mirrored from internal/billing/pricing.go and stripe.go.
-//
-// KEEP IN SYNC with the Go side — these derive Stripe meter event_names, and
-// the whole point of the rollup cron is to emit the SAME meter events the
-// cell's billing pipeline does so the edge output is parity-checkable. If the
-// Go meter keys change, change them here too.
-//
-// Meter event_name derivation (stripe.go): "sandbox_compute_" + <key>.
-
-// All Stripe meter event_names share this prefix (stripe.go:80,247-248).
-const METER_PREFIX = "sandbox_compute_";
-
-// Legacy per-tier metering. memory_mb → Stripe meter key (pricing.go TierMeterKey).
-// NEVER change these values: meters hold historical usage across price versions.
-const TIER_METER_KEY: Record<number, string> = {
- 1024: "sandbox_1gb",
- 4096: "sandbox_4gb",
- 8192: "sandbox_8gb",
- 16384: "sandbox_16gb",
- 32768: "sandbox_32gb",
- 65536: "sandbox_64gb",
-};
-
-// Unified flat overage meter (pricing.go OverageMeterKey). A single meter,
-// flat across all sandbox sizes, billed in GB-seconds.
-const OVERAGE_METER_KEY = "sandbox_overage";
-
-// legacyMeterEventName returns the Stripe meter event_name for a legacy
-// per-tier meter, or null if memory_mb isn't an allowed tier (defensive — pro
-// sandboxes always run an allowed tier, but a malformed sample shouldn't bill).
-export function legacyMeterEventName(memoryMB: number): string | null {
- const key = TIER_METER_KEY[memoryMB];
- return key ? METER_PREFIX + key : null;
-}
-
-// overageMeterEventName returns the single unified overage meter event_name.
-export function overageMeterEventName(): string {
- return METER_PREFIX + OVERAGE_METER_KEY;
-}
diff --git a/cloudflare-workers/billing-rollup/tsconfig.json b/cloudflare-workers/billing-rollup/tsconfig.json
deleted file mode 100644
index 50af4e47..00000000
--- a/cloudflare-workers/billing-rollup/tsconfig.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ES2022",
- "moduleResolution": "Bundler",
- "lib": ["ES2022"],
- "types": ["@cloudflare/workers-types"],
- "strict": true,
- "noImplicitAny": true,
- "esModuleInterop": true,
- "skipLibCheck": true,
- "forceConsistentCasingInFileNames": true,
- "isolatedModules": true,
- "noEmit": true
- },
- "include": ["src/**/*.ts"]
-}
diff --git a/cloudflare-workers/billing-rollup/wrangler.prod.toml b/cloudflare-workers/billing-rollup/wrangler.prod.toml
deleted file mode 100644
index fd4dac68..00000000
--- a/cloudflare-workers/billing-rollup/wrangler.prod.toml
+++ /dev/null
@@ -1,36 +0,0 @@
-# billing-rollup Worker — PROD on Mo's CF account.
-# Mirrors wrangler.toml (dev). Deploy: `wrangler deploy -c wrangler.prod.toml`
-#
-# Ships nothing until SHADOW is flipped to "false" — keep it shadow on prod
-# until dev parity has been clean and prod has soaked.
-# Secrets: wrangler secret put STRIPE_API_KEY --config wrangler.prod.toml
-# (Stripe LIVE-mode key on prod)
-
-name = "opencomputer-billing-rollup-prod"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-compatibility_flags = ["nodejs_compat"]
-account_id = "b8f23cb87a7a6c64040d3134643da448"
-
-[triggers]
-crons = ["*/15 * * * *"]
-
-[[d1_databases]]
-binding = "OPENCOMPUTER_DB"
-database_name = "opencomputer-prod"
-database_id = "8329e0f0-100d-445a-bf89-95c065f15dbb"
-
-[vars]
-WORKER_ENV = "prod"
-# Armed for Pro-billing cutover: the edge ships live Stripe meter events from
-# BILL_FROM onward. Buckets that START before BILL_FROM emit no meter events
-# (the cell billed those). Flip the cell half
-# (OPENSANDBOX_PRO_BILLING_AUTHORITY=edge on all CPs) just after BILL_FROM.
-SHADOW = "false"
-# 1781564400 = 2026-06-15T23:00:00Z (4:00 PM PDT).
-BILL_FROM = "1781564400"
-BUCKET_SECONDS = "3600"
-GRACE_SECONDS = "600"
-
-[[tail_consumers]]
-service = "opencomputer-log-tail-prod"
diff --git a/cloudflare-workers/billing-rollup/wrangler.toml b/cloudflare-workers/billing-rollup/wrangler.toml
deleted file mode 100644
index 9d98b4ca..00000000
--- a/cloudflare-workers/billing-rollup/wrangler.toml
+++ /dev/null
@@ -1,40 +0,0 @@
-# billing-rollup Worker — global Pro-billing rollup cron (DEV).
-#
-# Hourly: aggregates D1 `usage_samples` into the `usage_meter_events` outbox
-# (billing_mode-aware), then ships pending outbox rows to Stripe meter events.
-# In shadow mode it writes the outbox but ships nothing — that's the parity
-# phase where edge meter events are diffed against the cell's billable_events.
-#
-# Deploy: wrangler deploy
-# Secrets: wrangler secret put STRIPE_API_KEY (Stripe TEST-mode key on dev)
-# Manual: curl -X POST https://<worker>.workers.dev/run (dev only)
-
-name = "opensandbox-billing-rollup-dev"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-compatibility_flags = ["nodejs_compat"]
-account_id = "1241f114453e32d292197e3fb36210b2"
-
-# Runs every 15 min; the grace watermark (GRACE_SECONDS) decides which buckets
-# are closed enough to roll, so a frequent trigger just means low latency to
-# pick up a freshly-settled bucket — it never double-bills (deterministic ids).
-[triggers]
-crons = ["*/15 * * * *"]
-
-[[d1_databases]]
-binding = "OPENCOMPUTER_DB"
-database_name = "opencomputer-dev"
-database_id = "f9e534bf-a9f3-4b30-81cd-f9eb9087e96d"
-
-[vars]
-WORKER_ENV = "dev"
-# Shadow until parity is clean. Set to "false" to arm live Stripe metering.
-SHADOW = "true"
-BUCKET_SECONDS = "3600"
-GRACE_SECONDS = "600"
-# BILL_FROM unset = steady state (bill all closed buckets). At cutover, set it
-# to the chosen handoff boundary T (unix seconds) so the edge bills only from T
-# while the cell drains everything before it.
-
-[[tail_consumers]]
-service = "opensandbox-log-tail"
diff --git a/cloudflare-workers/events-ingest/package-lock.json b/cloudflare-workers/events-ingest/package-lock.json
deleted file mode 100644
index 5bb90dcb..00000000
--- a/cloudflare-workers/events-ingest/package-lock.json
+++ /dev/null
@@ -1,2912 +0,0 @@
-{
- "name": "opensandbox-events-ingest",
- "version": "0.1.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "opensandbox-events-ingest",
- "version": "0.1.0",
- "devDependencies": {
- "@cloudflare/workers-types": "^4.20240924.0",
- "typescript": "^5.5.0",
- "vitest": "^2.0.0",
- "wrangler": "^4.86.0"
- }
- },
- "node_modules/@cloudflare/kv-asset-handler": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.2.tgz",
- "integrity": "sha512-SIOD2DxrRRwQ+jgzlXCqoEFiKOFqaPjhnNTGKXSRLvp1HiOvapLaFG2kEr9dYQTYe8rKrd9uvDUzmAITeNyaHQ==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/@cloudflare/unenv-preset": {
- "version": "2.16.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.1.tgz",
- "integrity": "sha512-ECxObrMfyTl5bhQf/lZCXwo5G6xX9IAUo+nDMKK4SZ8m4Jvvxp52vilxyySSWh2YTZz8+HQ07qGH/2rEom1vDw==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "peerDependencies": {
- "unenv": "2.0.0-rc.24",
- "workerd": ">1.20260305.0 <2.0.0-0"
- },
- "peerDependenciesMeta": {
- "workerd": {
- "optional": true
- }
- }
- },
- "node_modules/@cloudflare/workerd-darwin-64": {
- "version": "1.20260426.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260426.1.tgz",
- "integrity": "sha512-Ch7DqsmYzSQRTY87pZpsGsFVz9VVBnLPnCBOHxKt1HH25a7oMu1w1PbPWqVmE0VerCLsj/TScX7Ob3v6E14TZw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-darwin-arm64": {
- "version": "1.20260426.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260426.1.tgz",
- "integrity": "sha512-0m0U8vaPRH25SpKjbSyRql6gmPe4rCsETRV2WW0qBnuMdKNr5Vh5/Uez80xVrfiCCRMTULGeg63Nqg2vg6CDOA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-linux-64": {
- "version": "1.20260426.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260426.1.tgz",
- "integrity": "sha512-C8LlC8uSYzg49y51n++75esxZmMp+Uz1OKHHA/4lkv6rjOTbcHQJuEwSLppjybVIXpv7A8MBhbu9iyCTvyv1mw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-linux-arm64": {
- "version": "1.20260426.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260426.1.tgz",
- "integrity": "sha512-ESVp/OIFMAqjQsa8BOP2BQQz5Vpfv6ncN6lNnIuNeOgsISQBdYk+LA60bwQHMud9tvmnSYtONp1zkZ8OQz+x6w==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-windows-64": {
- "version": "1.20260426.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260426.1.tgz",
- "integrity": "sha512-d3Xj/IjINRgNVwH+eKhpUn4xkkcEewbWXbOvBlapiirKWh5zl9m0Epi3qOqmjyRYK6MICqIGXg4qZBEt0lxudw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workers-types": {
- "version": "4.20260429.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260429.1.tgz",
- "integrity": "sha512-WtwRki7i/RnkzXkJXhI9PmrmMpftpwDocRdeBQ29aHOOSCwV7nAlh163XRzjftnQGuW9nDEnu7Om+RJMn46N+Q==",
- "dev": true,
- "license": "MIT OR Apache-2.0"
- },
- "node_modules/@cspotcode/source-map-support": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
- "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/trace-mapping": "0.3.9"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@emnapi/runtime": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
- "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
- "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
- "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
- "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
- "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
- "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
- "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
- "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
- "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
- "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
- "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
- "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
- "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
- "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
- "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
- "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
- "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
- "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/netbsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz",
- "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
- "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openbsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz",
- "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
- "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openharmony-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz",
- "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
- "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
- "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
- "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
- "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@img/colour": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
- "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@img/sharp-darwin-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",
- "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-darwin-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",
- "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",
- "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",
- "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",
- "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",
- "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-ppc64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz",
- "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-riscv64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz",
- "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-s390x": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz",
- "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz",
- "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz",
- "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linuxmusl-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz",
- "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-linux-arm": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz",
- "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-arm": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz",
- "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-ppc64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz",
- "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-ppc64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-riscv64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz",
- "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-riscv64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-s390x": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz",
- "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-s390x": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz",
- "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linuxmusl-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz",
- "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linuxmusl-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz",
- "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-wasm32": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz",
- "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==",
- "cpu": [
- "wasm32"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
- "optional": true,
- "dependencies": {
- "@emnapi/runtime": "^1.7.0"
- },
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz",
- "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-ia32": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz",
- "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz",
- "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
- "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.9",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
- "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.0.3",
- "@jridgewell/sourcemap-codec": "^1.4.10"
- }
- },
- "node_modules/@poppinss/colors": {
- "version": "4.1.6",
- "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz",
- "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "kleur": "^4.1.5"
- }
- },
- "node_modules/@poppinss/dumper": {
- "version": "0.6.5",
- "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz",
- "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/colors": "^4.1.5",
- "@sindresorhus/is": "^7.0.2",
- "supports-color": "^10.0.0"
- }
- },
- "node_modules/@poppinss/exception": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz",
- "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz",
- "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz",
- "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz",
- "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz",
- "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz",
- "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz",
- "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz",
- "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz",
- "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz",
- "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz",
- "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loong64-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz",
- "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loong64-musl": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz",
- "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz",
- "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-ppc64-musl": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz",
- "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz",
- "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz",
- "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz",
- "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz",
- "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz",
- "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-openbsd-x64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz",
- "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ]
- },
- "node_modules/@rollup/rollup-openharmony-arm64": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz",
- "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ]
- },
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz",
- "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz",
- "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-gnu": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz",
- "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz",
- "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@sindresorhus/is": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz",
- "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
- },
- "node_modules/@speed-highlight/core": {
- "version": "1.2.15",
- "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.15.tgz",
- "integrity": "sha512-BMq1K3DsElxDWawkX6eLg9+CKJrTVGCBAWVuHXVUV2u0s2711qiChLSId6ikYPfxhdYocLNt3wWwSvDiTvFabw==",
- "dev": true,
- "license": "CC0-1.0"
- },
- "node_modules/@types/estree": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
- "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@vitest/expect": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.9.tgz",
- "integrity": "sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/spy": "2.1.9",
- "@vitest/utils": "2.1.9",
- "chai": "^5.1.2",
- "tinyrainbow": "^1.2.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/mocker": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.9.tgz",
- "integrity": "sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/spy": "2.1.9",
- "estree-walker": "^3.0.3",
- "magic-string": "^0.30.12"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- },
- "peerDependencies": {
- "msw": "^2.4.9",
- "vite": "^5.0.0"
- },
- "peerDependenciesMeta": {
- "msw": {
- "optional": true
- },
- "vite": {
- "optional": true
- }
- }
- },
- "node_modules/@vitest/pretty-format": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.9.tgz",
- "integrity": "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "tinyrainbow": "^1.2.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/runner": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.9.tgz",
- "integrity": "sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/utils": "2.1.9",
- "pathe": "^1.1.2"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/snapshot": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.9.tgz",
- "integrity": "sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/pretty-format": "2.1.9",
- "magic-string": "^0.30.12",
- "pathe": "^1.1.2"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/spy": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.9.tgz",
- "integrity": "sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "tinyspy": "^3.0.2"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/utils": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.9.tgz",
- "integrity": "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/pretty-format": "2.1.9",
- "loupe": "^3.1.2",
- "tinyrainbow": "^1.2.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/assertion-error": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
- "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/blake3-wasm": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz",
- "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/cac": {
- "version": "6.7.14",
- "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
- "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/chai": {
- "version": "5.3.3",
- "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz",
- "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "assertion-error": "^2.0.1",
- "check-error": "^2.1.1",
- "deep-eql": "^5.0.1",
- "loupe": "^3.1.0",
- "pathval": "^2.0.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/check-error": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz",
- "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 16"
- }
- },
- "node_modules/cookie": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
- "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/debug": {
- "version": "4.4.3",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/deep-eql": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",
- "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/detect-libc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/error-stack-parser-es": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz",
- "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/es-module-lexer": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
- "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/esbuild": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
- "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=12"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.21.5",
- "@esbuild/android-arm": "0.21.5",
- "@esbuild/android-arm64": "0.21.5",
- "@esbuild/android-x64": "0.21.5",
- "@esbuild/darwin-arm64": "0.21.5",
- "@esbuild/darwin-x64": "0.21.5",
- "@esbuild/freebsd-arm64": "0.21.5",
- "@esbuild/freebsd-x64": "0.21.5",
- "@esbuild/linux-arm": "0.21.5",
- "@esbuild/linux-arm64": "0.21.5",
- "@esbuild/linux-ia32": "0.21.5",
- "@esbuild/linux-loong64": "0.21.5",
- "@esbuild/linux-mips64el": "0.21.5",
- "@esbuild/linux-ppc64": "0.21.5",
- "@esbuild/linux-riscv64": "0.21.5",
- "@esbuild/linux-s390x": "0.21.5",
- "@esbuild/linux-x64": "0.21.5",
- "@esbuild/netbsd-x64": "0.21.5",
- "@esbuild/openbsd-x64": "0.21.5",
- "@esbuild/sunos-x64": "0.21.5",
- "@esbuild/win32-arm64": "0.21.5",
- "@esbuild/win32-ia32": "0.21.5",
- "@esbuild/win32-x64": "0.21.5"
- }
- },
- "node_modules/estree-walker": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
- "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "^1.0.0"
- }
- },
- "node_modules/expect-type": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
- "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/kleur": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
- "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/loupe": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",
- "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/magic-string": {
- "version": "0.30.21",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
- "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/sourcemap-codec": "^1.5.5"
- }
- },
- "node_modules/miniflare": {
- "version": "4.20260426.0",
- "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20260426.0.tgz",
- "integrity": "sha512-KM+v76d04qT+NsPfVKVQEgnnuLNE3uzCCl2QKMTJ5OXor5JbBm1vpkQwQ+l7o5ELCrZ74RnyKhJKLiJyUA39Tw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@cspotcode/source-map-support": "0.8.1",
- "sharp": "^0.34.5",
- "undici": "7.24.8",
- "workerd": "1.20260426.1",
- "ws": "8.18.0",
- "youch": "4.1.0-beta.10"
- },
- "bin": {
- "miniflare": "bootstrap.js"
- },
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "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==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/nanoid": {
- "version": "3.3.11",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
- "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/path-to-regexp": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
- "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pathe": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
- "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pathval": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz",
- "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 14.16"
- }
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/postcss": {
- "version": "8.5.12",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz",
- "integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/postcss"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "nanoid": "^3.3.11",
- "picocolors": "^1.1.1",
- "source-map-js": "^1.2.1"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/rollup": {
- "version": "4.60.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz",
- "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "1.0.8"
- },
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
- },
- "optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.60.2",
- "@rollup/rollup-android-arm64": "4.60.2",
- "@rollup/rollup-darwin-arm64": "4.60.2",
- "@rollup/rollup-darwin-x64": "4.60.2",
- "@rollup/rollup-freebsd-arm64": "4.60.2",
- "@rollup/rollup-freebsd-x64": "4.60.2",
- "@rollup/rollup-linux-arm-gnueabihf": "4.60.2",
- "@rollup/rollup-linux-arm-musleabihf": "4.60.2",
- "@rollup/rollup-linux-arm64-gnu": "4.60.2",
- "@rollup/rollup-linux-arm64-musl": "4.60.2",
- "@rollup/rollup-linux-loong64-gnu": "4.60.2",
- "@rollup/rollup-linux-loong64-musl": "4.60.2",
- "@rollup/rollup-linux-ppc64-gnu": "4.60.2",
- "@rollup/rollup-linux-ppc64-musl": "4.60.2",
- "@rollup/rollup-linux-riscv64-gnu": "4.60.2",
- "@rollup/rollup-linux-riscv64-musl": "4.60.2",
- "@rollup/rollup-linux-s390x-gnu": "4.60.2",
- "@rollup/rollup-linux-x64-gnu": "4.60.2",
- "@rollup/rollup-linux-x64-musl": "4.60.2",
- "@rollup/rollup-openbsd-x64": "4.60.2",
- "@rollup/rollup-openharmony-arm64": "4.60.2",
- "@rollup/rollup-win32-arm64-msvc": "4.60.2",
- "@rollup/rollup-win32-ia32-msvc": "4.60.2",
- "@rollup/rollup-win32-x64-gnu": "4.60.2",
- "@rollup/rollup-win32-x64-msvc": "4.60.2",
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/semver": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
- "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/sharp": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",
- "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",
- "dev": true,
- "hasInstallScript": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@img/colour": "^1.0.0",
- "detect-libc": "^2.1.2",
- "semver": "^7.7.3"
- },
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-darwin-arm64": "0.34.5",
- "@img/sharp-darwin-x64": "0.34.5",
- "@img/sharp-libvips-darwin-arm64": "1.2.4",
- "@img/sharp-libvips-darwin-x64": "1.2.4",
- "@img/sharp-libvips-linux-arm": "1.2.4",
- "@img/sharp-libvips-linux-arm64": "1.2.4",
- "@img/sharp-libvips-linux-ppc64": "1.2.4",
- "@img/sharp-libvips-linux-riscv64": "1.2.4",
- "@img/sharp-libvips-linux-s390x": "1.2.4",
- "@img/sharp-libvips-linux-x64": "1.2.4",
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
- "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
- "@img/sharp-linux-arm": "0.34.5",
- "@img/sharp-linux-arm64": "0.34.5",
- "@img/sharp-linux-ppc64": "0.34.5",
- "@img/sharp-linux-riscv64": "0.34.5",
- "@img/sharp-linux-s390x": "0.34.5",
- "@img/sharp-linux-x64": "0.34.5",
- "@img/sharp-linuxmusl-arm64": "0.34.5",
- "@img/sharp-linuxmusl-x64": "0.34.5",
- "@img/sharp-wasm32": "0.34.5",
- "@img/sharp-win32-arm64": "0.34.5",
- "@img/sharp-win32-ia32": "0.34.5",
- "@img/sharp-win32-x64": "0.34.5"
- }
- },
- "node_modules/siginfo": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
- "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/source-map-js": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stackback": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
- "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/std-env": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz",
- "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/supports-color": {
- "version": "10.2.2",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",
- "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
- }
- },
- "node_modules/tinybench": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
- "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tinyexec": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz",
- "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tinypool": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz",
- "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- }
- },
- "node_modules/tinyrainbow": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz",
- "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/tinyspy": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz",
- "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=14.0.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==",
- "dev": true,
- "license": "0BSD",
- "optional": true
- },
- "node_modules/typescript": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/undici": {
- "version": "7.24.8",
- "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.8.tgz",
- "integrity": "sha512-6KQ/+QxK49Z/p3HO6E5ZCZWNnCasyZLa5ExaVYyvPxUwKtbCPMKELJOqh7EqOle0t9cH/7d2TaaTRRa6Nhs4YQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=20.18.1"
- }
- },
- "node_modules/unenv": {
- "version": "2.0.0-rc.24",
- "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz",
- "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pathe": "^2.0.3"
- }
- },
- "node_modules/unenv/node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/vite": {
- "version": "5.4.21",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz",
- "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "esbuild": "^0.21.3",
- "postcss": "^8.4.43",
- "rollup": "^4.20.0"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.3"
- },
- "peerDependencies": {
- "@types/node": "^18.0.0 || >=20.0.0",
- "less": "*",
- "lightningcss": "^1.21.0",
- "sass": "*",
- "sass-embedded": "*",
- "stylus": "*",
- "sugarss": "*",
- "terser": "^5.4.0"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- }
- }
- },
- "node_modules/vite-node": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.9.tgz",
- "integrity": "sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cac": "^6.7.14",
- "debug": "^4.3.7",
- "es-module-lexer": "^1.5.4",
- "pathe": "^1.1.2",
- "vite": "^5.0.0"
- },
- "bin": {
- "vite-node": "vite-node.mjs"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/vitest": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.9.tgz",
- "integrity": "sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/expect": "2.1.9",
- "@vitest/mocker": "2.1.9",
- "@vitest/pretty-format": "^2.1.9",
- "@vitest/runner": "2.1.9",
- "@vitest/snapshot": "2.1.9",
- "@vitest/spy": "2.1.9",
- "@vitest/utils": "2.1.9",
- "chai": "^5.1.2",
- "debug": "^4.3.7",
- "expect-type": "^1.1.0",
- "magic-string": "^0.30.12",
- "pathe": "^1.1.2",
- "std-env": "^3.8.0",
- "tinybench": "^2.9.0",
- "tinyexec": "^0.3.1",
- "tinypool": "^1.0.1",
- "tinyrainbow": "^1.2.0",
- "vite": "^5.0.0",
- "vite-node": "2.1.9",
- "why-is-node-running": "^2.3.0"
- },
- "bin": {
- "vitest": "vitest.mjs"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- },
- "peerDependencies": {
- "@edge-runtime/vm": "*",
- "@types/node": "^18.0.0 || >=20.0.0",
- "@vitest/browser": "2.1.9",
- "@vitest/ui": "2.1.9",
- "happy-dom": "*",
- "jsdom": "*"
- },
- "peerDependenciesMeta": {
- "@edge-runtime/vm": {
- "optional": true
- },
- "@types/node": {
- "optional": true
- },
- "@vitest/browser": {
- "optional": true
- },
- "@vitest/ui": {
- "optional": true
- },
- "happy-dom": {
- "optional": true
- },
- "jsdom": {
- "optional": true
- }
- }
- },
- "node_modules/why-is-node-running": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
- "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "siginfo": "^2.0.0",
- "stackback": "0.0.2"
- },
- "bin": {
- "why-is-node-running": "cli.js"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/workerd": {
- "version": "1.20260426.1",
- "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260426.1.tgz",
- "integrity": "sha512-ELvGgN8c9oo+E6EPyecxk1TEf6/eAK4TxxQTW5mQ87C7jbjCzhMbg0P2ije49UBHV0dkBYPJcJvcklUltipl2A==",
- "dev": true,
- "hasInstallScript": true,
- "license": "Apache-2.0",
- "bin": {
- "workerd": "bin/workerd"
- },
- "engines": {
- "node": ">=16"
- },
- "optionalDependencies": {
- "@cloudflare/workerd-darwin-64": "1.20260426.1",
- "@cloudflare/workerd-darwin-arm64": "1.20260426.1",
- "@cloudflare/workerd-linux-64": "1.20260426.1",
- "@cloudflare/workerd-linux-arm64": "1.20260426.1",
- "@cloudflare/workerd-windows-64": "1.20260426.1"
- }
- },
- "node_modules/wrangler": {
- "version": "4.86.0",
- "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.86.0.tgz",
- "integrity": "sha512-9aa/gbF/HiUeeUEwyQpW5LDPBEzyt7iaE6xHwm0vk2Ly8A6J+jh03pzchqVnCCWR832mNyA28MD8oAYt0Kfvlw==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "dependencies": {
- "@cloudflare/kv-asset-handler": "0.4.2",
- "@cloudflare/unenv-preset": "2.16.1",
- "blake3-wasm": "2.1.5",
- "esbuild": "0.27.3",
- "miniflare": "4.20260426.0",
- "path-to-regexp": "6.3.0",
- "unenv": "2.0.0-rc.24",
- "workerd": "1.20260426.1"
- },
- "bin": {
- "wrangler": "bin/wrangler.js",
- "wrangler2": "bin/wrangler.js"
- },
- "engines": {
- "node": ">=20.3.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- },
- "peerDependencies": {
- "@cloudflare/workers-types": "^4.20260426.1"
- },
- "peerDependenciesMeta": {
- "@cloudflare/workers-types": {
- "optional": true
- }
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/aix-ppc64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz",
- "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/android-arm": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz",
- "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/android-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz",
- "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/android-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz",
- "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/darwin-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz",
- "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/darwin-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz",
- "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/freebsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz",
- "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/freebsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz",
- "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-arm": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz",
- "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz",
- "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-ia32": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz",
- "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-loong64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz",
- "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-mips64el": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz",
- "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-ppc64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz",
- "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-riscv64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz",
- "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-s390x": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz",
- "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/linux-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz",
- "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/netbsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz",
- "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/openbsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz",
- "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/sunos-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz",
- "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/win32-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz",
- "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/win32-ia32": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz",
- "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/@esbuild/win32-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz",
- "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/wrangler/node_modules/esbuild": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz",
- "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.27.3",
- "@esbuild/android-arm": "0.27.3",
- "@esbuild/android-arm64": "0.27.3",
- "@esbuild/android-x64": "0.27.3",
- "@esbuild/darwin-arm64": "0.27.3",
- "@esbuild/darwin-x64": "0.27.3",
- "@esbuild/freebsd-arm64": "0.27.3",
- "@esbuild/freebsd-x64": "0.27.3",
- "@esbuild/linux-arm": "0.27.3",
- "@esbuild/linux-arm64": "0.27.3",
- "@esbuild/linux-ia32": "0.27.3",
- "@esbuild/linux-loong64": "0.27.3",
- "@esbuild/linux-mips64el": "0.27.3",
- "@esbuild/linux-ppc64": "0.27.3",
- "@esbuild/linux-riscv64": "0.27.3",
- "@esbuild/linux-s390x": "0.27.3",
- "@esbuild/linux-x64": "0.27.3",
- "@esbuild/netbsd-arm64": "0.27.3",
- "@esbuild/netbsd-x64": "0.27.3",
- "@esbuild/openbsd-arm64": "0.27.3",
- "@esbuild/openbsd-x64": "0.27.3",
- "@esbuild/openharmony-arm64": "0.27.3",
- "@esbuild/sunos-x64": "0.27.3",
- "@esbuild/win32-arm64": "0.27.3",
- "@esbuild/win32-ia32": "0.27.3",
- "@esbuild/win32-x64": "0.27.3"
- }
- },
- "node_modules/ws": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
- "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
- "dev": true,
- "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_modules/youch": {
- "version": "4.1.0-beta.10",
- "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz",
- "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/colors": "^4.1.5",
- "@poppinss/dumper": "^0.6.4",
- "@speed-highlight/core": "^1.2.7",
- "cookie": "^1.0.2",
- "youch-core": "^0.3.3"
- }
- },
- "node_modules/youch-core": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz",
- "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/exception": "^1.2.2",
- "error-stack-parser-es": "^1.0.5"
- }
- }
- }
-}
diff --git a/cloudflare-workers/events-ingest/package.json b/cloudflare-workers/events-ingest/package.json
deleted file mode 100644
index a6252845..00000000
--- a/cloudflare-workers/events-ingest/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "opensandbox-events-ingest",
- "version": "0.1.0",
- "private": true,
- "type": "module",
- "scripts": {
- "dev": "wrangler dev",
- "deploy": "wrangler deploy",
- "test": "vitest"
- },
- "devDependencies": {
- "@cloudflare/workers-types": "^4.20240924.0",
- "typescript": "^5.5.0",
- "vitest": "^2.0.0",
- "wrangler": "^4.86.0"
- }
-}
diff --git a/cloudflare-workers/events-ingest/src/index.ts b/cloudflare-workers/events-ingest/src/index.ts
deleted file mode 100644
index e4a4a490..00000000
--- a/cloudflare-workers/events-ingest/src/index.ts
+++ /dev/null
@@ -1,789 +0,0 @@
-// events-ingest Worker — accepts HMAC-signed event batches from regional CPs.
-//
-// Pipeline:
-// 1. Verify HMAC signature + X-Timestamp freshness (±5 min)
-// 2. Parse batch (JSON array of SandboxEvent envelopes)
-// 3. D1 batch insert into events table (events.id PRIMARY KEY +
-// ON CONFLICT DO NOTHING is the dedup — KV was redundant and the
-// get() volume blew the daily KV quota, taking down ingest)
-// 4. R2 archive raw batch at raw/{cell_id}/{yyyy-mm-dd}/{batch_id}.json.gz
-// 5. DO /debit fan-out for free-tier usage_tick events (out-of-band via
-// waitUntil — never blocks the ack so CP forwarder isn't stalled by
-// cross-DO traffic latency)
-// 6. Return 202 {accepted}
-
-import { SvixClient, SvixError } from "../../shared/svix";
-
-export interface Env {
- OPENCOMPUTER_DB: D1Database;
- EVENTS_ARCHIVE: R2Bucket;
- CREDIT_ACCOUNT: DurableObjectNamespace;
- EVENT_SECRET: string;
- CF_ADMIN_SECRET: string;
- WORKER_ENV: string;
- // Svix API token (managed webhook delivery); region in the token suffix.
- // Optional: unset → webhook delivery is a no-op (dormant deployments).
- SVIX_API_TOKEN?: string;
-}
-
-interface SandboxEventEnvelope {
- id: string;
- type: string;
- sandbox_id: string;
- org_id?: string;
- plan?: string;
- worker_id: string;
- cell_id: string;
- payload: unknown;
- timestamp: string;
-}
-
-const SIGNATURE_WINDOW_SEC = 5 * 60;
-
-export default {
- async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
- const url = new URL(req.url);
-
- if (url.pathname === "/health") {
- return jsonResponse({ ok: true, env: env.WORKER_ENV });
- }
-
- if (url.pathname !== "/ingest" || req.method !== "POST") {
- return new Response("not found", { status: 404 });
- }
-
- const cellId = req.headers.get("X-Cell-Id") ?? "";
- const tsHeader = req.headers.get("X-Timestamp") ?? "";
- const sigHeader = req.headers.get("X-Signature") ?? "";
-
- if (!cellId || !tsHeader || !sigHeader) {
- return jsonResponse({ error: "missing signature headers" }, 400);
- }
-
- // Read raw body once — needed both for signature verification and parsing.
- const bodyText = await req.text();
-
- const ts = Number.parseInt(tsHeader, 10);
- if (!Number.isFinite(ts)) {
- return jsonResponse({ error: "invalid timestamp" }, 400);
- }
- const now = Math.floor(Date.now() / 1000);
- if (Math.abs(now - ts) > SIGNATURE_WINDOW_SEC) {
- return jsonResponse({ error: "timestamp out of window" }, 401);
- }
-
- const expected = await hmacHex(env.EVENT_SECRET, `${ts}.${bodyText}`);
- if (!constantTimeEqual(expected, sigHeader)) {
- return jsonResponse({ error: "signature mismatch" }, 401);
- }
-
- let envelopes: SandboxEventEnvelope[];
- try {
- const parsed = JSON.parse(bodyText);
- if (!Array.isArray(parsed)) {
- return jsonResponse({ error: "body must be a JSON array" }, 400);
- }
- envelopes = parsed as SandboxEventEnvelope[];
- } catch (err) {
- return jsonResponse({ error: "invalid JSON" }, 400);
- }
- if (envelopes.length === 0) {
- return jsonResponse({ accepted: 0 }, 202);
- }
-
- // Dedup is handled by D1: events.id is PRIMARY KEY and the INSERT uses
- // ON CONFLICT(id) DO NOTHING, so replays are silently dropped at the
- // storage layer. We used to also gate behind a KV `seen:{id}` lookup,
- // but the per-request get() spent ~95% of the workers-KV daily cap and
- // ended up failing every single ingest call. Trust D1.
- const fresh = envelopes;
-
- // D1 batch insert. 11 columns: id, cell_id, type, org_id, sandbox_id,
- // user_id (null for now — not in envelope), worker_id, ts (unix ms), payload.
- const stmt = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO events (id, cell_id, type, org_id, sandbox_id, user_id, worker_id, ts, payload)
- VALUES (?, ?, ?, ?, ?, NULL, ?, ?, ?)
- ON CONFLICT(id) DO NOTHING`,
- );
- const batches = fresh.map((e) =>
- stmt.bind(
- e.id,
- e.cell_id,
- e.type,
- e.org_id ?? null,
- e.sandbox_id ?? null,
- e.worker_id ?? null,
- Date.parse(e.timestamp) || Date.now(),
- JSON.stringify(e.payload ?? {}),
- ),
- );
-
- // cell_capacity events: UPDATE the cells row so api-edge's pickCell() sees
- // fresh placement metrics. The WHERE clause makes the write **monotonic** —
- // stale retries (e.g. an out-of-order XAUTOCLAIM replay of an older event)
- // become no-ops because capacity_updated_at can only move forward in time.
- // Without this guard a stale retry could briefly clobber the row with old
- // values, making the edge cascade-fall-through a cell that's actually fine.
- //
- // Timestamp is the *event emit time* from the CP's envelope, not events-
- // ingest processing time — otherwise the comparison wouldn't be apples-to-
- // apples across retries that arrive at different times.
- const capUpdate = env.OPENCOMPUTER_DB.prepare(
- `UPDATE cells SET healthy_workers = ?1, available_workers = ?2,
- running_sandboxes = ?3, capacity_updated_at = ?4
- WHERE cell_id = ?5
- AND (capacity_updated_at IS NULL OR capacity_updated_at < ?4)`,
- );
-
- // Sandbox lifecycle events: keep sandboxes_index in sync with cell-side
- // state changes so the dashboard's cross-cell view is accurate without a
- // separate reconciler. monotonic WHERE clause guards against out-of-order
- // delivery (XAUTOCLAIM replays, network retries) — last_event_at can only
- // move forward.
- //
- // - stopped: terminal; stamp stopped_at.
- // - hibernated: not terminal; stopped_at stays null so wake works.
- // - running: create/wake; clear stopped_at to handle the
- // hibernated → running flip after a wake.
- const lifecycleStopped = env.OPENCOMPUTER_DB.prepare(
- `UPDATE sandboxes_index
- SET status = 'stopped', stopped_at = ?1, last_event_at = ?1
- WHERE id = ?2 AND (last_event_at IS NULL OR last_event_at < ?1)`,
- );
- const lifecycleHibernated = env.OPENCOMPUTER_DB.prepare(
- `UPDATE sandboxes_index
- SET status = 'hibernated', hibernation_mode = 'deep', last_event_at = ?1
- WHERE id = ?2 AND (last_event_at IS NULL OR last_event_at < ?1)`,
- );
- // Paused tier: customer status is "hibernated", internal mode "paused".
- // last_event_at doubles as the pause time for the cap's oldest-first order.
- const lifecyclePaused = env.OPENCOMPUTER_DB.prepare(
- `UPDATE sandboxes_index
- SET status = 'hibernated', hibernation_mode = 'paused', last_event_at = ?1
- WHERE id = ?2 AND (last_event_at IS NULL OR last_event_at < ?1)`,
- );
- // INSERT ON CONFLICT, not plain UPDATE — the previous UPDATE-only shape
- // relied on the api-edge's `ctx.waitUntil` POST /api/sandboxes write to
- // have already created the row. When that waitUntil dropped (CF Worker
- // eviction mid-request, common under batch-create load), the row never
- // existed, this UPDATE no-op'd, and the sandbox stayed invisible in D1
- // until the next lifecycle event also no-op'd. The empirical fingerprint
- // was 34 of 50 still-running sandboxes for one large org being absent
- // from sandboxes_index despite having `created` events in D1 events.
- //
- // With INSERT ON CONFLICT, events-ingest is self-sufficient: every
- // `created` / `running` / `woke` event guarantees the row.
- //
- // Monotonic guard applies only to the UPDATE branch — a newer event
- // wins; an out-of-order older event is ignored. On INSERT (no conflict)
- // the row is created with this event's ts as the high-water mark.
- //
- // Binding order: ?1=tsSec, ?2=sandbox_id, ?3=org_id, ?4=cell_id, ?5=worker_id
- const lifecycleRunning = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO sandboxes_index (id, org_id, cell_id, worker_id, status, created_at, last_event_at)
- VALUES (?2, ?3, ?4, ?5, 'running', ?1, ?1)
- ON CONFLICT(id) DO UPDATE SET
- status = 'running',
- hibernation_mode = NULL,
- worker_id = COALESCE(excluded.worker_id, sandboxes_index.worker_id),
- stopped_at = NULL,
- last_event_at = ?1
- WHERE sandboxes_index.last_event_at IS NULL OR sandboxes_index.last_event_at < ?1`,
- );
- // Migration: sandbox moved to a new worker. Update worker_id alongside
- // status so proxyToCellSDK + dashboard reflect the new home immediately
- // (the "created" event on the destination worker would set status but
- // not worker_id otherwise).
- const lifecycleMigrated = env.OPENCOMPUTER_DB.prepare(
- `UPDATE sandboxes_index
- SET status = 'running', hibernation_mode = NULL, worker_id = ?1, stopped_at = NULL, last_event_at = ?2
- WHERE id = ?3 AND (last_event_at IS NULL OR last_event_at < ?2)`,
- );
- const capacityBatches = fresh
- .filter((e) => e.type === "cell_capacity")
- .map((e) => {
- const p = (e.payload ?? {}) as {
- healthy_workers?: number;
- available_workers?: number;
- running_sandboxes?: number;
- };
- const tsMs = Date.parse(e.timestamp) || Date.now();
- const tsSec = Math.floor(tsMs / 1000);
- return capUpdate.bind(
- p.healthy_workers ?? 0,
- p.available_workers ?? 0,
- p.running_sandboxes ?? 0,
- tsSec,
- e.cell_id,
- );
- });
-
- const lifecycleBatches = fresh
- .filter((e) => e.sandbox_id && (e.type === "stopped" || e.type === "hibernated" || e.type === "paused" || e.type === "running" || e.type === "woke" || e.type === "created" || e.type === "migrated"))
- .map((e) => {
- const tsSec = Math.floor((Date.parse(e.timestamp) || Date.now()) / 1000);
- if (e.type === "stopped") return lifecycleStopped.bind(tsSec, e.sandbox_id);
- // Two-tier hibernation: "paused" = RAM-resident tier (mode=paused),
- // "hibernated" = deep tier (mode=deep — now only deep hibernation emits
- // it; the pause tier emits "paused"). Both keep customer status
- // "hibernated"; the mode feeds the cross-cell paused cap.
- if (e.type === "paused") return lifecyclePaused.bind(tsSec, e.sandbox_id);
- if (e.type === "hibernated") return lifecycleHibernated.bind(tsSec, e.sandbox_id);
- if (e.type === "migrated" || e.type === "woke") {
- // worker_id moves with the sandbox. For "migrated" the scaler
- // set the new owner; for "woke" the wake handler set it (a
- // sandbox that hibernated on worker A can wake on worker B
- // after a rolling replace — without this D1 keeps showing A).
- // The CP-side publishSandboxLifecycleEvent uses the envelope's
- // worker_id field rather than payload for these events.
- return lifecycleMigrated.bind(e.worker_id ?? "", tsSec, e.sandbox_id);
- }
- // "running", "created", "woke" set the row to running. Since the
- // INSERT-ON-CONFLICT upgrade, this path also creates the row if the
- // edge's waitUntil dropped on POST /api/sandboxes — events-ingest no
- // longer depends on the edge having written first.
- return lifecycleRunning.bind(
- tsSec,
- e.sandbox_id,
- e.org_id ?? "",
- e.cell_id ?? "",
- e.worker_id ?? null,
- );
- });
-
- // Checkpoint lifecycle: keep D1 checkpoints_index in sync with cell PG
- // sandbox_checkpoints. CP emits checkpoint_ready after SetCheckpointReady,
- // checkpoint_failed after SetCheckpointFailed, and checkpoint_deleted after
- // DeleteCheckpoint. The
- // dashboard cross-cell list + the edge's spawn-from-checkpoint routing
- // both depend on this table being populated. golden_hash is write-once:
- // it pins the checkpoint to its base golden, so the upsert fills a
- // previously-empty row but never overwrites a set value — changing it
- // would rebase the delta onto the wrong base and break restore.
- const checkpointUpsert = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO checkpoints_index
- (id, sandbox_id, org_id, owner_cell_id, s3_url, size_bytes, golden_hash, workspace_size, created_at, name, kind)
- VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, NULL, ?8, ?9, ?10)
- ON CONFLICT(id) DO UPDATE SET
- sandbox_id = excluded.sandbox_id,
- owner_cell_id = excluded.owner_cell_id,
- s3_url = excluded.s3_url,
- size_bytes = excluded.size_bytes,
- status = 'ready',
- error_msg = NULL,
- failed_at = NULL,
- golden_hash = CASE WHEN checkpoints_index.golden_hash = '' THEN excluded.golden_hash ELSE checkpoints_index.golden_hash END,
- name = CASE WHEN excluded.name IS NULL OR excluded.name = '' THEN checkpoints_index.name ELSE excluded.name END,
- kind = excluded.kind`,
- );
- const checkpointFailedUpsert = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO checkpoints_index
- (id, sandbox_id, org_id, owner_cell_id, s3_url, size_bytes, golden_hash, workspace_size, created_at, name, status, error_msg, failed_at, kind)
- VALUES (?1, ?2, ?3, ?4, '', 0, '', NULL, ?5, ?6, 'failed', ?7, ?8, ?9)
- ON CONFLICT(id) DO UPDATE SET
- sandbox_id = excluded.sandbox_id,
- owner_cell_id = excluded.owner_cell_id,
- status = 'failed',
- error_msg = excluded.error_msg,
- failed_at = excluded.failed_at,
- name = CASE WHEN excluded.name IS NULL OR excluded.name = '' THEN checkpoints_index.name ELSE excluded.name END,
- kind = excluded.kind`,
- );
- const checkpointDelete = env.OPENCOMPUTER_DB.prepare(
- `DELETE FROM checkpoints_index WHERE id = ?1`,
- );
- const checkpointBatches = fresh
- .filter((e) => e.type === "checkpoint_ready" || e.type === "checkpoint_failed" || e.type === "checkpoint_deleted")
- .flatMap((e) => {
- const p = (e.payload ?? {}) as {
- checkpoint_id?: string;
- rootfs_s3_key?: string;
- workspace_s3_key?: string;
- size_bytes?: number;
- golden_hash?: string;
- name?: string;
- kind?: string;
- error_msg?: string;
- };
- if (!p.checkpoint_id) return [];
- if (e.type === "checkpoint_deleted") {
- return [checkpointDelete.bind(p.checkpoint_id)];
- }
- const tsSec = Math.floor((Date.parse(e.timestamp) || Date.now()) / 1000);
- if (e.type === "checkpoint_failed") {
- return [
- checkpointFailedUpsert.bind(
- p.checkpoint_id,
- e.sandbox_id ?? "",
- e.org_id ?? "",
- e.cell_id,
- tsSec,
- p.name ?? null,
- p.error_msg ?? "checkpoint failed",
- tsSec,
- p.kind === "disk_only" ? "disk_only" : "full",
- ),
- ];
- }
- // checkpoint_ready — use rootfs_s3_key as the canonical s3_url since
- // it's the rootfs delta the worker pulls at spawn time. The workspace
- // key is reachable from the rootfs metadata. `name` is the user-set
- // label; pre-fix the dashboard derived it from rootfs_s3_key, which
- // always ended in "rootfs.tar.zst".
- return [
- checkpointUpsert.bind(
- p.checkpoint_id,
- e.sandbox_id ?? "",
- e.org_id ?? "",
- e.cell_id,
- p.rootfs_s3_key ?? "",
- p.size_bytes ?? null,
- p.golden_hash ?? "",
- tsSec,
- p.name ?? null,
- p.kind === "disk_only" ? "disk_only" : "full",
- ),
- ];
- });
-
- // Image cache lifecycle (analogous to checkpoint lifecycle): CP emits
- // image_cache_ready after a build/snapshot lands in cell PG image_cache,
- // image_cache_deleted on removal. Keeps the dashboard's /api/dashboard/
- // images view in sync without per-cell fan-out.
- const imageUpsert = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO images_index
- (id, org_id, owner_cell_id, content_hash, checkpoint_id, name, manifest, status, created_at, last_used_at)
- VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10)
- ON CONFLICT(id) DO UPDATE SET
- content_hash = excluded.content_hash,
- checkpoint_id = excluded.checkpoint_id,
- name = excluded.name,
- manifest = excluded.manifest,
- status = excluded.status,
- last_used_at = excluded.last_used_at`,
- );
- const imageDelete = env.OPENCOMPUTER_DB.prepare(
- `DELETE FROM images_index WHERE id = ?1`,
- );
- const imageBatches = fresh
- .filter((e) => e.type === "image_cache_ready" || e.type === "image_cache_deleted")
- .flatMap((e) => {
- const p = (e.payload ?? {}) as {
- image_id?: string;
- content_hash?: string;
- checkpoint_id?: string | null;
- name?: string | null;
- manifest?: string;
- status?: string;
- created_at?: number;
- last_used_at?: number;
- };
- if (!p.image_id) return [];
- if (e.type === "image_cache_deleted") {
- return [imageDelete.bind(p.image_id)];
- }
- const ts = Math.floor((Date.parse(e.timestamp) || Date.now()) / 1000);
- return [
- imageUpsert.bind(
- p.image_id,
- e.org_id ?? "",
- e.cell_id,
- p.content_hash ?? "",
- p.checkpoint_id ?? null,
- p.name ?? null,
- p.manifest ?? "{}",
- p.status ?? "ready",
- p.created_at ?? ts,
- p.last_used_at ?? ts,
- ),
- ];
- });
-
- // Authoritative plan resolution. The envelope's `plan` is the worker's
- // cell-local-PG view, which goes stale on upgrade/downgrade — plan changes
- // globally via the edge, and no single cell has the complete picture. D1
- // orgs.plan is the source of truth and we're already on the edge with D1 in
- // hand, so resolve it here and route by it. Without this, a free→pro upgrade
- // leaks usage: stale 'free' ticks hit the DO (a no-op for a now-pro org) and
- // never get sampled. Falls back to the (stale) envelope plan ONLY if the D1
- // lookup itself fails — degraded, but no worse than trusting it outright.
- const tickOrgIds = [
- ...new Set(fresh.filter((e) => e.type === "usage_tick" && e.org_id).map((e) => e.org_id as string)),
- ];
- const planLookup = await resolvePlans(env, tickOrgIds);
- const planFor = (e: SandboxEventEnvelope): string | undefined =>
- planLookup.ok ? (e.org_id ? planLookup.byOrg.get(e.org_id)?.plan : undefined) : e.plan;
- // billing_provider has no envelope fallback; on a D1-lookup failure this is
- // undefined → treated as legacy (fail-open, matching planFor's philosophy).
- const providerFor = (e: SandboxEventEnvelope): string | undefined =>
- e.org_id ? planLookup.byOrg.get(e.org_id)?.provider : undefined;
-
- // Pro-tier usage samples: land each pro `usage_tick`'s resource dimensions
- // into usage_samples for the rollup cron (the edge analog of the cell's
- // sandbox_scale_events → billable_events path). Free orgs are debited via
- // the DO fan-out below and need no sample row. id is the event UUID so the
- // ON CONFLICT(id) DO NOTHING dedup matches the events table — the forwarder
- // is at-least-once and additive billing must not double-count on replay.
- //
- // This goes in the main batch (not waitUntil) on purpose: unlike the
- // cross-DO debit fan-out, it's a local D1 write, so it should share the
- // batch's retry-on-failure guarantee (503 → CP forwarder keeps the PEL).
- const usageSampleInsert = env.OPENCOMPUTER_DB.prepare(
- `INSERT INTO usage_samples (id, org_id, sandbox_id, memory_mb, cpu_count, interval_s, ts, cell_id)
- VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)
- ON CONFLICT(id) DO NOTHING`,
- );
- // Worker-validation guard. Edge usage is counted per-tick (one usage_sample
- // per emitted tick), so a worker that is no longer the sandbox's owner — a
- // migration source, a deregistered worker, or an abandoned `-incoming`
- // receiver — must not contribute usage. Drop a usage_tick when the emitting
- // worker is not the sandbox's current owner in sandboxes_index, or the
- // sandbox is already terminal there. (The cell side needs no equivalent: its
- // scale_events are keyed per-sandbox, not per-tick.) Lookup failure → allow
- // (degraded, never blocks billing). A sandbox with no index row yet (create
- // race) is allowed.
- const tickSandboxIds = [
- ...new Set(fresh.filter((e) => e.type === "usage_tick" && e.sandbox_id).map((e) => e.sandbox_id as string)),
- ];
- const owners = await resolveSandboxOwners(env, tickSandboxIds);
- const TERMINAL_STATUSES = new Set(["stopped", "terminated", "failed", "error"]);
- // Split by cause. These used to share one counter, which is why the bug
- // below survived: the terminal drops fire constantly and legitimately (they
- // are the ghost-tick defence doing its job), so a handful of wrongly-dropped
- // closing slices hid inside a number that always looked busy. Measured on
- // dev: 57,633 periodic drops — correct — masking 2,685 closing slices that
- // should have billed. A dropped FINAL tick is always worth looking at; a
- // dropped periodic one usually is not.
- let droppedTerminalTicks = 0;
- let droppedNonOwnerTicks = 0;
- // isFinalTick: the slice emitted BY a destroy or hibernate, as opposed to
- // one from the periodic sampler. The producer sets it (internal/worker/
- // usage_ticker.go flushSlice); absent means "not final", so an older cell
- // that does not send it behaves exactly as before.
- const isFinalTick = (e: SandboxEventEnvelope): boolean =>
- ((e.payload ?? {}) as { final?: boolean }).final === true;
- const tickFromCurrentWorker = (e: SandboxEventEnvelope): boolean => {
- if (!owners.ok) return true;
- const row = e.sandbox_id ? owners.byId.get(e.sandbox_id) : undefined;
- if (!row) return true; // no index row yet — don't drop a legit fresh create
- // A terminal sandbox must not keep accruing usage — that is the ghost-tick
- // bleed this guard exists for. But the CLOSING slice is emitted at the
- // moment the sandbox ends, so it necessarily races the very status change
- // that makes this test true, and dropping it means any sandbox that lived
- // and died inside one 20s sampling window bills nothing at all.
- //
- // Exempting it here is not a hole: the ownership test below then applies
- // to final ticks, which today they never reach because this branch returns
- // first. A closing slice from a worker that no longer owns the sandbox —
- // a migration source handing off — is still dropped, which is correct,
- // because the destination goes on billing it.
- if (TERMINAL_STATUSES.has(row.status) && !isFinalTick(e)) {
- droppedTerminalTicks++;
- return false;
- }
- if (row.worker_id && e.worker_id && row.worker_id !== e.worker_id) {
- droppedNonOwnerTicks++;
- return false;
- }
- return true;
- };
- // usage_samples is the single billing source. Pro orgs are rolled up to
- // Stripe (billing-rollup); autumn orgs are metered to Autumn by the edge
- // autumn-meter cron (api-edge) off these same rows. So both land samples —
- // free orgs are debited via the DO fan-out below and need none. The two
- // consumers don't collide: the Stripe rollup keys off rolled_up, the autumn
- // meter keys off a per-org watermark (ts), and billing-rollup excludes
- // autumn from its aggregation so a row never bills twice.
- const usageSampleBatches = fresh
- .filter(
- (e) =>
- e.type === "usage_tick" &&
- (planFor(e) === "pro" || providerFor(e) === "autumn") &&
- e.org_id &&
- e.sandbox_id &&
- tickFromCurrentWorker(e),
- )
- .map((e) => {
- const p = (e.payload ?? {}) as {
- memory_mb?: number;
- cpu_count?: number;
- interval_s?: number;
- };
- return usageSampleInsert.bind(
- e.id,
- e.org_id,
- e.sandbox_id,
- p.memory_mb ?? 0,
- p.cpu_count ?? 0,
- p.interval_s ?? 0,
- Date.parse(e.timestamp) || Date.now(),
- e.cell_id,
- );
- });
-
- if (droppedTerminalTicks > 0 || droppedNonOwnerTicks > 0) {
- console.warn(
- `events-ingest: zombie-tick guard dropped ${droppedTerminalTicks} tick(s) for terminal sandboxes ` +
- `and ${droppedNonOwnerTicks} from non-owner workers`,
- );
- }
-
- try {
- await env.OPENCOMPUTER_DB.batch([...batches, ...capacityBatches, ...lifecycleBatches, ...checkpointBatches, ...imageBatches, ...usageSampleBatches]);
- } catch (err) {
- // Database errors are retryable — return 5xx so the CP forwarder
- // leaves the batch in the PEL.
- console.error("events-ingest: D1 batch insert failed", err);
- return jsonResponse({ error: "db insert failed" }, 503);
- }
-
- // Webhook delivery — synchronous handoff to Svix BEFORE the ack. Only the CP
- // relay's lifecycle events (type "sandbox.*") are webhook-eligible; the
- // worker's internal-type events (created/stopped/…) feed sandboxes_index
- // above, NOT webhooks — disjoint namespaces, so no double-emission. Gated by
- // the org's has_webhooks flag (dormant orgs cost zero Svix calls). A
- // transient Svix error → 503 so the CP forwarder retries the batch (the
- // event id is the Idempotency-Key, so re-sends dedupe); a permanent (4xx)
- // error for one event is logged and skipped. (rearchitecture §3.1)
- const webhookEvents = fresh.filter(
- (e) => e.type.startsWith("sandbox.") && e.org_id && e.sandbox_id,
- );
- if (webhookEvents.length > 0) {
- const whOrgIds = [...new Set(webhookEvents.map((e) => e.org_id as string))];
- let hasWebhooks: Set<string>;
- try {
- hasWebhooks = await fetchHasWebhooks(env, whOrgIds);
- } catch (err) {
- console.error("events-ingest: has_webhooks lookup failed", err);
- return jsonResponse({ error: "webhook org lookup failed" }, 503);
- }
- // Only orgs with a registered destination are eligible (dormancy gate);
- // dormant orgs cost zero Svix calls.
- const eligible = webhookEvents.filter((e) => hasWebhooks.has(e.org_id as string));
- if (eligible.length > 0) {
- // Fail closed: webhook-eligible events but no Svix token on this Worker.
- // api-edge can register destinations (which sets has_webhooks) while this
- // Worker's token is unset — silently 202-ing here would be "configured
- // management, dead delivery" and lose the events. 503 instead so the CP
- // forwarder keeps the batch in its PEL and retries once the token is set.
- if (!env.SVIX_API_TOKEN) {
- console.error(
- `events-ingest: SVIX_API_TOKEN unset but ${eligible.length} webhook-eligible event(s) present — returning 503 so the forwarder retries (set the token to recover)`,
- );
- return jsonResponse({ error: "webhook delivery not configured" }, 503);
- }
- const sx = new SvixClient(env.SVIX_API_TOKEN);
- for (const e of eligible) {
- try {
- await sx.createMessage(e.org_id as string, {
- eventType: e.type,
- eventId: e.id,
- idempotencyKey: e.id,
- channels: [e.sandbox_id],
- // The delivered body = the SDK's WebhookDelivery<SandboxLifecycleEvent>
- // envelope (verifyWebhook returns this shape). Per-destination metadata
- // rides as Svix endpoint custom headers, not in the body.
- payload: {
- type: e.type,
- sandboxId: e.sandbox_id,
- eventId: e.id,
- event: {
- id: e.id,
- ts: e.timestamp,
- orgId: e.org_id,
- sandboxId: e.sandbox_id,
- type: e.type,
- data: e.payload ?? {},
- },
- },
- });
- } catch (err) {
- if (err instanceof SvixError && !err.transient) {
- console.error(`events-ingest: svix permanent error for ${e.id}: ${err.message}`);
- continue;
- }
- console.error(
- `events-ingest: svix transient error for ${e.id}: ${err instanceof Error ? err.message : err}`,
- );
- return jsonResponse({ error: "webhook handoff failed" }, 503);
- }
- }
- }
- }
-
- // R2 archive — gzipped raw batch. Best effort: archive failure does not
- // block the ack (events are already in D1, which is the durable record).
- try {
- const date = new Date().toISOString().slice(0, 10);
- const batchId = `${ts}-${crypto.randomUUID()}`;
- const key = `raw/${cellId}/${date}/${batchId}.json.gz`;
- const gzipped = await gzip(bodyText);
- await env.EVENTS_ARCHIVE.put(key, gzipped, {
- httpMetadata: { contentType: "application/gzip" },
- });
- } catch (err) {
- console.error("events-ingest: R2 archive failed (continuing)", err);
- }
-
- // DO /debit fan-out — for free-tier usage_tick events only. Each event
- // routes to a per-org DO instance; we hand off to waitUntil so cross-DO
- // latency never holds the CP forwarder's ack.
- //
- // Pro orgs are filtered here (cheap) rather than in the DO so we avoid
- // even allocating the DO stub for orgs that don't need debit accounting.
- // Plan comes from the authoritative D1 lookup (planFor), not the stale
- // envelope value — so a free→pro upgrade stops debiting immediately and a
- // pro→free downgrade resumes it, with no dependency on cell-PG freshness.
- // Autumn orgs are excluded: their credit ledger + halt live in Autumn, so a
- // legacy DO debit would touch an ignored balance and could even wrongly halt
- // them via the DO's debit→0 path.
- const debitTargets = fresh.filter(
- (e) => e.type === "usage_tick" && planFor(e) === "free" && providerFor(e) !== "autumn" && e.org_id,
- );
- if (debitTargets.length > 0) {
- ctx.waitUntil(fanoutDebits(env, debitTargets));
- }
-
- return jsonResponse({ accepted: fresh.length }, 202);
- },
-} satisfies ExportedHandler<Env>;
-
-// fanoutDebits dispatches one /debit per usage_tick event to its org's DO.
-// Per-event errors are swallowed — DO is idempotent on event_id (LRU dedup)
-// so the CP forwarder's automatic retry covers transient DO unavailability
-// without risking double-debit.
-async function fanoutDebits(env: Env, events: SandboxEventEnvelope[]): Promise<void> {
- await Promise.all(
- events.map(async (e) => {
- try {
- const id = env.CREDIT_ACCOUNT.idFromName(e.org_id!);
- const stub = env.CREDIT_ACCOUNT.get(id);
- const payload = (e.payload ?? {}) as { cost_cents?: number };
- const body = JSON.stringify({
- event_id: e.id,
- amount_cents: payload.cost_cents ?? 0,
- });
- const resp = await stub.fetch(`https://do/debit?org_id=${encodeURIComponent(e.org_id!)}`, {
- method: "POST",
- headers: { "content-type": "application/json" },
- body,
- });
- if (resp.status >= 400) {
- console.error(`events-ingest: DO /debit ${e.org_id} returned ${resp.status} (event ${e.id})`);
- }
- } catch (err) {
- console.error(`events-ingest: DO /debit ${e.org_id} threw`, err);
- }
- }),
- );
-}
-
-// resolvePlans fetches the authoritative plan for each org from D1 orgs.plan
-// (the global source of truth) in one batched query. Returns ok=false if the
-// lookup fails, signalling callers to fall back to the envelope plan rather
-// than dropping billing entirely. Orgs absent from D1 (new-org race) are simply
-// missing from the map → treated as unknown plan → skipped, the safe default.
-// resolveSandboxOwners fetches each sandbox's current worker_id + status from
-// the D1 sandboxes_index, so the usage-tick guard can reject ticks from a worker
-// that no longer owns the sandbox (migration source / zombie) or for a sandbox
-// that's already terminal. Lookup failure returns ok:false so the caller allows
-// the ticks (degraded, never blocks billing on a transient D1 error).
-async function resolveSandboxOwners(
- env: Env,
- sandboxIds: string[],
-): Promise<{ ok: boolean; byId: Map<string, { worker_id: string; status: string }> }> {
- const byId = new Map<string, { worker_id: string; status: string }>();
- if (sandboxIds.length === 0) return { ok: true, byId };
- const placeholders = sandboxIds.map((_, i) => `?${i + 1}`).join(",");
- try {
- const res = await env.OPENCOMPUTER_DB.prepare(
- `SELECT id, worker_id, status FROM sandboxes_index WHERE id IN (${placeholders})`,
- )
- .bind(...sandboxIds)
- .all<{ id: string; worker_id: string | null; status: string | null }>();
- for (const r of res.results ?? []) {
- byId.set(r.id, { worker_id: r.worker_id ?? "", status: r.status ?? "" });
- }
- return { ok: true, byId };
- } catch (err) {
- console.error("events-ingest: sandbox owner lookup failed — allowing ticks", err);
- return { ok: false, byId };
- }
-}
-
-async function resolvePlans(
- env: Env,
- orgIds: string[],
-): Promise<{ ok: boolean; byOrg: Map<string, { plan: string; provider: string }> }> {
- const byOrg = new Map<string, { plan: string; provider: string }>();
- if (orgIds.length === 0) return { ok: true, byOrg };
- const placeholders = orgIds.map((_, i) => `?${i + 1}`).join(",");
- try {
- const res = await env.OPENCOMPUTER_DB.prepare(
- `SELECT id, plan, billing_provider FROM orgs WHERE id IN (${placeholders})`,
- )
- .bind(...orgIds)
- .all<{ id: string; plan: string; billing_provider: string }>();
- for (const r of res.results ?? []) byOrg.set(r.id, { plan: r.plan, provider: r.billing_provider });
- return { ok: true, byOrg };
- } catch (err) {
- console.error("events-ingest: org plan lookup failed — falling back to envelope plan", err);
- return { ok: false, byOrg };
- }
-}
-
-// fetchHasWebhooks returns the subset of orgIds with has_webhooks=1 — the
-// dormancy gate for webhook delivery (skip Svix entirely for orgs with none).
-// Throws on D1 error so the caller can 503 (retry) rather than drop events.
-async function fetchHasWebhooks(env: Env, orgIds: string[]): Promise<Set<string>> {
- const has = new Set<string>();
- if (orgIds.length === 0) return has;
- const placeholders = orgIds.map((_, i) => `?${i + 1}`).join(",");
- const res = await env.OPENCOMPUTER_DB.prepare(
- `SELECT id FROM orgs WHERE id IN (${placeholders}) AND has_webhooks = 1`,
- )
- .bind(...orgIds)
- .all<{ id: string }>();
- for (const r of res.results ?? []) has.add(r.id);
- return has;
-}
-
-function jsonResponse(body: unknown, status = 200): Response {
- return new Response(JSON.stringify(body), {
- status,
- headers: { "content-type": "application/json" },
- });
-}
-
-async function hmacHex(secret: string, data: string): Promise<string> {
- const key = await crypto.subtle.importKey(
- "raw",
- new TextEncoder().encode(secret),
- { name: "HMAC", hash: "SHA-256" },
- false,
- ["sign"],
- );
- const sig = await crypto.subtle.sign("HMAC", key, new TextEncoder().encode(data));
- return [...new Uint8Array(sig)].map((b) => b.toString(16).padStart(2, "0")).join("");
-}
-
-function constantTimeEqual(a: string, b: string): boolean {
- if (a.length !== b.length) return false;
- let diff = 0;
- for (let i = 0; i < a.length; i++) {
- diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
- }
- return diff === 0;
-}
-
-// Returns gzipped bytes as a Uint8Array. R2 requires a known length on
-// the body — a raw pipeThrough(CompressionStream) ReadableStream has
-// unknown length and trips "Provided readable stream must have a known
-// length". Buffering into a Uint8Array gives R2 a length without a
-// streaming primitive.
-async function gzip(input: string): Promise<Uint8Array> {
- const body = new Response(input).body;
- if (!body) throw new Error("body stream null");
- const compressed = body.pipeThrough(new CompressionStream("gzip"));
- return new Uint8Array(await new Response(compressed).arrayBuffer());
-}
diff --git a/cloudflare-workers/events-ingest/tsconfig.json b/cloudflare-workers/events-ingest/tsconfig.json
deleted file mode 100644
index 5a2d92c0..00000000
--- a/cloudflare-workers/events-ingest/tsconfig.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ES2022",
- "moduleResolution": "Bundler",
- "lib": ["ES2022"],
- "types": ["@cloudflare/workers-types"],
- "strict": true,
- "noImplicitAny": true,
- "esModuleInterop": true,
- "skipLibCheck": true,
- "forceConsistentCasingInFileNames": true,
- "isolatedModules": true,
- "noEmit": true
- },
- "include": ["src/**/*.ts", "../shared/**/*.ts"]
-}
diff --git a/cloudflare-workers/events-ingest/wrangler.igor-dev.toml b/cloudflare-workers/events-ingest/wrangler.igor-dev.toml
deleted file mode 100644
index 48c78868..00000000
--- a/cloudflare-workers/events-ingest/wrangler.igor-dev.toml
+++ /dev/null
@@ -1,28 +0,0 @@
-# events-ingest — one-off `igor-dev` dev stack for the sandbox-webhooks
-# rearchitecture e2e (PR #410). Lives in **Mo's CF account b8f23cb8** (the local
-# CLOUDFLARE_API_TOKEN/OAuth can reach it). STRIPPED vs prod: no CreditAccount DO
-# binding (free-tier debit is off the webhook path; usage_tick debit would log a
-# harmless waitUntil error and never blocks the 202) and no tail_consumer (the
-# Axiom log-tail service only exists in the prod account). Deploy with:
-# wrangler deploy --config wrangler.igor-dev.toml
-# wrangler secret put EVENT_SECRET --config wrangler.igor-dev.toml
-# wrangler secret put SVIX_API_TOKEN --config wrangler.igor-dev.toml
-# See .agents/work/sandbox-webhooks-rearchitecture.md §8.
-
-name = "opencomputer-events-ingest-igor-dev"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-compatibility_flags = ["nodejs_compat"]
-account_id = "b8f23cb87a7a6c64040d3134643da448"
-
-[[d1_databases]]
-binding = "OPENCOMPUTER_DB"
-database_name = "opencomputer-igor-dev"
-database_id = "d5bbb12a-0491-4a95-9d7d-32ed8c3ce15d"
-
-[[r2_buckets]]
-binding = "EVENTS_ARCHIVE"
-bucket_name = "events-archive-igor-dev"
-
-[vars]
-WORKER_ENV = "igor-dev"
diff --git a/cloudflare-workers/events-ingest/wrangler.prod.toml b/cloudflare-workers/events-ingest/wrangler.prod.toml
deleted file mode 100644
index a3abadb4..00000000
--- a/cloudflare-workers/events-ingest/wrangler.prod.toml
+++ /dev/null
@@ -1,39 +0,0 @@
-# events-ingest Worker — PROD on opencomputer.dev zone.
-# Mirrors wrangler.toml (dev) but targets Mo's CF account.
-# Deploy: `wrangler deploy -c wrangler.prod.toml`
-#
-# Route at events.opencomputer.dev (set up as a Workers Custom Domain after
-# first deploy) or use the workers.dev URL until DNS is live. Prod CPs hit
-# this directly via OPENSANDBOX_CF_EVENT_ENDPOINT.
-
-name = "opencomputer-events-ingest-prod"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-compatibility_flags = ["nodejs_compat"]
-account_id = "b8f23cb87a7a6c64040d3134643da448"
-
-[[d1_databases]]
-binding = "OPENCOMPUTER_DB"
-database_name = "opencomputer-prod"
-database_id = "8329e0f0-100d-445a-bf89-95c065f15dbb"
-
-[[r2_buckets]]
-binding = "EVENTS_ARCHIVE"
-bucket_name = "events-archive-prod"
-
-# CreditAccount DO is owned by api-edge prod; reference it here for /debit.
-[[durable_objects.bindings]]
-name = "CREDIT_ACCOUNT"
-class_name = "CreditAccount"
-script_name = "opencomputer-edge-prod"
-
-# Secrets (set via `wrangler secret put --config wrangler.prod.toml`):
-# EVENT_SECRET — fresh prod HMAC, shared with prod CPs + api-edge prod
-# CF_ADMIN_SECRET — fresh prod HMAC, shared with api-edge prod + CPs
-
-[vars]
-WORKER_ENV = "prod"
-
-# Ship Worker logs to opencomputer-log-tail-prod → Axiom dataset cf-prod.
-[[tail_consumers]]
-service = "opencomputer-log-tail-prod"
diff --git a/cloudflare-workers/events-ingest/wrangler.toml b/cloudflare-workers/events-ingest/wrangler.toml
deleted file mode 100644
index 7696f99f..00000000
--- a/cloudflare-workers/events-ingest/wrangler.toml
+++ /dev/null
@@ -1,67 +0,0 @@
-# events-ingest Worker — receives HMAC-signed event batches from regional CPs.
-#
-# Routes:
-# POST /ingest — receives batches, inserts into D1, archives to R2,
-# fan-outs DO /debit calls for free-tier usage_tick events.
-#
-# Pipeline inside /ingest:
-# 1. Verify HMAC signature + X-Timestamp freshness (±5 min)
-# 2. Parse batch
-# 3. D1.batch([...]) insert into events table — id is PRIMARY KEY +
-# ON CONFLICT DO NOTHING is the dedup (KV path was redundant and the
-# daily get() quota blew up under load)
-# 4. Promise.all DO /debit for free-tier usage_tick events
-# 5. R2 put gzipped raw batch at raw/{cell_id}/{yyyy-mm-dd}/{batch_id}.json.gz
-# 6. Return 202 {accepted}
-
-name = "opensandbox-events-ingest-dev"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-compatibility_flags = ["nodejs_compat"]
-account_id = "1241f114453e32d292197e3fb36210b2"
-
-# Route at events.dev.opensandbox.ai or use the workers.dev URL until DNS is live.
-# The CP forwarder hits this directly via OPENSANDBOX_CF_EVENT_ENDPOINT.
-
-[[d1_databases]]
-binding = "OPENCOMPUTER_DB"
-database_name = "opencomputer-dev"
-database_id = "f9e534bf-a9f3-4b30-81cd-f9eb9087e96d"
-
-# R2 raw-batch archive. COMMENTED OUT ON DEV ONLY: R2 is not enabled on this
-# Cloudflare account, so the binding fails validation and makes the worker
-# UNDEPLOYABLE — `wrangler deploy` dies with "Please enable R2 through the
-# Cloudflare Dashboard (10136)". That is why dev drifted onto an old version.
-#
-# Safe to omit: the archive is explicitly best-effort and already wrapped in a
-# try/catch whose comment says archive failure must not block the ack, because
-# D1 is the durable record. With the binding gone the put throws a TypeError
-# that the same catch swallows — identical behaviour to the "R2 archive failed
-# (continuing)" it logs today, minus the deploy blocker.
-#
-# Restore this the moment R2 is enabled on the dev account. wrangler.prod.toml
-# keeps its binding and is untouched.
-# [[r2_buckets]]
-# binding = "EVENTS_ARCHIVE"
-# bucket_name = "events-archive-dev"
-
-# CreditAccount DO is owned by api-edge; reference it here for /debit calls.
-[[durable_objects.bindings]]
-name = "CREDIT_ACCOUNT"
-class_name = "CreditAccount"
-script_name = "opensandbox-edge-dev"
-
-# Secrets:
-# EVENT_SECRET — HMAC for /ingest
-# CF_ADMIN_SECRET — HMAC the DO uses when dispatching halt webhooks (so the
-# events-ingest Worker can sign DO-initiated callbacks too)
-# SVIX_API_TOKEN — Svix (managed webhook delivery). Set via:
-# echo "$TOKEN" | npx wrangler secret put SVIX_API_TOKEN
-# Region is encoded in the token suffix (e.g. ".us").
-
-[vars]
-WORKER_ENV = "dev"
-
-# Ship console output + exceptions to opensandbox-log-tail (Axiom dataset cf-dev).
-[[tail_consumers]]
-service = "opensandbox-log-tail"
diff --git a/cloudflare-workers/vm-do/package-lock.json b/cloudflare-workers/vm-do/package-lock.json
deleted file mode 100644
index cd21cdb2..00000000
--- a/cloudflare-workers/vm-do/package-lock.json
+++ /dev/null
@@ -1,1575 +0,0 @@
-{
- "name": "opencomputer-vm-do",
- "version": "0.1.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "opencomputer-vm-do",
- "version": "0.1.0",
- "devDependencies": {
- "@cloudflare/workers-types": "4.20260518.1",
- "typescript": "5.9.3",
- "wrangler": "4.92.0"
- }
- },
- "node_modules/@cloudflare/kv-asset-handler": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.0.tgz",
- "integrity": "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "engines": {
- "node": ">=22.0.0"
- }
- },
- "node_modules/@cloudflare/unenv-preset": {
- "version": "2.16.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.1.tgz",
- "integrity": "sha512-ECxObrMfyTl5bhQf/lZCXwo5G6xX9IAUo+nDMKK4SZ8m4Jvvxp52vilxyySSWh2YTZz8+HQ07qGH/2rEom1vDw==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "peerDependencies": {
- "unenv": "2.0.0-rc.24",
- "workerd": ">1.20260305.0 <2.0.0-0"
- },
- "peerDependenciesMeta": {
- "workerd": {
- "optional": true
- }
- }
- },
- "node_modules/@cloudflare/workerd-darwin-64": {
- "version": "1.20260515.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260515.1.tgz",
- "integrity": "sha512-Wtw44el2pNbzixvTkWdfeBDTrQwQbJRz7/JUvPKV27I0pQWXbhNJPpM8cstq/pbrU5AGcA/HjFH6yPMRTIRKig==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-darwin-arm64": {
- "version": "1.20260515.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260515.1.tgz",
- "integrity": "sha512-X8EqkZej6FfmhF9AVAQ3FhyQRr9acS4RcDunMU2YiuxKHF1IU8zzH3vY30/POaG+rUu9vGDp/VgUl49VPenHJQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-linux-64": {
- "version": "1.20260515.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260515.1.tgz",
- "integrity": "sha512-CDC89QxQ7Y7t7RG1Jd9vj/qolE1sQRkI2OSEuV5BMJi0vW/gV4OVG6xjpdK3b1OYnSWDzF7NpvlR5Yg86q7k4g==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-linux-arm64": {
- "version": "1.20260515.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260515.1.tgz",
- "integrity": "sha512-WxbW/PToYES4fvHXzsr/5qOiETQs/Z9iZ0mjSZAiEwq5cMLZemzGN0COx+uFb9OvQwzh6Pg159qPFnw3+i9FuA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-windows-64": {
- "version": "1.20260515.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260515.1.tgz",
- "integrity": "sha512-WmV/iv+MHjYsvkcMVzpM2B5/mf06UUkdpVhZrtMfV9graWjBGPYFvE/eab8748RPVGKh1Xe1vXofLzDSwc08lA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workers-types": {
- "version": "4.20260518.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260518.1.tgz",
- "integrity": "sha512-xXzGrbRi8RHRBNQFgXYkzrB4DgF0RXvmp8E1vCxoBmINpeitM/ZjVDd1CNC+N3uXjgcNjacoz4OgTa0rxgig1A==",
- "dev": true,
- "license": "MIT OR Apache-2.0"
- },
- "node_modules/@cspotcode/source-map-support": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
- "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/trace-mapping": "0.3.9"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@emnapi/runtime": {
- "version": "1.11.3",
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
- "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz",
- "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz",
- "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz",
- "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz",
- "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz",
- "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz",
- "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz",
- "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz",
- "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz",
- "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz",
- "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz",
- "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz",
- "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz",
- "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz",
- "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz",
- "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz",
- "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz",
- "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz",
- "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz",
- "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz",
- "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz",
- "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openharmony-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz",
- "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz",
- "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz",
- "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz",
- "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz",
- "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@img/colour": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
- "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@img/sharp-darwin-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",
- "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-darwin-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",
- "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",
- "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",
- "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",
- "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",
- "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-ppc64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz",
- "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-riscv64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz",
- "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-s390x": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz",
- "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz",
- "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz",
- "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linuxmusl-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz",
- "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-linux-arm": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz",
- "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-arm": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz",
- "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-ppc64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz",
- "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-ppc64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-riscv64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz",
- "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-riscv64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-s390x": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz",
- "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-s390x": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linux-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz",
- "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linuxmusl-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz",
- "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-linuxmusl-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz",
- "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-wasm32": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz",
- "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==",
- "cpu": [
- "wasm32"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
- "optional": true,
- "dependencies": {
- "@emnapi/runtime": "^1.7.0"
- },
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz",
- "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-ia32": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz",
- "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz",
- "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
- "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.9",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
- "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.0.3",
- "@jridgewell/sourcemap-codec": "^1.4.10"
- }
- },
- "node_modules/@poppinss/colors": {
- "version": "4.1.6",
- "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz",
- "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "kleur": "^4.1.5"
- }
- },
- "node_modules/@poppinss/dumper": {
- "version": "0.6.5",
- "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz",
- "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/colors": "^4.1.5",
- "@sindresorhus/is": "^7.0.2",
- "supports-color": "^10.0.0"
- }
- },
- "node_modules/@poppinss/exception": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz",
- "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@sindresorhus/is": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz",
- "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
- },
- "node_modules/@speed-highlight/core": {
- "version": "1.2.23",
- "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.23.tgz",
- "integrity": "sha512-iRoq6i6JDJP6Mt2A5JaPvzw0pgYHH6k92ij+yXiTrB7T2y9N789aWE3EHWj/5ztlJBokcCBja3iYLVdu5wgnkg==",
- "dev": true,
- "license": "CC0-1.0"
- },
- "node_modules/blake3-wasm": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz",
- "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/cookie": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
- "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/detect-libc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/error-stack-parser-es": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz",
- "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/esbuild": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz",
- "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.27.3",
- "@esbuild/android-arm": "0.27.3",
- "@esbuild/android-arm64": "0.27.3",
- "@esbuild/android-x64": "0.27.3",
- "@esbuild/darwin-arm64": "0.27.3",
- "@esbuild/darwin-x64": "0.27.3",
- "@esbuild/freebsd-arm64": "0.27.3",
- "@esbuild/freebsd-x64": "0.27.3",
- "@esbuild/linux-arm": "0.27.3",
- "@esbuild/linux-arm64": "0.27.3",
- "@esbuild/linux-ia32": "0.27.3",
- "@esbuild/linux-loong64": "0.27.3",
- "@esbuild/linux-mips64el": "0.27.3",
- "@esbuild/linux-ppc64": "0.27.3",
- "@esbuild/linux-riscv64": "0.27.3",
- "@esbuild/linux-s390x": "0.27.3",
- "@esbuild/linux-x64": "0.27.3",
- "@esbuild/netbsd-arm64": "0.27.3",
- "@esbuild/netbsd-x64": "0.27.3",
- "@esbuild/openbsd-arm64": "0.27.3",
- "@esbuild/openbsd-x64": "0.27.3",
- "@esbuild/openharmony-arm64": "0.27.3",
- "@esbuild/sunos-x64": "0.27.3",
- "@esbuild/win32-arm64": "0.27.3",
- "@esbuild/win32-ia32": "0.27.3",
- "@esbuild/win32-x64": "0.27.3"
- }
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/kleur": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
- "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/miniflare": {
- "version": "4.20260515.0",
- "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20260515.0.tgz",
- "integrity": "sha512-2j0oQWizk1Eu4Cm8tDX7Z+Nsjd0nebIj1TQcQ+Oy1QKeo0Ay9+bdn8wfLAtOj9znDCybDCUlnS1+nYvKXEdfNg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@cspotcode/source-map-support": "0.8.1",
- "sharp": "^0.34.5",
- "undici": "7.24.8",
- "workerd": "1.20260515.1",
- "ws": "8.18.0",
- "youch": "4.1.0-beta.10"
- },
- "bin": {
- "miniflare": "bootstrap.js"
- },
- "engines": {
- "node": ">=22.0.0"
- }
- },
- "node_modules/path-to-regexp": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
- "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/semver": {
- "version": "7.8.5",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/sharp": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",
- "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",
- "dev": true,
- "hasInstallScript": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@img/colour": "^1.0.0",
- "detect-libc": "^2.1.2",
- "semver": "^7.7.3"
- },
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-darwin-arm64": "0.34.5",
- "@img/sharp-darwin-x64": "0.34.5",
- "@img/sharp-libvips-darwin-arm64": "1.2.4",
- "@img/sharp-libvips-darwin-x64": "1.2.4",
- "@img/sharp-libvips-linux-arm": "1.2.4",
- "@img/sharp-libvips-linux-arm64": "1.2.4",
- "@img/sharp-libvips-linux-ppc64": "1.2.4",
- "@img/sharp-libvips-linux-riscv64": "1.2.4",
- "@img/sharp-libvips-linux-s390x": "1.2.4",
- "@img/sharp-libvips-linux-x64": "1.2.4",
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
- "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
- "@img/sharp-linux-arm": "0.34.5",
- "@img/sharp-linux-arm64": "0.34.5",
- "@img/sharp-linux-ppc64": "0.34.5",
- "@img/sharp-linux-riscv64": "0.34.5",
- "@img/sharp-linux-s390x": "0.34.5",
- "@img/sharp-linux-x64": "0.34.5",
- "@img/sharp-linuxmusl-arm64": "0.34.5",
- "@img/sharp-linuxmusl-x64": "0.34.5",
- "@img/sharp-wasm32": "0.34.5",
- "@img/sharp-win32-arm64": "0.34.5",
- "@img/sharp-win32-ia32": "0.34.5",
- "@img/sharp-win32-x64": "0.34.5"
- }
- },
- "node_modules/supports-color": {
- "version": "10.2.2",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",
- "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
- }
- },
- "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==",
- "dev": true,
- "license": "0BSD",
- "optional": true
- },
- "node_modules/typescript": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/undici": {
- "version": "7.24.8",
- "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.8.tgz",
- "integrity": "sha512-6KQ/+QxK49Z/p3HO6E5ZCZWNnCasyZLa5ExaVYyvPxUwKtbCPMKELJOqh7EqOle0t9cH/7d2TaaTRRa6Nhs4YQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=20.18.1"
- }
- },
- "node_modules/unenv": {
- "version": "2.0.0-rc.24",
- "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz",
- "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pathe": "^2.0.3"
- }
- },
- "node_modules/workerd": {
- "version": "1.20260515.1",
- "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260515.1.tgz",
- "integrity": "sha512-MjKOJLcvU45xXedQowvuiHtJTxu4WTHYQeIlF7YmjuqhiI6dImTFxWCEoRQHiskztxuVSNEmdO7/0UfDu6OMnQ==",
- "dev": true,
- "hasInstallScript": true,
- "license": "Apache-2.0",
- "bin": {
- "workerd": "bin/workerd"
- },
- "engines": {
- "node": ">=16"
- },
- "optionalDependencies": {
- "@cloudflare/workerd-darwin-64": "1.20260515.1",
- "@cloudflare/workerd-darwin-arm64": "1.20260515.1",
- "@cloudflare/workerd-linux-64": "1.20260515.1",
- "@cloudflare/workerd-linux-arm64": "1.20260515.1",
- "@cloudflare/workerd-windows-64": "1.20260515.1"
- }
- },
- "node_modules/wrangler": {
- "version": "4.92.0",
- "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.92.0.tgz",
- "integrity": "sha512-/DKpQHPxkuZbQsO9dFW2700VTD/4DSZMHjy92fO/frNoDRi/zQsFCAd2ONCV6TGqcUoXcP3D8Bo2gj/L4M0qQQ==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "dependencies": {
- "@cloudflare/kv-asset-handler": "0.5.0",
- "@cloudflare/unenv-preset": "2.16.1",
- "blake3-wasm": "2.1.5",
- "esbuild": "0.27.3",
- "miniflare": "4.20260515.0",
- "path-to-regexp": "6.3.0",
- "unenv": "2.0.0-rc.24",
- "workerd": "1.20260515.1"
- },
- "bin": {
- "wrangler": "bin/wrangler.js",
- "wrangler2": "bin/wrangler.js"
- },
- "engines": {
- "node": ">=22.0.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- },
- "peerDependencies": {
- "@cloudflare/workers-types": "^4.20260515.1"
- },
- "peerDependenciesMeta": {
- "@cloudflare/workers-types": {
- "optional": true
- }
- }
- },
- "node_modules/ws": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
- "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
- "dev": true,
- "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_modules/youch": {
- "version": "4.1.0-beta.10",
- "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz",
- "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/colors": "^4.1.5",
- "@poppinss/dumper": "^0.6.4",
- "@speed-highlight/core": "^1.2.7",
- "cookie": "^1.0.2",
- "youch-core": "^0.3.3"
- }
- },
- "node_modules/youch-core": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz",
- "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/exception": "^1.2.2",
- "error-stack-parser-es": "^1.0.5"
- }
- }
- }
-}
diff --git a/cloudflare-workers/vm-do/package.json b/cloudflare-workers/vm-do/package.json
deleted file mode 100644
index f3b97402..00000000
--- a/cloudflare-workers/vm-do/package.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "opencomputer-vm-do",
- "version": "0.1.0",
- "private": true,
- "type": "module",
- "scripts": {
- "deploy": "wrangler deploy",
- "check": "tsc --noEmit"
- },
- "devDependencies": {
- "@cloudflare/workers-types": "4.20260518.1",
- "typescript": "5.9.3",
- "wrangler": "4.92.0"
- }
-}
diff --git a/cloudflare-workers/vm-do/src/index.ts b/cloudflare-workers/vm-do/src/index.ts
deleted file mode 100644
index c39e25ab..00000000
--- a/cloudflare-workers/vm-do/src/index.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-// opencomputer-vmdo — the dedicated worker that OWNS the VmSession Durable
-// Object class (VM-DO exec data plane). Split out of api-edge on purpose:
-// api-edge redeploys on every merge that touches web/ or edge code (the
-// dashboard SPA is bundled into it as assets), and every deploy resets all
-// Durable Objects ("Durable Object reset because its code was updated"),
-// severing every host-dialed VM WebSocket — waves of exec fallbacks to the
-// tunnel for the next hour. This worker changes only when VM-DO logic changes,
-// so the sockets survive the edge's deploy cadence.
-//
-// api-edge binds the class cross-script:
-// [[durable_objects.bindings]] name = "VM_SESSIONS"
-// class_name = "VmSession" script_name = "<this worker>"
-// All traffic reaches the DO through that binding (the edge authenticates
-// /internal/vms/:id/connect and routes /exec) — this worker has no routes and
-// its own fetch handler serves nothing.
-export { VmSession } from "./vm_session";
-// MicrovmSession is the AWS MicroVM counterpart: same persistent-channel idea,
-// but it dials OUT to the box because that runtime has no host process of ours
-// to dial in. See microvm_session.ts.
-export { MicrovmSession } from "./microvm_session";
-
-export default {
- async fetch(): Promise<Response> {
- return new Response("not found", { status: 404 });
- },
-};
diff --git a/cloudflare-workers/vm-do/src/microvm_session.ts b/cloudflare-workers/vm-do/src/microvm_session.ts
deleted file mode 100644
index 3b0e4087..00000000
--- a/cloudflare-workers/vm-do/src/microvm_session.ts
+++ /dev/null
@@ -1,519 +0,0 @@
-// microvm_session.ts — one Durable Object per MicroVM sandbox, holding an open
-// agent tunnel so exec is a single round trip from the edge to the guest.
-//
-// The QEMU sibling in vm_session.ts is HOST-DIALED: a worker process we own
-// opens a WebSocket out to the DO. MicroVM has no host process — AWS runs the
-// box — so this one dials IN, to the MicroVM's public endpoint, using the same
-// port-scoped credential the control plane uses. Everything else about the
-// shape is the same: a persistent channel, request/reply over it, and a caller
-// that falls back to the control-plane path whenever the channel isn't there.
-//
-// WHY IT IS WORTH THE MACHINERY (measured on dev, Worker confirmed in IAD):
-//
-// edge → control plane (CF tunnel), round trip ~70ms
-// edge → guest agent, through this tunnel ~4-5ms
-// opening the tunnel (one-time, off the hot path) ~30-45ms
-//
-// Today every exec pays the first line plus the control-plane's own hop to the
-// box. This replaces both with the second line.
-//
-// SCOPE: one-shot Exec only. Streaming, PTY and file transfer stay on the
-// control-plane path — they are not implemented here and calls for them should
-// never be routed to this DO.
-
-import { H2Grpc, openTunnel, encodeExecRequest, decodeExecResponse, type ExecReq } from "../../shared/h2grpc";
-
-const EXEC_PATH = "/agent.SandboxAgent/Exec";
-const AGENT_TUNNEL_PATH = "/osb/agent-grpc"; // must match internal/awsvm.AgentTunnelPath
-// Bounded well below the caller's own deadline: a call that outlives it is a
-// call the caller has already given up on and re-run through the tunnel.
-const DEFAULT_TIMEOUT_MS = 10_000;
-
-// KEEPALIVE — see alarm().
-//
-// Cloudflare evicts an idle Durable Object after roughly ten seconds, and an
-// outbound WebSocket is NOT hibernatable: it dies with the object. That is what
-// made the stock-time warm dial worthless in practice — a box sits in stock for
-// minutes, the DO is long gone by the time a customer arrives, and the first
-// exec pays the full re-dial plus the AWS proxy's guest attach (measured: 632
-// -1395ms, against ~26ms on a channel that is already up).
-//
-// An alarm every 5s keeps the object inside that eviction window, and the ping
-// it sends keeps the proxy→guest attachment from going idle too. 5s rather than
-// 9s because alarm delivery has jitter and the cost of being wrong is paying the
-// whole re-dial on a customer's first exec.
-const KEEPALIVE_MS = 5_000;
-// How long an attached box is kept warm without being used. Deliberately long:
-// stock can sit for a while and the whole point is that the customer never waits
-// for a dial. Refreshed by every attach and every exec.
-const KEEPALIVE_TTL_MS = 60 * 60 * 1000;
-// Consecutive failed keepalives before we back the loop off to its slow cadence.
-// A box that has been destroyed or whose credential expired will never answer,
-// and pinging one of those every 5s forever is a per-dead-sandbox alarm loop.
-//
-// Backing OFF is not the same as giving up, and conflating the two was a real
-// outage of the warm path. This used to return without re-arming the alarm, so
-// five failures ended the loop permanently — and because PoolStock warms each
-// box exactly once, at restock (see the NOTE in its alarm()), nothing ever
-// re-attached it. The give-up was written for "destroyed box / expired
-// credential", but it also caught the far more common case it was never meant
-// to: a box attached in the seconds after manufacture, before its agent is
-// answering. Those five pings burn in 25s and the box then sits in stock cold
-// for its whole life. Measured on prod: a burst against a freshly-manufactured
-// pool served 76 of 78 execs on a dead channel (dlive=0), each paying the full
-// re-dial, against dlive=1 on 100/100 for a pool that had been stocked long
-// enough to be attached while healthy.
-//
-// So failures slow the loop down instead of ending it. warmUntil is what ends
-// it — one hour, refreshed by every attach and every exec — which bounds a truly
-// dead box to KEEPALIVE_TTL_MS of slow pings rather than forever, while leaving
-// a not-yet-ready box able to recover on its own.
-const MAX_KEEPALIVE_FAILURES = 5;
-// Cadence once a box has failed MAX_KEEPALIVE_FAILURES in a row. Long enough
-// that a dead sandbox costs ~60 pings/hour instead of 720, short enough that a
-// box which comes good is back on the fast cadence within a minute.
-const KEEPALIVE_BACKOFF_MS = 60_000;
-const PING_TIMEOUT_MS = 3_000;
-// Minimum gap between PINGs, which is NOT the same thing as the alarm cadence
-// and must not be conflated with it again.
-//
-// The alarm has two jobs with opposite constraints. Residency needs a tick
-// comfortably inside Cloudflare's ~10s idle eviction. But the agent's gRPC
-// server sets KeepaliveEnforcementPolicy{MinTime: 10s} (internal/agent/
-// server.go) — ping faster than that and Go's gRPC counts strikes, and at two
-// strikes it sends GOAWAY and drops the connection. Pinging on every 5s alarm
-// meant strikes at 5s and 10s and a GOAWAY at ~15s, forever: measured on dev
-// 2026-08-25, twelve consecutive tunnels died at 15039-15092ms to
-// "server sent GOAWAY". The keepalive was causing the disconnection it exists
-// to prevent.
-//
-// So: wake every KEEPALIVE_MS to stay resident, ping only every
-// PING_MIN_INTERVAL_MS to stay inside the agent's floor. 12s rather than 10s
-// because alarm delivery jitters and being 200ms early costs the whole channel.
-// Raising it further trades against whatever idle timeout the AWS proxy applies
-// to the guest attachment — which the h2grpc KILL log will name if we cross it.
-const PING_MIN_INTERVAL_MS = 12_000;
-// How stale the PERSISTED warmUntil may get before exec bothers to rewrite it.
-// Five minutes against a one-hour TTL: a re-created instance reading a value
-// this stale reaches the same decision, and in exchange the common exec does
-// zero storage writes. See the write site in exec().
-const WARM_PERSIST_SLACK_MS = 5 * 60 * 1000;
-// How long the WebSocket handshake and the guest's first SETTINGS frame may
-// take. Sized for a box that has SUSPENDED, not for a healthy one.
-//
-// AWS suspends a MicroVM after its configured idle window and, with auto-resume
-// on, the next inbound request through the proxy wakes it — Lambda holds that
-// request for the length of a snapshot restore. That is far longer than the
-// 3000ms this used to allow, so the old budget guaranteed the one outcome we
-// least wanted: we aborted our own resume, reported a dial failure, and left the
-// box suspended for the next caller to fail against too.
-//
-// The cost of the larger budget is bounded and lands in the right place. A dial
-// only happens when the channel is cold; a healthy box completes both legs in
-// tens of milliseconds and never approaches this.
-const DIAL_HANDSHAKE_MS = 20_000;
-const DIAL_READY_MS = 20_000;
-
-interface Creds {
- endpoint: string;
- token: string;
- port: number;
-}
-
-export class MicrovmSession {
- private state: DurableObjectState;
- private creds: Creds | null = null;
- private conn: H2Grpc | null = null;
- private ws: WebSocket | null = null;
- private dialing: Promise<H2Grpc> | null = null;
- private failures = 0;
- // In memory only. Persisting it would put a storage write on the exec path to
- // save an alarm loop that costs nothing; an eviction just restarts the clock,
- // and the alarm re-reads the durable deadline set at attach.
- private warmUntil = 0;
- // Requests served by THIS instance. 1 means the object was constructed to
- // serve this request, which is the only way to tell an eviction apart from a
- // live-but-slow channel — and the whole remaining cost of this path is on one
- // side or the other of that line. Reported back in x-mvm-timing.
- private served = 0;
- // Last dial cost, so the exec that triggered a dial can attribute it. Set by
- // dial(), consumed and cleared by exec().
- private lastDialMs = 0;
- // When this instance last sent a PING, to hold the alarm to the agent's
- // MinTime floor — see PING_MIN_INTERVAL_MS. In memory only: a fresh instance
- // has a fresh channel too, so it owes no ping debt.
- private lastPingAt = 0;
- // What this instance last armed the alarm for, and what it last persisted as
- // warmUntil. Both exist to keep storage OFF the exec path — see armKeepalive.
- private alarmDueAt = 0;
- private warmUntilPersisted = 0;
-
- constructor(state: DurableObjectState) {
- this.state = state;
- }
-
- async fetch(req: Request): Promise<Response> {
- const path = new URL(req.url).pathname;
- this.served++;
- try {
- if (path === "/attach") return await this.attach(req);
- if (path === "/exec") return await this.exec(req);
- if (path === "/status")
- return json({
- attached: this.creds !== null,
- live: this.live(),
- warmUntil: this.warmUntil,
- failures: this.failures,
- });
- // Awaited colo, unlike resolveColo()'s fire-and-forget. Placement is
- // decided at first touch and is permanent, so the only way to get a shard
- // set that is actually in one metro is to mint candidates, ask each where
- // it landed, and keep the ones that answer correctly. This is the "ask".
- if (path === "/colo") return json({ colo: await this.coloNow() });
- if (path === "/detach") return await this.detach();
- } catch (e) {
- return json({ error: String(e) }, 500);
- }
- return json({ error: "not found" }, 404);
- }
-
- private live(): boolean {
- return this.conn !== null && !this.conn.closed;
- }
-
- /**
- * attach records how to reach this sandbox's box. Called on the create path
- * with the endpoint and token the pool already holds, so nothing here needs
- * to talk to AWS or to the control plane.
- *
- * Deliberately does NOT dial unless asked: create is latency-critical, and the
- * dial can happen on the first exec (~35ms) or be warmed separately.
- *
- * Whether or not it dials, it arms the keepalive — that is what makes the warm
- * dial survive to the customer rather than being evicted a few seconds later.
- */
- private async attach(req: Request): Promise<Response> {
- const c = (await req.json()) as Creds & { dial?: boolean };
- if (!c?.endpoint || !c?.token || !c?.port) return json({ error: "endpoint, token and port required" }, 400);
- this.creds = { endpoint: c.endpoint, token: c.token, port: c.port };
- this.failures = 0;
- this.warmUntil = Date.now() + KEEPALIVE_TTL_MS;
- // Persisted so an evicted DO can re-dial without a round trip back to the
- // control plane. Credentials expire, which is why a dial failure has to be
- // reported plainly rather than retried forever — see exec().
- await this.state.storage.put({ creds: this.creds, warmUntil: this.warmUntil });
- await this.armKeepalive();
- // Opening the tunnel costs ~30-45ms. Doing it here, off the create path,
- // means the first exec — the one time-to-first-command actually measures —
- // finds a live channel instead of paying for it.
- // Only dial when there is nothing live to reuse. dial() unconditionally
- // opens a new socket and overwrites this.ws/this.conn — it has no
- // live-channel guard of its own (it only dedupes CONCURRENT dials) — so
- // calling it on a healthy channel destroys that channel and replaces it with
- // an unproven one.
- //
- // That was harmless while attach ran exactly once per box, at restock. It
- // stopped being harmless when PoolStock started re-attaching sitting stock
- // on a rotation: every box would have its working tunnel torn down and
- // rebuilt every ~45s, and any exec in flight at that moment would have the
- // channel swapped underneath it. Re-attaching must be a no-op refresh of the
- // credentials and the idle clock, not a reconnect.
- if (c.dial && !this.live()) {
- try {
- await this.dial(this.creds);
- } catch (e) {
- // Not fatal: exec re-dials on demand, and a box that refuses now may
- // simply be mid-resume. The keepalive will retry in KEEPALIVE_MS.
- console.log(`mvm-do: warm dial failed: ${e}`);
- }
- }
- return json({ ok: true, live: this.live() });
- }
-
- private async detach(): Promise<Response> {
- this.creds = null;
- this.conn = null;
- this.warmUntil = 0;
- try {
- this.ws?.close();
- } catch {
- /* already gone */
- }
- this.ws = null;
- // Deleting the alarm matters as much as dropping the credentials: without
- // it a released box would keep an alarm loop dialing an endpoint that has
- // been handed to a different tenant.
- await this.state.storage.deleteAlarm();
- await this.state.storage.delete(["creds", "warmUntil"]);
- return json({ ok: true });
- }
-
- private async armKeepalive(): Promise<void> {
- // Called from attach and from exec — either way someone just proved they
- // care about this box, so clear the failure count. A box that failed its way
- // into the slow cadence and is then re-attached (a PoolStock re-warm) or
- // used gets the fast cadence back immediately rather than staying on the
- // 60s tick until its next success.
- this.failures = 0;
- // setAlarm overwrites, so this is also the re-arm. Only skip when one is
- // already due sooner than we would set it — a burst of attaches must not
- // push the next tick further out.
- //
- // The due time is read from MEMORY first, and that is a latency fix, not a
- // micro-optimisation. Durable Object output gates hold a response until
- // every pending storage write is confirmed durable, so a storage op on the
- // exec path is paid by the CALLER, after the handler has already finished.
- // It is invisible in `inside` and lands squarely in the edge's `dback`.
- // Measured on dev 2026-08-25 with getAlarm+put on every exec: `dinside`
- // never left 11-29ms while `mvmdo` swung 101->535ms, with the excursions in
- // `dto`/`dback` (~200ms and ~300ms) and not in the handler.
- //
- // alarmDueAt is a cache of what this instance last armed. A fresh instance
- // starts at 0 and falls through to the real read once, which is correct:
- // it genuinely does not know. Being wrong in the stale direction only costs
- // a redundant setAlarm, never a missed tick.
- const next = Date.now() + KEEPALIVE_MS;
- if (this.alarmDueAt > Date.now() && this.alarmDueAt <= next) return;
- const due = this.alarmDueAt > 0 ? this.alarmDueAt : await this.state.storage.getAlarm();
- if (due !== null && due > Date.now() && due <= next) {
- this.alarmDueAt = due;
- return;
- }
- await this.state.storage.setAlarm(next);
- this.alarmDueAt = next;
- }
-
- /**
- * alarm keeps this object — and the tunnel it owns — alive.
- *
- * Two things decay on their own and both are fixed here. The Durable Object
- * is evicted once it goes idle, taking its non-hibernatable outbound
- * WebSocket with it; and the AWS proxy's attachment to the guest port goes
- * cold if nothing crosses it. Waking on a timer handles the first, and the
- * HTTP/2 PING — which the guest's own stack has to answer — handles the
- * second. The whole point is that this cost is paid on a timer nobody is
- * waiting on, instead of on the customer's first exec.
- *
- * Never throws: a Durable Object alarm that throws is retried on the
- * platform's schedule, not ours, and we would rather re-arm deliberately.
- */
- async alarm(): Promise<void> {
- // Absolute stamps, to be read against exec's enter/exit. A Durable Object
- // serializes its invocations, so an alarm that spends up to PING_TIMEOUT_MS
- // failing a ping is a window in which an arriving exec cannot start. That is
- // the leading explanation for the ~1s gap between the edge's mvmdo and this
- // object's own `inside`, and it is only checkable if both are timestamped.
- const tAlarm = Date.now();
- const creds = await this.loadCreds();
- if (!creds) return; // detached — let the loop end
- if (!this.warmUntil) this.warmUntil = (await this.state.storage.get<number>("warmUntil")) ?? 0;
- if (this.warmUntil && Date.now() > this.warmUntil) {
- // Unused long enough that holding a socket open for it is waste. Exec
- // still works — it just pays for its own dial.
- console.log("mvm-do: keepalive expired, going cold");
- return;
- }
- let next = KEEPALIVE_MS;
- try {
- // Waking is unconditional — that is what keeps the object resident and so
- // keeps the channel alive at all. PINGING is rate-limited to the agent's
- // enforcement floor. A tick that only wakes is not a wasted tick; it is
- // the majority of them, and it is doing the more important of the two jobs.
- const conn = await this.channel();
- const sincePing = Date.now() - this.lastPingAt;
- if (this.lastPingAt === 0 || sincePing >= PING_MIN_INTERVAL_MS) {
- this.lastPingAt = Date.now();
- await conn.ping(PING_TIMEOUT_MS);
- }
- if (this.failures > 0) console.log(`mvm-do: keepalive recovered after ${this.failures}`);
- this.failures = 0;
- } catch (e) {
- this.conn = null;
- this.failures++;
- console.log(`mvm-do: keepalive failed (${this.failures}/${MAX_KEEPALIVE_FAILURES}): ${e}`);
- // Slow down, but keep trying — a box that is merely not ready yet must be
- // able to recover, and nothing else will ever re-attach it. warmUntil is
- // the thing that ends this loop.
- if (this.failures >= MAX_KEEPALIVE_FAILURES) next = KEEPALIVE_BACKOFF_MS;
- }
- console.log(`mvm-do: alarm span ${tAlarm}..${Date.now()} (${Date.now() - tAlarm}ms), next in ${next}ms`);
- await this.state.storage.setAlarm(Date.now() + next);
- }
-
- private async loadCreds(): Promise<Creds | null> {
- if (this.creds) return this.creds;
- this.creds = (await this.state.storage.get<Creds>("creds")) ?? null;
- return this.creds;
- }
-
- /**
- * dial opens the agent tunnel and wraps it in an HTTP/2 client.
- *
- * Single-flighted: a burst of execs arriving at a cold DO must produce one
- * tunnel, not one per request. Without this the first exec after eviction
- * would open N sockets against the box and leak all but one.
- */
- private dial(creds: Creds): Promise<H2Grpc> {
- if (this.dialing) return this.dialing;
- const p = (async (): Promise<H2Grpc> => {
- const tDial = Date.now();
- const host = creds.endpoint.replace(/^https?:\/\//, "").split("/")[0];
- // openTunnel, NOT fetch with AbortSignal.timeout — see its docstring. The
- // timeout here must bound the handshake; bound to the connection it kills
- // the tunnel 3s after every dial, which is exactly what this keepalive
- // exists to prevent and exactly what it was doing.
- const { ws } = await openTunnel(
- `https://${host}${AGENT_TUNNEL_PATH}`,
- { "X-aws-proxy-auth": creds.token, "X-aws-proxy-port": String(creds.port) },
- DIAL_HANDSHAKE_MS,
- );
- this.ws = ws;
- const conn = new H2Grpc(ws, host);
- this.conn = conn;
- // Wait for the guest, not just the proxy — see H2Grpc.ready.
- await Promise.race([
- conn.ready,
- new Promise((_, rej) => setTimeout(() => rej(new Error("guest did not answer")), DIAL_READY_MS)),
- ]);
- // Logged rather than dropped: a dial here is the ~1.1s guest-attach the
- // keepalive exists to keep off the customer's path, so a run of them is
- // the signal that the keepalive is not holding.
- this.lastDialMs = Date.now() - tDial;
- console.log(`mvm-do: dial+ready in ${this.lastDialMs}ms`);
- return conn;
- })();
- this.dialing = p;
- p.catch(() => undefined).then(() => {
- if (this.dialing === p) this.dialing = null;
- });
- return p;
- }
-
- private async channel(): Promise<H2Grpc> {
- const creds = await this.loadCreds();
- if (!creds) throw new Error("not attached");
- if (this.conn && !this.conn.closed) return this.conn;
- this.conn = null;
- return this.dial(creds);
- }
-
- // Colo self-identification, resolved once per isolate and reported on every
- // exec. Placement is decided at FIRST TOUCH and is permanent, and the first
- // touch for these objects is warmMicrovmBox running inside a PoolStock shard
- // — so they inherit the shards' placement, which was measured scattered
- // across ATL/IAD/EWR/MIA/ORD. locationHint cannot fix this: it is
- // jurisdiction-level ("enam" covers all of those) and only consulted at
- // creation. This number is here to prove or kill that theory: if mvmdo
- // latency tracks colo, placement is the remaining tail.
- private colo = "?";
- private coloResolved = false;
-
- private resolveColo(): void {
- if (this.coloResolved) return;
- this.coloResolved = true;
- void fetch("https://www.cloudflare.com/cdn-cgi/trace")
- .then(async (r) => {
- this.colo = ((await r.text()).match(/^colo=(\w+)/m) ?? [])[1] ?? "?";
- })
- .catch(() => {});
- }
-
- // Blocking form of resolveColo, for /colo only. Never used on the exec path:
- // an exec must not wait on a diagnostic round trip to cdn-cgi/trace.
- private async coloNow(): Promise<string> {
- if (this.colo !== "?") return this.colo;
- this.coloResolved = true;
- try {
- const t = await fetch("https://www.cloudflare.com/cdn-cgi/trace").then((r) => r.text());
- this.colo = (t.match(/^colo=(\w+)/m) ?? [])[1] ?? "?";
- } catch {
- /* leave "?" — the probe reports it as unknown rather than failing */
- }
- return this.colo;
- }
-
- private async exec(req: Request): Promise<Response> {
- // Everything the caller cannot see from outside. do;dur on the edge is one
- // opaque number covering the hop to this object, this object's cold start,
- // a dial if the channel was gone, and the RPC itself — and the four have
- // completely different fixes. Measured here and handed back so the edge can
- // publish the split.
- const tEnter = Date.now();
- this.resolveColo();
- this.lastDialMs = 0;
- const wasLive = this.live();
- const coldStart = this.served === 1;
-
- const body = (await req.json()) as ExecReq & { timeoutMs?: number };
- if (!body?.command) return json({ error: "command required" }, 400);
-
- let conn: H2Grpc;
- try {
- conn = await this.channel();
- } catch (e) {
- // 409 is the caller's cue to use the control-plane path. Every reason we
- // can't reach the box lands here — never attached, DO evicted with stale
- // credentials, box suspended, tunnel refused — and the answer to all of
- // them is the same, so they deliberately are not distinguished.
- return json({ error: `channel unavailable: ${e}`, fallback: true }, 409);
- }
-
- const timeoutMs = body.timeoutMs ?? DEFAULT_TIMEOUT_MS;
- try {
- const tU = Date.now();
- const res = await conn.unary(EXEC_PATH, encodeExecRequest(body), timeoutMs);
- const unaryMs = Date.now() - tU;
- // Kept deliberately. This is the only number that separates transport
- // from the guest actually running the command: everything else the edge
- // can see lumps them together, which is how ~700ms of shell startup spent
- // a whole session being mistaken for a slow tunnel.
- console.log(`mvm-do: unary ${unaryMs}ms`);
- // Being used is the strongest signal the box is worth keeping warm, so
- // each exec pushes the deadline out and restarts the loop if it had
- // lapsed (TTL expiry, or a run of failures while the box was resuming).
- this.warmUntil = Date.now() + KEEPALIVE_TTL_MS;
- this.failures = 0;
- // Persist only when the durable copy has drifted far enough to matter.
- // The in-memory value is what this instance actually uses; the stored one
- // exists solely so a RE-CREATED instance knows whether to keep warming,
- // and for that a value up to WARM_PERSIST_SLACK_MS stale is identical in
- // effect. Writing on every exec put a storage op inside the output gate,
- // which delays the RESPONSE — the caller pays it, and it shows up in the
- // edge's `dback` rather than anywhere this object can see.
- if (this.warmUntil - this.warmUntilPersisted >= WARM_PERSIST_SLACK_MS) {
- this.warmUntilPersisted = this.warmUntil;
- await this.state.storage.put("warmUntil", this.warmUntil);
- }
- await this.armKeepalive();
- return json(decodeExecResponse(res), 200, {
- // live=1 means the channel survived from the last request or the
- // keepalive — the state this whole design is trying to be in.
- // enter/exit are ABSOLUTE epoch ms, not durations. The edge measures the
- // whole round trip as one number (mvmdo) and this object measures its
- // own work (inside); the difference has been over a SECOND on some
- // execs while inside was 41-56ms, and a single opaque gap cannot say
- // whether that second was spent getting here, queued outside this
- // handler, or going back. Pairing these with the edge's own send/receive
- // stamps splits it three ways.
- //
- // Both ends are Workers, so the clocks are the same source; Date.now()
- // in a Worker only advances on I/O, which makes these unusable for
- // anything small — and completely adequate against a 1000ms question.
- "x-mvm-timing": `live=${wasLive ? 1 : 0},cold=${coldStart ? 1 : 0},dial=${this.lastDialMs},unary=${unaryMs},inside=${Date.now() - tEnter},enter=${tEnter},exit=${Date.now()}`,
- "x-mvm-colo": this.colo,
- });
- } catch (e) {
- // The channel is suspect once a call fails on it: drop it so the next
- // exec re-dials rather than inheriting a half-dead connection.
- this.conn = null;
- return json({ error: `exec failed: ${e}`, fallback: true }, 409);
- }
- }
-}
-
-function json(body: unknown, status = 200, extra?: Record<string, string>): Response {
- return new Response(JSON.stringify(body), {
- status,
- headers: { "content-type": "application/json", ...(extra ?? {}) },
- });
-}
diff --git a/cloudflare-workers/vm-do/src/protocol.ts b/cloudflare-workers/vm-do/src/protocol.ts
deleted file mode 100644
index eeb991ea..00000000
--- a/cloudflare-workers/vm-do/src/protocol.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-export interface ExecRequest {
- requestId: number;
- command: string;
- cwd: string;
- timeoutMs: number;
- env: Record<string, string>;
-}
-
-export interface ExecResult {
- requestId: number;
- exitCode: number;
- durationMs: number;
- stdout: string;
- stderr: string;
- error?: string;
-}
-
-const encoder = new TextEncoder();
-const decoder = new TextDecoder();
-
-function varint(value: number): number[] {
- const bytes: number[] = [];
- let remaining = value >>> 0;
- while (remaining > 0x7f) {
- bytes.push((remaining & 0x7f) | 0x80);
- remaining >>>= 7;
- }
- bytes.push(remaining);
- return bytes;
-}
-
-function fieldVarint(field: number, value: number): number[] {
- return [...varint(field << 3), ...varint(value)];
-}
-
-function fieldBytes(field: number, value: Uint8Array): number[] {
- return [...varint((field << 3) | 2), ...varint(value.byteLength), ...value];
-}
-
-function stringField(field: number, value: string): number[] {
- return value ? fieldBytes(field, encoder.encode(value)) : [];
-}
-
-function envEntry(key: string, value: string): Uint8Array {
- return Uint8Array.from([...stringField(1, key), ...stringField(2, value)]);
-}
-
-export function encodeExec(request: ExecRequest): ArrayBuffer {
- const bytes = [
- ...fieldVarint(1, request.requestId),
- ...stringField(2, request.command),
- ...stringField(3, request.cwd),
- ...fieldVarint(4, request.timeoutMs),
- ];
- for (const [key, value] of Object.entries(request.env)) bytes.push(...fieldBytes(5, envEntry(key, value)));
- return Uint8Array.from(bytes).buffer;
-}
-
-class Reader {
- private offset = 0;
-
- constructor(private readonly bytes: Uint8Array) {}
-
- get done(): boolean {
- return this.offset >= this.bytes.byteLength;
- }
-
- uint32(): number {
- let value = 0;
- for (let shift = 0; shift < 35; shift += 7) {
- if (this.offset >= this.bytes.byteLength) throw new Error("truncated protobuf varint");
- const byte = this.bytes[this.offset++];
- value |= (byte & 0x7f) << shift;
- if ((byte & 0x80) === 0) return value >>> 0;
- }
- throw new Error("protobuf varint exceeds uint32");
- }
-
- bytesValue(): Uint8Array {
- const length = this.uint32();
- const end = this.offset + length;
- if (end > this.bytes.byteLength) throw new Error("truncated protobuf bytes");
- const value = this.bytes.subarray(this.offset, end);
- this.offset = end;
- return value;
- }
-
- skip(wireType: number): void {
- if (wireType === 0) {
- this.uint32();
- return;
- }
- if (wireType === 2) {
- this.bytesValue();
- return;
- }
- throw new Error(`unsupported protobuf wire type ${wireType}`);
- }
-}
-
-function zigZagDecode(value: number): number {
- return (value >>> 1) ^ -(value & 1);
-}
-
-export function decodeResult(input: ArrayBuffer): ExecResult {
- const reader = new Reader(new Uint8Array(input));
- const result: ExecResult = { requestId: 0, exitCode: 0, durationMs: 0, stdout: "", stderr: "" };
- while (!reader.done) {
- const tag = reader.uint32();
- const field = tag >>> 3;
- const wireType = tag & 7;
- if (field === 1 && wireType === 0) result.requestId = reader.uint32();
- else if (field === 2 && wireType === 0) result.exitCode = zigZagDecode(reader.uint32());
- else if (field === 3 && wireType === 0) result.durationMs = reader.uint32();
- else if (field === 4 && wireType === 2) result.stdout = decoder.decode(reader.bytesValue());
- else if (field === 5 && wireType === 2) result.stderr = decoder.decode(reader.bytesValue());
- else if (field === 6 && wireType === 2) result.error = decoder.decode(reader.bytesValue());
- else reader.skip(wireType);
- }
- return result;
-}
diff --git a/cloudflare-workers/vm-do/src/vm_session.ts b/cloudflare-workers/vm-do/src/vm_session.ts
deleted file mode 100644
index a149cf8b..00000000
--- a/cloudflare-workers/vm-do/src/vm_session.ts
+++ /dev/null
@@ -1,249 +0,0 @@
-import { DurableObject } from "cloudflare:workers";
-import { decodeResult, encodeExec, type ExecResult } from "./protocol";
-
-// VmSession — one Durable Object per sandbox, holding a persistent, hibernatable
-// WebSocket that the QEMU worker HOST dials into (host-dialed, not guest-dialed).
-// Exec requests arrive over HTTP (from the edge's exec route) and are relayed to
-// the host as a protobuf frame; the reply is correlated by requestId. This
-// re-homes the internal/wsgateway broker concept back into an edge DO.
-//
-// Auth is enforced at the edge /internal/vms/:id/connect route (a per-sandbox
-// HMAC over SESSION_JWT_SECRET) before the upgrade reaches this DO, so the DO
-// itself is unauthenticated glue.
-// Extends DurableObject (cloudflare:workers) so execCommand is callable as a
-// native RPC method from the edge stub — cheaper than HTTP-over-fetch per hop.
-
-// Flip to true to re-enable per-exec socket-census logging (tail-consumer +
-// per-op cost otherwise; the colo/connect one-shot logs stay on).
-const DIAG = false;
-
-interface PendingCommand {
- resolve: (result: ExecResult) => void;
- reject: (error: Error) => void;
- timer: ReturnType<typeof setTimeout>;
-}
-
-interface RunBody {
- cmd?: string;
- args?: string[];
- cwd?: string;
- envs?: Record<string, string>;
- timeout?: number;
-}
-
-function json(value: unknown, init: ResponseInit = {}): Response {
- const headers = new Headers(init.headers);
- headers.set("content-type", "application/json");
- return new Response(JSON.stringify(value), { ...init, headers });
-}
-
-// commandFrom flattens the SDK's {cmd,args} into a single shell string for the
-// agent's one-shot Exec. The common `sh -c "<script>"` shape is passed through
-// verbatim; anything else is shell-quoted.
-function commandFrom(body: RunBody): string {
- if (body.cmd === "sh" && body.args?.[0] === "-c" && typeof body.args[1] === "string") return body.args[1];
- if (!body.cmd) throw new Error("cmd is required");
- return [body.cmd, ...(body.args ?? [])].map((part) => `'${part.replaceAll("'", `'\\''`)}'`).join(" ");
-}
-
-export class VmSession extends DurableObject {
- state: DurableObjectState;
-
- private readonly pending = new Map<number, PendingCommand>();
- private nextRequestId = Math.floor(Math.random() * 0x7fffffff) + 1;
-
- constructor(state: DurableObjectState, env: unknown) {
- super(state, env as never);
- this.state = state;
- // Rebind hibernation-restored sockets' message/close handlers to this
- // instance (the runtime re-creates the DO on wake with the sockets intact).
- // acceptWebSocket already tagged them "vm"; nothing else to restore.
- }
-
- // RPC exec entrypoint — same semantics as the fetch /exec route but without
- // the HTTP request/response serialization on the edge→DO hop (a few ms per
- // call at the volumes the exec path runs at). The fetch route stays for
- // rollout compatibility; callers prefer this when the stub exposes it.
- async execCommand(body: RunBody, sid?: string): Promise<
- | { ok: true; exitCode: number; stdout: string; stderr: string; agentMs: number; internalMs: number }
- | { ok: false; error: string }
- > {
- // internalMs = time spent INSIDE this method. The edge's do;dur minus this
- // = isolate wake + edge→DO transit — the unattributed gap in the exec tail.
- const tEntry = Date.now();
- if (DIAG) {
- const socks = this.state.getWebSockets("vm");
- console.log(`exec sid=${sid ?? "?"} sockets=${socks.length} states=[${socks.map((s) => s.readyState).join(",")}]`);
- }
- if (!this.connectedSocket()) {
- for (let waited = 0; waited < 400 && !this.connectedSocket(); waited += 50) {
- await new Promise((resolve) => setTimeout(resolve, 50));
- }
- }
- if (!this.connectedSocket()) return { ok: false, error: "vm not connected" };
- try {
- const result = await this.run(
- commandFrom(body),
- body.cwd ?? "",
- body.envs ?? {},
- Math.max(1, body.timeout ?? 60) * 1000,
- );
- return {
- ok: true,
- exitCode: result.exitCode,
- stdout: result.stdout,
- stderr: result.stderr,
- agentMs: result.durationMs,
- internalMs: Date.now() - tEntry,
- };
- } catch (e) {
- return { ok: false, error: String((e as Error)?.message ?? e) };
- }
- }
-
- // The live host WebSocket (hibernatable, tagged "vm"), if connected.
- private connectedSocket(): WebSocket | undefined {
- return this.state.getWebSockets("vm").find((socket) => socket.readyState === WebSocket.OPEN);
- }
-
- async fetch(request: Request): Promise<Response> {
- const url = new URL(request.url);
- if (url.pathname === "/connect") return this.acceptHostConnection();
- if (url.pathname === "/status") return json({ connected: this.connectedSocket() !== undefined });
- if (url.pathname === "/location") {
- const trace = await fetch("https://www.cloudflare.com/cdn-cgi/trace").then((r) => r.text());
- const fields = Object.fromEntries(trace.trim().split("\n").map((l) => l.split("=", 2)));
- return json({ colo: fields.colo ?? null, loc: fields.loc ?? null });
- }
- if (url.pathname === "/exec" && request.method === "POST") {
- let body: RunBody;
- try {
- body = (await request.json()) as RunBody;
- } catch {
- return json({ error: "invalid body" }, { status: 400 });
- }
- // Diagnostic: socket census at exec time — sid comes from the edge as a
- // query param (idFromName is one-way, the DO doesn't know its own name).
- const socks = this.state.getWebSockets("vm");
- console.log(
- `exec sid=${url.searchParams.get("sid") ?? "?"} sockets=${socks.length} states=[${socks.map((s) => s.readyState).join(",")}]`,
- );
- // Entry grace: under a burst, ~100 hibernated VmSessions wake at once and
- // a few serve their first exec before the restored socket is visible —
- // host-side evidence shows the TCP connection stayed up the whole time.
- // Waiting briefly turns that wake-race into a slightly slower DO exec
- // instead of an instant 409 → tunnel (~1s). A genuinely dead channel
- // still falls back, just ~400ms later.
- if (!this.connectedSocket()) {
- for (let waited = 0; waited < 400 && !this.connectedSocket(); waited += 50) {
- await new Promise((resolve) => setTimeout(resolve, 50));
- }
- }
- // connected:false lets the edge fall back to the tunnel path (no flag).
- if (!this.connectedSocket()) return json({ connected: false, error: "vm not connected" }, { status: 409 });
- try {
- const result = await this.run(
- commandFrom(body),
- body.cwd ?? "",
- body.envs ?? {},
- Math.max(1, body.timeout ?? 60) * 1000,
- );
- // x-agent-ms = host-side manager.Exec duration from the result frame —
- // lets the edge's Server-Timing split DO-transit from agent time.
- return json(
- { exitCode: result.exitCode, stdout: result.stdout, stderr: result.stderr },
- { headers: { "x-agent-ms": String(result.durationMs) } },
- );
- } catch (e) {
- // Channel dropped mid-exec, or command errored on the agent side — 409
- // so the edge can retry via the tunnel instead of surfacing a 500.
- return json({ connected: false, error: String((e as Error)?.message ?? e) }, { status: 409 });
- }
- }
- return new Response("not found", { status: 404 });
- }
-
- // One-shot colo self-identification (diagnostics): DO placement is sticky at
- // first-touch, and a DO sitting cross-colo from the edge that calls it adds
- // per-hop RTT that Server-Timing can't attribute on its own.
- private coloLogged = false;
-
- private logColoOnce(kind: string): void {
- if (this.coloLogged) return;
- this.coloLogged = true;
- void fetch("https://www.cloudflare.com/cdn-cgi/trace")
- .then(async (r) => {
- const colo = ((await r.text()).match(/^colo=(\w+)/m) ?? [])[1] ?? "?";
- console.log(`vmsession colo=${colo} (${kind})`);
- })
- .catch(() => {});
- }
-
- private acceptHostConnection(): Response {
- this.logColoOnce("connect");
- console.log(`connect: replacing ${this.state.getWebSockets("vm").length} existing socket(s)`);
- // Only one host socket per box; a redial replaces the old one.
- for (const socket of this.state.getWebSockets("vm")) socket.close(1012, "replaced");
- const pair = new WebSocketPair();
- const [client, server] = Object.values(pair);
- this.state.acceptWebSocket(server, ["vm"]); // hibernatable — survives DO eviction
- server.serializeAttachment({ role: "vm", connectedAt: Date.now() });
- return new Response(null, {
- status: 101,
- headers: { "sec-websocket-protocol": "oc-protobuf-v1" },
- webSocket: client,
- });
- }
-
- private async run(command: string, cwd: string, env: Record<string, string>, timeoutMs: number): Promise<ExecResult> {
- // Reconnect grace: a dropped socket takes the host one backoff cycle to
- // redial. Wait briefly so a redial-in-flight becomes a slightly slower exec
- // rather than a hard failure.
- let socket = this.connectedSocket();
- for (let waited = 0; !socket && waited < 3_000; waited += 100) {
- await new Promise((resolve) => setTimeout(resolve, 100));
- socket = this.connectedSocket();
- }
- if (!socket) throw new Error("vm not connected");
- const requestId = this.nextRequestId++ >>> 0 || 1;
- const result = new Promise<ExecResult>((resolve, reject) => {
- const timer = setTimeout(() => {
- this.pending.delete(requestId);
- reject(new Error(`command timed out after ${timeoutMs}ms`));
- }, timeoutMs + 1_000);
- this.pending.set(requestId, { resolve, reject, timer });
- });
- socket.send(encodeExec({ requestId, command, cwd, timeoutMs, env }));
- return result;
- }
-
- webSocketMessage(_socket: WebSocket, message: string | ArrayBuffer): void {
- if (!(message instanceof ArrayBuffer)) return;
- let result: ExecResult;
- try {
- result = decodeResult(message);
- } catch (error) {
- console.error("invalid VM frame", error);
- return;
- }
- const pending = this.pending.get(result.requestId);
- if (!pending) return;
- clearTimeout(pending.timer);
- this.pending.delete(result.requestId);
- if (result.error) pending.reject(new Error(result.error));
- else pending.resolve(result);
- }
-
- webSocketClose(_socket: WebSocket, code: number, reason: string): void {
- const error = new Error(`vm disconnected (${code}: ${reason})`);
- for (const [requestId, pending] of this.pending) {
- clearTimeout(pending.timer);
- pending.reject(error);
- this.pending.delete(requestId);
- }
- }
-
- webSocketError(_socket: WebSocket, error: unknown): void {
- console.error("vm websocket error", error);
- }
-}
diff --git a/cloudflare-workers/vm-do/tsconfig.json b/cloudflare-workers/vm-do/tsconfig.json
deleted file mode 100644
index 50af4e47..00000000
--- a/cloudflare-workers/vm-do/tsconfig.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ES2022",
- "moduleResolution": "Bundler",
- "lib": ["ES2022"],
- "types": ["@cloudflare/workers-types"],
- "strict": true,
- "noImplicitAny": true,
- "esModuleInterop": true,
- "skipLibCheck": true,
- "forceConsistentCasingInFileNames": true,
- "isolatedModules": true,
- "noEmit": true
- },
- "include": ["src/**/*.ts"]
-}
diff --git a/cloudflare-workers/vm-do/wrangler.prod.toml b/cloudflare-workers/vm-do/wrangler.prod.toml
deleted file mode 100644
index b5b39528..00000000
--- a/cloudflare-workers/vm-do/wrangler.prod.toml
+++ /dev/null
@@ -1,38 +0,0 @@
-# vm-do Worker — PROD on Mo's CF account. Owns the VmSession and MicrovmSession
-# Durable Object classes; api-edge (opencomputer-edge-prod) binds both
-# cross-script via script_name. Deliberately a separate worker so api-edge's deploy cadence
-# (every merge touching web/ or edge code redeploys the edge, and every deploy
-# resets all DOs → severs every host-dialed VM WebSocket) can't flap the exec
-# data plane. Deploy: `wrangler deploy -c wrangler.prod.toml` — and ONLY when
-# VM-DO logic changes; each deploy of THIS worker resets the sockets once
-# (hosts redial within ~1s).
-
-name = "opencomputer-vmdo-prod"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-account_id = "b8f23cb87a7a6c64040d3134643da448"
-
-[[durable_objects.bindings]]
-name = "VM_SESSIONS"
-class_name = "VmSession"
-
-# MicroVM exec data plane. Same worker and same reasoning as VmSession above;
-# this DO dials the box's AWS agent endpoint directly, so exec never traverses
-# the control plane. Mirrors wrangler.toml (dev) — keep the two in step.
-[[durable_objects.bindings]]
-name = "MICROVM_SESSIONS"
-class_name = "MicrovmSession"
-
-[[migrations]]
-tag = "v1"
-new_sqlite_classes = ["VmSession"]
-
-# v2 adds MicrovmSession. Migration tags are a forward-only ledger per script:
-# this must stay v2 to match dev and must not be renumbered once deployed.
-[[migrations]]
-tag = "v2"
-new_sqlite_classes = ["MicrovmSession"]
-
-# Ship Worker logs to opencomputer-log-tail-prod → Axiom dataset oc-platform-edge.
-[[tail_consumers]]
-service = "opencomputer-log-tail-prod"
diff --git a/cloudflare-workers/vm-do/wrangler.toml b/cloudflare-workers/vm-do/wrangler.toml
deleted file mode 100644
index f1e5f67b..00000000
--- a/cloudflare-workers/vm-do/wrangler.toml
+++ /dev/null
@@ -1,30 +0,0 @@
-# vm-do Worker — DEV. Owns the VmSession Durable Object class; api-edge
-# (opensandbox-edge-dev) binds it cross-script via script_name. Deliberately a
-# separate worker so api-edge's deploy cadence (every merge touching web/ or
-# edge code) doesn't reset the DOs and sever the host-dialed VM WebSockets.
-# Deploy: `wrangler deploy` — and ONLY when VM-DO logic changes.
-#
-# No routes on purpose: nothing reaches this worker over HTTP. The edge
-# authenticates /internal/vms/:id/connect and routes exec, then calls the DO
-# through its VM_SESSIONS binding.
-
-name = "opensandbox-vmdo-dev"
-main = "src/index.ts"
-compatibility_date = "2026-04-28"
-account_id = "1241f114453e32d292197e3fb36210b2"
-
-[[durable_objects.bindings]]
-name = "VM_SESSIONS"
-class_name = "VmSession"
-
-[[durable_objects.bindings]]
-name = "MICROVM_SESSIONS"
-class_name = "MicrovmSession"
-
-[[migrations]]
-tag = "v1"
-new_sqlite_classes = ["VmSession"]
-
-[[migrations]]
-tag = "v2"
-new_sqlite_classes = ["MicrovmSession"]