@aiassesstech/mighty-mark 0.4.7 → 0.4.8
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiassesstech/mighty-mark",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "System Health Sentinel for AI Assess Tech Fleet — autonomous monitoring, watchdog recovery, and fleet infrastructure oversight.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
# Cron schedule: 0 6 * * * (with CRON_TZ=America/Chicago)
|
|
6
6
|
#
|
|
7
7
|
# This script is a thin bash wrapper that invokes the TypeScript health
|
|
8
|
-
# engine
|
|
9
|
-
#
|
|
8
|
+
# engine. Prefers the global `mighty-mark` binary over `npx` to avoid
|
|
9
|
+
# npx cache staleness. Falls back to a minimal bash-only check if
|
|
10
|
+
# Node.js is unavailable.
|
|
10
11
|
|
|
11
12
|
set -euo pipefail
|
|
12
13
|
|
|
@@ -28,8 +29,18 @@ log_morning "Morning check starting"
|
|
|
28
29
|
# won't run — but it will catch up on the next successful morning check.
|
|
29
30
|
|
|
30
31
|
# ── Try Node.js health check first ──
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
# Prefer the direct global binary over npx to avoid npx cache staleness.
|
|
33
|
+
if command -v mighty-mark &> /dev/null; then
|
|
34
|
+
log_morning "Running TypeScript health engine via mighty-mark (global)"
|
|
35
|
+
|
|
36
|
+
if mighty-mark check >> "${MORNING_LOG}" 2>&1; then
|
|
37
|
+
log_morning "Morning check completed successfully (TypeScript engine)"
|
|
38
|
+
exit 0
|
|
39
|
+
else
|
|
40
|
+
log_morning "WARN: TypeScript engine failed, falling back to bash checks"
|
|
41
|
+
fi
|
|
42
|
+
elif command -v npx &> /dev/null; then
|
|
43
|
+
log_morning "Running TypeScript health engine via npx (fallback)"
|
|
33
44
|
|
|
34
45
|
if npx @aiassesstech/mighty-mark check >> "${MORNING_LOG}" 2>&1; then
|
|
35
46
|
log_morning "Morning check completed successfully (TypeScript engine)"
|
|
@@ -38,7 +49,7 @@ if command -v npx &> /dev/null; then
|
|
|
38
49
|
log_morning "WARN: TypeScript engine failed, falling back to bash checks"
|
|
39
50
|
fi
|
|
40
51
|
else
|
|
41
|
-
log_morning "WARN: npx not found, using bash-only checks"
|
|
52
|
+
log_morning "WARN: mighty-mark and npx not found, using bash-only checks"
|
|
42
53
|
fi
|
|
43
54
|
|
|
44
55
|
# ── Bash Fallback ─────────────────────────────────────────────────
|