feat(orchestrator): inbox console, deny by channel and agent rule requests
The inbox shows the console output of a command under its "Ausführen" row, kept to the same tail the job list shows. A deny picks its radio channel (post by default, call, newsletter, broadcast, pan-pan, security) and an optional reason; the passkey signs denial, channel and reason, the hub verifies the proof before it stores or sends anything, and the PermissionRequest hook quotes a reason only when it verifies. Agents ask for an auto-approval rule through the MCP tool rule_request; the request shows in the inbox with a dry run over the last seven days and is accepted only with a passkey assertion the hub verifies against the pinned keys and the hub origin, for every rule kind. Requests lapse with the ask lifetime and are capped per agent and in total. The image runs as nobody by default and carries the health check command; compose keeps the timing. 🎯 Fix: 93 % 💥 Break: 4 % 💸 Cost: 98 % ⏱️ Time: 75 % 🛡️ Security: 100 % 🏆 Score: 100 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d311a3382
commit
58187e8323
37 files changed
+1387
-100
No files matched your search
@@ -7,7 +7,9 @@ from . import NAME
|
||||
from .asking import OPTION_LIMIT
|
||||
from .errors import RpcError, ToolError
|
||||
from .fields import WAIT_CAP
|
||||
from .requesting import AGENT_CAP
|
||||
from .reviewing import GATES
|
||||
from .rules import RULE_KINDS
|
||||
|
||||
PROTOCOLS = ("2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05")
|
||||
|
||||
@@ -77,6 +79,28 @@ class Mcp:
|
||||
f"(pending, decided) and the chosen label. Waits at most {WAIT_CAP} seconds.",
|
||||
{"id": text_property("Decision id that decision_request returned."), "timeout_seconds": wait},
|
||||
),
|
||||
tool(
|
||||
"rule_request",
|
||||
"Ask the operator for an auto-approval rule in the Agent Orchestrator. Nothing is stored until the operator "
|
||||
"signs the rule with the passkey; the limits are those of the rules form, and an ask rule never covers a "
|
||||
f"chained command or one with a warning. At most {AGENT_CAP} requests of one agent wait at a time. "
|
||||
"Returns the request id and the hub URL; a denial also reaches you over the radio with the reason.",
|
||||
{
|
||||
"kind": {"type": "string", "enum": list(RULE_KINDS), "description": "ask: a tool and command pattern; review: a branch pattern, green gate only; decision: take the recommended option."},
|
||||
"tool": text_property("Tool glob of an ask rule, e.g. Bash; empty for review and decision."),
|
||||
"pattern": text_property("One-line glob over the command (ask), the branch (review) or the agent name (decision)."),
|
||||
"scope": text_property("One-line glob over the working directory (ask) or the worktree (review); * for decision."),
|
||||
"expires": {"type": "integer", "description": "Epoch seconds the rule ends, at most 366 days ahead."},
|
||||
"agent": text_property("Your agent name, shown with the request."),
|
||||
"why": text_property("Why the rule helps, plain text for the operator."),
|
||||
},
|
||||
),
|
||||
tool(
|
||||
"rule_request_wait",
|
||||
f"Wait until the operator accepts or denies a rule request or the timeout passes, then return its status "
|
||||
f"(pending, accepted, denied), the stored rule id and the operator's reason. Waits at most {WAIT_CAP} seconds.",
|
||||
{"id": text_property("Request id that rule_request returned."), "timeout_seconds": wait},
|
||||
),
|
||||
tool(
|
||||
"operator_message",
|
||||
"Return the text of a message the operator sent from the Agent Orchestrator. A radio row from Operator "
|
||||
@@ -102,6 +126,8 @@ class Mcp:
|
||||
"review_list": self.pending,
|
||||
"decision_request": self.decision_request,
|
||||
"decision_wait": self.decision_wait,
|
||||
"rule_request": self.rule_request,
|
||||
"rule_request_wait": self.rule_request_wait,
|
||||
"operator_message": self.operator_message,
|
||||
}
|
||||
name = params.get("name")
|
||||
|
||||
Reference in new issue
Block a user