import type { JsonValue } from "../../core/types.js"; import type { LocusActionPayloads, LocusClientRecoverMessage, LocusConnectionContext, LocusDisposer, LocusServerMessage } from "../../types/locus.types.js"; /** * Internal typed downstream sink. Transport adapters frame these semantic * outputs; Locus authority never needs to know how their bytes are carried. */ export type LocusDownstreamSink = Readonly<{ finite: (outcome: LocusFiniteOperationOutcome) => void; synchronization: (output: TSynchronization) => void; publication: (publication: TPublication) => void; event: (event: LocusTransientEventOutput) => void; }>; /** * Internal semantic attachment. A WebSocket is one adapter for this shape; * future finite-operation and synchronization transports may be composed * around the same authority/session binding. */ export type LocusSemanticAttachment = Readonly<{ binding: LocusAuthoritySessionBinding; operations: Readonly<{ submit: (request: LocusFiniteOperationRequest) => void | Promise; }>; synchronization: Readonly<{ begin: (request: TSynchronizationRequest) => void; cancel: () => void; }>; emit_event: (event: string, payload: JsonValue) => void; close: (hostShutdown?: boolean) => void; }>; export type LocusSemanticAttachmentOptions = Readonly<{ downstream: LocusDownstreamSink; connection?: LocusConnectionContext; /** Adapter-owned physical listener cleanup, invoked when the attachment ends. */ onClose?: LocusDisposer; }>; export declare function register_locus_semantic_attachment_internal(locus: object, factory: (options: LocusSemanticAttachmentOptions) => LocusSemanticAttachment): void; /** Attach typed operation and synchronization capabilities to one Locus authority. */ export declare function attach_locus_semantic_transport_internal(locus: object, options: LocusSemanticAttachmentOptions): LocusSemanticAttachment; /** Deliver one typed server output to its semantic downstream capability. */ export declare function deliver_locus_downstream_internal(sink: LocusDownstreamSink, message: LocusServerMessage): void; //# sourceMappingURL=locus.transport.internal.d.ts.map