From 1dc614687410698506cb13014810b36813e4d453 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Sun, 6 Sep 2026 19:54:43 +0800 Subject: [PATCH] Allow a local pi-supervise extension for development Co-Authored-By: PI[gpt-5.6-sol] <288921227+claudypoo@users.noreply.github.com> --- src/herdr.ts | 2 +- test/herdr.test.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/herdr.ts b/src/herdr.ts index 708aab5..056880c 100644 --- a/src/herdr.ts +++ b/src/herdr.ts @@ -58,7 +58,7 @@ export function supervisorCommand(input: LaunchSupervisorInput): string { "--no-extensions", "-e", input.extensionPath, "-e", "npm:pi-intercom", - "-e", "npm:@wassname2/pi-supervise@0.0.4", + "-e", process.env.PI_GOALS_SUPERVISE_EXTENSION ?? "npm:@wassname2/pi-supervise@0.0.4", "--fork", input.sourceSessionFile, "--name", `goals-supervisor-${input.workerSessionId.slice(0, 8)}`, ]; diff --git a/test/herdr.test.ts b/test/herdr.test.ts index a95b71d..2859083 100644 --- a/test/herdr.test.ts +++ b/test/herdr.test.ts @@ -31,6 +31,11 @@ describe("supervisor pane command", () => { expect(command).not.toContain("pi-subagents"); }); + it("uses a local pi-supervise extension only when explicitly requested", () => { + vi.stubEnv("PI_GOALS_SUPERVISE_EXTENSION", "/repo/vendor/pi-supervise/src/index.ts"); + expect(supervisorCommand(input())).toContain("'-e' '/repo/vendor/pi-supervise/src/index.ts'"); + }); + it("accepts Herdr's text version output and stale pane cleanup", async () => { const cwd = mkdtempSync(join(tmpdir(), "pi-goals-herdr-")); const bin = join(cwd, "herdr");