export type OptionalCliExtension = {
    packageName: string;
    specifier: string;
    commands: string[];
    installCommand: string;
    localCandidates: string[];
};
type OptionalCliExtensionLoadSource = 'project' | 'package' | 'local-fallback' | 'missing';
export type OptionalCliExtensionStatus = Readonly<{
    packageName: string;
    commands: string[];
    installCommand: string;
    loaded: boolean;
    source: OptionalCliExtensionLoadSource;
}>;
type OptionalCliExtensionLoadOptions = Readonly<{
    logFailures?: boolean;
}>;
export declare const OptionalCliExtensions: Readonly<{
    tryImportInstalledExtensions(): Promise<OptionalCliExtensionStatus[]>;
    loadForArgs(args: string[]): Promise<OptionalCliExtensionStatus[]>;
    findMissingExtensionForArgs(args: string[], statuses: ReadonlyArray<OptionalCliExtensionStatus>): OptionalCliExtensionStatus | undefined;
    getMissingExtensionMessage(status: OptionalCliExtensionStatus): string;
    findRequestedExtension: (args: string[]) => OptionalCliExtension | undefined;
}>;
export declare const OptionalCliExtensionsInternal: Readonly<{
    getProjectCwd: () => string;
    resolveProjectRoot: () => string;
    resolveProjectInstalledUrl: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => string | null;
    shouldLogFailures: (options?: OptionalCliExtensionLoadOptions) => boolean;
    debugFailure: (message: string, meta: Record<string, unknown>, options?: OptionalCliExtensionLoadOptions) => void;
    tryImportProjectInstalledPackage: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<boolean>;
    tryImportLocalCandidate: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<boolean>;
    tryImportPackageSpecifier: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<boolean>;
    tryImportExtension: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<OptionalCliExtensionStatus>;
    getRequestedCommand: (args: string[]) => string | undefined;
    findRequestedExtension: (args: string[]) => OptionalCliExtension | undefined;
    isRootHelpRequest: (args: string[]) => boolean;
    getProjectLocalCandidates: (entry: OptionalCliExtension) => string[];
    getLocalCandidates: (entry: OptionalCliExtension) => string[];
}>;
export {};
//# sourceMappingURL=OptionalCliExtensions.d.ts.map