/**
 * @license
 * Copyright 2025 Steven Roussey <sroussey@gmail.com>
 * SPDX-License-Identifier: Apache-2.0
 */
import type { TaskEntitlements } from "@workglow/task-graph";
import { CreateWorkflow, IExecuteContext, Task, TaskConfig } from "@workglow/task-graph";
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
interface McpRegistryServer {
    name: string;
    title?: string;
    description: string;
    version: string;
    packages?: Array<{
        registryType: string;
        identifier: string;
        transport: {
            type: string;
        };
        environmentVariables?: Array<{
            name: string;
            description?: string;
            isRequired?: boolean;
        }>;
        runtimeArguments?: Array<{
            type: string;
            name: string;
            value?: string;
            isRequired?: boolean;
            description?: string;
        }>;
        packageArguments?: Array<{
            type: string;
            name: string;
            value?: string;
            isRequired?: boolean;
            description?: string;
        }>;
    }>;
    remotes?: Array<{
        type: string;
        url: string;
    }>;
}
export interface McpSearchResultItem {
    readonly id: string;
    readonly label: string;
    readonly description: string;
    readonly config: Record<string, unknown>;
}
/** Results from {@link searchMcpRegistryPage}; pass `nextCursor` back for the next page. */
export interface McpRegistrySearchPage {
    readonly results: McpSearchResultItem[];
    readonly nextCursor: string | undefined;
}
declare const McpSearchInputSchema: {
    readonly type: "object";
    readonly properties: {
        readonly query: {
            readonly type: "string";
            readonly title: "Query";
            readonly description: "Search query for the MCP registry";
        };
    };
    readonly required: readonly ["query"];
    readonly additionalProperties: false;
};
export type McpSearchTaskInput = FromSchema<typeof McpSearchInputSchema>;
export type McpSearchTaskOutput = {
    results: McpSearchResultItem[];
};
/**
 * Map an MCP registry server entry to a config object usable for MCP server configuration.
 */
export declare function mapMcpRegistryResult(server: McpRegistryServer): Record<string, unknown>;
/**
 * Search the MCP registry for one page of servers (max 100 per request — registry limit).
 */
export declare function searchMcpRegistryPage(query: string, options?: {
    readonly cursor?: string;
    readonly signal?: AbortSignal;
}): Promise<McpRegistrySearchPage>;
/**
 * Search the MCP registry for servers matching a query (first page only).
 */
export declare function searchMcpRegistry(query: string, signal?: AbortSignal): Promise<McpSearchResultItem[]>;
/**
 * Search the MCP server registry for servers matching a query.
 */
export declare class McpSearchTask extends Task<McpSearchTaskInput, McpSearchTaskOutput, TaskConfig> {
    static type: string;
    static category: string;
    static title: string;
    static description: string;
    static cacheable: boolean;
    static entitlements(): TaskEntitlements;
    static inputSchema(): DataPortSchema;
    static outputSchema(): DataPortSchema;
    execute(input: McpSearchTaskInput, context: IExecuteContext): Promise<McpSearchTaskOutput>;
}
/**
 * Search the MCP server registry.
 */
export declare const mcpSearch: (input: McpSearchTaskInput, config?: TaskConfig) => Promise<McpSearchTaskOutput>;
declare module "@workglow/task-graph" {
    interface Workflow {
        mcpSearch: CreateWorkflow<McpSearchTaskInput, McpSearchTaskOutput, TaskConfig>;
    }
}
export {};
//# sourceMappingURL=McpSearchTask.d.ts.map