import { Logger } from '@origintrail-official/dkg-core'; import type { RoutePlugin } from './plugin-api.js'; /** * Ensure `/plugins/package.json` exists so the stable * plugin install root has a valid `createRequire` anchor. Per * OT-RFC-41 §4.6.1 / Bundle B1e this is the long-term resolution * root for bare-name `routePlugins`; it survives Core slot swaps * AND Edge npm reinstalls. * * Idempotent. Failures are non-fatal — the loader falls back to * the daemon-local `import.meta.url` anchor below if the stable * root is unavailable for any reason. * * Returns the absolute path to the materialised `package.json`, * or `null` if the write failed. */ export declare function ensureStablePluginRoot(dkgHome: string): string | null; export interface LoadRoutePluginsOptions { /** * Path to the DKG state home (typically `~/.dkg`). When provided, * bare-name plugin specs resolve from `/plugins` first * — the stable resolution root per OT-RFC-41 §4.6.1 / Bundle B1e. * When omitted, bare-name specs resolve from the loader-local * `import.meta.url` (back-compat for pre-Bundle-B callers). */ dkgHome?: string; } export declare function loadRoutePlugins(specs: unknown, log: Logger, opts?: LoadRoutePluginsOptions): Promise; /** Spec count for `route-plugins-loaded` telemetry; non-arrays report 0 so malformed config isn't leaked. */ export declare function countConfiguredPluginSpecs(raw: unknown): number; //# sourceMappingURL=plugin-loader.d.ts.map