import type { MemoModel, MemoElement, MemoRelationship } from '../model/semantic.js'; import type { ValidationResult, CompletenessReport, Violation } from '../validator/types.js'; import type { MEMOConfig } from '../model/config.js'; import type { StandardsReport } from './standards-report.js'; /** Query context — the interface templates use to access model data */ export interface QueryContext { /** All elements */ allElements(): MemoElement[]; /** Elements of a specific kind */ elementsByKind(kind: string): MemoElement[]; /** Elements matching any of the given kinds */ elementsByKinds(kinds: string[]): MemoElement[]; /** Elements in a specific layer */ elementsByLayer(layer: string): MemoElement[]; /** Get element by ID */ element(id: string): MemoElement | undefined; /** Get element name by ID (returns ID if not found) */ elementName(id: string): string; /** All relationships */ allRelationships(): MemoRelationship[]; /** Relationships of a specific type */ relationshipsByType(type: string): MemoRelationship[]; /** Get related elements via a relationship type */ related(elementId: string, relType: string, direction: 'outgoing' | 'incoming'): MemoRelationship[]; /** Get all outgoing relationships for an element */ outgoing(elementId: string): MemoRelationship[]; /** Get all incoming relationships for an element */ incoming(elementId: string): MemoRelationship[]; /** Violations for a specific element */ violationsFor(elementId: string): Violation[]; /** All violations of a specific severity */ violationsBySeverity(severity: 'error' | 'warning' | 'info'): Violation[]; /** Number of unmitigated hazards (hazards without incoming mitigates) */ unmitigatedCount(): number; /** Requirements without traces */ untracedRequirements(): MemoElement[]; /** Number of validation errors */ errorCount(): number; /** Number of warnings */ warningCount(): number; projectName: string; totalElements(): number; totalRelationships(): number; layerCount(): number; overallCompleteness(): number; layerSummary(): Array<{ id: string; label: string; count: number; completeness: number; color: string; }>; /** Cross-reference: get trace chains from an element */ traceChain(elementId: string, maxDepth?: number): Array<{ element: MemoElement; relationship: MemoRelationship; depth: number; }>; /** * The clause coverage report, when the caller computed one. * * It is not derivable from the model alone: `required(project)` needs the * clause library and the declared regimes, and the clauses a project has * not claimed are not in its model by definition. Callers that can supply * it do; a ```memo-standards``` block rendered without it says so rather * than rendering an empty table. */ standardsReport?: StandardsReport; } /** Create a QueryContext from model data */ export declare function createQueryContext(model: MemoModel, validation: ValidationResult, completeness: CompletenessReport, config: MEMOConfig, standardsReport?: StandardsReport): QueryContext; //# sourceMappingURL=query-engine.d.ts.map