/**
 * @license
 * Copyright 2026 HopCode Team Team
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * Control Context
 *
 * Layer 1 of the control plane architecture. Provides shared, session-scoped
 * state for all controllers and services, eliminating the need for prop
 * drilling. Mutable fields are intentionally exposed so controllers can track
 * runtime state (e.g. permission mode, active MCP clients).
 */
import type { Config, MCPServerConfig } from '@hoptrendy/hopcode-core';
import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
import type { StreamJsonOutputAdapter } from '../io/StreamJsonOutputAdapter.js';
import type { PermissionMode } from '../types.js';
import type { LoadedSettings } from '../../config/settings.js';
/**
 * Control Context interface
 *
 * Provides shared access to session-scoped resources and mutable state
 * for all controllers across both ControlDispatcher (protocol routing) and
 * ControlService (programmatic API).
 */
export interface IControlContext {
    readonly config: Config;
    readonly streamJson: StreamJsonOutputAdapter;
    readonly sessionId: string;
    readonly abortSignal: AbortSignal;
    readonly debugMode: boolean;
    readonly settings: LoadedSettings;
    permissionMode: PermissionMode;
    sdkMcpServers: Set<string>;
    mcpClients: Map<string, {
        client: Client;
        config: MCPServerConfig;
    }>;
    inputClosed: boolean;
    onInterrupt?: () => void;
}
/**
 * Control Context implementation
 */
export declare class ControlContext implements IControlContext {
    readonly config: Config;
    readonly streamJson: StreamJsonOutputAdapter;
    readonly sessionId: string;
    readonly abortSignal: AbortSignal;
    readonly debugMode: boolean;
    readonly settings: LoadedSettings;
    permissionMode: PermissionMode;
    sdkMcpServers: Set<string>;
    mcpClients: Map<string, {
        client: Client;
        config: MCPServerConfig;
    }>;
    inputClosed: boolean;
    onInterrupt?: () => void;
    constructor(options: {
        config: Config;
        streamJson: StreamJsonOutputAdapter;
        sessionId: string;
        abortSignal: AbortSignal;
        settings: LoadedSettings;
        permissionMode?: PermissionMode;
        onInterrupt?: () => void;
    });
}
