The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(bot-screen): register the display.* events in the shared gateway contract; native dispatch test stubs the approver
teknium13fbd9cb093e3
diff --git a/apps/desktop/src/plugins/hermes-bots/screen-connection.test.ts b/apps/desktop/src/plugins/hermes-bots/screen-connection.test.tsindex f4f36759bf7..3894ada4112 100644--- a/apps/desktop/src/plugins/hermes-bots/screen-connection.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/screen-connection.test.ts@@ -28,8 +28,8 @@ describe('isEventForBotScreen', () => {it('ignores a same-profile-path event that arrived from another host', () => {routeMock.mockReturnValue({ connectionId: 'conn-a', profile: 'ops' })- const fromB = { connectionId: 'conn-b', payload: { profile_key: key }, type: 'display.lease' }- const fromA = { connectionId: 'conn-a', payload: { profile_key: key }, type: 'display.lease' }+ const fromB = { connectionId: 'conn-b', payload: { profile_key: key }, type: 'display.lease' as const }+ const fromA = { connectionId: 'conn-a', payload: { profile_key: key }, type: 'display.lease' as const }expect(isEventForBotScreen(bot, fromB, key)).toBe(false)expect(isEventForBotScreen(bot, fromA, key)).toBe(true)diff --git a/apps/shared/src/gateway-events.json b/apps/shared/src/gateway-events.jsonindex fe5088fe87f..9763c4746ac 100644--- a/apps/shared/src/gateway-events.json+++ b/apps/shared/src/gateway-events.json@@ -11,6 +11,12 @@"clarify.expire","clarify.request","cron.changed",+ "display.install.done",+ "display.install.log",+ "display.install.sudo.expire",+ "display.install.sudo.request",+ "display.lease",+ "display.status","error","gateway.ready","layout.apply",diff --git a/apps/shared/src/gateway-events.ts b/apps/shared/src/gateway-events.tsindex e6d26aed34c..b49e95ca904 100644--- a/apps/shared/src/gateway-events.ts+++ b/apps/shared/src/gateway-events.ts@@ -408,6 +408,12 @@ export const BACKEND_EVENT_NAMES = ['clarify.expire','clarify.request','cron.changed',+ 'display.install.done',+ 'display.install.log',+ 'display.install.sudo.expire',+ 'display.install.sudo.request',+ 'display.lease',+ 'display.status','error','gateway.ready','layout.apply',@@ -505,6 +511,15 @@ export interface BackendGatewayEventMap {'clarify.expire': RequestExpirePayload'clarify.request': ClarifyRequestPayload'cron.changed': Record<string, unknown>+ // Bot Screen (`tui_gateway/methods_display.py`, `methods_display_watch.py`). Payload shapes are+ // owned by the hermes-bots desktop plugin (`DisplayStatus` / `DisplayLease`); the contract only+ // pins the keys every consumer routes on.+ 'display.install.done': { code: number; profile_key: string; status: Record<string, unknown> }+ 'display.install.log': { line: string; profile_key: string }+ 'display.install.sudo.expire': RequestExpirePayload+ 'display.install.sudo.request': { profile_key: string; request_id: string }+ 'display.lease': { lease: Record<string, unknown>; profile_key: string }+ 'display.status': Record<string, unknown> & { profile_key: string }error: ErrorPayload'gateway.ready': GatewayReadyPayload'layout.apply': Record<string, unknown>diff --git a/tests/tools/test_computer_use_native_platform.py b/tests/tools/test_computer_use_native_platform.pyindex 4a018eb39fb..194e006b2f3 100644--- a/tests/tools/test_computer_use_native_platform.py+++ b/tests/tools/test_computer_use_native_platform.py@@ -12,6 +12,9 @@ from tools.computer_use import tooldef backend(monkeypatch):tool.reset_backend_for_tests()monkeypatch.setenv("HERMES_COMPUTER_USE_BACKEND", "noop")+ # Input actions are approval-gated; a CI runner has no approver, so the gate would block+ # before the dispatch this test is about. Same seam the capture-fence tests use.+ monkeypatch.setattr(tool, "_request_approval", lambda *a, **k: None)value = tool._get_backend()yield valuetool.reset_backend_for_tests()