/**
 * MCP Server for Visor
 *
 * Exposes Visor workflows as MCP tools, allowing Claude Code and other
 * MCP clients to execute workflows programmatically via stdio transport.
 *
 * Usage:
 *   # Generic mode - workflow is a tool parameter
 *   visor mcp-server
 *
 *   # Fixed workflow mode - workflow is pre-configured
 *   visor mcp-server --config defaults/code-review.yaml
 *
 *   # Custom tool name and description
 *   visor mcp-server --config defaults/code-review.yaml \
 *     --mcp-tool-name "code_review" \
 *     --mcp-tool-description "Run a code review for current uncommitted changes"
 *
 * Claude Code config example (~/.claude/claude_desktop_config.json):
 *   {
 *     "mcpServers": {
 *       "visor": {
 *         "command": "npx",
 *         "args": ["-y", "@probelabs/visor", "mcp-server"]
 *       }
 *     }
 *   }
 */
import { z } from 'zod';
/**
 * Configuration options for the MCP server.
 */
export interface McpServerOptions {
    /**
     * Path to a fixed workflow configuration file.
     * When provided, the tool will not accept a workflow parameter.
     */
    configPath?: string;
    /**
     * Custom tool name (default: "run_workflow").
     */
    toolName?: string;
    /**
     * Custom tool description.
     */
    toolDescription?: string;
}
/**
 * Available default workflows bundled with Visor.
 */
export declare const DEFAULT_WORKFLOWS: readonly ["code-review", "visor", "task-refinement", "code-refiner"];
/**
 * Server metadata for MCP protocol.
 */
export declare const SERVER_INFO: {
    name: string;
    version: string;
    description: string;
};
/**
 * Tool description for the run_workflow tool.
 */
export declare const RUN_WORKFLOW_DESCRIPTION: string;
/**
 * Resolve a workflow path from user input with path traversal protection.
 *
 * Resolution order:
 * 1. Default workflow name - look in bundled defaults (safest, checked first)
 * 2. Relative path with .yaml/.yml extension - resolve from cwd (validated to stay within cwd)
 * 3. Absolute path - only allowed if within cwd or bundled defaults
 *
 * @param workflow - Path to workflow YAML or default workflow name
 * @returns Resolved absolute path to the workflow file
 * @throws Error if workflow cannot be found or path traversal detected
 */
export declare function resolveWorkflowPath(workflow: string): string;
/**
 * Format check results based on the requested format.
 *
 * @param results - The raw results from runChecks
 * @param format - Output format: json, markdown, or table
 * @returns Formatted string representation of results
 */
export declare function formatResults(results: Record<string, unknown>, format: 'json' | 'markdown' | 'table'): string;
/**
 * Zod schema for run_workflow tool parameters.
 */
export declare const RunWorkflowSchema: z.ZodObject<{
    workflow: z.ZodString;
    message: z.ZodOptional<z.ZodString>;
    checks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json", "markdown", "table"]>>>;
}, "strip", z.ZodTypeAny, {
    workflow: string;
    format: "json" | "table" | "markdown";
    message?: string | undefined;
    checks?: string[] | undefined;
}, {
    workflow: string;
    message?: string | undefined;
    checks?: string[] | undefined;
    format?: "json" | "table" | "markdown" | undefined;
}>;
/**
 * Type for run_workflow tool arguments (input type, before defaults are applied).
 */
export type RunWorkflowArgs = z.input<typeof RunWorkflowSchema>;
/**
 * Execute a workflow and return formatted results.
 *
 * @param args - The tool arguments
 * @returns MCP tool result with content
 */
export declare function executeWorkflow(args: RunWorkflowArgs): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
    isError?: boolean;
}>;
/**
 * Zod schema for fixed workflow tool parameters (no workflow parameter).
 */
export declare const FixedWorkflowSchema: z.ZodObject<{
    message: z.ZodOptional<z.ZodString>;
    checks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json", "markdown", "table"]>>>;
}, "strip", z.ZodTypeAny, {
    format: "json" | "table" | "markdown";
    message?: string | undefined;
    checks?: string[] | undefined;
}, {
    message?: string | undefined;
    checks?: string[] | undefined;
    format?: "json" | "table" | "markdown" | undefined;
}>;
/**
 * Type for fixed workflow tool arguments (input type).
 */
export type FixedWorkflowArgs = z.input<typeof FixedWorkflowSchema>;
/**
 * Execute a fixed workflow and return formatted results.
 *
 * @param args - The tool arguments (without workflow)
 * @param workflowPath - The pre-resolved workflow path
 * @returns MCP tool result with content
 */
export declare function executeFixedWorkflow(args: FixedWorkflowArgs, workflowPath: string): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
    isError?: boolean;
}>;
/**
 * Start the MCP server with Visor tools.
 *
 * The server exposes the following tools:
 * - run_workflow (or custom name): Execute a Visor workflow and return results
 *
 * Communication is via stdio transport (stdin/stdout for JSON-RPC messages).
 *
 * @param options - Optional configuration for fixed workflow mode
 */
export declare function startMcpServer(options?: McpServerOptions): Promise<void>;
