Repository navigation
Mirror SWARM panel run read-only over the remote protocol - #382
Merged
Merged
Conversation
Adds protocol 1.10 with the swarm_activity capability and a request_swarm command. The desktop answers it with the run header, agent rows and a tail of one agent's output, using a token so unchanged output is not resent. The phone's agent choice never moves the desktop selection, and the phone cannot start or stop a run.
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
Adds protocol 1.10 with a
swarm_activitycapability and arequest_swarmclient frame. A remote client can now read what the desktop SWARM panel (Alt+w) shows: the run header, one row per agent, and one agent's output. The view is read-only; the phone cannot start or stop a run.Changes
gaviero-remote)PROTOCOL_VERSIONto 1.10.swarm_activitycapability.ClientFrame::RequestSwarm(RequestSwarm { agent_id?, output_token? }).protocol.schema.json, add therequest_swarm.jsonclient fixture, and document the frame inPROTOCOL.md(new "Swarm activity" section).tests/protocol.rsfrom 20 to 21.gaviero-tui)app/remote.rs: addswarm_snapshot, which builds therunheader, agent list, selected agent and output. It also addsoutput_tail, which caps output at the newest 64 KiB and cuts the oldest kept line on a char boundary.agent_idchoice never moves the desktop selection. An unknown or absent id falls back to the desktop's selected agent.output.tokenis<run_id>:<revision>. If the request echoes it, the reply carriesunchanged: trueand no lines.remote_setup.rs: advertiseswarm_activityinhello.capabilities.panels/swarm_dashboard.rs: makeAgentEntry::elapsedpublic and addAgentEntry::revision().CLAUDE.md: replace "Remote does not mirror the panel" with a description of the new read-only mirror.swarm_request_mirrors_the_run_without_moving_the_desktop_selectioncovers: no run, header and agents, the unchanged token, per-agent selection, fallback for a missing agent, and a failed run.swarm_output_tail_keeps_the_newest_bytescovers the byte budget and the char-boundary cut.Testing
git diff --check origin/main...HEADcargo test(skipped: not run unless--run-testsis set)The two new unit tests and the updated fixture round-trip test are in the diff but were not run for this PR.
Risks / Notes
protocol.schema.jsonis a generated schema file, and the diff to it looks hand-synced with the Rust types. It should be regenerated and checked against the source if there is any doubt.🤖 Generated with Claude Code