agentgui 1.0.472 → 1.0.474

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.
@@ -42,7 +42,7 @@ const checkToolViaBunx = async (pkg) => {
42
42
  const timer = setTimeout(() => {
43
43
  try { proc.kill('SIGKILL'); } catch (_) {}
44
44
  const installed = checkToolInstalled(pkg);
45
- resolve({ installed, isUpToDate: false, upgradeNeeded: false, output: 'timeout' });
45
+ resolve({ installed, isUpToDate: installed, upgradeNeeded: false, output: 'timeout' });
46
46
  }, 10000);
47
47
  proc.on('close', (code) => {
48
48
  clearTimeout(timer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.472",
3
+ "version": "1.0.474",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -3382,6 +3382,11 @@ async function processMessageWithStreaming(conversationId, messageId, sessionId,
3382
3382
  if (parsed.type === 'system') {
3383
3383
  if (parsed.subtype === 'task_notification') return;
3384
3384
 
3385
+ if (parsed.session_id) {
3386
+ queries.setClaudeSessionId(conversationId, parsed.session_id);
3387
+ debugLog(`[stream] Eagerly persisted claudeSessionId=${parsed.session_id} for conv=${conversationId}`);
3388
+ }
3389
+
3385
3390
  const systemBlock = {
3386
3391
  type: 'system',
3387
3392
  subtype: parsed.subtype,
@@ -4258,8 +4263,21 @@ async function resumeInterruptedStreams() {
4258
4263
  const messageId = lastMsg?.id || null;
4259
4264
  console.log(`[RESUME] Resuming conv ${conv.id} (claude session: ${conv.claudeSessionId})`);
4260
4265
 
4261
- processMessageWithStreaming(conv.id, messageId, session.id, promptText, conv.agentType, conv.model, conv.subAgent)
4262
- .catch(err => debugLog(`[RESUME] Error resuming conv ${conv.id}: ${err.message}`));
4266
+ try {
4267
+ await processMessageWithStreaming(conv.id, messageId, session.id, promptText, conv.agentType, conv.model, conv.subAgent);
4268
+ } catch (err) {
4269
+ console.error(`[RESUME] Error resuming conv ${conv.id}: ${err.message}`);
4270
+ queries.setIsStreaming(conv.id, false);
4271
+ const activeSessions = queries.getSessionsByStatus(conv.id, 'active');
4272
+ const pendingSessions = queries.getSessionsByStatus(conv.id, 'pending');
4273
+ for (const s of [...activeSessions, ...pendingSessions]) {
4274
+ queries.updateSession(s.id, {
4275
+ status: 'error',
4276
+ error: 'Resume failed: ' + err.message,
4277
+ completed_at: Date.now()
4278
+ });
4279
+ }
4280
+ }
4263
4281
 
4264
4282
  if (i < toResume.length - 1) {
4265
4283
  await new Promise(r => setTimeout(r, 200));