Repository navigation
v1.2.7 — crash / lie / leak / hang fixes + publish gate
dsh-freellmapi v1.2.7
One commit on top of v1.2.6 that closes the crash / lie / leak / hang findings and adds a publish gate. Version 1.2.6 had already been published, so this ships as 1.2.7.
Fixes
- Hang: the SSE reader now ends on
[DONE]instead of waiting for the 300 s request timeout; it also flushes theTextDecoderand handles a trailing unterminateddata:line, so a stream that ends without a finish reason is reported correctly instead of as a transport error. - Leak (process): when the bundled server's startup throws (spawn error, early exit, port taken, grace timeout), the spawned child is now killed, so a retry cannot leave an orphan holding the port.
- Crash (panel): rank scores are checked to be finite numbers before
toFixed(3); the main panel slot is registered throughctx.effectso hot reload disposes the old one. - Lie (panel): a failed save no longer clears the draft and shows "已保存 / saved"; router state and its 2.5 s polling are now a single module-level instance shared by the panel and the bundle view.
- Leak / robustness (panel API): requests with no
Origin/Hostare rejected, the route handler has a.catchso a destroyed response cannot become an unhandled rejection, and the probe loop stops once the scope is disposed. - SSRF:
baseURLpointing at link-local / metadata addresses (169.254.*,fe80::*) is refused; loopback is unchanged.
Publish gate
engines.nodeis now>=22.13.0(required bynode:sqlite).npm testandprepackboth runsmoke.mjs(36 checks), so the tarball cannot be built from a broken tree.- The install URLs in README.md / README.zh.md now point at
v1.2.7/dsh-freellmapi-1.2.7.tgzand are asserted againstpackage.json.version.
The attached dsh-freellmapi-1.2.7.tgz is prebuilt (identical file set to the published npm package, including the bundled vendor/node_modules runtime deps):
dsh plugin --profile <profile> add https://github.com/stallenlu/dsh-freellmapi/releases/download/v1.2.7/dsh-freellmapi-1.2.7.tgz