storeRegistry: route ng through @ng-eventually/client (post-merge integration)

Post-merge audit of main's shared-wallet shim: storeRegistry.ts was the only
runtime path still importing `ng` from @ng-org/web directly, bypassing the lib.
Route it through @ng-eventually/client (the ng proxy forwards doc_create /
sparql_update / sparql_query). Now the only @ng-org runtime imports in the app
are the single injection point (ngSession) + documented exceptions (auth-setup,
mock harness) + generated ORM type-only bindings — the decision_2026-06-17
invariant holds again.

Still in-app, to move into the lib later: storeRegistry, AccountContext, the
isolation filter (distinct from the lib's ReadCap filter).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sylvain Duchesne
2026-06-30 13:07:28 +02:00
parent c52e581e4f
commit 685f6d379d
2 changed files with 5 additions and 1 deletions
@@ -56,6 +56,10 @@ Tout le polyfill qui compense l'immaturité de NextGraph (pas de lecture cross-w
Reste à implémenter dans la lib (stubs `TODO`, nécessitent la couche comptes/caps pour être *actifs* dans l'app) : **garde d'écriture** (`caps.canWrite` est prêt côté registre), **`inbox.post`** + matérialisation, **login wallet partagé**.
### Intégration du shim mono-wallet (merge 2026-06-30)
Le merge de `main` (shim staging wallet partagé : `storeRegistry`, comptes, isolation, e2e multi-navigateur) a ramené du code écrit contre le SDK brut. **Audit post-merge** : le seul écart à l'invariant « tout passe par `@ng-eventually/client` » était `storeRegistry.ts` qui importait `ng` de `@ng-org/web` ; **corrigé** → il importe `ng` de la lib (le proxy forwarde `doc_create`/`sparql_update`/`sparql_query`). Désormais, les **seuls** imports `@ng-org` runtime de l'app sont le **point d'injection** (`ngSession`) + les exceptions documentées (`auth-setup`, `harness` mock) + les bindings ORM générés (`import type`). L'invariant tient. **Encore in-app** (à migrer dans la lib ensuite) : `storeRegistry`, `AccountContext`, filtre d'**isolation** (`isolation.ts`) — distinct du filtre **ReadCap** de la lib ([[brief_2026-06-15_shared-wallet-shim]]).
## Open Questions
- **Curateur d'index / index global** : package `@ng-eventually/service` **retiré pour l'instant** (2026-06-21) — modèle « backend » incorrect ([[knowledge_apps-and-services]]). À **réintroduire** (et nommer : curateur/admin) quand le **mécanisme cible d'index global** sera tranché (app singleton ? voie plus simple ?) — incertain, **à creuser plus tard**.
+1 -1
View File
@@ -25,7 +25,7 @@
* against the verified SDK surface but must be validated against a live broker.
*/
import { ng } from '@ng-org/web';
import { ng } from '@ng-eventually/client';
import { sessionPromise } from './ngSession';
import { normalizeUsername } from '../context/AccountContext';