@gotgenes/pi-subagents 17.0.0 → 17.0.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/CHANGELOG.md +8 -0
- package/docs/architecture/architecture.md +222 -159
- package/docs/architecture/history/phase-18-reconsider-ui.md +166 -0
- package/docs/decisions/0004-reconsider-ui-direction.md +220 -0
- package/docs/plans/0426-consolidate-residual-test-clone-families.md +235 -0
- package/docs/plans/0427-reconsider-ui-direction.md +212 -0
- package/docs/plans/0446-spike-session-navigation-entry-criteria.md +171 -0
- package/docs/plans/0448-block-disabled-agent-spawn.md +207 -0
- package/docs/retro/0425-reconcile-subagent-events-contract.md +55 -0
- package/docs/retro/0426-consolidate-residual-test-clone-families.md +100 -0
- package/docs/retro/0427-reconsider-ui-direction.md +102 -0
- package/docs/retro/0446-spike-session-navigation-entry-criteria.md +99 -0
- package/docs/retro/0448-block-disabled-agent-spawn.md +42 -0
- package/package.json +1 -1
- package/src/tools/helpers.ts +3 -2
- package/src/tools/spawn-config.ts +6 -0
package/package.json
CHANGED
package/src/tools/helpers.ts
CHANGED
|
@@ -72,8 +72,9 @@ export interface TypeListRegistry extends AgentConfigLookup {
|
|
|
72
72
|
* Extracted from index.ts so it can be called inside createAgentTool.
|
|
73
73
|
*/
|
|
74
74
|
export function buildTypeListText(registry: TypeListRegistry, agentDir: string): string {
|
|
75
|
-
const
|
|
76
|
-
const
|
|
75
|
+
const isEnabled = (name: string) => registry.resolveAgentConfig(name).enabled !== false;
|
|
76
|
+
const defaultNames = registry.getDefaultAgentNames().filter(isEnabled);
|
|
77
|
+
const userNames = registry.getUserAgentNames().filter(isEnabled);
|
|
77
78
|
|
|
78
79
|
const defaultDescs = defaultNames.map((name) => {
|
|
79
80
|
const cfg = registry.resolveAgentConfig(name);
|
|
@@ -79,6 +79,12 @@ export function resolveSpawnConfig(
|
|
|
79
79
|
): ResolvedSpawnConfig | SpawnConfigError {
|
|
80
80
|
const rawType = params.subagent_type as SubagentType;
|
|
81
81
|
const resolved = registry.resolveType(rawType);
|
|
82
|
+
|
|
83
|
+
// A known-but-disabled type is an explicit error, not a silent unknown-type fallback.
|
|
84
|
+
if (resolved !== undefined && !registry.isValidType(resolved)) {
|
|
85
|
+
return { error: `Agent type "${resolved}" is disabled` };
|
|
86
|
+
}
|
|
87
|
+
|
|
82
88
|
const subagentType = resolved ?? "general-purpose";
|
|
83
89
|
const fellBack = resolved === undefined;
|
|
84
90
|
|