import type { AgentRunId, ApprovalId, AttemptId, ChangeSetId, ConnectionId, CredentialReferenceId, DecisionId, FactoryRunId, GoalId, PlanId, PlanRevisionId, PrincipalId, ProjectId, ProjectVisionVersionId, ProviderId, RepositoryId, ReviewId, TaskId, WorkspaceId } from "@awp/contracts";
export interface RevisionedEntity {
    readonly revision: number;
}
export type ProjectStatus = "draft" | "onboarding" | "active" | "paused" | "archived";
export interface Project extends RevisionedEntity {
    readonly id: ProjectId;
    readonly name: string;
    readonly status: ProjectStatus;
}
export interface ProjectVisionVersion {
    readonly id: ProjectVisionVersionId;
    readonly projectId: ProjectId;
    readonly sequence: number;
    readonly summary: string;
    readonly supersedesId?: ProjectVisionVersionId;
}
export type GoalStatus = "draft" | "active" | "future" | "parked" | "achieved" | "abandoned";
export interface Goal extends RevisionedEntity {
    readonly id: GoalId;
    readonly projectId: ProjectId;
    readonly title: string;
    readonly description?: string;
    readonly status: GoalStatus;
    readonly priority?: number;
    readonly targetDate?: string;
    readonly successCriteria: readonly string[];
}
export type PlanStatus = "draft" | "ready" | "queued" | "active" | "paused" | "completed" | "cancelled";
export interface Plan extends RevisionedEntity {
    readonly id: PlanId;
    readonly projectId: ProjectId;
    readonly title: string;
    readonly status: PlanStatus;
}
export interface PlanRevision {
    readonly id: PlanRevisionId;
    readonly planId: PlanId;
    readonly projectId: ProjectId;
    readonly sequence: number;
    readonly title: string;
    readonly projectVisionVersionId?: ProjectVisionVersionId;
    readonly goalIds: readonly GoalId[];
}
export type TaskStatus = "planned" | "ready" | "queued" | "executing" | "waiting" | "blocked" | "review" | "correction" | "completed" | "cancelled" | "failed";
export interface Task extends RevisionedEntity {
    readonly id: TaskId;
    readonly projectId: ProjectId;
    readonly planRevisionId: PlanRevisionId;
    readonly title: string;
    readonly status: TaskStatus;
    readonly dependencyIds: readonly TaskId[];
    readonly goalIds?: readonly GoalId[];
}
export type FactoryRunStatus = "planned" | "queued" | "starting" | "running" | "waiting" | "blocked" | "cancelling" | "cancelled" | "failed" | "retryable" | "resolving" | "completed";
export interface FactoryRun extends RevisionedEntity {
    readonly id: FactoryRunId;
    readonly projectId: ProjectId;
    readonly planRevisionId: PlanRevisionId;
    readonly status: FactoryRunStatus;
    readonly reason?: string;
}
export type AgentRunStatus = "planned" | "queued" | "active" | "waiting" | "completed" | "cancelled" | "failed";
export interface AgentRun extends RevisionedEntity {
    readonly id: AgentRunId;
    readonly factoryRunId: FactoryRunId;
    readonly taskId: TaskId;
    readonly status: AgentRunStatus;
    readonly reason?: string;
}
export interface Workspace extends RevisionedEntity {
    readonly id: WorkspaceId;
    readonly projectId: ProjectId;
}
export type AttemptStatus = "created" | "provisioning" | "running" | "checkpointing" | "terminal";
export interface Attempt extends RevisionedEntity {
    readonly id: AttemptId;
    readonly agentRunId: AgentRunId;
    readonly workspaceId: WorkspaceId;
    readonly status: AttemptStatus;
    readonly providerId?: ProviderId;
    readonly accountId?: string;
    readonly model?: string;
}
export type ChangeSetStatus = "collecting" | "candidate-ready" | "publishing" | "published" | "reviewing" | "verifying" | "ready-to-merge" | "merged" | "changes-requested" | "publication-failed" | "superseded" | "cancelled";
export interface ChangeSet {
    readonly id: ChangeSetId;
    readonly projectId: ProjectId;
    readonly repositoryId?: RepositoryId;
    readonly taskId: TaskId;
    readonly producerAttemptId: AttemptId;
    readonly baseIdentity: string;
    readonly candidateDigest: string;
    readonly revision: number;
    readonly status: ChangeSetStatus;
}
export type ReviewStatus = "requested" | "reviewing" | "submitted";
export type ReviewDisposition = "approved" | "changes-requested" | "blocked" | "superseded";
export interface Review {
    readonly id: ReviewId;
    readonly changeSetId: ChangeSetId;
    readonly candidateDigest: string;
    readonly reviewerPrincipalId: PrincipalId;
    readonly status: ReviewStatus;
    readonly disposition?: ReviewDisposition;
}
export interface Decision extends RevisionedEntity {
    readonly id: DecisionId;
    readonly projectId?: ProjectId;
}
export interface Approval extends RevisionedEntity {
    readonly id: ApprovalId;
    readonly decisionId?: DecisionId;
}
export interface ProjectConnectionBinding extends RevisionedEntity {
    readonly projectId: ProjectId;
    readonly connectionId: ConnectionId;
    readonly credentialReferenceId: CredentialReferenceId;
    readonly capabilities: readonly string[];
    readonly resources: readonly string[];
}
//# sourceMappingURL=model.d.ts.map