360 Secure SkillHub
360 安全技能中心

Pilot Archive

该工具为Pilot Protocol提供历史通信归档服务,核心功能包括消息与文件传输的索引构建、全文搜索、按发件人筛选及通信统计分析。适用于查找过往通信、审计历史数据、分析交流模式等场景,不支持实时数据访问、文件同步或当前收件箱操作。需依赖pilot-protocol、pilotctl及jq,需启动pilot守护进程,通过Bash命令执行,输出可搜索的索引文件、匹配结果或统计报表。

teoslayer
teoslayer
热度 39.76
最近更新 2026-05-11 17:41:28
分类:搜索依赖:代码执行 / 读写文件应用场景:搜索 / 数据处理 / 报告撰写 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add pilot-archive
Metadata
name
pilot-archive
description
Index and search historical data exchanges, messages, and file transfers over Pilot Protocol. Use this skill when: 1. You need to search through past messages and file transfers 2. You want to maintain searchable history of all agent communications 3. You need to audit or analyze historical data exchange patterns Do NOT use this skill when: - You need real-time data access (use pilot-stream-data instead) - You need active file synchronization (use pilot-sync instead) - You need current inbox messages (use pilotctl inbox directly)
tags
["pilot-protocol","archive","search","history"]
license
AGPL-3.0
compatibility
Requires pilot-protocol skill and pilotctl binary on PATH. The daemon must be running (pilotctl daemon start).
metadata
{"author":"vulture-labs","version":"1.0","openclaw":{"requires":{"bins":["pilotctl"]},"homepage":"https://pilotprotocol.network"}}
allowed-tools
["Bash"]

pilot-archive

Index and search historical data exchanges including messages, file transfers, and communication patterns. This skill provides a searchable archive of all Pilot Protocol communications with metadata indexing, full-text search, and analytics capabilities.

Commands

Index Messages

Build searchable index of message history:

ARCHIVE_DIR="$HOME/.pilot/archive"
INDEX_FILE="$ARCHIVE_DIR/message-index.jsonl"
mkdir -p "$ARCHIVE_DIR"

pilotctl --json inbox | jq -c '.messages[] |
  {timestamp, from, type, content, indexed_at: (now | todate)}' >> "$INDEX_FILE"

Index File Transfers

Record file transfer history:

ARCHIVE_DIR="$HOME/.pilot/archive"
FILE_INDEX="$ARCHIVE_DIR/file-index.jsonl"

pilotctl --json received | jq -c '.received[] |
  {timestamp, from, filename, size, port, indexed_at: (now | todate)}' >> "$FILE_INDEX"

Search Messages

Full-text search through message archive:

KEYWORD="$1"
jq -r "select(.content | test(\"$KEYWORD\"; \"i\")) |
  \"[\(.timestamp)] \(.from): \(.content)\"" "$HOME/.pilot/archive/message-index.jsonl"

Search by Sender

Find all communications from specific agent:

SENDER="1:0001.AAAA.BBBB"
jq -r "select(.from == \"$SENDER\") |
  \"[\(.timestamp)] \(.type): \(.content)\"" \
  "$HOME/.pilot/archive/message-index.jsonl"

Archive Statistics

Generate statistics from archive:

ARCHIVE_DIR="$HOME/.pilot/archive"
MSG_COUNT=$(wc -l < "$ARCHIVE_DIR/message-index.jsonl")
FILE_COUNT=$(wc -l < "$ARCHIVE_DIR/file-index.jsonl")

echo "Total messages: $MSG_COUNT"
echo "Total files: $FILE_COUNT"
echo ""
echo "Top senders:"
jq -r '.from' "$ARCHIVE_DIR/message-index.jsonl" | sort | uniq -c | sort -rn | head -5

Workflow Example

#!/bin/bash
# pilot-archive: Historical data indexing and search

ARCHIVE_DIR="$HOME/.pilot/archive"
MSG_INDEX="$ARCHIVE_DIR/message-index.jsonl"
FILE_INDEX="$ARCHIVE_DIR/file-index.jsonl"

mkdir -p "$ARCHIVE_DIR"

# Index messages (get all, filter client-side)
pilotctl --json inbox | jq -c '.messages[] |
  {timestamp, from, to, type, content, indexed_at: (now | todate)}' | tail -100 >> "$MSG_INDEX"

# Index files (get all, filter client-side)
pilotctl --json received | jq -c '.received[] |
  {timestamp, from, filename, size, port, indexed_at: (now | todate)}' | tail -100 >> "$FILE_INDEX"

# Search archive
search_query="$1"
if [ -n "$search_query" ]; then
  echo "=== Messages ==="
  jq -r "select(.content | test(\"$search_query\"; \"i\")) |
    \"[\(.timestamp)] \(.from): \(.content)\"" "$MSG_INDEX" | head -20
fi

Dependencies

Requires pilot-protocol, jq, tar/gzip for export.