Merge remote-tracking branch 'gitea-ai/gsd/phase-13-aiui-functional-conversational-node-control-and-content-surf'
Demo images / Build & push demo images (push) Successful in 3m14s
Demo images / Build & push demo images (push) Successful in 3m14s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
mod analytics;
|
||||
mod appgate;
|
||||
mod ark;
|
||||
mod assistant_chat;
|
||||
mod auth;
|
||||
mod backup_rpc;
|
||||
mod bitcoin;
|
||||
@@ -18,9 +19,14 @@ mod identity;
|
||||
mod interfaces;
|
||||
pub(crate) mod lnd;
|
||||
mod marketplace;
|
||||
mod mesh;
|
||||
// pub(crate): 13-10's `assistant::backends::select_backend` reuses
|
||||
// `mesh::assistant::detect_ollama()` (D-04) rather than re-probing —
|
||||
// matches the existing `pub(crate) mod bitcoin_relay;`/`pub(crate) mod
|
||||
// lnd;` convention already in this file for cross-module reuse.
|
||||
pub(crate) mod mesh;
|
||||
mod middleware;
|
||||
mod monitoring;
|
||||
mod music;
|
||||
mod names;
|
||||
mod network;
|
||||
mod node;
|
||||
@@ -60,9 +66,14 @@ use std::sync::Arc;
|
||||
use tracing::{debug, error};
|
||||
|
||||
pub use middleware::PeerAddr;
|
||||
// Re-exported `pub(crate)` (not just imported) so `crate::assistant`'s test
|
||||
// suite can assert directly against the live list that `assistant.*` is
|
||||
// never added to it — the Phase-10 hard constraint this crate must hold.
|
||||
// The list's *contents* are unchanged; only its read-visibility widens from
|
||||
// "this module" to "this crate".
|
||||
pub(crate) use middleware::UNAUTHENTICATED_METHODS;
|
||||
use middleware::{
|
||||
derive_csrf_token, extract_client_ip, extract_cookie, sanitize_error_message,
|
||||
CACHEABLE_METHODS, UNAUTHENTICATED_METHODS,
|
||||
derive_csrf_token, extract_client_ip, extract_cookie, sanitize_error_message, CACHEABLE_METHODS,
|
||||
};
|
||||
use response::{cookie_header, json_response, ResponseCache, RpcError, RpcRequest, RpcResponse};
|
||||
|
||||
@@ -143,6 +154,7 @@ impl RpcHandler {
|
||||
loop {
|
||||
interval.tick().await;
|
||||
limiter.cleanup().await;
|
||||
limiter.cleanup_sessions().await;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -188,13 +200,18 @@ impl RpcHandler {
|
||||
}
|
||||
|
||||
/// Set the mesh service (called after identity is loaded).
|
||||
pub async fn set_mesh_service(&self, service: crate::mesh::MeshService) {
|
||||
pub async fn set_mesh_service(self: &Arc<Self>, service: crate::mesh::MeshService) {
|
||||
// If the blob store is already initialised, propagate it into the
|
||||
// freshly-started mesh state so the listener can persist inline
|
||||
// attachments. Mirrors `set_blob_store`'s forward-propagation.
|
||||
if let Some(store) = self.blob_store.read().await.as_ref().cloned() {
|
||||
*service.shared_state().blob_store.write().await = Some(store);
|
||||
}
|
||||
// Wire the mesh `!ai` path into the assistant's shared tool loop: a
|
||||
// trusted mesh peer's question runs the same tool registry with the
|
||||
// operator's persisted grants, and writes still suspend on this
|
||||
// node's confirm gate. Same forward-propagation pattern as above.
|
||||
*service.shared_state().assistant_handler.write().await = Some(Arc::clone(self));
|
||||
*self.mesh_service.write().await = Some(service);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user