UNPKG

@terminals-tech/graph

Version:

Language-first event graph system. Extract relationships from text, find patterns, and navigate event chains.

48 lines (47 loc) 1.57 kB
/** * @terminals-tech/graph - Language-first event graph system * Extract relationships from text, find patterns, and navigate event chains */ import { TextGraph, type Event, type Node } from './TextGraph'; import { PatternMatcher, type Anomaly, type Prediction } from './PatternMatcher'; import { GraphProcessor, type PageRankResult, type Cluster, type Path } from './GraphProcessor'; export { TextGraph } from './TextGraph'; export { PatternMatcher } from './PatternMatcher'; export { GraphProcessor } from './GraphProcessor'; export declare class EventGraph { readonly textGraph: TextGraph; readonly patternMatcher: PatternMatcher; readonly processor: GraphProcessor; constructor(); /** * Process events and build graph */ processEvents(events: Event[]): void; /** * Find what caused an event */ findCauses(eventId: string): Node[]; /** * Detect anomalies */ detectAnomalies(events: Event[]): Anomaly[]; /** * Predict next event */ predictNext(events: Event[]): Prediction[]; /** * Find important events */ findImportantEvents(limit?: number): PageRankResult[]; /** * Find clusters */ findClusters(): Cluster[]; /** * Find path between events */ findPath(from: string, to: string): Path | null; } export type { Event, Relation, Node, Edge, Graph } from './TextGraph'; export type { Pattern, Anomaly, Prediction } from './PatternMatcher'; export type { Subgraph, Path, PageRankResult, Cluster } from './GraphProcessor';