Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/openhuman/agent/harness/subagent_runner/ops/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ pub(crate) struct LazyToolkitResolver {
/// for a slug, subsequent `resolve()` calls for the same slug reuse the
/// cached instance — sharing its [`ContractGate`] state (#5119).
#[allow(dead_code)] // used via pub(super) from tests
pub(super) resolved:
std::sync::Mutex<std::collections::HashMap<String, std::sync::Arc<dyn crate::openhuman::tools::Tool>>>,
pub(super) resolved: std::sync::Mutex<
std::collections::HashMap<String, std::sync::Arc<dyn crate::openhuman::tools::Tool>>,
>,
}

/// Minimum normalized-slug length before the prefix/superstring tier in
Expand Down Expand Up @@ -302,14 +303,13 @@ impl LazyToolkitResolver {
}

let action = self.find_action(name)?;
let tool: std::sync::Arc<dyn crate::openhuman::tools::Tool> = std::sync::Arc::new(
crate::openhuman::composio::ComposioActionTool::new(
let tool: std::sync::Arc<dyn crate::openhuman::tools::Tool> =
std::sync::Arc::new(crate::openhuman::composio::ComposioActionTool::new(
self.config.clone(),
action.name.clone(),
action.description.clone(),
action.parameters.clone(),
),
);
));

// Store in cache for future lookups.
{
Expand Down
14 changes: 7 additions & 7 deletions src/openhuman/tinyflows/caps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,10 @@ fn extract_fenced_json_block(text: &str) -> Option<Value> {
let fence_start = text.find("```")?;
let after_fence = text[fence_start + 3..].trim();
// Skip optional "json" after the opening fence
let content = after_fence.strip_prefix("json").unwrap_or(after_fence).trim();
let content = after_fence
.strip_prefix("json")
.unwrap_or(after_fence)
.trim();
// Find the *last* closing ``` (preferring the outermost fence, which
// matches how Markdown renderers treat nested fences — the last ``` is
// the one that closes the block the LLM opened).
Expand Down Expand Up @@ -5660,11 +5663,7 @@ mod tests {
"schema": { "type": "array" }
}
});
let result = build_agent_result(
"agent-1",
"Here is the list: [1, 2, 3]",
&request,
);
let result = build_agent_result("agent-1", "Here is the list: [1, 2, 3]", &request);
assert_eq!(result, json!([1, 2, 3]));
}

Expand Down Expand Up @@ -5699,7 +5698,8 @@ mod tests {
"schema": { "type": "object" }
}
});
let text = "Some text\n```json\n{\"from_fence\": true}\n```\nmore text { \"from_brace\": true }";
let text =
"Some text\n```json\n{\"from_fence\": true}\n```\nmore text { \"from_brace\": true }";
let result = build_agent_result("agent-1", text, &request);
assert_eq!(result, json!({ "from_fence": true }));
}
Expand Down
Loading