import { type HostRunner } from "./host-mcp.js"; import type { SetupChange, SetupPlan } from "./setup-plan.js"; export type AppliedChange = SetupChange & { applied: true; }; export type ApplyResult = { applied: AppliedChange[]; /** Mirrors plan.changes.length > 0 - useful for agents deciding what to report. */ changesApplied: boolean; }; export type ApplyOptions = { /** Project root; defaults to the root recorded in the plan. */ root?: string; /** The jam entry to write. Defaults to the canonical form. */ mcpEntry?: unknown; /** Injected by tests to isolate ~/.jam. */ home?: string; /** Injected by tests so no test ever registers JAM with a real host. */ runHost?: HostRunner; }; /** * Execute exactly the changes a plan listed - nothing more. * * Apply deliberately re-decides nothing. If a change is not in the plan it * does not happen, which is what makes `plan` a trustworthy preview and keeps * human and agent paths honest about what they are about to do. * * Idempotent in practice: re-detecting after an apply produces a plan with no * changes, so running setup twice is a no-op rather than a rewrite. */ export declare function applySetupPlan(plan: SetupPlan, options?: ApplyOptions): ApplyResult;