Skip to content

Commit 282c9a4

Browse files
sarahxsandersclaude
andcommitted
feat(cli): publish cliEntries inside skill-menu.json
The wizard's runtime resolver needs a flat list of CLI entries to look up parentCommand+command -> skillId. Lifting that array into skill-menu.json lets the wizard reuse the existing fetchSkillMenu plumbing instead of fetching a second URL and maintaining a parallel cache. cli-manifest.json still emits unchanged for one release while the older still-baked wizard is in the wild; planned removal once that release ages out (tracked separately). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 839eda9 commit 282c9a4

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

scripts/lib/build-phases.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,23 @@ function writeManifestAndMenu({ allSkills, docContents, distDir, configDir, vers
191191
downloadUrl: manifest.resources.find(r => r.id === skill.id)?.downloadUrl,
192192
});
193193
}
194+
195+
// The CLI entries are the lookup table the wizard's runtime resolver uses
196+
// (parentCommand + command -> skillId). They live inside skill-menu.json
197+
// so the wizard can reach them through the existing fetchSkillMenu path.
198+
// cli-manifest.json still ships with the same array under `entries` for
199+
// back-compat with the still-baked older wizard; it's slated for removal
200+
// once that wizard release ages out.
201+
const cliManifest = generateCliManifest({ allSkills, manifest });
202+
194203
const skillMenu = {
195204
version: manifest.version,
196205
buildVersion: manifest.buildVersion,
197206
categories: skillsByCategory,
207+
cliEntries: cliManifest.entries,
198208
};
199209
fs.writeFileSync(path.join(skillsDir, 'skill-menu.json'), JSON.stringify(skillMenu, null, 2));
200210

201-
const cliManifest = generateCliManifest({ allSkills, manifest });
202211
fs.writeFileSync(path.join(skillsDir, 'cli-manifest.json'), JSON.stringify(cliManifest, null, 2));
203212

204213
return manifest;

0 commit comments

Comments
 (0)