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': 'Nega',
|
||||
'approval.confirm_reject': 'Conferma il rifiuto',
|
||||
'approval.reject_hint': 'Facoltativo: spiega perché (lo leggerà l\'assistente)',
|
||||
'approval.bypass_15': 'Consenti e salta richieste simili per 15 minuti',
|
||||
'approval.bypass_all': 'Consenti e salta tutte le richieste di questa sessione',
|
||||
'approval.bypass_15': 'Consenti e non chiedere più per questo stesso strumento per 15 minuti',
|
||||
'approval.bypass_all': 'Consenti e non chiedere più per questo stesso strumento per il resto della conversazione',
|
||||
|
||||
// ── Accesso ────────────────────────────────────────────────────────────────
|
||||
'login.title': 'Bentornato',
|
||||
|
||||
Reference in New Issue
Block a user