Add 5 pi extensions: pi-subagents, pi-crew, rpiv-pi, pi-interactive-shell, pi-intercom

This commit is contained in:
2026-05-08 15:59:25 +10:00
parent d0d1d9b045
commit 31b4110c87
457 changed files with 85157 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { join } from "path";
import { homedir } from "os";
function sanitizePipeSegment(value: string): string {
return value
.replace(/[^a-zA-Z0-9]+/g, "-")
.replace(/^-+|-+$/g, "")
.toLowerCase() || "default";
}
export function getBrokerSocketPath(
platform: NodeJS.Platform = process.platform,
homeDir: string = homedir(),
): string {
if (platform === "win32") {
return `\\\\.\\pipe\\pi-intercom-${sanitizePipeSegment(homeDir)}`;
}
return join(homeDir, ".pi/agent/intercom/broker.sock");
}