/** * Runtime status reporting for @hasna/loops. * * Replaces the pre-mode-removal deployment-status contract. The mode and * authority report fields are removed; see runtime-config. A report names the * storage backend (`sqlite | postgresql`) and the client connection * (`file | api`) and nothing else about placement. */ import { type LoopRouteAdmissionGate, type RuntimeConfig, type RuntimeConnection, type RuntimeStorage } from "./runtime-config.js"; export type LoopRemoteSchedulerBackend = "none" | "control_plane_http" | "postgres_contract"; export type LoopRemoteArtifactStore = "none" | "object_store_contract"; export type LoopRouteAdmissionStateStore = "local_sqlite" | "control_plane_contract"; export interface LoopSchedulerStateStatus { localStore: { backend: "sqlite"; role: "authoritative" | "spool"; runArtifacts: "local_files"; routeAdmissionState: "workflow_work_items"; }; remoteStore: { backend: LoopRemoteSchedulerBackend; configured: boolean; applySupported: false; objectArtifacts: LoopRemoteArtifactStore; mutatesAws: false; }; routeAdmission: { stateStore: LoopRouteAdmissionStateStore; activeStatuses: readonly ["admitted", "running"]; gates: readonly LoopRouteAdmissionGate[]; dryRunEvaluatesLiveCounts: false; }; } export interface StorageConnectionReport { packageVersion: string; storage: RuntimeStorage; connection: RuntimeConnection; /** Scrubbed API URL (origin + path, no credentials); undefined when no API connection. */ apiUrl?: string; apiKeyPresent: boolean; databaseUrlPresent: boolean; configured: boolean; warnings: string[]; } /** * Build the storage/connection report for a resolved runtime config. The * report never carries credential values: the API key is a presence flag and * the API URL is scrubbed. */ export declare function buildStorageConnectionReport(config: RuntimeConfig): StorageConnectionReport; /** * Scheduler-state fields derived from the connection and the server storage * presence only. Neutral backend names: `control_plane_http` for an API * connection, `postgres_contract` when the server storage is postgres, * `none` for a plain local sqlite file. */ export declare function schedulerStateForConnection(config: RuntimeConfig): LoopSchedulerStateStatus; /** * One-line human-readable summary of the storage/connection report: * `storage= connection= [api=] [warnings=[...]]`. */ export declare function storageConnectionReportLine(report: StorageConnectionReport): string;