Refresh docs for monorepo restructure, SDK split, pair containment
Catches the documentation tree up with several landed changes that
weren't previously reflected:
- Monorepo layout: `web/` → `apps/web/`, `crates/opake-cli` →
`apps/cli/`, `appview/` → `apps/indexer/`, packages moved into
`packages/opake-{sdk,react,daemon}/`. Updated every reference to
cargo install paths, test commands, file tree diagrams, and the
architectural narrative.
- AppView → Indexer rename across docs, lexicons, and the ER diagram
role labels. The architecture overview adds a one-liner explaining
that the service fills atproto's "appview" role but is called
indexer here because all payloads are ciphertext.
- SDK package split documented: `@opake/sdk`, `@opake/react`,
`@opake/daemon` descriptions, dependency boundary, React hooks
catalog. LICENSING.md updated so the copyleft-triggering bundle
list names all three packages.
- Lexicon additions: `keyringUpdate` (action types:
addMember/removeMember/updateRole/rename/updateDescription/leave)
replaces the old single-purpose `keyringLeave`, `invitation` +
`invitationAcceptance`, and the `authFullAccess` permission set
for OAuth `include:` scopes when PDSes support them.
- SSE live updates: FLOWS.md adds sections for the WorkspaceKeeper
and InboxKeeper bootstrap-then-patch lifecycle, dedup semantics,
and the rationale for separating `stopSseConsumer` from the keeper
drain (`wipeState`).
- Pair flow key containment + Opake identity invariant: sequence
diagrams updated to show the new Storage touchpoints
(`save_pair_state` on request, `load_pair_state` + `save_identity`
+ `delete_pair_state` on receive), prose rewritten to reflect that
the ephemeral private key is persisted in Storage rather than
kept in memory, and the Domain API section updated to reflect
Opake always having an Identity.
- STORAGE.md reorganised: new `save_pair_state` / `load_pair_state`
/ `delete_pair_state` trait row, JsStorage replaces the former
NoopStorage-on-WASM explanation, record-cache section rewritten
around the SSE-driven refresh model.
- AUTH.md: OAuth section rewritten to reflect WASM-owned tokens
(startOAuthLogin / completeOAuthLogin / loginWithAppPasswordWasm),
the two-step web login flow with PendingLogin, granular scopes
built from `OPAKE_COLLECTIONS`, and proactive refresh via
`tokenExpiresAt` + `proactiveRefresh`.
- docs/indexer.md: new file. Tables, endpoints, auth flow, SSE
stream, backfill, firehose consumer config, deployment notes.
- apps/indexer/lib/opake_indexer_web/router.ex: new file bringing
the Phoenix router into the repo with the full endpoint surface
(`/api/health`, `/api/inbox`, `/api/keyrings`, cabinet +
workspace snapshot/sync/updates, SSE events + token).
- crates/opake-core/src/crypto/mod.rs: add a `Debug` impl for
`Redacted<Option<[u8; N]>>` so `RedactedDebug`-derived types with
optional key fields (Identity.signing_key, verify_key) stop
printing raw bytes in `{:?}` output.