import type { TraceProcessorService } from '../services/traceProcessorService';
import type { SkillExecutor } from '../services/skillEngine/skillExecutor';
import type { StreamingUpdate } from '../agent/types';
import type { AnalysisNote, AnalysisPlanV3, Hypothesis, UncertaintyFlag } from './types';
import type { SceneType } from './sceneClassifier';
import type { ArtifactStore } from './artifactStore';
import { type OutputLanguage } from './outputLanguage';
import { type KnowledgeScope } from '../services/scopedKnowledgeStore';
import { CodebaseRegistry } from '../services/codebase/codebaseRegistry';
import { CodeLookupLedger } from '../services/codebase/codeLookupLedger';
import { type CodeAwareMode } from '../services/codebase/codeAwareFeature';
export declare function normalizeOptionalToolString(value: unknown): string | undefined;
/** MCP tool name prefix — derived from the server name 'smartperfetto'.
 * Re-exported from `mcpToolRegistry.ts` so consumers (claudeAgentDefinitions,
 * tests) keep their existing import path. */
export declare const MCP_NAME_PREFIX = "mcp__smartperfetto__";
interface SqlErrorFixPair {
    errorSql: string;
    errorMessage: string;
    fixedSql?: string;
    timestamp: number;
}
export declare const MIN_PHASE_SUMMARY_CHARS = 15;
export declare function loadLearnedSqlFixPairs(maxPairs?: number, scope?: KnowledgeScope): SqlErrorFixPair[];
export interface ClaudeMcpServerOptions {
    traceId: string;
    traceProcessorService: TraceProcessorService;
    skillExecutor: SkillExecutor;
    packageName?: string;
    /** Callback to emit StreamingUpdate events (e.g. DataEnvelopes from skill results) */
    emitUpdate?: (update: StreamingUpdate) => void;
    /** Callback when invoke_skill returns a successful result (used for entity capture) */
    onSkillResult?: (result: {
        skillId: string;
        displayResults: Array<{
            stepId?: string;
            data?: any;
        }>;
    }) => void;
    /** Mutable notes array for the write_analysis_note tool — passed by reference from analyze() scope */
    analysisNotes?: AnalysisNote[];
    /** Optional artifact store for token-efficient skill result references */
    artifactStore?: ArtifactStore;
    /** Cached architecture detection result — avoids redundant re-detection */
    cachedArchitecture?: import('../agent/detectors/types').ArchitectureInfo;
    /** Per-session SQL error-fix pairs for in-context learning */
    recentSqlErrors?: SqlErrorFixPair[];
    /** Mutable analysis plan — passed by reference from analyze() scope */
    analysisPlan?: {
        current: AnalysisPlanV3 | null;
    };
    /** Mutable watchdog warning — set by runtime when repetitive failures detected, consumed by next tool call */
    watchdogWarning?: {
        current: string | null;
    };
    /** Mutable hypotheses array for hypothesis-verify cycle (P0-G4) */
    hypotheses?: Hypothesis[];
    /** Scene type for plan template validation (P1-G11) */
    sceneType?: SceneType;
    /** Mutable uncertainty flags array (P1-G1) */
    uncertaintyFlags?: UncertaintyFlag[];
    /** Cached vendor detection result (e.g. "xiaomi", "pixel", "aosp") — avoids redundant re-detection */
    cachedVendor?: string | null;
    /** Reference trace ID for comparison mode — enables dual-trace MCP tools */
    referenceTraceId?: string;
    /** Pre-computed comparison context (capabilities, metadata) for get_comparison_context tool */
    comparisonContext?: import('./types').ComparisonContext;
    /** Lightweight mode for quick queries — only registers core data tools.
     *  Skips planning, hypothesis, knowledge, patterns, notes, and comparison tools.
     *  Also disables the plan gate since planning tools are not available. */
    lightweight?: boolean;
    /** Per-analysis budget for skill-notes injection on invoke_skill responses.
     *  When omitted (default) no notes are injected. The runtime constructs and
     *  passes the same instance for every tool call so the running totals are
     *  shared across the analysis. See skillNotesInjector.ts. */
    skillNotesBudget?: import('./selfImprove/skillNotesInjector').SkillNotesBudget;
    /** User-facing output language for backend-emitted progress and hints. */
    outputLanguage?: OutputLanguage;
    /** Enterprise tenant/workspace scope for knowledge, memory, case, and baseline tools. */
    knowledgeScope?: KnowledgeScope;
    /** SmartPerfetto session id, used for code lookup ledger sidecars. */
    sessionId?: string;
    /** Code-aware analysis mode. `metadata_only` never sends source snippets to the provider. */
    codeAwareMode?: CodeAwareMode;
    /** Codebase ids whitelisted for this analysis session. */
    codebaseIds?: string[];
    /** Test hook / alternate registry. */
    codebaseRegistry?: CodebaseRegistry;
    /** Test hook / alternate code lookup ledger. */
    codeLookupLedger?: CodeLookupLedger;
}
/**
 * Creates an in-process MCP server scoped to a specific trace session.
 * Exposes domain tools: execute_sql, invoke_skill, list_skills,
 * detect_architecture, lookup_sql_schema, and optionally write_analysis_note.
 */
export declare function createClaudeMcpServer(options: ClaudeMcpServerOptions): {
    server: import("@anthropic-ai/claude-agent-sdk").McpSdkServerConfigWithInstance;
    allowedTools: string[];
    toolDefinitions: import("./mcpToolRegistry").McpToolDefinition[];
};
export {};
//# sourceMappingURL=claudeMcpServer.d.ts.map