feat: add agent relay bridge plugin
Merged
KH
3mo ago+1333+1333+0123456789012345678901234567890123456789-0-0-0123456789
Summary
- add an optional Node 22 Herdr pane plugin backed by
@agent-relay/sdk - forward status transitions only for explicitly configured Herdr workspaces to an existing Relay channel
- expose a read-only
herdr.session_summaryaction with strict input/output schemas - reconnect through a private persisted token, serialize state writes, retry failed delivery safely, and prevent duplicate bridge processes
- keep pane output, cwd, environment, titles, prompts, shell input, and raw socket controls outside the integration boundary
- test the plugin on Linux, macOS, and Windows with full-SHA-pinned Actions
Validation
mise x node@22 -- node --test— 9/9 passednpm audit --omit=dev --audit-level=high— 0 vulnerabilities- syntax checks for all plugin modules — passed
actionlint .github/workflows/agent-relay-plugin.yml— passedgit diff --check— passed- isolated public install from
AgentWorkforce/herdr/plugins/agent-relay --ref feat/agent-relay-sdk— passed atb033ea3 - hosted core checks on Ubuntu, macOS, and Windows — passed
Scope and workflow
The stable root docs/changelog are intentionally unchanged; setup and security documentation is plugin-local. The implementation was built by a Fleet team on finn-mini, transferred with checksums over Agent Relay, and independently reviewed across Fleet nodes without SSH.
Summary by cubic
Adds the optional agent-relay.herdr-bridge plugin to forward selected Herdr agent status updates to Agent Relay and provide a read-only herdr.session_summary action. Improves restart reliability and hardens runtime/tests; core behavior is unchanged.
-
New Features
- Node 22 sidecar using
@agent-relay/sdkforwardspane.agent_status_changedfor allowlistedworkspaceIdsto the configuredchannel, and registersherdr.session_summarywith strict input/output schemas. - Simple config via
agent-relay.json(workspaceKey, HTTPSbaseUrlwith loopback exception,#channel, uniqueworkspaceIds); includes plugin manifest, README, and a CI workflow running tests on Linux/macOS/Windows.
- Node 22 sidecar using
-
Safety and Reliability
- Avoids lifecycle replay loops by rebuilding per-pane subscriptions from
session.snapshot; auto-resubscribes on socket drop; supports Windows named pipe sockets. - Persists and reuses the Relay agent token; prevents duplicate bridge processes with a state lock and secure file permissions; releases the lock early for fast restarts and cleans up stale/stuck locks.
- Idempotent, deduped transitions per pane with rollback on delivery failure; serialized state writes; keeps pane output, cwd, environment, titles, prompts, shell input, and raw socket controls outside the integration boundary.
- Scopes the lifecycle-replay test fixture to its specific test to avoid cross-test replays.
- Avoids lifecycle replay loops by rebuilding per-pane subscriptions from