mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-23 19:08:22 -06:00
a6a0716486
User-facing name is now OpenClaw (the system speaks); internal code name is system-agent. Gateway methods crestodian.* -> openclaw.chat/openclaw.setup.*, agent tool -> openclaw, reserved agent ids openclaw + retired crestodian. openclaw setup routes: onboarding flags -> onboard, -m/--yes -> system agent, bare configured interactive -> OpenClaw chat, unconfigured -> onboarding. Hidden crestodian CLI and /crestodian TUI aliases kept; docs moved to docs/cli/openclaw.md with redirect stub. macOS/Android strings in lockstep. Refs #107237
31 lines
1.1 KiB
Swift
31 lines
1.1 KiB
Swift
import OpenClawProtocol
|
|
|
|
public enum GatewayServerCapability: String, CaseIterable, Sendable {
|
|
case chatSendRoutingContract = "chat-send-routing-contract"
|
|
case systemAgentSetupModelRef = "openclaw-setup-model-ref"
|
|
}
|
|
|
|
extension HelloOk {
|
|
func advertisedServerMethods() -> Set<String> {
|
|
let values = features["methods"]?.value as? [AnyCodable] ?? []
|
|
return Set(values.compactMap { $0.value as? String })
|
|
}
|
|
|
|
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)
|
|
}
|