Watch
0
0
Fork
You've already forked hyperhive
0

subagents publish their model and effort as headers on every row, and the swarm shows them

The subagent daemon stamps Swarm-Model and Swarm-Effort on each row it
publishes. The list endpoint reads them off the newest row it already fetches,
so a long-running subagent keeps them past the stream's 24 hour window, and the
terminal page's menu and the agent panel's list show them beside the name.
This commit is contained in:
iris 2026-10-28 20:54:16 +01:00 • committed by mara
commit da5fcbfd9b

View file

@ -7,6 +7,7 @@ import {
STALE_S,
byRecency,
isRunning,
runLabel,
runningLabel,
splitRunning,
stillListed,
@ -16,6 +17,8 @@ const NOW = 1_000_000;
const sub = (name, ago) => ({
name,
last_row_unix: ago === null ? null : NOW - ago,
model: null,
effort: null,
});
test("a subagent with a recent row is running, a quiet one is not", () => {
@ -69,3 +72,11 @@ test("a pick holds only while the refreshed list still has it", () => {
assert.equal(stillListed("a", null), null);
assert.equal(stillListed(null, subs), null);
});
test("the run label names the model and effort, whichever are known", () => {
assert.equal(runLabel({ model: "opus", effort: "high" }), "opus · high");
assert.equal(runLabel({ model: "opus", effort: null }), "opus");
assert.equal(runLabel({ model: null, effort: "medium" }), "medium");
assert.equal(runLabel({ model: null, effort: null }), "");
assert.equal(runLabel({ model: "", effort: "" }), "");
});