/** * The subagent-model authorization editor: a bounded overlay owned by `/model`. * * It follows the same discipline as the `/plugins` browser — a bounded * viewport, a search mode its own single-key actions do not collide with, * truthful footer help, and no transcript rewriting. It is an auxiliary * surface of the `/model` picker, stacked on top of it, so `esc` here returns * to the picker rather than closing the command. * * The overlay draws the reading it is handed and reports intent back to its * owner; it never reads `ctx.settings` and never writes one. A refusal or a * conflict is drawn from the reading itself rather than a timed notice, so it * cannot fade while the reader is deciding what to do about it. * @module dshline/subagent-model-selection/overlay */ import type { TuiOverlay } from '../slots.ts'; import type { SubagentModelEntry, SubagentModelReading } from './model.ts'; /** What the overlay needs from its owner. */ export interface SubagentModelSelectionOverlaySpec { /** The current reading, re-read on every paint and every action. */ readonly reading: () => SubagentModelReading; /** Toggle one offered route in the staged draft. */ readonly toggle: (entry: SubagentModelEntry) => void; /** Flip the staged enabled flag. */ readonly flipEnabled: () => void; /** Persist the staged draft. */ readonly save: () => void; /** Re-read the live catalog, preserving the draft. */ readonly refresh: () => void; /** Remove this overlay, discarding the draft. */ readonly close: () => void; /** Redraw after a move, an edit, or a landed read. */ readonly invalidate: () => void; } /** * Create the subagent-model authorization overlay. * @param spec - the reading, the action intents, and overlay controls. * @returns a temporary live-region overlay that never writes the transcript. */ export declare function createSubagentModelSelectionOverlay(spec: SubagentModelSelectionOverlaySpec): TuiOverlay; //# sourceMappingURL=overlay.d.ts.map