OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

AI index

Spec pack

Data Transmission keeps fetch, realtime, invalidation, and CRDT seams protocol-neutral.

The canonical protocol lives in contracts-spec, the in-house cache/offline/conflict engine and Transport seam live in contracts-runtime-core, and the Loro adapter plugs in as the opt-in CRDT strategy — so collaboration features evolve without pulling CRDT, GraphQL, Drizzle, or hosted transport dependencies into core packages.

Contract surfaces

  • one canonical QueryEnvelope / QueryResultEnvelope carried by every transport

  • realtime subscribe, invalidation, reconnect, and idempotency semantics on the Transport.subscribe() seam + InvalidationTag vocabulary

  • DataView compatibility metadata for queryable/presentable data surfaces

  • collaboration envelopes that keep CRDT engines behind adapters

Package boundaries

  • @lssm-tech/lib.contracts-spec owns the canonical, I/O-free protocol: QueryEnvelope, QueryResultEnvelope, cache-status, invalidation tags, conflict policy, version token, and consistency.

  • @lssm-tech/lib.contracts-runtime-core owns the in-house cache/offline/conflict engine, the Transport port + subscribe() realtime seam, and the re-homed Collaboration* envelopes.

  • @lssm-tech/integration.crdt-loro is the only package that imports loro-crdt; it plugs into the engine conflict-resolver registry as the opt-in CRDT strategy.

  • The standalone @lssm-tech/lib.data-transmission-spec and -runtime packages were absorbed into the canonical protocol and removed in the data-fetching reset.

V0 verification

This pass ships the realtime-ready foundation, not hosted realtime: the Transport.subscribe() seam is defined and the worker runs on it, while full WebSocket delivery and production CRDT persistence remain follow-ons. The Loro adapter stays out of promoted release checks until root typecheck, lint, repo health, strict release check, and focused CRDT checks pass together.

bun run --cwd packages/libs/contracts-runtime-core typecheck
bun test packages/libs/contracts-runtime-core/src
bun test packages/integrations/crdt-loro/src
bun run workflows:check:no-prisma