huskies: merge 1228 story Render agent questions as numbered options in chat protocols without question UI
This commit is contained in:
@@ -10,6 +10,7 @@ use crate::chat::dispatcher::ChatDispatcher;
|
||||
use crate::service::permission_router::{
|
||||
PendingPermReplies, RememberedPermissions, ResponderRegistry,
|
||||
};
|
||||
use crate::service::question_router::{PendingQuestionReplies, QuestionResponderRegistry};
|
||||
use crate::service::status::StatusBroadcaster;
|
||||
use std::collections::HashSet;
|
||||
use std::path::PathBuf;
|
||||
@@ -48,6 +49,18 @@ pub struct Services {
|
||||
/// request to chat; never persisted to disk and never affects a
|
||||
/// different session's agent.
|
||||
pub remembered_permissions: Arc<RememberedPermissions>,
|
||||
/// Registry of tasks currently registered to receive forwarded MCP
|
||||
/// `ask_question` requests (story 1228). Kept fully separate from
|
||||
/// `permission_registry` so a question answer is never conflated with a
|
||||
/// permission decision.
|
||||
pub question_registry: Arc<QuestionResponderRegistry>,
|
||||
/// Pending question replies awaiting a chat reply, keyed by `request_id`
|
||||
/// with a per-location FIFO index, mirroring `pending_perm_replies` but
|
||||
/// for `ask_question` (story 1228).
|
||||
pub pending_question_replies: Arc<PendingQuestionReplies>,
|
||||
/// Seconds to wait for a user to answer a question before giving up
|
||||
/// (fail-closed): the MCP tool returns an error to the asking agent.
|
||||
pub question_timeout_secs: u64,
|
||||
/// Project-scoped status broadcaster.
|
||||
///
|
||||
/// Consumers (chat transports, Web UI, agent context) call
|
||||
@@ -81,6 +94,9 @@ impl Services {
|
||||
pending_perm_replies: PendingPermReplies::new(),
|
||||
permission_timeout_secs: 120,
|
||||
remembered_permissions: RememberedPermissions::new(),
|
||||
question_registry: QuestionResponderRegistry::new(),
|
||||
pending_question_replies: PendingQuestionReplies::new(),
|
||||
question_timeout_secs: 120,
|
||||
chat_dispatcher: std::sync::Arc::new(ChatDispatcher::new(1_500)),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user