import { type SessionGoalReportRequirement } from "@opengeni/contracts"; import { type Database } from "./database.js"; import { type PersistedEditableArtifactActor } from "./editable-artifacts.js"; /** Versioned, server-owned metadata. Malformed persisted data fails closed. */ export declare const GOAL_REPORT_REQUIREMENTS_KEY = "reportRequirementsV1"; export declare function goalReportRequirements(metadata: Record): SessionGoalReportRequirement[]; export declare function appendGoalReportRequirements(metadata: Record, declarations?: readonly SessionGoalReportRequirement[]): Record; export type ReportArtifactActor = Extract; /** Trusted application-only recorder, called after native query/decode. There is * no public route/tool accepting this proof body. The runtime SQL role remains * trusted: it can insert receipt-shaped rows, so stored proof is not a native * execution attestation against arbitrary application-role SQL. UPDATE and * direct DELETE are fenced; legitimate session-retention cascades remove proof. */ export declare function recordNativeDocumentInspection(db: Database, input: { scope: { accountId: string; workspaceId: string; }; actor: ReportArtifactActor; sessionId: string; artifact: { id: string; modality: string; headSequence: number; stateHash: string; }; queryHash: string; queryKind: string; }): Promise; /** No provider calls here: receipt, access, locked current head and completion * share one transaction. Receipts from previous attempts may prove inspection, * but the completing attempt must still have live read authority. */ export declare function verifyGoalReportDeliveries(tx: Database, input: { accountId: string; workspaceId: string; sessionId: string; metadata: Record; deliveries: unknown; actor?: ReportArtifactActor; }): Promise;