UNPKG

codecrucible-synth

Version:

Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability

76 lines 2.62 kB
/** * Task Memory Database - Persistent task state and context management * Enables autonomous agents to resume work after interruptions */ export interface TaskState { task_id: string; title: string; status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'paused'; priority: 'low' | 'medium' | 'high' | 'critical'; created_at: string; updated_at: string; estimated_duration?: string; current_phase: number; total_phases: number; completed_steps: string[]; failed_attempts: FailedAttempt[]; agent_assignments: AgentAssignment[]; context_data: Record<string, any>; results: Record<string, any>; checkpoints: TaskCheckpoint[]; } export interface FailedAttempt { step: string; error: string; timestamp: string; agent_id?: string; retry_count: number; } export interface AgentAssignment { agent_id: string; role: string; status: 'assigned' | 'working' | 'completed' | 'failed'; assigned_steps: string[]; last_activity: string; } export interface TaskCheckpoint { id: string; phase: number; description: string; timestamp: string; git_commit?: string; rollback_script?: string; } export declare class TaskMemoryDB { private dbPath; private tasks; private initialized; constructor(dbPath?: string); initialize(): Promise<void>; createTask(params: { title: string; priority: TaskState['priority']; estimated_duration?: string; total_phases: number; context_data?: Record<string, any>; }): Promise<TaskState>; updateTask(task_id: string, updates: Partial<TaskState>): Promise<TaskState | null>; addCheckpoint(task_id: string, checkpoint: Omit<TaskCheckpoint, 'id' | 'timestamp'>): Promise<boolean>; recordFailedAttempt(task_id: string, step: string, error: string, agent_id?: string): Promise<boolean>; assignAgent(task_id: string, agent_id: string, role: string, steps: string[]): Promise<boolean>; getTask(task_id: string): Promise<TaskState | null>; getAllTasks(): Promise<TaskState[]>; getActiveTasks(): Promise<TaskState[]>; markStepCompleted(task_id: string, step: string, result?: any): Promise<boolean>; getTaskProgress(task_id: string): Promise<{ task: TaskState | null; progress_percentage: number; current_phase_progress: number; estimated_remaining: string; next_steps: string[]; } | null>; private persist; cleanup(): Promise<void>; } export declare const taskMemoryDB: TaskMemoryDB; //# sourceMappingURL=task-memory-db.d.ts.map