import { QueryDescriptor } from './index'; /** * A named, persisted query. Wraps a {@link QueryDescriptor} with an id and a * display name. Consumers (Smart Folders tree view, future CLI / MCP tools, * lint rules, etc.) read these from disk and execute them like any other * query. * * The `id` is structural and comes from the storage layer (typically the * filename without extension); it is not part of the serialized YAML. */ export interface Query { id: string; name: string; description?: string; descriptor: QueryDescriptor; } export interface ParseQueryResult { query?: Query; errors: string[]; } /** * Parses the YAML content of a saved query file. The `id` comes from the * caller — it's derived from the file's location (e.g. the basename), not * the file contents. */ export declare function parseQuery(id: string, yamlContent: string): ParseQueryResult; /** * Serializes a saved query back to YAML. Only `name` and `description` are * emitted alongside the descriptor fields; `id` lives in the storage location. * A `name` that matches the humanized id is omitted as redundant. */ export declare function serializeQuery(query: Query): string; /** Derive an id from a filename like `work-in-progress.yaml` → `work-in-progress`. */ export declare function idFromQueryFilename(filename: string): string; /** Filename for a given id, using `.yaml` extension. */ export declare function filenameFromQueryId(id: string): string; /** * Convert an id like `work-in-progress` to a display name like * `Work In Progress`. Used when the YAML omits `name`. */ export declare function humanizeQueryId(id: string): string; /** * Sanitize a user-provided name into a filesystem-safe id. * Lowercases, replaces whitespace and disallowed characters with `-`. */ export declare function sanitizeQueryId(name: string): string; //# sourceMappingURL=saved.d.ts.map