/** * ApprovedFinding — the structural safety boundary between the hub and the * Sprint-12 `SeoBuilder` (spec-20260717-seo-improver-builder, Sprint 11; * ADR-4, `.bober/architecture/arch-20260716-seo-improver-builder-extension-adr-4.md`). * * Constructible ONLY via `ApprovedFinding.from(...)` — the sole factory, * itself never throwing — which asserts the hub Finding is human-approved * AND carries a well-formed `cite:` evidence URL before minting an instance. * A raw/dropped/downgraded/uncited `SeoFinding` has NO public path into this * type: a dropped finding never reached the hub as an approved action, so no * `ApprovedFinding` can exist for it (resurrection structurally impossible, * sc-11-1/sc-11-2). * * Schema-vs-contract reconciliation (see the Sprint-11 briefing §0): the * canonical hub `FindingSchema.status` (`../hub/finding.js:23`) is * `z.enum(["open","in-progress","snoozed","done","dropped"])` — there is NO * `"approved"` status, so `finding.status === "approved"` against a raw * `Finding` is a TS2367 compile error. Mirroring the do-bridge port-local * pattern (`../do-bridge/finding-port.ts:10-19`, "the hub schema is NOT * modified"), `ApprovedHubFindingSchema` below WIDENS the status union * locally — `../hub/finding.ts` stays byte-identical. Likewise `Finding` has * no top-level `citationUrl`; the SEO citation round-trips inside * `evidence[]` as a `cite:` string (encoded at * `../hub-emitter.ts:76`, decode precedent at `../benchmark/harness.ts:112-121`) * — `extractCitationUrl` below decodes exactly what the emitter encoded. */ import { z } from "zod"; /** * Builder-local widened view of the hub `Finding` shape — adds `"approved"` * to the status union WITHOUT mutating the canonical `FindingSchema` * (mirrors `../../do-bridge/finding-port.ts:10-19`). Every other field is * reused verbatim via `.extend()`. */ export declare const ApprovedHubFindingSchema: z.ZodObject<{ id: z.ZodString; domain: z.ZodString; title: z.ZodString; kind: z.ZodEnum<["action", "watch", "risk", "question"]>; urgency: z.ZodNumber; severity: z.ZodNumber; evidence: z.ZodArray; surfacedAt: z.ZodString; dueBy: z.ZodOptional; tags: z.ZodArray; estDurationMin: z.ZodOptional; calendarSafeTitle: z.ZodOptional; promotesTo: z.ZodOptional; } & { status: z.ZodEnum<["open", "in-progress", "snoozed", "done", "dropped", "approved"]>; }, "strip", z.ZodTypeAny, { id: string; domain: string; title: string; kind: "action" | "watch" | "risk" | "question"; status: "open" | "in-progress" | "snoozed" | "done" | "dropped" | "approved"; urgency: number; severity: number; evidence: string[]; surfacedAt: string; tags: string[]; dueBy?: string | undefined; estDurationMin?: number | undefined; calendarSafeTitle?: string | undefined; promotesTo?: string | undefined; }, { id: string; domain: string; title: string; kind: "action" | "watch" | "risk" | "question"; status: "open" | "in-progress" | "snoozed" | "done" | "dropped" | "approved"; urgency: number; severity: number; evidence: string[]; surfacedAt: string; tags: string[]; dueBy?: string | undefined; estDurationMin?: number | undefined; calendarSafeTitle?: string | undefined; promotesTo?: string | undefined; }>; export type ApprovedHubFinding = z.infer; /** * A hub Finding a human has approved, carrying a decoded, well-formed * citation. The private constructor + private brand field together make * this type NOMINAL: a structurally-similar plain object (e.g. a raw * `SeoFinding` literal) is never assignable, and `new ApprovedFinding(...)` * is unreachable outside this module. `ApprovedFinding.from` is the ONLY * public construction path. */ export declare class ApprovedFinding { /** The hub Finding id this instance was derived from (provenance). */ readonly sourceFindingId: string; readonly title: string; /** Extracted from the `cite:` evidence entry — never invented. */ readonly sourceCitationUrl: string; readonly severity: 1 | 2 | 3 | 4 | 5; /** From the `playbook:` tag; empty string if the tag is absent. */ readonly playbookRef: string; /** From the `workflow:` tag; empty string if the tag is absent. */ readonly workflow: string; private readonly __brand; private constructor(); /** Debug representation; also reads `__brand` so it is not flagged unused under `noUnusedLocals`. */ toString(): string; /** * The ONLY way to build an `ApprovedFinding`. Returns `null` — NEVER * throws — when `finding.status !== "approved"` or the `cite:` evidence * entry is missing/malformed. This is the single gate ADR-4's Risk * section calls out: "if the adapter itself trusts an un-approved * Finding, the guarantee leaks" — so both checks happen here, in the one * place an `ApprovedFinding` can be minted. */ static from(finding: ApprovedHubFinding): ApprovedFinding | null; } //# sourceMappingURL=approved-finding.d.ts.map