All files / packages/dataflint-mcp/src index.ts

100% Statements 14/14
100% Branches 0/0
100% Functions 0/0
100% Lines 14/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100                  1x     1x             1x     1x   1x 1x 1x     1x                                                                                     1x     1x                                   1x     1x 1x 1x  
/**
 * @dataflint/mcp - DataFlint MCP Server Core
 *
 * Model Context Protocol server for Apache Spark optimization and debugging.
 * Provides AI assistants with tools for Spark application analysis, performance insights,
 * and code optimization recommendations.
 */
 
// Main MCP server
export { DataFlintCopilotMcpServer } from "./server.js";
 
// Backend config bootstrap
export { CopilotConfigClient, BackendFault } from "./copilot-config-client.js";
export type {
    CopilotConfig,
    BackendFaultReason,
} from "./copilot-config-client.js";
 
// Scope merging (baseline OIDC + discovery-returned scopes, with management-scope filter)
export { mergeScopes } from "./auth-scopes.js";
 
// Services
export { Auth0Service } from "./auth/index.js";
export type { AuthResult } from "./auth/index.js";
export { DataFlintServerService } from "./dataflint-server-service.js";
export { DataFlintMcpState } from "./state.js";
export { DataFlintJobService } from "./dataflint-job-service.js";
 
// Auth types re-exported for consumers
export { M2MType } from "./auth/index.js";
export type { M2MMode } from "./auth/index.js";
 
// Types and interfaces
export type {
    IMcpLogger,
    IConfigService,
    OpenUrlHandler,
    ConfigProvider,
    AddHighlightsHandler,
    ObfuscateCodeHandler,
    AuthConfig,
    HighlightDTO,
    AlertInfo,
    // Structured tooltip types
    StructuredTooltip,
    TooltipHeader,
    TooltipSummary,
    TooltipFailedQuery,
    TooltipAlert,
    TooltipOperation,
    TooltipFinding,
    TooltipFooter,
} from "./types.js";
 
// Models
export type {
    Job,
    ApplicationSummary,
    ServiceStatus,
    SqlQueriesCode,
    DataFlintPromptsResponse,
    Node,
    // Issue reporting types
    IssueReportMetadataResponse,
    IssueReportRequest,
    IssueReportResponse,
    IssueReportHighlightContext,
    IssueType,
    IssueSeverity,
} from "./dataflint-server-models.js";
 
// Logger
export { Logger } from "./logger.js";
 
// Errors
export {
    DataFlintError,
    AuthError,
    ConfigError,
    NetworkError,
    ApiError,
    ServiceError,
    ErrorCode,
    isAuthError,
    isConfigError,
    isNetworkError,
    isApiError,
    isServiceError,
    isDataFlintError,
    classifyError,
} from "./errors.js";
 
// Tools
export { DataFlintMcpTools } from "./tools.js";
 
// Standalone mode (CLI)
export { StandaloneConfigService } from "./standalone/config.js";
export { StdioMcpServer } from "./standalone/stdio-transport.js";
export { startStandaloneServer } from "./standalone/server.js";