mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:41:08 +02:00
Symmetrically extends the F4 server-side singleton bootstrap to the per-Space `kontextDoc`. Every Space-creation — Personal at signup and brand/club/family/team/practice via the org plugin — now writes an empty kontextDoc row straight into mana_sync.sync_changes with origin='system', client_id='system:bootstrap'. Fresh clients pull the row instead of racing on a local insert that the next pull would clobber. - New `bootstrapSpaceSingletons(spaceId, ownerUserId, syncSql)` in services/mana-auth/src/services/bootstrap-singletons.ts; shared `buildFieldMeta` helper extracted. - `createBetterAuth(databaseUrl, syncDatabaseUrl, webauthn)` now takes the sync-DB URL and lazy-creates a module-scoped postgres pool for the bootstrap inserts. - Hook into `databaseHooks.user.create.after` (only on `created: true` from createPersonalSpaceFor) and `organizationHooks.afterCreateOrganization`. - Webapp `kontextStore.ensureDoc()` made private as `getOrCreateLocalDoc()` — same fallback role as userContextStore's after F5. Public API is now just setContent + appendContent. Plan: docs/plans/sync-field-meta-overhaul.md (F4-fu row in Shipping Log). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| mana-ai | ||
| mana-analytics | ||
| mana-api-gateway | ||
| mana-auth | ||
| mana-crawler | ||
| mana-credits | ||
| mana-events | ||
| mana-geocoding | ||
| mana-image-gen | ||
| mana-landing-builder | ||
| mana-llm | ||
| mana-mail | ||
| mana-mcp | ||
| mana-media | ||
| mana-notify | ||
| mana-persona-runner | ||
| mana-research | ||
| mana-search | ||
| mana-stt | ||
| mana-subscriptions | ||
| mana-sync | ||
| mana-tts | ||
| mana-user | ||
| mana-video-gen | ||
| mana-voice-bot | ||
| news-ingester | ||