import type { EventBus } from '../../events/index.js'; /** Called once from app.ts during startup, before startWebhookServer(). */ declare function initHookBridge(bus: EventBus): void; type QuestionNotify = (requestId: string, channel: string, sessionId: string, questions: any[]) => void; type PlanNotify = (requestId: string, channel: string, sessionId: string, planContent: string, toolInput: any) => void; /** @deprecated no-op since S5; replaced by bus.subscribe('ask-user.requested') in app.ts */ declare function setQuestionNotify(_cb: QuestionNotify): void; /** @deprecated no-op since S5; replaced by bus.subscribe('plan.submitted') in app.ts */ declare function setPlanNotify(_cb: PlanNotify): void; declare function registerAskQuestion(requestId: string, channel: string, sessionId: string, questions: any[], dryRun?: boolean, threadId?: string | null): Promise; declare function registerPlanApproval(requestId: string, channel: string, sessionId: string, planContent: string, toolInput: any, dryRun?: boolean, threadId?: string | null): Promise; declare function resolveRequest(requestId: string, data: any): boolean; /** Register the active onAssistantMessage callback for a channel (called by app.ts before runAgent). */ declare function setStreamingCallback(channel: string, cb: (text: string) => void): void; /** Clear the streaming callback when the turn ends (called by app.ts after runAgent). */ declare function clearStreamingCallback(channel: string): void; /** Get the active streaming callback for a channel, if any. */ declare function getStreamingCallback(channel: string): ((text: string) => void) | null; /** * Publish plan.submitted directly (non-blocking, no pendingRequest). * Used by PI backend: the resolution goes through sendExtensionUiResponse, not resolveRequest. */ declare function publishPlanSubmitted(requestId: string, channel: string, sessionId: string, planContent: string, extensionUiId: string, threadId?: string | null): void; /** * Publish ask-user.requested directly (non-blocking, no pendingRequest). * Used by PI backend: the resolution goes through sendExtensionUiResponse, not resolveRequest. * @param extensionUiId — original PI extension_ui_request id; required for sendExtensionUiResponse to unblock the PI subprocess. */ declare function publishAskUserRequested(requestId: string, channel: string, sessionId: string, questions: any[], extensionUiId?: string, threadId?: string | null): void; export { initHookBridge, setQuestionNotify, setPlanNotify, registerAskQuestion, registerPlanApproval, resolveRequest, setStreamingCallback, clearStreamingCallback, getStreamingCallback, publishPlanSubmitted, publishAskUserRequested };