mslxdff 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/mslxdff.js CHANGED
@@ -758,7 +758,7 @@ Usage:
758
758
  mslxdff -help show this help
759
759
 
760
760
  Environment:
761
- PORT listen port (default 8989)
761
+ MSLXDFF_PORT listen port (default 8989; use mslxdff -port N to persist)
762
762
  MSLXDFF_STATE_FILE token/port state file
763
763
  MSLXDFF_DAEMON_DIR daemon pid/log/models dir
764
764
  UPSTREAM_BASE_URL upstream base (default https://opencode.ai)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mslxdff",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "测试项目,请勿使用。",
5
5
  "type": "module",
6
6
  "bin": {
package/src/server.js CHANGED
@@ -33,9 +33,13 @@ export function startServer({ router, signals = true }, port = resolvePort()) {
33
33
  }
34
34
 
35
35
  export function resolvePort() {
36
+ // 8989 is the hard default. Port only changes via an explicit, mslxdff-owned
37
+ // override: the persisted `-port N` setting, or the MSLXDFF_PORT env var.
38
+ // Bare `PORT` is deliberately NOT read — an ssh session / wrapper script
39
+ // commonly injects it and would silently override the default.
36
40
  const persisted = getPort();
37
41
  if (persisted) return persisted;
38
- const env = Number(process.env.PORT);
42
+ const env = Number(process.env.MSLXDFF_PORT);
39
43
  // 0 = OS-assigned ephemeral port (valid; used by tests/containers)
40
44
  if (Number.isInteger(env) && env >= 0) return env;
41
45
  return DEFAULT_PORT;