import type { OpenClawConfig } from "../config/types.js";
import type { PluginInstallRecord } from "../config/types.plugins.js";
import { type PluginCandidate } from "./discovery.js";
import type { PluginManifestCommandAlias } from "./manifest-command-aliases.js";
import type { PluginBundleFormat, PluginConfigUiHint, PluginDiagnostic, PluginFormat } from "./manifest-types.js";
import { type OpenClawPackageManifest, type PluginManifestActivation, type PluginManifestConfigContracts, type PluginManifest, type PluginManifestChannelCommandDefaults, type PluginManifestChannelConfig, type PluginManifestContracts, type PluginManifestMediaUnderstandingProviderMetadata, type PluginManifestModelCatalog, type PluginManifestModelIdNormalization, type PluginManifestModelPricing, type PluginManifestModelSupport, type PluginManifestProviderEndpoint, type PluginManifestProviderRequest, type PluginManifestQaRunner, type PluginManifestSetup } from "./manifest.js";
import type { PluginKind } from "./plugin-kind.types.js";
import type { PluginOrigin } from "./plugin-origin.types.js";
export type PluginManifestContractListKey = "speechProviders" | "externalAuthProviders" | "mediaUnderstandingProviders" | "documentExtractors" | "realtimeVoiceProviders" | "realtimeTranscriptionProviders" | "imageGenerationProviders" | "videoGenerationProviders" | "musicGenerationProviders" | "memoryEmbeddingProviders" | "webContentExtractors" | "webFetchProviders" | "webSearchProviders" | "migrationProviders";
export type PluginManifestRecord = {
    id: string;
    name?: string;
    description?: string;
    version?: string;
    enabledByDefault?: boolean;
    autoEnableWhenConfiguredProviders?: string[];
    legacyPluginIds?: string[];
    format?: PluginFormat;
    bundleFormat?: PluginBundleFormat;
    bundleCapabilities?: string[];
    kind?: PluginKind | PluginKind[];
    channels: string[];
    providers: string[];
    providerDiscoverySource?: string;
    modelSupport?: PluginManifestModelSupport;
    modelCatalog?: PluginManifestModelCatalog;
    modelPricing?: PluginManifestModelPricing;
    modelIdNormalization?: PluginManifestModelIdNormalization;
    providerEndpoints?: PluginManifestProviderEndpoint[];
    providerRequest?: PluginManifestProviderRequest;
    cliBackends: string[];
    syntheticAuthRefs?: string[];
    nonSecretAuthMarkers?: string[];
    commandAliases?: PluginManifestCommandAlias[];
    providerAuthEnvVars?: Record<string, string[]>;
    providerAuthAliases?: Record<string, string>;
    channelEnvVars?: Record<string, string[]>;
    providerAuthChoices?: PluginManifest["providerAuthChoices"];
    activation?: PluginManifestActivation;
    setup?: PluginManifestSetup;
    qaRunners?: PluginManifestQaRunner[];
    skills: string[];
    settingsFiles?: string[];
    hooks: string[];
    origin: PluginOrigin;
    workspaceDir?: string;
    rootDir: string;
    source: string;
    setupSource?: string;
    startupDeferConfiguredChannelFullLoadUntilAfterListen?: boolean;
    manifestPath: string;
    schemaCacheKey?: string;
    configSchema?: Record<string, unknown>;
    configUiHints?: Record<string, PluginConfigUiHint>;
    contracts?: PluginManifestContracts;
    mediaUnderstandingProviderMetadata?: Record<string, PluginManifestMediaUnderstandingProviderMetadata>;
    configContracts?: PluginManifestConfigContracts;
    channelConfigs?: Record<string, PluginManifestChannelConfig>;
    channelCatalogMeta?: {
        id: string;
        label?: string;
        blurb?: string;
        preferOver?: readonly string[];
        commands?: PluginManifestChannelCommandDefaults;
    };
};
export type PluginManifestRegistry = {
    plugins: PluginManifestRecord[];
    diagnostics: PluginDiagnostic[];
};
export type BundledChannelConfigCollector = (params: {
    pluginDir: string;
    manifest: PluginManifest;
    packageManifest?: OpenClawPackageManifest;
}) => Record<string, PluginManifestChannelConfig> | undefined;
export { clearPluginManifestRegistryCache } from "./manifest-registry-state.js";
export declare function loadPluginManifestRegistry(params?: {
    config?: OpenClawConfig;
    workspaceDir?: string;
    cache?: boolean;
    env?: NodeJS.ProcessEnv;
    candidates?: PluginCandidate[];
    diagnostics?: PluginDiagnostic[];
    installRecords?: Record<string, PluginInstallRecord>;
    bundledChannelConfigCollector?: BundledChannelConfigCollector;
}): PluginManifestRegistry;
