instar 1.3.196 → 1.3.197

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA+wDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAo2PtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA+wDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAk3PtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -38,7 +38,7 @@ import { AutoUpdater } from '../core/AutoUpdater.js';
38
38
  import { UpdateRestartHandshake, verifyRestartHandshake } from '../core/UpdateRestartHandshake.js';
39
39
  import { AutoDispatcher } from '../core/AutoDispatcher.js';
40
40
  import { DispatchExecutor } from '../core/DispatchExecutor.js';
41
- import { registerAgent, unregisterAgent, startHeartbeat } from '../core/AgentRegistry.js';
41
+ import { registerAgent, unregisterAgent, startHeartbeat, isFetchBlockedPort } from '../core/AgentRegistry.js';
42
42
  import { TelegraphService } from '../publishing/TelegraphService.js';
43
43
  import { PrivateViewer } from '../publishing/PrivateViewer.js';
44
44
  import { TunnelManager } from '../tunnel/TunnelManager.js';
@@ -1978,6 +1978,17 @@ export async function startServer(options) {
1978
1978
  // not via npm auto-updates. The migration was forcing autoApply: true
1979
1979
  // which overwrites our intentional autoApply: false setting.
1980
1980
  const serverSessionName = `${config.projectName}-server`;
1981
+ // Migration-parity warning: an EXISTING agent whose port predates the
1982
+ // fetch-blocked-port allocator guard (or was set by hand) silently can't mesh —
1983
+ // node fetch refuses WHATWG bad ports (e.g. 4045 = NFS lockd). New agents now
1984
+ // skip these at allocation; surface it loudly for ones already on a bad port so
1985
+ // the operator can re-port. (2026-06-02 incident.)
1986
+ if (typeof config.port === 'number' && isFetchBlockedPort(config.port)) {
1987
+ console.warn(pc.yellow(` ⚠ Port ${config.port} is on the WHATWG fetch "bad ports" list — multi-machine ` +
1988
+ `mesh (pairing/lease/heartbeat use node fetch) CANNOT reach this agent on this port. ` +
1989
+ `Change "port" in .instar/config.json to a non-blocked port (e.g. 4040–4044, 4046–4099) ` +
1990
+ `and restart if you use multi-machine.`));
1991
+ }
1981
1992
  if (options.foreground) {
1982
1993
  // Run in foreground — useful for development
1983
1994
  console.log(pc.bold(`Starting instar server for ${pc.cyan(config.projectName)}`));