← 返回
未分类 中文

Pilot Event Replay

Record and replay event streams for debugging, testing, and audit purposes. Use this skill when: 1. You need to capture event streams for later analysis 2. Y...
记录并回放事件流,用于调试、测试和审计。在以下情况下使用此技能:1. 需要捕获事件流以供后续分析;2. ...
teoslayer teoslayer 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 296
下载
💾 0
安装
1
版本
#latest

概述

Pilot Event Replay

Record event streams to NDJSON files and replay them for debugging and testing.

Commands

Record events to file

pilotctl --json subscribe <source-hostname> <topic> --timeout <seconds> | \
  jq -c '.data.events[]' >> <recording-file.ndjson>

Replay events from file

cat <recording-file.ndjson> | jq -c '.' | while IFS= read -r event; do
  topic=$(echo "$event" | jq -r '.topic')
  data=$(echo "$event" | jq -r '.data')

  pilotctl --json publish <target-hostname> "$topic" --data "$data"
  sleep <delay-seconds>
done

Workflow Example

Record debug session:

#!/bin/bash
SOURCE="buggy-worker"
DURATION=300
RECORDING="/tmp/debug-session-$(date +%Y%m%d-%H%M%S).ndjson"

pilotctl --json subscribe "$SOURCE" "*" --timeout "$DURATION" | \
  jq -c '.data.events[]' >> "$RECORDING"

event_count=$(wc -l < "$RECORDING")
echo "Recorded $event_count events"

Replay to test agent:

#!/bin/bash
RECORDING="$1"
TEST_TARGET="test-agent"

jq -c '.' "$RECORDING" | while IFS= read -r event; do
  topic=$(echo "$event" | jq -r '.topic')
  data=$(echo "$event" | jq -r '.data')

  pilotctl --json publish "$TEST_TARGET" "$topic" --data "$data"
  sleep 0.5
done

Dependencies

Requires pilot-protocol skill, jq, and a running daemon.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 21:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Pilot Task Parallel

teoslayer
将任务分发给多个代理并合并结果。适用场景:1. 需要将独立工作分配给多个代理;2. 希望汇总各代理的结果。
★ 0 📥 520
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装后可防止您和您的用户受到提示注入、数据泄露及恶意行为的侵害。
★ 116 📥 31,014
it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 471 📥 78,545