import type { Adapter } from "../adapter.js"; import { type EventV3WriteMode } from "../events/v3/control.js"; import { type RecordCoordinationAuthorityV3Result } from "../events/v3/producers/coordination-recorder.js"; import { type Heartbeat } from "./state/heartbeat-writer.js"; export declare const LIVE_COORDINATION_V3_PRODUCER_ID: "prd_agent-coord"; export declare class LiveCoordinationAuthorityV3Error extends Error { readonly reason: string; constructor(reason: string); } export type LiveCoordinationAuthorityV3Result = { state: "unchanged"; } | { state: "recorded"; result: RecordCoordinationAuthorityV3Result; }; export interface ReopenedLiveCoordinationGenerationV3 { state: "reopened"; adapter: Adapter; prior_generation_id: `gen_${string}`; generation_id: `gen_${string}`; } export interface BootstrappedLiveCoordinationAuthorityV3 { state: "created" | "reused"; adapter: Adapter; generation_id: `gen_${string}`; heartbeat: Heartbeat; } export interface RestoredLiveCoordinationStateV3 { state: "unchanged" | "restored"; task: boolean; claims: number; lifecycle: boolean; } interface LiveAuthorityBaseV3 { coordRoot: string; owner: string; subject?: string; nativeSessionId: string; adapter: Adapter; observationId?: string; } /** * Establish the missing generation authority for one adapter-native session, * then reconstruct its disposable heartbeat cache. * * This is intentionally narrower than mid-flight hook onboarding. The caller * must supply an already validated native session, adapter, and current * instance identity. Existing authority is reused only when all three bind to * the same non-terminal producer generation. A terminal generation, an * adapter/session collision, or any disagreement between private producer * control and the public projection fails closed. No turn is synthesized. */ export declare function bootstrapLiveCoordinationAuthorityV3(input: { coordRoot: string; owner: string; nativeSessionId: string; adapter: Adapter; }): BootstrappedLiveCoordinationAuthorityV3; /** * Reapply private, generation-bound coordination state after a runtime epoch * replaces the canonical ledger. The old heartbeat is only accepted for the * same native session and a different V3 generation. Its task prose and * lifecycle reason remain in the disposable cache; canonical events retain * only the privacy-safe authority signals. */ export declare function restoreLiveCoordinationStateAfterEpochV3(input: { coordRoot: string; owner: string; nativeSessionId: string; adapter: Adapter; prior: Heartbeat | null; currentGenerationId?: `gen_${string}`; }): RestoredLiveCoordinationStateV3; /** * Open a fresh derived generation for a human-facing session that is executing * again after an authoritative terminal. The terminal generation is never * changed or reused. */ export declare function reopenLiveCoordinationGenerationV3(input: { coordRoot: string; owner: string; nativeSessionId: string; }): ReopenedLiveCoordinationGenerationV3; export declare function recordLiveTaskChangeV3(input: LiveAuthorityBaseV3 & { task: string; }): LiveCoordinationAuthorityV3Result; export declare function recordLiveLifecycleChangeV3(input: LiveAuthorityBaseV3 & { state: "active" | "blocked" | "done"; reason?: string; suggestedSessionName?: string; observedAt?: string; }): LiveCoordinationAuthorityV3Result; export declare function recordLiveClaimChangeV3(input: LiveAuthorityBaseV3 & { operation: "acquired" | "released"; path: string; access?: "read" | "write"; }): LiveCoordinationAuthorityV3Result; export declare function recordLiveIdentityChangeV3(input: LiveAuthorityBaseV3 & { name: string; identityId: string; }): LiveCoordinationAuthorityV3Result; export declare function liveCoordinationWriteModeV3(coordRoot: string): EventV3WriteMode; export declare function coordinationAuthorityStateDigestV3(heartbeat: Heartbeat): `sha256:${string}`; export {}; //# sourceMappingURL=live-authority-v3.d.ts.map