import type { CompactDispatchResult } from './auto-compact-types.js'; export type CompactTarget = 'main' | 'sub-agent'; export interface DispatchIdeCompactInput { readonly projectRoot: string; readonly sessionId: string; readonly env?: NodeJS.ProcessEnv | undefined; /** Spawn timeout (ms). Default 30s — Claude Code `/compact` is sync. */ readonly timeoutMs?: number | undefined; /** * Slice 2026-06-28-solo-mode-bypass-fix (defect #4): which session * the compact should target. Default `'main'` — the orchestrator * (peaks-solo body) runs in the main-session Claude Code window and * wants to compress *its* context, not a sub-agent's. Sub-agent * shells that spawn their own `peaks solo auto-compact` flow pass * `'sub-agent'` to preserve the legacy shell-spawn behaviour. * * Behaviour matrix (claude-code MVP): * - target='main' → llm-self-compress (write intent; main LLM * fires `/compact` on its next turn). * - target='sub-agent'→ shell-exec (spawn `sh -c /compact` in the * sub-agent's own shell, preserving the * pre-slice behaviour). * Non-claude-code IDEs + target='main' return noop + warning. */ readonly target?: CompactTarget | undefined; } /** * Dispatch compact via the active IDE's registered pathway. * * Returns a `CompactDispatchResult` envelope. The result is `ok` * when the dispatch path completed without error — for * `llm-self-compress` the LLM still has to do the actual summary, * so the orchestrator MUST NOT treat `ok: true` as proof that the * context actually shrunk; the next `peaks context now` probe * confirms. */ export declare function dispatchIdeCompact(input: DispatchIdeCompactInput): Promise;