import type { OutputWriteFailed } from "./screen/streams.js"; import * as Effect from "effect/Effect"; import { type LatestReleaseCheck, type UpdateCheckCache } from "@agentxm/cli-maintenance/self-update/application"; import type { AvailableUpdate } from "@agentxm/cli-maintenance/self-update/domain"; import { Screen } from "./screen/index.js"; /** * Detect whether the command being run is `axm upgrade` from raw argv. */ export declare const isUpgradeCommand: (args: ReadonlyArray) => boolean; /** * Detect non-interactive mode from raw argv and environment. This runs before * Effect CLI parses flags, so the flag is read from raw argv; CI is read with * the same predicate every other CI decision applies. */ export declare const resolveNonInteractiveFromArgv: (args: ReadonlyArray, environment: { readonly ci: string | undefined; readonly stdinIsTTY: boolean | undefined; }) => boolean; export interface UpdateCheckContextInputs { readonly args: ReadonlyArray; readonly isNonInteractive: boolean; readonly isJsonOutput: boolean; /** Stderr TTY detection captured by the screen boundary. */ readonly isStderrTTY?: boolean | undefined; /** State `AXM_NO_UPDATE_CHECK` instead of reading it from configuration. */ readonly noUpdateCheckEnv?: boolean | undefined; /** State agent-session detection instead of reading it from configuration. */ readonly isAgentSession?: boolean | undefined; } export type NotificationPrinter = (message: string) => Effect.Effect; export declare const notificationMessage: (update: AvailableUpdate, audience: "human" | "agent") => string; /** * Wrap a command program with the startup update check. An agent session is * told before the command writes anything, in one machine-readable line; a * person is told after the command's result, in one dim line that never * interrupts it. */ export declare const withUpdateCheck: (program: Effect.Effect, options: { readonly localVersion: string; readonly inputs: UpdateCheckContextInputs; readonly printNotification?: NotificationPrinter | undefined; }) => Effect.Effect; //# sourceMappingURL=update-check-startup.d.ts.map