import type { AgentWebSocketClient } from '../daemon/ws-client.js'; import type { TaskAssignment, TaskPlan, SessionInfo, ExecutionCallbacks, InputResponse } from '../types/index.js'; /** * Strip ALL markdown formatting → plain text (for session result). */ export declare function stripMarkdown(text: string): string; /** * Simplify markdown for mobile (keep bold, italic, lists, tables - simplify code blocks). */ export declare function simplifyMarkdown(text: string): string; /** * Convert SessionInfo to plain payload for WebSocket transmission. */ export declare function sessionToPayload(session: SessionInfo): Record; /** Queue a message that arrived mid-run; delivered at the next input boundary. */ export declare function bufferInput(taskId: string, response: InputResponse): void; /** Discard any queued messages for a task (on cancel/interrupt). */ export declare function clearBufferedInput(taskId: string): void; /** * Wait for user input via WebSocket. Rejects if task is cancelled. * Drains any mid-run messages first so they steer THIS turn instead of waiting. */ export declare function waitForInput(taskId: string, resolvers: Map void>): Promise; /** * Build reusable execution callbacks for a plan. * Used by both handleTask (claude-code-adapter) and resumePMChat (daemon). */ export declare function buildExecutionCallbacks(taskId: string, plan: TaskPlan, ws: AgentWebSocketClient, resolvers: Map void>, onPermissionRequest?: (subtaskId: string, tool: string, detail: string) => Promise): ExecutionCallbacks; /** * Execute a plan and handle the post-execution summary. * Returns the follow-up message if user wants to continue, or null if task is complete. */ export declare function executePlanAndReport(task: TaskAssignment, plan: TaskPlan, ws: AgentWebSocketClient, resolvers: Map void>, signal?: AbortSignal, confirmBeforeEdit?: boolean, onPermissionRequest?: (subtaskId: string, tool: string, detail: string) => Promise): Promise<{ sessions: SessionInfo[]; status: 'done' | 'failed' | 'waiting_input'; followUpMessage?: string; }>;