import type { StoreEventEmitter } from '../store/event-emitter.js'; import type { PDRuntimeAdapter, RuntimeKind, RuntimeCapabilities, RuntimeHealth, RunHandle, RunStatus, StartRunInput, StructuredRunOutput, RuntimeArtifactRef } from '../runtime-protocol.js'; /** * OpenClawCliRuntimeAdapterOptions — constructor options for OpenClawCliRuntimeAdapter. * * Per DPB-09 (LOCKED): No silent fallback. Calling code must specify runtimeMode. * Per HG-03 (HARD GATE): --openclaw-local/--openclaw-gateway must be explicit. * PRI-306: 'default' delegates mode resolution to OpenClaw (no mode flag appended). */ export interface OpenClawCliRuntimeAdapterOptions { /** * Runtime mode — 'local' or 'gateway' appends the corresponding CLI flag. * 'default' delegates to OpenClaw's own mode resolution (no flag appended). * Per DPB-09 (LOCKED): No silent fallback. Calling code must specify. * Per HG-03 (HARD GATE): --openclaw-local/--openclaw-gateway must be explicit. */ runtimeMode: 'local' | 'gateway' | 'default'; /** * PD workspace directory — used as cwd for the CLI process. * Per DPB-08 (LOCKED): Three-layer control includes cwd passed to CliProcessRunner. * Per HG-02 (HARD GATE): Two distinct boundaries — PD workspace vs OpenClaw workspace. * If undefined, runCliProcess uses process.cwd() as default. */ workspaceDir?: string; /** * Agent ID to invoke when running the diagnostician (default: 'main'). * Used in healthCheck to verify the agent is available. */ agentId?: string; /** * Optional StoreEventEmitter for telemetry event emission. * If not provided, falls back to the global storeEmitter singleton. */ eventEmitter?: StoreEventEmitter; } export declare class OpenClawCliRuntimeAdapter implements PDRuntimeAdapter { private readonly runStateMap; private readonly runtimeMode; private readonly workspaceDir?; private readonly agentId; private readonly eventEmitter; constructor(options: OpenClawCliRuntimeAdapterOptions); kind(): RuntimeKind; getCapabilities(): Promise; /** * Probe runtime health by running a minimal openclaw command. * * Verifies: * 1. openclaw binary is executable (run `openclaw --version`) * 2. The configured agent is available (run `openclaw agents list --json`) * 3. The agent can actually respond (one-shot minimal probe with --agent) * * Returns healthy=false with appropriate error category when checks fail. * Per DPB-09: No silent fallback — failures are reported accurately. * Per P1 hard gate: Binary-only check is insufficient; must verify real invocation. */ healthCheck(): Promise; /** * Map CLI output to telemetry event type and error category. */ private static mapCliResultToTelemetry; startRun(input: StartRunInput): Promise; pollRun(runId: string): Promise; fetchOutput(runId: string): Promise; cancelRun(runId: string): Promise; fetchArtifacts(_runId: string): Promise; } //# sourceMappingURL=openclaw-cli-runtime-adapter.d.ts.map