/** * Auto-install utility for optional MCP tool dependencies * * When an MCP tool requires an optional package that isn't installed, this * loads it through ensureOptionalDependency (utils/optional-deps.ts), which * installs it once into ~/.monomind/deps at the version pinned there and * never touches the user's project (#519). Only packages on that allow-list * are installed; anything else is imported if present and otherwise skipped. */ import { type EnsureOptions } from '../utils/optional-deps.js'; export interface AutoInstallOptions extends EnsureOptions { /** * Silent install (no console output) */ silent?: boolean; } /** * Import a package, installing it into monomind's deps directory first if it * is an allow-listed optional dependency that is missing. The module comes * from wherever it was resolved, so callers must use the returned module * rather than importing the package by name. * * @param packageName - npm package name * @param options - Installation options * @returns The imported module, or null for a missing package that is not on * the allow-list * @throws {OptionalDependencyError} when an allow-listed package cannot be * loaded or installed; its message says how to install it by hand */ export declare function tryImportOrInstall(packageName: string, options?: AutoInstallOptions): Promise; /** * Reset install attempts (useful for testing) */ export declare function resetInstallAttempts(): void; //# sourceMappingURL=auto-install.d.ts.map