export type BacklogSource = 'curated' | 'github' | 'proposed'; export interface BacklogItem { readonly id: string; readonly source: BacklogSource; readonly title: string; readonly description: string; readonly priority: number; readonly slug: string; readonly originUrl?: string; readonly originRef?: string; readonly tags: readonly string[]; } export type IterationPhase = 'pending' | 'feat' | 'build' | 'ship' | 'merge-wait' | 'main-green-wait' | 'shipped' | 'partial-shipped' | 'failed'; export interface RepoOutcome { readonly repo: string; readonly branch: string; readonly status: 'success' | 'partial' | 'failure' | 'skipped'; readonly iterations: number; readonly tests: 'pass' | 'fail' | 'skipped'; readonly lint: 'clean' | 'violations' | 'skipped'; readonly filesChanged: number; readonly prNumber?: number; readonly prUrl?: string; readonly mergeSha?: string; readonly summary?: string; } export interface IterationState { readonly slug: string; readonly title: string; readonly source: BacklogSource; readonly phase: IterationPhase; readonly startedAt: string; readonly updatedAt: string; readonly endedAt?: string; readonly repoOutcomes: readonly RepoOutcome[]; readonly haltReason?: string; } export interface FactoryState { readonly version: 1; readonly currentSlug: string | null; readonly currentPhase: IterationPhase | null; readonly iterationsThisRun: number; readonly consecutiveFailures: number; readonly startedAt: string | null; readonly updatedAt: string; readonly lastShipped: { readonly slug: string; readonly endedAt: string; } | null; /** Per-slug failure counts. Slugs with N+ failures are quarantined. */ readonly failuresBySlug?: Readonly>; /** Cumulative Anthropic token + cost spend for this run. */ readonly cost?: { readonly inputTokens: number; readonly outputTokens: number; readonly cacheReadTokens: number; readonly cacheWriteTokens: number; readonly estimatedUsd: number; }; } export interface FactoryRepoConfig { readonly version: 1; readonly test?: string; readonly lint?: string; readonly build?: string; readonly forbiddenPaths: readonly string[]; readonly autoMerge: boolean; readonly mainBranch: string; } export type HaltReason = 'kill-switch' | 'build-failure' | 'ci-red' | 'consecutive-failures' | 'merge-unresolvable' | 'main-green-timeout' | 'iteration-budget' | 'no-backlog-items' | 'manual-stop' | 'cost-budget' | 'forbidden-paths' | 'diff-too-large'; export interface HaltDecision { readonly halt: boolean; readonly reason?: HaltReason; readonly detail?: string; } //# sourceMappingURL=types.d.ts.map