From 3ebd2b88815442d9ce506b4e6c3ebaa22cd822f2 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Wed, 22 Apr 2026 07:15:26 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@22717878cc6c1837e13df244be65f74e1a1eab61 --- .openclaw-sync/source.json | 4 +- docs/docs.json | 13 +++++++ docs/tools/index.md | 7 ++-- docs/tools/tokenjuice.md | 76 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 docs/tools/tokenjuice.md diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 2d42fdd8d..d0ff2404d 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "91ac48524610ab77cf2e104f91fe0a2bf5b13631", - "syncedAt": "2026-04-22T06:59:29.374Z" + "sha": "22717878cc6c1837e13df244be65f74e1a1eab61", + "syncedAt": "2026-04-22T07:15:25.710Z" } diff --git a/docs/docs.json b/docs/docs.json index 348efc1e6..29f895f46 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1238,6 +1238,7 @@ "tools/pdf", "tools/reactions", "tools/thinking", + "tools/tokenjuice", "tools/video-generation" ] }, @@ -2622,6 +2623,7 @@ "ja-JP/tools/pdf", "ja-JP/tools/reactions", "ja-JP/tools/thinking", + "ja-JP/tools/tokenjuice", "ja-JP/tools/video-generation" ] }, @@ -3391,6 +3393,7 @@ "es/tools/pdf", "es/tools/reactions", "es/tools/thinking", + "es/tools/tokenjuice", "es/tools/video-generation" ] }, @@ -4160,6 +4163,7 @@ "pt-BR/tools/pdf", "pt-BR/tools/reactions", "pt-BR/tools/thinking", + "pt-BR/tools/tokenjuice", "pt-BR/tools/video-generation" ] }, @@ -4929,6 +4933,7 @@ "ko/tools/pdf", "ko/tools/reactions", "ko/tools/thinking", + "ko/tools/tokenjuice", "ko/tools/video-generation" ] }, @@ -5698,6 +5703,7 @@ "de/tools/pdf", "de/tools/reactions", "de/tools/thinking", + "de/tools/tokenjuice", "de/tools/video-generation" ] }, @@ -6467,6 +6473,7 @@ "fr/tools/pdf", "fr/tools/reactions", "fr/tools/thinking", + "fr/tools/tokenjuice", "fr/tools/video-generation" ] }, @@ -7236,6 +7243,7 @@ "ar/tools/pdf", "ar/tools/reactions", "ar/tools/thinking", + "ar/tools/tokenjuice", "ar/tools/video-generation" ] }, @@ -8005,6 +8013,7 @@ "it/tools/pdf", "it/tools/reactions", "it/tools/thinking", + "it/tools/tokenjuice", "it/tools/video-generation" ] }, @@ -8774,6 +8783,7 @@ "tr/tools/pdf", "tr/tools/reactions", "tr/tools/thinking", + "tr/tools/tokenjuice", "tr/tools/video-generation" ] }, @@ -9543,6 +9553,7 @@ "uk/tools/pdf", "uk/tools/reactions", "uk/tools/thinking", + "uk/tools/tokenjuice", "uk/tools/video-generation" ] }, @@ -10312,6 +10323,7 @@ "id/tools/pdf", "id/tools/reactions", "id/tools/thinking", + "id/tools/tokenjuice", "id/tools/video-generation" ] }, @@ -11081,6 +11093,7 @@ "pl/tools/pdf", "pl/tools/reactions", "pl/tools/thinking", + "pl/tools/tokenjuice", "pl/tools/video-generation" ] }, diff --git a/docs/tools/index.md b/docs/tools/index.md index 33b66f1f2..26134f1a4 100644 --- a/docs/tools/index.md +++ b/docs/tools/index.md @@ -104,11 +104,12 @@ legacy `tools.bash.*` aliases normalize to the same protected exec paths. Plugins can register additional tools. Some examples: -- [Lobster](/tools/lobster) — typed workflow runtime with resumable approvals -- [LLM Task](/tools/llm-task) — JSON-only LLM step for structured output -- [Music Generation](/tools/music-generation) — shared `music_generate` tool with workflow-backed providers - [Diffs](/tools/diffs) — diff viewer and renderer +- [LLM Task](/tools/llm-task) — JSON-only LLM step for structured output +- [Lobster](/tools/lobster) — typed workflow runtime with resumable approvals +- [Music Generation](/tools/music-generation) — shared `music_generate` tool with workflow-backed providers - [OpenProse](/prose) — markdown-first workflow orchestration +- [Tokenjuice](/tools/tokenjuice) — compact noisy `exec` and `bash` tool results ## Tool configuration diff --git a/docs/tools/tokenjuice.md b/docs/tools/tokenjuice.md new file mode 100644 index 000000000..e03398d1a --- /dev/null +++ b/docs/tools/tokenjuice.md @@ -0,0 +1,76 @@ +--- +title: "Tokenjuice" +summary: "Compact noisy exec and bash tool results with an optional bundled plugin" +read_when: + - You want shorter `exec` or `bash` tool results in OpenClaw + - You want to enable the bundled tokenjuice plugin + - You need to understand what tokenjuice changes and what it leaves raw +--- + +# Tokenjuice + +`tokenjuice` is an optional bundled plugin that compacts noisy `exec` and `bash` +tool results after the command has already run. + +It changes the returned `tool_result`, not the command itself. Tokenjuice does +not rewrite shell input, rerun commands, or change exit codes. + +Today this applies to Pi embedded runs, where tokenjuice hooks the embedded +`tool_result` path and trims the output that goes back into the session. + +## Enable the plugin + +Fast path: + +```bash +openclaw config set plugins.entries.tokenjuice.enabled true +``` + +Equivalent: + +```bash +openclaw plugins enable tokenjuice +``` + +OpenClaw already ships the plugin. There is no separate `plugins install` +or `tokenjuice install openclaw` step. + +If you prefer editing config directly: + +```json5 +{ + plugins: { + entries: { + tokenjuice: { + enabled: true, + }, + }, + }, +} +``` + +## What tokenjuice changes + +- Compacts noisy `exec` and `bash` results before they are fed back into the session. +- Keeps the original command execution untouched. +- Preserves exact file-content reads and other commands that tokenjuice should leave raw. +- Stays opt-in: disable the plugin if you want verbatim output everywhere. + +## Verify it is working + +1. Enable the plugin. +2. Start a session that can call `exec`. +3. Run a noisy command such as `git status`. +4. Check that the returned tool result is shorter and more structured than the raw shell output. + +## Disable the plugin + +```bash +openclaw config set plugins.entries.tokenjuice.enabled false +``` + +Or: + +```bash +openclaw plugins disable tokenjuice +```