/**
 * Module-level helpers for the MCP adapter (Phase 3 split).
 *
 * Extracted from mcp.ts to keep each file under 1500 LOC.
 * These are pure functions and lazy-singleton getters shared by the
 * handler files and by MCPAdapter itself.
 */
import { GuardrailEngine } from '../../../engines/guardrails-bridge.js';
import { ContinuousAttentionStream, createKVBridge, OrchestratorEngine } from '../../../engines/index.js';
import { FederationEngine } from '../../../engines/federation.js';
import { GraphMemoryEngine } from '../../../engines/graph-memory.js';
import { GraphTraversalEngine } from '../../../engines/graph-traversal.js';
import { HybridRetriever } from '../../../engines/hybrid-retriever.js';
import type { WorkspaceContext } from '../../../engines/workspace-resolver.js';
import type { SubAgentRuntime } from '../../../phantom/index.js';
export declare function getGuardrailEngine(): GuardrailEngine;
export declare function getCasEngine(): ContinuousAttentionStream;
export declare function getKvBridge(): ReturnType<typeof createKVBridge>;
export declare function getFederation(): FederationEngine;
export declare function getGraphEngine(): GraphMemoryEngine;
export declare function getTraversalEngine(): GraphTraversalEngine;
export declare function getHybridRetriever(): HybridRetriever;
export declare function getFallbackRuntime(workspace: WorkspaceContext): SubAgentRuntime;
export declare function getFallbackOrchestrator(workspace: WorkspaceContext): OrchestratorEngine;
import type { ResponseDetailLevel, ResponseIntent, ResponseTopology } from './types.js';
export declare function formatBullets(lines: Array<string | null | undefined>): string;
export declare function formatJsonDetails(label: string, value: unknown): string;
export declare function normalizeDetailLevel(value: unknown): ResponseDetailLevel;
export declare function normalizeBootstrapDepth(value: unknown, detailLevel: ResponseDetailLevel): 'fast' | 'deep';
export declare function normalizeResponseIntent(value: unknown): ResponseIntent;
export declare function normalizeResponseTopology(value: unknown): ResponseTopology;
export declare function buildWorkspaceEnvelope(workspace: WorkspaceContext): {
    workspaceRoot: string;
    repoRoot: string;
    repoName: string;
    remoteUrl: string;
    workspaceSource: import("../../../engines/workspace-resolver.js").WorkspaceResolutionSource;
    stateKey: string;
    notes: string[];
};
export declare function truncateText(value: string, limit?: number): string;
export declare function buildResultPreview(result: {
    content?: Array<{
        type: string;
        text: string;
    }>;
} | undefined): {
    contentType: string;
    contentCount: number;
    textPreview: string;
};
/**
 * Recursively collect files under `folderAbs`, optionally filtered by extension.
 * Only descends into directories within the same workspace root (caller must pre-validate root).
 * Skips hidden directories and node_modules to stay bounded.
 */
export declare function collectFolderFiles(folderAbs: string, folderGlob?: string): string[];
/**
 * Returns true for tools that are read-only or discovery-only and therefore
 * produce no meaningful state change worth storing in memory.
 */
export declare function isReadOnlyMcpTool(toolName: string): boolean;
/**
 * Builds a compact, content-free summary of a tool call for auto-memory storage.
 * Strips large fields (content, new_string, old_string, result, command_result)
 * so the memory record stays small.
 */
export declare function buildAutoMemorySummary(toolName: string, args: Record<string, unknown>): string;
