import { type AgentDef } from "@cotal-ai/core"; export interface PersonaCatalog { root: string; space: string; } export interface PersonaSource { bytes: Buffer; ino: number; dev: number; mtimeMs: number; } /** Resolve once, without inventing a broker for a prepared space or falling back to the cwd. */ export declare function personaCatalog(values: { space?: string; server?: string; }): PersonaCatalog; /** Why `name` cannot name a persona, or undefined when it can. */ export declare function personaNameProblem(name: string): string | undefined; export declare function personaPath(root: string, name: string): string; /** Only absence is absent. Unreadable and non-regular sources refuse rather than becoming empty. */ export declare function readPersonaSource(path: string): PersonaSource | undefined; export declare function requirePersonaSource(path: string): PersonaSource; /** Keep parser diagnostics private: YAML errors can contain the document's own sensitive values. * `name` is required of a new definition only. A stored one may launch under another name: the * seeded `default` persona launches as `default_agent`. */ export declare function validatePersona(bytes: Buffer, path: string, name?: string): AgentDef; /** Shared by canonical and legacy CLI writes only. Manager and external writers do not take this lock. */ export declare function commitPersona(path: string, expected: PersonaSource | undefined, bytes: Buffer | undefined): void; /** Use the existing serializer for flag-built definitions; file inputs keep their original bytes. */ export declare function serializePersona(def: AgentDef): Buffer; /** Never expose the catalog file to an editor. Validate successful draft bytes, then compare under lock. */ export declare function editPersona(path: string, name: string, catalog: PersonaCatalog, json?: boolean): void; //# sourceMappingURL=persona-files.d.ts.map