Files
openclaw/apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayPush.swift
Peter Steinberger a0354e5243 fix(onboarding): make fresh AI setup reliable and transparent (#103962)
* 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
2026-07-10 23:44:53 +01:00

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)
}