@ferris1225/pi-subagents 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/package.json +55 -55
- package/src/config.ts +35 -1
package/README.md
CHANGED
|
@@ -262,7 +262,11 @@ strength per agent. Everything else is config-file only, stored at
|
|
|
262
262
|
The delegation directive is always injected; there is no toggle. Invalid values
|
|
263
263
|
fall back safely, and stale keys — including the former `proactiveInjection`,
|
|
264
264
|
`maxConcurrency`, `maxFixRounds`, and `notifyOnReviewPass` knobs — are dropped
|
|
265
|
-
automatically.
|
|
265
|
+
automatically. Built-in roles a newer package no longer ships (such as the
|
|
266
|
+
retired `worker`/`cleaner`/`documenter`/`synthesizer`/`reviewer` set) are pruned
|
|
267
|
+
from `enabledAgents`, `knownAgents`, and the model/thinking tables at first
|
|
268
|
+
load, so the setup wizard never mixes old and new roles; custom agents are
|
|
269
|
+
untouched. At session
|
|
266
270
|
start, model overrides pi no longer reports are removed with a one-time notice. If
|
|
267
271
|
pi's own session compaction fails mid-thread, a notice surfaces the error and the
|
|
268
272
|
automatic retry instead of failing quietly.
|
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ferris1225/pi-subagents",
|
|
3
|
-
"version": "4.2.
|
|
4
|
-
"description": "A managed sub-agent team for pi: specialized roles, pre-commit documentation sync, retained threads, auto-fix chains, model fallback, and Git worktree isolation.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [
|
|
11
|
-
"pi-package",
|
|
12
|
-
"pi-extension",
|
|
13
|
-
"subagent",
|
|
14
|
-
"sub-agent",
|
|
15
|
-
"delegation",
|
|
16
|
-
"code-cleanup",
|
|
17
|
-
"dead-code"
|
|
18
|
-
],
|
|
19
|
-
"files": [
|
|
20
|
-
"src",
|
|
21
|
-
"agents",
|
|
22
|
-
"README.md",
|
|
23
|
-
"LICENSE"
|
|
24
|
-
],
|
|
25
|
-
"pi": {
|
|
26
|
-
"extensions": [
|
|
27
|
-
"./src/index.ts"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"check": "tsc --noEmit",
|
|
32
|
-
"test": "vitest run tests",
|
|
33
|
-
"prepack": "npm run check && npm test"
|
|
34
|
-
},
|
|
35
|
-
"peerDependencies": {
|
|
36
|
-
"@earendil-works/pi-agent-core": ">=0.84.4",
|
|
37
|
-
"@earendil-works/pi-ai": ">=0.84.4",
|
|
38
|
-
"@earendil-works/pi-coding-agent": ">=0.84.4",
|
|
39
|
-
"@earendil-works/pi-tui": ">=0.84.4",
|
|
40
|
-
"typebox": "*"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@earendil-works/pi-agent-core": "^0.84.4",
|
|
44
|
-
"@earendil-works/pi-ai": "^0.84.4",
|
|
45
|
-
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
46
|
-
"@earendil-works/pi-tui": "^0.84.4",
|
|
47
|
-
"@types/node": "^22.10.0",
|
|
48
|
-
"typebox": "^1.3.9",
|
|
49
|
-
"typescript": "^5.9.0",
|
|
50
|
-
"vitest": "^4.1.0"
|
|
51
|
-
},
|
|
52
|
-
"engines": {
|
|
53
|
-
"node": ">=22.19.0"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ferris1225/pi-subagents",
|
|
3
|
+
"version": "4.2.1",
|
|
4
|
+
"description": "A managed sub-agent team for pi: specialized roles, pre-commit documentation sync, retained threads, auto-fix chains, model fallback, and Git worktree isolation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"pi-package",
|
|
12
|
+
"pi-extension",
|
|
13
|
+
"subagent",
|
|
14
|
+
"sub-agent",
|
|
15
|
+
"delegation",
|
|
16
|
+
"code-cleanup",
|
|
17
|
+
"dead-code"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"src",
|
|
21
|
+
"agents",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"pi": {
|
|
26
|
+
"extensions": [
|
|
27
|
+
"./src/index.ts"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"check": "tsc --noEmit",
|
|
32
|
+
"test": "vitest run tests",
|
|
33
|
+
"prepack": "npm run check && npm test"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@earendil-works/pi-agent-core": ">=0.84.4",
|
|
37
|
+
"@earendil-works/pi-ai": ">=0.84.4",
|
|
38
|
+
"@earendil-works/pi-coding-agent": ">=0.84.4",
|
|
39
|
+
"@earendil-works/pi-tui": ">=0.84.4",
|
|
40
|
+
"typebox": "*"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@earendil-works/pi-agent-core": "^0.84.4",
|
|
44
|
+
"@earendil-works/pi-ai": "^0.84.4",
|
|
45
|
+
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
46
|
+
"@earendil-works/pi-tui": "^0.84.4",
|
|
47
|
+
"@types/node": "^22.10.0",
|
|
48
|
+
"typebox": "^1.3.9",
|
|
49
|
+
"typescript": "^5.9.0",
|
|
50
|
+
"vitest": "^4.1.0"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=22.19.0"
|
|
54
|
+
}
|
|
55
|
+
}
|
package/src/config.ts
CHANGED
|
@@ -15,6 +15,13 @@ import { getAgentDir, withFileMutationQueue } from "@earendil-works/pi-coding-ag
|
|
|
15
15
|
/** Full catalog of agents shipped with the package (selectable in /subagents-setup). */
|
|
16
16
|
export const BUILTIN_AGENT_NAMES = ["explorer", "executor"] as const;
|
|
17
17
|
|
|
18
|
+
/** Built-in agent names this package no longer ships. Loading an older config
|
|
19
|
+
* prunes them from every record so the setup wizard, dispatch catalog, and
|
|
20
|
+
* model-routing table never surface dead roles. Custom names stay untouched —
|
|
21
|
+
* except one that reuses a removed built-in name, which this cleanup cannot
|
|
22
|
+
* distinguish and deliberately treats as retired. */
|
|
23
|
+
export const REMOVED_BUILTIN_AGENT_NAMES = ["worker", "cleaner", "documenter", "synthesizer", "reviewer"] as const;
|
|
24
|
+
|
|
18
25
|
/** Agents enabled out of the box on a fresh install. */
|
|
19
26
|
export const DEFAULT_ENABLED_AGENTS: readonly string[] = [...BUILTIN_AGENT_NAMES];
|
|
20
27
|
|
|
@@ -183,6 +190,29 @@ function defaultConfig(): SubagentsConfig {
|
|
|
183
190
|
};
|
|
184
191
|
}
|
|
185
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Drop every removed built-in role from an already-normalized config: enabled
|
|
195
|
+
* and known lists, plus per-agent model and thinking routes. The schema-upgrade
|
|
196
|
+
* persistence in loadConfig writes the pruned shape back to disk.
|
|
197
|
+
*/
|
|
198
|
+
function pruneRemovedBuiltins(config: SubagentsConfig): SubagentsConfig {
|
|
199
|
+
const removed = new Set<string>(REMOVED_BUILTIN_AGENT_NAMES);
|
|
200
|
+
const filter = (names: readonly string[]): string[] => names.filter((name) => !removed.has(name));
|
|
201
|
+
const agentModels = { ...config.agentModels };
|
|
202
|
+
const agentThinkingLevels = { ...config.agentThinkingLevels };
|
|
203
|
+
for (const name of REMOVED_BUILTIN_AGENT_NAMES) {
|
|
204
|
+
delete agentModels[name];
|
|
205
|
+
delete agentThinkingLevels[name];
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
...config,
|
|
209
|
+
enabledAgents: filter(config.enabledAgents),
|
|
210
|
+
knownAgents: filter(config.knownAgents),
|
|
211
|
+
agentModels,
|
|
212
|
+
agentThinkingLevels,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
186
216
|
/**
|
|
187
217
|
* A shipped agent the config has never recorded is new in this release; the
|
|
188
218
|
* stale allow-list must not keep it dark. Enable it and adopt explorer's
|
|
@@ -216,6 +246,7 @@ function adoptNewBuiltins(config: SubagentsConfig): SubagentsConfig {
|
|
|
216
246
|
* A file from an older version (missing newer keys or holding extra keys) is
|
|
217
247
|
* normalized and persisted back, so the on-disk config stays current. Built-in
|
|
218
248
|
* agents the file has never seen are adopted: enabled with explorer's route.
|
|
249
|
+
* Built-in roles this package retired are pruned from every record.
|
|
219
250
|
*/
|
|
220
251
|
export async function loadConfig(configPath: string = getConfigPath()): Promise<SubagentsConfig> {
|
|
221
252
|
let text: string;
|
|
@@ -233,7 +264,10 @@ export async function loadConfig(configPath: string = getConfigPath()): Promise<
|
|
|
233
264
|
return defaultConfig();
|
|
234
265
|
}
|
|
235
266
|
|
|
236
|
-
|
|
267
|
+
// Adopt newly shipped roles first so the prune below works on the final
|
|
268
|
+
// catalog, then drop roles this package stopped shipping and persist the
|
|
269
|
+
// cleaned shape back to disk.
|
|
270
|
+
const config = pruneRemovedBuiltins(adoptNewBuiltins(normalizeConfig(parsed)));
|
|
237
271
|
|
|
238
272
|
// Schema upgrade: persist the normalized shape when the file gained fields
|
|
239
273
|
// (new version) or dropped invalid ones.
|