/** * src/cli/plugin-config.ts * * Plugin field normalization and matching. * Exports: PLUGIN_NAME, normalizePlugin, readInstalledPlugins, * matchesPlugin, findInstalledPlugin, dedupePlugins, buildSpecifier. */ export declare const PLUGIN_NAME: "opencode-rules-md"; /** * Normalize a plugin value (undefined, null, string[], or legacy object) * to a flat string[]. */ export declare const normalizePlugin: (raw: unknown) => string[]; /** Structurally-typed parameter to avoid circular type import with config.ts. */ interface PluginConfigReader { data: Record; } /** * Read the installed plugin list from a loaded config, honoring both the * modern `plugin` field (singular — what OpenCode actually uses) and the * legacy `plugins` field (plural — written by older versions of `omd`). * * The modern field wins when both are present, matching OpenCode's own * resolution order. */ export declare const readInstalledPlugins: (config: PluginConfigReader) => string[]; /** * Returns true if entry is the plugin named name (with optional @version). */ export declare const matchesPlugin: (entry: string, name?: string) => boolean; /** * Find the first plugin entry in `plugins` that matches `PLUGIN_NAME` (with * optional @version). Returns the matching specifier, or undefined if none. */ export declare const findInstalledPlugin: (plugins: readonly string[]) => string | undefined; /** * Deduplicate plugin list: remove all entries matching PLUGIN_NAME, * then re-append the freshest entry (last occurrence). Other plugins preserved. */ export declare const dedupePlugins: (plugins: string[], name?: string) => string[]; /** * Build an npm version specifier. * '' | undefined -> '@latest'; explicit -> '@' */ export declare const buildSpecifier: (version?: string) => string; export {}; //# sourceMappingURL=plugin-config.d.ts.map