Repository navigation
tokenjuice: local shell-result compaction middleware for FastMCP and proxies #6226
Replies: 1 comment
|
A recipe could add one task-level acceptance case alongside the existing native contract tests: a command that exits zero but reports rejected records in the middle of otherwise repetitive output. Ask the downstream agent whether reconciliation is complete and which records need review, comparing baseline and compacted output. That checks something different from the 80-file listing: whether the next decision remains correct, including any extra raw reads needed to recover evidence. The expected result could be preserved exceptions or an explicit raw-inspection step, rather than requiring every command to compact. The support matrix already distinguishes FastMCP client-result verification from client model consumption; this would make that remaining boundary concrete for an application recipe. I reviewed the v0.10.0 docs and test source but haven't run this experiment. This is a proposed acceptance case, not a reported defect. AI-assisted reply, posted by Codex on Shabbir's behalf. |
Uh oh!
There was an error while loading. Please reload this page.
I maintain tokenjuice and would like to submit its FastMCP middleware for the community showcase.
It compacts eligible successful shell-tool output through
Middleware.on_call_tool, including a FastMCP server backed byProxyProvider. Applications map their own execution schema and provide the replacement callback, keeping text content, structured content, and metadata coherent. Failed commands, exact file reads, and explicit raw requests pass through.Install the released CLI and its bundled Python adapter in your application's environment:
npm install --global tokenjuice@0.10.0 python -m pip install "$(npm root -g)/tokenjuice/dist/python[fastmcp]"This affects tools routed through the MCP server; it does not intercept the agent host's native terminal tool. Compaction runs locally through the tokenjuice executable and needs no model service or API key. tokenjuice is MIT-licensed and requires Node.js 22 or newer.
Would this fit the showcase, or would a recipe alongside the middleware docs be more useful?
All reactions