/** * Local Gate Engine — pure logic for offline gate pipeline governance. * * Ports the Python GateEngine's validation rules to TypeScript. * All methods are pure: operate on pipeline objects, return new objects, no I/O. */ import type { GatePipeline } from './types.js'; export interface GateCheckResult { ready: boolean; missing_evidence: string[]; missing_roles: string[]; } export interface ReleaseCheckResult { can_release: boolean; pending_gates: string[]; failed_gates: string[]; passed_gates: string[]; skipped_gates: string[]; } export declare class GateEngineError extends Error { constructor(message: string); } export declare class LocalGateEngine { /** Create a new gate pipeline from a template. */ createPipelineFromTemplate(changesetId: string, projectId: string, riskScore: number, templateGates: Array<{ id: string; name: string; required_evidence: string[]; required_roles?: string[]; }>): GatePipeline; /** Check if a gate's requirements are met. */ checkGate(pipeline: GatePipeline, gateId: string): GateCheckResult; /** Promote a gate (mark as passed). Validates ordering, evidence, and roles. */ promoteGate(pipeline: GatePipeline, gateId: string, promotedBy: string): GatePipeline; /** Reject a gate. Sets status to failed with reason. */ rejectGate(pipeline: GatePipeline, gateId: string, reason: string, rejectedBy: string): GatePipeline; /** Skip a gate. Only allowed if risk_score <= 50 and prior gates are settled. */ skipGate(pipeline: GatePipeline, gateId: string, reason: string, skippedBy: string): GatePipeline; /** Add evidence type to matching gates' provided_evidence. */ addEvidence(pipeline: GatePipeline, evidenceType: string): GatePipeline; /** Add completed role to matching gates' completed_roles. */ addRole(pipeline: GatePipeline, role: string): GatePipeline; /** Check if the pipeline is release-ready (all gates passed or skipped). */ canRelease(pipeline: GatePipeline): ReleaseCheckResult; } //# sourceMappingURL=gate-engine.d.ts.map