feat: remote agent control (v1 up-lane)#6
Merged
Conversation
v1 up-lane remote agent control (Astation → Atem): - AstationMessage.agentInput(agentId:kind:text:key:) with encode/decode matching the wire contract (atem_id stays in the relay envelope; the payload carries agentId + kind + text/key, nil fields omitted). - HubManager.sendAgentText / sendAgentKey mirror sendVoiceCommand, routing through routeToFocusedAtem() + sendHandler. - RemoteControlWindowController: text field + Send and a key bar (Enter/Esc/Ctrl-C/↑/↓/y/n). Menu item "🎮 Remote Agent Control". - Voice reuses the existing PTT/hands-free path (unchanged). Also fix a stale RTCJoinOptions test that still expected aes256Gcm2 after the encryption default changed to .none. 🤖 Built with SMT <smt@agora.build>
Cover HubManager.sendAgentText / sendAgentKey: routes to the connected Atem, emits the correct agentInput payload (text vs key), honors an explicit agentId, drops when no Atem is connected, and prefers the pinned client. 124 Swift tests pass (was 119). 🤖 Built with SMT <smt@agora.build>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Astation side of Remote Agent Control v1 per
docs/specs/2026-05-28-remote-agent-control-design.md. Astation acts as a remote control that sends text and control keys to the focused Atem's agent over the existing channel (direct or relay). Voice reuses the existing PTT/hands-free path unchanged.What's new
AstationMessage.agentInput(agentId:kind:text:key:)— new message case with encode/decode. Matches the wire contract:atem_idstays in the relay envelope; the payload carriesagentId+kind+text/key, with nil fields omitted.HubManager.sendAgentText/sendAgentKey— mirrorsendVoiceCommand, route throughrouteToFocusedAtem()+sendHandler.RemoteControlWindowController— panel with a text field + Send and a key bar (Enter / Esc / Ctrl-C / ↑ / ↓ / y / n). Shows the target Atem; warns when none connected.Wire contract
{ "atem_id": "<host>", "payload": { "type": "agentInput", "data": { "agentId": null, "kind": "text"|"key", "text": "...", "key": "enter|esc|ctrl-c|up|down|y|n" } }}Not in this PR
AstationMessage::AgentInput+ PTY write) — separate repo; not yet implemented there, so the round-trip acceptance test can't pass until the Atem counterpart lands.agentIdselection UI (v1 leaves it nil → Atem targets its focused/only agent).Test plan
swift buildsucceedsAgentInputMessageTests(5): text/key encode-decode, nil-field omission, round-tripAgentInputRoutingTests(5): routes to connected Atem, correct payload per kind, explicit agentId, drop-when-no-Atem, pinned-client preferenceAgentInputhandlerAlso fixes a stale
RTCJoinOptionstest that still expectedaes256Gcm2after the encryption default changed to.none.Generated with SMT smt@agora.build