Add user command rule contract
API checks / checks (push) Canceled after 0s
API dependency and security checks / audit (push) Canceled after 0s

This commit is contained in:
2026-10-25 06:10:22 +01:00
parent fece516828
commit 4efa617e25
3 changed files with 19 additions and 0 deletions
+3
View File
@@ -40,3 +40,6 @@ Command simulation uses `bot-command-simulate-request.json` and
real network requests require an explicit `use_real_request` flag; fixtures
contain only local synthetic data.
Named-user command rules use `bot-command-user-rule.json`; fixtures contain
only synthetic Twitch IDs and literal response templates.
+12
View File
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.invalid/contracts/v1/bot-command-user-rule.json",
"title": "Trixie named-user command rule",
"type": "object",
"additionalProperties": false,
"required": ["user_id"],
"properties": {
"user_id": { "type": "string", "pattern": "^[0-9]{1,64}$" },
"response_template": { "type": ["string", "null"], "minLength": 1, "maxLength": 2000 }
}
}
+4
View File
@@ -0,0 +1,4 @@
{
"user_id": "123456789",
"response_template": "Welcome back, ${user_name}!"
}