Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions charts/openab/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ data:
{{- end }}
{{- /* allowUserMessages: controls whether the bot requires @mention in threads (Discord) */ -}}
{{- if $cfg.discord.allowUserMessages }}
{{- if not (has $cfg.discord.allowUserMessages (list "involved" "mentions")) }}
{{- fail (printf "agents.%s.discord.allowUserMessages must be one of: involved, mentions — got: %s" $name $cfg.discord.allowUserMessages) }}
{{- if not (has $cfg.discord.allowUserMessages (list "involved" "mentions" "multibot-mentions")) }}
{{- fail (printf "agents.%s.discord.allowUserMessages must be one of: involved, mentions, multibot-mentions (use hyphen form, not underscore) — got: %s" $name $cfg.discord.allowUserMessages) }}
{{- end }}
allow_user_messages = {{ $cfg.discord.allowUserMessages | toJson }} {{- /* involved (default): respond in bot's threads without @mention | mentions: always require @mention */ -}}
allow_user_messages = {{ $cfg.discord.allowUserMessages | toJson }} {{- /* involved (default): respond in bot's threads without @mention | mentions: always require @mention | multibot-mentions: require @mention only when another bot has posted in the thread */ -}}
{{- end }}
{{- end }}

Expand Down Expand Up @@ -77,10 +77,10 @@ data:
trusted_bot_ids = {{ ($cfg.slack).trustedBotIds | toJson }}
{{- end }}
{{- if ($cfg.slack).allowUserMessages }}
{{- if not (has ($cfg.slack).allowUserMessages (list "involved" "mentions")) }}
{{- fail (printf "agents.%s.slack.allowUserMessages must be one of: involved, mentions — got: %s" $name ($cfg.slack).allowUserMessages) }}
{{- if not (has ($cfg.slack).allowUserMessages (list "involved" "mentions" "multibot-mentions")) }}
{{- fail (printf "agents.%s.slack.allowUserMessages must be one of: involved, mentions, multibot-mentions (use hyphen form, not underscore) — got: %s" $name ($cfg.slack).allowUserMessages) }}
{{- end }}
allow_user_messages = {{ ($cfg.slack).allowUserMessages | toJson }} {{- /* involved (default): respond in bot's threads without @mention | mentions: always require @mention */ -}}
allow_user_messages = {{ ($cfg.slack).allowUserMessages | toJson }} {{- /* involved (default): respond in bot's threads without @mention | mentions: always require @mention | multibot-mentions: require @mention only when another bot has posted in the thread */ -}}
{{- end }}
{{- end }}

Expand Down
40 changes: 40 additions & 0 deletions charts/openab/tests/configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,43 @@ tests:
- matchRegex:
path: data["config.toml"]
pattern: 'allow_bot_messages = "off"'

- it: renders allow_user_messages = "involved"
set:
agents.kiro.discord.allowUserMessages: involved
asserts:
- matchRegex:
path: data["config.toml"]
pattern: 'allow_user_messages = "involved"'

- it: renders allow_user_messages = "mentions"
set:
agents.kiro.discord.allowUserMessages: mentions
asserts:
- matchRegex:
path: data["config.toml"]
pattern: 'allow_user_messages = "mentions"'

- it: renders allow_user_messages = "multibot-mentions"
set:
agents.kiro.discord.allowUserMessages: multibot-mentions
asserts:
- matchRegex:
path: data["config.toml"]
pattern: 'allow_user_messages = "multibot-mentions"'

- it: rejects invalid allowUserMessages value
set:
agents.kiro.discord.allowUserMessages: yolo
asserts:
- failedTemplate:
errorPattern: "must be one of: involved, mentions, multibot-mentions"

- it: renders slack allow_user_messages = "multibot-mentions"
set:
agents.kiro.slack.enabled: true
agents.kiro.slack.allowUserMessages: multibot-mentions
asserts:
- matchRegex:
path: data["config.toml"]
pattern: 'allow_user_messages = "multibot-mentions"'
5 changes: 4 additions & 1 deletion charts/openab/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ agents:
allowBotMessages: "off"
# trustedBotIds: Bot User IDs (U...) — find via Slack UI: click bot profile → Copy member ID
trustedBotIds: []
# allowUserMessages: "involved" (default) | "mentions"
# allowUserMessages: "involved" (default) | "mentions" | "multibot-mentions"
# "involved" = respond to thread follow-ups without @mention if bot has participated
# "mentions" = always require @mention
# "multibot-mentions" = same as "involved" in single-bot threads; require @mention
# only when another bot has also posted in the thread
# (recommended for multi-bot deployments)
allowUserMessages: "involved"
workingDir: /home/agent
env: {}
Expand Down
Loading