gabriel / muse public
feat patch task/json-trust #1 / 1
gabriel · 166 days ago · Apr 14, 2026 · Diff

feat: add --json to muse trust subcommands

All five trust subcommands (list, hub-list, add, remove, hub-reset) now support --json for agent-ergonomics parity.

- trust list --json → {"trusted_dirs": [...]} - trust hub-list --json → {"fingerprints": {hostname: record}} - trust add --json → {"added": true, "path": "..."} - trust remove --json → {"removed": bool, "path": "..."} - trust hub-reset --json → {"reset": bool, "hostname": "..."}

21 new tests; all existing trust tests pass.

sha256:fa019a673e6afb6c394437520c3f8cb12a82383db4d87c7cb7c33bcc47b03939 sha
+37 ~6 symbols
sha256:6907d6f2f98fe99a0ed2c597581d9ff0b9d005cfe0153efec8cfdd700791031e snapshot
+37
symbols added
~6
symbols modified
0
dead code introduced
Semantic Changes 43 symbols
~ tests/test_cmd_trust_json.py .py 35 symbols added
+ TestTrustAddJson class class TestTrustAddJson L148–167
+ test_json_added_is_true method method test_json_added_is_true L164–167
+ test_json_exit_zero method method test_json_exit_zero L149–151
+ test_json_has_added_and_path method method test_json_has_added_and_path L158–162
+ test_json_is_object method method test_json_is_object L153–156
+ TestTrustHubListJson class class TestTrustHubListJson L112–140
+ test_json_empty_when_no_fingerprints method method test_json_empty_when_no_fingerprints L125–129
+ test_json_fingerprints_is_dict method method test_json_fingerprints_is_dict L131–134
+ test_json_has_fingerprints_key method method test_json_has_fingerprints_key L119–123
+ test_json_is_object method method test_json_is_object L113–117
+ test_text_hub_list_still_works method method test_text_hub_list_still_works L136–140
+ TestTrustHubResetJson class class TestTrustHubResetJson L201–223
+ test_json_has_hostname_key method method test_json_has_hostname_key L211–216
+ test_json_is_object method method test_json_is_object L218–223
+ test_json_reset_false_when_not_pinned method method test_json_reset_false_when_not_pinned L202–209
+ TestTrustListJson class class TestTrustListJson L65–104
+ test_json_contains_added_dirs method method test_json_contains_added_dirs L84–89
+ test_json_empty_when_no_dirs method method test_json_empty_when_no_dirs L78–82
+ test_json_has_trusted_dirs_key method method test_json_has_trusted_dirs_key L72–76
+ test_json_is_object method method test_json_is_object L66–70
+ test_json_multiple_dirs method method test_json_multiple_dirs L91–97
+ test_text_list_still_works method method test_text_list_still_works L99–104
+ TestTrustRemoveJson class class TestTrustRemoveJson L175–193
+ test_json_has_path_key method method test_json_has_path_key L190–193
+ test_json_removed_false_when_absent method method test_json_removed_false_when_absent L184–188
+ test_json_removed_true_when_present method method test_json_removed_true_when_present L176–182
+ _invoke function function _invoke L38–41
+ _invoke_with_home function function _invoke_with_home L44–57
+ CliRunner import import CliRunner L28–28
+ annotations import import annotations L20–20
+ json import import json L22–22
+ pathlib import import pathlib L23–23
+ pytest import import pytest L26–26
+ mock import import unittest.mock L24–24
+ runner variable variable runner L30–30
~ muse/cli/commands/trust.py .py 2 symbols added, 6 symbols modified
+ _add_json_flag function function _add_json_flag L34–41
+ _json import import _json L30–30
← Older Oldest on task/json-trust
All commits
Newer → Latest on task/json-trust

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:fa019a673e6afb6c394437520c3f8cb12a82383db4d87c7cb7c33bcc47b03939 --body "your comment"