export type RuntimeSourceClient = "openclaw" | "codex" | "claude-code" | "api" | "unknown"; export type RuntimeInstanceState = "active" | "stale" | "stopped" | "error"; export type RuntimeHookEvent = "session_start" | "heartbeat" | "progress" | "task_update" | "session_stop" | "error"; export type RuntimeHookPayload = { source_client?: string | null; event?: string | null; run_id?: string | null; correlation_id?: string | null; initiative_id?: string | null; workstream_id?: string | null; task_id?: string | null; agent_id?: string | null; agent_name?: string | null; phase?: string | null; progress_pct?: number | null; message?: string | null; metadata?: Record | null; timestamp?: string | null; }; export type RuntimeInstanceRecord = { id: string; sourceClient: RuntimeSourceClient; displayName: string; providerLogo: "codex" | "openai" | "anthropic" | "openclaw" | "orgx" | "unknown"; state: RuntimeInstanceState; event: RuntimeHookEvent; runId: string | null; correlationId: string | null; initiativeId: string | null; workstreamId: string | null; taskId: string | null; agentId: string | null; agentName: string | null; phase: string | null; progressPct: number | null; currentTask: string | null; lastHeartbeatAt: string | null; lastEventAt: string; lastMessage: string | null; metadata: Record | null; createdAt: string; updatedAt: string; }; type PersistedRuntimeInstances = { updatedAt: string; instances: Record; }; export declare const DEFAULT_RUNTIME_HEARTBEAT_TIMEOUT_MS = 90000; export declare function readRuntimeInstances(): PersistedRuntimeInstances; export declare function upsertRuntimeInstanceFromHook(payload: RuntimeHookPayload): RuntimeInstanceRecord; export declare function applyRuntimeInstanceStaleness(options?: { timeoutMs?: number; nowMs?: number; }): PersistedRuntimeInstances; export declare function listRuntimeInstances(options?: { limit?: number; timeoutMs?: number; nowMs?: number; }): RuntimeInstanceRecord[]; export declare function clearRuntimeInstances(): void; export declare function resolveRuntimeHookToken(): string; export {};