import type { RunSummary } from "./types.ts"; /** One popup row; structurally PI's `AutocompleteItem` (spec §14.2). */ export interface CompletionItem { /** The WHOLE argument text this replaces (spec §14.2), e.g. `"run review-loop"`. */ readonly value: string; /** The bare candidate, as listed in the popup. */ readonly label: string; /** Single-line annotation, rendered dimmed and only in a popup wider than 40 columns (spec §14.2). */ readonly description?: string; } /** * Where candidates come from. Both are read on a keystroke, so an implementation must be cheap and * read-only (spec §14.6); neither is expected to sort or cap — this module does both. */ export interface CompletionSources { /** Workflow names, already filename-derived (spec §14.6). Any order: sorted by name here. */ workflows(): Promise; /** Every recorded run, in any order: ordered newest-first here by `startedAt` (spec §14.5). */ runs(): Promise; } /** * Complete the argument text of `/workflow` (spec §14.4). `argumentPrefix` is everything after the * command name up to the cursor. Returns `null` — never `[]` — when there is nothing to offer, which * is what PI reads as "no popup" (spec §14.2). */ export declare function completeWorkflowArgument(argumentPrefix: string, sources: CompletionSources): Promise; //# sourceMappingURL=completions.d.ts.map