fix(import): read agent role from frontmatter before defaulting to "agent"

Package imports defaulted every agent's role to "agent" when the
extension block omitted the role field, even when the YAML frontmatter
contained the correct role (e.g. "ceo"). Read from frontmatter as a
fallback before the "agent" default so imported CEOs retain their role.

Closes #1990
This commit is contained in:
plind-dm
2026-04-03 23:04:44 +09:00
parent ca8d35fd99
commit f467f3d826
+1 -1
View File
@@ -2393,7 +2393,7 @@ function buildManifestFromPackageFiles(
name: asString(frontmatter.name) ?? title ?? slug,
path: agentPath,
skills: readAgentSkillRefs(frontmatter),
role: asString(extension.role) ?? "agent",
role: asString(extension.role) ?? asString(frontmatter.role) ?? "agent",
title,
icon: asString(extension.icon),
capabilities: asString(extension.capabilities),