refactor(core): deepen domain stores and invitation-only persistence

Peel relationships, eligibility, and secrets off the shared pool into
AppDataStores adapters, split pairing service/protocol, and move the
invitation Repository into its own module so open_all owns schemas.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-11 15:51:35 +02:00
parent 5c66c2ca65
commit 3b7fd3d468
29 changed files with 2344 additions and 2088 deletions

View File

@@ -23,11 +23,11 @@ _Avoid_: contact record, friendship
## Persistence (core)
**Domain store**:
The module that owns schema and queries for one domain (invitation history, targeted transfers, blocked devices, relationship rows, secret metadata). Callers use store methods — never a raw SQL pool.
The module that owns schema and queries for one domain (invitation history, targeted transfers, blocked devices, relationship rows, pairing eligibility, secret metadata). Callers use store methods — never a raw SQL pool.
_Avoid_: repository-for-everything, DAO, database layer
**Invitation repository**:
The domain store for invitation-transfer history, artifacts, receiver requests, and related events. Todays type name may still be `Repository`.
The domain store for invitation-transfer history, artifacts, receiver requests, and related events. Module path `invitation`; todays type name may still be `Repository`.
_Avoid_: “the database”, AppDataStores
**AppDataStores**: