Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
import Foundation
import CoreFoundation
enum RemoteDesktopBridgeNumber {
/// Expo's untyped JS dictionaries contain Double, not Swift Int. Keep the
/// wire contract strict: no truncation, booleans or unsafe JS integers.
static func integer(_ value: Any?) -> Int? {
guard let number = value as? NSNumber,
CFGetTypeID(number) != CFBooleanGetTypeID() else { return nil }
let value = number.doubleValue
guard value.isFinite, abs(value) <= 9_007_199_254_740_991 else { return nil }
return Int(exactly: value)
}
}