@aiassesstech/mighty-mark 0.6.2 → 0.6.4
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/agent/HEARTBEAT.md +34 -0
- package/package.json +1 -1
- package/src/scripts/deploy-fleet.sh +33 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Mighty Mark — Heartbeat Schedule
|
|
2
|
+
|
|
3
|
+
Mark's health checks are autonomous and run via system cron, NOT via Noah.
|
|
4
|
+
This is by design (Amendment 4, D-05): the system checking health cannot depend
|
|
5
|
+
on the system being healthy. If the gateway is down, Noah's CronManager is also
|
|
6
|
+
down — but Mark's watchdog and morning check still run.
|
|
7
|
+
|
|
8
|
+
## System Cron Schedule (Outside Noah)
|
|
9
|
+
|
|
10
|
+
| Schedule | Time (CT) | Script | Purpose |
|
|
11
|
+
|----------|----------|--------|---------|
|
|
12
|
+
| Every 5 min | — | `/opt/mighty-mark/watchdog.sh` | Gateway heartbeat, restart if down |
|
|
13
|
+
| Daily | 6:00 AM | `/opt/mighty-mark/morning-check.sh` | Full health check (42 checks, 7 categories) |
|
|
14
|
+
|
|
15
|
+
## Morning Check (6:00 AM CT)
|
|
16
|
+
|
|
17
|
+
1. Run `mighty-mark check` (TypeScript health engine)
|
|
18
|
+
2. All 8 categories: gateway, agents, system, api, data, memory, fleet, temporal
|
|
19
|
+
3. Send summary to Greg via Telegram
|
|
20
|
+
4. Fall back to bash-only checks if Node.js is unavailable
|
|
21
|
+
|
|
22
|
+
## Watchdog (Every 5 Minutes)
|
|
23
|
+
|
|
24
|
+
1. Check if OpenClaw gateway process is alive
|
|
25
|
+
2. If down: attempt restart via `systemctl restart openclaw-gateway`
|
|
26
|
+
3. Track restart count per day (max 5 before alerting)
|
|
27
|
+
4. Send Telegram alert on restart or persistent failure
|
|
28
|
+
|
|
29
|
+
## Relationship to Noah
|
|
30
|
+
|
|
31
|
+
- Mark does NOT receive cron triggers from Noah
|
|
32
|
+
- Mark CAN observe Noah's temporal data via the `noah-temporal.db` (T1-T9 checks)
|
|
33
|
+
- Mark reports Noah's health as part of the temporal check category
|
|
34
|
+
- Noah can observe Mark's health reports but cannot schedule Mark's runs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiassesstech/mighty-mark",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
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",
|
|
@@ -118,6 +118,39 @@ for p in "${PLUGINS[@]}"; do
|
|
|
118
118
|
done
|
|
119
119
|
echo ""
|
|
120
120
|
|
|
121
|
+
# ── Step 2b: Sync bootstrap files to agent workspaces ───────────
|
|
122
|
+
# OpenClaw loads SOUL.md, AGENTS.md, HEARTBEAT.md from the workspace dir,
|
|
123
|
+
# not from agentDir. After upgrading extensions, sync bootstrap files
|
|
124
|
+
# to each agent's workspace so the runtime picks up the latest versions.
|
|
125
|
+
|
|
126
|
+
echo "=== Step 2b: Sync bootstrap files to workspaces ==="
|
|
127
|
+
OPENCLAW_JSON="${OPENCLAW_HOME:-$HOME/.openclaw}/openclaw.json"
|
|
128
|
+
BOOTSTRAP_FILES="SOUL.md AGENTS.md IDENTITY.md HEARTBEAT.md"
|
|
129
|
+
|
|
130
|
+
for p in "${PLUGINS[@]}"; do
|
|
131
|
+
WORKSPACE=$(python3 -c "
|
|
132
|
+
import json, sys
|
|
133
|
+
cfg = json.load(open('$OPENCLAW_JSON'))
|
|
134
|
+
for a in cfg.get('agents', {}).get('list', []):
|
|
135
|
+
if a.get('id') == '$p' or a.get('name') == '$p':
|
|
136
|
+
print(a.get('workspace', '')); sys.exit(0)
|
|
137
|
+
print('')
|
|
138
|
+
" 2>/dev/null)
|
|
139
|
+
|
|
140
|
+
if [ -n "$WORKSPACE" ] && [ -d "$WORKSPACE" ]; then
|
|
141
|
+
for f in $BOOTSTRAP_FILES; do
|
|
142
|
+
SRC="$EXTENSIONS_DIR/$p/agent/$f"
|
|
143
|
+
if [ -f "$SRC" ]; then
|
|
144
|
+
cp "$SRC" "$WORKSPACE/$f" 2>/dev/null && true
|
|
145
|
+
fi
|
|
146
|
+
done
|
|
147
|
+
echo " ✅ $p workspace synced ($WORKSPACE)"
|
|
148
|
+
else
|
|
149
|
+
echo " ⚠️ $p — no workspace found, skipping bootstrap sync"
|
|
150
|
+
fi
|
|
151
|
+
done
|
|
152
|
+
echo ""
|
|
153
|
+
|
|
121
154
|
# ── Step 3: Re-install fleet-bus AFTER plugins (Bug 5) ──────────
|
|
122
155
|
|
|
123
156
|
echo "=== Step 3: Install fleet-bus (AFTER plugins — Bug 5) ==="
|