mirror of
https://github.com/wassname/pi-plan.git
synced 2026-09-25 14:00:15 +08:00
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:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
```
|
||||
|
||||
Generated
+205
-614
File diff suppressed because it is too large
Load Diff
+1
-3
@@ -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"
|
||||
|
||||
Vendored
-8
@@ -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 };
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user