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
refactor(tokenjuice): simplify repl and ccr configuration
Steven Enamakel94b360223b88
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod.rs b/crates/openhuman-core/src/inference/tokenjuice/mod.rsindex 5c75a22f79..8496a94ed0 100644--- a/crates/openhuman-core/src/inference/tokenjuice/mod.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/mod.rs@@ -88,12 +88,6 @@ pub fn companion_tool_names(agent_id: &str, config: &crate::config::Config) -> Vnames}-/// Where the module writes a plain-text copy of each stored original when-/// `[tokenjuice] repl_save_enabled` is on.-pub fn repl_save_dir(workspace_dir: &std::path::Path) -> std::path::PathBuf {- workspace_dir.join(".tokenjuice").join("repl")-}-/// What the module is told to do, from the resolved configuration.pub(crate) fn install_request(config: &crate::config::Config) -> InstallRequest {let tj = &config.tokenjuice;@@ -117,17 +111,12 @@ pub(crate) fn install_request(config: &crate::config::Config) -> InstallRequestllm_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)),..tinyjuice_bus::types::CompressOptions::default()},max_cache_entries: tj.max_cache_entries,max_cache_bytes: tj.max_cache_bytes,ccr_ttl_secs: tj.ccr_ttl_secs,- disk_tier_root: tj- .ccr_disk_enabled- .then(|| config.workspace_dir.join(".tokenjuice").join("ccr"))- .map(|path| path.to_string_lossy().into_owned()),+ ccr_durable: tj.ccr_disk_enabled,}}@@ -151,12 +140,14 @@ pub async fn install_from_config(config: &crate::config::Config) -> Result<(), S).await;let request = install_request(config);- // The module keeps the durable tier on its blob storage; originals the old- // disk tier wrote move across first (once per directory, best effort).- if let Some(root) = request.disk_tier_root.as_deref() {+ // The module keeps the durable tier on its host-granted blob storage.+ // Read the old filesystem tier only as migration input; filesystem paths+ // are not part of the loadable module's bus contract.+ if config.tokenjuice.ccr_disk_enabled {+ let root = config.workspace_dir.join(".tokenjuice").join("ccr");crate::modules::import_legacy_tinyjuice(&crate::core::runtime::DispatchCtx::ambient(),- std::path::Path::new(root),+ &root,request.ccr_ttl_secs.map(std::time::Duration::from_secs),).await;