import { type HostId, type HostRunner, type HostState } from "../bootstrap/host-mcp.js"; export type LifecycleOptions = { json?: boolean; /** Injected by tests. Nothing here may reach a real host CLI or npm unasked. */ run?: HostRunner; hosts?: () => HostState[]; }; export type RefreshHostPlan = { id: HostId; from?: string; bare: boolean; action: "repin" | "none"; }; export type RefreshPlan = { /** The version this build is. `refresh` never moves off it - that is `update`. */ version: string; hosts: RefreshHostPlan[]; steps: readonly string[]; }; /** * What `refresh` would converge. Pure: it runs nothing and writes nothing. * * The scope is deliberately small. A registration that points at a different * launcher than this build is what goes stale here. The project binding, the * credentials, `~/.jam/config.yaml` and every byte of Jira data are outside * it - re-deciding those is `setup`, and calling it "refresh" is how a person * loses a binding they never asked to change. */ export declare function planRefresh(hosts: readonly HostState[], version?: string): RefreshPlan; export declare function refreshLine(plan: RefreshPlan): string; /** * `jam refresh` - keep the version, make the registration match it again. * * Nothing is removed before the replacement is known to work, which is the * same order `update` uses and for the same reason: a failed refresh leaves * the machine running what it was running. */ export declare function jamRefreshCommand(command: string | undefined, options?: LifecycleOptions): Promise; export type UninstallPlan = { /** Registrations that would be removed. */ hosts: HostId[]; /** Whether a global launcher install would be removed with it. */ runtime: string | null; preserve: string[]; }; /** * `jam uninstall` - remove what JAM installed, keep what is the person's. * * Removed: the MCP registrations JAM wrote, and the global launcher when one * is installed. Kept: `~/.jam` in full - the project bindings, the runtime * choice and the credentials in the OS secret store. There is no purge here * on purpose: nothing yet needs a command that destroys those, and an * irreversible one that nobody asked for is worse than a missing one. */ export declare function planUninstall(hosts: readonly HostState[], installed: string | null): UninstallPlan; export declare function jamUninstallCommand(command: string | undefined, options?: LifecycleOptions): Promise; /** * `jam status` - the first place a person asks what is going on. * * This is `doctor`'s user-facing role under the name both products use. The * judgement is not reimplemented: the same health gate and the same per-axis * verdicts answer here, so the two commands can never disagree. */ export declare function jamStatusCommand(options?: { json?: boolean; }): Promise;