UNPKG

deepsource-mcp-server

Version:
58 lines (57 loc) 2.17 kB
/** * @fileoverview Project runs handler for the DeepSource MCP server * This module provides MCP tool handlers for DeepSource project analysis runs. */ import { ApiResponse } from '../models/common.js'; import { Logger } from '../utils/logging/logger.js'; import { RunFilterParams } from '../models/runs.js'; import { BaseHandlerDeps } from './base/handler.interface.js'; import { IAnalysisRunRepository } from '../domain/aggregates/analysis-run/analysis-run.repository.js'; /** * Interface for parameters for fetching project runs * @public */ export interface DeepsourceProjectRunsParams extends RunFilterParams { /** DeepSource project key to fetch runs for */ projectKey: string; } /** * Extended dependencies interface for project runs handler */ interface ProjectRunsHandlerDeps { analysisRunRepository: IAnalysisRunRepository; logger: Logger; } /** * Creates a project runs handler with injected dependencies using domain aggregates * @param deps - The dependencies for the handler * @returns The configured handler function */ export declare function createProjectRunsHandlerWithRepo(deps: ProjectRunsHandlerDeps): (params: DeepsourceProjectRunsParams) => Promise<{ content: { type: "text"; text: string; }[]; isError?: never; } | { isError: boolean; content: { type: "text"; text: string; }[]; }>; /** * Creates a project runs handler with injected dependencies * @param deps - The dependencies for the handler * @returns The configured handler factory */ export declare const createProjectRunsHandler: import("./base/handler.interface.js").HandlerFactory<BaseHandlerDeps, DeepsourceProjectRunsParams, ApiResponse>; /** * Fetches and returns analysis runs from a specified DeepSource project using domain aggregates * @param params - Parameters for fetching runs, including project key and optional filters * @returns A response containing the runs data * @throws Error if the DEEPSOURCE_API_KEY environment variable is not set * @public */ export declare function handleDeepsourceProjectRuns(params: DeepsourceProjectRunsParams): Promise<ApiResponse>; export {};