From 308251c69ccfdb8f6d6aed995c4b9790e27ee3ff Mon Sep 17 00:00:00 2001 From: Trent Pierce Date: Mon, 26 Jan 2026 14:43:46 -0600 Subject: [PATCH] feat: Add winget support for uv and go installation on Windows --- src/agents/skills-install.ts | 49 ++++++++++++++++++++++++++++++++++-- src/agents/skills/config.ts | 16 +++++++----- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/src/agents/skills-install.ts b/src/agents/skills-install.ts index 135045936..63b93b02f 100644 --- a/src/agents/skills-install.ts +++ b/src/agents/skills-install.ts @@ -12,6 +12,7 @@ import { hasBinary, loadWorkspaceSkillEntries, resolveSkillsInstallPreferences, + resolveRuntimePlatform, type SkillEntry, type SkillInstallSpec, type SkillsInstallPreferences, @@ -276,6 +277,28 @@ async function installDownloadSpec(params: { }; } +async function installWithWinget( + packageId: string, + timeoutMs: number, +): Promise<{ code: number | null; stdout: string; stderr: string }> { + if (!hasBinary("winget")) { + return { code: null, stdout: "", stderr: "winget not found" }; + } + return await runCommandWithTimeout( + [ + "winget", + "install", + "--id", + packageId, + "-e", + "--silent", + "--accept-source-agreements", + "--accept-package-agreements", + ], + { timeoutMs }, + ); +} + async function resolveBrewBinDir(timeoutMs: number, brewExe?: string): Promise { const exe = brewExe ?? (hasBinary("brew") ? "brew" : resolveBrewExecutable()); if (!exe) return undefined; @@ -366,10 +389,21 @@ export async function installSkill(params: SkillInstallRequest): Promise