/** * Prohibited patterns for pipeline `function_handler` code, transcribed 1:1 * from the runtime's `PROHIBITED_PATTERNS` in * apps/backend/src/pipelines/function-runner.service.ts (lines ~78-97). * * This is a parity contract: a handler that passes this CLI lint must also * pass the runtime's `validateCode`, and one this lint rejects must be * rejected at runtime too. Do NOT "improve" or paraphrase these regexes — * any drift here means the CLI and the runtime disagree about what's safe. */ export declare const PROHIBITED_PATTERNS: Array<{ pattern: RegExp; message: string; }>; export interface LintFinding { line: number; column: number; message: string; } /** * Statically validate pipeline `function_handler` source code, mirroring the * runtime's `FunctionRunnerService.validateCode`: * 1. Scan for PROHIBITED_PATTERNS (each match reported at its line/column). * 2. Syntax-check by compiling the same async-IIFE wrapper the backend * compiles (a `new vm.Script(...)`, never executed — so this only * catches genuine parse errors, matching backend behavior). * 3. Flag source that never declares a `handler` (function/const/let/var). * * Returns [] for clean code. */ export declare function validateHandlerSource(code: string): LintFinding[];