feat: add peer metadata (peerType, channel, model) and cwd to peer list
Extend the WS hello handshake with optional peerType, channel, and model fields so peers can advertise what kind of client they are. The broker stores these in-memory on PeerConn and returns them (along with cwd) in the peers_list response. CLI peers command and MCP list_peers tool now display the new metadata. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,10 @@ export interface PeerInfo {
|
||||
groups: Array<{ name: string; role?: string }>;
|
||||
sessionId: string;
|
||||
connectedAt: string;
|
||||
cwd?: string;
|
||||
peerType?: "ai" | "human" | "connector";
|
||||
channel?: string;
|
||||
model?: string;
|
||||
}
|
||||
|
||||
export interface InboundPush {
|
||||
@@ -162,6 +166,9 @@ export class BrokerClient {
|
||||
sessionId: `${process.pid}-${Date.now()}`,
|
||||
pid: process.pid,
|
||||
cwd: process.cwd(),
|
||||
peerType: "ai" as const,
|
||||
channel: "claude-code",
|
||||
model: process.env.CLAUDE_MODEL || undefined,
|
||||
timestamp,
|
||||
signature,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user