import { type McpToolDefinition } from './mcp/definitions.js';
import { Adapter, NetworkMessage } from '../core/types.js';
import { NexusPrime } from '../../index.js';
import { type McpToolProfile } from './mcp/types.js';
export declare class MCPAdapter implements Adapter {
    name: string;
    type: "mcp";
    connected: boolean;
    agents: string[];
    private server;
    private nexusRef?;
    private telemetry;
    private sessionDNA;
    private runtime?;
    private fallbackRuntimeStateKey?;
    private darwinLoops;
    private lifecyclePolicy;
    private memoryInjectionCache;
    private lastMemoryInjectionAt;
    private currentTask;
    private middlewarePipeline;
    private scanCache;
    private sessionLifecycleFinalized;
    private sciFiMatrixLog;
    private classifyToolCategory;
    private sciFiToolHeader;
    private box;
    constructor();
    setNexusRef(nexus: NexusPrime): void;
    private isPackageLikeWorkspace;
    private resolveWorkspaceHintFromArgs;
    private getWorkspaceContextForArgs;
    private resolveToolPath;
    private getToolProjectHash;
    private getRepoNgramIndex;
    private getDarwinLoop;
    private getRuntime;
    private getOrchestrator;
    private getToolProfile;
    private registerBuiltInMiddleware;
    private formatProtocolChecklist;
    private formatRemainingProtocolSteps;
    private prependTextToResponse;
    private decorateLifecycleResponse;
    private buildPreOrchestrationBlock;
    private extractGoalLikeText;
    private isMemoryTool;
    private injectMemoryContext;
    private describeClientInstructionStatus;
    private finalizeToolDefinitions;
    private getDecoratedToolDefinitions;
    private decorateToolDescription;
    debugListTools(profile?: McpToolProfile): McpToolDefinition[];
    listTools(profile?: McpToolProfile): McpToolDefinition[];
    private buildToolDefinitions;
    private setupToolHandlers;
    invokeTool(name: string, args?: Record<string, unknown>): Promise<{
        content: Array<{
            type: string;
            text: string;
        }>;
    }>;
    private executeToolRequest;
    private parseAsyncReceipt;
    private maybeStoreToolOutcomeMemory;
    private buildHandlerCtx;
    private handleToolCall;
    /**
     * Auto-invoke `nexus_optimize_tokens` for file-heavy tool calls.
     * Triggers when args carry >=5 file paths AND optimization wasn't already
     * applied this session (per the runtime usage flag set by an explicit
     * nexus_optimize_tokens / nexus_orchestrate call).
     *
     * Skips: the optimize tool itself, bootstrap-allowed tools, read-only
     * tools (no file mutation), and the explicit `nexus_session_bootstrap`
     * (already optimized in its own path).
     *
     * Engine-level call (`getTokenEngine().plan`) — no MCP recursion. On
     * success, persists savings to token_ledger via memory.insertTokenTelemetry
     * and emits `tokens.optimized` so the dashboard KPI updates live.
     */
    private maybeAutoOptimizeTokens;
    /** Pull file path lists out of common arg shapes. Returns up to 50 refs. */
    private extractFileRefsFromArgs;
    scanSourceFiles(cwd: string): Promise<string[]>;
    connect(): Promise<void>;
    private finalizeSessionLifecycle;
    disconnect(): Promise<void>;
    send(message: NetworkMessage): Promise<void>;
    receive(message: NetworkMessage): void;
}
