import type { EngagementScope } from "./scope.js"; export type FindingState = "suspected" | "reproduced" | "verified" | "reported" | "remediated" | "retested" | "rejected" | "inconclusive"; export type CoverageState = "applicable" | "covered" | "inconclusive" | "excluded"; export interface EngagementFinding { id: string; title: string; targetId: string; state: FindingState; reproduction?: string | undefined; impact?: string | undefined; remediation?: string | undefined; evidenceIds: string[]; severity?: string | undefined; updatedAt: string; } export interface EngagementEvidence { id: string; targetId: string; testCaseId?: string | undefined; artifactPath?: string | undefined; artifactHash?: string | undefined; observation: string; observedAt: string; } export interface EngagementCheckpoint { id: string; actionId: string; jobId: string; status: string; artifactPath: string; offset: number; observation: string; recordedAt: string; } export interface EngagementActionRecord { id: string; targetId: string; testCaseId: string; tool: string; phase: string; capability: string; authorized: boolean; authorizationReason: string; status: "blocked" | "running" | "passed" | "failed" | "inconclusive"; evidenceId?: string | undefined; recordedAt: string; } export interface EngagementGraph { schemaVersion: 1; id: string; name: string; scope: EngagementScope; assets: Array<{ id: string; value: string; addresses: string[]; services: string[]; endpoints: string[]; }>; principals: Array<{ id: string; label: string; roles: string[]; }>; testCases: Array<{ id: string; targetId: string; phase: string; capability: string; status: "planned" | "running" | "passed" | "failed" | "inconclusive"; }>; actions: EngagementActionRecord[]; checkpoints: EngagementCheckpoint[]; evidence: EngagementEvidence[]; findings: EngagementFinding[]; coverage: Array<{ dimension: string; state: CoverageState; rationale: string; }>; residualRisk: string[]; createdAt: string; updatedAt: string; } /** Stable across process restarts and conversation compaction for the same authorization. */ export declare function engagementIdForScope(scope: EngagementScope): string; export declare function createEngagement(scope: EngagementScope): EngagementGraph; export declare function saveEngagement(graph: EngagementGraph): Promise; export declare function loadEngagement(id: string): Promise; export declare function openEngagement(scope: EngagementScope): Promise; export declare function beginEngagementAction(graph: EngagementGraph, input: { tool: string; target: string; phase: string; capability: string; authorized: boolean; reason: string; }): EngagementActionRecord; export declare function recordEngagementCheckpoint(graph: EngagementGraph, input: Omit): EngagementCheckpoint; export declare function reconcileEngagementJob(graph: EngagementGraph, input: { jobId: string; status: string; artifactPath: string; offset: number; observation: string; }): EngagementCheckpoint | undefined; export declare function finishEngagementAction(graph: EngagementGraph, actionId: string, result: { ok: boolean; observation: string; artifactPath?: string | undefined; scannerLead?: boolean | undefined; }): EngagementEvidence; export declare function transitionFinding(graph: EngagementGraph, findingId: string, state: FindingState, patch?: Partial>): EngagementFinding; export declare function createFinding(graph: EngagementGraph, input: Pick & Partial>): EngagementFinding; export declare function renderEngagementReport(graph: EngagementGraph): string;