dsh-token-frugal

Cuts session input tokens three ways, each with its own switch in a panel under the composer: lossless structure-aware compression of tool results on `tools/post-execute`, then a per-tool head/tail elision that always names a recovery path through the shared spill store; tool-catalogue visibility per agent on `agent/created`; and a per-workspace memory document that recall matches against each new message and injects through `agent.inject`, so the transcript is not re-read. Measured 41.76% fewer prompt tokens over 149 recorded requests, with a bundled script that re-measures any profile.

Overview

Cuts session input tokens three ways, each with its own switch in a panel under the composer: lossless structure-aware compression of tool results on `tools/post-execute`, then a per-tool head/tail elision that always names a recovery path through the shared spill store; tool-catalogue visibility per agent on `agent/created`; and a per-workspace memory document that recall matches against each new message and injects through `agent.inject`, so the transcript is not re-read. Measured 41.76% fewer prompt tokens over 149 recorded requests, with a bundled script that re-measures any profile.

Installation

Install from GitHub

dsh plugin --profile web add github:xuzihao66/dsh-token-frugal

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands