Skip to content

v2.1.1

Latest

Choose a tag to compare

@move-hoon move-hoon released this 18 Jun 05:59

🚀 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): Updated jq queries to use the objects filter. This ensures that field extraction (like
    exit_code and stderr) only occurs when tool_response is 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 same objects filter protection when extracting filePath or file_path from
    tool_response, ensuring the formatter hook gracefully handles malformed or non-object data without crashing.

🛠️ Full Changelog

  • Prevented jq errors in tool-failure-log.sh by enforcing object type checks on tool_response.
  • Prevented jq errors in post-edit-format.sh by enforcing object type checks on tool_response.
  • Bumped package version to 2.1.1 in package.json.