/** * The transport signal, shared by the app and the Vite build config. * * `vite.config.ts` imports {@link transportFromEnv} to compute the * `__IDEA_TRANSPORT__` build constant from the very same `VITE_TRANSPORT` * variable that {@link shouldUseHttp} reads (ticket #74, F1). One predicate, * one variable: the greppable constant and the resolved transport cannot drift. */ /** The selected transport backing the gateways. */ export type Transport = "mock" | "http" | "tauri"; /** * The transport a raw `VITE_TRANSPORT` value selects, mock aside. Web is opt-in * (`"http"`) so the desktop path stays the default and is never affected. */ export function transportFromEnv(value: string | undefined): "http" | "tauri" { return value === "http" ? "http" : "tauri"; }