import { MANIFEST_KEY } from "../project.js";
import type { PluginConfigUiHint, PluginKind } from "./types.js";
export declare const PLUGIN_MANIFEST_FILENAME = "fased.plugin.json";
export declare const PLUGIN_MANIFEST_FILENAMES: readonly ["fased.plugin.json"];
export type PluginManifestChannelConfig = {
    schema: Record<string, unknown>;
    uiHints?: Record<string, PluginConfigUiHint>;
    label?: string;
    description?: string;
    preferOver?: string[];
};
export type PluginManifestModelSupport = {
    modelPrefixes?: string[];
    modelPatterns?: string[];
};
export type PluginManifestContracts = {
    memoryEmbeddingProviders?: string[];
    speechProviders?: string[];
    realtimeTranscriptionProviders?: string[];
    realtimeVoiceProviders?: string[];
    mediaUnderstandingProviders?: string[];
    imageGenerationProviders?: string[];
    videoGenerationProviders?: string[];
    musicGenerationProviders?: string[];
    webFetchProviders?: string[];
    webSearchProviders?: string[];
    tools?: string[];
};
export type PluginManifestProviderAuthChoice = {
    provider: string;
    method: string;
    choiceId: string;
    choiceLabel?: string;
    choiceHint?: string;
    assistantPriority?: number;
    assistantVisibility?: "visible" | "manual-only";
    deprecatedChoiceIds?: string[];
    groupId?: string;
    groupLabel?: string;
    groupHint?: string;
    optionKey?: string;
    cliFlag?: string;
    cliOption?: string;
    cliDescription?: string;
    onboardingScopes?: Array<"text-inference" | "image-generation">;
};
export type PluginManifest = {
    id: string;
    configSchema: Record<string, unknown>;
    enabledByDefault?: boolean;
    legacyPluginIds?: string[];
    autoEnableWhenConfiguredProviders?: string[];
    kind?: PluginKind;
    channels?: string[];
    providers?: string[];
    modelSupport?: PluginManifestModelSupport;
    providerAuthEnvVars?: Record<string, string[]>;
    providerAuthAliases?: Record<string, string>;
    providerAuthChoices?: PluginManifestProviderAuthChoice[];
    skills?: string[];
    name?: string;
    description?: string;
    version?: string;
    uiHints?: Record<string, PluginConfigUiHint>;
    contracts?: PluginManifestContracts;
    channelConfigs?: Record<string, PluginManifestChannelConfig>;
};
export type PluginManifestLoadResult = {
    ok: true;
    manifest: PluginManifest;
    manifestPath: string;
} | {
    ok: false;
    error: string;
    manifestPath: string;
};
export declare function resolvePluginManifestPath(rootDir: string): string;
export declare function loadPluginManifest(rootDir: string): PluginManifestLoadResult;
export type PluginPackageChannel = {
    id?: string;
    label?: string;
    selectionLabel?: string;
    detailLabel?: string;
    docsPath?: string;
    docsLabel?: string;
    blurb?: string;
    order?: number;
    aliases?: string[];
    preferOver?: string[];
    systemImage?: string;
    selectionDocsPrefix?: string;
    selectionDocsOmitLabel?: boolean;
    selectionExtras?: string[];
    showConfigured?: boolean;
    quickstartAllowFrom?: boolean;
    forceAccountBinding?: boolean;
    preferSessionLookupForAnnounceTarget?: boolean;
};
export type PluginPackageInstall = {
    npmSpec?: string;
    localPath?: string;
    defaultChoice?: "npm" | "local";
    expectedIntegrity?: string;
    minHostVersion?: string;
    allowInvalidConfigRecovery?: boolean;
};
export type PluginPackageStartup = {
    deferConfiguredChannelFullLoadUntilAfterListen?: boolean;
};
export type FasedAgentPackageManifest = {
    extensions?: string[];
    channel?: PluginPackageChannel;
    install?: PluginPackageInstall;
    startup?: PluginPackageStartup;
};
export declare const DEFAULT_PLUGIN_ENTRY_CANDIDATES: readonly ["index.ts", "index.js", "index.mjs", "index.cjs"];
export type PackageExtensionResolution = {
    status: "ok";
    entries: string[];
} | {
    status: "missing";
    entries: [];
} | {
    status: "empty";
    entries: [];
};
export type ManifestKey = typeof MANIFEST_KEY;
export type PackageManifest = {
    name?: string;
    version?: string;
    description?: string;
    main?: string;
    module?: string;
} & Partial<Record<ManifestKey, FasedAgentPackageManifest>>;
export declare function getPackageManifestMetadata(manifest: PackageManifest | undefined): FasedAgentPackageManifest | undefined;
export declare function resolvePackageExtensionEntries(manifest: PackageManifest | undefined): PackageExtensionResolution;
