"magpie里的grok 登录验证 在mac下 似乎每次都会弹两次验证, 在浏览器窗口里": `grok login --device-auth` (Grok Build 1.0.50, the webbrowser crate) opens the device page itself, and magpie opened the same URL again. Reproduced in a sandbox HOME/GROK_HOME on macOS: grok's own device-code tab appeared in Chrome with magpie not involved, with and without SSH_CONNECTION set. What decides grok's own open, from the binary's strings and webbrowser 1.2.4's source: - macOS: NSWorkspace, $BROWSER never read (the macOS binary has no "BROWSER" string); - Windows: ShellExecuteW, no $BROWSER either; - Linux and the rest: $BROWSER, else xdg-open, skipped with no display. So the sign-in now says `opened: true` on darwin and win32 (magpie then opens nothing; magpie >= the commit that raises the grok mover min reads it), and elsewhere gives grok BROWSER=true, a no-op, so the opener stays the only one to open the page. OpenCode ignores the extra field. Tests: login.test.mjs runs the sign-in as darwin/win32 (opened, $BROWSER untouched) and linux/freebsd (not opened, BROWSER=true reaches grok). Both fail on 0.1.16's index.mjs (10 pass, 2 fail). Run: HOME=<scratch> bun test packages/grok: 49 pass, 0 fail; bun scripts/check.mjs: exit 0.
17 lines
537 B
JSON
17 lines
537 B
JSON
{
|
|
"name": "@magpie-community/opencode-grok-auth",
|
|
"version": "0.1.17",
|
|
"description": "OpenCode provider plugin: Grok (SuperGrok / X Premium+) through the Grok Build CLI's sign-in",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": ["index.mjs", "README.md"],
|
|
"keywords": ["opencode", "opencode-plugin", "grok", "xai", "supergrok"],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/grok"
|
|
}
|
|
}
|