/** * `openlore manifest emit` — write `.well-known/openlore.json`. * * A pure file-emission feature: it reads the analysis artifacts OpenLore has * already produced plus local git state, and writes a small, public, * deterministic self-description. No network, no graph-schema changes. * * Determinism: `generated_at` is the HEAD commit date (not wall-clock), and all * arrays are sorted, so re-emitting on the same graph + commit is byte-stable. */ import type { SerializedCallGraph } from '../../core/analyzer/call-graph.js'; import { type ExportEntry, type PublicSymbol } from './detect/public-symbols.js'; import { type ManifestRoute, type RouteInventoryEntry } from './detect/http-routes.js'; import { type ManifestEvent, type ManifestConsumedEvent, type ManifestRpcEndpoint } from './detect/events.js'; export declare const MANIFEST_VERSION = 1; export interface ManifestEmitOptions { out?: string; projectRoot?: string; includePrivate?: boolean; maxSymbols?: number; } export interface Manifest { $schema: string; openlore_manifest_version: number; generated_at: string; generator: { name: string; version: string; }; repo: { name: string; git_remote: string | null; git_commit: string | null; default_branch: string | null; }; languages: Array<{ name: string; files: number; functions: number; }>; stats: { functions: number; files: number; modules: number; avg_mccabe: number; clusters: number; }; exports: { truncated?: boolean; public_symbols: PublicSymbol[]; http_routes: ManifestRoute[]; rpc_endpoints: ManifestRpcEndpoint[]; events_emitted: ManifestEvent[]; events_consumed: ManifestConsumedEvent[]; }; imports: { external_packages: Array<{ name: string; version_range: string | null; }>; }; specs: { count: number; drift_state: 'clean' | 'drifted' | 'unverified'; }; links: { repo: string | null; docs: string | null; }; } interface PackageJson { name?: string; version?: string; main?: string; module?: string; dependencies?: Record; peerDependencies?: Record; exports?: unknown; } declare function readPackageJson(projectRoot: string): PackageJson | null; export interface ManifestInputs { projectRoot: string; graph: SerializedCallGraph; exportsByFile: Map; routes: RouteInventoryEntry[]; pkg: ReturnType; specCount: number; git: { remote: string | null; commit: string | null; defaultBranch: string | null; committedAt: string | null; }; toolVersion: string; hasDocs: boolean; } /** Build the manifest object (pure — all I/O is done by the caller). */ export declare function buildManifest(inputs: ManifestInputs, opts: ManifestEmitOptions): Manifest; /** Serialize a manifest to the exact bytes written to disk. */ export declare function serializeManifest(manifest: Manifest): string; export declare function runManifestEmit(opts: ManifestEmitOptions): Promise; export {}; //# sourceMappingURL=emit.d.ts.map