import type { EventBus } from '../../events/index.js'; export interface PendingPlan { channel: string; machine?: string; localPlanPath?: string; taskPlanPath?: string | null; sessionName?: string | null; executionId?: string | null; sessionId?: string | null; /** PI extension_ui_request id — when set, plan approval routes through sendExtensionUiResponse instead of spawning a new turn. */ extensionUiId?: string | null; threadId?: string | null; } export declare class PlanApprovals { private _map; private _bus; constructor(bus?: EventBus); setBus(bus: EventBus): void; /** * Register a pending plan for a requestId. * Does NOT publish plan.submitted — that is already done by hook-bridge before * this is called (from the bus.subscribe('plan.submitted') handler in app.ts). */ register(requestId: string, plan: PendingPlan): void; /** Lookup a pending plan by requestId without removing it. */ lookup(requestId: string): PendingPlan | undefined; /** * Resolve a pending plan (approval path). * Removes the entry and publishes plan.approved. * Returns the plan or undefined if not found. */ resolve(requestId: string): PendingPlan | undefined; /** * Reject a pending plan (feedback / !new path). * Removes the entry without publishing any event. * Returns the plan or undefined if not found. */ reject(requestId: string): PendingPlan | undefined; /** Returns true if a pending plan is registered for the requestId. */ has(requestId: string): boolean; /** * Clear all pending plans for a given channel (called by !new). * Returns the number of entries removed. */ clearByChannel(channel: string): number; } export declare const planApprovals: PlanApprovals;