/** * Governance rule pack contract. * * FROZEN at v1.0. A rule pack is a named bundle of lint rules that run * against block ASTs — in the editor (real-time) and at `dql certify` * (gating). */ export type Severity = 'error' | 'warning' | 'info'; /** A minimal view of a parsed block passed to rules. Keep this shape stable. */ export interface BlockView { name: string; domain?: string; owner?: string; description?: string; tags: string[]; query: string; visualization?: string; path: string; metricRefs: string[]; dimensionRefs: string[]; blockRefs: string[]; tableRefs: string[]; } export interface Diagnostic { ruleId: string; severity: Severity; message: string; /** Optional AST span (0-based byte offsets) for editor underlining. */ span?: { start: number; end: number; }; /** Optional fix suggestion. */ fix?: { title: string; newText: string; span: { start: number; end: number; }; }; } export interface Rule { id: string; description: string; defaultSeverity: Severity; check(block: BlockView): Diagnostic[]; } export interface RulePack { id: string; displayName: string; version: string; rules: Rule[]; } //# sourceMappingURL=governance.d.ts.map