Why
Valid JSON with invalid shapes can throw outside handler isolation: a matcher missing hooks and hookSpecificOutput set to a string both fail real trigger/tool calls.
Scope
Validate configuration entries and handler outputs at ingress, retain valid siblings, protect hot-reload and session registration, and report invalid data without crashing callers.
Approach
Turn the audit reproduction into a repository regression, fix the runtime boundary, and verify callers and adjacent hooks tests using Bun 1.3.14. Keep the user's existing working-tree edits outside this delivery.
Acceptance
Malformed JSON shapes never defect trigger or tool execution, valid siblings still run, and API/config validation are consistent.
Why
Valid JSON with invalid shapes can throw outside handler isolation: a matcher missing hooks and hookSpecificOutput set to a string both fail real trigger/tool calls.
Scope
Validate configuration entries and handler outputs at ingress, retain valid siblings, protect hot-reload and session registration, and report invalid data without crashing callers.
Approach
Turn the audit reproduction into a repository regression, fix the runtime boundary, and verify callers and adjacent hooks tests using Bun 1.3.14. Keep the user's existing working-tree edits outside this delivery.
Acceptance
Malformed JSON shapes never defect trigger or tool execution, valid siblings still run, and API/config validation are consistent.