import type { ResolvedPluginManifest } from '@moxxy/sdk'; /** * Topological sort of discovered plugin manifests by their static * `requirements` (from `package.json#moxxy.requirements`). Only * `kind: 'plugin'` requirements participate; everything else (runtime, * provider-state, etc.) is irrelevant to load order. * * Behavior: * - A manifest whose required plugin name doesn't appear in `manifests` * is left in place — the readiness check in PluginHost will reject it * later. Toposort doesn't pre-judge. * - Optional requirements (`optional: true`) are treated as soft edges: * if the target is present we order around it; if not, we skip the * edge silently. * - Cycles throw `PluginCycleError` with the participating plugin names * so the caller can surface a useful diagnostic instead of silently * loading in an arbitrary order. */ export declare class PluginCycleError extends Error { readonly cycle: ReadonlyArray; constructor(cycle: ReadonlyArray); } export declare function toposortPluginManifests(manifests: ReadonlyArray): ReadonlyArray; //# sourceMappingURL=toposort.d.ts.map