Skip to content

fix: isolate malformed hook configuration and output #558

Description

@LeXwDeX

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions