|
86 | 86 | slack: |
87 | 87 | description: Slack configures Slack when type is Slack. |
88 | 88 | properties: |
89 | | - allowedUserIDs: |
90 | | - description: AllowedUserIDs restricts which Slack member |
91 | | - IDs may interact with the bot (SLACK_ALLOWED_USERS). |
92 | | - items: |
93 | | - type: string |
94 | | - type: array |
95 | | - allowedUserIDsFrom: |
96 | | - description: ValueSource defines a source for configuration |
97 | | - values from a Secret or ConfigMap |
98 | | - properties: |
99 | | - key: |
100 | | - description: The key of the ConfigMap or Secret. |
101 | | - maxLength: 253 |
102 | | - type: string |
103 | | - name: |
104 | | - description: The name of the ConfigMap or Secret. |
105 | | - maxLength: 253 |
106 | | - type: string |
107 | | - type: |
108 | | - enum: |
109 | | - - ConfigMap |
110 | | - - Secret |
111 | | - type: string |
112 | | - required: |
113 | | - - key |
114 | | - - name |
115 | | - - type |
116 | | - type: object |
117 | | - allowlistChannels: |
118 | | - description: AllowlistChannels is required when channelAccess |
119 | | - is allowlist. |
120 | | - items: |
121 | | - type: string |
122 | | - type: array |
123 | 89 | appToken: |
124 | 90 | description: AgentHarnessChannelCredential supplies a token |
125 | 91 | from an inline value or a Secret/ConfigMap key. |
@@ -188,38 +154,82 @@ spec: |
188 | 154 | - message: Exactly one of value or valueFrom must be specified |
189 | 155 | rule: (has(self.value) && !has(self.valueFrom)) || (!has(self.value) |
190 | 156 | && has(self.valueFrom)) |
191 | | - channelAccess: |
192 | | - description: AgentHarnessChannelAccess controls whether |
193 | | - the bot listens broadly or only on an allowlist. |
194 | | - enum: |
195 | | - - allowlist |
196 | | - - open |
197 | | - - disabled |
198 | | - type: string |
199 | | - homeChannel: |
200 | | - description: HomeChannel is the default Slack channel ID |
201 | | - for cron/scheduled messages (SLACK_HOME_CHANNEL). |
202 | | - type: string |
203 | | - homeChannelName: |
204 | | - description: HomeChannelName is a human-readable label for |
205 | | - HomeChannel (SLACK_HOME_CHANNEL_NAME). |
206 | | - type: string |
207 | | - interactiveReplies: |
208 | | - default: true |
209 | | - type: boolean |
| 157 | + hermes: |
| 158 | + description: Hermes configures Hermes-specific Slack settings. |
| 159 | + properties: |
| 160 | + allowedUserIDs: |
| 161 | + description: AllowedUserIDs restricts which Slack member |
| 162 | + IDs may interact with the bot (SLACK_ALLOWED_USERS). |
| 163 | + items: |
| 164 | + type: string |
| 165 | + type: array |
| 166 | + allowedUserIDsFrom: |
| 167 | + description: ValueSource defines a source for configuration |
| 168 | + values from a Secret or ConfigMap |
| 169 | + properties: |
| 170 | + key: |
| 171 | + description: The key of the ConfigMap or Secret. |
| 172 | + maxLength: 253 |
| 173 | + type: string |
| 174 | + name: |
| 175 | + description: The name of the ConfigMap or Secret. |
| 176 | + maxLength: 253 |
| 177 | + type: string |
| 178 | + type: |
| 179 | + enum: |
| 180 | + - ConfigMap |
| 181 | + - Secret |
| 182 | + type: string |
| 183 | + required: |
| 184 | + - key |
| 185 | + - name |
| 186 | + - type |
| 187 | + type: object |
| 188 | + homeChannel: |
| 189 | + description: HomeChannel is the default Slack channel |
| 190 | + ID for cron/scheduled messages (SLACK_HOME_CHANNEL). |
| 191 | + type: string |
| 192 | + homeChannelName: |
| 193 | + description: HomeChannelName is a human-readable label |
| 194 | + for HomeChannel (SLACK_HOME_CHANNEL_NAME). |
| 195 | + type: string |
| 196 | + type: object |
| 197 | + x-kubernetes-validations: |
| 198 | + - message: allowedUserIDs and allowedUserIDsFrom are mutually |
| 199 | + exclusive |
| 200 | + rule: '!(size(self.allowedUserIDs) > 0 && has(self.allowedUserIDsFrom))' |
| 201 | + openclaw: |
| 202 | + description: OpenClaw configures OpenClaw/NemoClaw-specific |
| 203 | + Slack routing. |
| 204 | + properties: |
| 205 | + allowlistChannels: |
| 206 | + description: AllowlistChannels is required when channelAccess |
| 207 | + is allowlist. |
| 208 | + items: |
| 209 | + type: string |
| 210 | + type: array |
| 211 | + channelAccess: |
| 212 | + description: AgentHarnessChannelAccess controls whether |
| 213 | + the bot listens broadly or only on an allowlist. |
| 214 | + enum: |
| 215 | + - allowlist |
| 216 | + - open |
| 217 | + - disabled |
| 218 | + type: string |
| 219 | + interactiveReplies: |
| 220 | + default: true |
| 221 | + type: boolean |
| 222 | + type: object |
| 223 | + x-kubernetes-validations: |
| 224 | + - message: allowlistChannels is required when channelAccess |
| 225 | + is allowlist |
| 226 | + rule: '!has(self.channelAccess) || self.channelAccess |
| 227 | + != ''allowlist'' || (has(self.allowlistChannels) && |
| 228 | + size(self.allowlistChannels) > 0)' |
210 | 229 | required: |
211 | 230 | - appToken |
212 | 231 | - botToken |
213 | 232 | type: object |
214 | | - x-kubernetes-validations: |
215 | | - - message: allowedUserIDs and allowedUserIDsFrom are mutually |
216 | | - exclusive |
217 | | - rule: '!(size(self.allowedUserIDs) > 0 && has(self.allowedUserIDsFrom))' |
218 | | - - message: allowlistChannels is required when channelAccess |
219 | | - is allowlist |
220 | | - rule: '!has(self.channelAccess) || self.channelAccess != ''allowlist'' |
221 | | - || (has(self.allowlistChannels) && size(self.allowlistChannels) |
222 | | - > 0)' |
223 | 233 | telegram: |
224 | 234 | description: AgentHarnessTelegramChannelSpec configures Telegram |
225 | 235 | when AgentHarnessChannel.type is Telegram. |
@@ -500,6 +510,12 @@ spec: |
500 | 510 | required: |
501 | 511 | - backend |
502 | 512 | type: object |
| 513 | + x-kubernetes-validations: |
| 514 | + - message: slack backend-specific settings must match spec.backend |
| 515 | + rule: '!has(self.channels) || self.channels.all(c, c.type != ''slack'' |
| 516 | + || (has(c.slack) && ((self.backend == ''hermes'' && has(c.slack.hermes) |
| 517 | + && !has(c.slack.openclaw)) || ((self.backend == ''openclaw'' || self.backend |
| 518 | + == ''nemoclaw'') && has(c.slack.openclaw) && !has(c.slack.hermes)))))' |
503 | 519 | status: |
504 | 520 | description: AgentHarnessStatus is the observed state of an AgentHarness. |
505 | 521 | properties: |
|
0 commit comments