feat: add hostname to hello + local/remote peer locality detection
Peers report os.hostname() in the hello handshake. list_peers shows [local] or [remote] tag per peer. MCP instructions teach AI to read local peers' files directly via filesystem instead of relay. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ export interface PeerInfo {
|
||||
sessionId: string;
|
||||
connectedAt: string;
|
||||
cwd?: string;
|
||||
hostname?: string;
|
||||
peerType?: "ai" | "human" | "connector";
|
||||
channel?: string;
|
||||
model?: string;
|
||||
@@ -194,6 +195,7 @@ export class BrokerClient {
|
||||
sessionId: `${process.pid}-${Date.now()}`,
|
||||
pid: process.pid,
|
||||
cwd: process.cwd(),
|
||||
hostname: require("os").hostname(),
|
||||
peerType: "ai" as const,
|
||||
channel: "claude-code",
|
||||
model: process.env.CLAUDE_MODEL || undefined,
|
||||
|
||||
Reference in New Issue
Block a user