import type { PortableTool } from "../portable-tool.js";
export declare const PLAN_MODE_TOOL_NAME: "plan_mode";
export type PlanModeAction = "enter" | "exit";
export interface PlanModeToolParams {
    /** Action: enter or exit plan mode */
    action: PlanModeAction;
    /** Plan text (for exit — the finalized plan to present for approval) */
    plan?: string;
    /** File path where plan was saved (optional) */
    planFilePath?: string;
    /**
     * Semantic permissions to request on exit (CC ExitPlanModeV2 parity).
     * Each entry describes a tool + intent the agent wants permission for.
     */
    allowedPrompts?: Array<{
        tool: string;
        prompt: string;
    }>;
}
export declare const PLAN_MODE_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly action: {
            readonly type: "string";
            readonly enum: readonly ["enter", "exit"];
            readonly description: string;
        };
        readonly plan: {
            readonly type: "string";
            readonly description: string;
        };
        readonly planFilePath: {
            readonly type: "string";
            readonly description: "Optional file path where the plan was saved for reference.";
        };
        readonly allowedPrompts: {
            readonly type: "array";
            readonly description: string;
            readonly items: {
                readonly type: "object";
                readonly properties: {
                    readonly tool: {
                        readonly type: "string";
                        readonly description: "Tool name to pre-approve.";
                    };
                    readonly prompt: {
                        readonly type: "string";
                        readonly description: "Intent description for this permission.";
                    };
                };
                readonly required: readonly ["tool", "prompt"];
            };
        };
    };
    readonly required: readonly ["action"];
};
/** Tools allowed during plan mode (read-only + reasoning + task tracking) */
export declare const PLAN_MODE_ALLOWED_TOOLS: readonly string[];
export interface PlanModeState {
    active: boolean;
    enteredAt?: string;
    plan?: string;
    planFilePath?: string;
}
export interface PlanModeResult {
    success: boolean;
    state: PlanModeState;
    allowedTools?: readonly string[];
    error?: string;
}
/**
 * Host-provided plan mode backend.
 * The host is responsible for filtering tool availability based on mode state.
 */
export interface PlanModeToolDeps {
    /** Get current plan mode state */
    getState(): PlanModeState;
    /** Enter plan mode — host should restrict tool availability */
    enterPlanMode(): Promise<PlanModeResult>;
    /** Exit plan mode — host restores full tool availability */
    exitPlanMode(plan?: string, planFilePath?: string): Promise<PlanModeResult>;
    /** Check if in agent/sub-agent context (plan mode not allowed in sub-agents) */
    isAgentContext?(): boolean;
    /**
     * Request approval for the plan from the user/coordinator.
     * CC parity: ExitPlanModeV2 triggers an approval dialog on exit.
     * Returns true if approved, false if rejected.
     */
    requestPlanApproval?(plan: string, allowedPrompts?: Array<{
        tool: string;
        prompt: string;
    }>): Promise<boolean>;
    /**
     * Persist plan to disk (CC parity: plan is saved to planFilePath).
     */
    persistPlan?(plan: string, filePath: string): Promise<void>;
}
export declare function createPlanModeTool(deps: PlanModeToolDeps): PortableTool<PlanModeToolParams>;
