2026-02-17 09:13:23 -08:00
|
|
|
export type LoopMode = 'task' | 'phase';
|
2026-02-18 15:16:11 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
export interface SessionConfig {
|
|
|
|
|
agent: string; // "claude-code" | "copilot-cli"
|
|
|
|
|
model: string; // Selected model
|
|
|
|
|
maxIterations: number; // 5-50
|
2026-03-01 12:24:11 -08:00
|
|
|
timeout: number; // Base timeout in minutes per iteration attempt
|
|
|
|
|
maxRetries: number; // Max retry attempts per iteration (timeout increments by 30s each retry)
|
2026-01-27 12:11:00 -08:00
|
|
|
verbose: boolean;
|
|
|
|
|
specPath: string; // Path to the spec directory
|
|
|
|
|
startedAt: string; // ISO timestamp
|
|
|
|
|
currentIteration: number;
|
|
|
|
|
jiraTicketId?: string; // JIRA ticket ID for commit messages
|
2026-02-17 09:13:23 -08:00
|
|
|
loopMode: LoopMode; // "task" = one task per loop, "phase" = one phase per loop
|
2026-01-27 12:11:00 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IterationLogEntry {
|
|
|
|
|
iteration: number;
|
|
|
|
|
timestamp: string; // ISO timestamp
|
|
|
|
|
duration: number; // milliseconds
|
|
|
|
|
exitCode: number;
|
|
|
|
|
status: 'running' | 'completed' | 'error' | 'timeout' | 'interrupted' | 'blocked';
|
|
|
|
|
completionMarker?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type SessionState = 'new' | 'continue' | 'changed';
|
|
|
|
|
|
|
|
|
|
export const DEFAULT_CONFIG: Partial<SessionConfig> = {
|
|
|
|
|
maxIterations: 100,
|
2026-03-01 12:24:11 -08:00
|
|
|
timeout: 3,
|
|
|
|
|
maxRetries: 5,
|
2026-01-27 12:11:00 -08:00
|
|
|
verbose: false,
|
|
|
|
|
currentIteration: 0,
|
2026-02-17 09:13:23 -08:00
|
|
|
loopMode: 'task',
|
2026-01-27 12:11:00 -08:00
|
|
|
};
|