sentoagent
Advanced tools
+1
-1
| { | ||
| "name": "sentoagent", | ||
| "version": "1.1.57", | ||
| "version": "1.1.58", | ||
| "description": "Agents sent to fight your battles. Self-improving AI agents powered by Claude Code.", | ||
@@ -5,0 +5,0 @@ "author": "Gabriel Gil", |
| export function renderGuardian(config) { | ||
| const startScript = config.agentName === "blair" ? "start-blair.sh" : "start-agent.sh"; | ||
| const startScript = "start-agent.sh"; | ||
@@ -731,2 +731,19 @@ return `#!/usr/bin/env node | ||
| // Spawn a fresh, fully-detached Guardian before this process exits after a | ||
| // self-update. The old comment claimed "cron @reboot or watchdog relaunches" | ||
| // — neither does: @reboot only fires on system boot, and watchdog.sh watches | ||
| // the tmux session, not Guardian. Without this respawn the agent zombies | ||
| // silently after every auto-update (this is the bug that killed Blair for | ||
| // ~3 weeks). setsid+nohup+</dev/null fully detaches from the dying parent so | ||
| // the new Guardian survives our process.exit(). | ||
| function respawnGuardian() { | ||
| try { | ||
| const guardianPath = HOME + '/workspace/guardian.mjs'; | ||
| execFileSync('bash', ['-c', 'setsid nohup node "' + guardianPath + '" >> "' + LOG + '" 2>&1 < /dev/null &'], { stdio: 'ignore' }); | ||
| log('Respawned detached Guardian — old process exiting.'); | ||
| } catch (e) { | ||
| log('Self-respawn failed: ' + e.message + ' — watchdog Guardian-check is the fallback.'); | ||
| } | ||
| } | ||
| async function checkForUpdates() { | ||
@@ -751,5 +768,5 @@ const now = Date.now(); | ||
| try { execFileSync(HOME + '/.npm-global/bin/sento', ['update'], { timeout: 120000, cwd: HOME + '/workspace', env }); } catch {} | ||
| log('Updated to v' + latest + '. Restarting Guardian...'); | ||
| log('Updated to v' + latest + '. Respawning Guardian...'); | ||
| notify('\\u2705 Updated to v' + latest + '. Guardian restarting...'); | ||
| // Exit — cron @reboot or watchdog will relaunch | ||
| respawnGuardian(); | ||
| setTimeout(() => process.exit(0), 2000); | ||
@@ -770,4 +787,5 @@ return; | ||
| try { execFileSync('npm', ['install', '--production'], { cwd: gitDir, timeout: 60000 }); } catch {} | ||
| log('Git updated. Restarting Guardian...'); | ||
| log('Git updated. Respawning Guardian...'); | ||
| notify('\\u2705 Updated. Guardian restarting...'); | ||
| respawnGuardian(); | ||
| setTimeout(() => process.exit(0), 2000); | ||
@@ -774,0 +792,0 @@ return; |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 4 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 4 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
188461
0.46%3986
0.43%