计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
mrc-monitor【效率与协作】Real-time token monitoring for MRC canteen order system. Monitors Firebase Firestore for token status and notifies when orders are ready. Use when user sends commands like "mrc 73", "token 97", or "monitor 42" to monitor one or multiple canteen tokens. Handles multiple tokens simultaneously, sends independent notifications per token, and auto-exits w…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Monitor MRC canteen order tokens and notify when they're ready for pickup.
When user sends any command containing canteen tokens:
Users may send tokens with various prefixes:
Extract all numbers from the user message and start the background monitor:
python3 skills/mrc-monitor/scripts/monitor.py <platform> <channel_id> <token1> <token2> ...
Where:
platform: "telegram" or "discord"channel_id: Current channel identifier (platform prefix is optional, e.g., telegram_123 or 123 both work)token1, token2, ...: Token numbers to monitorExample:
python3 skills/mrc-monitor/scripts/monitor.py telegram telegram_6046286675 73 97 42
# or
python3 skills/mrc-monitor/scripts/monitor.py telegram 6046286675 73 97 42
Start the monitor as a background process so the agent responds immediately:
import subprocess
# channel_id can be with or without platform prefix (both work)
cmd = ['python3', 'skills/mrc-monitor/scripts/monitor.py',
platform, channel_id] + [str(t) for t in tokens]
subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
After starting the monitor, respond immediately with:
✅ Monitoring tokens: 73, 97, 42
Checking every 15 seconds.
I'll notify you here when they're ready! 🍕
For "check 73" commands, perform a single Firebase query and respond with status without starting a background monitor.
The monitor script:
skills/mrc-monitor/logs/monitor_YYYYMMDD_HHMMSS.logThe script automatically handles:
On fatal errors, the script sends a notification before exiting.
studentId (string): "student-{token_number}"status (string): "Preparing", "Ready", "Completed"