import type { AgentRunId, AttemptId, FactoryRunId, GoalId, I1AttentionReason, I1ChangeSetReviewReadModel, I1FactoryRunDetailReadModel, I1FailureDetail, I1MergedResultIdentity, I1NextAction, I1RealtimeEntityType, I1RealtimeProjectionEnvelope, I1RepositoryRevisionIdentity, I1RetryDisposition, I1ReviewFinding, I1VerificationEvidence, I1WaitReason, I1WipSafety, PlanId, PrincipalId, ProjectId, TaskId } from "@awp/contracts";
import { type AgentRun, type Attempt, type ChangeSet, type FactoryRun, type Goal, type Plan, type Project, type QueueEntry, type Review, type Task } from "@awp/domain";
export interface I1GoalReadModel {
    readonly id: GoalId;
    readonly title: string;
    readonly status: Goal["status"];
}
export interface I1PlanReadModel {
    readonly id: PlanId;
    readonly title: string;
    readonly status: Plan["status"];
    readonly goalIds: readonly GoalId[];
}
export interface I1FactoryRunReadModel {
    readonly id: FactoryRunId;
    readonly status: FactoryRun["status"];
    readonly reason?: string;
}
export interface I1ProjectOverviewReadModel {
    readonly project: {
        readonly id: ProjectId;
        readonly name: string;
        readonly repositoryUrl: string;
        readonly requiredChecks: readonly string[];
        readonly status: Project["status"];
    };
    readonly goals: readonly I1GoalReadModel[];
    readonly plans: readonly I1PlanReadModel[];
    readonly queue: readonly QueueEntry[];
    readonly factoryRuns: readonly I1FactoryRunReadModel[];
}
export declare function projectOverviewReadModel(input: {
    project: Project;
    goals: readonly Goal[];
    plans: readonly Plan[];
    planGoalIds: ReadonlyMap<PlanId, readonly GoalId[]>;
    tasks: readonly Task[];
    queueOrder: readonly TaskId[];
    factoryRuns: readonly FactoryRun[];
}): I1ProjectOverviewReadModel;
export interface I1WorkProjectionFacts {
    readonly taskId: TaskId;
    readonly currentActorId?: PrincipalId;
    readonly stage: string;
    readonly lastProgressAt?: string;
    readonly deadlineAt?: string;
    readonly wait?: I1WaitReason;
    readonly attention: I1AttentionReason;
    readonly nextAction: I1NextAction;
}
export interface I1FactoryRunDetailInput {
    readonly factoryRun: FactoryRun;
    readonly tasks: readonly Task[];
    readonly agentRuns: readonly AgentRun[];
    readonly attempts: readonly Attempt[];
    readonly currentAttemptIds: ReadonlyMap<AgentRunId, AttemptId>;
    readonly workFacts: readonly I1WorkProjectionFacts[];
    readonly stage: string;
    readonly lastProgressAt?: string;
    readonly deadlineAt?: string;
    readonly wait?: I1WaitReason;
    readonly failure?: I1FailureDetail;
    readonly retryDisposition: I1RetryDisposition;
    readonly wip: I1WipSafety;
    readonly liveExecutorPresent: boolean;
    readonly historicalAvailable: boolean;
    readonly continuation: I1FactoryRunDetailReadModel["continuation"];
}
export declare function factoryRunDetailReadModel(input: I1FactoryRunDetailInput): I1FactoryRunDetailReadModel;
export interface I1ChangeSetReviewInput {
    readonly changeSet: ChangeSet;
    readonly reviews: readonly Review[];
    readonly findings: readonly I1ReviewFinding[];
    readonly evidence: readonly I1VerificationEvidence[];
    readonly expectedTarget: I1RepositoryRevisionIdentity;
    readonly publicationFidelitySatisfied: boolean;
    readonly policySatisfied: boolean;
    readonly authoritySatisfied: boolean;
    readonly targetHeadCurrent: boolean;
    readonly mergedResult?: I1MergedResultIdentity;
}
export declare function changeSetReviewReadModel(input: I1ChangeSetReviewInput): I1ChangeSetReviewReadModel;
export declare function realtimeProjectionEnvelope<T>(input: {
    readonly entityType: I1RealtimeEntityType;
    readonly entityId: string;
    readonly revision: number;
    readonly sequence: number;
    readonly observedAt: string;
    readonly payload: T;
}): I1RealtimeProjectionEnvelope<T>;
//# sourceMappingURL=read-models.d.ts.map