Add user command rule contract
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"user_id": "123456789",
|
||||
"response_template": "Welcome back, ${user_name}!"
|
||||
}
|
||||
Reference in New Issue
Block a user