Tribe Protocol
Trust lookup system for OpenClaw bots. Every non-owner interaction must be verified against the tribe database before responding.
Quick Start
CODEBLOCK0
Trust Tiers
| Tier | Label | Access |
|---|
| 4 | Owner | Full trust, all data |
| 3 |
Tribe | Collaborate freely, no private data |
| 2 | Acquaintance | Public info only |
| 1 | Stranger | Minimal engagement |
| 0 | Blocked | Ignore completely |
How It Works
- 1. Message arrives from non-owner
- Bot reads TRIBE.md (generated at workspace root)
- Bot runs INLINECODE0
- Script returns entity info + tier rules reminder
- Bot applies tier-appropriate behavior
Commands
- -
tribe init — Initialize database - INLINECODE2 — Query entity by discord_id, name, tag, server
- INLINECODE3 — Add new entity
- INLINECODE4 — Update trust tier
- INLINECODE5 — Update status
- INLINECODE6 /
tribe revoke — Channel access - INLINECODE8 — Manage tags
- INLINECODE9 — List all entities
- INLINECODE10 — Audit trail
- INLINECODE11 — Dump to markdown
- INLINECODE12 — Quick summary
Environment Variables
- -
TRIBE_DB — Override database path - INLINECODE14 — Base directory (default: ~/clawd)
Dependencies
- -
sqlite3 (pre-installed on macOS/most Linux)
Tribe 协议
OpenClaw 机器人的信任查询系统。所有非所有者交互在响应前必须通过部落数据库验证。
快速开始
bash
初始化(仅首次使用)
./scripts/tribe.sh init \
--bot-name Cheenu \
--bot-discord-id 000000000000000004 \
--human-name Nagarjun \
--human-discord-id 000000000000000002
响应前查询实体
./scripts/tribe.sh lookup
添加实体
./scripts/tribe.sh add --name Yajat --type human --discord-id 000000000000000001 --tier 3
管理信任等级
./scripts/tribe.sh set-tier 3 --reason 晋升为部落成员
./scripts/tribe.sh set-status blocked --reason 不良行为者
信任等级
部落成员 | 自由协作,无私人数据 |
| 2 | 熟人 | 仅公开信息 |
| 1 | 陌生人 | 最低限度交互 |
| 0 | 已屏蔽 | 完全忽略 |
工作原理
- 1. 收到非所有者的消息
- 机器人读取 TRIBE.md(在工作区根目录生成)
- 机器人执行 tribe lookup
- 脚本返回实体信息及等级规则提示
- 机器人根据等级执行相应行为
命令
- - tribe init — 初始化数据库
- tribe lookup — 通过 discord_id、名称、标签、服务器查询实体
- tribe add — 添加新实体
- tribe set-tier — 更新信任等级
- tribe set-status — 更新状态
- tribe grant / tribe revoke — 频道访问权限
- tribe tag — 管理标签
- tribe roster — 列出所有实体
- tribe log — 审计追踪
- tribe export — 导出为 Markdown 格式
- tribe stats — 快速统计摘要
环境变量
- - TRIBEDB — 覆盖数据库路径
- CLAWDHOME — 基础目录(默认:~/clawd)
依赖项
- - sqlite3(macOS/大多数 Linux 系统预装)