/** * @medicine-wheel/ontology-core — Semantic Query Helpers * * Functions for traversing relational webs, computing Wilson alignment * metrics, and checking OCAP® compliance. These helpers operate on * in-memory collections — the storage layer (Redis, etc.) is external. */ import type { DirectionName, NodeType, RelationalNode, Relation, RelationalEdge, NarrativeBeat, MedicineWheelCycle, CeremonyLog, OcapFlags, AccountabilityTracking } from './types'; /** Find all nodes aligned with a given direction */ export declare function nodesByDirection(nodes: RelationalNode[], direction: DirectionName): RelationalNode[]; /** Find all nodes of a given type */ export declare function nodesByType(nodes: RelationalNode[], type: NodeType): RelationalNode[]; /** Find a node by ID */ export declare function nodeById(nodes: RelationalNode[], id: string): RelationalNode | undefined; /** Get all relations connected to a given node (as source or target) */ export declare function relationsForNode(relations: Relation[], nodeId: string): Relation[]; /** Get all relations of a given type */ export declare function relationsByType(relations: Relation[], type: string): Relation[]; /** Get neighbor node IDs for a given node through its relations */ export declare function neighborIds(relations: Relation[] | RelationalEdge[], nodeId: string): string[]; /** Traverse the relational web from a starting node up to a given depth */ export declare function traverseRelationalWeb(nodes: RelationalNode[], relations: Relation[] | RelationalEdge[], startNodeId: string, maxDepth?: number): { visited: Set; paths: string[][]; }; /** * Compute Wilson alignment score for a single accountability tracking object. * Wilson's three R's (Respect, Reciprocity, Responsibility) are averaged. */ export declare function computeWilsonAlignment(accountability: AccountabilityTracking): number; /** * Compute aggregate Wilson alignment across a collection of relations. * Returns 0 if no relations exist. */ export declare function aggregateWilsonAlignment(relations: Relation[]): number; /** * Compute Wilson alignment for a Medicine Wheel cycle based on its * ceremonies conducted and relations mapped. */ export declare function cycleWilsonAlignment(cycle: MedicineWheelCycle, relations: Relation[]): number; /** * Identify relations with low Wilson alignment (below threshold). * These represent accountability gaps requiring ceremonial attention. */ export declare function findAccountabilityGaps(relations: Relation[], threshold?: number): Relation[]; /** * Check whether OCAP® flags meet compliance requirements. * Full compliance requires: ownership specified, control specified, * access not 'public' (for Indigenous data), and compliant flag true. */ export declare function checkOcapCompliance(ocap: OcapFlags): { compliant: boolean; issues: string[]; }; /** * Check OCAP® compliance across all relations. * Returns summary with overall status and per-relation issues. */ export declare function auditOcapCompliance(relations: Relation[]): { overall_compliant: boolean; compliant_count: number; non_compliant_count: number; issues: { relation_id: string; issues: string[]; }[]; }; /** Get beats for a specific direction */ export declare function beatsByDirection(beats: NarrativeBeat[], direction: DirectionName): NarrativeBeat[]; /** Get beats for a specific act number */ export declare function beatsByAct(beats: NarrativeBeat[], act: number): NarrativeBeat[]; /** Check whether all four directions have been visited in a set of beats */ export declare function allDirectionsVisited(beats: NarrativeBeat[]): boolean; /** Get ceremonies for a specific direction */ export declare function ceremoniesByDirection(ceremonies: CeremonyLog[], direction: DirectionName): CeremonyLog[]; /** Count ceremonies across all directions */ export declare function ceremonyCounts(ceremonies: CeremonyLog[]): Record; /** * Assess relational completeness of a node — how well connected it is * across all obligation categories (human, land, spirit, future). */ export declare function relationalCompleteness(nodeId: string, relations: Relation[]): { total_relations: number; obligation_categories_covered: string[]; missing_categories: string[]; ceremony_coverage: number; }; //# sourceMappingURL=queries.d.ts.map