The desktop sign-in of astudio and agnes-code is now an oauth method, so magpie shows no empty key box. When the desktop session is on disk it finishes at once; when it isn't, it links the official site and polls every 2s for up to 5 minutes, ending on cancel (the host's signal). Missing, unreadable (with the reason, read errors other than ENOENT kept), expired and banned are told apart; banned and non-Windows agnes-code throw so the host shows the reason. agnes-code decrypts the DPAPI master key once per sign-in (re-decrypted if the session frame no longer opens with it) and kills a PowerShell stuck past 15s. agnes-code's README and registry summary say how it differs from the `agnes` entry. By jinyue806. Reviewed at 3a6bb97 (base 17e5ef7; main since then only changed packages/workbuddy). Run at 3a6bb97: - mote, bun 1.4.2, HOME=$(mktemp -d) bun test: 4921 pass, 0 fail (374 files); bun scripts/check.mjs ok; node --test on both packages 62 pass. - xiaomi-gpu (Windows 11, node 22): node --test on both packages 62 pass. - Raw bytes of astudio/index.test.mjs: 0 single-backslash "D:\a", 22 "D:\\astudio". - magpie's plugin host (host.js from magpie origin/main e41ef6288, run by bun on mote, sandbox HOME): astudio authorize with nothing on disk gave the official URL and method auto; writing a session file 3s into the callback finished it in 4.0s and saved key + metadata to auth.json; with the file present the url was empty; banned came back as the error message; an aborted callback was dropped; agnes-code on macOS came back with "仅支持 Windows" and no poll. - Broken by hand: dropping the master-key cache's set reds "decrypted once per sign-in"; dropping the banned throw reds "refuses banned accounts". Not tried: a real DPAPI decrypt (Protect over ssh is "Access is denied", no interactive logon there), real AStudio or Agnes Code desktops. Left for a follow-up the author offered: a DPAPI failure itself is not remembered, so each 2s poll can spawn PowerShell again (bounded by the 5-minute wait).
36 lines
1.9 KiB
JSON
36 lines
1.9 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-agnes-code-auth",
|
|
"version": "0.1.2",
|
|
"description": "Agnes Code desktop sign-in as an OpenCode/magpie provider: OpenAI-compatible chat gateway, live model catalog, daily check-in and points balance",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": { ".": "./opencode2.mjs" },
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"agnes",
|
|
"agnes-code"
|
|
],
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"test": "node --test"
|
|
},
|
|
"magpie": {
|
|
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALDSURBVFhHvZffS5NRGMffP6D6Q7rq3fp9o4F43n4JXQhqXQRdKFpExTISisKKCBJndJGY/YAuJr1nk9jKzCVubsOtSdOoRZFY+1E5F5W4re2Jc9rGds7rrHZ8H/gwON/nvM/3nOfAeCSpJHY2WNfLCu6Ukeo1IHXRoGAQAlITMsIeA1JNpEZpzWIY6627DAqOc5sFIytqzIhwLVdcVnCaTV4zEE4VTWxV7Bv0ODmLjHB0Y41lnUR6zoq6gVSTRB8cK+jHJLmBpIagD0hNSNxilWzfb4Pu3iCcvODlNC2EG7g7FIZC/I0J4QZsT+aKBi72vOB0FuEG0EEHYMcHGLSEYds+G6ezCDdA2NEwDC1HnbB5j5XTWIQbaD/rhsVvKdqCji43p7MINUCu//uPNGQyWWqgse0Zl8MizIBxNwbnZIQWJr/ZXI62gs1jEWbg+q0QLb6QWIbLfdMQjS9xOVoIMdB2xlW89nPX/HD/4VvwBT9zeVpUbeDQMSf8XMrQ4u6pGG1FIPQVhh6953K1qMrA4RPjkMy/eHL1dc122ndiiLSEzdeiooGm9jFurYCp2wfLqV+0eDabg+PnPfQ/YMIXpWsj4x/hjiUM5tuz3N5SKhoYHpmDKzemy9bqWxzw+Pk8LVKIS+Yg1cwDM2XrrqkY1DXZue+WUtGA/+UXyOUAvIE4/ZMZc0cglT91IUpPSPr/5l2SrvcOzHDf02JVAysFMdJ11c/tuXnvFdVbO12cpkVFA32Ds2xdGp5AHBpbR7l8AnkLqXQWDhx5ymlaVDSwZa8VevpD9OpHJz5B/4PX0Nyx8sMkkDas1vdSJKEDyD8iK3hBohOLhqgPqpsYOM0L+mCsx6fy86AaY8W1RlZwhA4mdDRDuFbv0WyTotaUz4fEBMJRLlkw5ORc8UKQKyHjEplYyAtlN/8vf76luknPi9eej986sOvbZw1S8QAAAABJRU5ErkJggg==",
|
|
"maxConcurrency": 4
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/agnes-code"
|
|
}
|
|
}
|