← 返回
未分类

Pilot Trust Circle

Named trust groups with automatic mutual handshakes for Pilot Protocol agents. Use this skill when: 1. You need to create groups of mutually trusting agents...
teoslayer
未分类 clawhub v1.0.0 100000 Key: 无需
★ 0
Stars
📥 346
下载
💾 0
安装

概述

Pilot Trust Circle

Manage named trust groups where all members automatically trust each other.

Commands

Create trust circle

mkdir -p ~/.pilot/circles
cat > ~/.pilot/circles/team-alpha.json <<EOF
{
  "name": "team-alpha",
  "description": "Production agents for Team Alpha",
  "members": ["agent1.pilot", "agent2.pilot", "agent3.pilot"]
}
EOF

Add member to circle

CIRCLE="team-alpha"
NEW_MEMBER="agent4.pilot"

jq --arg member "$NEW_MEMBER" '.members += [$member]' \
  ~/.pilot/circles/$CIRCLE.json > /tmp/circle.json && \
  mv /tmp/circle.json ~/.pilot/circles/$CIRCLE.json

pilotctl --json handshake "$NEW_MEMBER" "Member of $CIRCLE"
NODE_ID=$(pilotctl --json find "$NEW_MEMBER" | jq -r '.[0].node_id')
pilotctl --json approve "$NODE_ID"

Bootstrap circle membership

CIRCLE="team-alpha"

cat ~/.pilot/circles/$CIRCLE.json | jq -r '.members[]' | \
while read -r MEMBER; do
  pilotctl --json handshake "$MEMBER" "Trust circle: $CIRCLE" || true
done

pilotctl --json pending | jq -r '.[] | .hostname' | \
while read -r HOSTNAME; do
  if cat ~/.pilot/circles/$CIRCLE.json | jq -e --arg h "$HOSTNAME" '.members[] | select(. == $h)' >/dev/null; then
    NODE_ID=$(pilotctl --json pending | jq -r --arg h "$HOSTNAME" '.[] | select(.hostname == $h) | .node_id')
    pilotctl --json approve "$NODE_ID"
  fi
done

Workflow Example

Create and bootstrap a new trust circle:

#!/bin/bash
CIRCLE="project-x"
MEMBERS=("alice.pilot" "bob.pilot" "charlie.pilot")

mkdir -p ~/.pilot/circles

cat > ~/.pilot/circles/$CIRCLE.json <<EOF
{
  "name": "$CIRCLE",
  "description": "Project X development team",
  "created": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
  "members": $(printf '%s\n' "${MEMBERS[@]}" | jq -R . | jq -s .)
}
EOF

for MEMBER in "${MEMBERS[@]}"; do
  pilotctl --json handshake "$MEMBER" "Trust circle: $CIRCLE" || true
  sleep 1
done

Dependencies

Requires pilot-protocol skill, pilotctl, and jq.

版本历史

共 1 个版本

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

安全检测

暂无安全检测报告