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).
38 lines
2.7 KiB
JSON
38 lines
2.7 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-astudio-auth",
|
|
"version": "0.1.3",
|
|
"description": "AStudio (iFLYTEK Astron Studio) desktop sign-in as an OpenCode/magpie provider: Responses model gateway with live model catalog",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": { ".": "./opencode2.mjs" },
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"astudio",
|
|
"astron",
|
|
"iflytek",
|
|
"xfyun"
|
|
],
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"test": "node --test"
|
|
},
|
|
"magpie": {
|
|
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVJSURBVFhHxVdrUxVHEDX55v9J/At5fNcqK6n4xcSUmqiJ8QUaUHmphEdQQQV8IBqFlFYZISDRxBAwEUIQDFoiivhAEAXuzuzudO9J9T5guZcraDSZqq69d3e2z+k+PTO9CxbEBoA34v9fx5gTQym1iJnXOI6TKaa13vpvTfyIT9d1FyXj+UNYAVjoOM5xvOYRYiycykRWVtabctVa18oErbVRShm5vkqLfIYYtXHsBZZlvSUPbNt2tdastZZJXmjye05TSq7Kv8Z/J/lhwRAswZySQCn1JQCZJAReGFgpNQVohZZEIk5ECHi2bX8xRUAKJSQgaQpeCB37zsVJ6DS6NxVpDFyunlFgE7+XYiKDYG2NE8iM9J+KPnQYRDkTNJ5meW5ZGo6tYFkKDVcJLV0mJJBCwg8yxMpMRyAAnZFeuWdD2yqwmPMI/Om4xpk2wqr9HjYeBkaf2bBty38+SwZSCIgEMwjEJVCThPFhxtMhg8kRFyoxTUZARp7auNTNqG4m5J8mlJ1jTEyKHys5A3ECMyRIIaAsKaYg2olRwmAnob+ZMdDkYaDVw70exsiQwdiYixtDhLY+g8YOg8MXCOeukF8bIolkIC7h/AmE6VXawuQzB3fbGDfqCddOMH4/Trhc6+GXOg+tjR462xnXehldN0V/xl+3DdhI9AGBmatCzY9AQCJcBbbCyN+EvjpGZy3j12OM5mrG2UOMkxWMYwcYNYcZdfUeGi4w2v8kDD5wfBlcR8G4ItVLZEDSKF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=",
|
|
"maxConcurrency": 4
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/astudio"
|
|
}
|
|
}
|