import { McpClient } from './client.js';
import type { McpToolSchema } from './client.js';
import type { McpServerConfig } from '@pellux/goodvibes-sdk/platform/mcp/config';
import type { HookDispatcher } from '../hooks/dispatcher.js';
import type { McpDecisionRecord, QuarantineReason, SchemaFreshness } from '@pellux/goodvibes-sdk/platform/runtime/mcp/types';
import type { RuntimeEventBus } from '../runtime/events/index.js';
import type { ConfigManager } from '../config/manager.js';
import type { McpConfigRoots } from '@pellux/goodvibes-sdk/platform/mcp/config';
import { type SandboxSessionRegistry } from '../runtime/sandbox/session-registry.js';
export interface RegisteredTool {
    /** Fully-qualified tool name: mcp:<server>:<tool> */
    qualifiedName: string;
    serverName: string;
    toolName: string;
    description: string;
}
export declare class McpRegistry {
    private clients;
    private permissions;
    private freshness;
    private runtimeBus;
    private sandboxConfigManager;
    private sandboxSessions;
    private sandboxSessionByServer;
    private readonly hookDispatcher;
    constructor(options: {
        readonly hookDispatcher: Pick<HookDispatcher, 'fire'>;
        readonly sandboxSessions: SandboxSessionRegistry;
    });
    setRuntimeBus(runtimeBus: RuntimeEventBus | null): void;
    setSandboxRuntime(configManager: ConfigManager, sessions: SandboxSessionRegistry): void;
    /**
     * connectAll — Load config from .goodvibes/mcp.json and connect to all servers.
     * Errors on individual servers are logged but do not abort the whole startup.
     */
    connectAll(roots: McpConfigRoots): Promise<void>;
    /**
     * connectServer — Connect a single MCP server by config.
     * Exposed for programmatic use (testing, dynamic registration).
     */
    connectServer(serverConfig: McpServerConfig): Promise<void>;
    /**
     * listAllTools — Return all registered tools (name + description) from all connected servers.
     * Only loads tool names and descriptions — full schemas are NOT fetched here.
     */
    listAllTools(): Promise<RegisteredTool[]>;
    /**
     * getToolSchema — Fetch full JSON schema for a qualified tool name.
     * Triggers lazy schema load and caches within McpClient.
     */
    getToolSchema(qualifiedName: string): Promise<McpToolSchema | null>;
    /**
     * callTool — Execute a tool by its qualified name.
     * Fetches full schema on first use (progressive loading — F2).
     */
    callTool(qualifiedName: string, args: Record<string, unknown>): Promise<unknown>;
    /**
     * disconnectAll — Stop all connected MCP server processes.
     */
    disconnectAll(): Promise<void>;
    /**
     * getClient — Get the McpClient for a given server name (for advanced use).
     */
    getClient(serverName: string): McpClient | undefined;
    /** Connected server names. */
    get serverNames(): string[];
    /**
     * listServers — Return status info for all known servers (connected or not).
     */
    listServers(): Array<{
        name: string;
        connected: boolean;
    }>;
    listServerSecurity(): Array<{
        name: string;
        connected: boolean;
        role: import('@pellux/goodvibes-sdk/platform/runtime/mcp/types').McpServerRole;
        trustMode: import('@pellux/goodvibes-sdk/platform/runtime/mcp/types').McpTrustMode;
        allowedPaths: string[];
        allowedHosts: string[];
        schemaFreshness: SchemaFreshness;
        quarantineReason?: QuarantineReason;
        quarantineDetail?: string;
        quarantineApprovedBy?: string;
    }>;
    listServerSandboxBindings(): Array<{
        name: string;
        sessionId?: string;
        profileId?: 'mcp-shared' | 'mcp-per-server';
        state?: import('@pellux/goodvibes-sdk/platform/runtime/sandbox/types').SandboxSessionState;
        backend?: import('@pellux/goodvibes-sdk/platform/runtime/sandbox/types').SandboxResolvedBackend | import('@pellux/goodvibes-sdk/platform/runtime/sandbox/types').SandboxVmBackend;
        startupStatus?: 'verified' | 'planned' | 'failed';
    }>;
    setServerTrustMode(serverName: string, mode: import('@pellux/goodvibes-sdk/platform/runtime/mcp/types').McpTrustMode): void;
    setServerRole(serverName: string, role: import('@pellux/goodvibes-sdk/platform/runtime/mcp/types').McpServerRole): void;
    listRecentSecurityDecisions(limit?: number): McpDecisionRecord[];
    quarantineSchema(serverName: string, reason: QuarantineReason, detail?: string): void;
    approveSchemaQuarantine(serverName: string, operatorId: string): void;
    private _connectServer;
    private _resolveSandboxProcessSpec;
    private _selectSandboxProfile;
    private _requiresDedicatedMcpSandbox;
    /**
     * Parse mcp:<server>:<tool> qualified name.
     * Returns null if the name doesn't match the expected format.
     */
    private _parseQualifiedName;
    private _emitPolicyUpdate;
}
//# sourceMappingURL=registry.d.ts.map