/**
 * Findings this report cannot answer that are not the project's doing.
 *
 * The report has two audiences and they are not the same person. A consumer
 * project is asking "what is wrong with MY project, that I can fix". Rendering
 * one unfixed Lisa defect as fifty-two blanks in their report tells them their
 * project is largely unverified when nothing about it is at fault, and the
 * next thing they do is go looking for a problem they do not have.
 *
 * "Fifty-two not checked here" is the wrong unit. It is ONE upstream
 * limitation affecting fifty-two cells, and it has a ticket number. So the
 * cells stay exactly as unknown as they were — the three-state rule is
 * untouched, and nothing here turns a row green — and the report additionally
 * says who owns them.
 *
 * Attribution, never suppression. Only a reason listed here is reattributed,
 * and every reason listed here is provably Lisa's. A project's own missing
 * script, absent declaration or unreadable settings file carries a reason that
 * is NOT in this table and stays firmly in the project's view, however
 * unflattering.
 * @module cli/gate-report-upstream
 */
import type { GateRegistryModule } from "./gate-report-registry.js";
import type { AgentHookEvidence, Finding, GateReportRow, UpstreamLimitation } from "./gate-report-types.js";
/** One limitation, before this report's counts are attached. */
interface UpstreamCatalogEntry {
    /** The upstream issue that closes it. */
    readonly ticket: string;
    /** One sentence naming the limitation. */
    readonly headline: string;
    /** Why the report cannot answer, and what closing it would change. */
    readonly detail: string;
    /** What the count counts. */
    readonly unit: string;
}
/** The moments agent hooks fire at, before and after the write. */
export declare const PRE_TOOL = "pre-tool";
export declare const POST_TOOL = "post-tool";
/**
 * Gates the registry permits declaring at either agent-edit moment.
 *
 * Both moments, deliberately. The boundary is `pre-tool` before the write and
 * `post-tool` after it, and five of the seven shipped edit scripts fire at the
 * latter — so counting only `pre-tool` would report the whole boundary as
 * undeclarable while most of it had just become declarable.
 *
 * It lives beside the two constants rather than with its caller because they
 * are the only thing it reads, and the caller is at its line ceiling.
 * @param registry - The shipped registry
 * @returns How many registry entries list either tool moment
 */
export declare function toolMomentLegalGates(registry: GateRegistryModule): number;
/** The synthetic reason filed when no gate may be declared at those moments. */
export declare const PRE_TOOL_REASON = "pre-tool-not-declarable";
/**
 * The synthetic reason filed once they ARE declarable and still unread.
 *
 * The two are deliberately separate rather than one entry with softer wording.
 * When the registry gained `pre-tool` and `post-tool` gates the first reason
 * stopped being true, and an entry keyed only on that would have vanished —
 * leaving the report silent about enforcement that still consults nothing. A
 * control that stops reporting when half its cause is fixed is the failure this
 * whole report exists to surface, so the remaining half gets its own name.
 */
export declare const PRE_TOOL_UNWIRED_REASON = "tool-moment-not-wired";
/**
 * Every machine reason that belongs to Lisa rather than to the project.
 *
 * Keyed by the exact `reason` string the findings carry, so a reason has to be
 * added here deliberately. A typo attributes nothing, which is the safe
 * direction: an unattributed finding stays in the project's view.
 */
export declare const UPSTREAM_LIMITATIONS: Readonly<Record<string, UpstreamCatalogEntry>>;
/**
 * Whether a finding's unknown is one Lisa owns.
 * @param finding - Any finding
 * @returns True when it carries an upstream-owned reason
 */
export declare function isUpstreamFinding(finding: Finding<unknown>): boolean;
/**
 * Build the upstream section for one report.
 *
 * Empty is the goal state, and an entry only appears when this report actually
 * hit it — a limitation affecting nothing here is not reported here.
 * @param options - Report inputs
 * @param options.rows - Every gate row
 * @param options.agentHooks - Edit-time hooks proved active
 * @param options.toolMomentLegalGates - Gates the registry permits at either
 *   tool moment. Counting only `pre-tool` would read the boundary as
 *   undeclarable while five of the seven shipped scripts fire at `post-tool`.
 * @returns The limitations, sorted by ticket for a stable payload
 */
export declare function collectUpstream(options: {
    rows: readonly GateReportRow[];
    agentHooks: Finding<readonly AgentHookEvidence[]>;
    toolMomentLegalGates: number;
}): UpstreamLimitation[];
export {};
//# sourceMappingURL=gate-report-upstream.d.ts.map