fix(cli): filter self from claudemesh peers output (alpha.39)
The peers command opens its own WS to each mesh, which briefly appears as a hostname-PID peer. Filter it out by session pubkey. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claudemesh-cli",
|
"name": "claudemesh-cli",
|
||||||
"version": "1.0.0-alpha.38",
|
"version": "1.0.0-alpha.39",
|
||||||
"description": "Peer mesh for Claude Code sessions — CLI + MCP server.",
|
"description": "Peer mesh for Claude Code sessions — CLI + MCP server.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"claude-code",
|
"claude-code",
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ export async function runPeers(flags: PeersFlags): Promise<void> {
|
|||||||
for (const slug of slugs) {
|
for (const slug of slugs) {
|
||||||
try {
|
try {
|
||||||
await withMesh({ meshSlug: slug }, async (client, mesh) => {
|
await withMesh({ meshSlug: slug }, async (client, mesh) => {
|
||||||
const peers = await client.listPeers();
|
const allPeers = await client.listPeers();
|
||||||
|
const selfPubkey = client.getSessionPubkey();
|
||||||
|
const peers = selfPubkey ? allPeers.filter((p) => p.pubkey !== selfPubkey) : allPeers;
|
||||||
|
|
||||||
if (flags.json) {
|
if (flags.json) {
|
||||||
allJson.push({ mesh: mesh.slug, peers });
|
allJson.push({ mesh: mesh.slug, peers });
|
||||||
|
|||||||
Reference in New Issue
Block a user