huskies: merge 1218 story Remembered/sticky permission approvals so constrained agents stop re-prompting for the same action class

This commit is contained in:
Huskies Agent
2026-07-18 13:58:35 +00:00
parent fbaf5bf959
commit 7d3de2bb44
21 changed files with 313 additions and 214 deletions
+9 -1
View File
@@ -7,7 +7,9 @@
use crate::agents::AgentPool;
use crate::chat::dispatcher::ChatDispatcher;
use crate::service::permission_router::{PendingPermReplies, ResponderRegistry};
use crate::service::permission_router::{
PendingPermReplies, RememberedPermissions, ResponderRegistry,
};
use crate::service::status::StatusBroadcaster;
use std::collections::HashSet;
use std::path::PathBuf;
@@ -41,6 +43,11 @@ pub struct Services {
/// Seconds to wait for a user to respond to a permission prompt before
/// auto-denying (fail-closed).
pub permission_timeout_secs: u64,
/// In-memory, per-session "don't ask again" permission rules (story
/// 1218). Checked by `tool_prompt_permission` before forwarding a
/// request to chat; never persisted to disk and never affects a
/// different session's agent.
pub remembered_permissions: Arc<RememberedPermissions>,
/// Project-scoped status broadcaster.
///
/// Consumers (chat transports, Web UI, agent context) call
@@ -73,6 +80,7 @@ impl Services {
permission_registry: ResponderRegistry::new(),
pending_perm_replies: PendingPermReplies::new(),
permission_timeout_secs: 120,
remembered_permissions: RememberedPermissions::new(),
chat_dispatcher: std::sync::Arc::new(ChatDispatcher::new(1_500)),
})
}