From 7fa8ae56cb242d2e9ba9310724aa811f4b31f949 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 18 Jan 2026 07:57:54 +0000 Subject: [PATCH] docs: add exec events to bridge protocol --- docs/gateway/bridge-protocol.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/gateway/bridge-protocol.md b/docs/gateway/bridge-protocol.md index ff5ad56a6..00bcf8f7b 100644 --- a/docs/gateway/bridge-protocol.md +++ b/docs/gateway/bridge-protocol.md @@ -47,7 +47,7 @@ When TLS is enabled, discovery TXT records include `bridgeTls=1` plus Client → Gateway: - `req` / `res`: scoped gateway RPC (chat, sessions, config, health, voicewake, skills.bins) -- `event`: node signals (voice transcript, agent request, chat subscribe) +- `event`: node signals (voice transcript, agent request, chat subscribe, exec lifecycle) Gateway → Client: - `invoke` / `invoke-res`: node commands (`canvas.*`, `camera.*`, `screen.record`, @@ -57,6 +57,18 @@ Gateway → Client: Exact allowlist is enforced in `src/gateway/server-bridge.ts`. +## Exec lifecycle events + +Nodes can emit `exec.started`, `exec.finished`, or `exec.denied` events to surface +system.run activity. These are mapped to system events in the gateway. + +Payload fields (all optional unless noted): +- `sessionKey` (required): agent session to receive the system event. +- `runId`: unique exec id for grouping. +- `command`: raw or formatted command string. +- `exitCode`, `timedOut`, `success`, `output`: completion details (finished only). +- `reason`: denial reason (denied only). + ## Tailnet usage - Bind the bridge to a tailnet IP: `bridge.bind: "tailnet"` in