diff --git a/docs/subsystems/library.md b/docs/subsystems/library.md index 8d5d1ea20..d64c8bd35 100644 --- a/docs/subsystems/library.md +++ b/docs/subsystems/library.md @@ -36,7 +36,7 @@ Pi's extensions and packages. | Subagents | A `Subagent` (#2283) is a name (lowercase letters, digits and -), a one-line description, a prompt, and the library's skills and MCP servers it uses, given to the agents ticked for it. `syncSubagents` writes it as a file of its own in each agent's user-level folder, in that agent's format (`subagentSpecOf`): Markdown with YAML front matter in `~/.claude/agents` (with `skills` and `mcpServers`), `~/.factory/droids` (with `mcpServers`), `~/.config/opencode/agents` (`mode: subagent`), `~/.gemini/agents`, `~/.qwen/agents`, `~/.grok/agents`, `~/.cursor/agents` and `~/.copilot/agents` (`.agent.md`); a TOML role (`name`, `description`, `model` when set, `developer_instructions`) in `$CODEX_HOME/agents`. Skills and servers are named only where the agent's file can name them, and only those the library has. A subagent's optional `Model` (a model or routing group of Codex's list, `subagentModels` in `/api/library`) is written only into Codex's role (luckymanjc on Discord): the role file is a config layer, and Codex lays its `model` over the one its lead names in spawn_agent (`apply_spawn_agent_role` after `apply_requested_spawn_agent_model_overrides` in codex-rs `core/src/agent/child_config.rs`), so the subagent's requests carry it and the gateway routes them as any other. Codex's subagent model on the Agents page (`CodexSubagentModel`), when set, still rewrites every subagent's request, and the editor says so. Without one, a Codex subagent runs on the model its lead names, else the lead's own. The page lists, per agent, whether it binds skills, servers and a model (`SubagentAgentView`), names the agents that run a subagent on their own pick, and greys out an agent that takes none. | [`subagents.go`](../../internal/library/subagents.go) | | Claude plugins | A `Plugin` (FakeshadowzZ on X) is a Claude Code plugin kept as one item: `.claude-plugin/plugin.json`, `skills//SKILL.md`, `agents/*.md`, `hooks/hooks.json` and `.mcp.json`, from a folder, a git address or a marketplace.json (`ProbePlugins`, `InstallPlugins`; a marketplace entry with a relative path, or a github/url/git source, is fetched when installed). Its files are copied to `/plugins/`; `${CLAUDE_PLUGIN_ROOT}` is that folder and `${CLAUDE_PLUGIN_DATA}` is `/plugin-data/`, which an update keeps. Its parts are ordinary library skills, MCP servers, hooks and subagents, each tagged `Bundle: `, so every agent gets them through the code of its kind and the old tabs go on working; the plugin holds the names, its agents and `Off`. `PluginAgents` sets every part's agents, `PluginOn` clears them (kept in `Agents` for turning it on again) or gives them back, `RemovePlugin` removes the parts, and `UpdatePlugin` reads the source again. A hook whose Claude event and matcher have a portable event becomes it (Stop turn-end, PostToolUse after-tool, PreToolUse before-tool, UserPromptSubmit prompt, SessionStart session-start; Bash is shell, Edit/Write/MultiEdit is edit); any other event is `claude:`, for Claude Code only. Subagents go to the agents in `SubagentAgents`. A part whose name the library has gets the prefix `-`: the user's own item is never written over or removed. Slash commands, LSP servers and hooks that aren't a command are listed in `Left` and shown, not carried. A backup file carries the parts but not the plugin record or its folder, so on another computer they are ordinary items whose `${CLAUDE_PLUGIN_ROOT}` paths don't exist (`TestPluginImportCarryOnOffRemove`, `TestPluginNameClashKeepsTheUsersOwn`, `TestPluginMarketplaceAndUpdate`, `TestPluginRefusesWhatIsNone`, `library-plugins.test.cjs`). | [`plugin.go`](../../internal/library/plugin.go), [`plugins/library/client.js`](../../internal/gui/assets/plugins/library/client.js) | | Backups | Before a change first writes an agent file, `backups` copies it to `BackupDir`, one folder per change. The last `keepBackups` (30) changes are kept. The Backups button at the top of every tab, beside Library folder, opens that folder (`libHead`; Dade on Discord found it at the foot of a long page). | [`backup.go`](../../internal/library/backup.go) | -| RTK | `SetRTK` runs rtk's own installer (`rtk init -g …`) for an agent being switched on. For one being switched off, it removes exactly what the installer wrote, using magpie's own code, which works even with rtk gone. `ReadRTK` reads each agent's files to say which have the hook. An agent gone for its CLI (`CLIMissing`, #2254) isn't offered rtk, but one that still has the hook is listed so it can be taken out. `rtkSpec.blocked` stops the installer where it would break an agent. `rtkSpec.env` tells the installer the agent's folder where rtk would pick another: Hermes Agent's is `appdir.HermesHome` (`%LOCALAPPDATA%\hermes` on Windows), which rtk is given as `HERMES_HOME`, since rtk 0.51 knows only `$HERMES_HOME` and `~/.hermes`. Antigravity CLI (`agy`, #2202) gets rtk 0.51's own plugin for Antigravity, `plugins/rtk` in its global customization folder `~/.gemini/config` (`plugin.json`, `hooks.json` with `PreToolUse` → `rtk hook antigravity`, `rules/AGENTS.md`), which `agy plugin list` lists; switching it off takes that one folder out. rtk 0.50 knows Antigravity only per project and fails `rtk init -g --agent antigravity`, so an older rtk is `blocked` (`agyBlocked`) and the row says to update RTK. OpenCode 2 loads only the plugin rtk 0.52 on writes (one default object with `id` and `setup()`, rtk-ai/rtk#4187); an older rtk's plugin is for OpenCode 1 and OpenCode 2 refuses it, so with an OpenCode 2 here an older rtk is `blocked` (`openCodeBlocked`) and the row says to update RTK (#2295). Under OpenCode 2, an old plugin left from before an rtk update counts as off once the rtk here can write the new one (`openCodeHas`), so switching it on writes the new one over it; with an older rtk it counts as on, so it can be switched off. Factory's Droid (lml0664 on Discord) gets rtk's own `rtk init -g --agent droid`, given Droid's folder as `FACTORY_HOME_OVERRIDE`; rtk puts its `Execute` group (`rtk hook droid`) in the root `hooks.json`, or in `settings.json`'s `hooks.PreToolUse` where Droid's hooks already are, so `droidHookFiles` reads and switches off all three places rtk 1.1.0 may use (`hooks.json`, `hooks/hooks.json`, `settings.json`), leaving the user's own hooks. rtk before 0.44 has no Droid agent, so it is `blocked` (`droidBlocked`). A detected agent RTK has no hook for at all is still listed, from `rtkNoHook`, with the reason and a switch that can't be turned on (dsh: its hooks can allow or deny a command but not rewrite it, and `rtk init` has no `--agent dsh`; Grok Build and Grok App: `rtk init` has no Grok or Grok App agent, so both are listed with the switch off; Qoder and Qoder CN: rtk 1.1.0 has no Qoder agent; Cline and Kimi Code: `rtk init --agent cline|kimi` writes only one project's `.clinerules` or `AGENTS.md`, instructions with no hook, and Kimi's refuses `-g`). RTK 1.1.0's Trae, Windsurf, Kilo Code and Mistral Vibe have no magpie agent. The page's No RTK hook tag gives each agent's own reason and rtk-ai/rtk issue (`rtkNoHookWhy` in plugins/library/client.js: dsh #3847, Grok Build and Grok App #2136, Qoder and Qoder CN #1327, Cline #3841), and an agent with no entry gets no link; `TestRTKNoHookIssuesAreEachAgents` fails when the page and `rtkNoHook` cite different issues, or two agents cite the same ones without a reason in `sharedRTKIssues`. | [`rtk.go`](../../internal/library/rtk.go) | +| RTK | `SetRTK` runs rtk's own installer (`rtk init -g …`) for an agent being switched on. For one being switched off, it removes exactly what the installer wrote, using magpie's own code, which works even with rtk gone. An rtk.exe in one of winget's folders that winget has no record of (`winget list` says so, or its records name another folder; netube99 on X, 0x8A150014) is upgraded from rtk's own Windows release over the file a `WinGet\Links` link points to, not by `winget upgrade`. `ReadRTK` reads each agent's files to say which have the hook. An agent gone for its CLI (`CLIMissing`, #2254) isn't offered rtk, but one that still has the hook is listed so it can be taken out. `rtkSpec.blocked` stops the installer where it would break an agent. `rtkSpec.env` tells the installer the agent's folder where rtk would pick another: Hermes Agent's is `appdir.HermesHome` (`%LOCALAPPDATA%\hermes` on Windows), which rtk is given as `HERMES_HOME`, since rtk 0.51 knows only `$HERMES_HOME` and `~/.hermes`. Antigravity CLI (`agy`, #2202) gets rtk 0.51's own plugin for Antigravity, `plugins/rtk` in its global customization folder `~/.gemini/config` (`plugin.json`, `hooks.json` with `PreToolUse` → `rtk hook antigravity`, `rules/AGENTS.md`), which `agy plugin list` lists; switching it off takes that one folder out. rtk 0.50 knows Antigravity only per project and fails `rtk init -g --agent antigravity`, so an older rtk is `blocked` (`agyBlocked`) and the row says to update RTK. OpenCode 2 loads only the plugin rtk 0.52 on writes (one default object with `id` and `setup()`, rtk-ai/rtk#4187); an older rtk's plugin is for OpenCode 1 and OpenCode 2 refuses it, so with an OpenCode 2 here an older rtk is `blocked` (`openCodeBlocked`) and the row says to update RTK (#2295). Under OpenCode 2, an old plugin left from before an rtk update counts as off once the rtk here can write the new one (`openCodeHas`), so switching it on writes the new one over it; with an older rtk it counts as on, so it can be switched off. Factory's Droid (lml0664 on Discord) gets rtk's own `rtk init -g --agent droid`, given Droid's folder as `FACTORY_HOME_OVERRIDE`; rtk puts its `Execute` group (`rtk hook droid`) in the root `hooks.json`, or in `settings.json`'s `hooks.PreToolUse` where Droid's hooks already are, so `droidHookFiles` reads and switches off all three places rtk 1.1.0 may use (`hooks.json`, `hooks/hooks.json`, `settings.json`), leaving the user's own hooks. rtk before 0.44 has no Droid agent, so it is `blocked` (`droidBlocked`). A detected agent RTK has no hook for at all is still listed, from `rtkNoHook`, with the reason and a switch that can't be turned on (dsh: its hooks can allow or deny a command but not rewrite it, and `rtk init` has no `--agent dsh`; Grok Build and Grok App: `rtk init` has no Grok or Grok App agent, so both are listed with the switch off; Qoder and Qoder CN: rtk 1.1.0 has no Qoder agent; Cline and Kimi Code: `rtk init --agent cline|kimi` writes only one project's `.clinerules` or `AGENTS.md`, instructions with no hook, and Kimi's refuses `-g`). RTK 1.1.0's Trae, Windsurf, Kilo Code and Mistral Vibe have no magpie agent. The page's No RTK hook tag gives each agent's own reason and rtk-ai/rtk issue (`rtkNoHookWhy` in plugins/library/client.js: dsh #3847, Grok Build and Grok App #2136, Qoder and Qoder CN #1327, Cline #3841), and an agent with no entry gets no link; `TestRTKNoHookIssuesAreEachAgents` fails when the page and `rtkNoHook` cite different issues, or two agents cite the same ones without a reason in `sharedRTKIssues`. | [`rtk.go`](../../internal/library/rtk.go) | | RTK in WSL | An agent in a WSL distro (`claude@wsl:Ubuntu`) is listed by its kind (`rtkKind`), and its hook runs in the distro, where Windows' rtk.exe is no command, so it gets the distro's own rtk (lex on Discord). `rtkDistroOf` asks the distro with `wsl.exe -d -e sh -lc` where rtk is (a login or interactive shell's PATH; else `~/.local/bin` or `~/.cargo/bin`, `offPath`), kept 15s; `ReadRTK` lists one `RTKDistro` for each distro its agents are in. Install RTK in WSL `` (`InstallRTKIn`, `POST /api/library/rtk/install` with `distro`, `magpie library rtk install `) runs RTK's own Linux installer in the distro (`curl -fsSL …/install.sh \| sh`, wget where there's no curl). Switching an agent on runs the distro's rtk there (`rtkInstallWSL`: `rtk init -g …` with its folder on PATH, Claude Code pointed at a folder of its own for the OpenCode and Cursor installers), and reads and edits its files under the distro's home as magpie opens it (`rtkClaudeDir`, `rtkCodexDir`, `rtkHome`). A distro that isn't running is never started (#3896): `rtkWSLLive` and `rtkDistroOf` check `agent.WSLRunning` first, its agents are listed `asleep` with the switch off, and switching or installing says to start it (`TestRTKWSLAsleep`). The page gives each distro a card (`rtkDistroCard` in plugins/library/client.js; library-rtk-wsl.test.cjs). | [`rtk_wsl.go`](../../internal/library/rtk_wsl.go) | | billion-context | `SetBili` runs bili's own `bili plugin install ` for an agent switched on and `bili plugin remove ` for one switched off; `ReadBili` reads `bili plugin list` (the agent column, then the status; `installed…` is on, `not installed` off, anything else shown as it is). `InstallBili` runs its README's `npm install -g billion-context --prefix=~/.local` (`npm install -g billion-context` on Windows), and `biliPath` finds bili there when it isn't on PATH. Offered only where bili's plugin works with magpie in front (`biliLanes`): Pi, omp and OpenCode load it in process and still send to magpie, and Claude Code goes through bili's proxy, which forwards to the gateway (`ANTHROPIC_BASE_URL` `…/bili/`). Codex's lane is an MCP server only, ZCode's routes only its own provider, Kimi Code's renames `default_model` to `bili-kimi` at every start and dsh's install failed through dsh's pnpm, so none of those is offered; neither is an agent in WSL. bili's remove doesn't restore a file: it leaves `"packages": []` in Pi's settings and `extensions:` in omp's config, and after magpie rewrote Claude Code's settings.json it deleted `ANTHROPIC_BASE_URL` (Claude Code then went to Anthropic) and put back its own `DISABLE_AUTO_COMPACT`. So switching on keeps each file it writes as it was before and after (`bili-plugins.json` in magpie's config folder), and `biliRestore` after the remove writes the file before back byte for byte when nothing changed it since, else merges JSON (`biliMergeJSON`): what the install changed and is still as installed goes back, a value changed since stays, and what the remove changed beyond the install is put back. Without a record (bili installed outside magpie), only a Claude Code `ANTHROPIC_BASE_URL` the remove took out goes back to the address bili forwarded to. The `.bili-bak` and `.bili-last` files bili leaves beside each file go with it. bili's Claude Code install also writes `DISABLE_AUTO_COMPACT` "1" into the shared settings.json, so a session bili doesn't fold (the Claude desktop app's Code tab, which sets its own `ANTHROPIC_BASE_URL`, bili's #2290, or a window larger than the one magpie serves) has no compaction left and Claude Code answers every message with "Prompt is too long" without sending it. `biliKeepCompact` writes "0" in its place after the install (bili's own reinstall keeps a value that isn't "1"), unless the file had a `DISABLE_AUTO_COMPACT` of the user's own before; `keepBiliCompact`, from `KeepLinked` at start, does the same for a plugin installed before and has the record say "0", so switching off still takes it away. Zed has no plugin of bili's; bili's README lists it through the launcher (`bili zed`, Linux only, which leaves a provider on loopback direct, so it never passes magpie's gateway) and, on every system, the `/bili/` prefix its docs give for a client whose model address can be edited. So Zed is a URL lane (`biliURLLanes`, [`bili_url.go`](../../internal/library/bili_url.go)): switched on, `biliServe` has `bili start --port 8787` answer (`GET /__bili/health` says `{"ok":true}`; one the user runs is used as it is, else magpie runs its own under `KeepLinked`'s context, logging to `bili-start.log`), then `agent.ZedThrough` puts the magpie provider's `api_url` at `http://127.0.0.1:8787/bili//v1` and saves the key for that address in the system's credential store, where Zed looks it up by the address. Zed must be on magpie first. A pick and a sync keep the prefix while magpie answers through it (`zedReach`, the proxy recognition of #1985); switched off, `api_url` goes back to the gateway and magpie's `bili start` ends when no agent goes through the prefix. `keepBiliServe`, from `KeepLinked`, starts it again at magpie's start while Zed is on. `TestBiliZedThroughPrefix`, `TestZedThroughBili`. Hermes is a URL lane too: bili's Hermes plugin (`bili plugin install hermes`, `hermes-plugin/__init__.py` `apply_env`) routes Hermes by setting `HTTPS_PROXY` in its process and nothing else, so magpie's provider at `http://127.0.0.1` never passes it and nothing would fold. Switched on, `agent.HermesThrough` puts the `base_url` of magpie's entries (`magpie`, `magpie-anthropic`) behind the prefix in the connected config and every profile that has them; `hermesEntries` keeps a prefix on loopback with a path (`hermesPrefix`) across a pick and a sync, and `wiringOff` takes it as magpie's (`reachesMagpie`). A profile that gets magpie's entries later goes to the gateway until Hermes is switched on again. `TestBiliHermesThroughPrefix`, `TestHermesThroughBili`. What bili saved is its own count ([`bili_saved.go`](../../internal/library/bili_saved.go)): bili 0.1.213 has no command that prints it, and its running proxy serves its dashboard's numbers at `GET /__bili/overview`, summed over every session in its one store for every agent and lane. `readBiliSaved` asks the bilis registered in `/instances/.json` (`$XDG_STATE_HOME` or `~/.local/state`, then `billion-context`, on every system), newest `startedAt` first, loopback `http` origins only, within 3s in all; a file a crashed bili left behind just fails. The first answer is `BiliView.Saved` (`netSavedTotal` as `net`, only with `hasFoldData`; `grossSavedTotal`, which bili calls an upper bound; `foldsTotal`, `sessions`, `requests`) and is kept in `bili-saved.json` in magpie's config folder, shown with `live: false` and its time when no bili answers. magpie never starts a bili to ask (it would auto-update and start watchers). `TestBiliSavedFromRunningBili` (the literal overview in `testdata/bili`), `TestBiliSavedNoFolds`, `TestBiliSavedNoneYet`, `TestBiliSavedOnThePage`, `TestBiliLoopback`. `TestBiliClaudeKeepsAutoCompact`, `TestBiliOnOffExact`, `TestBiliClaudeKeepsMagpiesRoute`, `TestBiliOffWithoutRecord`; the page's tab is `renderBili` (library-bili.test.cjs). | [`bili.go`](../../internal/library/bili.go) | | Pi extensions | Each Pi here, this computer's and each WSL distro's (`piPlaces`), with the extensions and packages it loads, read by Pi's own rules (`@earendil-works/pi-coding-agent` 1.4: `resolveExtensionEntries`, `isEnabledByOverrides`, `applyPatterns`). An extension is a `.ts`/`.js` file or a folder (package.json `pi.extensions`, else `index.ts`, else `index.js`) in `/extensions`, or a path its settings.json `extensions` lists; a package is an entry of settings.json `packages`. Built-in extensions (`builtin:mcp` and the rest) aren't listed: `builtin:mcp` carries the MCP servers magpie gives Pi. `SetPiExtension` writes what `pi config` writes (`-path` off; the `-` taken out and `+path` only where still excluded, on); `SetPiPackage` sets a package's four filters to `[]` (off) or takes them out (on), and refuses an entry that already picks some parts (`filtered`, changed in `pi config`). `CopyPi` gives a package to another Pi as its settings.json entry, which Pi installs itself when it next starts (npm into `/npm`, git into `/git`), never as copied files; it refuses a local package, and one the other Pi has already by Pi's identity (npm name, git host/path). An extension is copied as its file or folder into the other's `extensions`, leaving out `node_modules`, `.git` and symlinks, never over one of the same name, and the page says to run `npm install` there when it has dependencies (leokon3 on Discord). A settings.json that can't be parsed lists nothing and is never written; a stopped distro is never started (`asleep`); every write is backed up first. `GET`/`POST /api/library/pi`, `POST /api/library/pi/copy`; the Library's Pi packages tab, shown while a Pi is here (`renderPi` in plugins/library/client.js; library-pi-extensions.test.cjs). | [`piext.go`](../../internal/library/piext.go) | diff --git a/internal/library/rtk_upgrade.go b/internal/library/rtk_upgrade.go index c2d4c9b01..7315ae24b 100644 --- a/internal/library/rtk_upgrade.go +++ b/internal/library/rtk_upgrade.go @@ -350,6 +350,18 @@ func rtkUpgrader(bin string) []string { // winget's own folders: its package, or the link it puts in // WinGet\Links to one installed with --location (#1527) case rtkOnWindows && (strings.Contains(strings.ToLower(slash), "/winget/") || strings.Contains(strings.ToLower(filepath.ToSlash(bin)), "/winget/")): + // winget says it has no rtk-ai.rtk installed (0x8A150014, netube99 on + // X): the exe was put in its folder, or left there, by something + // else, and winget upgrade would fail. rtk's own release is put over + // it instead, over the file a WinGet\Links link points to. + // A link in WinGet\Links to an exe outside winget's folders was made + // by winget (--location, #1527); only the exe inside them is asked. + if have("winget") && strings.Contains(strings.ToLower(slash), "/winget/") && wingetDisowns(bin, real) { + if rtkArch == "amd64" { + return []string{rtkWindowsRelease, real} + } + return nil + } if have("winget") { return wingetUp } @@ -753,7 +765,7 @@ func UpgradeRTK() (*RTKView, error) { if version == "" { return nil, fmt.Errorf("magpie can't tell which RTK release to install for %s — check the network and try again", bin) } - if err := installRTKWindowsRelease(version, bin); err != nil { + if err := installRTKWindowsRelease(version, c[1]); err != nil { return nil, err } } else { diff --git a/internal/library/rtk_windows_release_test.go b/internal/library/rtk_windows_release_test.go index 46d21395b..56f76f113 100644 --- a/internal/library/rtk_windows_release_test.go +++ b/internal/library/rtk_windows_release_test.go @@ -286,3 +286,50 @@ func TestRTKWindowsReleaseUpgradeRunsTheInstall(t *testing.T) { t.Fatalf("the rtk changed to %q", got) } } + +// netube99 on X: an rtk.exe in winget's own folder (…\WinGet\Packages\ +// rtk-ai.rtk_…, or its link in WinGet\Links) that winget has no record of +// got `winget upgrade`, which failed with 0x8A150014 "winget finds no +// rtk-ai.rtk package". It is upgraded from rtk's own release now, over the +// file the link points to; one winget does list still goes to winget. +func TestRTKWingetFolderWithoutRecord(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("the fakes are shell scripts") + } + h := sandbox(t) + arch, base := rtkArch, rtkDownloadBase + rtkArch = "amd64" + t.Cleanup(func() { rtkArch, rtkDownloadBase = arch, base }) + latestServer(t, "v0.51.0") + pkg := filepath.Join(h, "AppData", "Local", "Microsoft", "WinGet", "Packages", "rtk-ai.rtk_x") + real := filepath.Join(pkg, "rtk") + ver := filepath.Join(pkg, "VERSION") + testenv.Program(t, real, strings.ReplaceAll(versionedRTK, "VERSION", ver)) + write(t, ver, "0.50.0") + links := filepath.Join(h, "AppData", "Local", "Microsoft", "WinGet", "Links") + os.MkdirAll(links, 0o755) + link := filepath.Join(links, "rtk") + if err := os.Symlink(real, link); err != nil { + t.Fatal(err) + } + t.Setenv("PATH", links+string(os.PathListSeparator)+filepath.Join(h, "tools")) + newRTK := strings.ReplaceAll(versionedRTK, `"VERSION"`, `"`+ver+`"`) + newRTK = strings.ReplaceAll(newRTK, "$(/bin/cat \""+ver+"\")", "0.51.0") + rtkDownloadBase = fakeRTKRelease(t, newRTK, false) + + // winget has records, none of them this folder + wingetOn(t, h, wingetUnlisted, 0, func() ([]string, bool) { return []string{filepath.Join(h, "elsewhere")}, true }) + if c := rtkUpgrader(link); len(c) != 2 || c[0] != rtkWindowsRelease || c[1] != real { + t.Fatalf("no record: upgrader %q; want %s %s", c, rtkWindowsRelease, real) + } + v, err := UpgradeRTK() + if err != nil || v.Version != "0.51.0" { + t.Fatalf("%+v, %v", v, err) + } + + // winget has it: winget upgrades it + wingetOn(t, h, wingetListed, 0, func() ([]string, bool) { return []string{pkg}, true }) + if c := rtkUpgrader(link); len(c) == 0 || c[0] != "winget" { + t.Fatalf("recorded: upgrader %q; want winget upgrade", c) + } +}