/** * SCIP export — derives a valid `index.scip` payload from an OpenLore call * graph. * * SCIP (Source Code Intelligence Protocol) is Sourcegraph's open successor to * LSIF. This is a one-way interop export: the SQLite/JSON graph remains * canonical, and we lossily project the subset of it that SCIP can model * (functions → symbols, call edges → reference/definition occurrences). * * Guarantees: * - Deterministic: documents sorted by relative path, occurrences by * `(line, col)`, symbols deduplicated and sorted. Re-running on an unchanged * graph produces byte-identical output. * - Faithful or loud: if a node we export lacks a defining line (a range a * SCIP consumer expects), the export throws rather than emitting a malformed * index. Column-level precision is unavailable in the analyzer today, so we * emit zero-width ranges at column 0 and warn once. * TODO(spec-04-followup): column ranges in analyzer. * - TODO(spec-04-followup): scip import (consume external SCIP into the graph). */ import type { SerializedCallGraph } from '../analyzer/call-graph.js'; import { type PackageInfo } from './moniker.js'; export interface ExportScipOptions { /** Absolute path to the project root. Emitted (URI-encoded) as project_root. */ projectRoot: string; /** Package coordinates filling the SCIP `` symbol slot. */ package: PackageInfo; /** openlore's own version, emitted as tool_info.version. */ toolVersion: string; /** Gitignore-style globs over repo-relative paths; if set, only matches participate. */ include?: string[]; /** Gitignore-style globs over repo-relative paths; matches are dropped. */ exclude?: string[]; /** Out-param: populated with summary statistics and warnings for the CLI. */ report?: ExportReport; } export interface ExportReport { documentCount: number; occurrenceCount: number; symbolCount: number; definitionCount: number; /** Repo-relative paths whose language has no SCIP enum value. */ unspecifiedLanguageFiles: string[]; warnings: string[]; } /** * Build a deterministic SCIP `index.scip` payload from a serialized call graph. * Returns the encoded protobuf bytes. */ export declare function exportScip(graph: SerializedCallGraph, options: ExportScipOptions): Buffer; //# sourceMappingURL=index.d.ts.map