import type { HttpClient } from "../cli/http.js"; import type { CommandRunner } from "../utils/command-checks.js"; import { type VersionCheckResult } from "./version.js"; export type PoeCodePackageManager = "npm" | "bun" | "pnpm" | "yarn"; export interface PoeCodeUpdatePlan { packageManager: PoeCodePackageManager; command: string; args: string[]; } export interface PoeCodeInstall { packageManager: PoeCodePackageManager; global: boolean; } export interface UpdatePoeCodeOptions { currentVersion: string; httpClient: HttpClient; runCommand: CommandRunner; env: Record; packageManager?: PoeCodePackageManager; force?: boolean; checkVersion?: boolean; } export interface PoeCodeUpdateResult { status: "current" | "updated"; plan: PoeCodeUpdatePlan; version: VersionCheckResult | null; } export declare function detectPoeCodePackageManager(env: Record): PoeCodePackageManager; /** * Resolves how poe-code was installed from its own location on disk, which is a * far better signal than the environment of whatever runtime invoked it. */ export declare function detectPoeCodeInstall(options?: { env?: Record; installPath?: string; }): PoeCodeInstall; export declare function createPoeCodeUpdatePlan(options: { packageManager?: PoeCodePackageManager; env?: Record; installPath?: string; }): PoeCodeUpdatePlan; export declare function updatePoeCode(options: UpdatePoeCodeOptions): Promise; export declare function formatPoeCodeUpdateCommand(plan: PoeCodeUpdatePlan): string;