/** * Control-Plane MCP Tools — Phase 6 Part 4 * * Exposes orchestrator configuration and agent lifecycle operations as MCP * tools, giving an external AI agent full control-plane access to Network-AI. * * Tools exposed: * config_get — read current CONFIG values * config_set — update any CONFIG field at runtime * agent_list — list all currently registered agents and their status * agent_spawn — dispatch a task to a named agent * agent_stop — mark a running agent as stopped * fsm_transition — write an FSM state transition to the blackboard * orchestrator_info — get orchestrator version, adapter count, blackboard stats * * @module mcp-tools-control * @version 1.0.0 */ import type { MCPToolDefinition, BlackboardToolResult } from './mcp-blackboard-tools'; import type { McpToolProvider } from './mcp-transport-sse'; /** Minimal CONFIG surface needed by the control tools. */ export interface IConfig { maxParallelAgents: number; defaultTimeout: number; enableTracing: boolean; [key: string]: unknown; } /** Minimal agent registry entry. */ export interface IAgentStatus { agentId: string; status: string; lastSeen?: string; taskCount?: number; [key: string]: unknown; } /** Minimal blackboard surface needed for FSM transitions. */ export interface IControlBlackboard { write(key: string, value: unknown, sourceAgent: string, ttl?: number, agentToken?: string): unknown; read(key: string): { key: string; value: unknown; } | null; getSnapshot(): Record; } /** Options for `ControlMcpTools`. */ export interface ControlMcpToolsOptions { /** Live reference to the CONFIG object (mutated directly for config_set). */ config: IConfig; /** Live reference to the agent registry map. */ agentRegistry?: Map; /** Reference to the primary blackboard (used for fsm_transition). */ blackboard?: IControlBlackboard; /** System token for writing to the blackboard. */ systemToken?: string; } /** * MCP tool provider for orchestrator control-plane operations. * * @example * ```typescript * import { ControlMcpTools } from 'network-ai'; * * const controlTools = new ControlMcpTools({ * config: CONFIG, // live reference — mutations take effect immediately * agentRegistry: agentMap, * blackboard: orchestrator.getBlackboard(), * systemToken: 'system-orchestrator-token', * }); * * combined.register(controlTools); * ``` */ export declare class ControlMcpTools implements McpToolProvider { private readonly _config; private readonly _agentRegistry?; private readonly _blackboard?; private readonly _systemToken; private readonly _stoppedAgents; constructor(options: ControlMcpToolsOptions); getDefinitions(): MCPToolDefinition[]; call(toolName: string, args: Record): Promise; private _configGet; private _configSet; private _agentList; private _agentSpawn; private _agentStop; private _fsmTransition; private _orchestratorInfo; } //# sourceMappingURL=mcp-tools-control.d.ts.map