mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-15 05:26:09 +00:00
* feat(onboarding): add provider sign-in flows * fix(oauth): keep callback compatibility * fix(onboarding): reconcile lost auth outcomes * fix(onboarding): lock auth cancellation at commit * fix(onboarding): close provider auth lifecycle gaps * fix(onboarding): make terminal auth failures dismissable * fix(onboarding): satisfy native app checks * fix(onboarding): reconcile absent auth sessions * fix(onboarding): bound provider auth sessions * fix(onboarding): open provider auth links safely * test(onboarding): use scanner-safe auth fixtures * revert: keep established onboarding auth fixtures * fix(onboarding): close provider auth cancellation gaps * fix(gateway): retain uncollected wizard results * fix(onboarding): bind provider reconciliation attempt * fix(i18n): avoid guessing moved string identities * style(onboarding): normalize remote auth choices efficiently * fix(protocol): refresh optional provider auth choices * test(gateway): cover provider auth dispatch order * refactor(macos): split onboarding setup support * fix(macos): refresh merged native checks
40 lines
932 B
Swift
40 lines
932 B
Swift
import Foundation
|
|
|
|
enum GatewayAgentChannel: String, Codable, CaseIterable {
|
|
case last
|
|
case whatsapp
|
|
case telegram
|
|
case discord
|
|
case googlechat
|
|
case slack
|
|
case signal
|
|
case imessage
|
|
case msteams
|
|
case webchat
|
|
|
|
init(raw: String?) {
|
|
let normalized = (raw ?? "").trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
|
|
self = GatewayAgentChannel(rawValue: normalized) ?? .last
|
|
}
|
|
|
|
var isDeliverable: Bool {
|
|
self != .webchat
|
|
}
|
|
|
|
func shouldDeliver(_ deliver: Bool) -> Bool {
|
|
deliver && self.isDeliverable
|
|
}
|
|
}
|
|
|
|
struct GatewayAgentInvocation {
|
|
var message: String
|
|
var sessionKey: String = "main"
|
|
var thinking: String?
|
|
var deliver: Bool = false
|
|
var to: String?
|
|
var channel: GatewayAgentChannel = .last
|
|
var timeoutSeconds: Int?
|
|
var idempotencyKey: String = UUID().uuidString
|
|
var voiceWakeTrigger: String?
|
|
}
|