@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.
- package/.env.example +16 -0
- package/CHANGELOG.md +67 -0
- package/README.md +56 -3
- package/managed-runtime-contract.json +1 -0
- package/package.json +1 -1
- package/server/index.ts +58 -9
- package/server/lib/activity-preview.ts +45 -2
- package/server/lib/agent-session-search.ts +3 -1
- package/server/lib/agent-session-store.ts +35 -5
- package/server/lib/agent-session-turns.ts +4 -1
- package/server/lib/claude-bridge.ts +9 -0
- package/server/lib/client-liveness.ts +50 -0
- package/server/lib/codex-bridge.ts +6 -0
- package/server/lib/cursor-bridge.ts +6 -0
- package/server/lib/job-trail.ts +758 -0
- package/server/lib/ollama-bridge.ts +17 -0
- package/server/lib/permission-broker.ts +1156 -0
- package/server/lib/query-job-coordinator.ts +17 -1
- package/server/lib/query-job-feature.ts +10 -0
- package/server/lib/query-job-runtime.ts +9 -1
- package/server/lib/query-job-store.ts +214 -5
- package/server/lib/query-job-types.ts +36 -0
- package/server/lib/session-signal-store.ts +42 -10
- package/server/lib/session-state-derive.ts +14 -4
- package/server/lib/session-stream-events.ts +597 -14
- package/server/lib/session-stream-producer.ts +25 -6
- package/server/lib/session-transcript-watcher.ts +120 -3
- package/server/routes/agent-sessions.ts +12 -1
- package/server/routes/cursor-stop-followup.ts +14 -7
- package/server/routes/health.ts +20 -1
- package/server/routes/permission-broker.ts +176 -0
- package/server/routes/query-jobs.ts +84 -13
|
@@ -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()
|