UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

37 lines • 2.17 kB
import { type RecoveryCarrier } from "../../core/session-recovery-identity.ts"; import type { CanonicalRecord, CanonicalUnit } from "./compact-lane-transitions.ts"; export interface CanonicalControl { readonly record: CanonicalRecord; readonly carrier: RecoveryCarrier; } /** * Joins the two projections of one session event into one acceptance unit (RULING-26 Q2). The structured lane emits * before the legacy listeners, so an event's canonical record waits here, keyed by the per-event recovery carrier both * projections share, until its legacy record arrives; a block control has no legacy record and is a unit by itself. * Canonical records take JSON wire semantics at this boundary: `undefined` properties are dropped (#4425 LOW 4), and a * record deeper than the protocol depth limit is refused typed before its clone and never pairs (RULING-59 C). The * caller reports that refusal; `refused` then tells the event's legacy record, so the event is counted once. */ export declare class CanonicalPairing { private readonly pending; private readonly refusals; structured(record: object): CanonicalControl | undefined; take(legacy: object): CanonicalRecord | undefined; /** Whether the canonical record of `legacy`'s event was refused at the protocol depth limit (and reported). */ refused(legacy: object): boolean; } /** * A worker binding hands the paired canonical record, or the fact that the pairing refused it at the depth limit, to * its frame writer beside the unchanged legacy record. */ export declare function carryCanonical(legacy: object, canonical: CanonicalRecord | undefined, refused: boolean): void; export declare function carriedCanonical(legacy: object): CanonicalRecord | undefined; export declare function carriedRefusal(legacy: object): boolean; /** The canonical unit a worker frame carries, when it carries one. */ export declare function frameUnit(frame: { readonly ordinal?: number; readonly firstOrdinal?: number; readonly recovery?: RecoveryCarrier; readonly canonical?: CanonicalRecord; }): CanonicalUnit | undefined; //# sourceMappingURL=compact-canonical-pairing.d.ts.map