/** * The two side-effecting phases of a run: prepare the artifacts, then dispatch. * * Split out of `auto-compact-orchestrator.ts` (file-size cap campaign). The * orchestrator re-exports every name declared here, so existing importers keep * using `./auto-compact-orchestrator.js` unchanged. */ import { type AutoCompactResult, type CompactDispatchResult, type ConvergencePlan } from '../context/auto-compact-types.js'; import type { CompactTarget } from '../context/auto-compact-dispatcher.js'; import { CompactLifecyclePublisher } from './auto-compact-lifecycle.js'; import type { CompactRun } from './auto-compact-run-types.js'; export type PrepareOutcome = { readonly ok: true; readonly lifecycle: CompactLifecyclePublisher; readonly checkpointPath: string; readonly plan: ConvergencePlan; } | { readonly ok: false; readonly envelope: AutoCompactResult; }; /** * One runId per attempt, committed to compacting: the publisher is created at * `queued` and every later transition carries the same id forward. `preparing` * covers the checkpoint, the convergence plan and the decision-log write; a throw * in any of them rests the record at `failedAt: 'preparing'`. */ export declare function prepareCompactAttempt(ctx: CompactRun): PrepareOutcome; export type DispatchOutcome = { readonly ok: true; readonly target: CompactTarget; readonly dispatch: CompactDispatchResult; } | { readonly ok: false; readonly envelope: AutoCompactResult; }; /** * The IDE-dispatch phase. The intent record is written only for `main`: without it * the main-session LLM has no signal that the orchestrator asked for compact, and * the dispatcher alone would have been a no-op against the main Claude Code window. */ export declare function dispatchAttempt(args: { readonly ctx: CompactRun; readonly lifecycle: CompactLifecyclePublisher; readonly checkpointPath: string; readonly plan: ConvergencePlan; }): Promise;