import { z } from "zod"; import { type NolModelManifest } from "../../schemas/nol.js"; export declare const NOL_GGUF_CONTROL_EDITOR_SHA256 = "fecf1d3ccb4b4d3964d15ae98b1da231e3eabb0aa5d3395f334cc6df24f9ea78"; /** Working bytes reserve explicit metadata/payload buffers. Python's separate * address-space cap includes interpreter/codec overhead; this is not a cap on * the embedding Node process or chunks retained by an external consumer. */ export declare const NolGgufControlReaderLimitsSchema: z.ZodObject<{ maxInputBytes: z.ZodNumber; maxWorkingBytes: z.ZodNumber; maxReadBytes: z.ZodNumber; maxTensors: z.ZodNumber; maxCoordinates: z.ZodNumber; maxMetadataBytes: z.ZodNumber; maxKeyValues: z.ZodNumber; maxArrayElements: z.ZodNumber; maxDecodedCoordinates: z.ZodNumber; maxDecodeArithmeticUnits: z.ZodNumber; maxRuntimeBytes: z.ZodNumber; maxRuntimeFiles: z.ZodNumber; maxDurationMs: z.ZodNumber; maxProtocolBytes: z.ZodNumber; maxStderrBytes: z.ZodNumber; chunkBytes: z.ZodNumber; maxReportBytes: z.ZodNumber; maxAddressSpaceBytes: z.ZodNumber; }, z.core.$strict>; export type NolGgufControlReaderLimits = z.infer; declare const runtimeSchema: z.ZodObject<{ schema: z.ZodLiteral<"omnius.nol.gguf-control-reader-runtime.v1">; pythonVersion: z.ZodString; pythonExecutable: z.ZodObject<{ sha256: z.ZodString; sizeBytes: z.ZodNumber; }, z.core.$strict>; packages: z.ZodArray>; reader: z.ZodObject<{ sha256: z.ZodString; sizeBytes: z.ZodNumber; }, z.core.$strict>; checkpointEditor: z.ZodObject<{ sha256: z.ZodString; sizeBytes: z.ZodNumber; }, z.core.$strict>; dependencyLock: z.ZodObject<{ sha256: z.ZodString; sizeBytes: z.ZodNumber; }, z.core.$strict>; pythonEnvironment: z.ZodObject<{ policy: z.ZodLiteral<"isolated_no_site_processing">; venvConfig: z.ZodObject<{ sha256: z.ZodString; sizeBytes: z.ZodNumber; }, z.core.$strict>; sitePackagesPathDigest: z.ZodString; }, z.core.$strict>; runtimeDigest: z.ZodString; }, z.core.$strict>; export type NolGgufControlReaderRuntime = z.infer; export declare const NOL_GGUF_CONTROL_BLOCKS: { readonly F32: { readonly typeId: 0; readonly elements: 1; readonly bytes: 4; }; readonly F16: { readonly typeId: 1; readonly elements: 1; readonly bytes: 2; }; readonly BF16: { readonly typeId: 30; readonly elements: 1; readonly bytes: 2; }; readonly Q8_0: { readonly typeId: 8; readonly elements: 32; readonly bytes: 34; }; readonly Q4_0: { readonly typeId: 2; readonly elements: 32; readonly bytes: 18; }; readonly Q4_K: { readonly typeId: 12; readonly elements: 256; readonly bytes: 144; }; readonly Q6_K: { readonly typeId: 14; readonly elements: 256; readonly bytes: 210; }; }; export type NolGgufControlQtype = keyof typeof NOL_GGUF_CONTROL_BLOCKS; export declare const NolGgufControlInventorySchema: z.ZodObject<{ schema: z.ZodLiteral<"omnius.nol.gguf-control-inventory.v1">; modelDigest: z.ZodString; runtimeDigest: z.ZodString; readerSha256: z.ZodString; checkpointEditorSha256: z.ZodLiteral<"fecf1d3ccb4b4d3964d15ae98b1da231e3eabb0aa5d3395f334cc6df24f9ea78">; files: z.ZodArray; sha256: z.ZodString; sizeBytes: z.ZodNumber; }, z.core.$strict>>; tensors: z.ZodArray; ggmlDimensions: z.ZodArray; qtype: z.ZodEnum<{ F16: "F16"; F32: "F32"; BF16: "BF16"; Q8_0: "Q8_0"; Q4_0: "Q4_0"; Q4_K: "Q4_K"; Q6_K: "Q6_K"; }>; typeId: z.ZodNumber; sourceFile: z.ZodString; dataOffsetBytes: z.ZodNumber; sizeBytes: z.ZodNumber; sha256: z.ZodString; elements: z.ZodNumber; storageClass: z.ZodEnum<{ ordinary_matrix_storage_only: "ordinary_matrix_storage_only"; ordinary_vector_storage_only: "ordinary_vector_storage_only"; ordinary_scalar_storage_only: "ordinary_scalar_storage_only"; }>; block: z.ZodObject<{ elements: z.ZodNumber; bytes: z.ZodNumber; rowElements: z.ZodNumber; rowBytes: z.ZodNumber; blocks: z.ZodNumber; }, z.core.$strict>; decoding: z.ZodEnum<{ independent_host_supported: "independent_host_supported"; opaque_only: "opaque_only"; }>; }, z.core.$strict>>; version: z.ZodLiteral<3>; alignment: z.ZodNumber; dataStartBytes: z.ZodNumber; metadataSha256: z.ZodString; usage: z.ZodObject<{ inputBytes: z.ZodNumber; logicalReadBytes: z.ZodNumber; reservedWorkingBytes: z.ZodNumber; }, z.core.$strict>; officialReaderVerified: z.ZodLiteral; codecsImportedAfterFullRuntimeAdmission: z.ZodLiteral; device: z.ZodLiteral<"cpu">; cudaInitialized: z.ZodLiteral; modelConstructed: z.ZodLiteral; numericalControlVerified: z.ZodLiteral; authority: z.ZodLiteral<"none">; }, z.core.$strict>; export type NolGgufControlInventory = z.infer; export interface NolGgufControlReaderHost { pythonPath: string; readerPath: string; expectedReaderSha256: string; checkpointEditorPath: string; expectedCheckpointEditorSha256: typeof NOL_GGUF_CONTROL_EDITOR_SHA256; dependencyLockPath: string; /** A private host-owned directory; each call retains a fresh private child. */ reportRoot: string; limits: NolGgufControlReaderLimits; } export interface NolGgufControlInventoryHandle { readonly inventory: Readonly; readonly reportPath: string; /** Detect source mutation before accepting results from these byte ranges. */ assertCurrent(): void; /** Must be applied to actual candidate-derived changed names. This method * does not accept a serialized claim that aliased edits are safe. */ assertNoChangedAliases(names: Iterable): void; /** Raw chunks contain complete storage blocks. Caller-retained chunks are * outside the reader-owned workspace budget. Consume to completion and call * assertCurrent before accepting any derived comparison. */ streamTensor(name: string, signal?: AbortSignal): AsyncGenerator; streamDecodedTensor(name: string, signal?: AbortSignal): AsyncGenerator; close(): Promise; } export declare class NolGgufControlReaderError extends Error { readonly reportDirectory: string; readonly processSettled: boolean; constructor(message: string, reportDirectory: string, processSettled: boolean, options?: ErrorOptions); } /** Full-source/runtime inspection only. This explicit CPU action never imports * NumPy/GGUF/Torch, tokenizes, constructs a model, installs a package, or touches CUDA. */ export declare function inspectNolGgufControlReaderRuntime(input: NolGgufControlReaderHost, signal?: AbortSignal): Promise<{ runtime: NolGgufControlReaderRuntime; reportPath: string; }>; /** Independent wire decoder. At most 4MiB raw input/32MiB F64 output per call. * Q8_0 is exactly FP16 scale followed by32 signed int8 values per block. This * function establishes no changed-block/control-norm or native conformance. */ export declare function decodeNolGgufControlBlocks(qtype: NolGgufControlQtype, raw: Uint8Array): Float64Array; export declare function openNolGgufControlInventory(input: { host: NolGgufControlReaderHost; runtime: NolGgufControlReaderRuntime; model: NolModelManifest; checkpointRoot: string; signal?: AbortSignal; }): Promise; export {};