Ops Framework
A 0-token jobs + monitoring framework for OpenClaw: run long-running read tasks via scripts, checkpoint/resume safely, and send periodic progress + immediate alerts to Telegram. Write jobs are blocked by default and must be explicitly approved and verified.
ๆ่ฝ่ฏดๆ
name: ops-framework
description: >-
A 0-token jobs + monitoring framework for OpenClaw: run long-running read tasks
via scripts, checkpoint/resume safely, and send periodic progress + immediate
alerts to Telegram. Write jobs are blocked by default and must be explicitly
approved and verified.
version: 0.1.0
author: Zjianru
license: MIT
compatibility: >-
Requires Python 3.10+ on the gateway host. Uses openclaw message send when
available; otherwise falls back to Telegram HTTP API using the bot token in
openclaw.json.
Ops Framework๏ผJobs + Ops Monitor๏ผโ OpenClaw Skill (MVP)
็ฎๆ ๏ผๆโ้ฟไปปๅกๆง่ก / ๆญ็น็ปญ่ท / ่ฟๅบฆๆฑๆฅ / ๅผๅธธๅ่ญฆโๅๆ 0-token ็ๅฏๅค็จ่ฝๅใ
่ฟๅฅๆ่ฝ็ฑไธค้จๅ็ปๆ๏ผ
ops-monitor.py๏ผไธไธช็บฏๆฌๅฐ่ๆฌ๏ผ่ด่ดฃ่ท status / ๆฃๆตๅกไฝ / ๅ้ Telegram ๅฟซๆฅops-jobs.json๏ผไธไธชๅฃฐๆๅผ job ้ ็ฝฎ๏ผๅ ๅซ kind/risk/ๅฝไปค/็ญ็ฅ๏ผ
ๆจ่ไฝไธบโๅคๆโๅญๅจ๏ผ้ฟไปปๅกๅฐฝ้็จ่ๆฌ่ท๏ผ้ฟๅ ่ฎฉๆจกๅๆ็ปญ็ฏ่ฟๅบฆ็ง tokenใ
What this solves
- Long-running read jobs: scans, inventories, large syncs, periodic polling; support pause/resume and stall detection.
- One-shot read jobs: health checks or lint-like checks; only report when they emit
ACTION REQUIRED/ALERTor fail. - One-shot write jobs: blocked by default; must be explicitly approved and must chain to a read-only verification job.
Quickstart (local)
- Copy files to your OpenClaw host (suggested layout):
~/.openclaw/net/tools/ops-monitor.py~/.openclaw/net/config/ops-jobs.json~/.openclaw/net/state/ops-monitor.json(auto-created)
You can also run the script from any directory as long as OPENCLAW_HOME points to your OpenClaw state dir (default ~/.openclaw).
- Start from the example config:
ops-jobs.example.json
- Validate:
python3 ops-monitor.py validate-config --config-file ~/.openclaw/net/config/ops-jobs.json
python3 ops-monitor.py selftest
- Run one monitoring tick (prints only; does not send):
python3 ops-monitor.py tick --print-only
- Run periodic ticks via your OS scheduler (launchd/systemd/cron). The script is designed to be called frequently; it decides whether to report based on policy and state.
Job kinds and safety
kind is one of:
long_running_readone_shot_readone_shot_write(never auto-executed by ops-monitor)
risk is one of:
read_onlywrite_localwrite_external
Rules (MVP):
long_running_readmay auto-resume only whenrisk=read_onlyandpolicy.autoResume=true.one_shot_readmay run explicitly or via queue (read-only only).one_shot_writeis always blocked from auto-run; it exists as a declarative โapproval + verification chainโ placeholder.
Status contract (for long_running_read)
Your commands.status must print JSON to stdout, with at least:
running(boolean)completed(boolean)
Recommended:
pid(number)stopReason(string)progress(object)progressKey(string) โ stable key used for stall detectionlevel(ok|warn|alert)message(string)
Commands
# Validate config
python3 ops-monitor.py validate-config --config-file ~/.openclaw/net/config/ops-jobs.json
# Print current statuses (no Telegram)
python3 ops-monitor.py status --config-file ~/.openclaw/net/config/ops-jobs.json
# One monitoring tick
python3 ops-monitor.py tick --config-file ~/.openclaw/net/config/ops-jobs.json
# Explicitly start/stop a long job
python3 ops-monitor.py start <job_id> --config-file ~/.openclaw/net/config/ops-jobs.json
python3 ops-monitor.py stop <job_id> --config-file ~/.openclaw/net/config/ops-jobs.json
# Run one one_shot_read job explicitly
python3 ops-monitor.py run <job_id> --config-file ~/.openclaw/net/config/ops-jobs.json
Reference docs
- Spec (Chinese, detailed):
OPS_FRAMEWORK.md
ๅฆไฝไฝฟ็จใOps Frameworkใ๏ผ
- ๆๅผๅฐ้พ่พAI๏ผWeb ๆ iOS App๏ผ
- ็นๅปไธๆนใ็ซๅณไฝฟ็จใๆ้ฎ๏ผๆๅจๅฏน่ฏๆกไธญ่พๅ ฅไปปๅกๆ่ฟฐ
- ๅฐ้พ่พAI ไผ่ชๅจๅน้ ๅนถ่ฐ็จใOps Frameworkใๆ่ฝๅฎๆไปปๅก
- ็ปๆๅณๆถๅ็ฐ๏ผๆฏๆ็ปง็ปญๅฏน่ฏไผๅ