import { f as PluginInstallRecord, r as KlawConfig } from "./types.klaw-xKUw_Rz7.js"; import { n as PluginManifestRegistry } from "./manifest-registry-DfLhto5W.js"; import { _ as KlawPluginDefinition, ht as PluginLogger, u as KlawPluginApi } from "./types-CAmC_cW72.js"; import { n as GatewayRequestHandler } from "./types-Uz0MJyKC.js"; import { t as CreatePluginRuntimeOptions } from "./types-yybOtwsl.js"; import { t as PluginActivationConfigSource } from "./config-state-D-LqIpPT.js"; import { t as NormalizedPluginsConfig } from "./config-normalization-shared-CnwRWbCp.js"; import { a as PluginRegistryParams, i as PluginRegistry } from "./registry-types-B0zD11yB.js"; import { _ as resolvePluginSdkScopedAliasMap, c as listPluginSdkExportedSubpaths, g as resolvePluginSdkAliasFile, h as resolvePluginSdkAliasCandidateOrder, i as buildPluginLoaderJitiOptions, m as resolvePluginRuntimeModulePath, n as PluginSdkResolutionPreference, r as buildPluginLoaderAliasMap, s as listPluginSdkAliasCandidates, u as resolveExtensionApiAlias, v as shouldPreferNativeModuleLoad } from "./sdk-alias-C6GL4SnT.js"; //#region src/shared/import-specifier.d.ts /** * On Windows, Node's ESM loader requires absolute paths to be expressed as * file:// URLs. Raw drive-letter paths like C:\... are parsed as URL schemes. */ declare function toSafeImportPath(specifier: string): string; //#endregion //#region src/plugins/loader-channel-setup.d.ts declare function shouldLoadChannelPluginInSetupRuntime(params: { manifestChannels: string[]; setupSource?: string; startupDeferConfiguredChannelFullLoadUntilAfterListen?: boolean; cfg: KlawConfig; env: NodeJS.ProcessEnv; preferSetupRuntimeForChannelPlugins?: boolean; }): boolean; //#endregion //#region src/plugins/plugin-sdk-dist-alias.d.ts declare function ensureKlawPluginSdkAlias(distRoot: string): void; //#endregion //#region src/plugins/loader-cache-state.d.ts declare class PluginLoadReentryError extends Error { readonly cacheKey: string; constructor(cacheKey: string); } //#endregion //#region src/plugins/loader.d.ts type PluginLoadResult = PluginRegistry; type PluginLoadOptions = { config?: KlawConfig; activationSourceConfig?: KlawConfig; autoEnabledReasons?: Readonly>; workspaceDir?: string; env?: NodeJS.ProcessEnv; logger?: PluginLogger; coreGatewayHandlers?: Record; coreGatewayMethodNames?: readonly string[]; hostServices?: PluginRegistryParams["hostServices"]; runtimeOptions?: CreatePluginRuntimeOptions; startupTrace?: { detail: (name: string, metrics: ReadonlyArray) => void; }; pluginSdkResolution?: PluginSdkResolutionPreference; cache?: boolean; mode?: "full" | "validate"; onlyPluginIds?: string[]; includeSetupOnlyChannelPlugins?: boolean; forceSetupOnlyChannelPlugins?: boolean; requireSetupEntryForSetupOnlyChannelPlugins?: boolean; /** * Prefer `setupEntry` for configured channel plugins that explicitly opt in * via package metadata because their setup entry covers the pre-listen startup surface. */ preferSetupRuntimeForChannelPlugins?: boolean; /** * For hot startup paths, prefer bundled plugin JS artifacts over source TS * entrypoints when both are present in a source checkout. */ preferBuiltPluginArtifacts?: boolean; toolDiscovery?: boolean; activate?: boolean; loadModules?: boolean; throwOnLoadError?: boolean; manifestRegistry?: PluginManifestRegistry; }; declare class PluginLoadFailureError extends Error { readonly pluginIds: string[]; readonly registry: PluginRegistry; constructor(registry: PluginRegistry); } declare function clearPluginLoaderCache(): void; declare function clearActivatedPluginRuntimeState(): void; declare function clearPluginRegistryLoadCache(): void; declare function createGuardedPluginRegistrationApi(api: KlawPluginApi): { api: KlawPluginApi; close: () => void; }; declare function runPluginRegisterSync(register: NonNullable, api: Parameters>[0]): void; declare const testing: { buildPluginLoaderJitiOptions: typeof buildPluginLoaderJitiOptions; buildPluginLoaderAliasMap: typeof buildPluginLoaderAliasMap; listPluginSdkAliasCandidates: typeof listPluginSdkAliasCandidates; listPluginSdkExportedSubpaths: typeof listPluginSdkExportedSubpaths; resolveExtensionApiAlias: typeof resolveExtensionApiAlias; resolvePluginSdkScopedAliasMap: typeof resolvePluginSdkScopedAliasMap; resolvePluginSdkAliasCandidateOrder: typeof resolvePluginSdkAliasCandidateOrder; resolvePluginSdkAliasFile: typeof resolvePluginSdkAliasFile; resolvePluginRuntimeModulePath: typeof resolvePluginRuntimeModulePath; ensureKlawPluginSdkAlias: typeof ensureKlawPluginSdkAlias; shouldLoadChannelPluginInSetupRuntime: typeof shouldLoadChannelPluginInSetupRuntime; shouldPreferNativeModuleLoad: typeof shouldPreferNativeModuleLoad; toSafeImportPath: typeof toSafeImportPath; createGuardedPluginRegistrationApi: typeof createGuardedPluginRegistrationApi; runPluginRegisterSync: typeof runPluginRegisterSync; getCompatibleActivePluginRegistry: typeof getCompatibleActivePluginRegistry; resolvePluginLoadCacheContext: typeof resolvePluginLoadCacheContext; readonly maxPluginRegistryCacheEntries: number; setMaxPluginRegistryCacheEntriesForTest(value?: number): void; }; declare function resolvePluginLoadCacheContext(options?: PluginLoadOptions): { env: NodeJS.ProcessEnv; cfg: KlawConfig; normalized: NormalizedPluginsConfig; activationSourceConfig: KlawConfig; activationSource: PluginActivationConfigSource; autoEnabledReasons: Readonly>; onlyPluginIds: string[] | undefined; includeSetupOnlyChannelPlugins: boolean; forceSetupOnlyChannelPlugins: boolean; requireSetupEntryForSetupOnlyChannelPlugins: boolean; preferSetupRuntimeForChannelPlugins: boolean; preferBuiltPluginArtifacts: boolean; shouldActivate: boolean; shouldLoadModules: boolean; runtimeSubagentMode: "default" | "explicit" | "gateway-bindable"; installRecords: { [x: string]: PluginInstallRecord; }; cacheKey: string; }; declare function getCompatibleActivePluginRegistry(options?: PluginLoadOptions): PluginRegistry | undefined; declare function resolveRuntimePluginRegistry(options?: PluginLoadOptions): PluginRegistry | undefined; declare function getRuntimePluginRegistryForLoadOptions(options?: PluginLoadOptions): PluginRegistry | undefined; declare function resolvePluginRegistryLoadCacheKey(options?: PluginLoadOptions): string; declare function isPluginRegistryLoadInFlight(options?: PluginLoadOptions): boolean; declare function resolveCompatibleRuntimePluginRegistry(options?: PluginLoadOptions): PluginRegistry | undefined; declare function loadKlawPlugins(options?: PluginLoadOptions): PluginRegistry; declare function loadKlawPluginCliRegistry(options?: PluginLoadOptions): Promise; //#endregion export { clearPluginLoaderCache as a, isPluginRegistryLoadInFlight as c, resolveCompatibleRuntimePluginRegistry as d, resolvePluginRegistryLoadCacheKey as f, PluginLoadReentryError as h, clearActivatedPluginRuntimeState as i, loadKlawPluginCliRegistry as l, testing as m, PluginLoadOptions as n, clearPluginRegistryLoadCache as o, resolveRuntimePluginRegistry as p, PluginLoadResult as r, getRuntimePluginRegistryForLoadOptions as s, PluginLoadFailureError as t, loadKlawPlugins as u };