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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(agents): port master's new seams onto Vibey
cyhcad6c116fafc
diff --git a/core/handlers/model_hub/turn_gateway.py b/core/handlers/model_hub/turn_gateway.pyindex 25b7cc728..f37e2476a 100644--- a/core/handlers/model_hub/turn_gateway.py+++ b/core/handlers/model_hub/turn_gateway.py@@ -1040,6 +1040,10 @@ class ModelHubTurnGateway:terminalizer.engine_down(local_error_detail=exc.local_error_detail)elif turn_outcome is not None and turn_outcome.outcome == "no_candidate" and exc.supply_state is not None:terminalizer.mark_no_candidate(exc.supply_state, exc.blockers)+ elif turn_outcome is REQUEST_NONFALLBACK_TURN_OUTCOME:+ # The resolver's local refusal (every Google hop skipped before+ # admission) is classified like this gateway's own refusals above.+ terminalizer.fail("protocol_error")if exc.code == RECOVERY_EXHAUSTED_CODE:self._commit_and_render_turn_outcome(execution, terminalizer, turn_outcome)# Native compatibility is keyed by the caller backend. Keep itsdiff --git a/core/services/running_agents.py b/core/services/running_agents.pyindex fb2a63044..d8f7fb18d 100644--- a/core/services/running_agents.py+++ b/core/services/running_agents.py@@ -293,6 +293,28 @@ def _collect_opencode(controller: "Controller") -> list[dict[str, Any]]:return rows+def _collect_vibey(controller: "Controller") -> list[dict[str, Any]]:+ rows: list[dict[str, Any]] = []+ agent = _get_agent(controller, "vibey")+ if agent is None:+ return rows+ # Vibey runs in process, so no pid. A Session's runtime holds its Turn's run+ # until the run settles; like OpenCode, Vibey only ever surfaces as ``active``.+ for _session_id, runtime in _safe_items(getattr(agent, "_runtimes", {}) or {}):+ run = getattr(runtime, "run", None)+ if run is None or run.settled:+ continue+ rows.append(+ _make_row(+ backend="vibey",+ state="active",+ base_session_id=run.request.base_session_id,+ workdir=run.cwd or None,+ )+ )+ return rows++def _collect_orphans(seen_native: dict[str, Optional[int]], seen_pids: set[int]) -> list[dict[str, Any]]:rows: list[dict[str, Any]] = []try:@@ -1354,7 +1376,7 @@ def snapshot_running_agents(native_session_id, model, elapsed_seconds, trigger_source,session_id, agent_name, openable_in_chat }, ... ],"counts": { "total", "active", "idle", "orphan",- "by_backend": {claude, codex, opencode} },+ "by_backend": {claude, codex, opencode, vibey} },}One row per live SESSION (F1): a Codex pid shared by several sessions yields@@ -1371,6 +1393,7 @@ def snapshot_running_agents(rows.extend(_collect_claude(controller, now, seen_native, seen_pids))rows.extend(_collect_codex(controller))rows.extend(_collect_opencode(controller))+ rows.extend(_collect_vibey(controller))rows.extend(_collect_orphans(seen_native, seen_pids))_enrich_from_db(rows)diff --git a/modules/agents/vibey/agent.py b/modules/agents/vibey/agent.pyindex c4aacbaa3..59f7eb51b 100644--- a/modules/agents/vibey/agent.py+++ b/modules/agents/vibey/agent.py@@ -981,6 +981,8 @@ class VibeyAgent(BaseAgent):return build_system_prompt_injection(agent_instructions=request.vibe_agent_system_prompt or "",backend=BACKEND,+ # Vibey runs no MCP client, so the desktop's Computer Use server is never one of its tools.+ include_computer_use=False,include_quick_replies=getattr(self.config, "reply_enhancements", True)and context.platform != "wechat",context=context,diff --git a/tests/test_vibey_agent.py b/tests/test_vibey_agent.pyindex ce2731651..ac1c26351 100644--- a/tests/test_vibey_agent.py+++ b/tests/test_vibey_agent.py@@ -541,6 +541,36 @@ async def test_a_setup_failure_after_the_route_resolved_fails_the_turn_and_not_tassert harness.controller.terminals[-1]["is_error"] is True+async def test_a_turn_in_flight_is_a_working_agent_in_the_running_agents_snapshot(+ engine, session, tmp_path, published+) -> None:+ from core.services.running_agents import snapshot_running_agents++ started, release = asyncio.Event(), asyncio.Event()++ async def slow(arguments, ctx):+ started.set()+ await release.wait()+ return ToolResult((text("a.py"),))++ harness = _Harness(engine, tmp_path, "avibe", _tool_turn(), tools=[FakeTool("echo", execute=slow)])+ controller = SimpleNamespace(agent_service=SimpleNamespace(agents={"vibey": harness.agent}))+ running = asyncio.create_task(harness.agent.handle_message(harness.request("list files")))+ await started.wait()++ # The desktop pet and the Agents page read this snapshot for "an agent is working".+ working = [+ (row["backend"], row["session_id"], row["visibility"])+ for row in snapshot_running_agents(controller)["agents"]+ if row["state"] == "active"+ ]+ assert working == [("vibey", SESSION, "foreground")]++ release.set()+ await running+ assert snapshot_running_agents(controller)["agents"] == []++async def test_committed_rows_keep_the_agent_that_ran_the_turn(engine, session, tmp_path, published) -> None:started, release = asyncio.Event(), asyncio.Event()@@ -1471,6 +1501,20 @@ async def test_the_system_prompt_lists_every_tool_the_run_offers(engine, sessionassert "- Only your final reply is reliably shown to the user; put anything the user must see in it" in system+async def test_the_system_prompt_offers_no_computer_use_it_cannot_call(+ engine, session, tmp_path, published, monkeypatch+) -> None:+ import core.computer_use as computer_use++ # The desktop has Computer Use on: the MCP backends get the avibe_computer server, Vibey has no MCP client.+ monkeypatch.setattr(computer_use, "managed_mcp_server_spec", lambda **_kwargs: object())+ harness = _Harness(engine, tmp_path, "avibe", [[Done(assistant("ok"))]])++ await harness.agent.handle_message(harness.request("click the Save button in Preview"))++ assert "avibe_computer" not in harness.provider.requests[0].system++async def test_an_idle_session_holds_no_adapter_state(engine, session, tmp_path, published) -> None:harness = _Harness(engine, tmp_path, "avibe", _tool_turn() + [[Done(assistant("again"))]])diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex 9926679fb..2f83fa405 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -5556,8 +5556,8 @@},"pet": {"state": {- "idle": "云团子空闲中",- "sleeping": "云团子睡着了",+ "idle": "歪比空闲中",+ "sleeping": "歪比睡着了","listening": "正在听","running": "正在处理…","ready": "有新回复",