# Vector operations

Start Vector with one line, `npx -y @runeditrun/rer dev just-every/run-vector` (set up only: `npx -y @runeditrun/rer setup just-every/run-vector`; without Node: `curl -fsSL https://runeditrun.com/install.sh | sh -s -- dev just-every/run-vector`). It needs Git, and `rer` provides the exact Node and pnpm this source pins. All public lifecycle commands use `rer VERB`. Run `rer describe` for capabilities and `rer check --profile first-party` for offline structural validation. `doctor` reports installed tools and missing configuration without printing values. OPERATIONS.json declares the real command adapter, inputs, loops and effects.

Run `install`, then `setup --owner-email EMAIL --non-interactive`, then `dev`. Setup consumes rer-setup.json, saves private .dev.vars, builds with secrets excluded, applies forward migrations, bootstraps the configured first owner and stops its temporary Worker. A repeated setup preserves settings, owner and data. Use a private `--answers` JSON file for declared workspace, team and timezone choices.

Dev reuses the saved installation and prints its health-gated address and development outbox. Open the newest sign-in message and confirm it; GET does not sign in. First sign-in returns the owner to /setup for workspace review; app routes enforce completion. Existing installations keep their completion through migration 0029. No email is sent in local mode. `outbox --owner-email EMAIL` requests another ordinary link. Stop with Ctrl-C or `dev --stop` before data movement. State is under .wrangler/state; read docs/LOCAL-RECOVERY.md before relocating existing state.

`build` excludes private settings and restores them after the build. `rer verify` runs source integrity, command contracts, type/build, integration drift and artifact checks, followed by Base's hosted-output and hydration boundaries. It runs no test suites, including when the trusted Managed build invokes it through `rer-project.json`. Vector's CI runs the test suites through `pnpm verify:ci`, then the same boundaries, actual development hydration, slow installer startup and the README fresh-clone journey. Local iteration runs only touched tests and typecheck. Diagnostics and captures must exclude secrets, mail bodies, tokens and cookies. Close every owned process.

`export --output exports/vector.jsonl` uses Base D1/R2 portability. Stop the app before a confirmed `import --input exports/vector.jsonl --yes` into an empty destination. Archives include owned records and files, with documented exclusions and restored-effect review; see docs/DATA-OWNERSHIP.md. `reset --yes` removes only inventoried local state/settings/drafts and preserves source, archives and deployment receipts. Inspect the inventory first and retain backups.

`deploy --environment production` uses explicit owner-account inputs and durable .rer/deploy state; its normal completion checks health. SENDGRID_API_KEY maps to MAIL_API_KEY. See DEPLOY.md for the separate credential-free source artifact preparation and reviewed artifact controller. Hosting, real provider delivery and complete authenticated HTTPS restore require their own evidence.

Preserve applied migration files and apply later migrations in order. Keep additive schema, histories, reservations, authentication mappings and accepted/uncertain delivery results on compatible-source rollback. Back up D1/R2 and validate isolated recovery before changing a deployed installation. Private-file deletion retains quota and cleanup intent until the writer is settled and byte absence confirmed; time or absence alone cannot prove an in-flight upload stopped. Scheduled cleanup and deferral-return work are bounded. Source acceptance is separate from provider Cron, mail arrival, physical erasure time and capacity qualification.

Managed source uses the vendored Base delivery producer and the declared setup manifest/digest. Its pinned workflow is manual. Signed native owner claim refuses a second claim; editor configuration belongs to the recorded installation owner and uses the configured frame-ancestors policy. Apply 0024 additively and retain claim ledgers. See docs/MANAGED-SOURCE.md; hosted installation and accounts remain owner work.

Mapped CSV/JSON issue imports and the Linear importer (documented CSV format and owner-made API file, tested at 2,000 issues with a generator) use the reviewed native Base import-kit path in Settings and the terminal. Review mapping, errors and omissions, then apply a run of up to 4,000 rows in staged batches; durable IDs support status, repeat, resume, a reconciliation report and whole-run rollback. See docs/MOVE-IN.md and docs/IMPORT-EVIDENCE.md. Local and authenticated HTTP archives use Base portability. HTTP restore requires the 0034 pristine-bootstrap admission and real coordinator binding; ordinary owner sign-in precedes setup or edits, and fresh historical-owner sign-in follows commit. Stopped, confirmed local restore into empty resources remains supported; hosted HTTPS acceptance is separate. See docs/ARCHIVES.md. Replacements remain empty; no owner export or hosted acceptance is claimed.

Scoped API tokens use native Base authority and existing issue/comment mutations. Signed source ingest commits issue/evidence/replay together; signed GitHub pull-request events persist links without a provider token or API call. Outbound webhooks retain accepted, rejected and uncertain states with finite retries and require an enforcing INTEGRATION_EGRESS service binding. Source adoption does not provision hosted egress. Restore excludes credentials and quarantines historical effects; re-enter secrets and review future effects. See docs/API.md and docs/INTEGRATIONS.md. Apply 0027/0028 additively and retain every replay and terminal-delivery ledger.
