Repository navigation
Agent errors are JSON with a code, so scripts and agents can handle them without reading the message.
Changes
- The
hammertool prints failures as one JSON object on standard error,{"code", "error", "hint"}, like successful output. MCP tool errors carry the same object. - Errors have codes such as
not_found,not_hittable,ambiguous_target,timed_out,unreachableandinvalid_arguments, in the newAgentErrorBody.code. - Commands can report their own codes, like
throw AgentError.failed("No test user", code: "unknown_user"). Code that pattern matchesAgentError.invalidArgumentsor.failedneeds a third value. - When the app drops the connection or times out, the hint says the command may have run, so check the app's state before running it again.
What's Changed
- Report agent errors as JSON with a code by @gabriellanata in #90
Full Changelog: 2.1.1...2.2.0