import { z } from 'zod'; import { a as DocBridgeIndexV1 } from './knowledge-BSFT4d03.js'; declare const FindingV1Schema: z.ZodObject<{ type: z.ZodLiteral<"finding">; schemaVersion: z.ZodLiteral<1>; id: z.ZodString; category: z.ZodString; assertion: z.ZodObject<{ document: z.ZodString; key: z.ZodString; }, z.core.$strict>; evidenceHash: z.ZodString; status: z.ZodLazy>; layer: z.ZodEnum<{ L0: "L0"; L1: "L1"; L2: "L2"; }>; confidence: z.ZodNumber; severity: z.ZodLazy>; entities: z.ZodArray; evidence: z.ZodArray; path: z.ZodString; lineStart: z.ZodOptional; lineEnd: z.ZodOptional; contentHash: z.ZodOptional; context: z.ZodOptional; }, z.core.$strict>>>; routing: z.ZodEnum<{ proposed: "proposed"; excluded: "excluded"; "routed-to-L2": "routed-to-L2"; "pending-version": "pending-version"; }>; documentationUpdate: z.ZodOptional>; priority: z.ZodOptional>; changedDescendantPaths: z.ZodOptional>; generator: z.ZodOptional; coverage: z.ZodArray; scope: z.ZodString; status: z.ZodEnum<{ complete: "complete"; partial: "partial"; "not-analyzed": "not-analyzed"; "not-applicable": "not-applicable"; }>; reason: z.ZodOptional; evidence: z.ZodOptional; path: z.ZodString; lineStart: z.ZodOptional; lineEnd: z.ZodOptional; contentHash: z.ZodOptional; context: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>>>; provenance: z.ZodObject<{ repository: z.ZodString; revision: z.ZodString; configurationHash: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; type FindingV1 = z.infer; declare const DecisionV1Schema: z.ZodObject<{ type: z.ZodLiteral<"decision">; schemaVersion: z.ZodLiteral<1>; target: z.ZodObject<{ kind: z.ZodEnum<{ remediation: "remediation"; finding: "finding"; }>; id: z.ZodString; }, z.core.$strict>; by: z.ZodString; reason: z.ZodEnum<{ "not-a-divergence": "not-a-divergence"; "wrong-fix": "wrong-fix"; "code-should-change": "code-should-change"; "out-of-scope": "out-of-scope"; }>; evidenceHash: z.ZodString; }, z.core.$strict>; type DecisionV1 = z.infer; declare const RegionEditSchema: z.ZodObject<{ path: z.ZodString; range: z.ZodObject<{ start: z.ZodNumber; end: z.ZodNumber; }, z.core.$strict>; expectedRegionHash: z.ZodString; original: z.ZodString; replacement: z.ZodString; anchors: z.ZodOptional; }, z.core.$strict>>; lineStart: z.ZodNumber; lineEnd: z.ZodNumber; }, z.core.$strict>; declare const RemediationV1Schema: z.ZodObject<{ type: z.ZodLiteral<"remediation">; schemaVersion: z.ZodLiteral<1>; id: z.ZodString; findingId: z.ZodString; evidenceHash: z.ZodString; regionHashAlgo: z.ZodLiteral<"sha256-bytes-v1">; coordinates: z.ZodLiteral<"utf8-byte-half-open-v1">; baseRevision: z.ZodString; configurationHash: z.ZodString; edits: z.ZodArray; expectedRegionHash: z.ZodString; original: z.ZodString; replacement: z.ZodString; anchors: z.ZodOptional; }, z.core.$strict>>; lineStart: z.ZodNumber; lineEnd: z.ZodNumber; }, z.core.$strict>>; diff: z.ZodString; status: z.ZodEnum<{ proposed: "proposed"; stale: "stale"; superseded: "superseded"; rejected: "rejected"; "in-review": "in-review"; merged: "merged"; }>; binding: z.ZodObject<{ revision: z.ZodString; evidenceHash: z.ZodString; configurationHash: z.ZodString; artifactHash: z.ZodString; }, z.core.$strict>; revalidation: z.ZodOptional>; approval: z.ZodOptional>; presentation: z.ZodOptional>; }, z.core.$strict>; type RemediationV1 = z.infer; type RegionEdit = z.infer; declare const KNOWLEDGE_ENTITY_SCHEMA_VERSION: 1; declare const KnowledgeEntityEvidenceV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"document-region">; path: z.ZodString; lineStart: z.ZodNumber; lineEnd: z.ZodNumber; regionHash: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"commit">; sha: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"fact">; factId: z.ZodString; }, z.core.$strict>], "kind">; declare const KnowledgeEntityLinkV1Schema: z.ZodObject<{ kind: z.ZodEnum<{ "affected-path": "affected-path"; "affected-fact": "affected-fact"; "defines-symbol": "defines-symbol"; supersedes: "supersedes"; "superseded-by": "superseded-by"; }>; target: z.ZodString; symbol: z.ZodOptional; }, z.core.$strict>; declare const KnowledgeEntityV1Schema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; id: z.ZodString; kind: z.ZodEnum<{ change: "change"; decision: "decision"; concept: "concept"; }>; name: z.ZodString; aliases: z.ZodArray; evidence: z.ZodArray; path: z.ZodString; lineStart: z.ZodNumber; lineEnd: z.ZodNumber; regionHash: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"commit">; sha: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"fact">; factId: z.ZodString; }, z.core.$strict>], "kind">>; links: z.ZodArray; target: z.ZodString; symbol: z.ZodOptional; }, z.core.$strict>>; status: z.ZodOptional; date: z.ZodOptional; conventional: z.ZodOptional; breaking: z.ZodBoolean; }, z.core.$strict>>; }, z.core.$strict>; declare const MemoryEntityRelationV1Schema: z.ZodObject<{ kind: z.ZodLiteral<"memory-supports">; candidateId: z.ZodString; target: z.ZodString; evidence: z.ZodObject<{ kind: z.ZodEnum<{ path: "path"; id: "id"; alias: "alias"; }>; value: z.ZodString; rawPath: z.ZodOptional; factHash: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; type MemoryEntityRelationV1 = z.infer; declare const KnowledgeEntitiesV1Schema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; entities: z.ZodArray; id: z.ZodString; kind: z.ZodEnum<{ change: "change"; decision: "decision"; concept: "concept"; }>; name: z.ZodString; aliases: z.ZodArray; evidence: z.ZodArray; path: z.ZodString; lineStart: z.ZodNumber; lineEnd: z.ZodNumber; regionHash: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"commit">; sha: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"fact">; factId: z.ZodString; }, z.core.$strict>], "kind">>; links: z.ZodArray; target: z.ZodString; symbol: z.ZodOptional; }, z.core.$strict>>; status: z.ZodOptional; date: z.ZodOptional; conventional: z.ZodOptional; breaking: z.ZodBoolean; }, z.core.$strict>>; }, z.core.$strict>>; memoryRelations: z.ZodOptional; candidateId: z.ZodString; target: z.ZodString; evidence: z.ZodObject<{ kind: z.ZodEnum<{ path: "path"; id: "id"; alias: "alias"; }>; value: z.ZodString; rawPath: z.ZodOptional; factHash: z.ZodString; }, z.core.$strict>; }, z.core.$strict>>>; coverage: z.ZodArray; scope: z.ZodString; status: z.ZodEnum<{ complete: "complete"; partial: "partial"; "not-analyzed": "not-analyzed"; "not-applicable": "not-applicable"; }>; reason: z.ZodOptional; evidence: z.ZodOptional; path: z.ZodString; lineStart: z.ZodOptional; lineEnd: z.ZodOptional; contentHash: z.ZodOptional; context: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>>; }, z.core.$strict>; type KnowledgeEntityV1 = z.infer; type KnowledgeEntityEvidenceV1 = z.infer; type KnowledgeEntityLinkV1 = z.infer; type KnowledgeEntitiesV1 = z.infer; declare const MEMORY_CANDIDATE_SCHEMA_VERSION: 1; declare const MemoryCandidateV1Schema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; id: z.ZodString; source: z.ZodEnum<{ manual: "manual"; cursor: "cursor"; claude: "claude"; codex: "codex"; copilot: "copilot"; "agent-memory": "agent-memory"; }>; rawPath: z.ZodOptional; fact: z.ZodString; why: z.ZodOptional; howToApply: z.ZodOptional; suggestedType: z.ZodEnum<{ unknown: "unknown"; project: "project"; user: "user"; feedback: "feedback"; reference: "reference"; }>; confidence: z.ZodNumber; references: z.ZodArray; }, z.core.$strict>; type MemoryCandidateV1 = z.infer; type MemoryRoute = 'agent' | 'human' | 'playbook' | 'discard'; type MemoryClassification = { readonly candidate: MemoryCandidateV1; readonly route: MemoryRoute; readonly reason: string; readonly target?: string; readonly entityRelations?: readonly MemoryEntityRelationV1[]; readonly duplicateOf?: string; }; type SafetyFinding = { readonly candidateId: string; readonly kind: 'secret' | 'private-email'; readonly message: string; }; type MemoryPromotionDraft = { readonly ok: boolean; readonly title: string; readonly body: string; readonly findings: SafetyFinding[]; readonly classifications: MemoryClassification[]; }; /** Explicit, exact references only; a shared alias/path never chooses an arbitrary entity. */ declare const linkMemoryToEntities: (candidates: readonly MemoryCandidateV1[], section: KnowledgeEntitiesV1) => MemoryEntityRelationV1[]; declare const classifyMemoryCandidates: (candidates: readonly MemoryCandidateV1[], index: DocBridgeIndexV1) => MemoryClassification[]; declare const scanMemorySafety: (classifications: readonly MemoryClassification[]) => SafetyFinding[]; declare const draftMemoryPromotion: (classifications: readonly MemoryClassification[]) => MemoryPromotionDraft; type GithubPrOptions = { readonly dryRun?: boolean; readonly force?: boolean; readonly branch?: string; readonly base?: string; }; type GithubPrResult = { readonly ok: boolean; readonly dryRun: boolean; readonly draftPath: string; readonly branch: string; readonly prUrl?: string; readonly previewUrl?: string; readonly commands: readonly string[]; readonly message: string; }; declare const defaultPromotionDraftPath: (root: string) => string; declare const writePromotionDraft: (root: string, draft: MemoryPromotionDraft, path?: string) => string; declare const promoteMemoryToGithubPr: (root: string, draft: MemoryPromotionDraft, options?: GithubPrOptions) => GithubPrResult; export { scanMemorySafety as A, writePromotionDraft as B, type DecisionV1 as D, type FindingV1 as F, type GithubPrResult as G, type KnowledgeEntitiesV1 as K, type MemoryCandidateV1 as M, type RemediationV1 as R, type SafetyFinding as S, DecisionV1Schema as a, FindingV1Schema as b, type GithubPrOptions as c, KNOWLEDGE_ENTITY_SCHEMA_VERSION as d, KnowledgeEntitiesV1Schema as e, type KnowledgeEntityEvidenceV1 as f, KnowledgeEntityEvidenceV1Schema as g, type KnowledgeEntityLinkV1 as h, KnowledgeEntityLinkV1Schema as i, type KnowledgeEntityV1 as j, KnowledgeEntityV1Schema as k, MEMORY_CANDIDATE_SCHEMA_VERSION as l, MemoryCandidateV1Schema as m, type MemoryClassification as n, type MemoryEntityRelationV1 as o, MemoryEntityRelationV1Schema as p, type MemoryPromotionDraft as q, type MemoryRoute as r, type RegionEdit as s, RegionEditSchema as t, RemediationV1Schema as u, classifyMemoryCandidates as v, defaultPromotionDraftPath as w, draftMemoryPromotion as x, linkMemoryToEntities as y, promoteMemoryToGithubPr as z };