import { type PlanDocument, type PlanPhase, type TaskStatus } from './schema'; /** * Error thrown by PlanManager operations */ export declare class PlanManagerError extends Error { code: string; cause?: unknown | undefined; constructor(message: string, code: string, cause?: unknown | undefined); } /** * Interface for plan management operations */ export interface PlanManager { /** * Load and parse a plan from file (plan.md or plan.json) * @param filePath - Path to plan file (optional, uses default discovery) * @returns Parsed plan document * @throws PlanManagerError if loading or parsing fails */ loadPlan(filePath?: string): Promise; /** * Get the current active phase * @returns Current phase or null if no active phase */ getCurrentPhase(): PlanPhase | null; /** * Update the status of a specific task * @param taskId - Task identifier * @param status - New status value * @returns true if update succeeded * @throws PlanManagerError if task not found */ updateTaskStatus(taskId: string, status: TaskStatus): Promise; /** * Get the resolved path to the plan file * @returns Absolute path to plan file */ getPlanPath(): string; /** * Get the currently loaded plan document * @returns Current plan or null if not loaded */ getPlan(): PlanDocument | null; } /** * Options for creating a PlanManager instance */ export interface PlanManagerOptions { /** Base directory for plan discovery */ baseDir: string; /** Default plan file name (default: 'plan.json') */ defaultPlanName?: string; /** Whether to auto-discover plan.md if plan.json not found */ autoDiscoverMarkdown?: boolean; } /** * Create a new PlanManager instance */ export declare function createPlanManager(options: PlanManagerOptions): PlanManager; /** * Load a plan document from file directly (convenience function) */ export declare function loadPlanDocument(filePath: string): Promise;