@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotgenes/pi-subagents",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -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 defaultNames = registry.getDefaultAgentNames();
76
- const userNames = registry.getUserAgentNames();
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