The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/flows/builder_tools/kind_reads.rs,crates/openhuman-co
Steven Enamakelcae071eb5699
diff --git a/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs b/crates/openhuman-core/src/flows/builder_tools/kind_reads.rsindex 168fb52d91..f85bb6f633 100644--- a/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs+++ b/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs@@ -214,9 +214,9 @@ impl Tool for GetNodeKindContractTool {"type": "string","description": format!("One of the {} node kinds, e.g. 'tool_call' (from list_node_kinds).",- crate::flows::NODE_KINDS.len()+ tinyflows::catalog::NODE_KINDS.len()),- "enum": crate::flows::NODE_KINDS,+ "enum": tinyflows::catalog::NODE_KINDS,}},"required": ["kind"],diff --git a/crates/openhuman-core/src/flows/builder_tools_save_and_edit_tests.rs b/crates/openhuman-core/src/flows/builder_tools_save_and_edit_tests.rsindex c20c6d9871..6e5705e2d0 100644--- a/crates/openhuman-core/src/flows/builder_tools_save_and_edit_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools_save_and_edit_tests.rs@@ -413,11 +413,11 @@ async fn list_node_kinds_tool_returns_every_kind() {assert!(!result.is_error, "{}", result.output());let parsed: Value = serde_json::from_str(&result.output()).unwrap();let kinds = parsed["node_kinds"].as_array().unwrap();- assert_eq!(kinds.len(), crate::flows::NODE_KINDS.len());+ assert_eq!(kinds.len(), tinyflows::catalog::NODE_KINDS.len());// The tool must advertise the whole catalog, not a subset that happens to// include the kinds someone remembered to name here — a kind the engine// knows but this tool omits is a kind the builder agent cannot reach.- for kind in crate::flows::NODE_KINDS {+ for kind in tinyflows::catalog::NODE_KINDS {assert!(kinds.iter().any(|k| k["kind"] == kind),"list_node_kinds omits `{kind}`"@@ -452,7 +452,7 @@ async fn get_node_kind_contract_tool_returns_contract_and_rejects_unknown() {assert!(bad.output().contains("list_node_kinds"));assert!(bad.output()- .contains(&format!("{} valid kinds", crate::flows::NODE_KINDS.len())));+ .contains(&format!("{} valid kinds", tinyflows::catalog::NODE_KINDS.len())));let missing = tool.execute(json!({})).await.unwrap();assert!(missing.is_error);diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod.rs b/crates/openhuman-core/src/inference/tokenjuice/mod.rsindex c6d5ef281c..245b4820ab 100644--- a/crates/openhuman-core/src/inference/tokenjuice/mod.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/mod.rs@@ -13,9 +13,9 @@ use tinyjuice_bus::names::methods;pub use repl_tools::{is_repl_tool, repl_tools, repl_tools_for, REPL_TOOL_NAMES};pub use tools::TokenjuiceRetrieveTool;-pub use types::{AgentTokenjuiceCompression, CompressorKind, ContentKind};+pub use {tinyjuice_bus::types::AgentTokenjuiceCompression, tinyjuice_bus::types::CompressorKind, tinyjuice_bus::types::ContentKind};-use types::InstallRequest;+use {tinyjuice_bus::wire::InstallRequest};pub const RETRIEVE_TOOL_NAME: &str = "juice_retrieve";pub const LEGACY_TINYJUICE_RETRIEVE_TOOL_NAME: &str = "tinyjuice_retrieve";@@ -87,7 +87,7 @@ pub fn repl_save_dir(workspace_dir: &std::path::Path) -> std::path::PathBuf {pub(crate) fn install_request(config: &crate::config::Config) -> InstallRequest {let tj = &config.tokenjuice;InstallRequest {- options: types::CompressOptions {+ options: tinyjuice_bus::types::CompressOptions {router_enabled: tj.router_enabled,ccr_enabled: tj.ccr_enabled,search_enabled: tj.search_enabled,@@ -102,13 +102,13 @@ pub(crate) fn install_request(config: &crate::config::Config) -> InstallRequest// Never at ingest: a large result gets deterministic compression// and a recovery handle, and the model writes a summary only when// the agent asks for one with `juice_summarize` (#6955).- llm_summary_mode: types::LlmSummaryMode::OnDemand,+ llm_summary_mode: tinyjuice_bus::types::LlmSummaryMode::OnDemand,llm_summary_threshold_tokens: config.context.summarizer_payload_threshold_tokens,llm_summary_max_input_tokens: config.context.summarizer_max_payload_tokens,repl_handle: repl_handle_active(config),repl_save_dir: (repl_handle_active(config) && tj.repl_save_enabled).then(|| repl_save_dir(&config.workspace_dir)),- ..types::CompressOptions::default()+ ..tinyjuice_bus::types::CompressOptions::default()},max_cache_entries: tj.max_cache_entries,max_cache_bytes: tj.max_cache_bytes,@@ -256,7 +256,7 @@ pub async fn compact_tool_output(call: ToolOutputCompaction<'_>) -> CompactedToo}#[cfg(test)]if let Ok(stub) = module_stub::STUB.try_with(std::sync::Arc::clone) {- let response = stub(types::CompactRequest {+ let response = stub(tinyjuice_bus::wire::CompactRequest {content,tool_name: tool_name.to_string(),enabled,@@ -291,7 +291,7 @@ pub async fn compact_tool_output(call: ToolOutputCompaction<'_>) -> CompactedToolog::debug!("[tokenjuice] module configuration failed, passing through: {error}");return CompactedToolOutput::passthrough(content, wants_summary);}- let request = types::CompactRequest {+ let request = tinyjuice_bus::wire::CompactRequest {content: content.clone(),tool_name: tool_name.to_string(),enabled,@@ -303,7 +303,7 @@ pub async fn compact_tool_output(call: ToolOutputCompaction<'_>) -> CompactedToo};let response = match client(&config).with_timeout(COMPACT_WITH_TIMEOUT)- .call::<types::CompactResponse>("tinyjuice", methods::COMPACT_WITH, (request,))+ .call::<tinyjuice_bus::wire::CompactResponse>("tinyjuice", methods::COMPACT_WITH, (request,)).await{Ok(response) => response,@@ -316,7 +316,7 @@ pub async fn compact_tool_output(call: ToolOutputCompaction<'_>) -> CompactedToocompacted_from(response)}-fn compacted_from(response: types::CompactResponse) -> CompactedToolOutput {+fn compacted_from(response: tinyjuice_bus::wire::CompactResponse) -> CompactedToolOutput {let summarized_from_bytes = (response.compressor == CompressorKind::LlmSummary.as_str()).then_some(response.original_bytes);CompactedToolOutput {@@ -326,7 +326,7 @@ fn compacted_from(response: types::CompactResponse) -> CompactedToolOutput {}}-fn record_savings(response: &types::CompactResponse) {+fn record_savings(response: &tinyjuice_bus::wire::CompactResponse) {use std::str::FromStr as _;let kind = ContentKind::from_str(&response.content_kind).unwrap_or(ContentKind::PlainText);let compressor = CompressorKind::from_str(&response.compressor).unwrap_or(CompressorKind::None);@@ -338,7 +338,7 @@ fn record_savings(response: &types::CompactResponse) {);}-pub async fn detect(content: String, hint: types::ContentHint) -> Result<String, String> {+pub async fn detect(content: String, hint: tinyjuice_bus::types::ContentHint) -> Result<String, String> {let config = crate::config::Config::load_or_init().await.map_err(|error| error.to_string())?;@@ -350,13 +350,13 @@ pub async fn detect(content: String, hint: types::ContentHint) -> Result<String,pub async fn compress(content: String,- hint: types::ContentHint,-) -> Result<types::CompressedOutput, String> {+ hint: tinyjuice_bus::types::ContentHint,+) -> Result<tinyjuice_bus::types::CompressedOutput, String> {let config = crate::config::Config::load_or_init().await.map_err(|error| error.to_string())?;install_from_config(&config).await?;- let response: types::CompressedOutput = client(&config)+ let response: tinyjuice_bus::types::CompressedOutput = client(&config).call("tinyjuice", methods::COMPRESS, (content, hint)).await.map_err(|error| error.to_string())?;@@ -371,7 +371,7 @@ pub async fn compress(pub async fn retrieve(token: String,- range: Option<types::RetrieveRange>,+ range: Option<tinyjuice_bus::wire::RetrieveRange>,) -> Result<Option<String>, String> {let config = crate::config::Config::load_or_init().await@@ -383,7 +383,7 @@ pub async fn retrieve(.map_err(|error| error.to_string())}-pub async fn cache_stats() -> Result<types::CacheStats, String> {+pub async fn cache_stats() -> Result<tinyjuice_bus::wire::CacheStats, String> {let config = crate::config::Config::load_or_init().await.map_err(|error| error.to_string())?;