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.
- License 许可
- MIT
- 最近更新
- 2026-05-17
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ops-framework
- author
- Zjianru
- license
- MIT
- version
- 0.1.0
- 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.
- 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`.
02 资源文件 6
- 参考文档_meta.json279 B
- 参考文档OPS_FRAMEWORK.md10.0 KB
- 参考文档ops-jobs.example.json1.7 KB
- 脚本ops-monitor.py48.7 KB
- 参考文档README.md695 B
- 参考文档UPSTREAM.md1.9 KB
03 SKILL.md 正文
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
04 同仓库更多 Skills
zvukogram
Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.
zohomail
Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-recruit
Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows. Use this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-people
Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave. Use this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-mail
Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-inventory
Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments. Use this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.