/**
 * Widget registry for MCP server UI widgets
 *
 * This module manages widget configuration and validates that widget files exist
 * at runtime.
 */
import { RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps';
import type { Resource } from '@modelcontextprotocol/sdk/types.js';
export { RESOURCE_MIME_TYPE };
declare const WIDGET_CSP: {
    readonly connectDomains: readonly ["https://api.apify.com"];
    readonly resourceDomains: readonly ["https://mcp.apify.com", "https://images.apifyusercontent.com", "https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com", "https://apify-image-uploads-prod.s3.amazonaws.com", "https://apify.com", "https://fonts.googleapis.com", "https://fonts.gstatic.com"];
};
declare const OPENAI_WIDGET_CSP: {
    readonly connect_domains: readonly ["https://api.apify.com"];
    readonly resource_domains: readonly ["https://mcp.apify.com", "https://images.apifyusercontent.com", "https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com", "https://apify-image-uploads-prod.s3.amazonaws.com", "https://apify.com", "https://fonts.googleapis.com", "https://fonts.gstatic.com"];
};
export declare const WIDGET_URIS: {
    readonly SEARCH_ACTORS: "ui://widget/search-actors.html";
    readonly ACTOR_RUN: "ui://widget/actor-run.html";
};
type WidgetMeta = NonNullable<Resource['_meta']> & {
    'openai/toolInvocation/invoking'?: string;
    'openai/toolInvocation/invoked'?: string;
    'openai/widgetCSP'?: typeof OPENAI_WIDGET_CSP;
    ui: {
        resourceUri: string;
        visibility: readonly string[];
        prefersBorder: boolean;
        domain: string;
        csp: typeof WIDGET_CSP;
    };
};
export type WidgetConfig = {
    uri: Resource['uri'];
    name: Resource['name'];
    description: NonNullable<Resource['description']>;
    jsFilename: string;
    title: NonNullable<Resource['title']>;
    meta: WidgetMeta;
};
/**
 * Widget registry configuration
 * Maps widget URIs to their configuration
 */
export declare const WIDGET_REGISTRY: Record<string, WidgetConfig>;
export type AvailableWidget = WidgetConfig & {
    jsPath: string;
    exists: boolean;
};
/**
 * Resolves available widgets by checking if their files exist on the filesystem.
 *
 * @param baseDir - Base directory where the server code is located
 * @returns Map of widget URIs to their resolved state
 */
export declare function resolveAvailableWidgets(baseDir: string): Promise<Map<string, AvailableWidget>>;
/**
 * Get widget configuration by URI
 *
 * @param uri - Widget URI
 * @returns Widget configuration or undefined if not found
 */
export declare function getWidgetConfig(uri: string): WidgetConfig | undefined;
//# sourceMappingURL=widgets.d.ts.map