/** * Install/update helpers for BaseAgentAdapter. * * The install and update flows share the "pick method → resolve command → * spawn → re-detect" skeleton. Extracted here so the base class stays * small; no behavior change. */ import type { AdapterInstallOptions, AdapterUpdateOptions, DetectInstallationResult, InstallMethod, InstallResult, Spawner } from '@a5c-ai/comm-adapter'; /** Collaborators the helpers need from the adapter. */ export interface InstallContext { readonly cliCommand: string; readonly displayName: string; readonly spawner: Spawner; detectInstallation(): Promise; pickInstallMethod(): InstallMethod | undefined; applyVersionToCommand(method: InstallMethod, version?: string): string; deriveUpdateCommand(method: InstallMethod): string | null; } export declare function runInstall(ctx: InstallContext, opts: AdapterInstallOptions): Promise; export declare function runUpdate(ctx: InstallContext, opts: AdapterUpdateOptions): Promise;