Follow-up from #120.
CheckContext is currently a broad field bag shared by all lifecycle hooks. This allows invalid hook/payload combinations and narrows structured runtime payloads to strings.
Refactor toward hook-specific context models, e.g.:
BeforeAgentContext
AfterAgentContext
BeforeModelContext
AfterModelContext
ToolCallContext
AfterToolContext
Expose a union type for evaluator input and keep structured payloads structured until explicit evaluator/text extraction logic handles serialization.
Follow-up from #120.
CheckContextis currently a broad field bag shared by all lifecycle hooks. This allows invalid hook/payload combinations and narrows structured runtime payloads to strings.Refactor toward hook-specific context models, e.g.:
BeforeAgentContextAfterAgentContextBeforeModelContextAfterModelContextToolCallContextAfterToolContextExpose a union type for evaluator input and keep structured payloads structured until explicit evaluator/text extraction logic handles serialization.