osborn 0.9.185 → 0.9.187

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4528,21 +4528,11 @@ async function main() {
4528
4528
  console.log('💓 Sending agent_ready signal...');
4529
4529
  let readySent = false;
4530
4530
  // (realtime provider removed)
4531
- // Fetch full session list for startup session browser (all Claude projects)
4532
- const allSessions = await listAllClaudeSessions();
4533
- const recentSessionId = allSessions.length > 0 ? allSessions[0].sessionId : null;
4534
- const hasRecentSession = allSessions.length > 0;
4535
- // Prepare sessions for frontend (up to 50)
4536
- const sessionsForFrontend = allSessions.slice(0, 50).map(s => ({
4537
- sessionId: s.sessionId,
4538
- projectSlug: s.projectSlug,
4539
- projectPath: s.projectPath,
4540
- cwd: s.cwd,
4541
- timestamp: s.timestamp.toISOString(),
4542
- lastMessage: s.lastMessage,
4543
- messageCount: s.messageCount,
4544
- fileSize: s.fileSize,
4545
- }));
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;
4535
+ let sessionsLoaded = false;
4546
4536
  const sendReady = async () => {
4547
4537
  if (readySent)
4548
4538
  return;
@@ -4553,6 +4543,7 @@ async function main() {
4553
4543
  hasRecentSession,
4554
4544
  recentSessionId,
4555
4545
  sessions: sessionsForFrontend,
4546
+ sessionsLoaded,
4556
4547
  preSelectedSessionId,
4557
4548
  mcpServers: getMcpServerStatusList(config),
4558
4549
  enabledMcpServers: enabledMcpNames,
@@ -4564,11 +4555,33 @@ async function main() {
4564
4555
  });
4565
4556
  };
4566
4557
  const readyInterval = setInterval(sendReady, 2000);
4558
+ // Fire immediately (sessionsLoaded:false) so the frontend unblocks right away
4567
4559
  await sendReady();
4568
4560
  setTimeout(() => {
4569
4561
  clearInterval(readyInterval);
4570
4562
  console.log('✅ agent_ready retries complete');
4571
4563
  }, 20000);
4564
+ // Load session list in background — re-send agent_ready once populated
4565
+ listAllClaudeSessions().then(allSessions => {
4566
+ recentSessionId = allSessions.length > 0 ? allSessions[0].sessionId : null;
4567
+ hasRecentSession = allSessions.length > 0;
4568
+ sessionsForFrontend = allSessions.slice(0, 50).map(s => ({
4569
+ sessionId: s.sessionId,
4570
+ projectSlug: s.projectSlug,
4571
+ projectPath: s.projectPath,
4572
+ cwd: s.cwd,
4573
+ timestamp: s.timestamp.toISOString(),
4574
+ lastMessage: s.lastMessage,
4575
+ messageCount: s.messageCount,
4576
+ fileSize: s.fileSize,
4577
+ }));
4578
+ sessionsLoaded = true;
4579
+ sendReady();
4580
+ }).catch(err => {
4581
+ console.warn('listAllClaudeSessions background load failed:', err);
4582
+ sessionsLoaded = true; // unblock frontend even on error
4583
+ sendReady();
4584
+ });
4572
4585
  // Stop agent_ready retries on user speech
4573
4586
  session.on('input_speech_started', () => {
4574
4587
  readySent = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osborn",
3
- "version": "0.9.185",
3
+ "version": "0.9.187",
4
4
  "description": "Voice AI coding assistant - local agent that connects to Osborn frontend",
5
5
  "type": "module",
6
6
  "bin": {