Adds @magpie-community/opencode-agnes-auth 0.1.0 (provider `agnes`): Agnes AI's international API platform (apihub.agnes-ai.com for models, platform-backend.agnes-ai.com for keys and usage). Agnes trains and serves its own agnes-* models, so it is a vendor, not a relay, and a different channel from `agnes-code` (the Agnes Code desktop's gateway). Sign-in: a private Chromium profile read over loopback CDP (plan, personal or enterprise key), or an API key plus an optional console token. Usage: a plan key shows Token Plan and Agent Plan windows; a personal or enterprise key shows the balance only. By CasonMo (#619). Since the first review (9242396): the callback's /user/self result no longer shadows the Chrome session (6ca6f68 broke every browser sign-in); a page exception from CDP is reported instead of timing out, but only once the same exception has lasted 4s, since Chrome raises SecurityError on localStorage while the page is still loading; the platform gets x-user-language en-US; browser sign-ins aren't told to paste a token. Reviewed head 8a30c65ee88ab432ed7f63f86b81c18d0db3680c, merged onto origin/main581ca13. Run on mote, HOME=$(mktemp -d), Bun 1.4.2: - bun scripts/check.mjs: exit 0 (agnes included) - bun test packages/agnes: 51 pass, 1 skip, 0 fail - bun test (whole repo): 4775 pass, 13 skip, 0 fail (main581ca13alone: 4741 pass, 0 fail) - AGNES_BROWSER_TEST=1 with Chrome for Testing 1234 (--use-mock-keychain): the real-browser test passed 5 of 5 headed and 5 of 5 with --headless=new; no browser left running. Broken by hand: making the first page exception final again turned the two new token-poll tests red, and the real-browser test red 5 of 5 with the same "SecurityError ... Access is denied for this document" seen at 1eea3f7. Earlier rounds broke the TDZ fix and the exceptionDetails branch by hand; their tests went red. Harm check: no dependencies, install scripts, .github or publish changes, or encoded blobs. The only addresses are agnes-ai.com hosts and 127.0.0.1 CDP; the console token goes only to platform-backend and the API key only to apihub. The plugin uses its own browser profile, never the user's. Not tried: a real Agnes account or the real login page (no account here; tests stay offline); the Windows and Linux browser paths.
32 lines
723 B
JSON
32 lines
723 B
JSON
{
|
|
"name": "@magpie-community/opencode-agnes-auth",
|
|
"version": "0.1.0",
|
|
"description": "Agnes AI international in OpenCode and magpie: Chrome browser sign-in, live text models, OpenAI-compatible chat, plan usage and USD balance",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"files": [
|
|
"index.mjs",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"agnes",
|
|
"agnes-ai"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/magpie-community/plugins",
|
|
"directory": "packages/agnes"
|
|
},
|
|
"scripts": {
|
|
"test": "bun test"
|
|
},
|
|
"magpie": {
|
|
"icon": "https://www.agnes-ai.com/images/biglogo.png"
|
|
}
|
|
}
|