import type { DevFlowPlugin } from "./types/plugin.js"; import type { ProjectCapabilityProfile } from "./project-capability-profile.js"; import type { RolloutMode } from "./capability-rollout.js"; export type PluginInstallSource = "npm" | "workspace" | "path"; export interface PluginLoadDiagnostic { packageName: string; pluginName?: string; version?: string; status: "loaded" | "skipped" | "failed"; capabilities: Array<"knowledge" | "memory" | "workflow" | "tools" | "skill">; source?: PluginInstallSource; installPath?: string; reason?: string; } export interface PluginRuntimeInstallRecord { packageName: string; pluginName: string; version: string; installPath: string; source: PluginInstallSource; installedAt: string; updatedAt: string; projects: string[]; lastLoad?: { status: "loaded" | "failed" | "skipped"; checkedAt: string; reason?: string; }; } export interface PluginInstallState { schemaVersion: "devflow.plugins.v1"; plugins: Record; } export interface PluginRuntimeOptions { projectRoot?: string; homeDir?: string; registryPath?: string; capabilityProfile?: ProjectCapabilityProfile; rolloutMode?: RolloutMode; coreToolNames?: Iterable; } export interface PluginCandidate { packageName: string; modulePath?: string; source: PluginInstallSource; installPath?: string; } export declare function getPluginInstallRoot(home?: string): string; export declare function getPluginInstallStatePath(home?: string): string; export declare function emptyPluginInstallState(): PluginInstallState; export declare function readPluginInstallState(home?: string): PluginInstallState; export declare function writePluginInstallState(state: PluginInstallState, home?: string): void; export declare function upsertPluginInstallRecord(record: PluginRuntimeInstallRecord, home?: string): PluginInstallState; export declare function removePluginInstallRecord(packageName: string, home?: string): PluginInstallState; export declare function resolvePluginCandidates(options?: PluginRuntimeOptions): PluginCandidate[]; export declare function resolveInactivePluginCandidates(options?: PluginRuntimeOptions): PluginCandidate[]; export declare function resolveAllPluginCandidates(options?: PluginRuntimeOptions): PluginCandidate[]; export declare function validatePluginToolClosure(plugins: DevFlowPlugin[], coreToolNames?: Iterable): string[]; export declare function recordPluginLoadDiagnostics(diagnostics: PluginLoadDiagnostic[], home?: string): void; export declare function importPluginModule(candidate: PluginCandidate): Promise>; export declare function extractPlugin(module: Record, packageName: string): DevFlowPlugin | null; export declare function pluginCapabilities(plugin: DevFlowPlugin): PluginLoadDiagnostic["capabilities"]; export declare function pluginFingerprint(plugin: DevFlowPlugin): string; export declare function validatePlugin(plugin: DevFlowPlugin, packageName: string): string[]; export declare function validatePluginSet(plugins: DevFlowPlugin[], reservedToolNames?: Iterable): string[]; //# sourceMappingURL=plugin-runtime.d.ts.map