instar 0.23.10 → 0.23.12
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/cli.js +0 -0
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +31 -11
- package/dist/commands/server.js.map +1 -1
- package/dist/monitoring/StallTriageNurse.d.ts +11 -0
- package/dist/monitoring/StallTriageNurse.d.ts.map +1 -1
- package/dist/monitoring/StallTriageNurse.js +38 -0
- package/dist/monitoring/StallTriageNurse.js.map +1 -1
- package/dist/monitoring/StallTriageNurse.types.d.ts +9 -0
- package/dist/monitoring/StallTriageNurse.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/0.23.12.md +30 -0
- package/dist/core/ResponseReviewGate.d.ts +0 -182
- package/dist/core/ResponseReviewGate.d.ts.map +0 -1
- package/dist/core/ResponseReviewGate.js +0 -956
- package/dist/core/ResponseReviewGate.js.map +0 -1
- package/upgrades/0.23.10.md +0 -19
- package/upgrades/NEXT.md +0 -35
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiiCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAk3EtE;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
|
@@ -1006,15 +1006,22 @@ async function ensureAgentUpdatesTopic(telegram, state) {
|
|
|
1006
1006
|
*/
|
|
1007
1007
|
async function ensureSqliteBindings() {
|
|
1008
1008
|
try {
|
|
1009
|
-
await import('better-sqlite3');
|
|
1010
|
-
//
|
|
1009
|
+
const BetterSqlite3 = (await import('better-sqlite3')).default;
|
|
1010
|
+
// Import alone doesn't catch all mismatches — some NODE_MODULE_VERSION
|
|
1011
|
+
// conflicts cause runtime crashes (C++ mutex errors) rather than import errors.
|
|
1012
|
+
// Actually opening an in-memory DB exercises the native bindings fully.
|
|
1013
|
+
const testDb = new BetterSqlite3(':memory:');
|
|
1014
|
+
testDb.pragma('journal_mode = WAL');
|
|
1015
|
+
testDb.close();
|
|
1011
1016
|
return false;
|
|
1012
1017
|
}
|
|
1013
1018
|
catch (err) {
|
|
1014
1019
|
const reason = err instanceof Error ? err.message : String(err);
|
|
1015
1020
|
const isBindingError = reason.includes('Could not locate the bindings file') ||
|
|
1016
1021
|
reason.includes('better-sqlite3') ||
|
|
1017
|
-
reason.includes('was compiled against a different Node.js version')
|
|
1022
|
+
reason.includes('was compiled against a different Node.js version') ||
|
|
1023
|
+
reason.includes('NODE_MODULE_VERSION') ||
|
|
1024
|
+
reason.includes('mutex lock failed');
|
|
1018
1025
|
if (!isBindingError)
|
|
1019
1026
|
return false; // Not a binding issue — let subsystems handle it.
|
|
1020
1027
|
console.log(pc.yellow(' better-sqlite3: native binding mismatch detected — auto-rebuilding for current Node.js version...'));
|
|
@@ -1026,14 +1033,27 @@ async function ensureSqliteBindings() {
|
|
|
1026
1033
|
execFileSync(process.execPath, [fixScript], { encoding: 'utf-8', timeout: 60000, stdio: 'pipe' });
|
|
1027
1034
|
}
|
|
1028
1035
|
else {
|
|
1029
|
-
// Fallback: npm rebuild
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1036
|
+
// Fallback: npm rebuild in the directory containing better-sqlite3.
|
|
1037
|
+
// Shadow installs have their own node_modules — try that first, then global.
|
|
1038
|
+
const instarDir = new URL('../../..', import.meta.url).pathname;
|
|
1039
|
+
const shadowBs3 = path.join(instarDir, 'node_modules', 'better-sqlite3');
|
|
1040
|
+
if (fs.existsSync(shadowBs3)) {
|
|
1041
|
+
execSync('npm rebuild better-sqlite3', {
|
|
1042
|
+
cwd: instarDir,
|
|
1043
|
+
encoding: 'utf-8',
|
|
1044
|
+
timeout: 60000,
|
|
1045
|
+
stdio: 'pipe',
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
const globalInstarDir = execSync('npm root -g', { encoding: 'utf-8', timeout: 10000 }).trim() + '/instar';
|
|
1050
|
+
execSync('npm rebuild better-sqlite3', {
|
|
1051
|
+
cwd: globalInstarDir,
|
|
1052
|
+
encoding: 'utf-8',
|
|
1053
|
+
timeout: 60000,
|
|
1054
|
+
stdio: 'pipe',
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1037
1057
|
}
|
|
1038
1058
|
console.log(pc.green(' better-sqlite3: rebuilt successfully — restarting to apply (ESM module cache must be cleared).'));
|
|
1039
1059
|
return true; // Restart needed — ESM cache holds the stale failure
|