mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-01 00:59:33 +00:00
Use live owner tool scope for autonomous routines and jobs (#1453)
* Use live owner tool scope for autonomous runs * Address autonomous tool scope review feedback * Normalize routine context paths again
This commit is contained in:
@@ -463,6 +463,37 @@ fn sanitize_url_for_logging(url: &str) -> String {
|
||||
}
|
||||
|
||||
impl ExtensionManager {
|
||||
pub fn owner_id(&self) -> &str {
|
||||
&self.user_id
|
||||
}
|
||||
|
||||
pub async fn active_tool_names(&self) -> HashSet<String> {
|
||||
let mut names = HashSet::new();
|
||||
match self.list(None, false).await {
|
||||
Ok(extensions) => {
|
||||
for extension in extensions {
|
||||
match extension.kind {
|
||||
ExtensionKind::WasmTool if extension.active => {
|
||||
names.insert(extension.name);
|
||||
}
|
||||
ExtensionKind::McpServer if extension.active => {
|
||||
names.extend(extension.tools);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
tracing::warn!(
|
||||
owner_id = %self.user_id,
|
||||
"Failed to list active extensions while resolving autonomous tool scope: {}",
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
names
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
mcp_session_manager: Arc<McpSessionManager>,
|
||||
|
||||
Reference in New Issue
Block a user