mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-18 21:51:43 +00:00
* fix(onboarding): harden inference setup * fix(mac): preserve setup request cancellation * test(crestodian): align setup audit expectation * test(crestodian): cover approval persistence warning * fix(crestodian): preserve setup credentials and success * chore(pr): leave changelog to release flow * fix(onboarding): repair native CI gates
26 lines
953 B
Swift
26 lines
953 B
Swift
import OpenClawProtocol
|
|
|
|
public enum GatewayServerCapability: String, CaseIterable, Sendable {
|
|
case chatSendRoutingContract = "chat-send-routing-contract"
|
|
case crestodianSetupModelRef = "crestodian-setup-model-ref"
|
|
}
|
|
|
|
extension HelloOk {
|
|
public func supportsServerCapability(_ capability: GatewayServerCapability) -> Bool {
|
|
let values = features["capabilities"]?.value as? [AnyCodable] ?? []
|
|
return values.contains { ($0.value as? String) == capability.rawValue }
|
|
}
|
|
}
|
|
|
|
/// Server-push messages from the gateway websocket.
|
|
///
|
|
/// This is the in-process replacement for the legacy `NotificationCenter` fan-out.
|
|
public enum GatewayPush: Sendable {
|
|
/// A full snapshot that arrives on connect (or reconnect).
|
|
case snapshot(HelloOk)
|
|
/// A server push event frame.
|
|
case event(EventFrame)
|
|
/// A detected sequence gap (`expected...received`) for event frames.
|
|
case seqGap(expected: Int, received: Int)
|
|
}
|