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 +1 -1
- package/package.json +1 -1
- package/src/server.js +5 -1
package/bin/mslxdff.js
CHANGED
|
@@ -758,7 +758,7 @@ Usage:
|
|
|
758
758
|
mslxdff -help show this help
|
|
759
759
|
|
|
760
760
|
Environment:
|
|
761
|
-
|
|
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
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.
|
|
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;
|