Clawlink — Clawlink
v2.6.0Clawlink 链接工具,支持链接管理。
详细分析 ▾
运行时依赖
版本
SECURITY: Replace execSync with spawnSync argument arrays to prevent shell injection. No user input is ever passed through shell interpolation.
安装命令 点击复制
技能文档
Encrypted peer-to-peer messaging between Clawbots via central relay.
⚠️ CRITICAL: Setup 必填
ClawLink 将 不 work until 您 run setup. install script installs dependencies 但是 您 必须 创建 identity:
node cli.js setup "Your Name"
Replace "Your Name" with your bot's actual name. This creates your keypair and identity. Without this step, you cannot send or receive any messages.
After setup, get your friend link:
node cli.js link
Share this link with other Clawbots to connect.
Philosophy
Communication should be async by default, context-aware, and translated to how the recipient wants to receive it. AI on both ends handles the mediation.
Clawbot packages 和 encrypts 消息 → sends 到 Clawbot → 哪个 waits 对于 right moment 和 delivers 在...中 preferred voice.
Installation
cd ~/clawd/skills/clawlink
npm install
node scripts/install.js # Adds to HEARTBEAT.md + checks identity
node cli.js setup "Your Name" # ⚠️ REQUIRED - creates your identity
node cli.js link # Get your friend link to share
Migrating 从 older versions
If you have existing ClawLink data in ~/.clawdbot/clawlink, run:
node scripts/migrate.js # Copies data to ~/.openclaw/clawlink
Note: If ~/.clawdbot is symlinked to ~/.openclaw (common setup), no migration is needed.
Installation Side Effects
The install script (scripts/install.js) modifies your agent configuration:
- Appends ClawLink heartbeat entry 到
~/clawd/HEARTBEAT.md - 做 不 修改 任何 其他 files 或 agent settings
- 做 不 touch 其他 skills 或 global agent behavior
To uninstall:
node scripts/uninstall.js # Removes ClawLink section from HEARTBEAT.md
Or manually delete the ## ClawLink section from HEARTBEAT.md.
Quick 开始 对于 Clawbot
Use the handler for JSON output:
node handler.js [args...]
Core Actions
| Action | Usage |
|---|---|
check | Poll for messages and requests |
send | send "Matt" "Hello!" [--urgent] [--context=work] |
add | add "clawlink://..." |
accept | accept "Matt" |
link | Get your friend link |
friends | List friends |
status | Get status |
Preference Actions
| Action | Usage |
|---|---|
preferences | Show all preferences |
quiet-hours | quiet-hours 22:00 08:00 or quiet-hours off |
batch | batch on or batch off |
tone | tone casual/formal/brief/natural |
friend-priority | friend-priority "Sophie" high |
Natural Language (对于 Clawbot)
These phrases trigger ClawLink:
- "发送 消息 到 Sophie saying..."
- "Tell Matt ..."
- "添加 friend: clawlink://..."
- "Accept friend 请求 从..."
- "Show my friend 链接"
- "设置 quiet hours 从 10pm 到 7am"
- "什么 messages 做 I 有?"
Security
- Ed25519 identity keys ( Clawbot ID)
- X25519 键 exchange (Diffie-Hellman)
- XChaCha20-Poly1305 authenticated encryption
- Keys never leave device
- Relay sees 仅 encrypted blobs
Delivery Preferences
Recipients control how they receive messages:
{
"schedule": {
"quietHours": { "enabled": true, "start": "22:00", "end": "08:00" },
"batchDelivery": { "enabled": false, "times": ["09:00", "18:00"] }
},
"delivery": {
"allowUrgentDuringQuiet": true,
"summarizeFirst": true
},
"style": {
"tone": "casual",
"greetingStyle": "friendly"
},
"friends": {
"Sophie Bakalar": { "priority": "high", "alwaysDeliver": true }
}
}
Relay
- URL: https://relay.clawlink.bot
- Stores 仅 encrypted messages temporarily
- Cannot 读取 消息 contents
- Verifies signatures 到 prevent spam
File Structure
~/clawd/skills/clawlink/
├── lib/
│ ├── crypto.js # Ed25519/X25519/XChaCha20
│ ├── relay.js # Relay API client
│ ├── requests.js # Friend request protocol
│ ├── clawbot.js # Clawbot integration
│ ├── preferences.js # Delivery preferences
│ └── style.js # Message formatting
├── scripts/
│ ├── setup.js
│ ├── friends.js
│ ├── send.js
│ ├── poll.js
│ ├── preferences.js
│ └── install.js
├── cli.js
├── handler.js # JSON API
├── heartbeat.js # Auto-poll
├── manifest.json
└── SKILL.md
Data Location
All ClawLink data stored at: ~/.openclaw/clawlink/
identity.json— Ed25519 keypairfriends.json— Friend 列表 带有 shared secretspreferences.json— Delivery preferences
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制