← 返回
内容创作

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.
OpenClaw 零费用任务监控框架:通过脚本运行长时读取任务,安全检查点/恢复,定期进度和即时告警至 Telegram。写入任务默认阻止,需明确批准验证。
zjianru
内容创作 clawhub v0.1.0 1 版本 99690.8 Key: 无需
★ 2
Stars
📥 2,217
下载
💾 6
安装
1
版本
#latest

概述

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 / ALERT or fail.
  • One-shot write jobs: blocked by default; must be explicitly approved and must chain to a read-only verification job.

Quickstart (local)

1) 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).

2) Start from the example config:

  • ops-jobs.example.json

3) Validate:

python3 ops-monitor.py validate-config --config-file ~/.openclaw/net/config/ops-jobs.json
python3 ops-monitor.py selftest

4) Run one monitoring tick (prints only; does not send):

python3 ops-monitor.py tick --print-only

5) 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_read
  • one_shot_read
  • one_shot_write (never auto-executed by ops-monitor)

risk is one of:

  • read_only
  • write_local
  • write_external

Rules (MVP):

  • long_running_read may auto-resume only when risk=read_only and policy.autoResume=true.
  • one_shot_read may run explicitly or via queue (read-only only).
  • one_shot_write is 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 detection
  • level (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

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-28 17:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,430
developer-tools

Web Search Pro

zjianru
以代理为首的网页搜索与检索,支持实时网页搜索、新闻搜索、文档查询、代码查询、公司调研、网站爬取、网站地图及结构化证据等功能
★ 11 📥 10,438
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,405