Initial scaffold: @ng-eventually/client — SDK-shaped polyfill over NextGraph
Generic polyfill layer that makes a single NextGraph broker behave like the not-yet-shipped multi-user NextGraph (emulated capabilities + inbox). Zero app domain. @ng-eventually/client exposes an SDK-identical surface (ng, useShape, inbox); the polyfill bootstrap (configure + capability helpers) is isolated under /polyfill, so the main entry stays a drop-in for @ng-org/web|orm. The real SDK is injected at configure() (no hard import → build-alias safe + testable). Scaffold: NextGraph wiring stubbed with TODO; capability helpers implemented and unit-tested (4 tests, typecheck clean). The global-index curator is deferred — in NextGraph apps/services are mono-user with no global data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @ng-eventually/client — **SDK-identical** surface.
|
||||
*
|
||||
* This entry exposes ONLY what `@ng-org/web` / `@ng-org/orm` expose (current +
|
||||
* anticipated: `inbox`). Import `ng` / `useShape` from here instead of the SDK
|
||||
* during the polyfill period; at migration the build alias is removed and these
|
||||
* resolve to the real SDK with **no code change**.
|
||||
*
|
||||
* The one non-SDK piece — the polyfill bootstrap (`configure`, capability
|
||||
* helpers, current user) — lives at `@ng-eventually/client/polyfill`, and is the
|
||||
* only thing removed at migration.
|
||||
*/
|
||||
|
||||
export * from "./types";
|
||||
export { useShape } from "./use-shape";
|
||||
export * as inbox from "./inbox";
|
||||
|
||||
import { makeNg } from "./ng-proxy";
|
||||
|
||||
/** SDK-identical `ng` (wrapped). Drop-in replacement for `@ng-org/web`'s `ng`. */
|
||||
export const ng: Record<string, any> = makeNg();
|
||||
Reference in New Issue
Block a user