From 0cc4c39af8b4517b4933629bdf8ccb329ec863d8 Mon Sep 17 00:00:00 2001 From: Steven Enamakel <31011319+senamakel@users.noreply.github.com> Date: Sun, 5 Jul 2026 17:48:38 -0700 Subject: [PATCH] [codex] fix tinyjuice build wiring (#4575) --- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- app/src-tauri/Cargo.lock | 2 +- app/src-tauri/Cargo.toml | 2 +- src/openhuman/tokenjuice/mod.rs | 17 ++++++++++------- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91e1b86d1..11a20dccc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6904,7 +6904,7 @@ dependencies = [ [[package]] name = "tinyjuice" -version = "0.1.0" +version = "0.2.1" dependencies = [ "async-trait", "dirs 6.0.0", @@ -8267,7 +8267,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b7af30933..9dc7211dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ tinyflows = { version = "0.5", features = ["mock"] } # TinyJuice — host-agnostic TokenJuice compression engine. OpenHuman keeps # config/RPC/tool/runtime adapters in `src/openhuman/tokenjuice/` and patches # this dependency to the vendored submodule below. -tinyjuice = { version = "0.1", default-features = false } +tinyjuice = { version = "0.2.1", default-features = false } # TinyAgents — Rust LLM orchestration framework (LangGraph/LangChain-style): # durable state graphs, agent-loop harness, model/tool registries, REPL + # `.rag` workflow language. openhuman's agent engine + orchestration run on this @@ -326,7 +326,7 @@ default = ["tokenjuice-treesitter"] # AST-aware code compression (tree-sitter Rust/TS/Python grammars; C build). # On by default; disable to fall back to the brace-depth heuristic. tokenjuice-treesitter = [ - "tinyjuice/tokenjuice-treesitter", + "tinyjuice/tinyjuice-treesitter", ] sandbox-landlock = ["dep:landlock"] sandbox-bubblewrap = [] diff --git a/app/src-tauri/Cargo.lock b/app/src-tauri/Cargo.lock index 05746dede..f6d13faf5 100644 --- a/app/src-tauri/Cargo.lock +++ b/app/src-tauri/Cargo.lock @@ -9253,7 +9253,7 @@ dependencies = [ [[package]] name = "tinyjuice" -version = "0.1.0" +version = "0.2.1" dependencies = [ "async-trait", "dirs 6.0.0", diff --git a/app/src-tauri/Cargo.toml b/app/src-tauri/Cargo.toml index 6fa098b29..1a16eb5bf 100644 --- a/app/src-tauri/Cargo.toml +++ b/app/src-tauri/Cargo.toml @@ -133,7 +133,7 @@ cef = { version = "=146.4.1", default-features = false } # probe in `core_process::ensure_running` still attaches to a running # `openhuman-core run` harness when one is already listening. openhuman_core = { path = "../..", package = "openhuman", default-features = false } -tinyjuice = { version = "0.1", default-features = false } +tinyjuice = { version = "0.2.1", default-features = false } [target.'cfg(unix)'.dependencies] nix = { version = "0.29", default-features = false, features = ["hostname", "signal", "user"] } diff --git a/src/openhuman/tokenjuice/mod.rs b/src/openhuman/tokenjuice/mod.rs index 6dcc18a70..fe10e47e8 100644 --- a/src/openhuman/tokenjuice/mod.rs +++ b/src/openhuman/tokenjuice/mod.rs @@ -39,6 +39,7 @@ pub fn install_from_config(config: &crate::openhuman::config::Config) { min_bytes_to_compress: tj.min_bytes_to_compress, ccr_min_tokens: tj.ccr_min_tokens, max_inline_chars: None, + ..Default::default() }; let disk_root = tj .ccr_disk_enabled @@ -63,13 +64,15 @@ pub fn install_from_config(config: &crate::openhuman::config::Config) { }, ))); ml::configure(config.clone()); - tinyjuice::ml::configure_callback(Some(Arc::new(|text, opts| { - Box::pin(async move { - ml::compress(&text, &opts) - .await - .map_err(|err| format!("{err:#}")) - }) - }))); + tinyjuice::ml::configure_callback(Some(Arc::new( + |text: String, opts: tinyjuice::types::CompressOptions| { + Box::pin(async move { + ml::compress(&text, &opts) + .await + .map_err(|err| format!("{err:#}")) + }) + }, + ))); } /// All read-only TokenJuice debug controllers (detect / compress / cache_stats