Repository navigation
🚀 What's Changed
This release improves the robustness of hook scripts by safely handling non-object JSON responses, preventing unexpected jq execution errors during tool failure logging and post-edit
formatting.
🛡️ Hook Script Robustness
- Safe JSON Parsing in Tool Failure Log (
.sober/scripts/codex-hooks/tool-failure-log.sh): Updatedjqqueries to use theobjectsfilter. This ensures that field extraction (like
exit_codeandstderr) only occurs whentool_responseis a valid JSON object, preventing script failures on unexpected response shapes. - Safe JSON Parsing in Post-Edit Format (
.sober/scripts/hooks/post-edit-format.sh): Applied the sameobjectsfilter protection when extractingfilePathorfile_pathfrom
tool_response, ensuring the formatter hook gracefully handles malformed or non-object data without crashing.
🛠️ Full Changelog
- Prevented
jqerrors intool-failure-log.shby enforcing object type checks ontool_response. - Prevented
jqerrors inpost-edit-format.shby enforcing object type checks ontool_response. - Bumped package version to
2.1.1inpackage.json.