/** * Code graph indexer — parses a monorepo into devgraph: RDF quads. * * Extracts: * - Package (workspace deps) from package.json * - CodeModule (source files) with import edges * - Function / Class declarations with signatures * - Contract (Solidity) with inheritance and events * - Python module/class/function extraction (regex-based) * * Uses ts.createSourceFile (AST-only, no full compilation) for TypeScript/JavaScript * and regex-based extraction for Solidity/Python. */ export interface Quad { subject: string; predicate: string; object: string; graph: string; } export declare const DEVGRAPH_NS = "https://ontology.dkg.io/devgraph#"; export declare const RDF_TYPE_IRI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; export declare const DEFAULT_GRAPH = "did:dkg:context-graph:dev-coordination"; export declare function uri(s: string): string; export declare function literal(s: string): string; export declare function intLiteral(n: number): string; export declare function boolLiteral(b: boolean): string; export declare function moduleUri(repoRoot: string, filePath: string): string; export declare function packageUri(name: string): string; export declare function symbolUri(repoRoot: string, filePath: string, name: string, kind: string): string; export interface IndexResult { quads: Quad[]; packageCount: number; moduleCount: number; functionCount: number; classCount: number; contractCount: number; } export interface IndexOptions { includeContent?: boolean; /** * When true, replace the regex-based Solidity extractor with an AST-based * one that reads Hardhat `artifacts/build-info/*.json` and emits richer * devgraph: quads (StateVariable / Event / Error / Modifier as first-class * nodes, plus visibility / stateMutability / docstring / call-graph edges). * Packages without a build-info dir fall back to the regex pass. */ solidityAst?: boolean; /** * Target context graph id. If set, all emitted quads are rewritten to * carry `did:dkg:context-graph:` as their graph — required by the * daemon's SWM validator which rejects quads whose named graph does not * match the destination context graph. Defaults to 'dev-coordination' * (the legacy hardcoded graph in the extractors). */ contextGraphId?: string; } export declare function indexRepository(repoRoot: string, options?: IndexOptions): Promise; //# sourceMappingURL=indexer.d.ts.map