import type { EventBus } from "../event-bus.ts"; import type { Extension, ExtensionAPI, ExtensionFactory, ExtensionRuntime } from "./types.ts"; export declare const EXTENSION_FACTORY_TIMEOUT_MS = 30000; export declare class ExtensionFactoryTimeoutError extends Error { } /** Create the shared pre-bind state used by both file-backed and inline extension factories. */ export declare function createExtensionRuntime(): ExtensionRuntime; export declare function createExtension(extensionPath: string, resolvedPath: string): Extension; export declare function createExtensionAPI(extension: Extension, runtime: ExtensionRuntime, cwd: string, eventBus: EventBus, agentDir: string): ExtensionAPI; export declare function runExtensionFactory(factory: ExtensionFactory, api: ExtensionAPI, timeoutMs?: number): Promise; export interface ExtensionLoadRuntimeSnapshot { pendingProviderRegistrations: ExtensionRuntime["pendingProviderRegistrations"]; flagValues: Map; providerRegistrations: ExtensionRuntime["providerRegistrations"]; } export declare function snapshotExtensionLoadRuntime(runtime: ExtensionRuntime): ExtensionLoadRuntimeSnapshot; export declare function restoreExtensionLoadRuntime(runtime: ExtensionRuntime, snapshot: ExtensionLoadRuntimeSnapshot): void; export declare function loadExtensionFromFactory(factory: ExtensionFactory, cwd: string, eventBus: EventBus, runtime: ExtensionRuntime, extensionPath?: string, options?: { factoryTimeoutMs?: number; agentDir?: string; }): Promise; //# sourceMappingURL=factory-runtime.d.ts.map