import type { McpAskResult, McpMemoryRememberInput, McpMemorySearchInput, McpReadInput, McpReadResult, McpSendResult } from "../contracts/mcp.js"; import type { OperatorAgentCoreRememberInput, OperatorAgentRestartInput, OperatorContextCompactInput, OperatorContextResetInput, OperatorDispatchEventInput, OperatorIdentityRememberForInput, OperatorIdentityRetractInput, OperatorIdentitySearchInput, OperatorIdentitySearchResult, OperatorIdentitySupersedeInput, OperatorMemoryRetractInput, OperatorMemorySupersedeInput, OperatorSendInput, OperatorSetupSaveInput, OperatorSupervisionStatusInput, OperatorTurnCancelInput, OperatorTurnsCancelInput, OperatorWorkerAskInput, OperatorWorkerDispatchInput } from "../contracts/operator.js"; import type { SetupSaveResponse, SetupSnapshot } from "../contracts/setup.js"; import type { ToolCallerContext } from "../mcp/server/broker-api.js"; import type { GroupXBroker } from "../broker/broker.js"; import type { GroupXConfig } from "../config.js"; import type { SetupApi } from "../web/server/types.js"; import { toIdentityRecordContract, toMemoryRecordContract } from "./record-mappers.js"; import type { RestartAgentCommandCoordinator } from "./restart-commands.js"; export interface OperatorBrokerApi { send(caller: ToolCallerContext, input: OperatorSendInput): Promise; read(caller: ToolCallerContext, input: McpReadInput): Promise; roster(caller: ToolCallerContext): Promise<{ agents: Array<{ actorId: string; displayName: string; enabled: boolean; cwd?: string; status: string; }>; activeTurns: import("../broker/types.js").BrokerTurnProjection[]; pairs: Array<{ pairId: string; workers: string[]; observers: string[]; steerCount: number; }>; health: string; }>; contextUsage(caller: ToolCallerContext): Promise; contextCompact(caller: ToolCallerContext, input: OperatorContextCompactInput): Promise; contextReset(caller: ToolCallerContext, input: OperatorContextResetInput): Promise; turnCancel(caller: ToolCallerContext, input: OperatorTurnCancelInput): Promise<{ turnId: string; accepted: boolean; status: string; }>; turnsCancel(caller: ToolCallerContext, input: OperatorTurnsCancelInput): Promise<{ cancelled: Array<{ turnId: string; accepted: boolean; status: string; }>; }>; agentRestart(caller: ToolCallerContext, input: OperatorAgentRestartInput): Promise; memorySearch(caller: ToolCallerContext, input: McpMemorySearchInput): Promise<{ items: ReturnType[]; nextCursor?: number; }>; memoryRemember(caller: ToolCallerContext, input: McpMemoryRememberInput): Promise<{ memory: ReturnType; }>; memorySupersede(caller: ToolCallerContext, input: OperatorMemorySupersedeInput): Promise<{ memory: ReturnType; }>; memoryRetract(caller: ToolCallerContext, input: OperatorMemoryRetractInput): Promise<{ memory: ReturnType; }>; agentCoreRemember(caller: ToolCallerContext, input: OperatorAgentCoreRememberInput): Promise<{ memory: ReturnType; }>; identitySearch(caller: ToolCallerContext, input: OperatorIdentitySearchInput): Promise; identityRememberFor(caller: ToolCallerContext, input: OperatorIdentityRememberForInput): Promise<{ identity: ReturnType; }>; identitySupersede(caller: ToolCallerContext, input: OperatorIdentitySupersedeInput): Promise<{ identity: ReturnType; }>; identityRetract(caller: ToolCallerContext, input: OperatorIdentityRetractInput): Promise<{ identity: ReturnType; }>; setupRead(caller: ToolCallerContext): Promise; setupSave(caller: ToolCallerContext, input: OperatorSetupSaveInput): Promise; workerDispatch(caller: ToolCallerContext, input: OperatorWorkerDispatchInput): Promise; workerAsk(caller: ToolCallerContext, input: OperatorWorkerAskInput): Promise; dispatchEvent(caller: ToolCallerContext, input: OperatorDispatchEventInput): Promise; supervisionStatus(caller: ToolCallerContext, input: OperatorSupervisionStatusInput): Promise>; } export interface GroupXOperatorBrokerApiOptions { broker: Pick; restartCommands: Pick; config: Pick; roomId: string; bindingId: string; setupApi?: SetupApi; store: Pick; askTimeoutMs?: number; } export declare class GroupXOperatorBrokerApi implements OperatorBrokerApi { #private; constructor(options: GroupXOperatorBrokerApiOptions); send(caller: ToolCallerContext, input: OperatorSendInput): Promise; read(caller: ToolCallerContext, input: McpReadInput): Promise; roster(caller: ToolCallerContext): Promise<{ agents: { actorId: string; displayName: string; enabled: boolean; cwd?: string; status: string; }[]; activeTurns: import("../broker/types.js").BrokerTurnProjection[]; pairs: { pairId: string; workers: string[]; observers: string[]; steerCount: number; }[]; health: string; }>; contextUsage(caller: ToolCallerContext): Promise; contextCompact(caller: ToolCallerContext, input: OperatorContextCompactInput): Promise; contextReset(caller: ToolCallerContext, input: OperatorContextResetInput): Promise; turnCancel(caller: ToolCallerContext, input: OperatorTurnCancelInput): Promise<{ turnId: string; accepted: boolean; status: string; }>; turnsCancel(caller: ToolCallerContext, input: OperatorTurnsCancelInput): Promise<{ cancelled: Array<{ turnId: string; accepted: boolean; status: string; }>; }>; agentRestart(caller: ToolCallerContext, input: OperatorAgentRestartInput): Promise; memorySearch(caller: ToolCallerContext, input: McpMemorySearchInput): Promise<{ items: ReturnType[]; nextCursor?: number; }>; memoryRemember(caller: ToolCallerContext, input: McpMemoryRememberInput): Promise<{ memory: ReturnType; }>; memorySupersede(caller: ToolCallerContext, input: OperatorMemorySupersedeInput): Promise<{ memory: ReturnType; }>; memoryRetract(caller: ToolCallerContext, input: OperatorMemoryRetractInput): Promise<{ memory: ReturnType; }>; agentCoreRemember(caller: ToolCallerContext, input: OperatorAgentCoreRememberInput): Promise<{ memory: ReturnType; }>; identitySearch(caller: ToolCallerContext, input: OperatorIdentitySearchInput): Promise; identityRememberFor(caller: ToolCallerContext, input: OperatorIdentityRememberForInput): Promise<{ identity: ReturnType; }>; identitySupersede(caller: ToolCallerContext, input: OperatorIdentitySupersedeInput): Promise<{ identity: ReturnType; }>; identityRetract(caller: ToolCallerContext, input: OperatorIdentityRetractInput): Promise<{ identity: ReturnType; }>; setupRead(caller: ToolCallerContext): Promise; setupSave(caller: ToolCallerContext, input: OperatorSetupSaveInput): Promise; workerDispatch(caller: ToolCallerContext, input: OperatorWorkerDispatchInput): Promise; workerAsk(caller: ToolCallerContext, input: OperatorWorkerAskInput): Promise; dispatchEvent(caller: ToolCallerContext, input: OperatorDispatchEventInput): Promise; supervisionStatus(caller: ToolCallerContext, input: OperatorSupervisionStatusInput): Promise>; } //# sourceMappingURL=operator-broker-api.d.ts.map