Repository navigation
Let panels in a group read and type into each other when the operator switches it on - #146
Merged
Merged
Conversation
Off Linux detectRoot always returns an error, so staticcheck reports
the err check in Probe as always true and the pre-commit lint fails
on macOS. The check is real on Linux.
group.peers sets it and the snapshot carries it as GroupView.Peers. It
is persisted with the other per-group settings and is off for a new
group.
A conductor connection and an agent panel are refused the verb. A
group needs a direct member to be switched on, and the flag is dropped
when its last member leaves. It follows a pure rename. A merge into a
group that already had members leaves that group's flag as it was.
Refs #145
Covers save and restore, the conductor and agent-panel refusals, the
group.change event, and each path that empties a group. A merge and a
re-created group name both come up off.
Refs #145
…ach other
peer.list, peer.tail and peer.send are authorised per call: the
caller and the target must share a group the operator switched on.
Never self, the conductor, the global shell or an exited panel.
An agent target gets one line prefixed with who sent it. Control
bytes are refused and line breaks fold to a space. A shell target
gets the text as typed. A send to a panel waiting for a human is
refused. Each send is capped at 4096 bytes and each sender at three
in a row, then one every two seconds.
Refs #145
Covers each caller and target refusal, the prefix on an agent and
the verbatim shell, control bytes and folded line breaks, the size
and rate caps, the flag turned off mid-conversation, and one run
over the socket against real PTYs.
Refs #145
g p on a group row flips whether its panels may read and type
into each other. Switching it on asks first and only y confirms.
Enter cancels, like any other key. Switching it off goes at once.
A group with no panel directly in it is refused with a reason,
since the server would refuse it anyway.
The question lasts as long as its prompt is on screen. It is
withdrawn when the prompt fades or is replaced, when the group
loses its last direct panel, and when the view leaves the
dashboard. A prompt still showing is taken down with it.
The flag is drawn before the server answers and the next snapshot
settles it. A refused switch shows as an error and asks for the
fleet, so the mark does not stay lit on a group that stayed closed.
A peers-on group carries a mark on its tree row, its card head,
the split title, each member tile and the zoom strip of its
panels. The mark follows the exact group path, never a sub-group,
and never a lens bucket of the same name.
A narrow tile drops the mark instead of wrapping its head. A narrow
zoom strip shows the bare mark and cuts the title to fit the screen.
Every new string has a zh-TW translation. The key map frame gains
one binding, so its count reads 55.
Refs #145
Enabling asks once and sends nothing until the y. Enter does not
confirm. Disabling sends at once. A cancelled switch sends nothing
and does not leak its key into the dashboard. A group of only
sub-groups is refused with a reason.
A late y is not an answer: after the prompt fades, after another
status replaces it, after the group loses its direct panels, and
after the view leaves the dashboard. A withdrawn question takes
its prompt down.
The flip is drawn at once and a snapshot settles it. A refusal
reaches the status line and the next snapshot takes the mark back.
The mark is checked on and off on the tree row, the card head, the
split title, the member tile and the zoom strip. It is absent on a
sub-group, a parent group and a lens bucket.
A narrow tile keeps its height. A narrow zoom strip stays inside
the screen, with CJK titles and with titles that carry a middle dot.
Refs #145
A worker's MCP server now lists baton_peers, baton_peek and
baton_tell beside score_submit. Each call is checked by the daemon,
so a refusal says why. baton_peek returns plain text with the
terminal's control sequences removed. The conductor's tools are
unchanged.
baton ctl group peers <group> on|off switches a group from the
command line. --score-only is still accepted and selects the
worker table.
The mcp package's tests move with it, since NewScore is renamed
NewWorker and they call it.
Refs #145
Covers the control client against a daemon, a send answered by its
own notice and not a broadcast one, the ctl on, off and usage
forms, and the tool descriptions quoting the server's caps.
Refs #145
An agent panel or a conductor can no longer file an existing panel
into a peers-on group, by panel.group, a merging rename or a
dissolve. The operator adds panels to it. Spawning a new panel
there is unchanged.
group.peers validates the group name in both directions and says
nothing when the state does not change. A refusal no longer quotes
a long name back in full. A persisted panel with an unclean id is
not restored, and the ids in the prefix and the notice are cleaned.
baton_peek keeps the text after an escape string that has no
terminator and reads no more than one tail. The dashboard question
is withdrawn when the group's members change while it is up.
The tests come with it: setGroupPeers changed its signature and
the existing ones call it.
Refs #145
…tect
CONTROL gains a Peers section: the verbs, the worker tools, what a
send does, who may add a panel, and the limits. The guardrail table
and the conductor's may-not list follow. SPEC, KEYS and PLUGIN
carry the wire fields, the g p key and the two events. SCORE no
longer says score_submit is the only worker tool.
Refs #145
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
+ Coverage 88.36% 88.68% +0.32%
==========================================
Files 151 152 +1
Lines 23465 24001 +536
==========================================
+ Hits 20735 21286 +551
+ Misses 1930 1910 -20
- Partials 800 805 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
A per-group peers flag. While the operator has it on for a group, the panels in that exact group may list each other, read each other's recent output, and type one line into each other's terminal.
group.peerssets the flag;peer.list,peer.tailandpeer.sendare authorised per call from live state. The flag is persisted, carried on the snapshot asGroupView.Peers, and dropped when the group's last direct member leaves.baton_peers,baton_peekandbaton_tellbesidescore_submit. The conductor's tool table is unchanged.baton ctl group peers <group> on|off.g pon a group row. Enabling asks once and onlyyconfirms; disabling does not ask. The mark is⋈on the tree row, card head, split title, member tile and zoom footer.CONTROL,SPEC,KEYS,PLUGIN,SCOREand their zh-TW twins.Rules a send follows
[from <title> (<id>)]. Line breaks and tabs fold to a space; control and invisible characters are refused. A shell target gets the text as written.Who may change what
group.peers.panel.group, a merging rename, a dissolve). Spawning a new panel there is still allowed. A conductor that creates a panel and then groups it therefore cannot add it to a peers-on group; the operator does.Known limits, all documented in
CONTROL.mdBATON_PANEL_IDis taken for the operator and can switch its own group on. This is a guardrail against accidents, like the conductor fence.BATON_PANEL_IDfrom the agent CLI. Checked with a scriptedbaton mcp, not with each vendor's CLI.Also in this branch
chore(cgroup): one//nolint:staticcheckon the non-LinuxdetectRootstub. Off Linux the function always errors, so staticcheck reported SA4023 and the pre-commit lint failed on macOS.Verification
make cover(race + per-package 80%) exits 0 locally;golangci-lint runexits 0 for darwin andGOOS=linux.ydo not enable;ydoes; a second press disables). No recovered panic in the daemon log.Closes #145