openmixer — generated API reference
    Preparing search index...

    Interface LatchConfig<A, S>

    Everything a latch row declares: a scalar record, plus the query, plus mandatory ripples.

    interface LatchConfig<A, S extends object> {
        address: AddressCodec<A>;
        confirm?: ConfirmGate;
        couple?: (current: S, next: S, addr: A) => S;
        fields: FieldSpecs<S, A>;
        fresh?: () => S;
        lifecycle?: LifecycleDoors<A>;
        observe: (addr: A) => S | undefined;
        path: string;
        policy?: ResourcePolicy;
        ripples: (addr: A, before: S, after: S) => readonly RippleTarget[];
        sink?: (addr: A, state: S) => ProjectionResult;
        station: StateStation<A, S>;
    }

    Type Parameters

    • A
    • S extends object

    Hierarchy (View Summary)

    Index
    address: AddressCodec<A>
    confirm?: ConfirmGate

    The confirm gate a write here must pass — see ConsoleResource.confirm. A record names the field transition it holds (mode → 'sip'); the registry decides, the station never sees confirm.

    couple?: (current: S, next: S, addr: A) => S

    Cross-field coupling applied once per accepted patch, after decode+clamp of every field.

    fields: FieldSpecs<S, A>
    fresh?: () => S

    What a fresh instance of this row IS — published row-wide so a client never compiles a declared starting value into its own bundle.

    The SAME factory the store makes a new item with, handed to the contract door rather than restated: makeFbsChannelState() is the arming a channel has before anyone arms it, and a panel that needs the notch Q to reset to must read it from the desk or invent one.

    Declared only where the starting point is genuinely row-wide. A row whose fresh state depends on the device behind the instance omits it, exactly as a per-instance travel is withheld from travels() — a plausible wrong default is the defect this door closes, not one it may introduce.

    lifecycle?: LifecycleDoors<A>

    The item-lifecycle doors. A scalar row is removable when its ONE store can genuinely lose the item — a send DELETE frees the engine's slot, which is a different fact from a level-0 write even though both end with no send in the ledger.

    observe: (addr: A) => S | undefined

    §6c: what the device ACTUALLY holds right now, shaped as this entity's state. undefined means the device cannot be asked — which is never a licence to write.

    path: string

    What a committed write here means for the session's dirtiness and the operator's history. Absent means the layer default: it dirties the session, is not undoable, and is not a barrier (see ResourcePolicy).

    ripples: (addr: A, before: S, after: S) => readonly RippleTarget[]

    Every member the hold touches. Required — a latch with no ripples is not a latch.

    sink?: (addr: A, state: S) => ProjectionResult

    Drives the audio from the post-write state; absent = state-only entity.

    station: StateStation<A, S>