feat(cat): supercharge for agents — -j alias, exit_code, _CatOutputJson TypedDict
- Add -j alias to --json (--format json) - Add _CatOutputJson TypedDict documenting the full JSON envelope - Add exit_code to JSON output (0=success, 1=any error present) - Update run() docstring with exit_code and duration_ms documentation - Extend test_cat_supercharge.py with 27 new tests: TestJsonAlias, TestExitCode, TestTypedDicts, TestDocstrings, TestAnsiSanitization - All 104 cat tests pass (77 existing + 27 new)
sha256:5cd5818a2d8e51ae53e2937faa3eadaafbac12350ce248987c9e0ba3d188d644
sha
+33
~2
symbols
sha256:e5ebfcbae53783f47e150617b7cf51d30c23ff90b50b6db62f7b9661e6e9d1f9
snapshot
+33
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
35 symbols
+
test_run_docstring_mentions_duration_ms
method
method test_run_docstring_mentions_duration_ms L608–611
+
test_run_docstring_mentions_exit_code
method
method test_run_docstring_mentions_exit_code L603–606
+
test_exit_code_mirrors_process_exit_on_error
method
method test_exit_code_mirrors_process_exit_on_error L545–548
+
test_exit_code_mirrors_process_exit_on_success
method
method test_exit_code_mirrors_process_exit_on_success L534–537
+
test_exit_code_nonzero_on_symbol_not_found
method
method test_exit_code_nonzero_on_symbol_not_found L539–543
+
test_j_alias_same_top_level_keys_as_json_flag
method
method test_j_alias_same_top_level_keys_as_json_flag L489–496
+
test_cat_output_json_has_duration_ms_annotation
method
method test_cat_output_json_has_duration_ms_annotation L572–574
+
test_cat_output_json_has_errors_annotation
method
method test_cat_output_json_has_errors_annotation L580–582
+
test_cat_output_json_has_exit_code_annotation
method
method test_cat_output_json_has_exit_code_annotation L568–570
+
test_cat_output_json_has_results_annotation
method
method test_cat_output_json_has_results_annotation L576–578
+
test_cat_output_json_has_source_ref_annotation
method
method test_cat_output_json_has_source_ref_annotation L584–586
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:5cd5818a2d8e51ae53e2937faa3eadaafbac12350ce248987c9e0ba3d188d644 --body "your comment"
No comments yet. Be the first to start the discussion.