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:
@@ -29,7 +29,9 @@ export async function runPeers(flags: PeersFlags): Promise<void> {
|
||||
for (const slug of slugs) {
|
||||
try {
|
||||
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) {
|
||||
allJson.push({ mesh: mesh.slug, peers });
|
||||
|
||||
Reference in New Issue
Block a user