import type { FlagSpec, ParsedArgs } from "@cotal-ai/core"; import { type InstalledExtension } from "@cotal-ai/workspace"; import { type MeshTarget } from "@cotal-ai/workspace"; export declare const updateFlags: readonly FlagSpec[]; interface CommandResult { readonly status: number | null; readonly stdout: string; readonly stderr: string; readonly error?: string; } export interface UpdateRuntime { readonly env: NodeJS.ProcessEnv; readonly pid: number; readonly parentPid: number; readonly nodePath: string; version(): string; reconcile(): Promise; /** Bring what connectors installed in their harnesses to this release; one line per connector. */ refreshConnectors(): Promise; reportRunningManager(target: Record): Promise<"none" | "legacy">; extensions(): readonly InstalledExtension[]; claimUpdatePass(): () => void; claimGlobalUpdate(root: string): () => void; selfArgv(): string[]; /** Whether this CLI runs from a source checkout, where `--self` installs a separate global copy. */ checkout(): boolean; npm(args: string[], inherit?: boolean): CommandResult; spawn(file: string, args: string[], env: NodeJS.ProcessEnv, inherit?: boolean): CommandResult; spawnGlobal(root: string, operation: "install" | "reconcile", file: string, args: string[], env: NodeJS.ProcessEnv, inherit?: boolean, windowsVerbatimArguments?: boolean): Promise; verifyGlobalEntry(root: string, expectedVersion: string): string; out(message: string): void; err(message: string): void; stdout(message: string): void; stderr(message: string): void; } export declare function update(args: ParsedArgs, rt?: UpdateRuntime): Promise; /** Check mode is installation metadata only; target and mutation inputs are never ignored. */ export declare function validateUpdateArguments(args: ParsedArgs): void; /** Injectable command body: production keeps one process seam; the smoke covers every decision branch. */ export declare function executeUpdate(self: boolean, rt?: UpdateRuntime, target?: Record): Promise; /** Whether `target` is a mesh this machine runs, stopped: no `cotal supervise` process here may be * serving its space and nothing listens at its recorded broker. Both are required. A manager * outlives its broker and reconnects when it returns, so a refused connection alone leaves its * custody in place; a supervisor whose argv names this space or none, a peer that accepts, answers * or stalls, a mesh registered by hand, or a `--server` the operator named may still have a manager * behind it. A project that only ran setup has no registry entry yet; its implicit local default * is eligible for the same process and listener checks, but an explicit server is not. */ export declare function isStoppedLocalMesh(target: MeshTarget): Promise; /** * The continuity read for every manager this update is asked about, not just one of them. * * `update --self` replaces the single `cotal-ai` install every running manager on the machine * shares, so with no `--space` / `--server` / `--creds` the question is asked about all of them. * Reporting one and staying silent about the rest is a partial answer; refusing outright leaves the * operator with no continuity report at all. So an ambiguous target is enumerated and read once per * running mesh, and every one of them is observed before this returns and anything is written * (#1620). A `legacy` verdict on any of them makes the whole run not a hot update. A selector flag * still selects one, and every other refusal stands. */ export declare function reportRunningManagers(flags: Record, readOne?: (flags: Record) => Promise<"none" | "legacy">): Promise<"none" | "legacy">; export declare function readManagerContinuity(flags: Record): Promise<"none" | "legacy">; export declare function parseNpmVersion(output: string): string; export declare function verifyGlobalEntry(root: string, expectedVersion: string): string; export {}; //# sourceMappingURL=update.d.ts.map