Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(parallel): make internal types and functions pub(super)

Steven Enamakele5f114d2e3ef
diff --git a/crates/openhuman-core/src/search/tools/parallel/enrich.rs b/crates/openhuman-core/src/search/tools/parallel/enrich.rs
index 54ca99efa4..5ae957d26d 100644
--- a/crates/openhuman-core/src/search/tools/parallel/enrich.rs
+++ b/crates/openhuman-core/src/search/tools/parallel/enrich.rs
@@ -10,7 +10,7 @@ use std::sync::Arc;
// ── ParallelEnrichTool ──────────────────────────────────────────────
#[derive(Debug, Deserialize)]
-struct EnrichResponse {
+pub(super) struct EnrichResponse {
#[serde(default, rename = "runId")]
run_id: Option<String>,
#[serde(default)]
@@ -21,7 +21,7 @@ struct EnrichResponse {
cost_usd: f64,
}
-fn format_enrich_response(resp: EnrichResponse) -> Result<String, String> {
+pub(super) fn format_enrich_response(resp: EnrichResponse) -> Result<String, String> {
if let Some(id) = &resp.run_id {
tracing::debug!(
"[parallel_enrich] completed run_id={} status={:?} cost_usd={:.4}",
diff --git a/crates/openhuman-core/src/search/tools/parallel/research.rs b/crates/openhuman-core/src/search/tools/parallel/research.rs
index 4216cfc861..68559e96f7 100644
--- a/crates/openhuman-core/src/search/tools/parallel/research.rs
+++ b/crates/openhuman-core/src/search/tools/parallel/research.rs
@@ -10,7 +10,7 @@ use std::sync::Arc;
// ── ParallelResearchTool ────────────────────────────────────────────
#[derive(Debug, Deserialize)]
-struct ResearchResponse {
+pub(super) struct ResearchResponse {
#[serde(default, rename = "runId")]
run_id: Option<String>,
#[serde(default)]
@@ -21,7 +21,7 @@ struct ResearchResponse {
cost_usd: f64,
}
-fn format_research_response(resp: ResearchResponse) -> Result<String, String> {
+pub(super) fn format_research_response(resp: ResearchResponse) -> Result<String, String> {
if let Some(id) = &resp.run_id {
tracing::debug!(
"[parallel_research] completed run_id={} status={:?} cost_usd={:.4}",
diff --git a/crates/openhuman-core/src/search/tools/parallel/search.rs b/crates/openhuman-core/src/search/tools/parallel/search.rs
index 597dc4bf70..ae4e78f3a8 100644
--- a/crates/openhuman-core/src/search/tools/parallel/search.rs
+++ b/crates/openhuman-core/src/search/tools/parallel/search.rs
@@ -7,7 +7,7 @@ use serde::Deserialize;
use std::sync::Arc;
/// UTF-8 safe truncation: returns the truncated slice and whether it was truncated.
-fn truncate_chars(s: &str, max_chars: usize) -> (&str, bool) {
+pub(super) fn truncate_chars(s: &str, max_chars: usize) -> (&str, bool) {
match s.char_indices().nth(max_chars) {
Some((byte_idx, _)) => (&s[..byte_idx], true),
None => (s, false),