osborn 0.9.184 → 0.9.186
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/dist/index.js +21 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3636,11 +3636,6 @@ async function main() {
|
|
|
3636
3636
|
minDelay: 500, // Wait 500ms after STT commits before generating reply
|
|
3637
3637
|
maxDelay: 2000, // Force end-of-turn after 2s to prevent hangs
|
|
3638
3638
|
},
|
|
3639
|
-
// If the cloud turn detector never fires (continuous speech, no natural pause),
|
|
3640
|
-
// force a turn commit after 25s to prevent indefinite accumulation.
|
|
3641
|
-
userTurnLimit: {
|
|
3642
|
-
maxDuration: 25000,
|
|
3643
|
-
},
|
|
3644
3639
|
// Tightened gates: only commit to the pause path when the STT layer is
|
|
3645
3640
|
// confident this is real speech, not echo. Once paused, give the user
|
|
3646
3641
|
// a full 3s window to keep talking before deciding it was false and
|
|
@@ -4533,21 +4528,10 @@ async function main() {
|
|
|
4533
4528
|
console.log('💓 Sending agent_ready signal...');
|
|
4534
4529
|
let readySent = false;
|
|
4535
4530
|
// (realtime provider removed)
|
|
4536
|
-
//
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
// Prepare sessions for frontend (up to 50)
|
|
4541
|
-
const sessionsForFrontend = allSessions.slice(0, 50).map(s => ({
|
|
4542
|
-
sessionId: s.sessionId,
|
|
4543
|
-
projectSlug: s.projectSlug,
|
|
4544
|
-
projectPath: s.projectPath,
|
|
4545
|
-
cwd: s.cwd,
|
|
4546
|
-
timestamp: s.timestamp.toISOString(),
|
|
4547
|
-
lastMessage: s.lastMessage,
|
|
4548
|
-
messageCount: s.messageCount,
|
|
4549
|
-
fileSize: s.fileSize,
|
|
4550
|
-
}));
|
|
4531
|
+
// Session list state — populated async so it doesn't block the first sendReady
|
|
4532
|
+
let sessionsForFrontend = [];
|
|
4533
|
+
let recentSessionId = null;
|
|
4534
|
+
let hasRecentSession = false;
|
|
4551
4535
|
const sendReady = async () => {
|
|
4552
4536
|
if (readySent)
|
|
4553
4537
|
return;
|
|
@@ -4569,11 +4553,28 @@ async function main() {
|
|
|
4569
4553
|
});
|
|
4570
4554
|
};
|
|
4571
4555
|
const readyInterval = setInterval(sendReady, 2000);
|
|
4556
|
+
// Fire immediately (empty session list) so the frontend unblocks right away
|
|
4572
4557
|
await sendReady();
|
|
4573
4558
|
setTimeout(() => {
|
|
4574
4559
|
clearInterval(readyInterval);
|
|
4575
4560
|
console.log('✅ agent_ready retries complete');
|
|
4576
4561
|
}, 20000);
|
|
4562
|
+
// Load session list in background — re-send agent_ready once populated
|
|
4563
|
+
listAllClaudeSessions().then(allSessions => {
|
|
4564
|
+
recentSessionId = allSessions.length > 0 ? allSessions[0].sessionId : null;
|
|
4565
|
+
hasRecentSession = allSessions.length > 0;
|
|
4566
|
+
sessionsForFrontend = allSessions.slice(0, 50).map(s => ({
|
|
4567
|
+
sessionId: s.sessionId,
|
|
4568
|
+
projectSlug: s.projectSlug,
|
|
4569
|
+
projectPath: s.projectPath,
|
|
4570
|
+
cwd: s.cwd,
|
|
4571
|
+
timestamp: s.timestamp.toISOString(),
|
|
4572
|
+
lastMessage: s.lastMessage,
|
|
4573
|
+
messageCount: s.messageCount,
|
|
4574
|
+
fileSize: s.fileSize,
|
|
4575
|
+
}));
|
|
4576
|
+
sendReady();
|
|
4577
|
+
}).catch(err => console.warn('listAllClaudeSessions background load failed:', err));
|
|
4577
4578
|
// Stop agent_ready retries on user speech
|
|
4578
4579
|
session.on('input_speech_started', () => {
|
|
4579
4580
|
readySent = true;
|