instar 1.3.162 → 1.3.163
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +6 -11
- package/dist/commands/server.js.map +1 -1
- package/dist/core/uncaughtExceptionPolicy.d.ts +8 -0
- package/dist/core/uncaughtExceptionPolicy.d.ts.map +1 -0
- package/dist/core/uncaughtExceptionPolicy.js +44 -0
- package/dist/core/uncaughtExceptionPolicy.js.map +1 -0
- package/dist/messaging/slack/SocketModeClient.d.ts.map +1 -1
- package/dist/messaging/slack/SocketModeClient.js +15 -3
- package/dist/messaging/slack/SocketModeClient.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.163.md +24 -0
- package/upgrades/side-effects/slack-reconnect-crash-guard.md +40 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqwDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0vPtE;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"}
|
package/dist/commands/server.js
CHANGED
|
@@ -15,6 +15,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
15
15
|
import pc from 'picocolors';
|
|
16
16
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
17
17
|
import { loadConfig, ensureStateDir, detectTmuxPath } from '../core/Config.js';
|
|
18
|
+
import { isNonFatalUncaught } from '../core/uncaughtExceptionPolicy.js';
|
|
18
19
|
import { SessionManager } from '../core/SessionManager.js';
|
|
19
20
|
import { StateManager } from '../core/StateManager.js';
|
|
20
21
|
import { StuckInputSentinel } from '../core/StuckInputSentinel.js';
|
|
@@ -9357,17 +9358,11 @@ export async function startServer(options) {
|
|
|
9357
9358
|
// the "mutex lock failed" error on next start. This doesn't prevent the crash,
|
|
9358
9359
|
// but ensures the next boot is clean.
|
|
9359
9360
|
process.on('uncaughtException', (err) => {
|
|
9360
|
-
//
|
|
9361
|
-
//
|
|
9362
|
-
//
|
|
9363
|
-
//
|
|
9364
|
-
|
|
9365
|
-
'Cannot set headers after they are sent',
|
|
9366
|
-
'write after end',
|
|
9367
|
-
'ERR_HTTP_HEADERS_SENT',
|
|
9368
|
-
'ERR_STREAM_WRITE_AFTER_END',
|
|
9369
|
-
];
|
|
9370
|
-
if (nonFatalPatterns.some(p => err.message?.includes(p))) {
|
|
9361
|
+
// Isolated, recoverable uncaught exceptions — log and continue, don't
|
|
9362
|
+
// crash the server (which would close its databases + drop in-flight
|
|
9363
|
+
// work). See isNonFatalUncaught for the allowlist + rationale (HTTP
|
|
9364
|
+
// double-response races, Slack Socket Mode reconnect races).
|
|
9365
|
+
if (isNonFatalUncaught(err)) {
|
|
9371
9366
|
console.warn(`[WARN] Non-fatal uncaught exception (suppressed): ${err.message}`);
|
|
9372
9367
|
return; // Don't crash — the server is fine
|
|
9373
9368
|
}
|