/** The optional display-metadata file beside a preset's composition. */ export declare const METADATA_FILE = "preset.yml"; /** Display text a preset may publish about itself. */ export interface PresetMetadata { /** Human-facing name; falls back to the preset id when absent. */ readonly name?: string; /** One sentence on what this preset is for. */ readonly description?: string; /** Position within its group; lower comes first. */ readonly order?: number; } /** Where a preset's composition came from, on the line that still records it. */ export type PresetTrust = 'system' | 'user'; /** * One preset, as much of it as this plugin reads. * * `id`/`name`/`description`/`order`/`broken` are the fields both lines agree on. * `path` (the composition file) and `trust` (the root it was discovered under) * only exist on the 0.1.5 line; every consumer here treats them as optional, * and the authoring paths refuse rather than guess when they are gone. */ export interface AgentPreset { readonly id: string; readonly name?: string; readonly description?: string; readonly order?: number; readonly broken?: string; /** 0.1.5 line only: absolute path of the preset's agent composition file. */ readonly path?: string; /** 0.1.5 line only: trust recorded from the root it was discovered under. */ readonly trust?: PresetTrust; } /** * The directory a preset owns, when the host still exposes one. * * `AgentPreset.path` is the composition file the preset publishes, not the * directory, so anything that writes beside it (display metadata) starts here. * `undefined` on a host that lists declarative presets instead of directories. * @param preset - a discovered preset. * @returns the absolute preset directory, or undefined when there is none. */ export declare function presetDirectory(preset: AgentPreset): string | undefined; /** * Read a preset's display metadata. Every failure degrades to no metadata: a * preset whose display text is missing, malformed, or unreadable still mounts. * @param directory - the preset directory to read `preset.yml` from. * @returns the published name/description/order, or `{}`. */ export declare function readPresetMetadata(directory: string): Promise; /** * Render display metadata as the file's contents. * * Absent fields are omitted rather than written empty, so a preset with no * description does not ship a key that reads as an intentional blank. * @param metadata - the display text to store. * @returns the YAML document, or undefined when there is nothing to store. */ export declare function renderPresetMetadata(metadata: PresetMetadata): string | undefined;