Skip to content

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

refactor(tokenjuice): import contract types directly from tinyjuice_bus

Steven Enamakel92a2675f6ed1
diff --git a/crates/openhuman-core/src/inference/tokenjuice/README.md b/crates/openhuman-core/src/inference/tokenjuice/README.md
index 2e517f103b..b01557dd6c 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/README.md
+++ b/crates/openhuman-core/src/inference/tokenjuice/README.md
@@ -17,7 +17,6 @@ OpenHuman-owned files:
| Path | Role |
| --- | --- |
| [`mod.rs`](./mod.rs) | TinyBus calls (through `tinyjuice_bus::names::methods` constants), config installation, pass-through fallback, and savings wiring. |
-| [`types.rs`](./types.rs) | Re-export of the `tinyjuice-bus` contract (`tinyjuice_bus::types::{AgentTokenjuiceCompression, CompressOptions, CompressedOutput, CompressorKind, ContentHint, ContentKind}` and `tinyjuice_bus::wire::{CacheStats, CompactResponse, InstallRequest, RangeUnit, RetrieveRange}`) under the paths ~40 call sites in this crate already use. |
| [`schemas.rs`](./schemas.rs) | JSON-RPC controller schemas and handlers. |
| [`config_patch.rs`](./config_patch.rs) | Partial update shape for the `[tokenjuice]` config block. |
| [`generate.rs`](./generate.rs) | Turn-bound, single-use summary callbacks. The host registers the model call, sends its opaque ticket through the existing contract, and withdraws the callback when the ticket drops. |
@@ -86,3 +85,5 @@ behavior. There is no linked implementation fallback.
- [Parent module README](../README.md)
- [tinyjuice](../../../../../vendor/tinyjuice/README.md)
+
+Contract types are imported directly from `tinyjuice_bus::types` and `tinyjuice_bus::wire`; the adapter keeps serialization compatibility tests in `mod_contract_tests.rs`.
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod.rs b/crates/openhuman-core/src/inference/tokenjuice/mod.rs
index da64387105..7e4134d2c6 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/mod.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/mod.rs
@@ -9,6 +9,7 @@ pub mod schemas;
pub mod tools;
use tinyjuice_bus::names::methods;
+use tinyjuice_bus::types::{AgentTokenjuiceCompression, CompressorKind, ContentKind};
pub use repl_tools::{is_repl_tool, repl_tools, repl_tools_for, REPL_TOOL_NAMES};
pub use tools::TokenjuiceRetrieveTool;
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod_contract_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/mod_contract_tests.rs
index aebfc114d3..f4c377a7c2 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/mod_contract_tests.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/mod_contract_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use tinyjuice_bus::types::{CompressOptions, ContentHint, ContentKind};
+use tinyjuice_bus::types::{CompressOptions, ContentHint};
#[test]
fn compress_options_accept_omitted_fields() {