import type { Result } from '@forgeax/engine-types'; import { type ProducerSemanticIdentityInput } from './evidence/producer-identity.js'; import { type AnyScriptablePackDefinition, type PackAuthoringError } from './pack-authoring.js'; import type { ScriptablePackSourceClosureEntry } from './scriptable-pack.js'; import { type ScriptablePackSourceSnapshot } from './scriptable-pack-source-snapshot.js'; export { createScriptablePackSourceSnapshot, type ScriptablePackSourceSnapshot, } from './scriptable-pack-source-snapshot.js'; export interface ScriptablePackModuleExecutor { load(sourcePath: string, sources?: Readonly>): Promise; dispose?(reason: 'complete' | 'timeout' | 'failure'): void | Promise; } export interface ScriptablePackModuleExecutorPool { acquire(): Promise; dispose(): Promise; } export interface ScriptablePackModuleExecutorPoolOptions { readonly maxWorkers?: number; readonly maxTasksPerWorker?: number; } export declare function scriptablePackDdcKey(input: ProducerSemanticIdentityInput): string; export interface OptionalBuildCache { readonly read: () => Promise; readonly coldCook: () => Promise; } /** Build CAS is a performance hint; source cold cook remains the correctness path. */ export declare function readOptionalBuildCache(cache: OptionalBuildCache): Promise<{ readonly value: T; readonly fromCache: boolean; }>; /** A standalone inventory has a fresh snapshot; build owners may share one explicitly. */ export declare function inventoryScriptablePackSource(sourcePath: string, initialSourceText?: string, resolveImport?: (sourcePath: string, specifier: string) => Promise, snapshot?: ScriptablePackSourceSnapshot): Promise; export declare function createScriptablePackModuleExecutorPool(options?: ScriptablePackModuleExecutorPoolOptions): ScriptablePackModuleExecutorPool; export interface LoadScriptablePackOptions { readonly timeoutMs?: number; readonly buildTimeoutMs?: number; readonly executor?: ScriptablePackModuleExecutor; readonly metadataOnly?: boolean; readonly sourceSnapshot?: ScriptablePackSourceSnapshot; } /** Metadata owns no worker; each execution owns one bounded, recyclable lease. */ export declare function createLazyScriptablePackDefinition(input: { readonly sourcePath: string; readonly definition: AnyScriptablePackDefinition; readonly sourceClosure: readonly ScriptablePackSourceClosureEntry[]; readonly executors: ScriptablePackModuleExecutorPool; readonly sourceSnapshot: ScriptablePackSourceSnapshot; }): AnyScriptablePackDefinition; /** Load a ScriptablePack source contract in an isolated module executor. */ export declare function loadScriptablePack(sourcePath: string, options?: LoadScriptablePackOptions): Promise, PackAuthoringError>>; //# sourceMappingURL=scriptable-pack-node.d.ts.map