Task Monitor

👤 jorgermp 📦 v1.0.0 ⭐ 4.3 ⬇️ 4.6K 下載
🔒 IT運維與安全 免費

📖 技能介紹

Task Monitor v0.1

Real-time monitoring dashboard for OpenClaw with web interface.

Features

  • 🌐 Web Dashboard - Beautiful, responsive UI accessible from any device
  • 📱 Mobile-First - Optimized for phones and tablets
  • 🔄 Auto-Refresh - Updates every 60 seconds
  • 🎨 Modern Design - Gradient UI with dark theme
  • 📊 Live Data - Main session, Discord, sub-agents, cron jobs
  • 🚀 Fast API - JSON endpoint with intelligent caching (30s TTL)
  • ⚡ Performance - <100ms response time (cached), ~15s cold cache

Installation

cd skills/task-monitor
npm install

Usage

Start Web Server

./scripts/start-server.sh

Server will run on port 3030 (accessible on LAN).

Access URLs:

  • Local: http://localhost:3030
  • LAN: http://<your-ip>:3030

Stop Server

./scripts/stop-server.sh

API Endpoint

curl http://localhost:3030/api/status

Returns JSON with:

  • Main session stats
  • Discord session stats
  • Active sub-agents (with descriptions)
  • Recent cron job history

Generate Markdown (v0.1)

Legacy markdown generator still available:

./scripts/generate-dashboard.js

Updates DASHBOARD.md in workspace root.

Automation

CRON job runs every 5 minutes to update markdown dashboard: */5 * * * * -> Executes generate-dashboard.js

Architecture

  • Backend: Node.js + Express
  • Frontend: Pure HTML/CSS/JS (no frameworks)
  • Data Source: openclaw sessions list --json + openclaw cron list --json

    7w4.net小蔥技能站,你的AI助手技能庫。

  • Caching: In-memory cache with 30-second TTL
    • Pre-warmed on server startup
    • Async background refresh when expired
    • Stale-while-revalidate pattern for optimal UX
  • Refresh: Client-side polling (60s interval)

Performance

Without cache:

  • API response time: ~15 seconds (blocking)
  • Problem: Each request blocks Node.js event loop

With cache:

  • Cache hit: <100ms (~365x faster)
  • Cache miss: ~15s (first request only)
  • Stale cache: <100ms while refreshing in background
  • Cache TTL: 30 seconds

The caching system ensures:

  • Lightning-fast responses for most requests
  • No blocking of concurrent requests
  • Graceful degradation when cache expires

🤖 AI 評測

這個監控工具整體質量不錯,介面美觀大方,手機和電腦都能用,資料會自動重新整理不用手動操作。但作為 v0.1.0 版本,還存在一些小問題:部分說明文件語言不一致,版本號顯示可能有誤導,核心功能的實現比較紮實可靠。適合需要隨時檢視 OpenClaw 執行狀態的使用者使用。

📊 多維度評分

適應性4
規範性4.1
有效性4.5
可靠性4.4
可信度4.5

📁 包含檔案 (11 個)

📄 CHANGELOG.md 2 KB
📄 README.md 5.6 KB
📄 SKILL.md 2.3 KB
📄 _meta.json 131 B
📄 package.json 694 B
📄 scripts/generate-dashboard.js 3.3 KB
📄 scripts/start-server.sh 762 B
📄 scripts/stop-server.sh 377 B
📄 server.js 15.7 KB
📄 skill-card.md 2 KB
📄 update-dashboard.js 3.9 KB