feat(hub): grant split menu, radio redesign and answerable decision rows
The Grant bar becomes one split control: Select, or Grant N with a menu for Deny, Grant all green, the picked list, Clear and Direct mode; picked items turn pale green. The radio drops its filter flyout and gains three-state bells per row, a test per row including Speak, Auto or Morse on a second click, mute on the sender avatar and the agent profile, Cancel MAYDAY beside Send only while one is active, a Send menu with a test message and hold-to-record push-to-talk. Decision rows read as questions with their options; the signed answer is Decision <id> plus Answer: <answer>, and the card names its recipient. Security: the passkey-signed answer carries no agent-written text, the inbox lists answerable rows only when their id fullmatches the TASK rule of the installed rasci.py (skill_scripts.task_pattern), and rasci.py, operator.py and hotfix.py check task slugs with fullmatch, so a trailing newline no longer passes. Accepted MEDUSA findings after kvb-think-criticize: page-inbox.js:116 EXA006 (by design after the fix), page-inbox.js:125 EXA010, operator.py:173, 618 and 633 RP001, FT-TRIGGER-005 and RLHF-POISON-002, operator.py:639 MEX-SCAN-346, operator.py:968 MM-SCAN-058, operator.py:974 ACP-SCAN-028 (false positives). 🎯 Fix: 85 % 💥 Break: 10 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 77 🚦 Gate: ⛔ fix 85 % < 90, break 10 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ff9bbc19c2
commit
d695bb2b58
42 files changed
+1158
-340
No files matched your search
@@ -184,6 +184,26 @@ class TestOperator(unittest.TestCase):
|
||||
def _register(self) -> dict[str, dict]:
|
||||
return json.loads((self.root / "rasci.json").read_text(encoding="utf-8"))
|
||||
|
||||
def test_a_decision_row_keeps_its_options_and_pick_and_a_re_add_without_them_drops_both(self):
|
||||
question = ["add", "pick", "--dir", str(self.base), "--command", "decide: keep or remove it", "--reason", "only the operator may", "--check", "decision"]
|
||||
self._out(*question, "--option", "Keep=ships with the PR", "--option", "Remove = drop it first", "--recommended", "Remove")
|
||||
row = self._register()["operator/pick"]
|
||||
self.assertEqual((row["options"], row["recommended"]), ([{"label": "Keep", "description": "ships with the PR"}, {"label": "Remove", "description": "drop it first"}], "Remove"))
|
||||
self._out(*question)
|
||||
self.assertEqual({"options", "recommended"} & set(self._register()["operator/pick"]), set())
|
||||
|
||||
def test_options_need_a_decision_row_distinct_labels_and_a_known_pick(self):
|
||||
add = ["add", "bad", "--dir", str(self.base), "--command", "decide: x", "--reason", "r"]
|
||||
refused = {
|
||||
"manual": self._run(*add[:-2], "--command", "echo hi", "--reason", "r", "--check", "manual", "--option", "A"),
|
||||
"twice": self._run(*add, "--check", "decision", "--option", "A=x", "--option", "A=y"),
|
||||
"unknown pick": self._run(*add, "--check", "decision", "--option", "A", "--recommended", "B"),
|
||||
"pick alone": self._run(*add, "--check", "decision", "--recommended", "A"),
|
||||
"empty label": self._run(*add, "--check", "decision", "--option", "=only text"),
|
||||
}
|
||||
self.assertEqual({name: result.returncode for name, result in refused.items()}, dict.fromkeys(refused, 2))
|
||||
self.assertNotIn("operator/bad", self._register() if (self.root / "rasci.json").exists() else {})
|
||||
|
||||
def _session(self, sid: str, name: str) -> None:
|
||||
(self.home / ".claude" / "sessions" / f"{sid}.json").write_text(json.dumps({"sessionId": sid, "name": name}), encoding="utf-8")
|
||||
|
||||
|
||||
Reference in new issue
Block a user