/** * Storage layer for `~/.arcs/projects//proposals/codegraph.json`. * * Codegraph ingestion writes here (instead of `knowledge/`) so a downstream * gate can review proposals before they are promoted into the durable * knowledge index. Reads/writes mirror the rest of the storage layer: * Zod-validated I/O, atomic writes via `withLock`, descriptive errors. */ export type ProposalKind = "architecture" | "module" | "gotcha" | "pattern"; export interface Proposal { id: string; kind: ProposalKind; label: string; /** * Structural facts extracted from the graph. Treated permissively here * (`Record`); T007 will define the precise shape. */ structuralFacts: Record; sourceFiles: Array<{ path: string; anchor?: string; }>; suggestedDedupCandidates: Array<{ id: string; overlap: string[]; }>; } export interface ProposalsFile { version: 1; generatedAt: string; graphFingerprint: string; proposals: Proposal[]; } /** * Read the proposals file. Returns null if it does not exist. * Throws an `invalidFileFormat` DagError if the file fails Zod validation. */ export declare function readProposals(slug: string): Promise; /** * Write the proposals file atomically through `withLock`. * Validates the payload with Zod before writing; creates `proposals/` * if missing; produces 2-space JSON with a trailing newline. */ export declare function writeProposals(slug: string, data: ProposalsFile): Promise; /** * Remove a proposal by id. Returns true if a proposal was removed, * false if no proposal with that id existed (or the file does not exist). * Idempotent — never throws on a missing target. */ export declare function removeProposal(slug: string, proposalId: string): Promise; /** * For each proposal, scan the project's `knowledge/index.json` for entries * whose `sourceFiles[].path` overlap with the proposal's `sourceFiles[].path`. * Returns proposals with `suggestedDedupCandidates` populated. * * Pure — does not write anywhere. Caller decides when (and whether) to persist. */ export declare function annotateDedupCandidates(slug: string, proposals: Proposal[]): Promise; /** * Compute a SHA256 hex digest of the given graph.json content. * Deterministic — identical input bytes always produce the same digest. */ export declare function computeGraphFingerprint(graphJsonContent: string): string; //# sourceMappingURL=proposal-store.d.ts.map