/** * Task ID resolution utilities. * Supports multiple formats: full path, full task ID, plan#agent shorthand, agent-only. */ /** * Resolved task identifier with all components. */ export interface ResolvedTaskId { /** Plan folder name (e.g., "0001-network-panel") */ planFolder: string; /** Agent number (e.g., "002") */ agentNumber: string; /** Full task ID (e.g., "0001-network-panel#002") */ taskId: string; /** Path to the agent file */ path: string; } /** * Options for task ID resolution. */ export interface ResolveOptions { /** Path to plans directory */ plansPath: string; /** Current plan context for agent-only resolution */ planContext?: string; } /** * Find plan folders matching a prefix. * * @param plansPath - Path to plans directory * @param prefix - Prefix to match (e.g., "0001", "0001-net") * @returns Array of matching plan folder names */ export declare function findPlansByPrefix(plansPath: string, prefix: string): string[]; /** * List all available plans in the plans directory. * * @param plansPath - Path to plans directory * @returns Array of plan folder names */ export declare function listAllPlans(plansPath: string): string[]; /** * Error thrown when a task ID is ambiguous (matches multiple plans). */ export declare class AmbiguousTaskIdError extends Error { readonly prefix: string; readonly matches: string[]; readonly suggestions: string[]; constructor(prefix: string, matches: string[]); } /** * Resolve a task ID from various input formats. * * Supported formats: * - Full path: "/path/to/plans/0001-name/agents/002_agent.agent.md" * - Full task ID: "0001-network-panel#002" * - Plan prefix + agent: "0001#002", "1#2" * - Agent only (requires planContext): "002", "2" * * @param input - Task identifier in any supported format * @param options - Resolution options * @returns Resolved task ID with all components * @throws {Error} If input format is invalid or resolution fails * @throws {AmbiguousTaskIdError} If plan prefix matches multiple plans */ export declare function resolveTaskId(input: string, options: ResolveOptions): ResolvedTaskId; //# sourceMappingURL=task-resolver.d.ts.map