fix(plugins): expose enabled skills for agent assignment
This commit is contained in:
@@ -674,7 +674,7 @@ export function createCodingProductHost(options: CodingProductHostOptions): Codi
|
||||
async listSkills(agentId) {
|
||||
const project = await activeProject();
|
||||
const assignedSkillIds = await selectedSkillIds(project.path, agentId);
|
||||
const effective = options.effectiveResolver
|
||||
const effective = agentId && options.effectiveResolver
|
||||
? await options.effectiveResolver.resolve({
|
||||
projectId: project.id,
|
||||
projectPath: project.path,
|
||||
@@ -687,11 +687,17 @@ export function createCodingProductHost(options: CodingProductHostOptions): Codi
|
||||
// still supplies the availability set; only the worker opener receives
|
||||
// the effective subset.
|
||||
const skillIds = assignedSkillIds;
|
||||
const enabledPluginIds = effective
|
||||
? effective.effectiveSkillIds
|
||||
: options.getEnabledPluginIds
|
||||
? await options.getEnabledPluginIds(project.path)
|
||||
: [];
|
||||
// The unscoped list is the Agent assignment catalog. It must expose
|
||||
// every project-enabled plugin Skill before that Skill has been assigned;
|
||||
// the resolver's effective subset is only authoritative once an Agent is
|
||||
// selected (and for worker-facing projections).
|
||||
const enabledPluginIds = !agentId && options.getEnabledPluginIds
|
||||
? await options.getEnabledPluginIds(project.path)
|
||||
: effective
|
||||
? effective.effectiveSkillIds
|
||||
: options.getEnabledPluginIds
|
||||
? await options.getEnabledPluginIds(project.path)
|
||||
: [];
|
||||
return await options.productTools.listSkills(
|
||||
skillIds,
|
||||
enabledPluginIds,
|
||||
|
||||
Reference in New Issue
Block a user