返回顶部
l

lobster-comm

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
59
下载量
1
收藏
概述
安装方式
版本历史

lobster-comm

# Lobster Comm 🦞 — LCP/1.1 Peer-to-peer messaging between AI agents on different machines via UDP over Tailscale. ## Architecture ``` Agent A (Machine 1) Agent B (Machine 2) ┌──────────────────┐ ┌──────────────────┐ │ lcp_node.py │ UDP :9528 │ lcp_node.py │ │ (daemon) │ ◄────────────► │ (daemon) │ │ │ Ed25519 signed │ │ │ IPC: Unix sock │ ACK + Retry │ IPC: TCP :9529 │ └──────────────────┘ └──────────────────┘ ▲ ▲ │ Local IPC │ Local IPC lcp_send / lcp_check / lcp_ack (same commands) ``` ## Features - **UDP direct**: Low-latency messaging over Tailscale (vs file-based transfers) - **Ed25519 signing**: Every message cryptographically signed and verified - **Reliable delivery**: Application-layer ACK + exponential backoff retry (5 attempts) - **Heartbeat**: 30s keep-alive, 120s peer timeout detection - **Duplicate detection**: Idempotent message receipt via seen-ID tracking - **Daemon model**: Background service with local IPC for agent interaction - **Cross-platform**: macOS (Unix socket IPC) + Windows (TCP localhost IPC) ## Prerequisites - Python 3.9+ - [PyNaCl](https://pypi.org/project/PyNaCl/) (`pip install pynacl`) - [Tailscale](https://tailscale.com/) with both machines on the same Tailnet - UDP port 9528 open between peers ## Quick Start ### 1. Configure peer IPs Edit `scripts/lcp_node.py` and set: ```python MY_NAME = "AgentA" # Your agent name PEER_NAME = "AgentB" # Peer agent name MY_IP = "100.x.x.x" # Your Tailscale IP PEER_IP = "100.y.y.y" # Peer Tailscale IP ``` ### 2. Start daemon ```bash # macOS python3 scripts/lcp_node.py # Windows python scripts/windows/lcp_node_win.py ``` ### 3. Send & receive ```bash # Send a message python3 scripts/lcp_send.py "Hello from Agent A!" python3 scripts/lcp_send.py --type task "Please process data X" python3 scripts/lcp_send.py --type result --reply-to <msg-id> "Done!" # Check inbox python3 scripts/lcp_check.py --pretty # Archive processed messages python3 scripts/lcp_ack.py # Check daemon status python3 scripts/lcp_status.py ``` ## Message Protocol JSON messages with structure: ```json { "id": "uuid", "from": "AgentA", "to": "AgentB", "timestamp": "ISO-8601", "type": "chat|task|result|ping|pong", "message": "content", "replyTo": "optional-msg-id", "security": { "algo": "ed25519", "pubkey": "<base64>", "signature": "<base64>" } } ``` ## Wire Format (UDP) ``` [Magic 4B: "LCP1"][Seq 4B][Type 1B][JSON payload...] Type: 0x01=DATA, 0x02=ACK, 0x03=HEARTBEAT ``` ## Auto-start (macOS) Create a LaunchAgent plist pointing to `lcp_node.py` with `RunAtLoad=true` and `KeepAlive` for crash recovery. ## Auto-start (Windows) Use Task Scheduler or [nssm](https://nssm.cc/) to run `lcp_node_win.py` as a service. ## Data Directories - `data/inbox/` — incoming messages (pending) - `data/inbox_archive/` — processed messages - `data/outbox/` — sent message copies - `data/seen_ids.json` — duplicate detection state ## Configuration Reference | Parameter | Default | Description | |-----------|---------|-------------| | LCP_PORT | 9528 | UDP port for peer communication | | IPC_SOCKET | /tmp/lcp.sock | Unix socket for local IPC (macOS) | | IPC_PORT | 9529 | TCP port for local IPC (Windows) | | MAX_RETRIES | 5 | ACK retry attempts | | HEARTBEAT_INTERVAL_S | 30 | Seconds between heartbeats | | PEER_TIMEOUT_S | 120 | Seconds before marking peer offline | ## Extending For multi-peer support, run multiple daemon instances on different ports or extend `lcp_node.py` with a peer registry. See `references/protocol-spec.md` for the full LCP/1.1 specification.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 lobster-comm-1775965083 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 lobster-comm-1775965083 技能

通过命令行安装

skillhub install lobster-comm-1775965083

下载 Zip 包

⬇ 下载 lobster-comm v1.1.0

文件大小: 19.79 KB | 发布时间: 2026-4-13 10:53

v1.1.0 最新 2026-4-13 10:53
LCP/1.1 UDP P2P protocol: Ed25519 signing, reliable ACK delivery, heartbeat, cross-platform

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部