/**
 * Plan Command - Plan Management with Ruvector Persistence
 *
 * ARCHITECTURE:
 * - Plans are generated once by the planner and persisted in Ruvector
 * - Inspection is retrieval-only from Ruvector
 * - Planner = compute once, Ruvector = memory forever
 *
 * SUBCOMMANDS:
 * - (default) Generate plan via planner and persist to Ruvector
 * - list      List all plans from Ruvector
 * - inspect   Retrieve a specific plan by ID from Ruvector (NO PLANNER CALLS)
 * - delete    Delete a plan from Ruvector
 * - approve   Approve a plan and persist status change
 *
 * CRITICAL RULES:
 * - plan inspect MUST NOT call planner
 * - plan inspect MUST NOT interpret UUID as intent
 * - Persistence is mandatory - failure to persist = command failure
 */
import type { CommandOptions, PlanReference } from '../types/index.js';
export declare const PLAN_EXIT_CODES: {
    readonly SUCCESS: 0;
    readonly INPUT_ERROR: 100;
    readonly NOT_FOUND: 100;
    readonly IO_ERROR: 74;
    readonly AUTH_ERROR: 77;
    readonly STORAGE_ERROR: 69;
    readonly UNEXPECTED_ERROR: 1;
};
/**
 * Ruvector Plan Storage Format.
 * Plans stored in Ruvector include all planning output plus metadata.
 */
export interface RuvectorPlan {
    id: string;
    type: 'plan';
    intent: string;
    plan: unknown;
    created_at: string;
    org_id: string;
    user_id: string;
    checksum: string;
}
/**
 * Legacy PlanRecord for backward compatibility with local operations.
 */
export interface PlanRecord {
    id: string;
    name: string;
    description: string;
    status: PlanStatus;
    manifest_query?: string;
    approved_at?: string;
    approved_by?: string;
    created_at: string;
    updated_at: string;
    version: number;
    metadata?: Record<string, unknown>;
}
export type PlanStatus = 'draft' | 'pending_approval' | 'approved' | 'rejected' | 'archived';
export interface PlanCreateInput {
    name: string;
    description?: string;
    manifest_query?: string;
    metadata?: Record<string, unknown>;
}
export interface PlanCreateResult {
    plan: PlanRecord;
    timing: number;
}
export interface PlanInspectInput {
    id: string;
}
export interface PlanInspectResult {
    plan: PlanRecord | null;
    found: boolean;
    timing: number;
}
export interface PlanDeleteInput {
    id: string;
}
export interface PlanDeleteResult {
    deleted: boolean;
    id: string;
    timing: number;
}
export interface PlanApproveInput {
    id: string;
    approved_by?: string;
}
export interface PlanApproveResult {
    plan: PlanRecord;
    previous_status: PlanStatus;
    advisory: boolean;
    timing: number;
}
export declare function formatPlanForDisplay(plan: PlanRecord): string;
export interface PlanCommandInput {
    manifestQuery: string;
    params?: Record<string, unknown>;
}
export interface PlanCommandResult {
    reference: PlanReference;
    timing: number;
}
export interface PlanListInput {
    status?: PlanStatus;
    limit?: number;
}
export interface PlanListResult {
    plans: PlanSummary[];
    count: number;
    timing: number;
}
export interface PlanSummary {
    id: string;
    name: string;
    status: string;
    created_at: string;
    manifest_query?: string;
}
export declare function executePlanCommand(input: PlanCommandInput, options: CommandOptions): Promise<PlanCommandResult>;
/**
 * List plans from local storage
 */
/**
 * List plans from Ruvector storage.
 */
export declare function executePlanListCommand(input: PlanListInput, options: CommandOptions): Promise<PlanListResult>;
/**
 * Format plans list for human-readable display
 */
export declare function formatPlansListForDisplay(plans: PlanSummary[]): string;
/**
 * Create a new plan record.
 *
 * Plans are persisted in the Ruvector backend service (same as list/inspect/approve).
 * The CLI is a thin client - no local filesystem writes.
 */
export declare function executePlanCreateCommand(input: PlanCreateInput, options: CommandOptions): Promise<PlanCreateResult>;
/**
 * Inspect a specific plan by ID
 */
/**
 * Inspect a specific plan by ID.
 *
 * CRITICAL: This is RETRIEVAL-ONLY from Ruvector.
 * - MUST NOT call planner
 * - MUST NOT interpret ID as intent
 * - MUST validate UUID format
 * - MUST require authentication
 */
export declare function executePlanInspectCommand(input: PlanInspectInput, options: CommandOptions): Promise<PlanInspectResult>;
/**
 * Delete a plan
 */
/**
 * Delete a plan from Ruvector storage.
 */
export declare function executePlanDeleteCommand(input: PlanDeleteInput, options: CommandOptions): Promise<PlanDeleteResult>;
/**
 * Approve a plan.
 *
 * Verifies the plan exists in Ruvector and marks it as approved.
 * For authorized users (internal email or paid API key), this performs real approval.
 */
export declare function executePlanApproveCommand(input: PlanApproveInput, options: CommandOptions): Promise<PlanApproveResult>;
//# sourceMappingURL=plan.d.ts.map