dsh-spend-guard: Adding rolling window spend circuit breaking for DeepSeek Harness

dsh-spend-guard is a DeepSeek Harness host plugin (admin-security, v0.1.1) maintained by summmmerz. It polls the dsh-cost-meter ledger (ledger.json) to calculate the RMB spend within a rolling window (default 10 minutes) using the daily aggregate cost differential. It triggers a Windows notification upon reaching ¥1 and terminates the current turn via agent.cancel (equivalent to a GUI stop) upon reaching ¥2. Configuration is overridden via cordis.patch.yml. It relies on cost-meter for disk persistence and does not perform circuit breaking if the ledger is unreadable. The article explains the differences regarding budget display between cost-meter and other budget plugins, as well as the rationale for continuing to use aggregate counts when sessions are truncated, along with known limitations.

Read More