@misterhuydo/sentinel 1.4.94 → 1.4.96
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/.cairn/.hint-lock +1 -1
- package/.cairn/session.json +2 -2
- package/lib/generate.js +8 -8
- package/package.json +1 -1
- package/python/sentinel/slack_bot.py +3 -1
package/.cairn/.hint-lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-30T05:36:03.379Z
|
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-
|
|
3
|
-
"checkpoint_at": "2026-03-
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-30T05:40:35.480Z",
|
|
3
|
+
"checkpoint_at": "2026-03-30T05:40:35.481Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/lib/generate.js
CHANGED
|
@@ -81,7 +81,7 @@ for _jdk in "$HOME"/jdk-* "$HOME"/.jdk /usr/lib/jvm/java-21-openjdk /usr/lib/jvm
|
|
|
81
81
|
done
|
|
82
82
|
# Ensure npm-global bin (cairn-mcp, claude), ~/.local/bin (auto-installed tools), and JAVA_HOME on PATH
|
|
83
83
|
export PATH="$HOME/.npm-global/bin:$HOME/.local/bin:$PATH"
|
|
84
|
-
[[ -n "
|
|
84
|
+
[[ -n "\${JAVA_HOME:-}" ]] && export PATH="\${JAVA_HOME:-}/bin:\$PATH"
|
|
85
85
|
PYTHONPATH="${codeDir}" "${codeDir}/.venv/bin/python3" -m sentinel.main --config ./config \\
|
|
86
86
|
>> "$DIR/logs/sentinel.log" 2>&1 &
|
|
87
87
|
echo $! > "$PID_FILE"
|
|
@@ -312,12 +312,12 @@ for project_dir in "$WORKSPACE"/*/; do
|
|
|
312
312
|
done
|
|
313
313
|
echo "[sentinel] $stopped project(s) stopped"
|
|
314
314
|
`, { mode: 0o755 });
|
|
315
|
-
// watchdog.sh - restarts any project that has stopped unexpectedly.
|
|
316
|
-
// Auto-installed as a cron job by `sentinel upgrade`.
|
|
317
|
-
fs.writeFileSync(path.join(workspace, 'watchdog.sh'),
|
|
318
|
-
"#!/usr/bin/env bash\n# Sentinel watchdog - auto-restart any project that has stopped unexpectedly.\n# Runs every minute via cron. Safe to run manually at any time.\nWORKSPACE=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nNON_PROJECT=\"code repos logs issues workspace\"\nfor project_dir in \"$WORKSPACE\"/*/; do\n [[ -d \"$project_dir\" ]] || continue\n name=$(basename \"$project_dir\")\n echo \" $NON_PROJECT \" | grep -qw \"$name\" && continue\n [[ -f \"$project_dir/start.sh\" ]] || continue\n [[ -f \"$project_dir/config/sentinel.properties\" ]] || continue\n PID_FILE=\"$project_dir/sentinel.pid\"\n if [[ -f \"$PID_FILE\" ]] && kill -0 \"$(cat \"$PID_FILE\")\" 2>/dev/null; then\n continue # running fine\n fi\n echo \"[watchdog] $(date -u +%Y-%m-%dT%H:%M:%SZ) $name is down - restarting\"\n bash \"$project_dir/start.sh\"\ndone\n",
|
|
319
|
-
{ mode: 0o755 });
|
|
315
|
+
// watchdog.sh - restarts any project that has stopped unexpectedly.
|
|
316
|
+
// Auto-installed as a cron job by `sentinel upgrade`.
|
|
317
|
+
fs.writeFileSync(path.join(workspace, 'watchdog.sh'),
|
|
318
|
+
"#!/usr/bin/env bash\n# Sentinel watchdog - auto-restart any project that has stopped unexpectedly.\n# Runs every minute via cron. Safe to run manually at any time.\nWORKSPACE=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nNON_PROJECT=\"code repos logs issues workspace\"\nfor project_dir in \"$WORKSPACE\"/*/; do\n [[ -d \"$project_dir\" ]] || continue\n name=$(basename \"$project_dir\")\n echo \" $NON_PROJECT \" | grep -qw \"$name\" && continue\n [[ -f \"$project_dir/start.sh\" ]] || continue\n [[ -f \"$project_dir/config/sentinel.properties\" ]] || continue\n PID_FILE=\"$project_dir/sentinel.pid\"\n if [[ -f \"$PID_FILE\" ]] && kill -0 \"$(cat \"$PID_FILE\")\" 2>/dev/null; then\n continue # running fine\n fi\n echo \"[watchdog] $(date -u +%Y-%m-%dT%H:%M:%SZ) $name is down - restarting\"\n bash \"$project_dir/start.sh\"\ndone\n",
|
|
319
|
+
{ mode: 0o755 });
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
|
|
322
|
+
|
|
323
323
|
module.exports = { writeExampleProject, generateProjectScripts, generateWorkspaceScripts };
|
package/package.json
CHANGED
|
@@ -354,8 +354,10 @@ async def _dispatch(event: dict, client, cfg_loader, store) -> None:
|
|
|
354
354
|
text = "hello"
|
|
355
355
|
|
|
356
356
|
# Allowlist check — if SLACK_ALLOWED_USERS is configured, silently ignore everyone else
|
|
357
|
+
# Admins (SLACK_ADMIN_USERS) are always allowed regardless of SLACK_ALLOWED_USERS
|
|
357
358
|
allowed = cfg_loader.sentinel.slack_allowed_users
|
|
358
|
-
|
|
359
|
+
admin_users = cfg_loader.sentinel.slack_admin_users or []
|
|
360
|
+
if allowed and user_id not in allowed and user_id not in admin_users:
|
|
359
361
|
logger.warning("Boss: ignoring message from unauthorised user %s", user_id)
|
|
360
362
|
return
|
|
361
363
|
|