/** * `LiveCell` — bridge between protocol envelope and reactive runtime. * * A LiveCell is a Cell that also carries a CellEnvelope, tracking * its kind, content address, metadata (HLC timestamps, version), * and boundary crossings. * * @module */ import type { Scope } from 'effect'; import { Effect, Stream } from 'effect'; import { Cell } from './cell.js'; import type { CellKind, CellEnvelope } from './protocol.js'; import type { BoundaryCrossing } from './type-utils.js'; import { Boundary } from './boundary.js'; interface LiveCellShape extends Omit, '_tag'> { readonly _tag: 'LiveCell'; readonly envelope: Effect.Effect>; readonly crossings: Stream.Stream>; readonly kind: K; publishCrossing(crossing: BoundaryCrossing): Effect.Effect; } declare function _make(kind: K, initial: T): Effect.Effect, never, Scope.Scope>; /** * Create a boundary-kind LiveCell that automatically publishes crossings * when the numeric value transitions between boundary states. */ declare function _makeBoundary(boundary: Boundary.Shape, initial: number): Effect.Effect, never, Scope.Scope>; /** * LiveCell — bridge between the {@link Cell} reactive graph and the wire * protocol. A `LiveCell` wraps a `Cell` with a typed {@link CellEnvelope} — * kind, content address, HLC, boundary crossings — so primitives can travel * between peers as self-describing messages. */ export declare const LiveCell: { /** Wrap an arbitrary value in a {@link LiveCell} with freshly minted identity + HLC. */ make: typeof _make; /** Specialized factory for boundary crossings so the envelope captures crossing metadata. */ makeBoundary: typeof _makeBoundary; }; export declare namespace LiveCell { /** Structural shape of a {@link LiveCell} parameterized by cell kind `K` and value type `T`. */ type Shape = LiveCellShape; } export {}; //# sourceMappingURL=live-cell.d.ts.map