feat(detect-refactor): supercharge for agent usability
- Add from typing import Any, TypedDict + from muse.core.timing import start_timer - Add _RefactorOutputJson TypedDict documenting all JSON envelope fields - Add -j alias for --json in register() - Add elapsed = start_timer() at top of run() - Add exit_code=0 and duration_ms=elapsed() to the JSON emit - Expand run() docstring with JSON envelope section (exit_code, duration_ms) - Add tests/test_detect_refactor_supercharge.py: 38 tests across 7 classes (TestJsonAlias, TestDurationMs, TestExitCode, TestTypedDicts, TestDocstrings, TestAnsiSanitization, TestPerformance)
sha256:0dc6504f25fe9216fb2e0425462cc87a63651776e915bf2020d96bff6c1e1a73
sha
+59
~2
symbols
sha256:c265ff6879f8da499628c1f557300503f5b7e97c9182ed9e046d827760d832d0
snapshot
+59
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
61 symbols
+
test_json_output_no_ansi_with_kind_filter
method
method test_json_output_no_ansi_with_kind_filter L311–315
+
test_run_docstring_mentions_duration_ms
method
method test_run_docstring_mentions_duration_ms L289–292
+
test_run_docstring_mentions_exit_code
method
method test_run_docstring_mentions_exit_code L284–287
+
test_j_alias_event_count_matches_json_flag
method
method test_j_alias_event_count_matches_json_flag L137–142
+
test_j_alias_same_top_level_keys_as_json_flag
method
method test_j_alias_same_top_level_keys_as_json_flag L126–135
+
test_refactor_output_json_typeddict_exists
method
method test_refactor_output_json_typeddict_exists L248–249
+
test_retains_commits_scanned_annotation
method
method test_retains_commits_scanned_annotation L267–269
+
test_retains_schema_version_annotation
method
method test_retains_schema_version_annotation L259–261
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:0dc6504f25fe9216fb2e0425462cc87a63651776e915bf2020d96bff6c1e1a73 --body "your comment"
No comments yet. Be the first to start the discussion.