/** * `/flows`: the flows there are, where each comes from and what it can cost; * `/flows `: one flow's plan. * * Both run the flow stage only, the one that needs no launch: the file, the * flows it calls and the agents it names. The run stage (the tree, the ports, * whether somebody is there) belongs to a launch, so a flow listed here as * valid can still be refused by `/run`. A broken file is listed **beside** the * good ones, with every fault, since it is the most likely reason anyone is * looking; so is a file left in an old `pipelines/` directory, which nothing * reads any more and which would otherwise lose its name to a flow in silence. */ import { type Fault, type FlowCatalogue, type RemovedPipeline } from "../../src/index.ts"; import { type CommandDeps } from "../deps.ts"; import type { CommandCtx, PiApi } from "../pi.ts"; import { type Row } from "../notice.ts"; /** What `/flows` shows. */ export type Listing = { readonly rows: readonly Row[]; }; /** Registers `/flows`. */ export default function registerFlowsCommand(pi: PiApi): void; /** * One line per flow, by name: where it comes from, its bound in turns and * time, and its description. A broken one says so, its faults under it, one * per line; a removed pipeline is one of those, sorted beside the flow that * would otherwise take its name without a word. A count comes first. */ export declare function flowLines(catalogue: FlowCatalogue, removed: readonly RemovedPipeline[]): Listing; /** * The plan of the flow `name`, or its faults; then what is left under that * name in an old `pipelines/` directory, since that file may well be what the * person asking meant. */ export declare function planLines(name: string, catalogue: FlowCatalogue, removed: readonly RemovedPipeline[]): Listing; /** * `/flows []`: the listing, or one flow's plan, cut to the terminal. * A refused file's lines read as a warning and the rest as the listing they * are in: pi colours a notification whole, so each line carries its own. */ export declare function showFlows(args: string, ctx: CommandCtx, deps?: CommandDeps, width?: number): string[]; /** Faults the way a listing writes them, one per line and indented: `file at: message`. */ export declare function faultRows(faults: readonly Fault[]): Row[]; //# sourceMappingURL=flows.d.ts.map