Why
FileChanged reads file_path/path although native write/edit use filePath, so successful writes emit a payload with no path. Multi-file apply_patch also needs accurate events.
Scope
Derive paths/change kinds from actual tool inputs and result metadata after successful execution, including rewritten input and multiple changed files.
Approach
The complete SessionPrompt regression additionally reproduced missing SettingsHook service context across SessionRunState tool execution. Preserve the captured hook service at that boundary and bind handler dependencies at construction, so real model-driven writes and patches emit events through the same path as isolated tools tests.
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
Real write/edit and multi-file patch results emit correct nonempty paths and change kinds, and failed or blocked tools emit no false change.
Why
FileChanged reads file_path/path although native write/edit use filePath, so successful writes emit a payload with no path. Multi-file apply_patch also needs accurate events.
Scope
Derive paths/change kinds from actual tool inputs and result metadata after successful execution, including rewritten input and multiple changed files.
Approach
The complete SessionPrompt regression additionally reproduced missing SettingsHook service context across SessionRunState tool execution. Preserve the captured hook service at that boundary and bind handler dependencies at construction, so real model-driven writes and patches emit events through the same path as isolated tools tests.
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
Real write/edit and multi-file patch results emit correct nonempty paths and change kinds, and failed or blocked tools emit no false change.