/** One command a template fills in. `env` is deliberately not templated. */ export interface CommandTemplate { readonly command: string; readonly cwd?: string; readonly timeoutSeconds?: number; } /** The two files templates come from, in precedence order. */ export interface TemplateConfigPaths { readonly projectFile: string; readonly agentFile: string; } /** Every template available to this session, plus why a file could not be used. */ export interface TemplateCatalog { readonly templates: ReadonlyMap; readonly problems: readonly string[]; } /** Name of the configuration file in both locations. */ export declare const TEMPLATE_CONFIG_FILE = "pretty-task.json"; /** Directory under the project root that holds the project-level file. */ export declare const PROJECT_CONFIG_DIR = ".pi"; /** Locate both template files for a project and an agent settings directory. */ export declare function templateConfigPaths(projectDir: string, agentDir: string): TemplateConfigPaths; /** * Read both files and merge them, project over agent. * * A missing file is normal. A malformed one is reported in `problems` with the * file and the defect, and the other file still supplies its templates. */ export declare function loadTemplates(paths: TemplateConfigPaths): TemplateCatalog; /** * Parse one template file. Throws with the file name and the exact defect; the * caller decides whether that ends the load or becomes a reported problem. */ export declare function parseTemplateConfig(text: string, file: string): Map;