/**
 * Extension loader - loads TypeScript extension modules using jiti.
 *
 * Uses @mariozechner/jiti fork with virtualModules support for compiled Bun binaries.
 */
import { type EventBus } from "../event-bus.js";
export { isProjectTrusted, trustProject, getUntrustedExtensionPaths } from "./project-trust.js";
import type { Extension, ExtensionFactory, ExtensionRuntime, LoadExtensionsResult } from "./types.js";
export declare function importExtensionModule<T = unknown>(parentModuleUrl: string, specifier: string): Promise<T>;
/**
 * Create a runtime with throwing stubs for action methods.
 * Runner.bindCore() replaces these with real implementations.
 */
export declare function createExtensionRuntime(): ExtensionRuntime;
/**
 * Check whether a source string likely contains TypeScript syntax.
 * This is a heuristic — it may produce false positives for unusual JS,
 * but is tuned to catch the most common TS-in-JS mistakes.
 */
export declare function containsTypeScriptSyntax(source: string): boolean;
/**
 * Create an Extension from an inline factory function.
 */
export declare function loadExtensionFromFactory(factory: ExtensionFactory, cwd: string, eventBus: EventBus, runtime: ExtensionRuntime, extensionPath?: string): Promise<Extension>;
/**
 * Load extensions from paths.
 *
 * Extensions are loaded in parallel to reduce wall-clock time (~30-50% faster
 * than sequential loading for I/O-bound jiti compilation).
 */
export declare function loadExtensions(paths: string[], cwd: string, eventBus?: EventBus): Promise<LoadExtensionsResult>;
/**
 * Discover and load extensions from standard locations.
 */
export declare function discoverAndLoadExtensions(configuredPaths: string[], cwd: string, agentDir?: string, eventBus?: EventBus): Promise<LoadExtensionsResult>;
//# sourceMappingURL=loader.d.ts.map