Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(cli): report restart supervisor status

cyh3583886da094
diff --git a/tests/test_vibe_cli.py b/tests/test_vibe_cli.py
index 165ad072c..10fcd1abc 100644
--- a/tests/test_vibe_cli.py
+++ b/tests/test_vibe_cli.py
@@ -31,6 +31,28 @@ def test_status_written(tmp_path, monkeypatch):
assert payload["detail"] == "pid=123"
+def test_render_status_includes_restart_status(tmp_path, monkeypatch):
+ monkeypatch.setattr(paths, "get_vibe_remote_dir", lambda: tmp_path / ".vibe_remote")
+ runtime.ensure_dirs()
+ runtime.write_status("running", detail="pid=123")
+ runtime.write_json(
+ runtime.get_restart_status_path(),
+ {
+ "ok": False,
+ "state": "failed",
+ "job_id": "job-1",
+ "error": "start command timed out after 30 seconds",
+ },
+ )
+
+ payload = json.loads(cli._render_status())
+
+ assert payload["restart"]["ok"] is False
+ assert payload["restart"]["state"] == "failed"
+ assert payload["restart"]["job_id"] == "job-1"
+ assert payload["restart"]["error"] == "start command timed out after 30 seconds"
+
+
def test_stop_process_handles_missing_pid(tmp_path, monkeypatch):
monkeypatch.setattr(paths, "get_vibe_remote_dir", lambda: tmp_path / ".vibe_remote")
runtime.ensure_dirs()
diff --git a/vibe/cli.py b/vibe/cli.py
index 6e94cf1c1..5d64be419 100644
--- a/vibe/cli.py
+++ b/vibe/cli.py
@@ -639,6 +639,9 @@ def _render_status():
running = bool(pid and pid.isdigit() and _pid_alive(int(pid)))
status["running"] = running
status["pid"] = int(pid) if pid and pid.isdigit() else None
+ restart_status = _read_json(runtime.get_restart_status_path())
+ if restart_status:
+ status["restart"] = restart_status
return json.dumps(status, indent=2)