feat: enhance daemon dispatching, device readiness fallback, and live streaming UI

- Admin Console & Task Queue: add cancellation, session startup progress endpoints, and support ingress metadata
- Diagnostics & Runtime: enhance ADB probe to prefer unlocked devices and synchronize with readiness engine
- MCP Server: dispatch tasks through Artemis Daemon scheduler with fallback to standalone runner, improve action overlays
- Showcase UI: improve session auto-selection with pinning support, render startup progress, and refine stream styling
- CLI & Makefile: expose server lifecycle commands (restart, stop, status)
- Configuration: ignore runtime server state file in .gitignore
This commit is contained in:
somew1nd committed 2026-08-26 17:41:23 -07:00
1 parent 57655266cc
commit 8fdecf23d7
33 files changed
+1315 -293

No files matched your search

@@ -74,3 +74,41 @@ async def test_run_task_enqueues_when_device_is_unlocked(monkeypatch):
assert result["status"] == "started"
enqueue_tasks.assert_awaited_once()
@pytest.mark.asyncio
async def test_run_task_switches_to_unlocked_device_and_syncs_engine(monkeypatch):
"""When default device is locked, run_task should enqueue on verified fallback and update engine."""
unlocked_probe = ProbeResult(
id="android_adb",
category=ProbeCategory.DEVICE,
title="Device / Emulator Connected",
status=ProbeStatus.PASS,
is_blocker=True,
summary="Connected",
description="Ready.",
metadata={
"installed": True,
"submission_probe": True,
"active_device": {"serial": "emulator-5556", "is_locked": False},
},
)
run_probe = AsyncMock(return_value=unlocked_probe)
enqueue_tasks = AsyncMock(return_value={"status": "started", "tasks": []})
monkeypatch.setattr(
tasks.readiness_engine, "run_device_submission_probe", run_probe
)
monkeypatch.setattr(tasks.task_queue_service, "enqueue_tasks", enqueue_tasks)
monkeypatch.setattr(tasks.readiness_engine, "get_active_device_serial", lambda: "device-locked-1")
set_active_mock = AsyncMock()
monkeypatch.setattr(tasks.readiness_engine, "set_active_device_serial", set_active_mock)
result = await tasks.run_task(RunRequest(goal="Run on any ready device"))
assert result["status"] == "started"
enqueue_tasks.assert_awaited_once()
# Check that device_serial passed to enqueue_tasks is the verified unlocked device
_, kwargs = enqueue_tasks.call_args
assert kwargs.get("device_serial") == "emulator-5556"
set_active_mock.assert_called_once_with("emulator-5556")