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");