import type { Manifest, ManifestEntry, ManifestPluginOptionsSchema, ActionEntry } from "./schemas";
import type { z } from "zod";
import type { ApiClient } from "../../api";
import { type ResolvedAppLocator } from "../../utils/domain-utils";
export type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
export interface UpdateManifestEntryOptions {
    appKey: string;
    entry: ManifestEntry;
    configPath?: string;
    skipWrite?: boolean;
    manifest?: Manifest;
}
export interface UpdateManifestEntryResult {
    key: string;
    entry: ManifestEntry;
    manifest: Manifest;
}
export interface AddActionEntryOptions {
    name: string;
    entry: ActionEntry;
    configPath?: string;
    skipWrite?: boolean;
    manifest?: Manifest;
}
export interface AddActionEntryResult {
    name: string;
    entry: ActionEntry;
    manifest: Manifest;
}
/**
 * Read manifest from a file path asynchronously
 * Supports local files (Node.js) and browser environments (fallback to global filesystem)
 */
export declare function readManifestFromFile(filePath: string): Promise<Manifest | null>;
/**
 * Get the preferred key for storing an app in the manifest
 * Extracted from plugin to make it easier to test
 */
export declare function getPreferredManifestEntryKey({ appKey, api, }: {
    appKey: string;
    api: ApiClient;
}): Promise<string>;
/**
 * Find a manifest entry by any app key (implementation name, slug, etc.).
 */
export declare function findManifestEntry({ appKey, manifest, }: {
    appKey: string;
    manifest: Manifest;
}): [string, ManifestEntry] | null;
export { DEFAULT_CONFIG_PATH } from "./schemas";
export type { ManifestEntry, Manifest, ActionEntry } from "./schemas";
export declare const manifestPlugin: (sdk: {
    context: {
        api: ApiClient;
        options?: {
            manifestPath?: string;
            manifest?: Manifest;
        };
    };
} & {
    context: {
        meta: Record<string, import("../..").PluginMeta>;
    };
}) => {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
};
export type ManifestPluginProvides = ReturnType<typeof manifestPlugin>;
//# sourceMappingURL=index.d.ts.map