ac4af582301a4e8a29245dbba767eba31334ddf9
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6f435677c3 |
agent: VS Code's bundled copilot launcher is not the Copilot CLI (#3269)
Tony-ooo's Windows (magpie 0.1.1320): VS Code 1.143 ships a copilot launcher of its own in <install>\bin\copilot-shim and puts it on the user's PATH, while the CLI was never installed and ~\.copilot doesn't exist. magpie ls and magpie agents still said Copilot CLI was installed, and it showed up as a Library target; renaming the shim folder away made the row go. Detected's last resort took any command of the agent's Bin name that binAt found, and cliBin (what CLI magpie offers to update) took the same launcher. An Agent may now turn away a command found for its Bin (binNot, binsOwn). Copilot CLI turns away one an editor keeps, told by the product.json beside the editor's program (editorLauncher, as vscodeCodeBinary tells an install). Ported from ggbdpq's patch on the issue. Changed from the patch: - editorLauncher resolves a symlink first and looks in bin's own folder and the two above it only. The patch walked up to the root, so a product.json in any folder above (a home, a checkout of an editor's source) turned away a real CLI under it. - BinPath and cliHeld (gone.go) go through binsOwn too. BinPath returned the shim, and cliHeld counted it as the CLI holding ~/.copilot. - The windows-tagged test is dropped: it wrote into a folder of the real registry PATH and passed without the fix. Run at the pushed head (parent |
||
|
|
56de2d1928 |
hermes: a model picked in magpie reaches the profile hermes starts in, and Off then On leaves every bot a model (tjhhhh)
tjhhhh on Discord (0.1.1673): switching the model of a Hermes profile
other than the default didn't take, and turning magpie's takeover Off and
On again lost the default model, so the hermes CLI failed at start.
Causes, read from Hermes' source (hermes_cli/main.py
_apply_profile_override, profiles.py):
- `hermes profile use X` writes <root>/active_profile, and every later
`hermes` runs profiles/X. magpie always wrote <root>/config.yaml, the
profile hermes no longer started in.
- At Off, hermesUnwireProfile deleted model.provider and model.default
from every profile on magpie and put nothing back. On rewrote only the
connected config, so the profile hermes ran had no model.
Now:
- hermesActive: the config magpie connects is the profile hermes starts
in: HERMES_HOME when it names a profile, else active_profile's (BOM and
whitespace trimmed) when it is a live profile (not "default", a valid
name, no tombstone, its folder there), else the root.
- Off leaves each bot on magpie on a model it can start with: its own
stashed model if it had one, else the connected config's own model,
with that provider's providers.<name> entry copied in when the bot
lacks it. What magpie put there is kept as hermes:<path>:off.
- On puts magpie back on each bot still on what Off left (hermesBack); a
bot the user moved while Off keeps theirs; a bot with no model at all
gets magpie's.
- Bots on the model magpie or hermes last picked follow a new pick
(hermesFollow now also follows the connected config's current default).
- gone.go: a profile folder's Agent finds the root's hermes-agent
checkout, so it counts as installed.
Run:
- go test -tags nogui -count=1 -run 'CLIMissingHermes|Hermes'
./internal/agent: ok.
- New tests red on the old code: TestHermesStickyProfile
(hermes_test.go:811 'active_profile "coder\n": connects .../.hermes,
want .../.hermes/profiles/coder'), TestHermesOffAndOnKeepsEveryBotsModel
(hermes_test.go:698 'off: writer is on {Provider: Default:}, want
{Provider:mine Default:kimi-k3}'), TestHermesBotsFollowTheModelHermesPicked
(hermes_test.go:768 'writer stayed'); TestHermesProfiles' writer after
disconnect now expects the root's own model, not nothing.
- Whole internal/agent (-timeout 45m, logged): the disk filled (other
sessions' temp files, under 1 GB free) and 43 tests failed on "no space
left on device"; each of them, and every Hermes test, passed on a rerun
(131s). TestFolderVarsAreListed is red on main since
|
||
|
|
e26d26ab5b |
agent: a Mac app in a folder of /Applications' own, or wherever Spotlight has its bundle id, is found: DeepSeek Harness Desktop in /Applications/AI no longer reads as 未找到 CLI (#2325, sungoku)
sungoku (macOS 15.8.1, magpie 0.1.1253) keeps DeepSeek Harness.app in
/Applications/AI and has no dsh CLI. magpie looked for the bundle in
/Applications and ~/Applications only, so the app wasn't found and dsh's
row said 未找到 CLI (the same gone rule as cjyrainbow's Windows case,
#2177).
macBundles is now the one place a Mac app's bundle is looked for, by
AppVersion/HasApp (dsh, Codex) and macBundle (WorkBuddy): its names in
each app folder, then in each folder one level down that is no bundle
itself (an .app inside another app's bundle doesn't count), then wherever
Spotlight has its bundle id (`mdfind kMDItemCFBundleIdentifier == '<id>'`,
as zedAppPath already finds Zed.app). The bundle's Info.plist must still
carry the app's id. Spotlight's answer is kept 5 minutes per id, because
the Agents page asks on every read and a missing app would otherwise run
mdfind each time. It is never asked in a test binary testenv isolated
(MAGPIE_TEST_SANDBOX), so no package's tests see the developer's own apps
(#1823). The agent TestMain stubs it too. appHere (Claude.app, OpenCode,
Goose: whether their folders are gone) also looks one folder down,
through the same inAppFolders.
Not changed: pencil, t3code, reasonix, claudescience and cursorlocal read
macAppFolders with their own names and still look only at the top level.
Test: TestDshDesktopAppInASubfolder covers no app; an app inside
Other.app (not taken); another bundle id in /Applications/AI (not taken);
sungoku's /Applications/AI/DeepSeek Harness.app (found, 0.2.0-rc.2); and
DSH.app on another folder, found only once Spotlight names it. Broken by
hand three ways, red each time: no subfolder scan, no Spotlight, bundles
inside bundles allowed.
Real mdfind query tried read-only on this Mac: com.apple.Safari ->
/Applications/Safari.app, com.openai.codex -> /Applications/ChatGPT.app.
DeepSeek Harness isn't installed here, so not tried with the real app.
Run in this worktree (origin/main
|
||
|
|
6e2aa8e321 |
agent: on Windows DeepSeek Harness is never taken for uninstalled by ~\.dsh alone, so it no longer shows "CLI not found" with no model to pick (#2300, yangkai2; #2304, wlj521)
From v0.1.1239 ( |
||
|
|
226222118a |
agent: on Windows Claude Code and Codex are never taken for uninstalled by their folder, so neither shows "CLI not found" with its settings hidden (#1482, edussss)
edussss (Windows 11) on 10-15: "昨天早上的版本还能找到,今天早上更新后又找不到了". Their screenshot shows both Claude Code and Codex marked "CLI not found", with no model or effort pickers. v0.1.1231 listed both. Cause: |
||
|
|
d0fcb8bcdf |
agent: an agent uninstalled with its folder left behind shows "CLI not found" with no live settings, Hermes and the shared-folder agents too (#2177, mengyianx; #2173, SkyTodInfi)
Detection goes by an agent's folder, and an uninstall leaves the folder
behind. Before this commit, Hermes with only its 37-byte
~/.hermes/config.yaml (custom_providers: [], mcp_servers: {}) was listed as
installed in `magpie ls`, the GUI and the TUI, with model and effort pickers
that no program reads. CLIMissing (#843) covered only agents that have an
install command and their own folder. Hermes and the agents whose folder
something else keeps too (claude, codex, cline, opencode, goose) were never
gone.
What changes:
- internal/agent/gone.go adds cliHeld, which asks whether anything here still
reads the folder:
- the CLI on PATH or in proc.FindTool's folders (for goose, a binary that
isn't pressly's Go goose);
- its desktop app (HasApp) or sign;
- the vendor installer's own place: ~/.claude/local, ~/.opencode/bin,
~/.codex/packages/standalone, Hermes' <home>/hermes-agent checkout;
- for the shared folders, an editor extension under
~/.<editor>/extensions (anthropic.claude-code, openai.chatgpt,
saoudrizwan.claude-dev), Claude.app or Claude Desktop, OpenCode.app or
Goose.app on a Mac, a JetBrains IDE's settings (its agents bring their
own program) or Zed's external_agents.
When magpie can't tell, the agent is never gone. That covers OpenCode and
Goose off a Mac, Gemini (its folder is Antigravity's and Code Assist's
too), agents with their own detect, and WSL and plugin agents. It also
covers Bin agents with no install command, except Hermes (cliOnly), since
their installers' paths aren't verified.
- GUI: a gone row shows "CLI not found" and none of its settings, and the
tag's tip says why. It offers no Apply again. While it is still wired it
keeps its switch and Disconnect. Once it isn't wired it folds under Not
set up, and Get started doesn't offer it (connectKind is "no"; the sandbox
run showed Hermes offered there before). The panel shows the words only.
The new tip is translated into zh, zh-TW, ja and de.
- The TUI leaves the agent out. `magpie ls` says "CLI not found" beside its
path.
- docs/subsystems/agent-wiring.md describes all of the above.
- aside-native.test.cjs drops cliMissing from an Aside fixture. That state
can't happen (Aside has no install command and isn't in cliOnly), and
that test is about runtime_unavailable.
What was run:
- Sandbox HOME holding only the reporter's ~/.hermes/config.yaml (37 bytes)
and a bare ~/.codex, with env -i and PATH=/usr/bin:/bin:
- `magpie ls` at base
|