/** * The `upgrade` command adapter: read the running version, ask * CLI maintenance what the request selects, settle it as a preview or an * apply, and render the assessment as the machine document and the human * view. */ import * as Effect from "effect/Effect"; import * as Schema from "effect/Schema"; import { type AppError } from "../../app-error/index.js"; import { Verbosity } from "../../cli-flags/index.js"; import { ExecutionDirectory } from "../../execution-directory.js"; import { Screen } from "../../screen/index.js"; export declare const UpgradeDocumentSchema: Schema.Struct<{ readonly result: Schema.Struct<{ readonly contract: Schema.Literal<"axm.upgrade-assessment/v1">; readonly outcome: Schema.Literals; readonly disposition: Schema.Literals; readonly message: Schema.String; readonly intent: Schema.Struct<{ readonly mode: Schema.Literals; readonly requestedVersion: Schema.NullOr; readonly reinstall: Schema.Boolean; }>; readonly platform: Schema.Struct<{ readonly os: Schema.String; readonly arch: Schema.String; readonly target: Schema.String; readonly binaryName: Schema.String; }>; readonly local: Schema.Struct<{ readonly version: Schema.NullOr; readonly relation: Schema.Literals; }>; readonly ownership: Schema.Struct<{ readonly method: Schema.Literals; readonly source: Schema.String; readonly evidence: Schema.$Array; readonly confidence: Schema.Literals; readonly executablePath: Schema.NullOr; }>; readonly canonical: Schema.Struct<{ readonly source: Schema.Literals; readonly version: Schema.String; readonly validatedAt: Schema.String; }>; readonly installerAvailability: Schema.Struct<{ readonly state: Schema.Literals; readonly observedVersion: Schema.NullOr; }>; readonly target: Schema.Struct<{ readonly version: Schema.String; readonly releaseTag: Schema.String; readonly binaryAssetUrl: Schema.NullOr; readonly checksumAssetUrl: Schema.NullOr; }>; readonly mutation: Schema.Struct<{ readonly state: Schema.Literals; }>; readonly verification: Schema.Struct<{ readonly state: Schema.Literals; readonly reportedVersion: Schema.NullOr; readonly executables: Schema.$Array; readonly path: Schema.String; readonly phase: Schema.optional>; readonly requestedExecutable: Schema.optional; readonly resolvedExecutable: Schema.optional>; readonly queryOutcome: Schema.optional>; readonly reportedVersion: Schema.NullOr; readonly exitCode: Schema.NullOr; }>>; }>; readonly recovery: Schema.Struct<{ readonly backupPath: Schema.NullOr; readonly recommendedCommand: Schema.NullOr; readonly shellRequired: Schema.Boolean; }>>; }>; readonly commands: Schema.$Array; readonly executable: Schema.String; readonly args: Schema.$Array; readonly executionState: Schema.Literals; readonly exitCode: Schema.NullOr; readonly stdout: Schema.String; readonly stderr: Schema.String; readonly outputTruncated: Schema.Boolean; }>>; readonly details: Schema.Struct<{ readonly messages: Schema.$Array; readonly homebrewFailure: Schema.NullOr>; readonly observedFormulaVersion: Schema.NullOr; }>; readonly steps: Schema.$Array; readonly message: Schema.String; readonly details: Schema.$Array; readonly artifact: Schema.optional; readonly scope: Schema.Literal<"user">; readonly version: Schema.optional; readonly change: Schema.Literals; readonly previousVersion: Schema.optional; }>>; }>>; }>; }>; export type UpgradeDocument = typeof UpgradeDocumentSchema.Type; export interface UpgradeHandlerArgs { readonly reinstall: boolean; /** Optional exact stable version. Omit to use GitHub's latest release. */ readonly requestedVersion?: string | undefined; /** Resolve and report the upgrade without performing it. */ readonly preview?: boolean; /** Test/internal override for an observed local version. */ readonly localVersion?: string | null; } export declare const handleUpgrade: (args: UpgradeHandlerArgs) => Effect.Effect; //# sourceMappingURL=handler.d.ts.map