Skip to content

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

docs(tokenjuice): update README to reflect shared tinyjuice-host ownership

Steven Enamakel4fe047241982
diff --git a/crates/openhuman-core/src/inference/tokenjuice/README.md b/crates/openhuman-core/src/inference/tokenjuice/README.md
index 746b593277..76daf992f7 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/README.md
+++ b/crates/openhuman-core/src/inference/tokenjuice/README.md
@@ -19,9 +19,9 @@ OpenHuman-owned files:
| [`mod.rs`](./mod.rs) | TinyBus calls (through `tinyjuice_bus::names::methods` constants), config installation, pass-through fallback, and savings wiring. |
| [`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. |
-| [`repl_tools.rs`](./repl_tools.rs) | The three REPL tools (`juice_find`, `juice_extract`, `juice_summarize`) over a stored result. Declarations come from `tinyjuice-bus`; operations execute over `Query` inside the module CCR store. Registered by [`tools/ops.rs`](../../tools/ops.rs) only while `repl_handle_active(config)`. |
-| [`tools.rs`](./tools.rs) | OpenHuman agent tool implementation for the retrieve tool (`tinyjuice_bus::tools::RETRIEVE` (`"juice_retrieve"`); `"tokenjuice_retrieve"` is a recognized recovery-tool alias, not the tool's registered name, see `RECOVERY_TOOL_NAMES`). |
+| `tinyjuice-host::generate` | Shared turn-bound, single-use summary callback tickets; OpenHuman still registers the callback bound to its active model turn. |
+| [`repl_tools.rs`](./repl_tools.rs) | OpenHuman's query-source adapter, which binds TinyJuice's shared REPL tools to the active `DispatchCtx` and module configuration. Tool declarations, artifact path checks and execution are owned by `tinyjuice-host`. |
+| `tinyjuice-host::retrieve_tool` | Shared retrieval tool implementation and declaration; OpenHuman supplies the callback that reads from the module CCR store. |
| Plain text | Compressed with TinyJuice's deterministic TextCrusher. |
| [`savings.rs`](./savings.rs) | Thin adapter: attribution model and `agent::cost` price per input token; the module (`RecordSavings`, `SavingsStats`, `ResetSavings`) does the aggregate math and persists the `juice.savings` document in its storage (a legacy `state/tokenjuice_savings.json` is imported once). |
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod.rs b/crates/openhuman-core/src/inference/tokenjuice/mod.rs
index 9133612719..081943ee13 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/mod.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/mod.rs
@@ -51,10 +51,7 @@ impl tinytools::Tool for TokenjuiceRetrieveTool {
tinytools::Tool::external_effect(&self.0)
}
- async fn execute(
- &self,
- args: serde_json::Value,
- ) -> anyhow::Result<tinytools::ToolResult> {
+ async fn execute(&self, args: serde_json::Value) -> anyhow::Result<tinytools::ToolResult> {
tinytools::Tool::execute(&self.0, args).await
}
}
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs
index 2265f78dab..711f7c12d0 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs
@@ -6,7 +6,10 @@ use tinytools::Tool;
fn host_tools_keep_the_published_recovery_names_and_schemas() {
let retrieve = TokenjuiceRetrieveTool::new();
assert_eq!(retrieve.name(), "juice_retrieve");
- assert_eq!(retrieve.permission_level(), tinytools::PermissionLevel::ReadOnly);
+ assert_eq!(
+ retrieve.permission_level(),
+ tinytools::PermissionLevel::ReadOnly
+ );
assert!(!retrieve.external_effect());
assert_eq!(
serde_json::to_vec(&retrieve.parameters_schema()).unwrap(),
diff --git a/crates/openhuman-core/src/inference/tokenjuice/repl_tools.rs b/crates/openhuman-core/src/inference/tokenjuice/repl_tools.rs
index 97ac8393d7..282f5e5438 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/repl_tools.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/repl_tools.rs
@@ -91,7 +91,11 @@ pub(crate) fn repl_tools_with_artifacts(
/// The current TinyJuice REPL declarations for ordinary turns.
pub fn repl_tools() -> Vec<Box<dyn Tool>> {
- host_tools(Arc::new(ModuleSource { config: None }), ReplLimits::default(), None)
+ host_tools(
+ Arc::new(ModuleSource { config: None }),
+ ReplLimits::default(),
+ None,
+ )
}
/// Offer the REPL only while enabled handle storage can produce queryable handles.
@@ -147,4 +151,3 @@ pub(crate) fn repl_tools_for_recorded(
#[cfg(test)]
#[path = "repl_tools_tests.rs"]
mod tests;
-