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(computers): a Claude token login and Mac-ready setup in the UI
rubenluetke10-beep49bca533dbb8
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/computers/de.json b/jarvis/ui/web/frontend/src/i18n/locales/computers/de.jsonindex 3482045904..9bdab19fb6 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/computers/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/computers/de.json@@ -182,6 +182,12 @@"ready_needs_root": "Braucht root oder sudo für diesen Login.","ready_body_windows": "IDE-Sitzungen und Agenten auf diesem Windows-Computer brauchen Git for Windows und eine angemeldete Coding-CLI. Dort stoppen sie, wenn dieser PC die Verbindung trennt.","ready_needs_admin": "Braucht einen Administrator-Login auf diesem Computer.",+ "ready_too_old": "Zu alt ({version}); braucht 18 oder neuer",+ "ready_token_button": "Token verwenden",+ "ready_token_hint": "Führe claude setup-token auf einem beliebigen Computer aus, melde dich im Browser an und füge die ausgegebene Zeile hier ein. Nötig auf einem Mac: Sein Schlüsselbund bleibt gesperrt, während Agenten über SSH arbeiten. Der Token wird nur auf diesem Computer gespeichert.",+ "ready_token_placeholder": "Claude-Token",+ "ready_token_save": "Speichern",+ "ready_token_saved": "Claude Code ist dort jetzt für die Agenten angemeldet.","ready_installing": "Wird auf dem Server installiert…","ready_install_done": "Installiert.","ready_install_failed": "Die Installation ist fehlgeschlagen.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/computers/en.json b/jarvis/ui/web/frontend/src/i18n/locales/computers/en.jsonindex 9ced0d0c49..879185dbe7 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/computers/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/computers/en.json@@ -182,6 +182,12 @@"ready_needs_root": "Needs root or sudo on this login.","ready_body_windows": "IDE sessions and agents that run on this Windows computer need Git for Windows and a logged-in coding CLI. There they stop when this PC disconnects.","ready_needs_admin": "Needs an administrator login on this computer.",+ "ready_too_old": "Too old ({version}); needs 18 or newer",+ "ready_token_button": "Use a token",+ "ready_token_hint": "Run claude setup-token on any computer, sign in in the browser and paste the line it prints. Needed on a Mac: its Keychain stays locked while agents work over SSH. The token is saved only on that computer.",+ "ready_token_placeholder": "Claude token",+ "ready_token_save": "Save",+ "ready_token_saved": "Claude Code is now logged in for the agents there.","ready_installing": "Installing on the server…","ready_install_done": "Installed.","ready_install_failed": "The installation failed.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/computers/es.json b/jarvis/ui/web/frontend/src/i18n/locales/computers/es.jsonindex 7b310a6dfb..6faa32003e 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/computers/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/computers/es.json@@ -182,6 +182,12 @@"ready_needs_root": "Necesita root o sudo en este usuario.","ready_body_windows": "Las sesiones del IDE y los agentes en este ordenador Windows necesitan Git for Windows y una CLI de código con sesión iniciada. Allí se detienen cuando este PC se desconecta.","ready_needs_admin": "Necesita un usuario administrador en este ordenador.",+ "ready_too_old": "Demasiado antiguo ({version}); necesita 18 o posterior",+ "ready_token_button": "Usar un token",+ "ready_token_hint": "Ejecuta claude setup-token en cualquier ordenador, inicia sesión en el navegador y pega la línea que muestra. Necesario en un Mac: su llavero sigue bloqueado mientras los agentes trabajan por SSH. El token solo se guarda en ese ordenador.",+ "ready_token_placeholder": "Token de Claude",+ "ready_token_save": "Guardar",+ "ready_token_saved": "Claude Code ya tiene sesión iniciada para los agentes allí.","ready_installing": "Instalando en el servidor…","ready_install_done": "Instalado.","ready_install_failed": "La instalación ha fallado.",diff --git a/jarvis/ui/web/frontend/src/lib/computersApi.ts b/jarvis/ui/web/frontend/src/lib/computersApi.tsindex f785c18f39..8e0065db4e 100644--- a/jarvis/ui/web/frontend/src/lib/computersApi.ts+++ b/jarvis/ui/web/frontend/src/lib/computersApi.ts@@ -309,6 +309,8 @@ export interface ToolState {id: ToolId;installed: boolean;version: string | null;+ /** Installed but too old to use (Node.js below 18); counts as missing. */+ outdated?: boolean;}export interface InstallJob {@@ -330,6 +332,8 @@ export interface Readiness {os: string | null;ready: boolean;checked_at: number;+ arch?: string | null;+ fetch?: string | null;install: InstallJob | null;}@@ -341,4 +345,7 @@ export const readinessApi = {request<{ install: InstallJob | null }>(`/${encodeURIComponent(id)}/install`).then((r) => r.install),copyLogin: (id: string, agent: "claude" | "codex") =>request<{ copied: string }>(`/${encodeURIComponent(id)}/copy-login`, post({ agent })),+ /** Log Claude Code in for the agents there with a `claude setup-token` token. */+ saveClaudeToken: (id: string, token: string) =>+ request<{ saved: string }>(`/${encodeURIComponent(id)}/claude-token`, post({ token })),};diff --git a/jarvis/ui/web/frontend/src/views/computers/AgentReadiness.tsx b/jarvis/ui/web/frontend/src/views/computers/AgentReadiness.tsxindex 7e14fa5adf..8cc39bcba5 100644--- a/jarvis/ui/web/frontend/src/views/computers/AgentReadiness.tsx+++ b/jarvis/ui/web/frontend/src/views/computers/AgentReadiness.tsx@@ -5,16 +5,19 @@** Nothing is installed unasked: the install button names exactly what it* installs, runs as a job on the server and streams its log here. Copying- * this computer's CLI login to the server is its own explicit button.+ * this computer's CLI login to the server is its own explicit button, and so+ * is a Claude token — the login that works over SSH on a Mac, whose Keychain+ * is locked there.*/import { useEffect, useMemo, useState } from "react";import { useQuery, useQueryClient } from "@tanstack/react-query";-import { Bot, Check, Download, KeyRound, Loader2, RefreshCw, X } from "lucide-react";+import { Bot, Check, Download, KeyRound, Loader2, RefreshCw, Ticket, X } from "lucide-react";import { Panel } from "@/components/extensions/primitives";import { Button } from "@/components/ui/button";import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { readinessApi, type Computer, type InstallJob, type ToolId } from "@/lib/computersApi";+import { inputClass } from "./parts";const TOOL_LABELS: Record<ToolId, string> = {tmux: "tmux",@@ -44,6 +47,8 @@ export function AgentReadiness({ computer }: { computer: Computer }) {const [busy, setBusy] = useState<string | null>(null);const [error, setError] = useState<string | null>(null);const [notice, setNotice] = useState<string | null>(null);+ const [tokenOpen, setTokenOpen] = useState(false);+ const [token, setToken] = useState("");useEffect(() => {if (readiness.data?.install) setJob(readiness.data.install);@@ -94,9 +99,30 @@ export function AgentReadiness({ computer }: { computer: Computer }) {}}+ async function saveToken() {+ setBusy("token");+ setError(null);+ setNotice(null);+ try {+ await readinessApi.saveClaudeToken(computer.id, token.trim());+ setToken("");+ setTokenOpen(false);+ setNotice(t("computers.ready_token_saved"));+ await qc.invalidateQueries({ queryKey: key });+ } catch (e) {+ setError(errorText(e));+ } finally {+ setBusy(null);+ }+ }+const data = readiness.data;// A Windows computer needs Git for Windows instead of tmux, and an admin, not root.const windows = data?.os === "Windows" || computer.facts?.os_id === "windows";+ // Homebrew needs no root; only a Linux package manager does.+ const needsRoot =+ !!data && !data.root && !data.sudo && data.package_manager !== "brew" &&+ missing.some((id) => (windows ? id === "git" || id === "node" : id === "tmux" || id === "git"));return (<div data-testid="computer-readiness"><Panel className="p-5">@@ -151,7 +177,9 @@ export function AgentReadiness({ computer }: { computer: Computer }) {<span className="min-w-0 flex-1"><span className="block text-sm font-medium text-foreground-strong">{TOOL_LABELS[tool.id]}</span><span className="block truncate text-xs text-muted-foreground">- {!tool.installed+ {tool.outdated+ ? t("computers.ready_too_old").replace("{version}", tool.version ?? "")+ : !tool.installed? t("computers.ready_missing"): !loggedIn? t("computers.ready_not_logged_in")@@ -171,11 +199,54 @@ export function AgentReadiness({ computer }: { computer: Computer }) {{t("computers.ready_copy_login")}</Button>)}+ {tool.id === "claude" && loginNeeded && !loggedIn && (+ <Button+ type="button"+ variant="ghost"+ size="sm"+ disabled={busy !== null}+ aria-expanded={tokenOpen}+ onClick={() => setTokenOpen((open) => !open)}+ data-testid="readiness-token-toggle"+ >+ <Ticket />+ {t("computers.ready_token_button")}+ </Button>+ )}</li>);})}</ul>+ {tokenOpen && (+ <form+ className="mt-4 rounded-lg border border-border p-3"+ onSubmit={(event) => {+ event.preventDefault();+ void saveToken();+ }}+ >+ <p className="mb-2 text-xs text-muted-foreground">{t("computers.ready_token_hint")}</p>+ <div className="flex gap-2">+ <input+ type="password"+ className={cn(inputClass, "h-9 min-w-0 flex-1 font-mono text-xs")}+ value={token}+ onChange={(event) => setToken(event.target.value)}+ placeholder={t("computers.ready_token_placeholder")}+ aria-label={t("computers.ready_token_placeholder")}+ autoComplete="off"+ spellCheck={false}+ data-testid="readiness-token-input"+ />+ <Button type="submit" size="sm" disabled={busy !== null || token.trim().length < 20}>+ {busy === "token" ? <Loader2 className="animate-spin" /> : <Check />}+ {t("computers.ready_token_save")}+ </Button>+ </div>+ </form>+ )}+{missing.length > 0 && job?.state !== "running" && (<div className="mt-4 flex flex-wrap items-center gap-3"><Button type="button" disabled={busy !== null} onClick={() => void install()} data-testid="readiness-install">@@ -185,7 +256,7 @@ export function AgentReadiness({ computer }: { computer: Computer }) {missing.map((id) => TOOL_LABELS[id]).join(", "),)}</Button>- {!data.root && !data.sudo && (+ {needsRoot && (<span className="text-xs text-muted-foreground">{t(windows ? "computers.ready_needs_admin" : "computers.ready_needs_root")}</span>diff --git a/jarvis/ui/web/frontend/src/views/computers/connection.test.ts b/jarvis/ui/web/frontend/src/views/computers/connection.test.tsindex c525847441..69f93e3901 100644--- a/jarvis/ui/web/frontend/src/views/computers/connection.test.ts+++ b/jarvis/ui/web/frontend/src/views/computers/connection.test.ts@@ -59,6 +59,11 @@ describe("setupPrompt", () => {expect(prompt).toContain("*S-1-5-32-544:F");expect(prompt).not.toContain('"Administrators:F"');expect(prompt).toContain("Git for Windows");+ // A Mac: awake for its agents, Homebrew tools, and a token login (Keychain is locked over SSH).+ expect(prompt).toContain("pmset -a sleep 0");+ expect(prompt).toContain("brew install tmux git");+ expect(prompt).toContain("CLAUDE_CODE_OAUTH_TOKEN");+ expect(prompt).toContain("~/.config/jarvis/agent.env");expect(prompt).not.toContain("BEGIN OPENSSH PRIVATE KEY");expect(prompt.trim().endsWith(`${CONNECT_MARKER} <account>@<address>:<port>`)).toBe(true);});diff --git a/jarvis/ui/web/frontend/src/views/computers/connection.ts b/jarvis/ui/web/frontend/src/views/computers/connection.tsindex 6dba3ef879..3bb7e0f2ed 100644--- a/jarvis/ui/web/frontend/src/views/computers/connection.ts+++ b/jarvis/ui/web/frontend/src/views/computers/connection.ts@@ -135,7 +135,7 @@ export function setupPrompt(assistantName: string, publicKey: string): string {1. Make sure an OpenSSH SERVER is installed, running, starts automatically, and is allowed through the firewall on TCP port 22.- Linux: install openssh-server with the package manager, then enable and start the ssh/sshd service.- - macOS: turn on System Settings > General > Sharing > Remote Login.+ - macOS: turn on System Settings > General > Sharing > Remote Login. Agents keep working only while the Mac is awake: run sudo pmset -a sleep 0 disksleep 0 autorestart 1 (no sleep, restart after a power cut).- Windows: Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0, Start-Service sshd, Set-Service sshd -StartupType Automatic, and allow TCP 22 in Windows Defender Firewall.2. Authorize exactly this PUBLIC key for the account I normally use on this computer. Do not create, copy or print any private key.@@ -143,7 +143,10 @@ export function setupPrompt(assistantName: string, publicKey: string): string {- Linux/macOS: append it to ~/.ssh/authorized_keys of that account (folder mode 700, file mode 600, owned by that account).- Windows: if the account is in the Administrators group, append it to C:\\ProgramData\\ssh\\administrators_authorized_keys (UTF-8 without a byte-order mark) and run: icacls C:\\ProgramData\\ssh\\administrators_authorized_keys /inheritance:r /grant "*S-1-5-32-544:F" /grant "*S-1-5-18:F" (the group SIDs work in every Windows language). Otherwise append it to C:\\Users\\<account>\\.ssh\\authorized_keys.-3. Coding agents will run here later. On Linux or macOS, install tmux and git if they are missing. On Windows, install Git for Windows if it is missing (winget install --id Git.Git -e); the agents use its Git Bash.+3. Coding agents will run here later.+ - Linux: install tmux and git if they are missing.+ - macOS: install Homebrew if it is missing (it also installs the command-line tools), then brew install tmux git. If Claude Code is installed here, run claude setup-token, let me approve it in the browser, and save the token it prints as the line export CLAUDE_CODE_OAUTH_TOKEN='<token>' in ~/.config/jarvis/agent.env (file mode 600): over SSH the Mac's Keychain stays locked, so agents log in with this file. Never print the token back to me.+ - Windows: install Git for Windows if it is missing (winget install --id Git.Git -e); the agents use its Git Bash.4. Work out the address another computer can use to reach this one: the local network IP if we are on the same network, otherwise the public IP. If a router port-forward would be needed, tell me in one sentence.