@agimon-ai/po-team 0.0.0-alpha.211 → 0.0.0-alpha.213

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.
@@ -2757,7 +2757,10 @@ var SpawnPlanner = class {
2757
2757
  }
2758
2758
  async resolveAgentOrThrow(name, cwd, scope) {
2759
2759
  const resolved = await this.agents.find(cwd, scope, name);
2760
- if (!resolved) throw new PoTeamExpectedError(ERROR_CODE_AGENT_NOT_FOUND, `Unknown agent '${name}'.`, false, "Call subagent({\"action\":\"agents\"}) and retry with an exact name.");
2760
+ if (!resolved) {
2761
+ const candidates = (await this.agents.discover(cwd, scope)).agents.map((agent) => agent.name).toSorted();
2762
+ throw new PoTeamExpectedError(ERROR_CODE_AGENT_NOT_FOUND, `Unknown agent '${name}'.${candidates.length ? ` Available: ${candidates.join(", ")}.` : " No agents are visible from this directory."}`, false, "Retry with an exact name from the Available list, or use an inline agent. team.agents() and subagent({\"action\":\"agents\"}) show descriptions.");
2763
+ }
2761
2764
  return resolved;
2762
2765
  }
2763
2766
  async resolveExecutableAgent(taskInput, cwd, scope, inheritParent = false) {