export interface CodegraphInfo { available: boolean; version?: string; path?: string; } export declare function detectCodegraph(): CodegraphInfo; export interface CodegraphStatus { initialized: boolean; nodeCount: number; edgeCount: number; fileCount: number; nodesByKind: Record; [key: string]: unknown; } export interface ExtractionResult { success: true; status: CodegraphStatus; } export interface ExtractionError { success: false; error: string; code?: string; } export type ExtractionOutcome = ExtractionResult | ExtractionError; /** * A codegraph-derived knowledge proposal. * * Carries STRUCTURAL FACTS only — not prose. The calling agent (which has LLM * tokens) is responsible for producing the final `title`/`summary`/`keywords` * during the proposal-promote step. See plan * `2026-06-02-graphify-proposal-gate-implementation-plan` §Proposal Shape. * * `suggestedDedupCandidates` is intentionally NOT on this type — that's * computed by the proposal-store layer when proposals are written to disk, * not at ingest time. */ export interface KnowledgeProposal { /** Stable id, e.g. "codegraph-cluster-src-utils". */ id: string; kind: "architecture" | "module" | "gotcha" | "pattern"; /** Human-friendly label. Agents will write the final title. */ label: string; structuralFacts: ProposalStructuralFacts; sourceFiles: Array<{ path: string; anchor?: string; }>; } export interface ProposalStructuralFacts { memberCount?: number; fileCount?: number; /** e.g. { code: 260, document: 0 } */ fileTypeBreakdown?: Record; topHubs?: Array<{ label: string; file: string; in: number; out: number; }>; topFilesByEntityCount?: Array<{ file: string; count: number; }>; incomingFromOtherClusters?: number; outgoingToOtherClusters?: number; nodeFile?: string; nodeIn?: number; nodeOut?: number; topCallers?: Array<{ label: string; file: string; }>; topCallees?: Array<{ label: string; file: string; }>; couplingA?: { label: string; file: string; degree: number; }; couplingB?: { label: string; file: string; degree: number; }; /** Edge relation types (e.g. ["imports_from", "calls"]). */ relations?: string[]; } export interface IngestionResult { proposals: KnowledgeProposal[]; stats: { godNodes: number; communities: number; crossModuleCouplings: number; totalProposals: number; }; } export declare function runIndex(workspacePath: string): ExtractionOutcome; export declare function ingestGraph(_workspacePath: string, _slug: string): IngestionResult; //# sourceMappingURL=codegraph.d.ts.map