import { type NolCudaMutationSummary } from "./cuda-mutations.js"; export interface NolOrphanIdentity { jobId: string; ownerId: string; generation: number; } export interface NolOrphanProbeLimits { timeoutMs: number; maxProcesses: number; maxCommandBytes: number; maxEnvironmentBytes: number; maxTelemetryBytes: number; concurrency: number; maxProofEntries: number; } export interface NolOrphanProbeResult { schema: "omnius.nol.orphan-custody.v1"; identity: NolOrphanIdentity; workerPath: string; requestedBrokerOwnerPrefix: string; settled: boolean; complete: boolean; observations: { brokerSnapshots: number; cudaSnapshots: number; processesInspected: number; processScanComplete: boolean; }; matchingWorkers: Array<{ pid: number; startIdentity: string; }>; matchingLeases: Array<{ owner: string; state: string; gpuUuids: string[]; }>; unknown: string[]; unknownCount: number; proofTruncated: boolean; checkedAt: string; } export interface NolOrphanProbeInput { identity: NolOrphanIdentity; workerPath: string; signal?: AbortSignal; } /** Read-only seams. Production never reads private broker tokens or process * environments belonging to scripts other than the exact configured worker. */ export interface NolOrphanProbeDependencies { listPids(maximum: number, signal: AbortSignal): Promise<{ pids: number[]; complete: boolean; }>; readProc(pid: number, file: "cmdline" | "stat" | "environ", maximum: number, signal: AbortSignal): Promise; discover(maximum: number, signal: AbortSignal): Promise; cudaProcesses(maximum: number, signal: AbortSignal): Promise; /** Trusted read-only host state, never a public caller's passed flag. A * missing seam cannot establish terminal acquisition after process loss. */ acquisitions?(ownerPrefix: string, signal: AbortSignal): Promise; now(): string; } export declare function nolHistoricalBrokerOwnerPrefix(identity: NolOrphanIdentity): string; /** Two broker/CUDA snapshots bracket a complete bounded process scan. Existing * peers are observed only through public command metadata. Only exact worker * script candidates have the three ownership environment keys inspected. No * PID is signalled and no lease mutation/token lookup is ever performed. * Unknown or incomplete telemetry cannot establish absence after a restart. * Arbitrarily renamed custom assets have no durable path history; their fresh * instance absence is unsupported and fails closed. Official packaged worker * basenames are recognized across install-root changes. */ export declare function probeNolOrphanCustody(input: NolOrphanProbeInput, dependencies?: NolOrphanProbeDependencies, options?: Partial): Promise;