/** * AgentMuxRemoteAdapter — pass-through adapter that delegates to another * `adapters` CLI installation. Transport is out of scope: this adapter emits * plain `adapters run ...` spawn args, and the caller wraps them with the * desired invocation mode (local/docker/ssh/k8s) via * `buildInvocationCommand()`. * * This lets adapters nest: a local adapters invocation dispatches to a second * adapters executing in a docker container, on a remote SSH host, or in a k8s * pod. All structured events are forwarded verbatim — the remote `adapters run` * emits JSONL which we pass through unchanged. * * Configuration is read from RunOptions.env: * AGENT_MUX_REMOTE_AGENT — agent name to invoke on the remote (default: claude) * * The transport-specific bits (host, identity file, docker image, ...) live * on `RunOptions.invocation` — not on this adapter. */ import type { AgentCapabilities, ModelCapabilities, AgentConfigSchema, AuthState, AuthSetupGuidance, Session, SpawnArgs, ParseContext, RunOptions, AgentEvent, AgentConfig } from '@a5c-ai/comm-adapter'; import { BaseAgentAdapter } from './base-adapter.js'; export declare class AgentMuxRemoteAdapter extends BaseAgentAdapter { readonly agent: string; readonly displayName = "adapters (remote via invocation mode)"; readonly cliCommand: string; readonly minVersion = "0.1.0"; constructor(agent?: string, cliCommand?: string); readonly hostEnvSignals: readonly []; readonly capabilities: AgentCapabilities; readonly models: ModelCapabilities[]; readonly defaultModelId: undefined; readonly configSchema: AgentConfigSchema; /** Resolve the remote agent name (which agent to invoke inside the nested adapters). */ private resolveRemoteAgent; /** * Emit `adapters run --json --agent --prompt <...>` args. * * The caller is responsible for wrapping these with an invocation mode * (ssh/docker/k8s) via `buildInvocationCommand()`. This keeps the adapter * transport-agnostic so the same binary can be used inside a docker * container, on a remote SSH host, or in a k8s pod. */ buildSpawnArgs(options: RunOptions): SpawnArgs; parseEvent(line: string, context: ParseContext): AgentEvent | AgentEvent[] | null; /** Detect version via the local spawner running plain `adapters --version`. */ detectVersion(): Promise; protected detectVersionFromCli(): Promise; detectAuth(): Promise; getAuthGuidance(): AuthSetupGuidance; sessionDir(_cwd?: string): string; parseSessionFile(_filePath: string): Promise; /** List remote sessions via plain `adapters sessions list --json` (transport is external). */ listSessionFiles(_cwd?: string): Promise; readConfig(_cwd?: string): Promise; writeConfig(_config: Partial, _cwd?: string): Promise; /** * Detect whether `adapters` is available at the current spawner scope (local or * wrapped). The wrapper — docker/ssh/k8s — is applied externally. */ detectInstallation(): Promise; /** * Install adapters via `npm install -g @a5c-ai/adapters-cli`. * Transport wrapping (ssh/docker/k8s) is the caller's responsibility. */ install(opts?: import('@a5c-ai/comm-adapter').AdapterInstallOptions): Promise; update(opts?: import('@a5c-ai/comm-adapter').AdapterUpdateOptions): Promise; }