chore: make pi-only rpc with fixed sessions

This commit is contained in:
Peter Steinberger
2025-12-05 17:50:02 +00:00
parent b3e50cbb33
commit fcf0c28132
33 changed files with 217 additions and 1565 deletions

View File

@@ -87,7 +87,7 @@ describe("cli program", () => {
const program = buildProgram();
await program.parseAsync(["relay:tmux:attach"], { from: "user" });
expect(spawnRelayTmux).toHaveBeenCalledWith(
"pnpm warelay relay --verbose",
"pnpm clawdis relay --verbose",
true,
false,
);
@@ -122,7 +122,7 @@ describe("cli program", () => {
await program.parseAsync(["relay:heartbeat:tmux"], { from: "user" });
const shouldAttach = Boolean(process.stdout.isTTY);
expect(spawnRelayTmux).toHaveBeenCalledWith(
"pnpm warelay relay --verbose --heartbeat-now",
"pnpm clawdis relay --verbose --heartbeat-now",
shouldAttach,
);
});

View File

@@ -247,7 +247,7 @@ Examples:
.option("--to <number>", "Override target E.164; defaults to allowFrom[0]")
.option(
"--session-id <id>",
"Force a session id for this heartbeat (resumes a specific Claude session)",
"Force a session id for this heartbeat (resumes a specific Pi session)",
)
.option(
"--all",

View File

@@ -26,7 +26,7 @@ describe("spawnRelayTmux", () => {
it("kills old session, starts new one, and attaches", async () => {
const session = await spawnRelayTmux("echo hi", true, true);
expect(session).toBe("warelay-relay");
expect(session).toBe("clawdis-relay");
const spawnMock = spawn as unknown as vi.Mock;
expect(spawnMock.mock.calls.length).toBe(3);
const calls = spawnMock.mock.calls as Array<[string, string[], unknown]>;