Watch
0
0
Fork
You've already forked hyperhive
0

a hive-side pause holds against the swarm's declared state until an operator resumes

the harness writes the reason into the pause marker when it pauses itself and reports it as paused_by_hive in its turn-state header. swarm-controller declares such an agent paused (only if declared up) and shows the reason on the agents status row and the swarm ui card.
This commit is contained in:
atlas 2026-11-09 23:09:14 +01:00 • committed by mara
commit e5c55257f8

View file

@ -5,6 +5,7 @@ import assert from "node:assert/strict";
import { test } from "node:test";
import {
canTurnIntoCustom,
hivePauseReason,
showsLoginNeeded,
} from "../src/agent/AgentTypes.ts";
@ -42,3 +43,13 @@ test("turn into custom is offered to a placed archetype agent only", () => {
false,
);
});
test("an agent its hive paused shows the reason, any other shows none", () => {
assert.equal(
hivePauseReason({ paused_by_hive: "skipped get_loose_ends" }),
"skipped get_loose_ends",
);
assert.equal(hivePauseReason({ paused_by_hive: null }), null);
assert.equal(hivePauseReason({ paused_by_hive: "" }), null);
assert.equal(hivePauseReason({}), null);
});