import { type NavigationFile } from "../navigate/store.js"; import { type Ledger } from "../judge/ledger.js"; import { type FrameSet } from "./frames.js"; import { type ClusterState } from "../fix/state.js"; import { type Forge } from "../report/forge.js"; import type { FixCluster } from "../fix/cluster.js"; import type { Backlog, IssueRecord } from "../backlog/lib.js"; import type { CaptureReport, ResolvedConfig, RunRecord, ShotRecord } from "../types.js"; /** The slice of the issue record a rendering reads. */ export type IssueRecordView = Pick; export interface IssueContext { resolved: ResolvedConfig; cluster: FixCluster; record?: IssueRecordView; /** The capture workspace, absolute. */ evDir: string; /** The frames frozen into this issue's own folder. */ frames: FrameSet; /** * Every attempt lookout has ruled on. Truth written by verify-fix, never * regenerated; read here so the document can say what has been tried. */ state: ClusterState; /** * The capture workspace's report, when it is still there. Working state that * any capture rebuilds, so every section reading it degrades to what the * config says when it is gone: the document never fails for a cleaned * workspace. */ report: CaptureReport | null; /** * The navigation plans lookout has made for this project, when it has any: * what a state other than rest is, and what was clicked to reach it. */ plans: NavigationFile | null; /** * The judge ledger, for the transcripts behind this issue's views. Absent * when the project has none yet. */ ledger: Ledger | null; /** * The whole backlog, when the caller has it open: what lets a document name * the other issues filed on the same screenshot. A caller rendering one * issue in isolation leaves it out, and the section is simply absent. */ backlog?: Backlog; /** * The repository's forge, asked for at most once and only when a section * needs a commit URL: it runs git, and most issues have no fix to link yet. */ forge: () => Promise; } /** What a caller can hand the renderer beyond the issue itself. */ export interface IssueExtras { backlog?: Backlog; } export declare function loadIssueContext(resolved: ResolvedConfig, cluster: FixCluster, record?: IssueRecordView, extras?: IssueExtras): Promise; /** The recorded shot behind a member's newest evidence, when the report still has it. */ export declare function shotOf(ctx: IssueContext, shotId: string): ShotRecord | undefined; /** * The run that produced the issue's newest evidence: what flags the filing * capture ran with, and when. Absent once the workspace has been rebuilt by a * capture that did not include it. */ export declare function filingRunOf(ctx: IssueContext): RunRecord | undefined;