neoagent 2.3.1-beta.107 → 2.3.1-beta.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/manager.js
CHANGED
|
@@ -819,7 +819,9 @@ async function cmdLoginClaudeCode() {
|
|
|
819
819
|
|
|
820
820
|
// The registered redirect URIs are http://localhost/callback and http://127.0.0.1/callback
|
|
821
821
|
// (port 80). The OAuth server validates the URI exactly, so we must use port 80.
|
|
822
|
-
|
|
822
|
+
// Dynamic high port — the server accepts http://localhost:{any-port}/callback per RFC 8252.
|
|
823
|
+
const redirectPort = Math.floor(Math.random() * 10000) + 49152;
|
|
824
|
+
const redirectUri = `http://localhost:${redirectPort}/callback`;
|
|
823
825
|
|
|
824
826
|
// Generate PKCE verifier and challenge
|
|
825
827
|
const codeVerifier = crypto.randomBytes(48).toString('base64url');
|
|
@@ -894,23 +896,20 @@ async function cmdLoginClaudeCode() {
|
|
|
894
896
|
}
|
|
895
897
|
});
|
|
896
898
|
|
|
897
|
-
server.listen(
|
|
898
|
-
logInfo(
|
|
899
|
+
server.listen(redirectPort, 'localhost', () => {
|
|
900
|
+
logInfo(`Waiting for OAuth callback on ${redirectUri} ...`);
|
|
899
901
|
});
|
|
900
902
|
server.on('error', (err) => {
|
|
901
903
|
clearTimeout(timeout);
|
|
902
|
-
|
|
903
|
-
? 'Port 80 requires elevated privileges. Try: sudo neoagent login claude-code'
|
|
904
|
-
: err.message;
|
|
905
|
-
reject(new Error(`Could not start OAuth callback server: ${hint}`));
|
|
904
|
+
reject(new Error(`Could not start OAuth callback server: ${err.message}`));
|
|
906
905
|
});
|
|
907
906
|
});
|
|
908
907
|
|
|
909
908
|
logInfo('Exchanging authorization code for access token...');
|
|
910
909
|
const tokenRes = await fetch('https://platform.claude.com/v1/oauth/token', {
|
|
911
910
|
method: 'POST',
|
|
912
|
-
headers: { 'Content-Type': 'application/
|
|
913
|
-
body:
|
|
911
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
912
|
+
body: new URLSearchParams({
|
|
914
913
|
grant_type: 'authorization_code',
|
|
915
914
|
code: authCode,
|
|
916
915
|
redirect_uri: redirectUri,
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a66f8d99d585c10a11cc709cc46049ab
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"42d3d75a56efe1a2e9902f52dc8006099c45d9
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "4118287899" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -129338,7 +129338,7 @@ r===$&&A.b()
|
|
|
129338
129338
|
o.push(A.ii(p,A.iY(!1,new A.a3(B.tM,A.dT(new A.cI(B.he,new A.a5V(r,p),p),p,p),p),!1,B.I,!0),p,p,0,0,0,p))}r=!1
|
|
129339
129339
|
if(!s.ay)if(!s.ch){r=s.e
|
|
129340
129340
|
r===$&&A.b()
|
|
129341
|
-
r=B.b.t("
|
|
129341
|
+
r=B.b.t("mpaebe8m-a899c60").length!==0&&r.b}if(r){r=s.d
|
|
129342
129342
|
r===$&&A.b()
|
|
129343
129343
|
r=r.ag&&!r.V?84:0
|
|
129344
129344
|
q=s.e
|
|
@@ -134146,7 +134146,7 @@ $S:236}
|
|
|
134146
134146
|
A.Ys.prototype={}
|
|
134147
134147
|
A.Rr.prototype={
|
|
134148
134148
|
mT(a){var s=this
|
|
134149
|
-
if(B.b.t("
|
|
134149
|
+
if(B.b.t("mpaebe8m-a899c60").length===0||s.a!=null)return
|
|
134150
134150
|
s.A5()
|
|
134151
134151
|
s.a=A.q1(B.PP,new A.b58(s))},
|
|
134152
134152
|
A5(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f
|
|
@@ -134164,7 +134164,7 @@ if(!t.f.b(k)){s=1
|
|
|
134164
134164
|
break}i=J.Z(k,"buildId")
|
|
134165
134165
|
h=i==null?null:B.b.t(J.r(i))
|
|
134166
134166
|
j=h==null?"":h
|
|
134167
|
-
if(J.bm(j)===0||J.d(j,"
|
|
134167
|
+
if(J.bm(j)===0||J.d(j,"mpaebe8m-a899c60")){s=1
|
|
134168
134168
|
break}n.b=!0
|
|
134169
134169
|
n.D()
|
|
134170
134170
|
p=2
|
|
@@ -134181,7 +134181,7 @@ case 2:return A.i(o.at(-1),r)}})
|
|
|
134181
134181
|
return A.k($async$A5,r)},
|
|
134182
134182
|
vb(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1
|
|
134183
134183
|
var $async$vb=A.h(function(a2,a3){if(a2===1){o.push(a3)
|
|
134184
|
-
s=p}for(;;)switch(s){case 0:if(B.b.t("
|
|
134184
|
+
s=p}for(;;)switch(s){case 0:if(B.b.t("mpaebe8m-a899c60").length===0||n.c){s=1
|
|
134185
134185
|
break}n.c=!0
|
|
134186
134186
|
n.D()
|
|
134187
134187
|
p=4
|