import type { TCoreArgument, TCoreClaim, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable, TOptionalChecksum } from "../schemata/index.js"; import { ArgumentEngine, type TLogicEngineOptions } from "./argument-engine.js"; import { ClaimLibrary } from "./claim-library.js"; import type { TArgumentLibrarySnapshot } from "./interfaces/library.interfaces.js"; import type { TInvariantValidationResult } from "../types/validation.js"; export type TArgumentLibraryLibraries = { claimLibrary: ClaimLibrary; }; /** * Engine registry with lifecycle management. Stores `ArgumentEngine` instances * keyed by argument ID. */ export declare class ArgumentLibrary { private engines; private libraries; private options?; constructor(libraries: TArgumentLibraryLibraries, options?: TLogicEngineOptions); /** * Constructs a new `ArgumentEngine` for the given argument and stores it. * * @param argument - The argument entity to create an engine for. Checksum * fields are optional and will be computed lazily by the engine. * @returns The newly created engine. * @throws If an engine with the same argument ID already exists. */ create(argument: TOptionalChecksum): ArgumentEngine; /** * Registers a pre-built `ArgumentEngine` in the library by its argument ID. * Used internally when forking creates a new engine that needs to be tracked. * * @param engine - The engine to register. * @throws If an engine with the same argument ID already exists. */ register(engine: ArgumentEngine): void; /** * Returns the engine for the given argument ID, or `undefined` if not * found. * * @param argumentId - The argument ID to look up. * @returns The engine, or `undefined`. */ get(argumentId: string): ArgumentEngine | undefined; /** * Returns all engines in the library as an array. * * @returns An array of all managed engines. */ getAll(): ArgumentEngine[]; /** * Removes the engine for the given argument ID and returns it. * * @param argumentId - The argument ID to remove. * @returns The removed engine. * @throws If no engine with the given ID exists. */ remove(argumentId: string): ArgumentEngine; /** * Returns a serializable snapshot of all engines in the library. * * @returns The argument library snapshot. */ snapshot(): TArgumentLibrarySnapshot; /** * Merges invariant validation results from all managed engines via * each engine's `validateInvariants()` (schema conformance, * reference integrity, ownership, conclusion ref, circularity, * checksums). Four-tier grammar validation runs separately per * engine via `engine.validate(tier)` and is not aggregated here. * * @returns A combined validation result. */ validate(): TInvariantValidationResult; /** * Restores an `ArgumentLibrary` from a snapshot by calling * `ArgumentEngine.fromSnapshot()` for each engine snapshot. * * @param snapshot - The serialized library snapshot. * @param libraries - The shared library instances (claim). * @param options - Optional engine construction options. * @returns A fully restored `ArgumentLibrary`. */ static fromSnapshot(snapshot: TArgumentLibrarySnapshot, libraries: TArgumentLibraryLibraries, options?: TLogicEngineOptions): ArgumentLibrary; } //# sourceMappingURL=argument-library.d.ts.map