/**
 * MCP exports - MCP server implementation
 * Split from index.ts for file size compliance (Issue #285)
 * Updated Issue #538: Added missing tool registration exports
 */

export {
  // Server
  createServer,
  startStdioServer,
  connectTransport,
  closeServer,
  type ServerConfig,
  type ServerInstance,
  type ServerError,
  // Middleware
  validateToolInput,
  createValidator,
  isZodError,
  RateLimiter as McpRateLimiter,
  createDefaultRateLimiter,
  type RateLimiterConfig as McpRateLimiterConfig,
  type RateLimiterState,
  createMcpLogger,
  createToolLogger,
  logToolStart,
  logToolSuccess,
  logToolError,
  createTimer,
  withLogging,
  type McpLogContext,
  // Policy firewall (Issue #538)
  type Artifact as FirewallArtifact, // Renamed: pipeline.ts exports pipeline Artifact
  type ExecutionMode,
  type PolicyMode,
  type PolicyDecision as FirewallPolicyDecision, // Renamed: pipeline.ts exports pipeline PolicyDecision
  type PolicyContext as FirewallPolicyContext, // Renamed: pipeline.ts exports pipeline PolicyContext
  type PolicyRule as FirewallPolicyRule, // Renamed: pipeline.ts exports pipeline PolicyRule
  type IPolicyFirewall,
  type PolicyFirewallConfig,
  type PolicyConfig,
  PolicyFirewall,
  PolicyError,
  PolicyConfigSchema,
  denyMutationsWithoutModeRule,
  safePathsRule,
  createDefaultPolicyFirewall,
  evaluatePolicy,
  createPolicyContext,
  // MCP Notifier (Issue #974 — Claude Code Observability)
  createMcpNotifier,
  NOOP_NOTIFIER,
  type IMcpNotifier,
  type McpLogLevel,
  // EventBus Bridge (Issue #307, #538)
  initializeEventBusBridge,
  getEventBusStats,
  type EventBusBridgeResult,
  // Tools
  registerTools,
  toolSuccess,
  toolSuccessStructured,
  toolError,
  type ToolRegistrationOptions,
  type ToolRegistrationResult,
  type BaseMcpToolDeps,
  type TextContent,
  type ToolResult,
  // create_expert tool
  registerCreateExpertTool,
  createDefaultDeps,
  getAvailableRoles,
  getCapabilitiesForRole,
  CreateExpertInputSchema,
  type CreateExpertInput,
  type CreateExpertDeps,
  type CreateExpertResponse,
  type IExpertFactory as McpExpertFactory,
  // execute_expert tool (Issue #437, #538)
  registerExecuteExpertTool,
  ExecuteExpertInputSchema,
  type ExecuteExpertInput,
  type ExecuteExpertDeps,
  type ExecuteExpertResponse,
  // consensus_vote tool (Issue #435, #538)
  registerConsensusVoteTool,
  ConsensusVoteInputSchema,
  type ConsensusVoteInput,
  type ConsensusVoteDeps,
  type ConsensusVoteResponse,
  type AgentVoteSummary,
  type VoteDecisionStatus,
  // pr_review tool (#2233)
  registerPrReviewTool,
  PrReviewInputSchema,
  PR_REVIEW_ROLES,
  buildPrReviewProposal,
  mapVoteDecisionToPrDecision,
  aggregatePrDecisions,
  MAX_DIFF_LENGTH,
  type PrReviewInput,
  type PrReviewDecision,
  type PrReviewVote,
  type PrReviewResponse,
  type PrReviewDeps,
  // run_workflow tool
  registerRunWorkflowTool,
  RunWorkflowInputSchema,
  type RunWorkflowDeps,
  type RunWorkflowInput,
  type WorkflowToolResult,
  type StepResultSummary,
  type DryRunResult,
  // orchestrate tool
  registerOrchestrateTool,
  OrchestrateInputSchema,
  OrchestrateOutputSchema,
  OrchestrationError,
  OrchestrationUnavailableError,
  type OrchestrateInput,
  type OrchestrateOutput,
  type OrchestrateDeps,
  // delegate_to_model tool (Issue #538)
  registerDelegateToModelTool,
  DelegateInputSchema,
  DelegateOutputSchema,
  MODEL_CAPABILITIES,
  analyzeTask as analyzeDelegateTask,
  selectModel,
  type DelegateInput,
  type DelegateOutput,
  type DelegateDeps,
  type CapabilityProfile,
  type PreferredCapability,
  type TaskRequirements,
  // Weather report tool (Issue #865)
  generateWeatherReport,
  // Graph workflow templates (Issue #841, #866)
  getGraphWorkflowList,
  getGraphRegistry,
  type GraphWorkflowInfo,
  // list_experts tool (Issue #436, #538)
  registerListExpertsTool,
  ListExpertsInputSchema,
  type ListExpertsInput,
  type ListExpertsDeps,
  type ListExpertsResponse,
  type ExpertInfo,
  // list_workflows tool (Issue #436, #538)
  registerListWorkflowsTool,
  ListWorkflowsInputSchema,
  type ListWorkflowsInput,
  type ListWorkflowsDeps,
  type ListWorkflowsResponse,
  type WorkflowInfo,
  // Issue triage tool (Issue #828, #900)
  registerIssueTriageTool,
  IssueTriageInputSchema,
  type IssueTriageInput,
  type IssueTriageDeps,
  type IssueTriageResponse,
  // Graph workflow tool (Issue #840, #900)
  registerRunGraphWorkflowTool,
  RunGraphWorkflowInputSchema,
  type RunGraphWorkflowInput,
  type RunGraphWorkflowDeps,
  type RunGraphWorkflowResponse,
  // Execute spec tool (Issue #853, #900)
  registerExecuteSpecTool,
  ExecuteSpecInputSchema,
  type ExecuteSpecInput,
  type ExecuteSpecDeps,
  // Repo analyze tool (Issue #1074)
  registerRepoAnalyzeTool,
  RepoAnalyzeInputSchema,
  type RepoAnalyzeInput,
  type RepoAnalysis,
  type RepoAnalyzeDeps,
  analyzeRepo,
  analyzeGitHubRepo,
  normalizeRepoId,
  // Repo security plan tool (Issue #1079)
  registerRepoSecurityPlanTool,
  RepoSecurityPlanInputSchema,
  type RepoSecurityPlanInput,
  type RepoSecurityPlan,
  type RepoSecurityPlanDeps,
  type ScannerRecommendation,
  type ConflictWarning,
  type CoverageAnalysis,
  buildPlanFromAnalysis,
  generateSecurityPlan,
  resolveScannerData,
  FALLBACK_SCANNER_DATA,
  type ScannerEntry,
  type ScannerData,
  // Scanner registry fetcher (externalization vote 6-0)
  getRegistryManifest,
  clearRegistryCache,
  type RegistryScanner,
  type RegistryRelationship,
  type LanguageMatrixEntry,
  type ScannerRegistryManifest,
  // Symbol extraction + codebase search (Issue #1559, #1567)
  registerExtractSymbolsTool,
  ExtractSymbolsInputSchema,
  type ExtractSymbolsDeps,
  registerSearchCodebaseTool,
  SearchCodebaseInputSchema,
  type SearchCodebaseDeps,
  // Prompts (Issue #1287)
  registerPrompts,
  PROMPT_DEFINITIONS,
  type PromptDefinition,
  type PromptMessage,
  type PromptRegistrationResult,
  // Resources (Issue #1288)
  registerResources,
  registerModelsResource,
  registerResearchResource,
  registerExpertsResource,
  // Research tools (Issue #1576 Wave 9 — missing from barrel)
  registerResearchQueryTool,
  ResearchQueryInputSchema,
  type ResearchQueryInput,
  type ResearchQueryDeps,
  type ResearchQueryResponse,
  registerResearchAddTool,
  ResearchAddInputSchema,
  type ResearchAddInput,
  type ResearchAddDeps,
  type ResearchAddResponse,
  registerResearchAddSourceTool,
  ResearchAddSourceInputSchema,
  type ResearchAddSourceInput,
  type ResearchAddSourceDeps,
  type ResearchAddSourceResponse,
  registerResearchDiscoverTool,
  ResearchDiscoverInputSchema,
  type ResearchDiscoverInput,
  type ResearchDiscoverDeps,
  type ResearchDiscoverResponse,
  registerResearchAnalyzeTool,
  ResearchAnalyzeInputSchema,
  type ResearchAnalyzeInput,
  type ResearchAnalyzeDeps,
  type ResearchAnalyzeResponse,
  registerResearchCatalogReviewTool,
  ResearchCatalogReviewInputSchema,
  type ResearchCatalogReviewDeps,
  registerResearchSynthesizeTool,
  ResearchSynthesizeInputSchema,
  type ResearchSynthesizeInput,
  type ResearchSynthesizeDeps,
  // Memory tools (Issue #1576 Wave 9)
  registerMemoryQueryTool,
  MemoryQueryInputSchema,
  type MemoryQueryInput,
  registerMemoryStatsTool,
  MemoryStatsInputSchema,
  registerMemoryWriteTool,
  MemoryWriteInputSchema,
  type MemoryWriteInput,
  // Weather + query trace tools (Issue #1576 Wave 9)
  registerWeatherReportTool,
  WeatherReportInputSchema,
  registerQueryTraceTool,
  QueryTraceInputSchema,
  type QueryTraceInput,
  // Registry import tool (Issue #1576 Wave 9)
  registerRegistryImportTool,
  RegistryImportInputSchema,
  type RegistryImportInput,
} from '../mcp/index.js';
