import { type NolFrozenScoringAdapter } from "../_types/orchestrator/nol/coordinator.js"; import { NolFacade, NolHostAuthority, type NolFacadePermission, type NolFacadeRequest, type NolHostCallerGrant } from "./facade.js"; import { SqliteNolStore } from "./sqlite-store.js"; import { type NolTransformersAdapterOptions } from "./transformers-adapter.js"; import { type NolVllmComputeConfig } from "./vllm-runtime-config.js"; import type { NolVllmAuthorityHost } from "./vllm-authority.js"; import { type NolGneProfileExecution } from "./gne-profile.js"; import { type NolNeuronaryCatalogConfig } from "./neuronary-catalog.js"; import { type NolModelRuntimeConfig } from "./model-runtime-config.js"; import { buildNolModelJsonScorer } from "./model-json-scorer.js"; import { type NolExportRuntimeConfig } from "./export-runtime-config.js"; type TransformersComputeConfig = Omit & { backend: "transformers"; }; export type NolGneComputeConfig = NolGneProfileExecution & { backend: "gne"; conformanceRecordId?: string; }; type ComputeConfig = TransformersComputeConfig | NolGneComputeConfig | NolVllmComputeConfig; export interface NolRuntimeConfig { schema: "omnius.nol.project-runtime.v1"; databasePath: string; artifactRoot: string; maxArtifactBytes: number; scoring: { kind: "json_exact"; jsonSchema: unknown; draft: "draft7" | "2020-12"; }; compute?: ComputeConfig; neuronary?: NolNeuronaryCatalogConfig; exports?: NolExportRuntimeConfig; models?: NolModelRuntimeConfig; } /** Trusted host code only. Never accepted from project JSON, tools or requests. */ export interface NolRuntimeHostOptions { onPlacementConfirmed?: NolTransformersAdapterOptions["onPlacementConfirmed"]; onVllmLoadAuthorized?: NolVllmAuthorityHost["onLoadAuthorized"]; } /** Bounded regular-file JSON input; no FIFO waits or unbounded growing-file read. */ export declare function readNolJsonDocument(path: string, maxBytes?: number): Promise; export declare const NOL_LOCAL_PERMISSIONS: readonly NolFacadePermission[]; /** Separate grants for explicit local asset commands and authenticated admin * ingress; read/run daemon callers never inherit these permissions. */ export declare const NOL_LOCAL_M3_PERMISSIONS: readonly NolFacadePermission[]; export declare function canonicalNolProject(root: string): string; export declare function nolProjectId(root: string): string; export declare function readNolRuntimeConfig(root: string, configPath: string): Promise; /** Pinned AJV syntax/schema/content metrics. No repair, trimming, or model judge. */ export declare function buildNolJsonScorer(profile: NolRuntimeConfig["scoring"]): { scorer: NolFrozenScoringAdapter; harnessDigest: string; graders: Array<{ metricId: string; id: string; digest: string; }>; validateExpected(value: unknown): void; }; /** Local operator-only registration; never called by request body or agent tools. */ export declare function configureNolProject(projectRoot: string, configPath: string): Promise<{ projectId: string; configPath: string; }>; export declare function registeredNolConfigPath(projectRoot: string): Promise; export declare class NolProjectRuntime { readonly projectRoot: string; readonly config: NolRuntimeConfig; readonly authority: NolHostAuthority; readonly facade: NolFacade; readonly store: SqliteNolStore; readonly profile: ReturnType; readonly modelProfile: ReturnType; private coordinator; private coordinatorReady; private gneProfiles; private vllmServices; private recipeCatalog; private assetExports; private modelServices; private readonly exportGrants; private readonly catalogGrants; private readonly preparingRuns; private stopEpoch; private readonly active; private closing; constructor(projectRoot: string, config: NolRuntimeConfig, hostOptions?: NolRuntimeHostOptions); dispatch(grant: NolHostCallerGrant, request: NolFacadeRequest | unknown): Promise; waitForIdle(): Promise; stopOwned(): Promise; shutdown(): Promise; } /** Local Stop never creates storage or loads a model. */ export declare function stopOwnedNolWork(projectRoot: string): Promise; /** Process-owned shared runtime: local TUI and daemon calls reuse the same owner. */ export declare function openNolProjectRuntime(projectRoot: string, configPath?: string, hostOptions?: NolRuntimeHostOptions): Promise; export declare function shutdownNolRuntimes(options?: { closeAdmission?: boolean; }): Promise; export {};