/** * Type definitions for the autonomous loop system. */ /** Lap type determines what work a lap performs */ export type LapType = 'A' | 'B' | 'C' | 'D'; /** Human-readable descriptions for lap types */ export declare const LAP_TYPE_LABELS: Record; export interface LoopConfig { /** Anthropic API key */ apiKey: string; /** Model to use for fix-agent calls */ model: string; /** Path to Eddie monorepo root */ rootDir: string; /** Maximum runtime in hours */ maxHours: number; /** Enabled lap types */ enabledTypes: LapType[]; /** Git branch name (auto-generated if not provided) */ branch?: string; /** Create PR at the end */ createPr: boolean; /** Dry run — show plan without executing */ dryRun: boolean; /** Resume from saved state */ resume: boolean; /** Issues per Type A lap */ issuesPerLap: number; /** Fixes per PR chunk (0 = single PR at end) */ chunkSize: number; } export declare const DEFAULT_LOOP_CONFIG: Omit; export interface Violation { line: number; severity: 'error' | 'warning'; description: string; } export interface ViolationIssue { /** GitHub issue number */ number: number; /** File path relative to repo root */ filePath: string; /** Parsed violations */ violations: Violation[]; /** Fix instructions from the issue body */ fixInstructions: string[]; /** Labels on the issue */ labels: string[]; } export interface FixAttempt { /** GitHub issue number */ issueNumber: number; /** File path */ filePath: string; /** Number of violations targeted */ violationCount: number; /** Whether the fix was successful */ success: boolean; /** Remaining violations after fix (0 = clean) */ remainingViolations: number; /** Error message if fix failed */ error?: string; /** Whether this was identified as a false positive */ falsePositive?: boolean; } export interface Observation { /** Short title for the GitHub issue */ title: string; /** Detailed description */ body: string; /** Labels to apply */ labels: string[]; /** Related file path */ filePath?: string; /** GitHub issue number once filed */ issueFiled?: number; } export interface FidelityResult { /** Component name */ componentName: string; /** Overall fidelity score (0-5) */ score: number; /** Per-dimension scores */ dimensions: { imports: number; classStructure: number; propertyApi: number; renderMethod: number; scss: number; registration: number; }; /** Timestamp */ timestamp: string; } export interface LapResult { /** Which lap type was run */ type: LapType; /** Lap number (1-indexed) */ lapNumber: number; /** Duration in ms */ durationMs: number; /** Whether the lap completed successfully */ success: boolean; /** Summary of what happened */ summary: string; /** Fix attempts (Type A) */ fixes?: FixAttempt[]; /** Observations filed as GitHub issues */ observations?: Observation[]; /** Fidelity result (Type B) */ fidelity?: FidelityResult; /** Error if lap failed */ error?: string; } export interface LoopState { /** Start timestamp */ startedAt: string; /** Git branch name */ branch: string; /** Completed laps */ completedLaps: LapResult[]; /** Issue numbers that have been processed (fixed or skipped) */ processedIssues: number[]; /** Components that have been fidelity-tested */ testedComponents: string[]; /** Current lap type index for round-robin */ lapTypeIndex: number; /** Total API calls made */ totalApiCalls: number; } export interface LoopReport { /** Duration of the session */ durationMs: number; /** Total laps completed */ totalLaps: number; /** Laps by type */ lapsByType: Record; /** Total violations fixed */ totalFixed: number; /** Total false positives identified */ totalFalsePositives: number; /** Total errors encountered */ totalErrors: number; /** Fidelity scores */ fidelityScores: FidelityResult[]; /** Issues remaining */ remainingIssueCount: number; /** All lap results */ laps: LapResult[]; } //# sourceMappingURL=types.d.ts.map