Commit Graph
5 Commits
Author SHA1 Message Date
yetone 522da8f2e7 provider: Grok and Devin install in the Docker image again: a vendor's shell one-liner needs curl, which the image (bash and busybox wget since 7bfe3137) doesn't have, so the native installer runs there
ghcr.io/yetone/magpie:latest has /bin/bash and /bin/wget but no curl, so
shellInstallerRuns said yes and `curl … | bash` failed. TestShellInstallerNeedsCurl
fails on the old check.
2026-10-08 09:01:23 +08:00
hisilingandSiling 84d2d75205 provider: Windows 上 Devin 的登录装得上 Devin CLI 了:安装命令从 stdin 进 PowerShell,devin setup 不再卡住登录 (#1225) (#1226)
* provider: a sign-in on Windows installs its CLI past Microsoft Defender, which stopped the installer's command line as a Trojan (#1225)

On Windows the sign-in ran the vendor's installer as `powershell -NoProfile -ExecutionPolicy Bypass -Command irm https://static.devin.ai/cli/setup.ps1 | iex`, and Microsoft Defender takes that command line for Trojan:Win32/Commando.A!ml. It stopped PowerShell before it ran, so Devin's sign-in failed with "installing Devin CLI failed (fork/exec C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe: Access is denied.)" while Windows Security said it found a threat (hisiling, Windows 11, v0.1.1106, three tries, three detections). The one-liner now reaches `powershell -NoProfile -ExecutionPolicy Bypass -Command -` on stdin, as one typed into PowerShell does, so no command line carries it. Cursor's and Grok's installers go the same way. The installer's output and exit code come back as before, and one that would ask something still reads nothing.

TestWindowsInstallerNotOnCommandLine fails without the change on Windows 11 (PowerShell's command line carries the installer: powershell -NoProfile -ExecutionPolicy Bypass -Command "Write-Output ([Environment]::CommandLine); exit 7") and passes with it. On the same machine, with Defender's real-time protection on, Devin's sign-in started the way the window's button starts it (provider.StartSignIn, from a program with no console) ran the real setup.ps1 with no detection and installed Devin CLI 3000.11.3. go vet ./internal/provider and go test -run 'Install|SignIn' ./internal/provider pass on Windows; go vet -tags nogui ./..., go build -tags nogui ./..., GOOS=windows go build ./... and the windowsgui build pass on Linux.

* provider: Devin's sign-in on Windows goes on once the Devin CLI is in place, where its installer's `devin setup` held it for ten minutes and was left running (#1225)

Devin's setup.ps1 ends in `devin setup`, whose menu asking how to sign in waits for a key on the console. The console an installer gets from magpie has no window (the app has none, so its children get CREATE_NO_WINDOW) and magpie keeps its output, so no one can answer it: the sign-in stayed "installing" until installTimeout ended the installer ten minutes later, and `devin setup` went on running. It waits the same way with stdin from NUL, and CI=true or TERM=dumb don't change it; `devin setup` has no option but --force-manual-token-flow. On Windows, the installer of a CLI marked setup (Devin's) now runs as a proc.Tree. Once the CLI is in place, read with the user PATH the installer wrote, it has installerTail (5s) to end by itself, then it is ended with everything it started, as it is when the sign-in is canceled or times out. magpie's own sign-in follows as before. Cursor's and Grok's installers, and every installer off Windows, run as they did.

TestWindowsDevinSetupDoesNotHoldTheSignIn fails without the change on Windows 11 (the sign-in waited 47s for the installer after the CLI was in place, installTimeout set to 45s) and passes with it in 6s, its setup ended. On the same machine the real Devin sign-in went from installing to Devin's sign-in page in 18s, with no devin.exe or PowerShell left running and setup.ps1's distribution marker and user PATH written; with the first change alone it took ten minutes and left `devin.exe setup` running. go vet ./internal/provider and go test -run 'Install|SignIn|NotOnCommandLine|DevinSetup' ./internal/provider pass on Windows; GOOS=windows go vet ./internal/provider ./internal/proc passes on Linux.

---------

Co-authored-by: Siling <179151647+hisiling@users.noreply.github.com>
2026-10-08 08:58:15 +08:00
yetone 38f184ae0e signin: Grok and Command Code sign in from magpie in Docker (xugui on Discord: docker版登不上grok和command code) — Grok's sign-in first installs Grok Build with its installer, curl … | bash, and the image has neither bash nor curl, so it stopped at "installing Grok Build failed (exec: "bash": executable file not found)"; the community Grok plugin, beside the built-in rather than moved onto, wasn't given the CLI at all and said "install Grok Build first". Where no shell and curl/wget can run, Grok Build is now installed as its installer does, from the same x.ai/cli (then its storage bucket) address: the stable version, its binary for the platform, checked with --version, linked as ~/.grok/bin/grok and agent, installer = "internal" noted in its config.toml; the plugin's sign-in installs it first too. The device sign-in itself needs nothing back from the browser and was fine. Command Code's Studio posts the key to magpie's 127.0.0.1 port in the background, which a browser outside the container can't reach and no address carries; while it waits, its sign-in now takes an API key made on commandcode.ai/settings/keys and pasted (as Command Code's own CLI offers), checked with whoami and its plan as Studio's was, and a plugin's browser sign-in offers "Use an API key instead", its own api way (the Command Code plugin has one). No identity, header or prompt changes. TestGrokInstallsWithoutShell, TestCommandCodeSignInPastedKey and TestGrokPluginSignInInstallsCLI fail without the change, signin-paste-key.test.cjs too. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; signin-paste-key, signin-paste-codex, plugin-signin, signin-callback, commandcode-risk, plugin-key-hint, signin-link, click-scroll, old-webkit pass. 2026-10-01 22:25:39 +08:00
yetone f7112a9e9d agents: Grok Build — xAI's grok CLI — is an agent: its model is set in ~/.grok/config.toml ($GROK_HOME), and a model through magpie adds the catalog there as [model."magpie/…"] tables pointed at the gateway with magpie's own key, so a request never carries the user's xAI sign-in and the catalog joins Grok's own models in /model; its effort is [models] default_reasoning_effort, its requests are known by grok-shell; the Grok subscription is called Grok Build too 2026-09-25 18:26:50 +08:00
yetone e072af501d provider: a subscription used through its vendor's CLI — Devin's, Cursor's, Grok's — installs that CLI when its sign-in starts, if this machine lacks it, rather than leaving the sign-in to fail or, as Devin's did, to say "signed in" and show nothing: Devin's sign-in wrote credentials.toml, but magpie sees the account only through devin auth status, so with no devin CLI no provider ever came and nothing said why. The sign-in is now "installing" while the vendor's own installer runs (curl … | bash, or its PowerShell one on Windows, with magpie's proxy), then opens the vendor's page as before; the window says what it is installing and why, can cancel it, and a failed install says the installer's last line and the command to run by hand. What counts is the CLI being there afterwards — Devin's installer ends in devin setup, whose sign-in gives up without a terminal and fails the script after it installed everything — and on Windows the PATH the installer wrote is taken up so the running app finds it. A Devin sign-in the CLI then can't see fails, where it said done with no one; the tests no longer see this machine's own devin 2026-09-25 16:30:00 +08:00