# Barrow operations

Run all first-party operations from the composed, runnable edition checkout
with `rer`. To get a runnable checkout, run `npx -y @runeditrun/rer dev just-every/run-barrow` (set up only: `npx -y @runeditrun/rer setup just-every/run-barrow`; without Node: `curl -fsSL https://runeditrun.com/install.sh | sh -s -- dev just-every/run-barrow`). Inside that checkout, `rer dev` alone launches it for review. The detailed flags and effects are in
`RUN-LOCALLY.md` and `SEED-COMMAND-CONTRACT.md`.

```sh
rer install
rer setup --owner-email you@example.com
rer dev
```

Use the setup prompt instead of the owner-email flag when entering the real
mailbox. Follow the newest ordinary sign-in message in the printed local
outbox; no external email is sent. Stop `dev` with
`rer dev --stop` or Ctrl-C, and stop `preview` with
`rer preview --stop` before build or verification.

```sh
rer verify
rer reset --yes
rer export --output exports/installation.rer
rer import --input exports/installation.rer --yes
rer deploy
rer describe
```

Use `rer describe` to inspect the checkout's actual
capabilities. `rer check --profile first-party` validates the
declared command contract; it does not run application journeys or contact a
provider.

## Local data and recovery

Setup and development use explicit owner identity and real local migrations.
Dev and preview use the same owner and canonical `.wrangler/state`; the local
development outbox is available only on loopback. The outbox needs this checkout’s private development gate. Private settings are
kept in `.dev.vars` with mode 0600 and are not copied into build output.

Local export creates a private archive with an integrity receipt and explicit
exclusions. Barrow archives its account, order, approval, import custody and erasure tables. Owner/auth, outbox, bookkeeping, private settings and
transient runtime state are excluded. Import validates and restores atomically
into an empty destination; confirmed reset preserves export archives. Run setup
after restore to establish a fresh owner. Each first-party seed verifies local
export/import/export equivalence across its supported resources. Remote transfer
is available only when the adapter declares complete resource coverage.

Preserve ambiguous state and applied migration history. Never place a remote
credential, owner secret or local resource ID in source. A schema change needs
a forward migration and verified transition/recovery.

## Deployment

`rer deploy --dry-run` validates the owner-account deployment declaration and
builds locally without provider requests. A real deployment needs private
`CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_TOKEN` and `OWNER_EMAIL`. Set
`MAIL_PROVIDER=none` to deploy without outbound email, then run `rer signin`
with the same Cloudflare credentials and environment. With an email provider,
supply a verified sender and that provider's credentials. The owner-account
deploy kit under `node_modules/@runeditrun/rer/modules/deploy-kit` defines account
scope, resource ownership, migrations, receipts and health checks.

## Hosted installation packaging

Run `pnpm run build`, then `pnpm delivery:spec` to generate the committed deployment specification. `pnpm check:deployment-spec` compares it with the real build and packaging policy. The descriptor binds the exact setup manifest and uses the dispatch-only Managed delivery workflow. `node scripts/delivery/base/cli.mjs package --config packaging.json --output rer-package` packages the Worker, static assets and unchanged migrations. Generated package and artifact folders are private build output and stay ignored.

Hosted setup offers RER relay, Resend, SendGrid, Cloudflare mail and the option to turn outbound email off. Managed hosting supplies its relay URL, sender and private installation key; Assisted hosting requires the chosen provider's sender and private credential. Cloudflare also requires its account ID. Local review suppresses delivery. Quote-delivery event processing continues to require the existing Resend tenant and signed webhook configuration; selecting another sender does not claim quote-event support. No provider acceptance or hosted installation is established by packaging.
