/** * Template Generator for Principle Compiler * * Generates RuleHost sandbox code from PainPattern descriptors. * Produces self-contained JS modules with `const meta` and * `function evaluate(input, helpers)` that can be loaded at runtime. * * PRI-439 Phase 2: canonical dialect is bare `function evaluate(input, helpers)` * — no ESM `export` keyword (forbidden by checkForbiddenPatterns). * Default return is `{ decision: 'allow', matched: false, reason: '...' }` * (matched=false requires decision='allow'). * * SECURITY: All interpolated values use JSON.stringify or safe helpers * to prevent code injection through principleId, coversCondition, or regex patterns. * * PRI-44: Pure domain logic, zero infrastructure dependency. */ export interface PainPattern { toolName: string; pathRegex?: string; commandRegex?: string; contentRegex?: string; errorType?: string; } export declare function generateFromTemplate(principleId: string, coversCondition: string, patterns: PainPattern[]): string | null; //# sourceMappingURL=template-generator.d.ts.map