/** * Executor interface for MCP tool operations. * * Two implementations: * - HttpExecutor: wraps SitepagerApiClient (for npx / local MCP server) * - DirectExecutor: calls @sitepager/core-operations directly (for Worker-hosted MCP) */ export type ListResponse = { object: "list"; data: T[]; hasMore: boolean; total: number; }; export interface McpExecutor { listScans(options?: { page?: number; limit?: number; search?: string; enabled?: boolean; }): Promise>>; createScan(input: { name: string; url: string; deviceType?: string; maxPages?: number; features?: string[]; includeUrls?: string[]; excludePatterns?: string[]; crawlIncludedUrls?: boolean; region?: string; }): Promise>; runScan(scanId: string): Promise>; getScanRun(id: string): Promise>; getScanResults(runId: string, options?: { sections?: string[]; severity?: string; issueType?: string; changeType?: string; linkType?: string; pagePath?: string; includeMatched?: boolean; limit?: number; offset?: number; }): Promise>; listScanRuns(options?: { page?: number; limit?: number; scanId?: string; status?: string; }): Promise>>; cancelScanRun(id: string): Promise>; getCreditsBalance(): Promise>; /** Release any held resources (e.g., DB connections). */ close(): void; } import type { SitepagerApiClient } from "./api-client.js"; /** * Executor that delegates to SitepagerApiClient over HTTP. * Used by the npx package where the MCP server runs locally * and communicates with the Sitepager API over the network. */ export declare class HttpExecutor implements McpExecutor { private readonly client; constructor(client: SitepagerApiClient); listScans(options?: { page?: number; limit?: number; search?: string; enabled?: boolean; }): Promise>>; createScan(input: { name: string; url: string; deviceType?: string; maxPages?: number; features?: string[]; includeUrls?: string[]; excludePatterns?: string[]; crawlIncludedUrls?: boolean; region?: string; }): Promise>; runScan(scanId: string): Promise>; getScanRun(id: string): Promise>; getScanResults(runId: string, options?: { sections?: string[]; severity?: string; issueType?: string; changeType?: string; linkType?: string; pagePath?: string; includeMatched?: boolean; limit?: number; offset?: number; }): Promise>; listScanRuns(options?: { page?: number; limit?: number; scanId?: string; status?: string; }): Promise>>; cancelScanRun(id: string): Promise>; getCreditsBalance(): Promise>; close(): void; }