fix: scope an approval bypass to the tool, not to its whole connector
Approving one tool call with "15 min" or "Session" registered a bypass whose scope was *inferred* from the call's metadata: a registered category if it had one, otherwise its MCP server. For a connector tool that meant the whole connector — so approving `mcp__gmail__modify_message` (labelling, archiving: what an assistant tidying a mailbox does constantly) silently un-gated `mcp__gmail__send_message` for the rest of the conversation, straight through the explicit `require` rule written for it. An email went out with no prompt; the only trace was an INFO line, since bypasses live in RAM. A human answering a card has read one call. That call is the widest thing the click may authorise, so the scope is now always the tool itself and is never guessed. The wider scopes stay in the enum and stay reachable through the REST `bypass_scope` field, where naming one is deliberate. Both fallbacks now narrow instead of widening: a scope that cannot be honoured (a category-less tool, a non-MCP one) and an unknown scope string both degrade to the tool, where they used to fall through to a session-wide bypass. Only a literal "all" disables the gate session-wide. The buttons said "skip similar requests" without ever defining "similar"; they now name the tool.
This commit is contained in:
+2
-2
@@ -321,8 +321,8 @@ export default {
|
||||
'approval.reject': 'Refuser',
|
||||
'approval.confirm_reject': 'Confirmer le refus',
|
||||
'approval.reject_hint': 'Facultatif : dites pourquoi (l\'assistant le lira)',
|
||||
'approval.bypass_15': 'Autoriser et ignorer les demandes similaires pendant 15 minutes',
|
||||
'approval.bypass_all': 'Autoriser et ignorer toutes les demandes pour cette session',
|
||||
'approval.bypass_15': 'Autoriser et ne plus demander pour ce même outil pendant 15 minutes',
|
||||
'approval.bypass_all': 'Autoriser et ne plus demander pour ce même outil jusqu\'à la fin de la conversation',
|
||||
|
||||
// ── Login ──────────────────────────────────────────────────────────────────
|
||||
'login.title': 'Bon retour',
|
||||
|
||||
Reference in New Issue
Block a user