From e448db2c341436603e68ad725f2fa03317e0eddf Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 20 May 2026 14:24:05 +0200 Subject: [PATCH 1/2] harness: add /screen page and /screen/ws WebSocket VNC relay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reads /etc/hyperhive/gui.json at startup to get the VNC port written by the weston-vnc ExecStart script (issue #50). Adds: - gui_vnc_port: Option on AppState - gui_enabled: bool on StateSnapshot (for issue #52 screen link) - GET /screen: serves a minimal RFB-over-WebSocket viewer (screen.html) - GET /screen/ws: upgrades to WebSocket and byte-pumps to 127.0.0.1: The relay is a pure two-task byte pump (WS→TCP and TCP→WS), transparent to any RFB variant including VeNCrypt. Returns 404 when gui is not enabled. screen.html is a self-contained RFB client: handshake, FramebufferUpdate (Raw encoding), pointer and keyboard forwarding — enough to display the desktop and interact with it. noVNC assets (issue #52) replace this. Closes #51 From 42437f9c6aaf64330440f237481b32d0267eaa08 Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 20 May 2026 14:26:23 +0200 Subject: [PATCH 2/2] =?UTF-8?q?agent=20UI:=20show=20=F0=9F=96=A5=20screen?= =?UTF-8?q?=20link=20when=20gui=5Fenabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit index.html: add hidden #screen-link anchor (/screen, new tab). app.js: reveal it in refreshState() when api/state returns gui_enabled=true. gui_enabled is set by the harness when /etc/hyperhive/gui.json exists (written by the weston VNC service from issue #50). The link opens the RFB viewer from issue #51 in a new tab. Closes #52 --- hive-ag3nt/assets/app.js | 3 +++ hive-ag3nt/assets/index.html | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hive-ag3nt/assets/app.js b/hive-ag3nt/assets/app.js index 7cd9792..65a4d4f 100644 --- a/hive-ag3nt/assets/app.js +++ b/hive-ag3nt/assets/app.js @@ -670,6 +670,9 @@ const s = await resp.json(); if (!headerSet) { setHeader(s.label, s.dashboard_port); headerSet = true; } currentLabel = s.label; + // Show the screen link when the weston VNC compositor is enabled. + const screenLink = $('screen-link'); + if (screenLink) screenLink.style.display = s.gui_enabled ? '' : 'none'; renderTermInput(s.label, s.status === 'online'); renderInbox(s.inbox || []); // Authoritative state comes from the harness via /api/state. diff --git a/hive-ag3nt/assets/index.html b/hive-ag3nt/assets/index.html index 368eccd..9e72be2 100644 --- a/hive-ag3nt/assets/index.html +++ b/hive-ag3nt/assets/index.html @@ -8,7 +8,11 @@

◆ … ◆

-

📊 stats →

+

+ 📊 stats → + +

loading…