import { type IReq_ControllerMcpProjectsList, type IReq_ControllerMcpSessionRead, type IReq_ControllerMcpSessionScratchpadRead, type IReq_ControllerMcpSessionScratchpadUpdate, type IReq_ControllerMcpSessionSend, type IReq_ControllerMcpSessionsList, type IReq_ControllerMcpStatus, type IReq_ControllerMcpSettingsGet, type IReq_ControllerMcpSettingsUpdate, type IReq_ControllerMcpAuthSwitch, type TControllerMcpWorkspaceMethod, type TControllerMcpWorkspaceRequest, type TControllerMcpWorkspaceResponse } from '../dist_ts_interfaces/index.js'; import type { IAGLHomePaths } from './classes.aglhome.js'; import type { IControllerProcessIdentity } from './classes.processinspection.js'; export type TControllerMcpClientErrorCode = 'CONTROLLER_UNAVAILABLE' | 'FENCED' | 'AUTHENTICATION_FAILED' | 'PROTOCOL_MISMATCH' | 'RESPONSE_LIMIT' | 'CONCURRENT_CHANGE' | 'PROJECT_NOT_FOUND' | 'SESSION_NOT_FOUND' | 'AMBIGUOUS_SESSION' | 'MODEL_NOT_FOUND' | 'REQUEST_FAILED' | 'OUTCOME_UNKNOWN'; export declare class ControllerMcpClientError extends Error { readonly code: TControllerMcpClientErrorCode; constructor(codeArg: TControllerMcpClientErrorCode, messageArg: string); } export interface IControllerMcpClientOptions { controllerPort: number; /** * Proves which chat this server serves. Injected into the harness process environment by the * controller at spawn; absent for an independently launched MCP host, which then reaches only * the discovery surface. */ callerCredential?: string; paths?: IAGLHomePaths; requestTimeoutMs?: number; readProcessIdentity?: (pidArg: number) => Promise; } export declare class ControllerMcpClient { private readonly controllerPort; private readonly callerCredential?; private readonly paths?; private readonly requestTimeoutMs; private readonly readProcessIdentity?; constructor(optionsArg: IControllerMcpClientOptions); status(signalArg?: AbortSignal): Promise; authswitch(request: IReq_ControllerMcpAuthSwitch['request'], signal?: AbortSignal): Promise; getSettings(signal?: AbortSignal): Promise; updateSettings(request: IReq_ControllerMcpSettingsUpdate['request'], signal?: AbortSignal): Promise; listProjects(signalArg?: AbortSignal): Promise; listSessions(requestArg: IReq_ControllerMcpSessionsList['request'], signalArg?: AbortSignal): Promise; readSession(requestArg: IReq_ControllerMcpSessionRead['request'], signalArg?: AbortSignal): Promise; sendSession(requestArg: IReq_ControllerMcpSessionSend['request'], signalArg?: AbortSignal): Promise; readSessionScratchpad(requestArg: IReq_ControllerMcpSessionScratchpadRead['request'], signalArg?: AbortSignal): Promise; updateSessionScratchpad(requestArg: IReq_ControllerMcpSessionScratchpadUpdate['request'], signalArg?: AbortSignal): Promise; workspace(methodArg: TMethod, requestArg: TControllerMcpWorkspaceRequest, signalArg?: AbortSignal): Promise>; private readCompatibleDescriptor; private handshake; private assertStatusHandshake; private dispatch; private performHttpRequest; }