/** * @fileoverview Catalog JSON renderer — emits the engine's per-run * `Catalog` + edge output as a `CatalogExport` document conformant to * the wire shape opensip's substrate ingestor (Phase 5) consumes. * * Renderer is a pure function: takes the catalog + indexes + a tenant / * repo / git-sha scope + run provenance, returns a JSON string. Streams * to a file at the orchestrate-CLI level (not stdout) because catalog * JSON for 100k-file repos exceeds practical stdout buffer sizes — * see Phase 3 Task 3.4 for the file-output wiring. * * Phase 3 Task 3.3 per DEC-498. * * Symbol-ID / edge-ID derivation: byte-for-byte mirror of opensip's * `computeSymbolId` / `computeEdgeId` so `INSERT ... ON CONFLICT DO * UPDATE` collides correctly on existing substrate rows. * * Edge taxonomy at v1: `calls` plus `depends_on` module-import edges. * `creation` may be added later. */ import type { CatalogExportProvenance } from './catalog-json-types.js'; import type { Catalog, Indexes } from '../types.js'; export interface RenderCatalogJsonInput { readonly catalog: Catalog; readonly indexes: Indexes; readonly provenance: CatalogExportProvenance; readonly repoId: string; readonly gitSha: string; } /** * Render the engine's catalog as a `CatalogExport` JSON document. * * Ordering of `symbols` and `edges` is stable across runs (sorted by * id) so byte-equivalence holds for golden-fixture tests and * idempotent re-ingestion via `ON CONFLICT DO UPDATE`. * * Cognitive complexity >15 from the double-nested occurrence walk that * also fans out call+dependency edges, plus the chunked string assembly * for memory safety on large repos. The logic must be kept together for * the determinism contract. Disable scoped to the renderer. */ export declare function renderCatalogJson(input: RenderCatalogJsonInput): string; //# sourceMappingURL=catalog-json.d.ts.map