import type { AcpPermissionOutcome, AcpPermissionRequest, AcpPromptResponse, AcpUsage } from './acp/acp-types.js'; import { type HermesRuntimeOptions } from './hermes/hermes-runtime.js'; import type { HermesSessionRecord } from './hermes/hermes-session-store.js'; import type { AgentRuntimeConfig, RuntimeErrorCode } from './runtime-types.js'; import type { RuntimeEvent } from './runtime-events.js'; export type RuntimeDispatchErrorCode = RuntimeErrorCode | 'runtime_not_supported' | 'runtime_collaboration_denied'; export declare class RuntimeDispatchError extends Error { readonly code: RuntimeDispatchErrorCode; readonly runtimeId: string | null; constructor(code: RuntimeDispatchErrorCode, runtimeId: string | null, message: string); } export interface RuntimeDispatchRequest { agentId: string; runId: string; leaseId: string; cwd: string; apiKey: string; runtimeId: string; runtimeConfig: AgentRuntimeConfig | null | undefined; systemContext?: string; task: string; model?: string | null; onEvent?: (event: RuntimeEvent) => void; } export interface RuntimeDispatchContext { agentId: string; runId: string; sessionId: string; strategy: AgentRuntimeConfig['strategy']; } export interface RuntimeDispatchResult { sessionId: string; stopReason: string; usage: Required> & AcpUsage; } export interface RuntimeSupervisorOptions extends Pick { awbUrl: string; onEvent?: (context: RuntimeDispatchContext, event: RuntimeEvent) => void; requestApproval?: (context: RuntimeDispatchContext, request: AcpPermissionRequest) => AcpPermissionOutcome | Promise; onStderr?: (agentId: string, line: string) => void; } export declare class RuntimeSupervisor { #private; constructor(options: RuntimeSupervisorOptions); dispatch(request: RuntimeDispatchRequest): Promise; steer(agentId: string, runId: string, instruction: string): Promise; cancel(agentId: string, runId: string): Promise; close(agentId: string, runId: string): Promise; getSession(agentId: string, runId: string): HermesSessionRecord | null; stopForAgent(agentId: string): Promise<{ count: number; inflight: []; }>; stopAll(): Promise; }