@@ -18,6 +18,92 @@ public enum ChannelID: String, CaseIterable, Sendable {
1818 case msteams
1919 case line
2020 case webchat
21+ case feishu
22+ case irc
23+ case matrix
24+ case mattermost
25+ case nextcloudTalk = " nextcloud-talk "
26+ case nostr
27+ case qqbot
28+ case synologyChat = " synology-chat "
29+ case tlon
30+ case twitch
31+ case zalo
32+ case zalouser
33+ case qaChannel = " qa-channel "
34+ }
35+
36+ /// Channel metadata for upstream channel plugins and native Swift adapters.
37+ public struct ChannelMetadataEntry : Sendable , Equatable {
38+ /// Stable channel identifier.
39+ public var id : ChannelID
40+ /// Human-facing channel label.
41+ public var label : String
42+ /// Optional upstream documentation path.
43+ public var docsPath : String ?
44+ /// Additional accepted upstream identifiers.
45+ public var aliases : [ String ]
46+ /// Whether OpenClawKit currently provides a native Swift transport adapter.
47+ public var nativeTransportAvailable : Bool
48+
49+ /// Creates a channel metadata entry.
50+ public init (
51+ id: ChannelID ,
52+ label: String ,
53+ docsPath: String ? = nil ,
54+ aliases: [ String ] = [ ] ,
55+ nativeTransportAvailable: Bool
56+ ) {
57+ self . id = id
58+ self . label = label
59+ self . docsPath = docsPath
60+ self . aliases = aliases
61+ self . nativeTransportAvailable = nativeTransportAvailable
62+ }
63+ }
64+
65+ /// Channel metadata catalog aligned with the pinned OpenClaw upstream plugin set.
66+ public enum OpenClawChannelMetadataCatalog {
67+ /// Known channel metadata entries, including plugin-only channels without Swift transports.
68+ public static let entries : [ ChannelMetadataEntry ] = [
69+ native ( . whatsapp, " WhatsApp " , docsPath: " /channels/whatsapp " ) ,
70+ native ( . telegram, " Telegram " , docsPath: " /channels/telegram " ) ,
71+ native ( . slack, " Slack " , docsPath: " /channels/slack " ) ,
72+ native ( . googlechat, " Google Chat " , docsPath: " /channels/googlechat " ) ,
73+ native ( . discord, " Discord " , docsPath: " /channels/discord " ) ,
74+ native ( . signal, " Signal " , docsPath: " /channels/signal " ) ,
75+ native ( . bluebubbles, " BlueBubbles " , docsPath: " /channels/bluebubbles " ) ,
76+ native ( . imessage, " iMessage " , docsPath: " /channels/imessage " ) ,
77+ native ( . msteams, " Microsoft Teams " , docsPath: " /channels/msteams " ) ,
78+ native ( . webchat, " WebChat " , docsPath: " /channels/webchat " ) ,
79+ plugin ( . line, " LINE " , docsPath: " /channels/line " ) ,
80+ plugin ( . feishu, " Feishu " , docsPath: " /channels/feishu " ) ,
81+ plugin ( . irc, " IRC " , docsPath: " /channels/irc " ) ,
82+ plugin ( . matrix, " Matrix " , docsPath: " /channels/matrix " ) ,
83+ plugin ( . mattermost, " Mattermost " , docsPath: " /channels/mattermost " ) ,
84+ plugin ( . nextcloudTalk, " Nextcloud Talk " , docsPath: " /channels/nextcloud-talk " ) ,
85+ plugin ( . nostr, " Nostr " , docsPath: " /channels/nostr " ) ,
86+ plugin ( . qqbot, " QQ Bot " , docsPath: " /channels/qqbot " ) ,
87+ plugin ( . synologyChat, " Synology Chat " , docsPath: " /channels/synology-chat " ) ,
88+ plugin ( . tlon, " Tlon " , docsPath: " /channels/tlon " ) ,
89+ plugin ( . twitch, " Twitch " , docsPath: " /channels/twitch " ) ,
90+ plugin ( . zalo, " Zalo " , docsPath: " /channels/zalo " ) ,
91+ plugin ( . zalouser, " Zalo User " , docsPath: " /channels/zalouser " ) ,
92+ plugin ( . qaChannel, " QA Channel " , docsPath: " /channels/qa-channel " ) ,
93+ ]
94+
95+ /// Returns channel metadata for one identifier.
96+ public static func entry( for id: ChannelID ) -> ChannelMetadataEntry ? {
97+ self . entries. first { $0. id == id }
98+ }
99+
100+ private static func native( _ id: ChannelID , _ label: String , docsPath: String ? = nil ) -> ChannelMetadataEntry {
101+ ChannelMetadataEntry ( id: id, label: label, docsPath: docsPath, nativeTransportAvailable: true )
102+ }
103+
104+ private static func plugin( _ id: ChannelID , _ label: String , docsPath: String ? = nil ) -> ChannelMetadataEntry {
105+ ChannelMetadataEntry ( id: id, label: label, docsPath: docsPath, nativeTransportAvailable: false )
106+ }
21107}
22108
23109/// Normalized inbound message envelope delivered to the runtime.
0 commit comments