import type { Readable, Writable } from "node:stream"; export declare const DEEPBOOK_CLI_PACKAGE_NAME = "deepbook-cli"; export declare const DEEPBOOK_UPDATE_CHECK_DISABLED_ENV = "DEEPBOOK_DISABLE_UPDATE_CHECK"; export declare const DEEPBOOK_UPDATE_CHECK_LATEST_VERSION_ENV = "DEEPBOOK_UPDATE_CHECK_LATEST_VERSION"; export declare const DEEPBOOK_UPDATE_STATE_PATH: string; export declare const UPDATE_SNOOZE_HOURS = 8; export declare const SUPPORTED_SELF_UPDATE_PACKAGE_MANAGERS: readonly ["npm", "pnpm", "bun"]; export type SelfUpdatePackageManager = (typeof SUPPORTED_SELF_UPDATE_PACKAGE_MANAGERS)[number]; export interface SelfUpdateOptions { version?: string; packageManager?: string; dryRun?: boolean; yes?: boolean; } export interface SelfUpdatePlan { packageName: string; currentVersion: string; target: string; packageManager: SelfUpdatePackageManager; command: string; args: string[]; } export interface UpdatePromptState { ignoredVersion?: string; snoozeUntilMs?: number; } export interface ShouldPromptForUpdateInput { currentVersion: string; latestVersion: string; nowMs: number; state?: UpdatePromptState; } export interface MaybePromptForUpdateOptions { args?: string[]; env?: NodeJS.ProcessEnv; input?: InteractiveInput; output?: InteractiveOutput; fetchLatestVersion?: () => Promise; readState?: () => UpdatePromptState; writeState?: (state: UpdatePromptState) => void; runUpdate?: (currentVersion: string, options: SelfUpdateOptions) => Promise; nowMs?: () => number; } type InteractiveInput = Readable & { isTTY?: boolean; setRawMode?: (mode: boolean) => void; }; type InteractiveOutput = Writable & { isTTY?: boolean; }; export declare function resolveSelfUpdatePackageManager(input?: string): SelfUpdatePackageManager; export declare function isNewerVersion(latestVersion: string, currentVersion: string): boolean; export declare function shouldPromptForUpdate({ currentVersion, latestVersion, nowMs, state, }: ShouldPromptForUpdateInput): boolean; export declare function fetchLatestDeepbookCliVersion(): Promise; export declare function createSelfUpdatePlan(currentVersion: string, options?: SelfUpdateOptions): SelfUpdatePlan; export declare function runSelfUpdate(currentVersion: string, options?: SelfUpdateOptions): Promise; export declare function maybePromptForUpdate(currentVersion: string, options?: MaybePromptForUpdateOptions): Promise; export declare function readUpdatePromptState(homeDirectory?: string): UpdatePromptState; export declare function writeUpdatePromptState(state: UpdatePromptState, homeDirectory?: string): void; export declare function shouldRunInteractiveUpdateCheck(args?: string[], options?: { env?: NodeJS.ProcessEnv; input?: { isTTY?: boolean; }; output?: { isTTY?: boolean; }; }): boolean; export {};