event_apply
Checks a declared event against canonical game state, then returns a precondition-bound transition and stamped next state to keep rules legal under SRD 5.2.1.
Instructions
Evaluate one declared event against a canonical state and return a precondition-bound transition proposal plus stamped next_state. Supply a stable host event identity (for Discord, the message/event snowflake) as idempotency_key; omission produces a deterministic auto key. Persist only through transition.commit so stale or out-of-order events fail closed. Event types: turn-start; round-advance; action / bonus-action / reaction; free-interaction; move; stand-up; condition-gained / condition-ended; damage; heal; death-save; and ruling. A ruling is authorized DM discretion, including the calling agent-DM when it holds that authority, and is never mislabeled as a rule. srdcheck never owns state, produces an event, advances time, or generates randomness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | Yes | ||
| state | Yes | ||
| request_id | No | ||
| table_policy | No | ||
| asserted_facts | No | ||
| policy_context | No | ||
| table_decision | No | ||
| idempotency_key | No | stable caller-owned event identity; use the Discord message/event ID when applicable |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | Yes | ||
| data | No | ||
| facts | Yes | ||
| adapter | Yes | ||
| verdict | Yes | ||
| rule_ids | Yes | ||
| citations | Yes | ||
| exit_code | Yes | ||
| assumptions | Yes | ||
| explanation | Yes | ||
| rule_result | Yes | ||
| checked_scope | Yes | ||
| coverage_level | Yes | ||
| state_mutation | Yes | ||
| table_decision | Yes | ||
| unchecked_scope | Yes |