Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(ui): one-click install panel on the self-hosted realtime card
rubenluetke10-beepee374cc9c51d
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsxindex 585cf0e06a..cd87d2eb2e 100644--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx@@ -13,11 +13,17 @@ import {loginAntigravity,localInstallStatus,logoutAntigravity,+ managedServerInstall,+ managedServerPreflight,+ managedServerStatus,+ managedServerUninstall,modelPullStatus,pullableModels,startLocalInstall,startModelPull,type LocalInstallProgress,+ type ManagedInstallProgress,+ type ManagedPreflight,type ModelPullProgress,type ProviderDescriptor,type PullableModel,@@ -1738,6 +1744,195 @@ function LocalRuntimePanel({);}+/**+ * One-click managed install for the self-hosted realtime server (the card+ * that used to require a terminal, a venv, and a hand-written launch+ * command). Flow: preflight (honest hardware/tier/brain verdict or the+ * 12 GB-floor blocker) → one confirm with download size and expected+ * latency in view → poll-shaped progress → the card's fail-closed readiness+ * flips server-side. Every sentence of substance comes from the server and+ * renders verbatim; only the chrome is localized.+ */+function ManagedServerPanel({+ descriptor,+ onChanged,+}: {+ descriptor: ProviderDescriptor;+ onChanged: () => void;+}) {+ const t = useT();+ const status = descriptor.managed_server;+ const [preflight, setPreflight] = useState<ManagedPreflight | null>(null);+ const [progress, setProgress] = useState<ManagedInstallProgress | null>(null);+ const [error, setError] = useState<string | null>(null);+ const [checking, setChecking] = useState(false);+ const [confirmRemove, setConfirmRemove] = useState(false);+ const running = Boolean(progress?.running);++ useEffect(() => {+ if (!running) return;+ let cancelled = false;+ const timer = window.setInterval(async () => {+ try {+ const next = await managedServerStatus();+ if (cancelled) return;+ setProgress(next.progress);+ if (!next.progress.running) {+ window.clearInterval(timer);+ if (next.progress.phase === "error") {+ setError(next.progress.error || "install failed");+ }+ onChanged();+ }+ } catch (err) {+ if (cancelled) return;+ window.clearInterval(timer);+ setError(err instanceof Error ? err.message : String(err));+ setProgress(null);+ }+ }, 3000);+ return () => {+ cancelled = true;+ window.clearInterval(timer);+ };+ }, [running, onChanged]);++ if (!status) return null;++ const check = async () => {+ setError(null);+ setChecking(true);+ try {+ setPreflight(await managedServerPreflight());+ } catch (err) {+ setError(err instanceof Error ? err.message : String(err));+ } finally {+ setChecking(false);+ }+ };++ const startInstall = async () => {+ setError(null);+ try {+ setProgress(await managedServerInstall());+ } catch (err) {+ setError(err instanceof Error ? err.message : String(err));+ }+ };++ const remove = async () => {+ if (!confirmRemove) {+ setConfirmRemove(true);+ return;+ }+ setConfirmRemove(false);+ setError(null);+ try {+ await managedServerUninstall();+ setPreflight(null);+ setProgress(null);+ onChanged();+ } catch (err) {+ setError(err instanceof Error ? err.message : String(err));+ }+ };++ const failed = progress?.phase === "error";+ return (+ <div className="space-y-2 rounded-md border border-border/60 bg-muted/30 p-3">+ <div className="flex items-start gap-2 text-xs">+ {status.ready ? (+ <Check className="mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-500" />+ ) : (+ <AlertCircle className="mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-500" />+ )}+ <span className="text-muted-foreground">+ {running ? (progress?.detail ?? status.sentence) : status.sentence}+ </span>+ </div>++ {running && (+ <div className="space-y-1">+ <div className="h-1.5 w-full overflow-hidden rounded bg-muted">+ <div+ className="h-full rounded bg-primary transition-all"+ style={{ width: `${Math.max(2, progress?.percent ?? 0)}%` }}+ />+ </div>+ <p className="text-[11px] text-muted-foreground">+ {t("apikeys_view.managed_hint")}+ </p>+ </div>+ )}++ {!status.ready && !running && !preflight && (+ <Button+ size="sm"+ variant="secondary"+ onClick={check}+ disabled={checking}+ className="gap-2"+ >+ {checking ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <Download className="h-3.5 w-3.5" />+ )}+ {failed+ ? t("apikeys_view.managed_retry")+ : t("apikeys_view.managed_check_cta")}+ </Button>+ )}++ {!status.ready && !running && preflight && !preflight.ok && (+ <div className="space-y-1 text-xs">+ <p className="text-amber-500">{preflight.blocker}</p>+ <ul className="list-disc space-y-0.5 pl-4 text-muted-foreground">+ {preflight.actions.map((action) => (+ <li key={action}>{action}</li>+ ))}+ </ul>+ </div>+ )}++ {!status.ready && !running && preflight?.ok && preflight.tier && (+ <div className="space-y-2 text-xs">+ <div className="space-y-0.5 text-muted-foreground">+ <p>+ {preflight.tier.label} · {t("apikeys_view.managed_download_size")}{" "}+ ~{preflight.tier.download_gb} GB ·{" "}+ {t("apikeys_view.managed_latency")}{" "}+ {preflight.tier.expected_latency}+ </p>+ <p>{preflight.stack_sentence}</p>+ {preflight.brain && <p>{preflight.brain.note}</p>}+ </div>+ <Button size="sm" onClick={startInstall} className="gap-2">+ <Download className="h-3.5 w-3.5" />+ {t("apikeys_view.managed_install_cta")}+ </Button>+ </div>+ )}++ {status.ready && !running && (+ <Button+ size="sm"+ variant="ghost"+ onClick={remove}+ className="gap-2 text-destructive hover:text-destructive"+ >+ <XCircle className="h-3.5 w-3.5" />+ {confirmRemove+ ? t("apikeys_view.managed_uninstall_confirm")+ : t("apikeys_view.managed_uninstall")}+ </Button>+ )}++ {error && <p className="text-[11px] text-destructive">{error}</p>}+ </div>+ );+}+/*** The download half of a keyless local brain card: which models this machine* could run, which it already has, and the one button that fetches one.@@ -1988,6 +2183,7 @@ export function AuthWidget({</div>)}<LocalRuntimePanel descriptor={descriptor} onChanged={onChanged} />+ <ManagedServerPanel descriptor={descriptor} onChanged={onChanged} />{descriptor.supports_base_url && (<BaseUrlField descriptor={descriptor} onChanged={onChanged} />)}diff --git a/jarvis/ui/web/frontend/src/hooks/useProviders.ts b/jarvis/ui/web/frontend/src/hooks/useProviders.tsindex 41fb65da2d..6d3aa56191 100644--- a/jarvis/ui/web/frontend/src/hooks/useProviders.ts+++ b/jarvis/ui/web/frontend/src/hooks/useProviders.ts@@ -133,6 +133,12 @@ export interface ProviderDescriptor {* missing so the card can offer the right next step. null on cloud cards.*/local_runtime?: LocalRuntimeStatus | null;+ /**+ * Self-hosted realtime card only: fail-closed state of the one-click+ * managed server install. `sentence` is the server's own wording and is+ * rendered verbatim — the client never guesses readiness. null elsewhere.+ */+ managed_server?: ManagedServerStatus | null;/** Local/self-hosted cards: whether the card exposes an editable server URL* (persisted via PUT /api/providers/{id}/base-url). */supports_base_url?: boolean;@@ -810,6 +816,81 @@ export async function localInstallStatus(return body as LocalInstallProgress;}+/** Fail-closed readiness of the managed local realtime server. */+export interface ManagedServerStatus {+ ready: boolean;+ components: Record<string, boolean>;+ sentence: string;+}++/** Honest go/no-go report for the one-click managed install. */+export interface ManagedPreflight {+ ok: boolean;+ blocker: string;+ actions: string[];+ usable_gb: number;+ memory_source: string;+ disk_free_gb: number;+ tier: {+ key: string;+ label: string;+ measured: boolean;+ target_class: string;+ download_gb: number;+ expected_latency: string;+ } | null;+ stack_sentence: string;+ brain: { kind: string; model: string; note: string } | null;+}++/** Poll-shaped progress of the managed install engine. */+export interface ManagedInstallProgress {+ phase: string;+ percent: number;+ detail: string;+ error: string;+ running: boolean;+ log_tail: string[];+ started?: boolean;+ message?: string;+}++export async function managedServerPreflight(): Promise<ManagedPreflight> {+ const res = await fetch("/api/providers/local-realtime/managed-server/preflight");+ const body = await res.json().catch(() => ({}));+ if (!res.ok) throw new Error(body.detail ?? `HTTP ${res.status}`);+ return body as ManagedPreflight;+}++export async function managedServerInstall(): Promise<ManagedInstallProgress> {+ const res = await fetch("/api/providers/local-realtime/managed-server/install", {+ method: "POST",+ });+ const body = await res.json().catch(() => ({}));+ if (!res.ok) throw new Error(body.detail ?? `HTTP ${res.status}`);+ return body as ManagedInstallProgress;+}++export async function managedServerStatus(): Promise<{+ progress: ManagedInstallProgress;+ server: ManagedServerStatus;+}> {+ const res = await fetch("/api/providers/local-realtime/managed-server/status");+ const body = await res.json().catch(() => ({}));+ if (!res.ok) throw new Error(body.detail ?? `HTTP ${res.status}`);+ return body as { progress: ManagedInstallProgress; server: ManagedServerStatus };+}++export async function managedServerUninstall(): Promise<void> {+ const res = await fetch("/api/providers/local-realtime/managed-server", {+ method: "DELETE",+ });+ if (!res.ok) {+ const body = await res.json().catch(() => ({}));+ throw new Error(body.detail ?? `HTTP ${res.status}`);+ }+}+/** One curated model a local server can download, annotated for THIS machine. */export interface PullableModel {id: string;diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex f0b73e34af..53d88f31fe 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -1141,6 +1141,14 @@"local_installing": "Wird installiert …","local_install_retry": "Erneut versuchen","local_install_hint": "Dabei werden einige Gigabyte geladen, das kann mehrere Minuten dauern. Du kannst die App währenddessen weiter benutzen.",+ "managed_check_cta": "Gerät prüfen & installieren",+ "managed_install_cta": "Jetzt installieren",+ "managed_retry": "Installation erneut versuchen",+ "managed_hint": "Die erste Installation lädt mehrere Gigabyte (Pakete + Sprachmodelle) und kann eine Weile dauern. Du kannst die App währenddessen weiter benutzen.",+ "managed_download_size": "Download",+ "managed_latency": "Erwartete Antwortlatenz",+ "managed_uninstall": "Lokalen Server entfernen",+ "managed_uninstall_confirm": "Zum Bestätigen erneut klicken","shared_delete_prefix": "Dieser Schlüssel wird auch verwendet von:","shared_delete_suffix": "Beim Löschen werden auch diese Provider deaktiviert.","delete_anyway": "Trotzdem löschen",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex 8b51cb195c..2ffe38a6d5 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -1141,6 +1141,14 @@"local_installing": "Installing…","local_install_retry": "Try again","local_install_hint": "This downloads a few gigabytes and can take several minutes. You can keep using the app meanwhile.",+ "managed_check_cta": "Check this machine & install",+ "managed_install_cta": "Install now",+ "managed_retry": "Retry install",+ "managed_hint": "The first install downloads several gigabytes (packages + voice models) and can take a while. You can keep using the app meanwhile.",+ "managed_download_size": "Download",+ "managed_latency": "Expected answer latency",+ "managed_uninstall": "Remove local server",+ "managed_uninstall_confirm": "Click again to confirm removal","shared_delete_prefix": "This key is also used by:","shared_delete_suffix": "Deleting it disables those providers too.","delete_anyway": "Delete anyway",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex b9a7df6ce4..3678b445f7 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -1141,6 +1141,14 @@"local_installing": "Instalando…","local_install_retry": "Reintentar","local_install_hint": "Esto descarga varios gigabytes y puede tardar varios minutos. Mientras tanto puedes seguir usando la aplicación.",+ "managed_check_cta": "Comprobar este equipo e instalar",+ "managed_install_cta": "Instalar ahora",+ "managed_retry": "Reintentar la instalación",+ "managed_hint": "La primera instalación descarga varios gigabytes (paquetes + modelos de voz) y puede tardar un rato. Mientras tanto puedes seguir usando la aplicación.",+ "managed_download_size": "Descarga",+ "managed_latency": "Latencia de respuesta esperada",+ "managed_uninstall": "Quitar el servidor local",+ "managed_uninstall_confirm": "Haz clic de nuevo para confirmar","shared_delete_prefix": "Esta clave también la usan:","shared_delete_suffix": "Al eliminarla, esos proveedores también se desactivan.","delete_anyway": "Eliminar de todos modos",