Repository navigation
v0.4.8 - Keep the wire request alive past the terminal event
v0.4.8 - Stop hanging up on middlewares and stop flooding the page
The turn no longer looks aborted to an accounting middleware
When a stream reached its terminal event, the transport closed the wire request
straight away. Anything sitting between DSH and the gateway — billion-context,
a proxy that bills by completed stream, a logging shim — saw that close before it
had written its own trailer, recorded "client disconnected mid-stream" and
counted the turn as abandoned.
The transport now owns the abort signal it hands to fetch. The consumer's
signal is still honoured, but only until the terminal event: after it, the
request is read to its end (bounded by TERMINAL_DRAIN_MS, 5 s) while the
consumer already has its response. A consumer that gives up before the terminal
event still cancels the wire request, so a stopped turn stays stopped.
Measured with a middleware that logs the same way billion-context does:
| Build | Middleware verdict |
|---|---|
| 0.4.7 | client disconnected mid-stream (bytes=946) |
| 0.4.8 | no such line |
A live turn on a real 0.2.2-rc.3 harness was run against both builds in the same
profile: 0.4.7 produced the log line, 0.4.8 did not, and both rendered
"Pong from the fixture."
The request log is a disclosure, not a wall of text
Every turn appended three diagnostics entries (payload, HTTP response, stream
completed), and the settings page printed all 50 of them. The log now lives
behind Diagnostics · N, collapsed by default, with the readback revision in
its own disclosure next to it.
Verification
- 94 tests, 94 passing (
node --test), including two new transport tests that
fail on 0.4.7: "a consumer that stops after the terminal event does not hang up
on a middleware" and "a consumer that stops before the terminal event cancels
the wire request". - End-to-end through the real
PiAiAdapterwith an accounting middleware:
midStreamClose: false, all five events, 778 bytes, one trailer. - Static preview of the settings page with 18 diagnostics entries: only the
summary lines are visible.
Update
npx @deepseek-ai/dsh plugin --profile web add '@thebtf/dsh-cliproxyapi-provider@0.4.8'
Or pin the GitHub tag: github:thebtf/dsh-cliproxyapi-provider#v0.4.8.