import type { AgentEndEvent } from "../../types.ts";
import type { TodoOwedOutcome } from "./todo-owed-backstop.ts";
import type { TurnEndLivenessInput } from "./turn-end-liveness.ts";
import type { Goal } from "./types.ts";
export interface GoalLifecycleFacts {
    readonly goal: Goal | null;
    readonly input?: TurnEndLivenessInput;
    /** What the todo backstop returned at the last turn end; a repeated `cap` emits no event. */
    readonly todoOutcome?: TodoOwedOutcome;
}
type Collector = (restoredEnd?: AgentEndEvent, goal?: Goal | null) => Promise<GoalLifecycleFacts>;
export declare function onGoalLifecycleChange(owner: object, listener: (goal: Goal | null) => void): () => void;
/** Capture every transition synchronously; a later file reread may have missed a close. */
export declare function goalLifecycleChanged(owner: object, goal: Goal | null): void;
/** The goal builtin owns its timers/latches; lifecycle reads the same live collector. */
export declare function registerGoalLifecycleCollector(owner: object, collect: Collector): () => void;
export declare function collectGoalLifecycleFacts(owner: object, restoredEnd?: AgentEndEvent, goal?: Goal | null): Promise<GoalLifecycleFacts | undefined>;
export {};
//# sourceMappingURL=lifecycle-facts.d.ts.map