Tokenjuice
tokenjuice 是一個選用的外部外掛程式,可在命令執行後壓縮嘈雜的 exec 和 bash
工具結果。
它會變更傳回的 tool_result,而非命令本身。Tokenjuice 不會
重寫 shell 輸入、重新執行命令或變更退出代碼。
目前這適用於 Codex app-server harness 中的 OpenClaw 嵌入式運行和 OpenClaw 動態工具。Tokenjuice 掛鉤 OpenClaw 的工具結果中介軟體,並在輸出返回到作用中的 harness 會話之前對其進行修剪。
啟用外掛程式
Section titled “啟用外掛程式”安裝一次:
openclaw plugins install clawhub:@openclaw/tokenjuice然後啟用它:
openclaw config set plugins.entries.tokenjuice.enabled true同等於:
openclaw plugins enable tokenjuice如果您偏好直接編輯組態:
{ plugins: { entries: { tokenjuice: { enabled: true, }, }, },}Tokenjuice 的變更內容
Section titled “Tokenjuice 的變更內容”- 在將嘈雜的
exec和bash結果饋送回工作階段之前壓縮它們。 - 保持原始命令執行不變。
- 保留精確的檔案內容讀取,以及 tokenjuice 應保持原樣的其他命令。
- 保持選擇性加入:如果您希望到處都是逐字輸出,請停用外掛程式。
驗證是否正常運作
Section titled “驗證是否正常運作”- 啟用外掛程式。
- 啟動可呼叫
exec的工作階段。 - 執行嘈雜的命令,例如
git status。 - 檢查傳回的工具結果是否比原始 shell 輸出更短且更有結構。
停用外掛程式
Section titled “停用外掛程式”openclaw config set plugins.entries.tokenjuice.enabled false或者:
openclaw plugins disable tokenjuice