# Beacon operations

Run Beacon from the exported edition with Node 26.8.1 and pnpm 8.15.6.
Remote commands select 'preview' by default; pass
'-- --environment production' or set BEACON_DEPLOY_ENV=production for a
production namespace.

`pnpm run setup -- --environment preview` provisions or reuses the D1, R2,
Queue and dead-letter Queue resources and writes ignored deployment state.
BEACON_PUBLIC_ORIGIN must be an HTTPS origin without a path. Setup must run
before deployment because deploy uses its environment cache. Add '--dry-run'
after the command separator for a plan that makes no Cloudflare changes.

`pnpm run deploy -- --environment preview` builds, applies remote migrations,
uploads the emitted Worker with declared secrets, and waits for the selected
origin's `/health`. Production adds the conditional manifest requirements for
mail, receipts and rate limiting. Operations-provider credentials do not make
the currently unavailable operations adapter executable.

`pnpm run verify` records the local gates it actually executes. Baseline
coverage may contain TODOs, and a green bounded run does not establish complete
acceptance or external delivery. See [ACCEPTANCE.md](ACCEPTANCE.md) for the
release obligations.

`GET /health` performs bounded D1, R2-backed storage and Queue reachability
probes and returns 503 when any probe is unavailable. It does not verify mail,
AI, or external operations.

Run `node scripts/operations.mjs describe` to inspect the operation interface,
or `node scripts/operations.mjs check` to check inputs. The check validates local static inputs only; it
does not contact Cloudflare or certify caches, generated artifacts, migrations,
or hosted health.

`node scripts/install.mjs` starts a loopback setup UI before application dependencies
are installed. One approval installs locked dependencies,
applies local migrations, bootstraps the first real operator/inbox, updates the
reviewed owner configuration and starts the local app. Local native sign-in is
explicitly enabled without sample data. It provisions no remote resources.
`pnpm dev` reuses its ignored local configuration and persistence directory.
