正在打开每日关注
正在打开每日关注
用文件邮箱与可选 Redis 连接多个 pi 会话,提供可审计、无权威的纯文本协作通道。
introducing pi-peer @badlogicgames's pi sessions can now find and message each other. two tools: list_peers and message_peer. anthropic's version is a unix socket per session. mine is a file on disk, which actually simplifies the entire design of this feature and also means it works "offline". a closed pi session will read its "mail" once resumed. ``` pi install npm:@shift-labs/pi-peer ``` https://t.co/EA3QeWa2uF
New in Claude Code: your sessions can now message each other. Instead of having to re-explain yourself in another session, you can now tell Claude to do it. It sends a summary (not your history or files), and the other session picks it up mid-task. https://t.co/PtNsfXeQXP
是什么
pi-peer 是 shift-labs-ai 提供的 TypeScript pi 扩展,让同一台机器上的多个 pi 会话互相发现并发送纯文本消息,也可通过共享 Redis 连接队友的会话。核心接口只有 list_peers 和 message_peer;邮箱落盘后可跨进程保留,关闭会话恢复时再读取。
核心设计 它把消息限制为最多 32 KB 的文本,明确不传递历史、文件或隐式状态,并在接收内容前标注“来自 peer、没有权威”,使协作通道可审计且不易伪装成用户指令。投递回执区分 delivered 与 queued,入站策略支持 accept、ask、refuse;去重、限流和 backlog 上限则从结构上抑制 Agent 对话循环。单机实现无 daemon、socket 或连接,远程能力通过可选 Redis 组合。
值得借鉴 最有价值的是边界清晰、传输层简单、失败可降级:远程配置错误或 Redis 不可用时,本地消息仍能工作。它把“传递事实”与“执行任务”分开,截图中消息成功送达,但双方目录为空、不是 Git 仓库,因此 rebase/push 仍然是 no-op。
边界与风险 本地通信要求共享文件系统,容器与宿主机默认无法互通;远程 Redis 中的身份只是声明而非验证,必须使用私有网络、TLS 与 ACL,并可对队友消息启用 ask。远程 delivered 仅代表接收扩展确认取信,不等于网络或业务动作完成。