/** * Plugin ↔ Core version compatibility validation. * * Detects version skew between @elizaos/core and plugins that depend on * specific core exports. This catches the class of bug where plugins on npm * advance past the core version, importing symbols that don't exist yet in * the installed core — causing silent import failures that take down every * model provider. * * @see https://github.com/milady-ai/milady/issues/10 */ /** Result of a single plugin compatibility check. */ export interface PluginCompatResult { /** Plugin package name. */ plugin: string; /** Whether the plugin is compatible with the installed core. */ compatible: boolean; /** The installed plugin version, or null if unresolvable. */ pluginVersion: string | null; /** The installed core version. */ coreVersion: string; /** List of symbols the plugin needs that are missing from core. */ missingExports: string[]; /** Human-readable explanation when incompatible. */ message: string; } /** Aggregate result of validating all critical plugins. */ export interface VersionCompatReport { /** Whether all checked plugins are compatible. */ compatible: boolean; /** Per-plugin results. */ results: PluginCompatResult[]; /** Plugins that failed the check. */ failures: PluginCompatResult[]; /** Advisory message (e.g. "pin to alpha.3" or "upgrade core"). */ advisory: string; } /** * Plugins that provide AI model capabilities. If ALL of these fail to load * the agent is completely non-functional — no responses can be generated. */ export declare const AI_PROVIDER_PLUGINS: readonly string[]; /** * Parse a semver string (including pre-release tags) into a comparable tuple. * Returns null for unparseable versions. * * Examples: * "2.0.0-alpha.3" → [2, 0, 0, 3] * "2.0.0-alpha.4" → [2, 0, 0, 4] * "2.0.0-nightly.20260208" → [2, 0, 0, 20260208] * "2.0.0" → [2, 0, 0, Infinity] (release beats any pre-release) * * Note: comparisons are only meaningful within the same pre-release tag type * (alpha vs alpha, nightly vs nightly). Cross-tag comparisons (alpha.7 vs beta.1) * compare only the numeric suffix, which may not reflect the intended ordering. * The update checker always compares within the same channel, so this is safe. */ export declare function parseSemver(version: string): [number, number, number, number] | null; /** * Compare two semver strings. Returns: * -1 if a < b * 0 if a === b * 1 if a > b * null if either version is unparseable. */ export declare function compareSemver(a: string, b: string): -1 | 0 | 1 | null; /** * Check if `installed` version satisfies `>= required`. */ export declare function versionSatisfies(installed: string, required: string): boolean; /** * Check whether a specific named export exists in `@elizaos/core`. * * This does a live import check — it tests the *actual* installed module, * not a version number lookup. */ export declare function coreExportExists(exportName: string): Promise; /** * Read the installed version of a package from its package.json. * Returns null if the package is not installed or the version is unreadable. */ export declare function getInstalledVersion(packageName: string): Promise; /** * Validate a single plugin's compatibility with the installed core. */ export declare function validatePluginCompat(pluginName: string, coreVersion: string): Promise; /** * Validate all known critical plugins against the installed core. * * Returns a report with per-plugin results and an overall advisory. */ export declare function validateVersionCompat(): Promise; /** * After plugin resolution, check whether at least one AI provider plugin * loaded successfully. If none loaded, return a diagnostic message explaining * whether this is a version-skew issue or a configuration issue. * * @param loadedPluginNames - Names of plugins that loaded successfully. * @param failedPlugins - Names + error strings of plugins that failed to load. */ export declare function diagnoseNoAIProvider(loadedPluginNames: string[], failedPlugins: Array<{ name: string; error: string; }>): string | null; //# sourceMappingURL=version-compat.d.ts.map