instar 1.3.95 → 1.3.96

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;AAmSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAquDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAw0OtE;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;AAmSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAquDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAq1OtE;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"}
@@ -6859,6 +6859,19 @@ export async function startServer(options) {
6859
6859
  try {
6860
6860
  const { WakeSocketServer } = await import('../threadline/WakeSocketServer.js');
6861
6861
  wakeSocketServer = new WakeSocketServer(config.stateDir);
6862
+ // CRITICAL (fleet crash-loop fix): WakeSocketServer emits 'error'
6863
+ // ASYNCHRONOUSLY (e.g. EADDRINUSE when a live peer — a duplicate instance
6864
+ // or a transient rapid-respawn race — already holds listener.sock). The
6865
+ // try/catch around .start() only catches synchronous errors, so without a
6866
+ // listener this async 'error' is an unhandled EventEmitter 'error' and
6867
+ // CRASHES THE WHOLE SERVER PROCESS. Combined with the supervisor respawn,
6868
+ // that produced an unrecoverable crash loop (observed: inspec, 1830
6869
+ // restarts). The wake socket is an optimization (fast wake/failover from
6870
+ // the listener daemon) — degrade gracefully without it rather than take
6871
+ // the entire agent down.
6872
+ wakeSocketServer.on('error', (err) => {
6873
+ console.log(pc.dim(` Wake socket: degraded — continuing without it (${err instanceof Error ? err.message : err})`));
6874
+ });
6862
6875
  wakeSocketServer.on('wake', () => {
6863
6876
  // Daemon wrote a new inbox entry — read and process it
6864
6877
  const inboxPath = path.join(config.stateDir, 'threadline', 'inbox.jsonl.active');