import type { LiveMapAnyOp, LiveMapCommit, LiveMapRootMode } from "../../types/livemap.types.js"; export type LiveMapTransitionNotificationPolicy = "legacy" | "isolate"; /** Opaque, detached view of one prepared but unapplied LiveMap transition. */ export type PreparedLiveMapTransition = Readonly<{ readonly commit: LiveMapCommit; readonly baseRevision: number; readonly nextRevision: number; readonly mode: LiveMapRootMode; }>; export type LiveMapTransitionAcceptance = Readonly<{ commit: LiveMapCommit; notificationFailureCount: number; }>; export type LiveMapTransitionErrorCode = "LIVEMAP_TRANSITION_FOREIGN" | "LIVEMAP_TRANSITION_STALE" | "LIVEMAP_TRANSITION_ALREADY_ACCEPTED" | "LIVEMAP_TRANSITION_DISCARDED" | "LIVEMAP_TRANSITION_INVALID" | "LIVEMAP_MANAGED_MUTATION_REJECTED" | "LIVEMAP_ALREADY_MANAGED"; export declare class LiveMapTransitionError extends Error { readonly code: LiveMapTransitionErrorCode; constructor(code: LiveMapTransitionErrorCode, message: string, options?: ErrorOptions); } export type LiveMapTransitionPreparation = Readonly<{ commit: LiveMapCommit; baseStillCurrent: () => boolean; install: () => void; notify: (commit: LiveMapCommit) => void; }>; export type LiveMapTransitionController = Readonly<{ prepare: (preparation: LiveMapTransitionPreparation) => PreparedLiveMapTransition; accept: (transition: PreparedLiveMapTransition, policy?: LiveMapTransitionNotificationPolicy) => LiveMapTransitionAcceptance; discard: (transition: PreparedLiveMapTransition) => void; invalidate: () => void; assertPublicMutationAllowed: () => void; claimManagement: (owner: object, schedule: LiveMapManagedMutationScheduler) => void; releaseManagement: (owner: object) => void; scheduleManaged: (mutation: (draft: object) => LiveMapCommit) => Promise> | undefined; readonly generation: number; }>; export type LiveMapManagedMutationScheduler = (mutation: (draft: TMap) => LiveMapCommit) => Promise>; export type LiveMapStagedAuthority = Readonly<{ prepare: (mutation: (draft: TMap) => LiveMapCommit) => PreparedLiveMapTransition; accept: LiveMapTransitionController["accept"]; discard: LiveMapTransitionController["discard"]; claimManagement: (owner: object, schedule: LiveMapManagedMutationScheduler) => void; releaseManagement: (owner: object) => void; runManaged: (owner: object, operation: () => T) => T; scheduleManaged: (mutation: (draft: TMap) => LiveMapCommit) => Promise> | undefined; }>; /** Construct one closure-local transition controller for a single LiveMap authority. */ export declare function make_livemap_transition_controller(mode: LiveMapRootMode, getRevision: () => number): LiveMapTransitionController; export declare function register_livemap_staged_authority(map: TMap, authority: LiveMapStagedAuthority): void; /** Package-internal accessor used by the later hosted-authority layer and focused tests. */ export declare function get_livemap_staged_authority(map: TMap): LiveMapStagedAuthority; /** Route a managed link-target mutation without importing Locus into LiveMap. */ export declare function schedule_livemap_managed_mutation(map: TMap, mutation: (draft: TMap) => LiveMapCommit): Promise> | undefined; //# sourceMappingURL=livemap.authority.d.ts.map