wolverine-ai 2.8.2 → 2.8.3
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/package.json +1 -1
- package/server/config/settings.json +2 -2
- package/src/core/runner.js +10 -1
- package/src/core/wolverine.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wolverine-ai",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "Self-healing Node.js server framework powered by AI. Catches crashes, diagnoses errors, generates fixes, verifies, and restarts — automatically.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"hybrid_settings": {
|
|
35
35
|
"reasoning": "claude-haiku-4-5",
|
|
36
36
|
"coding": "claude-sonnet-4-6",
|
|
37
|
-
"chat": "
|
|
37
|
+
"chat": "gpt-5-nano",
|
|
38
38
|
"tool": "claude-sonnet-4-6",
|
|
39
39
|
"classifier": "gpt-4o-mini",
|
|
40
40
|
"audit": "gpt-4o-mini",
|
|
41
|
-
"compacting": "
|
|
41
|
+
"compacting": "gpt-4o-mini",
|
|
42
42
|
"research": "o4-mini-deep-research",
|
|
43
43
|
"embedding": "text-embedding-3-small"
|
|
44
44
|
},
|
package/src/core/runner.js
CHANGED
|
@@ -405,12 +405,21 @@ class WolverineRunner {
|
|
|
405
405
|
|
|
406
406
|
if (!this.running) return;
|
|
407
407
|
|
|
408
|
-
|
|
408
|
+
// Clean exit or graceful shutdown — don't heal
|
|
409
|
+
if (code === 0 || signal === "SIGTERM" || signal === "SIGINT") {
|
|
409
410
|
console.log(chalk.green("\n✅ Process exited cleanly."));
|
|
410
411
|
this.logger.info(EVENT_TYPES.PROCESS_HEALTHY, "Process exited cleanly");
|
|
411
412
|
return;
|
|
412
413
|
}
|
|
413
414
|
|
|
415
|
+
// Killed by signal with no stderr — just restart, don't waste tokens healing
|
|
416
|
+
if (!this._stderrBuffer.trim() || this._stderrBuffer.trim().length < 10) {
|
|
417
|
+
console.log(chalk.yellow(`\n⚠️ Process killed (code: ${code}, signal: ${signal}) — no error to heal, restarting`));
|
|
418
|
+
this.logger.warn(EVENT_TYPES.PROCESS_CRASH, `Killed with no stderr (code: ${code}, signal: ${signal})`, { exitCode: code, signal });
|
|
419
|
+
this._spawn();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
|
|
414
423
|
const uptime = Date.now() - this._lastStartTime;
|
|
415
424
|
console.log(chalk.red(`\n💥 Process crashed with exit code ${code} (uptime: ${Math.round(uptime / 1000)}s)`));
|
|
416
425
|
this.logger.error(EVENT_TYPES.PROCESS_CRASH, `Crashed with code ${code}`, {
|
package/src/core/wolverine.js
CHANGED
|
@@ -45,6 +45,13 @@ async function _healImpl({ stderr, cwd, sandbox, notifier, rateLimiter, backupMa
|
|
|
45
45
|
const healStartTime = Date.now();
|
|
46
46
|
const { redact, hasSecrets } = require("../security/secret-redactor");
|
|
47
47
|
|
|
48
|
+
// Guard: don't burn tokens on empty stderr (signal kills, clean shutdowns, etc.)
|
|
49
|
+
if (!stderr || stderr.trim().length < 10) {
|
|
50
|
+
console.log(chalk.yellow("\n🐺 Empty stderr — nothing to heal (likely signal kill)"));
|
|
51
|
+
if (logger) logger.warn(EVENT_TYPES.HEAL_FAILED, "Empty stderr — skipping heal");
|
|
52
|
+
return { healed: false, explanation: "Empty stderr — nothing to diagnose" };
|
|
53
|
+
}
|
|
54
|
+
|
|
48
55
|
// Redact secrets BEFORE any processing, logging, or AI calls
|
|
49
56
|
const safeStderr = redact(stderr);
|
|
50
57
|
|