diff --git a/docs/requirements/012-match-review.md b/docs/requirements/012-match-review.md index 6a2ceac..46aee96 100644 --- a/docs/requirements/012-match-review.md +++ b/docs/requirements/012-match-review.md @@ -150,7 +150,7 @@ flowchart TD - [ ] Every ask, choice, decision row and rule request under Waits on Operator is a card of its kind; a decision row answered through Match leaves the stack until its question changes, and its agent receives the - pick as a post. + pick as a call. - [ ] A decision card's option buttons record the pick; a choice's reject is refused; a rule card's accept opens its row and its reject carries the feedback. diff --git a/orchestrator/client/signing.py b/orchestrator/client/signing.py index 7c4e5a6..2c1e108 100644 --- a/orchestrator/client/signing.py +++ b/orchestrator/client/signing.py @@ -30,7 +30,7 @@ TASK = re.compile(r"[a-z0-9][a-z0-9._-]{0,99}(?:/[a-z0-9][a-z0-9._-]{0,99}){0,7} PRIO = re.compile(r"[1-9][0-9]{0,2}") FIBONACCI = ("1", "2", "3", "5", "8", "13", "21", "34", "55", "89") ESTIMATOR = "Operator" -CHOICE_CLASS = "post" +CHOICE_CLASS = "call" QUESTION_SHOWN = 200 PICKED = "\n" COMMANDS = "operator/" diff --git a/orchestrator/kvb_orchestrator/mcp.py b/orchestrator/kvb_orchestrator/mcp.py index f716171..af5af5b 100644 --- a/orchestrator/kvb_orchestrator/mcp.py +++ b/orchestrator/kvb_orchestrator/mcp.py @@ -82,7 +82,7 @@ class Mcp: "decision_wait", "Wait until the operator picks an option or the timeout passes, then return the status " "(pending, decided), the chosen label or the operator's own one-line Other answer and, for a click, message and answer: the id and text of the operator's " - "passkey-signed answer, a post to the asking agent; check it with operator_message(message, answer, your name) " + "passkey-signed answer, a radio call to the asking agent; check it with operator_message(message, answer, your name) " f"before acting on the choice. Waits at most {WAIT_CAP} seconds.", {"id": text_property("Decision id that decision_request returned."), "timeout_seconds": wait}, ), diff --git a/orchestrator/templates/page-inbox.js b/orchestrator/templates/page-inbox.js index f5711c7..5340962 100644 --- a/orchestrator/templates/page-inbox.js +++ b/orchestrator/templates/page-inbox.js @@ -132,7 +132,7 @@ } } - const signsFor = (item) => `your passkey signs this answer, a post to ${item.agent}`; + const signsFor = (item) => `${item.agent} gets this answer as a call once your passkey signs it`; /** * @param {Object} item a permission ask. @@ -151,7 +151,7 @@ return choiceDialog(item, {pick: (label) => { after(); chooseOne(item, label); }, toggled: new Set(), chosen: ui.selected.has(keyOf(item)) ? grantLabel(item) : "", locked: item.held, hint: signsFor(item), group: "", other: OTHER_PROMPT}); } if (item.kind === "ask") { - return choiceDialog(askDialog(item.id), {pick: (answer, typed) => { after(); answerAsk(item, answer, typed); }, toggled: new Set(), chosen: ui.selected.has(keyOf(item)) ? ALLOW : "", locked: item.held, hint: `your passkey signs it, the answer goes to ${item.to || "its session"}`, group: "", other: TELL}); + return choiceDialog(askDialog(item.id), {pick: (answer, typed) => { after(); answerAsk(item, answer, typed); }, toggled: new Set(), chosen: ui.selected.has(keyOf(item)) ? ALLOW : "", locked: item.held, hint: `the answer goes to ${item.to || "its session"} once your passkey signs it`, group: "", other: TELL}); } const shown = ui.selected.has(keyOf(item)) ? grantLabel(item) : ""; return asked(item) ? [answerTo(item), choiceDialog(item, {pick: (label) => { after(); answerPick(item, label); }, toggled: new Set(), chosen: shown, locked: item.held, hint: signsFor(item), group: "", other: OTHER_PROMPT})] : null; @@ -161,7 +161,8 @@ * @param {Object} item a decision row of the register. * @returns {HTMLElement} who receives the answer: the row's first agent with role A, which any agent can set, so the operator sees it before signing. */ - const answerTo = (item) => h("p", {class: "muted answer-to"}, item.agent ? ["Your answer goes to ", h("strong", {}, revealed(item.agent)), " as a passkey-signed post, with the row id and your answer only."] : "No agent holds role A on this row: answer in its session."); + const UNASSIGNED = "No agent holds role A on this row: answer in its session."; + const answerTo = (item) => h("p", {class: "muted answer-to"}, item.agent ? ["Your answer goes to ", h("strong", {}, revealed(item.agent)), " as a passkey-signed call that wakes it at once, with the row id and your answer only."] : UNASSIGNED); const deniable = (item) => item.deniable || item.kind === "review"; const denialOf = (item, reason) => ({...entryOf(item, "reject", ""), channel: "post", reason, to: item.to}); @@ -179,7 +180,7 @@ return [...state.inbox.filter((entry) => entry.kind === "review" && linked.has(entry.id) && !entry.held && !keys.has(keyOf(entry))), ...items]; } - const DENY_NOTE = "Every entry and every full command that gets denied; each requester gets its denial and the reason by post. After the click the passkey signs the whole selection once; then 3 s remain to undo."; + const DENY_NOTE = "Every entry and every full command that gets denied; each requester gets its denial and the reason by post. After the click 3 s remain for undo, and one passkey signature covers the whole selection."; function grantNote(alone, batched) { const solos = alone ? ` Each rule and each red-gate review first asks its own signature, one after the other (${alone}).` : ""; @@ -230,7 +231,7 @@ return { chosen, grant: h("button", {type: "button", class: "btn small primary", ...named(`Grant selection (${grantable.length})`), disabled: !grantable.length || ui.busy, on: {click: () => bulk(withReviews(chosen), "Grant selection", false)}}, icon("bi-check2-square"), `Grant ${grantable.length}`), - deny: h("button", {type: "button", class: "menu-item danger", ...named(`Deny selection (${denials.length})`, `Deny selection (${denials.length}): each requester gets its denial and an optional reason by post, one passkey signature, 3 s to undo`), disabled: !denials.length || ui.busy, on: {click: () => bulk(chosen, "Deny selection", true)}}, icon("bi-x-square"), `Deny ${denials.length}`), + deny: h("button", {type: "button", class: "menu-item danger", ...named(`Deny selection (${denials.length})`, `Deny selection (${denials.length}): each requester gets its denial and an optional reason by post, 3 s to undo, one passkey signature`), disabled: !denials.length || ui.busy, on: {click: () => bulk(chosen, "Deny selection", true)}}, icon("bi-x-square"), `Deny ${denials.length}`), green: h("button", {type: "button", class: "menu-item", ...named(`Grant all green (${green.length})`), disabled: !green.length || ui.busy, on: {click: () => bulk(green, "Grant all green", false)}}, icon("bi-check2-all"), `Grant all green ${green.length}`), }; } @@ -322,7 +323,7 @@ function waitOf(item) { const to = item.agent ? ` to ${item.agent}` : ""; if (sending.has(keyOf(item))) { - return `Clicked: waits for your passkey, then the hub stores the answer and sends it${to}`; + return `Clicked: the hub stores the answer and sends it${to} once your passkey signs it`; } if (item.held) { return `Signed: waits out the undo window of a few seconds, then the hub delivers it${to} and the card closes`; diff --git a/orchestrator/templates/page-match.js b/orchestrator/templates/page-match.js index 87a6a53..1819335 100644 --- a/orchestrator/templates/page-match.js +++ b/orchestrator/templates/page-match.js @@ -608,7 +608,7 @@ }) : null; return h("section", {class: "card match-overview", "aria-label": "Decisions"}, h("h2", {class: "panel-title"}, "Decisions"), - h("p", {class: "muted"}, "Nothing has run yet. Accepted commits get the operator's signature for their exact tree, accepted commands run once as jobs under Waits on Operator, accepted asks are granted, every picked option goes to its agent as a post, every rejection goes to its agent by radio call."), + h("p", {class: "muted"}, "Nothing has run yet. Accepted commits get the operator's signature for their exact tree, accepted commands run once as jobs under Waits on Operator, accepted asks are granted, every picked option and every rejection goes to its agent by radio call."), picked.length ? h("ol", {class: "match-decisions"}, picked.map(([card, decision]) => overviewRow(card, decision))) : h("p", {class: "muted"}, "No decision yet."), block && picked.length ? h("p", {class: "match-release-block"}, icon("bi-exclamation-triangle"), block) : null, h("div", {class: "actions"}, back, h("span", {class: "spacer"}), release)); diff --git a/skills/kvb-org-operator/checks.md b/skills/kvb-org-operator/checks.md index 570bfb2..bdf0c2d 100644 --- a/skills/kvb-org-operator/checks.md +++ b/skills/kvb-org-operator/checks.md @@ -25,5 +25,5 @@ A `decision` row carries two to four answers, as an `AskUserQuestion` offers, each as `--option "