@ellawu2211/aidr-xclaw-security-sentinel
v1.0.1
Published
AIDR-XClaw-Security-Sentinel — real-time activity tracking and visualization for OpenClaw agents
Downloads
28
Maintainers
Readme
AIDR-XClaw-Security-Sentinel
AIDR-XClaw-Security-Sentinel 是一款面向 OpenClaw 的本地可观测插件:在网关进程内订阅 Agent 生命周期事件,把多轮 ReAct(LLM → TOOL → …)整理成可读的 Trace 与 Dashboard——包括每轮 LLM 输入输出、工具调用、用量与耗时汇总;数据默认落在本机 SQLite,便于在内网或离线环境自查。
插件随 OpenClaw Gateway 同一进程 加载;若网关在远程主机上运行,请在该主机上安装并配置本插件。
安装与运行
Prerequisites
- OpenClaw >= 2026.3.31
- Node.js >= 22.12.0
- npm >= 10
1. 通过 OpenClaw 安装(推荐)
openclaw plugins install @ellawu2211/aidr-xclaw-security-sentinel若 Gateway 已在运行,安装后请 重启网关(例如 openclaw gateway restart),再执行后续验证。
2. 通过 npm 源码目录安装(开发或离线包)
npm install @ellawu2211/aidr-xclaw-security-sentinel
cd npm/node_modules/@ellawu2211/aidr-xclaw-security-sentinel
npm run build
openclaw plugins install -l .安装或更新插件后,若 Gateway 已在运行,请 重启 再测。
3. 确认本机 Dashboard 服务
插件通过 PI Guard 校验并成功启动后,会在本机监听 Dashboard(默认 18796)。
openclaw aidr-xclaw-security-sentinel statusstatus 输出中应能看到端口与运行状态;
4. 发送测试会话并打开面板
- 打开 OpenClaw Control UI,向 Agent 发送:
hello from openclaw。 - 浏览器访问 http://localhost:18796,在 Dashboard / Trace 中应能看到对应活动与 Trace 记录。
常用命令与健康检查
# CLI(需在 PATH 中能调用 openclaw)
openclaw aidr-xclaw-security-sentinel setup
openclaw aidr-xclaw-security-sentinel status
openclaw aidr-xclaw-security-sentinel dashboard
openclaw aidr-xclaw-security-sentinel start
openclaw aidr-xclaw-security-sentinel stop
openclaw aidr-xclaw-security-sentinel clean --days 30
# HTTP 探活(无需浏览器)
curl -sS http://127.0.0.1:18796/health
# 完整运行时指标(可选)
curl -sS http://127.0.0.1:18796/runtime运行与配置
初始化(端口与数据库)
openclaw aidr-xclaw-security-sentinel setup默认写入 ~/.openclaw/aidr-xclaw-security-sentinel/config.json:
port:Dashboard 端口(默认 18796)dbPath:SQLite 路径(默认~/.openclaw/aidr-xclaw-security-sentinel/activities.db)
修改配置后:
openclaw gateway restart打开 Dashboard
openclaw aidr-xclaw-security-sentinel dashboard或直接访问:http://localhost:18796(端口以配置为准)。
