import { type NolArtifactRef, type NolModelManifest, type NolOperation, type NolRuntimeBinding } from "../_types/schemas/nol.js"; import { type NolArtifactStore } from "../_types/execution/nol/artifacts.js"; import type { NolJob, NolStore } from "../_types/orchestrator/nol/store.js"; import type { NolGneAdapterOptions, NolGneColumnInventory, NolGneConformanceCustody } from "./gne-adapter.js"; export type NolGneProfileCell = Extract; export interface NolGneProfilePlan { schema: "omnius.nol.gne-profile-plan.v1"; id: string; model: NolModelManifest; binding: NolRuntimeBinding; messagesArtifact: NolArtifactRef; tokenizerArtifact: NolArtifactRef; columnsArtifact: NolArtifactRef; cells: NolGneProfileCell[]; absoluteTolerance: number; relativeTolerance: number; budgets: { maxPromptTokens: number; maxPrefillTokens: number; maxArtifactBytes: number; maxDurationMs: number; }; } export type NolGneProfileExecution = Pick; export interface NolGneProfileOptions extends NolGneProfileExecution { projectRoot: string; artifactRoot: string; store: NolStore; artifacts: Pick; onPlacementConfirmed: NolGneAdapterOptions["onPlacementConfirmed"]; ownerId: string; leaseMs?: number; cleanupBudgetBytes?: number; settlementTimeoutMs?: number; now?: () => number; notice?: NolGneAdapterOptions["notice"]; createWorker?: NolGneAdapterOptions["createWorker"]; acquireLease?: NolGneAdapterOptions["acquireLease"]; readDriverVersion?: NolGneAdapterOptions["readDriverVersion"]; probeOrphanCustody?: NolGneAdapterOptions["probeOrphanCustody"]; } export interface NolGneProfileManifest { schema: "omnius.nol.gne-profile-job.v1"; projectId: string; artifactRoot: string; plan: NolGneProfilePlan; execution: NolGneProfileExecution; cleanupBudgetBytes: number; } export interface NolGneIssuedConformance { schema: "omnius.nol.gne-conformance-issued.v1"; projectId: string; jobId: string; manifestDigest: string; generation: number; ownerId: string; evidence: NolArtifactRef; settlement: NolArtifactRef; placementProof: NolArtifactRef; captureArtifact: NolArtifactRef; nativeReportArtifact: NolArtifactRef; verificationArtifact: NolArtifactRef; tokenizationArtifact: NolArtifactRef; columnsArtifact: NolArtifactRef; tokenizerArtifact: NolArtifactRef; bindingDigest: string; } export declare const NOL_GNE_ISSUED_KIND = "nol_gne_conformance_issued"; export declare const NOL_GNE_PROFILE_KIND = "nol_gne_conformance"; export declare function validateNolGneProfileExecution(value: NolGneProfileExecution): NolGneProfileExecution; export declare function parseNolGneProfilePlan(input: unknown, host: NolGneProfileExecution, cleanupBudgetBytes?: number): NolGneProfilePlan; export interface NolGneProfileResult { job: NolJob; issuedRecordId?: string; error?: string; } /** Job-owned conformance producer. Constructor and submit never acquire CUDA. * Only this host service can turn its terminal, physically settled journal into * an issued capability record. Numeric capture validation is separate authority. */ export declare class NolGneProfileService { private readonly options; readonly projectRoot: string; private readonly projectId; private readonly host; private readonly cleanupBytes; private readonly now; private readonly active; private closing; constructor(options: NolGneProfileOptions); get ownedJobIds(): string[]; private manifest; submit(input: unknown): NolJob; private current; private publish; private inputs; run(jobId: string): Promise; cancel(jobId: string, reason?: string): NolJob; recoverCleanup(jobId: string): Promise; private settle; /** Reconstruct counters from the immutable source-dispatch journal so the * same cleanup path works after an interruption without another prefill. */ private recordUsage; private execute; private recoverIssuance; shutdown(): Promise; } export interface NolGneIssuedResolution { issued: NolGneIssuedConformance; manifest: NolGneProfileManifest; columns: NolGneColumnInventory; tokenizerJson: string; conformance: NolGneConformanceCustody; } export interface NolGneIssuedVerificationInput { projectRoot: string; store: NolStore; artifacts: NolGneProfileOptions["artifacts"]; recordId: string; expected: NolGneProfileExecution; } export declare function verifyIssuedNolGneConformance(input: NolGneIssuedVerificationInput): Promise;