fix(composio): align v3 execute path and honor configured entity_id (#322)

This commit is contained in:
Chummy 2026-02-16 23:40:37 +08:00 committed by GitHub
parent a403b5f5b1
commit 23b0f360c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 86 additions and 32 deletions

View file

@ -59,11 +59,12 @@ pub fn default_tools_with_runtime(
}
/// Create full tool registry including memory tools and optional Composio
#[allow(clippy::implicit_hasher)]
#[allow(clippy::implicit_hasher, clippy::too_many_arguments)]
pub fn all_tools(
security: &Arc<SecurityPolicy>,
memory: Arc<dyn Memory>,
composio_key: Option<&str>,
composio_entity_id: Option<&str>,
browser_config: &crate::config::BrowserConfig,
http_config: &crate::config::HttpRequestConfig,
workspace_dir: &std::path::Path,
@ -76,6 +77,7 @@ pub fn all_tools(
Arc::new(NativeRuntime::new()),
memory,
composio_key,
composio_entity_id,
browser_config,
http_config,
workspace_dir,
@ -86,12 +88,13 @@ pub fn all_tools(
}
/// Create full tool registry including memory tools and optional Composio.
#[allow(clippy::implicit_hasher)]
#[allow(clippy::implicit_hasher, clippy::too_many_arguments)]
pub fn all_tools_with_runtime(
security: &Arc<SecurityPolicy>,
runtime: Arc<dyn RuntimeAdapter>,
memory: Arc<dyn Memory>,
composio_key: Option<&str>,
composio_entity_id: Option<&str>,
browser_config: &crate::config::BrowserConfig,
http_config: &crate::config::HttpRequestConfig,
workspace_dir: &std::path::Path,
@ -146,7 +149,7 @@ pub fn all_tools_with_runtime(
if let Some(key) = composio_key {
if !key.is_empty() {
tools.push(Box::new(ComposioTool::new(key)));
tools.push(Box::new(ComposioTool::new(key, composio_entity_id)));
}
}
@ -206,6 +209,7 @@ mod tests {
&security,
mem,
None,
None,
&browser,
&http,
tmp.path(),
@ -242,6 +246,7 @@ mod tests {
&security,
mem,
None,
None,
&browser,
&http,
tmp.path(),
@ -379,6 +384,7 @@ mod tests {
&security,
mem,
None,
None,
&browser,
&http,
tmp.path(),
@ -409,6 +415,7 @@ mod tests {
&security,
mem,
None,
None,
&browser,
&http,
tmp.path(),