// Types for the OBSIDIVM bridge client (consumed by the vitest test). // Runnable logic lives in the sibling .mjs (scripts run under bare `node`, no build step). /** A network-level failure (connection refused / DNS / timeout) carries this flag, * distinguishing an unreachable service from an HTTP-status error (which sets `status`). */ export interface ObsidivmError extends Error { unreachable?: boolean; status?: number; body?: unknown; } export interface ObsidivmClient { readonly baseUrl: string; health(): Promise; getSpec(): Promise<{ version?: string; targets?: Array<{ id: string; name?: string; port?: number }> } & Record>; status(): Promise; deploy(): Promise; destroy(): Promise; startTarget(id: string): Promise; stopTarget(id: string): Promise; scoreText(targetId: string, text: string): Promise>; createRun(payload?: Record): Promise>; attachSession(runId: string, payload?: Record): Promise; proposeGoalposts(payload?: Record): Promise; evolveStart(payload?: Record): Promise; evolveStop(): Promise; cloudgoatInstall(): Promise; cloudgoatCreate(scenario: string): Promise; cloudgoatDestroy(scenario: string): Promise; cloudgoatDestroyAll(): Promise; } export function obsidivm(opts?: { baseUrl?: string; timeoutMs?: number }): ObsidivmClient;