← 返回
安全合规 中文

What Just Happened

When the gateway comes back online, check recent logs and post a short message about what happened (restart, SIGUSR1, auth change, reconnect). User sees the...
网关重新上线时,检查近期日志并发布简短消息,说明发生的事件(重启、SIGUSR1、认证变更、重连),用户可查看...
runeweaverstudios
安全合规 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 596
下载
💾 5
安装
1
版本
#latest

概述

What Just Happened

Description

When the gateway comes back online, check recent logs and post a short message about what happened (restart, SIGUSR1, auth change, reconnect). User sees the response in TUI or Telegram.

What Just Happened

Standalone skill with its own GitHub repo and OpenClaw/ClawHub page. After a gateway restart or reconnect, it summarizes what happened by reading recent gateway logs (and optionally gateway-guard restart logs) and posts a short, user-facing message. The user should see the response in their TUI or Telegram.

Usage

  • Gateway just came back online and you want the user to see what happened (use watcher or cron).
  • User asks "what happened to the gateway?" or "why did it reconnect?"
  • You want a brief summary of recent restarts/errors and a proposed solution (e.g. gateway-guard).

Commands

python3 <workspace>/skills/what-just-happened/scripts/report_recent_logs.py [--minutes N] [--json]
  • --minutes N — Look at log lines from the last N minutes (default 5).
  • --json — Emit a single JSON object with keys like summary, restart, reason, suggestGatewayGuard.

Output is a short paragraph suitable for posting. When the cause is auth/config, the script includes a tip with the ClawHub link: clawhub install gateway-guard — https://clawhub.ai/skills/gateway-guard. ClawHub: Update this link when the new instance is live.

Two ways to run

  1. Every time the gateway comes back online (recommended)

You must install the gateway-back watcher or it will never auto-trigger. Run once (from the skill dir):

```bash

cd workspace/skills/what-just-happened

./scripts/install_gateway_back_watcher.sh

```

The install script loads a LaunchAgent that runs every 15s. When it sees the gateway go from down → up, it triggers the summary to TUI or Telegram. Verify it's loaded: launchctl list com.openclaw.what-just-happened (should show a PID). If you see "not loaded", run the install script again.

To stop: launchctl unload ~/Library/LaunchAgents/com.openclaw.what-just-happened.plist

  1. Cron (periodic)

A cron job runs every 2 minutes. When it runs, the agent checks the last 5 minutes of logs and, if a restart happened, announces to the user. Good as a fallback; for immediate feedback on reconnect, use the watcher above.

  1. Manual

User says "what just happened?" or "I restarted the gateway" and the orchestrator runs the script and replies in chat.

How it works

Reads OPENCLAW_HOME/logs/gateway.log and optionally gateway-guard.restart.log. Looks for recent shutdown/restart/SIGUSR1/reload lines and produces a plain-language summary. Suggests gateway-guard (with ClawHub install link) when the cause was auth or config change.

Delivery (TUI or Telegram)

  • Gateway-back watcher and cron both trigger an agent turn with announce (deliver). The OpenClaw gateway delivers that to the configured channel(s)—typically the last-used channel (TUI webchat) and/or Telegram if configured. The user sees the summary in their TUI or Telegram.
  • Manual "what just happened?" is replied to in the current chat (TUI).

Integration summary

TriggerHowUser sees response
----------------------------------
Gateway comes back onlineInstall install_gateway_back_watcher.sh (LaunchAgent every 15s)TUI or Telegram (announce)
Cron every 2 minOpenClaw cron job with announceTUI or Telegram (announce)
ManualUser says "what just happened?"Current chat (TUI)

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-30 17:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,586
ai-intelligence

Agent Swarm

runeweaverstudios
必须使用 OpenRouter。将任务路由至合适模型,并始终通过 sessions_spawn 委派工作。
★ 4 📥 3,604
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,155