Skip to content

v1.2.7 — crash / lie / leak / hang fixes + publish gate

Choose a tag to compare

@stallenlu stallenlu released this 09 Nov 12:24
· 4 commits to main since this release

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 the TextDecoder and handles a trailing unterminated data: 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 through ctx.effect so 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/Host are rejected, the route handler has a .catch so a destroyed response cannot become an unhandled rejection, and the probe loop stops once the scope is disposed.
  • SSRF: baseURL pointing at link-local / metadata addresses (169.254.*, fe80::*) is refused; loopback is unchanged.

Publish gate

  • engines.node is now >=22.13.0 (required by node:sqlite).
  • npm test and prepack both run smoke.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.tgz and are asserted against package.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