fix(ide): upgrade managed agent and migrate existing member media connection

This commit is contained in:
yilsem committed 2026-09-05 15:35:04 +03:00
1 parent c612120b7e
commit 8f38fd53e4
6 files changed
+54 -3

No files matched your search

@@ -3,6 +3,18 @@ export interface BootstrapMarkerLike {
schemaVersion?: unknown
}
// An AITURK package upgrade must bring its managed agent along with the UI.
// Developer checkouts and installs without proven Desktop ownership keep their
// existing launch behavior. The installer preserves edits and refuses rollback.
export function needsPackagedRuntimeUpgrade(
packaged: boolean, stamp: { commit?: string; source?: string } | null,
marker: BootstrapMarkerLike | null
): boolean {
return Boolean(packaged && stamp?.source !== 'fallback' &&
/^[0-9a-f]{40}$/i.test(stamp?.commit || '') && !/^0+$/.test(stamp?.commit || '') &&
hasValidBootstrapMarker(marker, 1) && marker?.pinnedCommit !== stamp?.commit)
}
export interface ActiveRuntimeState {
hasValidMarker: boolean
shouldUseActiveRuntime: boolean