import type { CrossLink, GroupManifestLink, StoredContract } from '../types.js'; import type { CypherExecutor } from '../contract-extractor.js'; export interface ManifestExtractResult { contracts: StoredContract[]; crossLinks: CrossLink[]; } /** * Stable synthetic symbolUid for a manifest-declared contract whose target * symbol could not be resolved against the per-repo graph (resolveSymbol * returned null). Two reasons we don't leave the uid empty: * * 1. The bridge stores Contract nodes keyed in part by symbolUid; an empty * uid means downstream Cypher queries that anchor on `provider.symbolUid` * can't tell two different unresolved manifest contracts apart. * 2. The cross-impact bridge query in cross-impact.ts joins local impact * results to bridge contracts via `WHERE provider.symbolUid IN $localUids`. * If the local impact engine produces a deterministic identifier for the * unresolved target, it must agree with the value the bridge stored. A * synthetic uid keyed off (repo, contractId) is the only thing both sides * can derive without knowing about each other. * * Format: `manifest::::`. Stable across syncs, scoped to a * single repo within a group, and never collides with real indexer uids * (which never start with `manifest::`). */ export declare function manifestSymbolUid(repo: string, contractId: string): string; export declare class ManifestExtractor { extractFromManifest(links: GroupManifestLink[], dbExecutors?: Map): Promise; private resolveSymbol; /** * Build a canonical contract id for a manifest link. * * HTTP is the only type with two valid forms: * - Explicit method: `"GET::/api/orders"` → `"http::GET::/api/orders"` * (matches exactly against `HttpRouteExtractor` provider/consumer * contracts, which are also keyed by `http::::`). * - Method-agnostic: `"/api/orders"` → `"http::*::/api/orders"` * — the `*` is a wildcard and is intended to match any concrete * HTTP method on that path. Wildcard-aware matching is the * responsibility of the sync / cross-impact layer (see #793); * downstream code should treat `http::*::` as matching * every `http::::` for the same path. * * Recommend the explicit-method form in group.yaml whenever the * manifest author knows the method — it round-trips through exact * equality matching without requiring wildcard logic downstream. * * NOTE on exhaustiveness: the switch covers every current * `ContractType` variant and falls through to a `never` assertion so * TypeScript fails the build if a new variant is added without a * corresponding case. */ private buildContractId; }