import type { CreateWorkflowInput, LoopTemplateSummary, LoopTemplateVariable } from "../types.js"; /** * Custom loop template registry: JSON-defined workflow templates stored under * the data dir. Rendering fails closed on danger-full-access/bypass flags and * on collisions with the builtin template keys (passed in as reservedKeys). */ export interface CustomLoopTemplateImportOptions { replace?: boolean; } export interface CustomLoopTemplateImportResult { template: LoopTemplateSummary; path: string; replaced: boolean; } interface CustomLoopTemplateDefinition { id: string; name: string; description: string; kind: "workflow"; variables: LoopTemplateVariable[]; workflow: unknown; } export interface CustomLoopTemplateEntry { definition: CustomLoopTemplateDefinition; summary: LoopTemplateSummary; path: string; } export declare function customLoopTemplatesDir(): string; export declare function loadCustomLoopTemplates(reservedKeys: Set): CustomLoopTemplateEntry[]; export declare function getCustomLoopTemplate(id: string, reservedKeys: Set): CustomLoopTemplateEntry | undefined; export declare function renderCustomLoopTemplate(entry: CustomLoopTemplateEntry, values: Record): CreateWorkflowInput; export declare function validateCustomLoopTemplateFile(file: string, reservedKeys: Set): LoopTemplateSummary; export declare function importCustomLoopTemplate(file: string, reservedKeys: Set, opts?: CustomLoopTemplateImportOptions): CustomLoopTemplateImportResult; export {};