Skip to content

Tokenjuice

tokenjuice 是一個選用的外部外掛程式,可在命令執行後壓縮嘈雜的 execbash 工具結果。

它會變更傳回的 tool_result,而非命令本身。Tokenjuice 不會 重寫 shell 輸入、重新執行命令或變更退出代碼。

目前這適用於 Codex app-server harness 中的 OpenClaw 嵌入式運行和 OpenClaw 動態工具。Tokenjuice 掛鉤 OpenClaw 的工具結果中介軟體,並在輸出返回到作用中的 harness 會話之前對其進行修剪。

安裝一次:

Terminal window
openclaw plugins install clawhub:@openclaw/tokenjuice

然後啟用它:

Terminal window
openclaw config set plugins.entries.tokenjuice.enabled true

同等於:

Terminal window
openclaw plugins enable tokenjuice

如果您偏好直接編輯組態:

{
plugins: {
entries: {
tokenjuice: {
enabled: true,
},
},
},
}
  • 在將嘈雜的 execbash 結果饋送回工作階段之前壓縮它們。
  • 保持原始命令執行不變。
  • 保留精確的檔案內容讀取,以及 tokenjuice 應保持原樣的其他命令。
  • 保持選擇性加入:如果您希望到處都是逐字輸出,請停用外掛程式。
  1. 啟用外掛程式。
  2. 啟動可呼叫 exec 的工作階段。
  3. 執行嘈雜的命令,例如 git status
  4. 檢查傳回的工具結果是否比原始 shell 輸出更短且更有結構。
Terminal window
openclaw config set plugins.entries.tokenjuice.enabled false

或者:

Terminal window
openclaw plugins disable tokenjuice