/** Where update-prompt output is sent / input is read. */ export interface UpdatePromptIO { print(line: string): void; ask(prompt: string): Promise; } interface UpdateInfo { current: string; latest: string; } /** One-line pointer shown to new users alongside updates / on first launch. */ export declare function gettingStartedHint(): string; /** * Run the global self-update. Returns true on success. `spawnFn` is injectable * so tests never shell out to npm. */ export declare function runSelfUpdate(spawnFn?: typeof import("node:child_process").spawn): Promise; /** Result of refreshing the in-session Copilot plugin. */ export type PluginUpdateStatus = "updated" | "skipped" | "failed"; /** * Best-effort refresh of the Copilot plugin so the in-session skills/agents/ * hooks track the same release as the CLI. Refreshes the marketplace catalog, * then updates the installed plugin. Returns "skipped" when the copilot CLI * isn't available, "failed" on a non-zero plugin update, "updated" otherwise. */ export declare function updateCopilotPlugin(spawnFn?: typeof import("node:child_process").spawn): Promise; export interface MaybePromptUpdateOptions { cwd: string; io: UpdatePromptIO; /** When false, only the passive notice is printed — never prompt. */ interactive: boolean; importMetaUrl?: string; /** Test seams. */ checkForUpdate?: (options: { stateDir: string; }) => Promise; formatUpdateNotice?: (current: string, latest: string) => string; runUpdate?: () => Promise; updatePlugin?: () => Promise; refreshUserInstall?: typeof import("./setup.js").refreshUserInstall; env?: NodeJS.ProcessEnv; } /** Outcome of an update prompt. `updated` is true only after a successful self-update. */ export interface UpdateOutcome { updated: boolean; } /** * Check for an update and, when interactive and one is available, prompt the * user to self-update. No-ops when `OMP_NO_UPDATE_CHECK` is set or no update * is available. Returns `{ updated: true }` only when a self-update succeeded, * so callers can re-exec into the freshly-installed version. */ export declare function maybePromptUpdate(options: MaybePromptUpdateOptions): Promise; export interface MaybeWelcomeOptions { cwd: string; io: UpdatePromptIO; interactive: boolean; } /** * Print the getting-started hint once on first interactive bare launch, then * drop a marker so we stay quiet thereafter. Best-effort — never throws. */ export declare function maybeWelcome(options: MaybeWelcomeOptions): void; export {};