/** * Planning Tools - Claude Code-style planning with suggestions and user input * * Workflow: Explore → Plan → Execute * Each plan step supports: * - Pre-generated suggestions * - User custom instructions * - Editable step details */ import type { ToolDefinition } from '../core/toolRuntime.js'; /** * A single step in a plan with suggestions for user selection */ export interface PlanStep { /** Step description/title */ description: string; /** Pre-generated suggestions for this step (user can select or write their own) */ suggestions?: string[]; /** User's selected or custom instruction for this step */ userInstruction?: string; /** Files/components this step will affect */ affectedScope?: string[]; /** Estimated complexity: low, medium, high */ complexity?: 'low' | 'medium' | 'high'; /** Whether this step requires user confirmation before execution */ requiresConfirmation?: boolean; /** Dependencies on other step indices */ dependsOn?: number[]; } /** * Complete plan with metadata */ export interface Plan { /** Plan title/summary */ title: string; /** Overall explanation of the plan */ explanation: string; /** Individual steps */ steps: PlanStep[]; /** Whether exploration was completed before planning */ explorationComplete: boolean; /** Summary of what was learned during exploration */ explorationSummary?: string; /** Identified risks or concerns */ risks?: string[]; /** Alternative approaches considered */ alternatives?: string[]; } /** * User's response to a plan step */ export interface StepUserInput { /** Which suggestion was selected (index), or -1 for custom */ selectedSuggestion: number; /** Custom instruction if selectedSuggestion is -1 */ customInstruction?: string; /** Whether to skip this step */ skip?: boolean; /** Additional notes from user */ notes?: string; } /** * Callback for plan approval with step-by-step user input */ export type PlanApprovalCallback = (plan: Plan, resolve: (result: PlanApprovalResult) => void) => void; export interface PlanApprovalResult { approved: boolean; /** User inputs for each step (index matches step index) */ stepInputs?: StepUserInput[]; /** Overall feedback from user */ feedback?: string; /** Whether to re-plan with modifications */ requestRePlan?: boolean; } export declare function setPlanApprovalCallback(callback: PlanApprovalCallback | null): void; export declare function getPlanApprovalCallback(): PlanApprovalCallback | null; export declare function setExplorationComplete(complete: boolean): void; export declare function isExplorationComplete(): boolean; export declare function getCurrentPlan(): Plan | null; export declare function createPlanningTools(_workingDir: string): ToolDefinition[]; //# sourceMappingURL=planningTools.d.ts.map