Revert bundled supervisor extensions

Co-Authored-By: PI[Kimi K3] <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-09-07 19:06:07 +08:00
co-authored by PI[Kimi K3]
parent fc321a90fc
commit 2b620a0334
6 changed files with 15 additions and 2097 deletions
+3 -1
View File
@@ -16,10 +16,12 @@ The two Pi sessions are visible. You can switch to the supervisor pane and talk
## Install
This branch requires Herdr 0.7.5 or newer. One Pi package bundles its supervisor and intercom extensions:
This branch requires Herdr 0.7.5 or newer and these Pi packages:
```bash
pi install npm:@wassname2/pi-goals
pi install npm:@wassname2/pi-supervise
pi install npm:pi-intercom
```
For a local checkout:
+6 -2068
View File
File diff suppressed because it is too large Load Diff
+1 -11
View File
@@ -26,14 +26,6 @@
"@earendil-works/pi-coding-agent": "*",
"typebox": "*"
},
"dependencies": {
"@wassname2/pi-supervise": "https://codeload.github.com/wassname/pi-intercom-supervisor/tar.gz/74cdd77dc2a1e9c7d1f21ca0f00d2a59530139b8",
"pi-intercom": "0.13.0"
},
"bundledDependencies": [
"@wassname2/pi-supervise",
"pi-intercom"
],
"files": [
"src",
"README.md"
@@ -61,9 +53,7 @@
},
"pi": {
"extensions": [
"./src/index.ts",
"./node_modules/pi-intercom/index.ts",
"./node_modules/@wassname2/pi-supervise/src/index.ts"
"./src/index.ts"
],
"image": "https://cdn.jsdelivr.net/gh/wassname/pi-goals@main/media/screenshot.png"
}
+2 -7
View File
@@ -1,5 +1,4 @@
import { execFile } from "node:child_process";
import { fileURLToPath } from "node:url";
import { promisify } from "node:util";
const execFileAsync = promisify(execFile);
@@ -39,10 +38,6 @@ async function herdr(args: string[], json = true): Promise<unknown> {
return stdout.trim() ? JSON.parse(stdout) : {};
}
function bundledExtension(path: string): string {
return fileURLToPath(new URL(path, import.meta.url));
}
function stalePaneError(error: unknown): boolean {
const record = error as { stdout?: unknown; stderr?: unknown; message?: unknown };
const text = [record.stdout, record.stderr, record.message].filter((value): value is string => typeof value === "string").join("\n");
@@ -61,8 +56,8 @@ export function supervisorCommand(input: LaunchSupervisorInput): string {
const args = [
"pi",
"--no-extensions",
"-e", process.env.PI_GOALS_INTERCOM_EXTENSION ?? bundledExtension("../node_modules/pi-intercom/index.ts"),
"-e", process.env.PI_GOALS_SUPERVISE_EXTENSION ?? bundledExtension("../node_modules/@wassname2/pi-supervise/src/index.ts"),
"-e", "npm:pi-intercom",
"-e", process.env.PI_GOALS_SUPERVISE_EXTENSION ?? "npm:@wassname2/pi-supervise@0.0.4",
"-e", input.extensionPath,
"--fork", input.sourceSessionFile,
"--name", `goals-supervisor-${input.workerSessionId.slice(0, 8)}`,
+1 -4
View File
@@ -24,10 +24,7 @@ describe("supervisor pane command", () => {
const command = supervisorCommand(input());
expect(command).toContain("'PI_GOALS_ROLE=supervisor'");
expect(command).toContain("'PI_GOALS_WORKER_INTERCOM_ID=intercom-12345678'");
expect(command).toContain("'pi' '--no-extensions'");
expect(command).toContain("node_modules/pi-intercom/index.ts");
expect(command).toContain("node_modules/@wassname2/pi-supervise/src/index.ts");
expect(command).toContain("'-e' '/repo/src/index.ts'");
expect(command).toContain("'pi' '--no-extensions' '-e' 'npm:pi-intercom' '-e' 'npm:@wassname2/pi-supervise@0.0.4' '-e' '/repo/src/index.ts'");
expect(command).toContain("'--fork' '/sessions/worker.jsonl'");
expect(command).toContain("'--model' 'provider/supervisor' 'Initialize supervision startup.'");
expect(command).not.toContain("pi-subagents");
+2 -6
View File
@@ -8,15 +8,11 @@ interface PackageManifest {
}
describe("package manifest", () => {
it("bundles the supervisor stack without registering a packaged subagent", () => {
it("includes the extension without registering a packaged subagent", () => {
const root = resolve(import.meta.dirname, "..");
const manifest = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")) as PackageManifest;
expect(manifest.files).toEqual(["src", "README.md"]);
expect(manifest.pi.extensions).toEqual([
"./src/index.ts",
"./node_modules/pi-intercom/index.ts",
"./node_modules/@wassname2/pi-supervise/src/index.ts",
]);
expect(manifest.pi.extensions).toEqual(["./src/index.ts"]);
expect(manifest.pi.subagents).toBeUndefined();
});
});