@gotcos/glasses-server 6.51.0 → 6.52.0

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.
@@ -84,6 +84,7 @@ import {
84
84
  } from '../../shared/media-attachment.js'
85
85
  import { terminalProviderAuthFailure } from './provider-terminal-error.js'
86
86
  import { terminateProviderProcess } from './provider-process-lifecycle.js'
87
+ import { teeJobTrail } from './job-trail.js'
87
88
 
88
89
  const INACTIVITY_MS = 180_000
89
90
  const WALL_MAX_MS = 900_000
@@ -833,6 +834,11 @@ export async function callCodexStreaming(
833
834
  }
834
835
  })
835
836
 
837
+ // 6.52.0: the Messages trail, a SECOND stdout reader registered after the one above, so
838
+ // that handler sees every chunk first and nothing it decides can change. Without an
839
+ // `onTrail` (legacy /api/query, openai-compat, COS_MESSAGES_TRAIL=0) this attaches nothing.
840
+ teeJobTrail(proc.stdout, 'codex', callbacks.onTrail)
841
+
836
842
  proc.stderr.on('data', (chunk: Buffer) => {
837
843
  resetInactivity()
838
844
  stderr += chunk.toString()
@@ -63,6 +63,7 @@ import {
63
63
  type MediaAttachmentRef,
64
64
  } from '../../shared/media-attachment.js'
65
65
  import { terminalProviderAuthFailure } from './provider-terminal-error.js'
66
+ import { teeJobTrail } from './job-trail.js'
66
67
 
67
68
  const INACTIVITY_MS = 180_000
68
69
  const WALL_MAX_MS = 900_000
@@ -666,6 +667,11 @@ export async function callCursorStreaming(
666
667
  }
667
668
  })
668
669
 
670
+ // 6.52.0: the Messages trail, a SECOND stdout reader registered after the one above, so
671
+ // that handler sees every chunk first and nothing it decides can change. Without an
672
+ // `onTrail` (legacy /api/query, openai-compat, COS_MESSAGES_TRAIL=0) this attaches nothing.
673
+ teeJobTrail(proc.stdout, 'cursor', callbacks.onTrail)
674
+
669
675
  proc.stderr.on('data', (chunk: Buffer) => {
670
676
  resetInactivity()
671
677
  stderr += chunk.toString()