Use the installed pi-subagents instead of bundling its extension

Loading a second pi-subagents copy forced an "extensions": [] filter in user settings. pi-goals
now only imports its event helper; tests run against 0.70.1, which ships its own types, so the local
.d.ts shim is removed.

Co-Authored-By: Claude <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-09-24 11:08:30 +08:00
co-authored by Claude
parent 8dd48f6a4d
commit 22041d4680
7 changed files with 217 additions and 629 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ For a real load check without a model:
```bash
cd "$(mktemp -d)" && echo '{"id":"1","type":"get_commands"}' | pi --mode rpc --no-extensions \
-e <repo>/src/index.ts -e <repo>/node_modules/pi-subagents/index.ts \
-e <repo>/src/index.ts -e <repo>/node_modules/pi-subagents/index.js \
-e <repo>/node_modules/@jl1990/pi-scheduler/extensions/scheduler/index.ts
```
+8
View File
@@ -16,6 +16,14 @@ The supervisor/worker/Herdr design is on the `supervisor-worker-herdr` branch.
So: one agent with its normal tools, a user-written paragraph repeated on a schedule, a goals file, and an optional stateless judge. Planning is an explore-and-ask phase; only edits outside the goals file are blocked. Add machinery only when a real run shows it is needed.
## Install
```json
"packages": ["npm:pi-subagents", "~/path/to/pi-goals"]
```
pi-goals bundles the scheduler. Install pi-subagents yourself (0.70.1 tested); the judge needs it.
## Use
```
+205 -614
View File
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -26,10 +26,9 @@
},
"dependencies": {
"@jl1990/pi-scheduler": "https://registry.npmjs.org/@jl1990/pi-scheduler/-/pi-scheduler-0.5.0.tgz",
"pi-subagents": "0.66.0"
"pi-subagents": "0.70.1"
},
"bundleDependencies": [
"pi-subagents",
"@jl1990/pi-scheduler"
],
"files": [
@@ -59,7 +58,6 @@
"pi": {
"extensions": [
"./src/index.ts",
"./node_modules/pi-subagents/index.ts",
"./node_modules/@jl1990/pi-scheduler/extensions/scheduler/index.ts"
],
"image": "https://cdn.jsdelivr.net/gh/wassname/pi-goals@main/media/screenshot.png"
-8
View File
@@ -1,8 +0,0 @@
// pi-subagents publishes source whose internal graph targets another Pi SDK; type only the public call used here.
declare module "pi-subagents/agents" {
export function registerAgentViaEvents(input: {
pi: { events: { emit(channel: string, data: unknown): void } };
name: string;
definition: Record<string, unknown> & { description: string; systemPrompt: string };
}): { dispose(): void };
}
+2 -2
View File
@@ -1,8 +1,8 @@
// Checks the fakes in harness.ts against the real scheduler core and pi-subagents parsers.
import { createRequire } from "node:module";
import { describe, expect, it } from "vitest";
import { registerRuntimeAgentEventListener } from "../node_modules/pi-subagents/src/agents/runtime-agent-events.ts";
import { parseSubagentDelegationRequest } from "../node_modules/pi-subagents/src/slash/delegation-request.ts";
import { registerRuntimeAgentEventListener } from "../node_modules/pi-subagents/src/agents/runtime-agent-events.js";
import { parseSubagentDelegationRequest } from "../node_modules/pi-subagents/src/slash/delegation-request.js";
import { runJudge } from "../src/judge.js";
import { marker, wakeToken } from "../src/loop.js";
-1
View File
@@ -6,7 +6,6 @@
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"paths": { "pi-subagents/agents": ["./src/subagents-agents.d.ts"] },
"jsx": "react-jsx",
"outDir": "dist",
"rootDir": "src",