/** * Smithery Registry Integration * * Generates health-score submissions for the Smithery MCP server registry * and resolves Smithery server listings into Observatory target configs. */ import type { HealthScore, RunArtifact, TargetConfig } from "../types.js"; export interface SmitherySubmission { /** The server's qualified name on Smithery (e.g., "@anthropic/mcp-server-fetch") */ qualifiedName: string; /** Observatory run artifact */ artifact: RunArtifact; /** Health score */ score: HealthScore; /** Badge SVG */ badgeSvg: string; /** Timestamp */ submittedAt: string; } export interface SmitheryConfig { /** Smithery API key (for future authenticated submissions) */ apiKey?: string; /** Base URL override */ baseUrl?: string; } /** Shape of a server entry returned by the Smithery registry API. */ export interface SmitheryServerEntry { qualifiedName: string; displayName?: string; description?: string; connections?: SmitheryConnection[]; /** Any extra fields the API may return. */ [key: string]: unknown; } export interface SmitheryConnection { type: string; url?: string; configSchema?: Record; exampleConfig?: Record; [key: string]: unknown; } /** Paginated response from the Smithery servers list API. */ export interface SmitheryServerListResponse { servers: SmitheryServerEntry[]; pageSize?: number; page?: number; [key: string]: unknown; } export declare class SmitheryApiError extends Error { readonly statusCode: number; constructor(message: string, statusCode: number); } export declare class SmitheryRateLimitError extends SmitheryApiError { constructor(message: string); } /** * Generate a submission report for a server. * Creates a structured JSON report that could be submitted to Smithery's API * or included in a PR to their repository. */ export declare function generateSubmission(qualifiedName: string, artifact: RunArtifact): SmitherySubmission; /** * Render a submission as markdown suitable for a Smithery integration PR. */ export declare function renderSubmissionMarkdown(submission: SmitherySubmission): string; /** * Resolve a Smithery server listing to an Observatory target config. * Fetches server metadata from Smithery and converts to TargetConfig. */ export declare function resolveSmitheryTarget(qualifiedName: string, config?: SmitheryConfig): Promise; /** * Fetch a page of servers from the Smithery registry. */ export declare function listSmitheryServers(config?: SmitheryConfig, options?: { page?: number; pageSize?: number; }): Promise; /** * Batch-scan top N servers from the Smithery registry. * Returns an array of submission results (or errors for individual servers). */ export declare function batchScanServers(runTargetFn: (target: TargetConfig) => Promise, config?: SmitheryConfig, options?: { top?: number; }): Promise>; /** * Render a batch scan report as markdown. */ export declare function renderBatchReportMarkdown(results: Array<{ qualifiedName: string; submission?: SmitherySubmission; error?: string; }>): string;