huskies: merge 1163 story Replace perm_rx lock-as-presence-signal with a permission router

This commit is contained in:
Huskies Agent
2026-07-16 13:19:20 +00:00
parent 6f8a8ffd87
commit 18b065f77a
26 changed files with 823 additions and 293 deletions
@@ -92,8 +92,12 @@ pub(super) async fn handle_incoming_message(
// If there is a pending permission prompt for this channel, interpret the
// message as a yes/no response instead of starting a new command/LLM flow.
{
let mut pending = ctx.services.pending_perm_replies.lock().await;
if let Some(tx) = pending.remove(channel) {
if let Some(tx) = ctx
.services
.pending_perm_replies
.resolve_oldest(channel)
.await
{
let decision = if is_permission_approval(message) {
PermissionDecision::Approve
} else {