neoagent 3.1.1-beta.15 → 3.1.1-beta.16
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5ac2a37e241634f84a83d4b02dee9858
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"83675ed27633283e7fc296c8bca22e841224c0
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "2940535504" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -141032,7 +141032,7 @@ if(r){r=s.d
|
|
|
141032
141032
|
r===$&&A.b()
|
|
141033
141033
|
p.push(A.jj(q,A.jl(!1,new A.a0(B.wd,A.d_(new A.cG(B.kd,new A.ac4(r,q),q),q,q),q),!1,B.H,!0),q,q,0,0,0,q))}if(!s.ay){r=s.e
|
|
141034
141034
|
r===$&&A.b()
|
|
141035
|
-
r=B.b.t("
|
|
141035
|
+
r=B.b.t("mrl0hhmp-8aea10d").length!==0&&r.b}else r=!1
|
|
141036
141036
|
if(r){r=s.d
|
|
141037
141037
|
r===$&&A.b()
|
|
141038
141038
|
r=r.aR&&!r.ag?84:0
|
|
@@ -146898,7 +146898,7 @@ $S:0}
|
|
|
146898
146898
|
A.a2w.prototype={}
|
|
146899
146899
|
A.VX.prototype={
|
|
146900
146900
|
qX(a){var s=this
|
|
146901
|
-
if(B.b.t("
|
|
146901
|
+
if(B.b.t("mrl0hhmp-8aea10d").length===0||s.a!=null)return
|
|
146902
146902
|
s.BY()
|
|
146903
146903
|
s.a=A.mB(B.X_,new A.bkH(s))},
|
|
146904
146904
|
BY(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f
|
|
@@ -146916,7 +146916,7 @@ if(!t.f.b(k)){s=1
|
|
|
146916
146916
|
break}i=J.a3(k,"buildId")
|
|
146917
146917
|
h=i==null?null:B.b.t(J.q(i))
|
|
146918
146918
|
j=h==null?"":h
|
|
146919
|
-
if(J.bn(j)===0||J.e(j,"
|
|
146919
|
+
if(J.bn(j)===0||J.e(j,"mrl0hhmp-8aea10d")){s=1
|
|
146920
146920
|
break}n.b=!0
|
|
146921
146921
|
n.H()
|
|
146922
146922
|
p=2
|
|
@@ -146933,7 +146933,7 @@ case 2:return A.i(o.at(-1),r)}})
|
|
|
146933
146933
|
return A.k($async$BY,r)},
|
|
146934
146934
|
wA(){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
|
|
146935
146935
|
var $async$wA=A.h(function(a2,a3){if(a2===1){o.push(a3)
|
|
146936
|
-
s=p}for(;;)switch(s){case 0:if(B.b.t("
|
|
146936
|
+
s=p}for(;;)switch(s){case 0:if(B.b.t("mrl0hhmp-8aea10d").length===0||n.c){s=1
|
|
146937
146937
|
break}n.c=!0
|
|
146938
146938
|
n.H()
|
|
146939
146939
|
p=4
|
package/server/routes/auth.js
CHANGED
|
@@ -62,6 +62,8 @@ const passwordResetLimiter = rateLimit({
|
|
|
62
62
|
legacyHeaders: false,
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
+
const WEARABLE_SESSION_MAX_AGE_MS = 90 * 24 * 60 * 60 * 1000;
|
|
66
|
+
|
|
65
67
|
function getAuthProviderManager(req) {
|
|
66
68
|
return req.app?.locals?.authProviderManager;
|
|
67
69
|
}
|
|
@@ -81,7 +83,7 @@ function toUserPayload(user) {
|
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
function establishSession(req, res, user) {
|
|
86
|
+
function establishSession(req, res, user, options = {}) {
|
|
85
87
|
req.session.regenerate((regenerateError) => {
|
|
86
88
|
if (regenerateError) {
|
|
87
89
|
console.error('Auth session regenerate error:', regenerateError);
|
|
@@ -90,6 +92,9 @@ function establishSession(req, res, user) {
|
|
|
90
92
|
|
|
91
93
|
req.session.userId = user.id;
|
|
92
94
|
req.session.username = user.username;
|
|
95
|
+
if (Number.isFinite(options.maxAgeMs) && options.maxAgeMs > 0) {
|
|
96
|
+
req.session.cookie.maxAge = options.maxAgeMs;
|
|
97
|
+
}
|
|
93
98
|
req.session.save((saveError) => {
|
|
94
99
|
if (saveError) {
|
|
95
100
|
console.error('Auth session save error:', saveError);
|
|
@@ -648,7 +653,11 @@ router.post('/api/auth/qr-login/challenge/:id/claim', qrLoginClaimLimiter, (req,
|
|
|
648
653
|
pollToken,
|
|
649
654
|
});
|
|
650
655
|
updateLastLogin(result.user.id);
|
|
651
|
-
|
|
656
|
+
const requestedPlatform = String(result.challenge?.requestedDevice?.metadata?.platform || '');
|
|
657
|
+
const sessionOptions = requestedPlatform === 'esp32-s3-amoled'
|
|
658
|
+
? { maxAgeMs: WEARABLE_SESSION_MAX_AGE_MS }
|
|
659
|
+
: {};
|
|
660
|
+
return establishSession(req, res, result.user, sessionOptions);
|
|
652
661
|
} catch (error) {
|
|
653
662
|
const statusCode = Number(error?.statusCode || 500);
|
|
654
663
|
return res.status(statusCode).json({
|
|
@@ -190,24 +190,28 @@ class VoiceRuntimeManager {
|
|
|
190
190
|
async commitInput(sessionId, options = {}, userId = null) {
|
|
191
191
|
const session = this.#requireSession(sessionId, userId);
|
|
192
192
|
if (session.inputBytes === 0) {
|
|
193
|
-
|
|
193
|
+
session.resetTurnState();
|
|
194
|
+
await session.setState('idle');
|
|
195
|
+
return { transcript: '', discarded: true };
|
|
194
196
|
}
|
|
195
197
|
await session.setState('transcribing');
|
|
196
198
|
const transcript = await session.adapter.commitInput(session, {
|
|
197
199
|
turnId: options.turnId,
|
|
198
200
|
finalSequence: options.finalSequence,
|
|
199
201
|
});
|
|
200
|
-
|
|
202
|
+
const transcriptText = String(transcript || '').trim();
|
|
203
|
+
if (!transcriptText) {
|
|
204
|
+
session.resetTurnState();
|
|
201
205
|
await session.setState('idle');
|
|
202
|
-
return { transcript: '' };
|
|
206
|
+
return { transcript: '', discarded: true };
|
|
203
207
|
}
|
|
204
208
|
|
|
205
|
-
const result = await this.agentBridge.runTranscriptTurn(session,
|
|
209
|
+
const result = await this.agentBridge.runTranscriptTurn(session, transcriptText, {
|
|
206
210
|
promptHint: options.promptHint,
|
|
207
211
|
metadata: options.metadata,
|
|
208
212
|
});
|
|
209
213
|
return {
|
|
210
|
-
transcript,
|
|
214
|
+
transcript: transcriptText,
|
|
211
215
|
runId: result.runId || null,
|
|
212
216
|
replyText: result.replyText || '',
|
|
213
217
|
};
|