@@ -4,7 +4,6 @@ import { getErrorMessage } from '@sim/utils/errors'
44import { generateId } from '@sim/utils/id'
55import { isPlainRecord , omit } from '@sim/utils/object'
66import { defineOperation } from '@/lib/core/application'
7- import { isFeatureEnabled } from '@/lib/core/config/feature-flags'
87import { OrchestrationError } from '@/lib/core/orchestration/types'
98import { defineAuthorizedCredentialUserUseCase } from '@/lib/credentials/application/authorized-user-use-case'
109import {
@@ -23,12 +22,9 @@ import {
2322 DesktopCallRevokedError ,
2423 DesktopDeviceUnrecognizedError ,
2524} from '@/lib/desktop/executor/errors'
25+ import { isDesktopBackgroundExecutorEnabled } from '@/lib/desktop/executor/flag'
2626import { classifyDesktopInbox , type DesktopInboxEntry } from '@/lib/desktop/executor/inbox'
27- import {
28- isDesktopPresenceAvailable ,
29- markDesktopPresent ,
30- releaseDesktopPresence ,
31- } from '@/lib/desktop/executor/presence'
27+ import { markDesktopPresent , releaseDesktopPresence } from '@/lib/desktop/executor/presence'
3228import {
3329 acknowledgeDesktopCallResult ,
3430 claimOfferedDesktopCall ,
@@ -64,12 +60,6 @@ async function requireBoundDevice(principal: SessionPrincipal, deviceId: string)
6460 return device
6561}
6662
67- /** Whether new turns from this user may bind to a desktop. Never consulted for runs already bound. */
68- async function isDesktopBackgroundExecutorEnabled ( userId : string ) : Promise < boolean > {
69- if ( ! isDesktopPresenceAvailable ( ) ) return false
70- return isFeatureEnabled ( 'mothership-desktop-background-executor' , { userId } )
71- }
72-
7363export interface RegisterDesktopDeviceInput extends DeviceInput {
7464 name : string
7565 appVersion : string
0 commit comments