2026-08-18 00:05:57 +02:00
|
|
|
# CultMesh Browser
|
|
|
|
|
|
|
|
|
|
`cultmesh-browser` is the browser-safe CultMesh client boundary. It owns one
|
|
|
|
|
WebSocket session for a stable Verse/provider identity, retains explicit raw
|
|
|
|
|
document leases across route replacement, and correlates typed CultNet
|
|
|
|
|
operations with provider receipts.
|
|
|
|
|
|
|
|
|
|
It does not own application state and it does not expose direct document
|
|
|
|
|
writes. A renderer watches provider-owned records and invokes provider-owned
|
|
|
|
|
operations.
|
|
|
|
|
|
|
|
|
|
```ts
|
2026-08-18 00:34:44 +02:00
|
|
|
const odin = new CultMeshBrowserOdinRendezvous({
|
|
|
|
|
endpoints: ["wss://odin.example/verse"],
|
|
|
|
|
runtimeId: "counter-browser.discovery",
|
|
|
|
|
});
|
|
|
|
|
|
2026-08-18 00:05:57 +02:00
|
|
|
const mesh = await CultMeshBrowserClient.connect({
|
|
|
|
|
verseId: "sample.counter",
|
|
|
|
|
providerId: "sample.counter-provider",
|
|
|
|
|
runtimeId: "counter-browser",
|
2026-08-18 00:34:44 +02:00
|
|
|
rendezvous: odin,
|
2026-08-18 00:05:57 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const counter = await mesh.leaseRawDocument({
|
|
|
|
|
schemaId: "sample.counter_state.v1",
|
|
|
|
|
recordKey: "counter:main",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
counter.watch(record => renderCounter(decodeCultNetPayload(record)));
|
|
|
|
|
```
|
|
|
|
|
|
2026-08-18 00:34:44 +02:00
|
|
|
`CultMeshBrowserOdinRendezvous` speaks the canonical CultNet Verse-catalog
|
|
|
|
|
messages to one or more configured Odin WebSocket endpoints. Application code
|
|
|
|
|
supplies stable identity; it does not own endpoint selection, reconnect, or
|
|
|
|
|
resubscription. The physical provider socket is a replaceable route, not the
|
2026-08-18 00:05:57 +02:00
|
|
|
provider identity.
|
|
|
|
|
|
|
|
|
|
The browser handshake carries authentication through the host application's
|
|
|
|
|
ordinary secure cookie or equivalent upgrade credential. The C# host adapter
|
|
|
|
|
rejects endpoints without an authorization predicate unless anonymous local
|
|
|
|
|
development is explicitly enabled.
|
|
|
|
|
|
|
|
|
|
Run `scripts/verify-eve-browser-network.mjs --eve-root <path-to-Eve>` for the
|
|
|
|
|
real Chromium + C# headless chronology.
|