import type { PlatformAdapter, MessageEditContext } from '../../platform/index.js'; import type { RunningExecutions } from '../../core/running-executions.js'; /** * Create an edit handler with injected app-level dependencies. * * @param deps.activeAgents - ActiveAgents singleton for per-channel handle registry * @param deps.reprocessMessage - function(channel, text, client, opts) to re-process a message as a retry * @param deps.closePooledSession - tear down any pooled agent process for the channel before * reprocessing. Required for Claude backend, whose CLI runs in stream-json mode and keeps * the conversation in memory; without an explicit close the new turn appends to stale state * and ignores the freshly-restored JSONL. */ declare function createEditHandler(deps: { activeAgents: RunningExecutions; reprocessMessage: (channel: string, text: string, adapter: PlatformAdapter, opts: { originalTs: string; isRetry: boolean; sessionId: string | null; sessionName: string | null; supersededStatusTimestamps?: string[]; }) => void; closePooledSession?: (channel: string, backend: string) => void; }): (ctx: MessageEditContext, adapter: PlatformAdapter) => Promise; export { createEditHandler };