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(tokenjuice): remove the repl_save_enabled setting
Steven Enamakele3c7aa402a1b
diff --git a/app/src/utils/tauriCommands/tokenjuice.ts b/app/src/utils/tauriCommands/tokenjuice.tsindex 45445c5803..2b962fc7ad 100644--- a/app/src/utils/tauriCommands/tokenjuice.ts+++ b/app/src/utils/tauriCommands/tokenjuice.ts@@ -13,8 +13,6 @@ export interface TokenjuiceSettings {ccr_enabled: boolean;/** Store large results behind a handle queried with juice_find/extract/summarize. */repl_handle_enabled?: boolean;- /** Also write a plain-text copy of each stored original under the workspace. */- repl_save_enabled?: boolean;ccr_disk_enabled: boolean;max_cache_entries: number;max_cache_bytes: number;diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rsindex 12fdc0bd17..b1b74d1b84 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs@@ -37,16 +37,6 @@ impl Config {);}}- if let Some(flag) = env.get("OPENHUMAN_TOKENJUICE_REPL_SAVE_ENABLED") {- if let Some(v) = parse_env_bool("OPENHUMAN_TOKENJUICE_REPL_SAVE_ENABLED", &flag) {- self.tokenjuice.repl_save_enabled = v;- self.record_env_override(- env,- "tokenjuice.repl_save_enabled",- &["OPENHUMAN_TOKENJUICE_REPL_SAVE_ENABLED"],- );- }- }if let Some(flag) = env.get("OPENHUMAN_TOKENJUICE_CCR_DISK_ENABLED") {if let Some(v) = parse_env_bool("OPENHUMAN_TOKENJUICE_CCR_DISK_ENABLED", &flag) {self.tokenjuice.ccr_disk_enabled = v;diff --git a/crates/openhuman-core/src/config/schema/tokenjuice.rs b/crates/openhuman-core/src/config/schema/tokenjuice.rsindex 9b0be21845..5102a36b38 100644--- a/crates/openhuman-core/src/config/schema/tokenjuice.rs+++ b/crates/openhuman-core/src/config/schema/tokenjuice.rs@@ -35,12 +35,6 @@ pub struct TokenjuiceConfig {/// `juice_retrieve` round trip.#[serde(default = "default_true")]pub repl_handle_enabled: bool,- /// Also write each stored original to- /// `<workspace>/.tokenjuice/repl/<handle>.txt` (mode 0600) so the agent can- /// script over it. Off by default: it puts raw tool output on disk, and- /// nothing prunes the directory.- #[serde(default)]- pub repl_save_enabled: bool,/// Max number of originals retained in the in-memory CCR store.#[serde(default = "default_max_cache_entries")]pub max_cache_entries: usize,@@ -90,7 +84,6 @@ impl Default for TokenjuiceConfig {router_enabled: true,ccr_enabled: true,repl_handle_enabled: true,- repl_save_enabled: false,ccr_disk_enabled: false,max_cache_entries: default_max_cache_entries(),max_cache_bytes: default_max_cache_bytes(),diff --git a/crates/openhuman-core/src/config/schema/tokenjuice_tests.rs b/crates/openhuman-core/src/config/schema/tokenjuice_tests.rsindex bc11e0749f..27dfa085cf 100644--- a/crates/openhuman-core/src/config/schema/tokenjuice_tests.rs+++ b/crates/openhuman-core/src/config/schema/tokenjuice_tests.rs@@ -4,11 +4,10 @@ use super::*;fn defaults_are_sane() {let c = TokenjuiceConfig::default();// The router and the handle preview are on (see- // `ContextConfig::compaction_enabled`); the on-disk copy is opt-in.+ // `ContextConfig::compaction_enabled`).assert!(c.router_enabled);assert!(c.ccr_enabled);assert!(c.repl_handle_enabled);- assert!(!c.repl_save_enabled);assert!(c.search_enabled);}@@ -35,5 +34,11 @@ fn an_older_config_without_the_new_keys_gets_the_on_defaults() {let c: TokenjuiceConfig = toml::from_str("ccr_min_tokens = 900").unwrap();assert!(c.router_enabled);assert!(c.repl_handle_enabled);- assert!(!c.repl_save_enabled);+}++#[test]+fn legacy_repl_save_setting_is_ignored() {+ let c: TokenjuiceConfig = toml::from_str("repl_save_enabled = true").unwrap();+ assert!(c.repl_handle_enabled);+ assert_eq!(toml::to_string(&c).unwrap().contains("repl_save_enabled"), false);}diff --git a/crates/openhuman-core/src/doctor/checks/config_semantics.rs b/crates/openhuman-core/src/doctor/checks/config_semantics.rsindex 1058cc7043..884088a480 100644--- a/crates/openhuman-core/src/doctor/checks/config_semantics.rs+++ b/crates/openhuman-core/src/doctor/checks/config_semantics.rs@@ -319,7 +319,6 @@ fn tokenjuice_is_custom(config: &Config) -> bool {|| current.router_enabled != default.router_enabled|| current.ccr_enabled != default.ccr_enabled|| current.repl_handle_enabled != default.repl_handle_enabled- || current.repl_save_enabled != default.repl_save_enabled|| current.ccr_disk_enabled != default.ccr_disk_enabled|| current.max_cache_entries != default.max_cache_entries|| current.max_cache_bytes != default.max_cache_bytesdiff --git a/crates/openhuman-core/src/inference/tokenjuice/config_patch.rs b/crates/openhuman-core/src/inference/tokenjuice/config_patch.rsindex 8ddfc15449..3e24376c36 100644--- a/crates/openhuman-core/src/inference/tokenjuice/config_patch.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/config_patch.rs@@ -14,7 +14,6 @@ pub struct TokenjuiceSettingsPatch {pub router_enabled: Option<bool>,pub ccr_enabled: Option<bool>,pub repl_handle_enabled: Option<bool>,- pub repl_save_enabled: Option<bool>,pub ccr_disk_enabled: Option<bool>,pub max_cache_entries: Option<usize>,pub max_cache_bytes: Option<usize>,@@ -39,9 +38,6 @@ impl TokenjuiceSettingsPatch {if let Some(v) = self.repl_handle_enabled {cfg.repl_handle_enabled = v;}- if let Some(v) = self.repl_save_enabled {- cfg.repl_save_enabled = v;- }if let Some(v) = self.ccr_disk_enabled {cfg.ccr_disk_enabled = v;}diff --git a/crates/openhuman-core/src/inference/tokenjuice/config_patch_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/config_patch_tests.rsindex d3ad122d2e..7764b5ddb1 100644--- a/crates/openhuman-core/src/inference/tokenjuice/config_patch_tests.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/config_patch_tests.rs@@ -14,14 +14,22 @@ fn applies_only_present_fields() {}#[test]-fn repl_switches_can_be_flipped() {+fn repl_handle_switch_can_be_flipped() {let mut cfg = TokenjuiceConfig::default();let patch: TokenjuiceSettingsPatch =- serde_json::from_str(r#"{ "repl_handle_enabled": false, "repl_save_enabled": true }"#)- .unwrap();+ serde_json::from_str(r#"{ "repl_handle_enabled": false }"#).unwrap();patch.apply(&mut cfg);assert!(!cfg.repl_handle_enabled);- assert!(cfg.repl_save_enabled);+}++#[test]+fn legacy_repl_save_patch_field_is_ignored() {+ let mut cfg = TokenjuiceConfig::default();+ let patch: TokenjuiceSettingsPatch =+ serde_json::from_str(r#"{ "repl_save_enabled": true }"#).unwrap();+ patch.apply(&mut cfg);+ assert!(cfg.repl_handle_enabled);+ assert!(!serde_json::to_string(&cfg).unwrap().contains("repl_save_enabled"));}#[test]diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rsindex a3664a2347..0e4c7d59c3 100644--- a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs@@ -309,7 +309,6 @@ fn install_request_handle_mode_follows_every_switch_it_needs() {] {let mut config = crate::config::Config::default();flip(&mut config);- config.tokenjuice.repl_save_enabled = true;let request = install_request(&config);assert!(!request.options.repl_handle);assert!(!request.ccr_durable);diff --git a/crates/openhuman-core/src/inference/tokenjuice/rpc_scope_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/rpc_scope_tests.rsindex 88e26fe7f5..4456f9363d 100644--- a/crates/openhuman-core/src/inference/tokenjuice/rpc_scope_tests.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/rpc_scope_tests.rs@@ -148,7 +148,6 @@ fn profile_config(workspace: &std::path::Path, threshold: usize) -> Config {config.config_path = workspace.join("config.toml");config.tokenjuice.min_bytes_to_compress = threshold;config.tokenjuice.ccr_disk_enabled = true;- config.tokenjuice.repl_save_enabled = true;config}diff --git a/docs/gitbooks/en/features/token-compression.md b/docs/gitbooks/en/features/token-compression.mdindex cb1e1991e7..c4483b3718 100644--- a/docs/gitbooks/en/features/token-compression.md+++ b/docs/gitbooks/en/features/token-compression.md@@ -89,7 +89,7 @@ Answers are size-capped, and an unknown or evicted handle is an error. `juice_reThe model's tool catalogue is recorded with each conversation and stays frozen when that thread resumes. If the transcript contains Juice tools, OpenHuman restores their recorded names and schemas even when current settings would not create new handles. The restored tools still use current host path authorization and module policy. A disabled or unavailable module returns an explicit unavailable result for a query; OpenHuman does not substitute a local CCR store or query implementation. Optional output compaction keeps its existing fail-open behavior and returns the unmodified result when the module cannot compact it.-To turn off the whole feature, set `context.compaction_enabled = false` or `OPENHUMAN_COMPACTION=0`. To keep compaction but go back to one-blob compression and `juice_retrieve`, set `tokenjuice.repl_handle_enabled = false` (`OPENHUMAN_TOKENJUICE_REPL_HANDLE_ENABLED=0`). Set `tokenjuice.repl_save_enabled = true` to also write each stored original to `<workspace>/.tokenjuice/repl/<handle>.txt` (mode 0600) so an agent can script over it. That puts raw tool output on disk, and nothing prunes it.+To turn off the whole feature, set `context.compaction_enabled = false` or `OPENHUMAN_COMPACTION=0`. To keep compaction but go back to one-blob compression and `juice_retrieve`, set `tokenjuice.repl_handle_enabled = false` (`OPENHUMAN_TOKENJUICE_REPL_HANDLE_ENABLED=0`).## Nothing is lost: the CCR cache@@ -125,7 +125,7 @@ Each rule names a command or tool pattern and a reduction strategy: skip and keeEverything lives under the `[tokenjuice]` config block (`crates/openhuman-core/src/config/schema/tokenjuice.rs`) and can be changed live.- Master switches: `context.compaction_enabled` (default `true`; `OPENHUMAN_COMPACTION=0` opts out) and `router_enabled` (default `true`).-- Handle preview: `repl_handle_enabled` (default `true`) and `repl_save_enabled` (default `false`).+- Handle preview: `repl_handle_enabled` (default `true`).- Thresholds: `min_bytes_to_compress` and `ccr_min_tokens`.- CCR: `ccr_enabled`, `ccr_disk_enabled`, `max_cache_entries`, `max_cache_bytes` and `ccr_ttl_secs`.- Per kind: `search_enabled`, `code_enabled`, `html_enabled`.