Files
clawdbot/apps/macos/Sources/Clawdbot/GatewayAutostartPolicy.swift
2026-01-04 14:38:51 +00:00

16 lines
421 B
Swift

import Foundation
enum GatewayAutostartPolicy {
static func shouldStartGateway(mode: AppState.ConnectionMode, paused: Bool) -> Bool {
mode == .local && !paused
}
static func shouldEnsureLaunchAgent(
mode: AppState.ConnectionMode,
paused: Bool,
attachExistingOnly: Bool) -> Bool
{
self.shouldStartGateway(mode: mode, paused: paused) && !attachExistingOnly
}
}