instar 1.3.340 → 1.3.341

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;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA65RtE;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;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA06RtE;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"}
@@ -4428,6 +4428,18 @@ export async function startServer(options) {
4428
4428
  // lifeline to restart the server in a tight loop.
4429
4429
  await sessionManager.purgeDeadSessions();
4430
4430
  sessionManager.startMonitoring();
4431
+ // Pending-inject recovery (finding 8d300555): re-deliver initial messages
4432
+ // orphaned by the previous server process dying in the spawn→ready→inject
4433
+ // window (the auto-updater restart race). Runs AFTER the purge so dead
4434
+ // sessions are already settled, and in the background — the ready-waits
4435
+ // inside can take up to 90s per session and must not block boot.
4436
+ void sessionManager.recoverPendingInjects().catch((err) => {
4437
+ // @silent-fallback-ok boot recovery is a backstop that must NEVER crash
4438
+ // boot — its own internal failures already route to DegradationReporter
4439
+ // (sweepPendingInjects.reportLoss); this outer guard only catches an
4440
+ // unexpected throw from the sweep harness itself.
4441
+ console.error(`[server] Pending-inject recovery failed (non-fatal): ${err instanceof Error ? err.message : String(err)}`);
4442
+ });
4431
4443
  // StuckInputSentinel — persistent, restart-safe recovery for tmux prompts
4432
4444
  // that hold text but never submitted Enter. Complements the in-process
4433
4445
  // verifyInjection timers (PR #159) which die when the server crashes.