feat(agent): JSON error responses + schema tests
- Add _emit_error() helper: prints {error, message} JSON to stdout (or plain text to stderr) before raising SystemExit(1) - _require_mnemonic, _resolve_hub_url now accept as_json kwarg and forward to _emit_error so agents get structured errors on every failure - run_keygen, run_list, run_register all pass as_json through from args - Add tests/test_agent_json_schema.py (24 tests covering I–IV): keygen schema invariants, list schema, register schema, JSON error paths (IV1–IV6: no_identity, no_mnemonic, invalid_account, no_hub)
sha256:eeff8965a8a5e09879261d0eb6b83c5cb3d2ba08752095b5d712c74ee9e44f41
sha
+50
~5
symbols
sha256:320123feb8bb8bd93c310d0f93b63890919fd88c4f5c161bd2f0587e2528d390
snapshot
+50
symbols added
~5
symbols modified
0
dead code introduced
Semantic Changes
55 symbols
+
test_IV1_keygen_no_identity_json_error
method
method test_IV1_keygen_no_identity_json_error L338–355
+
test_IV2_keygen_no_mnemonic_json_error
method
method test_IV2_keygen_no_mnemonic_json_error L357–376
+
test_IV3_keygen_negative_account_json_error
method
method test_IV3_keygen_negative_account_json_error L378–393
+
test_I3_hd_seed_b64_decodes_to_64_bytes
method
method test_I3_hd_seed_b64_decodes_to_64_bytes L159–164
+
test_I4_public_key_b64_decodes_to_32_bytes
method
method test_I4_public_key_b64_decodes_to_32_bytes L166–171
+
test_I5_fingerprint_is_sha256_of_public_key
method
method test_I5_fingerprint_is_sha256_of_public_key L173–181
+
test_I6_name_is_null_without_name_flag
method
method test_I6_name_is_null_without_name_flag L183–187
+
test_I8_msign_path_contains_account_index
method
method test_I8_msign_path_contains_account_index L201–211
+
test_II3_each_entry_has_required_keys
method
method test_II3_each_entry_has_required_keys L246–261
+
test_III4_msign_path_contains_account_index
method
method test_III4_msign_path_contains_account_index L324–329
~
run_list
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:eeff8965a8a5e09879261d0eb6b83c5cb3d2ba08752095b5d712c74ee9e44f41 --body "your comment"
No comments yet. Be the first to start the discussion.