import { z } from "zod"; import { type NolArtifactRef, type NolRecipeRevision } from "../_types/schemas/nol.js"; import { type NolArtifactStore } from "../_types/execution/nol/artifacts.js"; import type { NolStore, NolJob } from "../_types/orchestrator/nol/store.js"; import { NolVllmHostSession, type NolVllmHostOptions, type NolVllmConformanceAuthority } from "./vllm-adapter.js"; export declare const NOL_VLLM_PROFILE_KIND = "nol_vllm_conformance", NOL_VLLM_ISSUED_KIND = "nol_vllm_conformance_issued"; export declare const NolVllmProfilePlanSchema: z.ZodObject<{ schema: z.ZodLiteral<"omnius.nol.vllm-profile-plan.v1">; id: z.ZodString; planDigest: z.ZodString; model: z.ZodObject<{ schema: z.ZodLiteral<"omnius.nol.model.v1">; id: z.ZodString; modelDigest: z.ZodString; format: z.ZodEnum<{ gguf: "gguf"; safetensors: "safetensors"; pytorch: "pytorch"; hf: "hf"; gguf_adapter: "gguf_adapter"; safetensors_adapter: "safetensors_adapter"; pytorch_adapter: "pytorch_adapter"; lora: "lora"; }>; files: z.ZodArray; artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; }, z.core.$strict>>; parents: z.ZodArray; }, z.core.$strict>>; architecture: z.ZodObject<{ family: z.ZodString; layers: z.ZodNumber; hiddenSize: z.ZodNumber; }, z.core.$strict>; architectureMapDigest: z.ZodString; tensorSites: z.ZodArray; layer: z.ZodNumber; width: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ id: z.ZodString; kind: z.ZodLiteral<"residual">; layer: z.ZodNumber; width: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ id: z.ZodString; kind: z.ZodLiteral<"attention_head">; layer: z.ZodNumber; headCount: z.ZodNumber; width: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ id: z.ZodString; kind: z.ZodLiteral<"expert_output">; layer: z.ZodNumber; expertCount: z.ZodNumber; width: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ id: z.ZodString; kind: z.ZodLiteral<"router_logits">; layer: z.ZodNumber; expertCount: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ id: z.ZodString; kind: z.ZodLiteral<"parameter">; name: z.ZodString; layer: z.ZodOptional; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; role: z.ZodEnum<{ ffn: "ffn"; attention: "attention"; embedding: "embedding"; router: "router"; bias: "bias"; norm: "norm"; other: "other"; }>; }, z.core.$strict> ], "kind">>; quantization: z.ZodObject<{ method: z.ZodString; bits: z.ZodOptional; groupSize: z.ZodOptional; configDigest: z.ZodOptional; }, z.core.$strict>; tokenizerDigest: z.ZodString; specialTokens: z.ZodRecord; chatTemplateDigest: z.ZodString; contextLength: z.ZodNumber; }, z.core.$strict>; prompt: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; cells: z.ZodArray; id: z.ZodString; revision: z.ZodNumber; recipeDigest: z.ZodString; modelDigest: z.ZodString; architectureMapDigest: z.ZodString; approximateLoweringAcknowledged: z.ZodOptional>; parentModelDigests: z.ZodArray; operations: z.ZodArray; calibrationId: z.ZodOptional; operation: z.ZodLiteral<"NEURON_ADD">; neuron: z.ZodNumber; amount: z.ZodNumber; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"NEURON_GAIN">; neuron: z.ZodNumber; factor: z.ZodNumber; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ units: z.ZodEnum<{ raw: "raw"; residual_norm: "residual_norm"; activation_std: "activation_std"; }>; calibrationId: z.ZodOptional; operation: z.ZodLiteral<"NEURON_REPLACE">; neuron: z.ZodNumber; replacement: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"scalar">; value: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"tensor">; tensor: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; }, z.core.$strict> ], "kind">; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ units: z.ZodEnum<{ raw: "raw"; residual_norm: "residual_norm"; activation_std: "activation_std"; }>; calibrationId: z.ZodOptional; operation: z.ZodLiteral<"RESIDUAL_ADD">; vector: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; scale: z.ZodNumber; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"DIRECTION_PROJECT">; basis: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; strength: z.ZodNumber; normalization: z.ZodLiteral<"orthonormal">; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"ATTENTION_HEAD_GAIN">; head: z.ZodNumber; factor: z.ZodNumber; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"EXPERT_GAIN">; expert: z.ZodNumber; factor: z.ZodNumber; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ units: z.ZodEnum<{ raw: "raw"; residual_norm: "residual_norm"; activation_std: "activation_std"; }>; calibrationId: z.ZodOptional; operation: z.ZodLiteral<"EXPERT_ROUTING_BIAS">; expert: z.ZodNumber; amount: z.ZodNumber; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"WEIGHT_ADD">; delta: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"scalar">; value: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"tensor">; tensor: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; }, z.core.$strict> ], "kind">; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"WEIGHT_GAIN">; gain: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"scalar">; factor: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"axis">; axis: z.ZodNumber; factors: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; }, z.core.$strict> ], "kind">; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"WEIGHT_REPLACE">; replacement: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"WEIGHT_PROJECT">; side: z.ZodEnum<{ left: "left"; right: "right"; }>; basis: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; strength: z.ZodNumber; normalization: z.ZodLiteral<"orthonormal">; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"LOW_RANK_UPDATE">; a: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; b: z.ZodObject<{ artifact: z.ZodObject<{ uri: z.ZodString; sha256: z.ZodString; sizeBytes: z.ZodNumber; mediaType: z.ZodString; }, z.core.$strict>; shape: z.ZodArray; dtype: z.ZodEnum<{ f16: "f16"; bf16: "bf16"; f32: "f32"; f64: "f64"; i8: "i8"; i16: "i16"; i32: "i32"; i64: "i64"; u8: "u8"; bool: "bool"; quantized: "quantized"; }>; }, z.core.$strict>; rank: z.ZodNumber; alpha: z.ZodNumber; scale: z.ZodNumber; scaling: z.ZodLiteral<"alpha_over_rank">; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<"WEIGHT_MERGE">; sources: z.ZodArray>; id: z.ZodString; siteId: z.ZodString; tokenScope: z.ZodDiscriminatedUnion<[ z.ZodObject<{ kind: z.ZodLiteral<"all">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"prompt">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"generated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"positions">; positions: z.ZodArray; }, z.core.$strict> ], "kind">; }, z.core.$strict> ], "operation">>; calibrations: z.ZodArray; id: z.ZodString; modelDigest: z.ZodString; architectureMapDigest: z.ZodString; units: z.ZodEnum<{ raw: "raw"; residual_norm: "residual_norm"; activation_std: "activation_std"; }>; definitionDigest: z.ZodString; corpusDigest: z.ZodOptional; tokenPositionsDigest: z.ZodOptional; statistics: z.ZodOptional>; siteScales: z.ZodArray>; }, z.core.$strict>>; createdAt: z.ZodString; provenance: z.ZodArray; sourceDigest: z.ZodOptional; license: z.ZodOptional; artifact: z.ZodOptional>; }, z.core.$strict>>; }, z.core.$strict>; randomSeed: z.ZodNumber; }, z.core.$strict>>; seed: z.ZodNumber; maxTokens: z.ZodNumber; budgets: z.ZodObject<{ maxDurationMs: z.ZodNumber; maxPromptTokens: z.ZodNumber; maxGeneratedTokens: z.ZodNumber; maxSyntheticSamplerRows: z.ZodNumber; maxStartupForwardPositions: z.ZodNumber; maxCaptureBytesPerRequest: z.ZodNumber; maxArtifactBytes: z.ZodNumber; }, z.core.$strict>; }, z.core.$strict>; export type NolVllmProfilePlan = z.infer; export interface NolVllmProfileContext { actorId: string; assertAuthorized(): void; signal?: AbortSignal; } export interface NolVllmProfileOptions extends NolVllmHostOptions { id: string; projectRoot: string; store: NolStore; ownerId: string; artifacts: Pick; limits: { maxJobs: number; maxRequestsPerJob: number; maxCaptureBytesPerRequest: number; maxArtifactBytesPerJob: number; maxMetadataBytes: number; maxTotalStorageBytes: number; minimumFreeBytes: number; }; leaseMs?: number; /** Host-only CPU custody fixture; production always constructs the real session. */ createHostSession?: (...args: ConstructorParameters) => NolVllmHostSession; } type TrialRecord = { cell: number; phase: string; recipe: NolRecipeRevision | null; raw: NolArtifactRef; capture: NolArtifactRef; verification: NolArtifactRef; tokenization: NolArtifactRef; independentTokenization: NolArtifactRef; placementProof: NolArtifactRef; requestId: string; reset: NolArtifactRef; }; export interface NolVllmIssuedConformance { schema: "omnius.nol.vllm-conformance-issued.v1"; projectId: string; scopeDigest: string; jobId: string; generation: number; ownerId: string; manifestDigest: string; planDigest: string; evidence: NolArtifactRef; settlements: NolArtifactRef[]; trials: TrialRecord[]; } /** Host owns SQLite and the immutable issued namespace; API/CAS documents are * data. Local OS owners able to rewrite this private database are trusted. * Failed and unknown outputs retain their durable storage slot and quota. */ export declare class NolVllmProfileService { readonly projectId: string; readonly scopeDigest: string; private readonly active; private closing; private readonly options; private readonly implementationDigest; private readonly journal; constructor(options: NolVllmProfileOptions); private validated; submit(input: unknown, context: NolVllmProfileContext): NolJob; private manifest; show(jobId: string, context: NolVllmProfileContext): NolJob; private assert; private hostImplementation; private publisher; run(jobId: string, context: NolVllmProfileContext): Promise<{ job: NolJob; issuedRecordId?: string; }>; private session; private trial; private settle; private custody; private usage; private execute; cancel(jobId: string, context: NolVllmProfileContext, reason?: string): NolJob; private inlineNoDispatch; /** Read-only custody recovery for the genuine prior claim, never requeue or * reconstruct a model. Unknown acquire/worker history stays quarantined. */ recoverCleanup(jobId: string, context: NolVllmProfileContext): Promise; stopOwned(reason?: string): Promise; get ownedJobIds(): string[]; shutdown(): Promise; recoverIssuance(jobId: string, context: NolVllmProfileContext): Promise<{ job: NolJob; issuedRecordId: string; }>; private verifyIssued; resolveIssued(recordId: string, signal?: AbortSignal): Promise; } export {};