Skip to content

Commit 8fd68bf

Browse files
Sync packages from monorepo (8d6d6ba)
1 parent 4ac9a38 commit 8fd68bf

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎packages/cli/src/download/page-downloader.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export const downloadPage = async (url: string, outputDir: string): Promise<{ ti
8888
// Write the HTML file
8989
fs.writeFileSync(path.join(srcDir, "index.html"), html)
9090

91-
console.log(` Saved index.html + ${downloaded.size} asset(s) to ${path.relative(process.cwd(), srcDir)}/`)
91+
const assetMsg = downloaded.size === 0 ? "no other assets" : `${downloaded.size} asset${downloaded.size === 1 ? "" : "s"}`
92+
console.log(` Saved index.html + ${assetMsg} to ${path.relative(process.cwd(), srcDir)}/`)
9293
return { title: extractTitle(html) }
9394
}
9495

‎packages/cli/src/skills/registry.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ export const skillsPipeline: SkillDefinition[] = [
1717
{ name: "setup-deploy", optional: false },
1818
]
1919

20+
/** Maps our agent binary names to the skills CLI agent identifiers */
21+
const toSkillsAgent = (agent: string): string => {
22+
const map: Record<string, string> = {
23+
claude: "claude-code",
24+
gemini: "gemini-cli",
25+
}
26+
return map[agent] ?? agent
27+
}
28+
2029
/** Returns the skills directory for a given agent inside the game dir */
2130
export const agentSkillsDir = (agent: string): string => {
2231
if (agent === "claude") return ".claude/skills"
@@ -27,7 +36,8 @@ export const agentSkillsDir = (agent: string): string => {
2736

2837
/** Installs all Puzzmo skills from the OSS repo using `npx skills add` */
2938
export const installSkills = (agent: string, gameDir: string): number => {
30-
const result = spawnSync("npx", ["skills", "add", "puzzmo-com/oss", "--agent", agent, "--skill", "*", "--copy", "-y"], {
39+
const skillsAgent = toSkillsAgent(agent)
40+
const result = spawnSync("npx", ["skills", "add", "puzzmo-com/oss", "--agent", skillsAgent, "--skill", "*", "--copy", "-y"], {
3141
cwd: gameDir,
3242
stdio: "inherit",
3343
encoding: "utf-8",

0 commit comments

Comments
 (0)