teknium1
2dfb795cb7
fix(approval): undelivered or unanswered CLI approval prompts are not user denials
...
When the CLI approval callback raises, when no callback is registered on the
thread while prompt_toolkit owns the terminal, or when the input() read is
interrupted, prompt_dangerous_approval returned "deny" and the command gate
rendered "BLOCKED: User denied this command" — attributing a refusal to a
user who was never asked (#22992 ). #112308 fixed the gateway half of the
class (withdrawn prompts -> outcome "cancelled" with a cause); this closes
the CLI residual on the same shape.
- tools/approval_prompt.py: those three paths return an Unanswered("cancelled")
sentinel carrying the cause; MCP elicitation consent maps it to "cancel".
- tools/approval.py: the CLI gate renders "BLOCKED: <noun> was not approved: the
approval prompt could not be delivered or was not answered (<cause>)" with
outcome "cancelled" — still fail-closed, "Silence is not consent".
- tools/file_tools_write_guards.py: the protected-instruction write gate
reports the undelivered prompt instead of "was denied by the user".
- Shared metrics: "cancelled" is a counted approval outcome (contract + v2
schema) instead of falling into "unknown".
- Docs: hook `choice="cancelled"` now covers the CLI causes.
Fixes #22992
2026-09-15 21:46:37 -07:00
..
2026-09-15 18:49:29 -07:00
2026-09-13 05:21:02 -07:00
2026-09-13 21:04:45 -07:00
2026-09-15 21:46:37 -07:00
2026-09-15 18:44:46 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 21:46:37 -07:00
2026-09-15 18:43:56 -07:00
2026-09-13 21:13:23 -07:00
2026-09-15 18:44:23 -07:00
2026-09-14 21:18:47 +05:30
2026-09-15 04:13:13 -07:00
2026-09-12 08:43:28 -07:00
2026-09-13 14:41:26 -07:00
2026-09-15 06:16:38 -07:00
2026-09-15 04:13:13 -07:00
2026-09-13 14:41:26 -07:00
2026-09-15 04:56:01 -07:00
2026-09-15 12:06:08 -07:00
2026-09-15 18:24:22 -07:00
2026-09-12 21:50:30 -07:00
2026-09-12 21:50:30 -07:00
2026-09-14 16:13:51 -07:00
2026-09-13 05:09:06 -07:00
2026-09-15 03:45:41 -07:00
2026-09-13 09:18:02 -07:00
2026-09-14 21:18:47 +05:30
2026-09-13 05:21:02 -07:00
2026-09-13 05:21:02 -07:00
2026-09-13 05:21:02 -07:00
2026-09-13 05:21:02 -07:00
2026-09-14 07:21:18 -07:00
2026-09-14 17:34:31 -07:00
2026-09-15 00:41:13 +05:30
2026-09-15 00:41:13 +05:30
2026-09-15 00:41:14 +05:30
2026-09-15 00:41:13 +05:30
2026-09-15 00:41:13 +05:30
2026-09-15 00:41:14 +05:30
2026-09-15 00:41:13 +05:30
2026-09-14 22:01:32 +00:00
2026-09-15 00:41:14 +05:30
2026-09-15 00:41:14 +05:30
2026-09-15 00:41:14 +05:30
2026-09-15 00:41:14 +05:30
2026-09-15 00:41:14 +05:30
2026-09-14 22:01:32 +00:00
2026-09-15 05:33:41 -07:00
2026-09-15 03:56:17 -07:00
2026-09-15 04:13:47 -07:00
2026-09-15 03:56:17 -07:00
2026-09-15 03:57:24 -07:00
2026-09-15 18:41:46 -07:00
2026-09-13 21:31:57 -07:00
2026-09-15 18:40:52 -07:00
2026-09-15 04:12:13 -07:00
2026-09-13 21:05:42 -07:00
2026-09-15 03:45:41 -07:00
2026-09-13 20:13:12 -07:00
2026-09-15 18:41:19 -07:00
2026-09-15 00:41:13 +05:30
2026-09-13 05:07:11 -07:00
2026-09-15 19:09:29 -07:00
2026-09-12 20:52:49 -07:00
2026-09-12 20:52:49 -07:00
2026-09-12 20:52:49 -07:00
2026-09-15 03:57:24 -07:00
2026-09-15 03:57:24 -07:00
2026-09-15 03:57:24 -07:00
2026-09-15 05:35:34 -07:00
2026-09-15 06:26:29 -07:00
2026-09-14 16:13:51 -07:00
2026-09-12 21:55:07 -07:00
2026-09-14 09:19:25 -07:00
2026-09-15 03:45:41 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 21:03:11 -07:00
2026-09-13 21:03:11 -07:00
2026-09-13 09:18:54 -07:00
2026-09-15 03:45:41 -07:00
2026-09-15 06:25:42 -07:00
2026-09-12 12:32:55 -07:00
2026-09-15 03:57:24 -07:00
2026-09-15 18:49:29 -07:00
2026-09-15 03:37:11 -07:00
2026-09-12 09:05:56 -07:00
2026-09-13 20:45:25 -07:00
2026-09-15 13:00:12 +05:30
2026-09-15 19:00:42 -07:00
2026-09-13 20:45:25 -07:00
2026-09-15 19:05:57 -07:00
2026-09-15 19:06:54 -07:00
2026-09-15 04:56:40 -07:00
2026-09-15 04:54:30 -07:00
2026-09-13 20:43:33 -07:00
2026-09-15 10:50:13 +05:30
2026-09-15 09:29:00 -07:00
2026-09-13 06:29:12 -07:00
2026-09-15 10:50:13 +05:30
2026-09-13 06:29:12 -07:00
2026-09-13 06:29:12 -07:00
2026-09-12 21:05:29 -07:00
2026-09-15 06:29:50 -07:00
2026-09-15 04:12:41 -07:00
2026-09-15 19:02:39 -07:00
2026-09-15 19:04:29 -07:00
2026-09-15 19:02:39 -07:00
2026-09-15 04:55:14 -07:00
2026-09-15 19:06:27 -07:00
2026-09-14 16:16:08 -07:00
2026-09-15 06:29:50 -07:00
2026-09-14 20:44:56 -07:00
2026-09-13 20:46:22 -07:00
2026-09-12 21:13:40 -07:00
2026-09-12 22:03:19 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 14:43:04 -07:00
2026-09-14 16:12:07 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-12 22:06:03 -07:00
2026-09-15 18:38:44 -07:00
2026-09-12 21:25:00 -07:00
2026-09-12 22:09:19 -07:00
2026-09-15 00:41:13 +05:30
2026-09-13 19:58:33 -07:00
2026-09-15 18:39:09 -07:00
2026-09-15 04:01:17 -07:00
2026-09-15 19:03:33 -07:00
2026-09-15 19:03:33 -07:00
2026-09-14 14:41:50 -07:00
2026-09-15 19:01:39 -07:00
2026-09-12 21:50:30 -07:00
2026-09-12 07:54:04 -07:00
2026-09-15 18:33:15 -07:00
2026-09-13 11:22:08 -07:00
2026-09-14 06:12:19 -07:00
2026-09-15 02:22:22 -05:00
2026-09-13 09:18:02 -07:00
2026-09-15 04:12:13 -07:00
2026-09-12 20:55:04 -07:00
2026-09-15 19:09:29 -07:00
2026-09-15 18:40:29 -07:00
2026-09-15 03:52:24 -07:00
2026-09-15 18:58:30 -07:00
2026-09-14 16:16:08 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 05:09:43 -07:00
2026-09-15 03:41:43 -07:00
2026-09-13 21:04:08 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 05:07:50 -07:00
2026-09-15 18:25:17 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-12 13:44:52 -07:00
2026-09-13 21:40:26 -07:00
2026-09-15 04:48:20 -07:00
2026-09-13 12:35:36 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 14:39:29 -07:00
2026-09-12 21:30:38 -07:00
2026-09-15 18:43:28 -07:00
2026-09-15 18:43:05 -07:00
2026-09-14 13:04:39 -07:00
2026-09-15 18:42:38 -07:00
2026-09-15 06:20:15 -07:00
2026-09-15 03:57:24 -07:00
2026-09-15 03:57:24 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00