import { type CotalEndpoint } from "@cotal-ai/core"; import type { MeshSnapshot } from "../view/mesh-view.js"; import type { ManagerReply } from "../lib/control.js"; import type { ControlOp, ManagedRow, PsReply } from "./control.js"; export interface CommandCtx { ep: CotalEndpoint; snapshot: MeshSnapshot; activeChannel: string; setMode: (m: "normal" | "dm" | "topo") => void; setActiveChannel: (c: string) => void; toggleRail: () => void; openHelp: () => void; back?: () => void; exit: () => void; notify: (msg: string) => void; /** One control call against this space's manager (console/control.ts). */ control: (op: ControlOp, args?: Record) => Promise; /** The managed rows of EVERY reachable manager in the space (the `cotal ps` scatter, merged): * a single class-queue call would answer for one manager and omit the others' seats. `silent` * names the instances that did not answer and `failed` names reachable error replies, so a * partial list is never shown as a whole one and an error is never mislabeled as silence. */ ps: () => Promise; /** Open the type-the-space-name purge confirm (the palette never purges directly). */ confirmPurge: () => void; /** Open the type-the-channel-name delete confirm for one channel's history and registry entry. */ confirmDelchan: (channel: string) => void; /** Attach to a managed seat's live terminal (suspends the console until detach). */ startAttach: (name: string) => void; /** Put the operator on the roster on its first send (presence, so agents can reply). Idempotent, * canWrite-gated; open mesh only, a one-way notice elsewhere. Await before the send. */ ensureParticipant: () => Promise; } export interface ConsoleCommand { name: string; summary: string; usage?: string; write?: boolean; control?: boolean; run(ctx: CommandCtx, rest: string): Promise | void; } /** One managed-agent row as `:status` prints it. Two facts, printed as two facts, the way * `cotal ps` prints them: `status` is the PROCESS the manager runs and `mesh` is that seat's * presence, and they disagree in the common failure (running for days, offline on the mesh). * * Presence `working` is the one word that needs qualifying. It records that the seat said it was * working, never that anyone observed progress, so it reaches the reader as `working ยท progress * unknown` here exactly as it does from `cotal ps`, the roster, and the connector's orientation. * A bare `working` would claim an observation the manager never made. */ export declare function formatManagedRow(a: ManagedRow): string; export declare const COMMANDS: ConsoleCommand[]; /** Parse + dispatch a typed palette line. Unknown / read-only-blocked commands notify and no-op. */ export declare function runCommand(line: string, ctx: CommandCtx, canWrite: boolean, canControl: boolean): void; //# sourceMappingURL=commands.d.ts.map