gabriel / muse public
feat patch dev
AI Agent gabriel · 157 days ago · Apr 19, 2026 · Diff

feat: supercharge muse agent, agent-config, and agent-map

- Add _ListJson TypedDict to agent.py; add schema_version/exit_code/duration_ms to _KeygenJson and _RegisterJson - Wire start_timer() in run_keygen, run_list, run_register; inject envelope fields - Add -j alias to keygen, list, register subcommands - Expand run_keygen, run_list, run_register, register() docstrings - Add six TypedDicts to agent_config.py: _InitJson, _SyncJson, _ReadJson, _StatusJson, _InspectJson, _SetJson — each with schema_version/exit_code/duration_ms - Wire start_timer() in all six agent-config handlers; inject envelope into JSON paths - Add _AgentMapJson TypedDict to agent_map.py with full envelope fields - Add -j alias to agent-map --json flag; wire start_timer() in run() - Add tests/test_agent_supercharge.py: 139 tests across 7 tiers (unit, integration, e2e, stress, data integrity, security, performance) — all passing

sha256:01b544ab9feddd618f4d208285a69303b34d03b6552faae1efa8e95f1162d365 sha
+187 ~14 symbols
sha256:b524666d2c0ca362d155b55e1753d704ef82f44ab43a0297433bb4ec471f458f snapshot
+187
symbols added
~14
symbols modified
0
dead code introduced
Semantic Changes 201 symbols
~ tests/test_agent_supercharge.py .py 173 symbols added
+ TestAliasRegistration class class TestAliasRegistration L506–565
+ _build_agent_parser method method _build_agent_parser L509–514
+ test_agent_keygen_j_alias_parses method method test_agent_keygen_j_alias_parses L516–519
+ test_agent_keygen_json_flag_still_works method method test_agent_keygen_json_flag_still_works L546–549
+ test_agent_list_j_alias_parses method method test_agent_list_j_alias_parses L521–524
+ test_agent_list_json_flag_still_works method method test_agent_list_json_flag_still_works L551–554
+ test_agent_map_j_alias_registered method method test_agent_map_j_alias_registered L537–544
+ test_agent_register_j_alias_parses method method test_agent_register_j_alias_parses L526–535
+ test_agent_register_json_flag_still_works method method test_agent_register_json_flag_still_works L556–565
+ TestDataIntegrity class class TestDataIntegrity L866–920
+ test_agent_config_init_duration_ms_is_float method method test_agent_config_init_duration_ms_is_float L906–909
+ test_agent_config_init_exit_code_is_int method method test_agent_config_init_exit_code_is_int L901–904
+ test_agent_config_init_schema_version_is_str method method test_agent_config_init_schema_version_is_str L895–899
+ test_agent_config_status_exit_code_mirrors_process method method test_agent_config_status_exit_code_mirrors_process L911–915
+ test_agent_list_duration_ms_is_float method method test_agent_list_duration_ms_is_float L880–883
+ test_agent_list_duration_ms_nonnegative method method test_agent_list_duration_ms_nonnegative L890–893
+ test_agent_list_exit_code_is_int method method test_agent_list_exit_code_is_int L875–878
+ test_agent_list_schema_version_is_str method method test_agent_list_schema_version_is_str L869–873
+ test_agent_list_schema_version_nonempty method method test_agent_list_schema_version_nonempty L917–920
+ test_agent_list_slots_is_list method method test_agent_list_slots_is_list L885–888
+ TestDocstrings class class TestDocstrings L573–604
+ test_register_docstring_mentions_j_alias method method test_register_docstring_mentions_j_alias L591–594
+ test_run_keygen_docstring_mentions_duration_ms method method test_run_keygen_docstring_mentions_duration_ms L601–604
+ test_run_keygen_docstring_mentions_schema_version method method test_run_keygen_docstring_mentions_schema_version L576–579
+ test_run_list_docstring_mentions_duration_ms method method test_run_list_docstring_mentions_duration_ms L596–599
+ test_run_list_docstring_mentions_schema_version method method test_run_list_docstring_mentions_schema_version L581–584
+ test_run_register_docstring_mentions_schema_version method method test_run_register_docstring_mentions_schema_version L586–589
+ TestEndToEnd class class TestEndToEnd L612–795
+ test_agent_config_init_j_exits_zero method method test_agent_config_init_j_exits_zero L668–670
+ test_agent_config_init_j_has_duration_ms method method test_agent_config_init_j_has_duration_ms L688–691
+ test_agent_config_init_j_has_exit_code method method test_agent_config_init_j_has_exit_code L683–686
+ test_agent_config_init_j_has_schema_version method method test_agent_config_init_j_has_schema_version L677–681
+ test_agent_config_init_j_valid_json method method test_agent_config_init_j_valid_json L672–675
+ test_agent_config_inspect_j_exits_zero method method test_agent_config_inspect_j_exits_zero L721–724
+ test_agent_config_inspect_j_has_duration_ms method method test_agent_config_inspect_j_has_duration_ms L739–743
+ test_agent_config_inspect_j_has_exit_code method method test_agent_config_inspect_j_has_exit_code L733–737
+ test_agent_config_inspect_j_has_schema_version method method test_agent_config_inspect_j_has_schema_version L726–731
+ test_agent_config_read_j_exits_zero method method test_agent_config_read_j_exits_zero L747–750
+ test_agent_config_read_j_has_duration_ms method method test_agent_config_read_j_has_duration_ms L765–769
+ test_agent_config_read_j_has_exit_code method method test_agent_config_read_j_has_exit_code L759–763
+ test_agent_config_read_j_has_schema_version method method test_agent_config_read_j_has_schema_version L752–757
+ test_agent_config_status_j_exits_zero method method test_agent_config_status_j_exits_zero L695–698
+ test_agent_config_status_j_has_duration_ms method method test_agent_config_status_j_has_duration_ms L713–717
+ test_agent_config_status_j_has_exit_code method method test_agent_config_status_j_has_exit_code L707–711
+ test_agent_config_status_j_has_schema_version method method test_agent_config_status_j_has_schema_version L700–705
+ test_agent_config_sync_j_exits_zero method method test_agent_config_sync_j_exits_zero L773–776
+ test_agent_config_sync_j_has_duration_ms method method test_agent_config_sync_j_has_duration_ms L791–795
+ test_agent_config_sync_j_has_exit_code method method test_agent_config_sync_j_has_exit_code L785–789
+ test_agent_config_sync_j_has_schema_version method method test_agent_config_sync_j_has_schema_version L778–783
+ test_agent_list_j_exit_code_matches_process method method test_agent_list_j_exit_code_matches_process L652–655
+ test_agent_list_j_exits_zero method method test_agent_list_j_exits_zero L617–619
+ test_agent_list_j_has_duration_ms method method test_agent_list_j_has_duration_ms L637–640
+ test_agent_list_j_has_exit_code method method test_agent_list_j_has_exit_code L632–635
+ test_agent_list_j_has_schema_version method method test_agent_list_j_has_schema_version L626–630
+ test_agent_list_j_has_slots method method test_agent_list_j_has_slots L642–645
+ test_agent_list_j_slots_is_list method method test_agent_list_j_slots_is_list L647–650
+ test_agent_list_j_valid_json method method test_agent_list_j_valid_json L621–624
+ test_agent_list_json_flag_same_as_j method method test_agent_list_json_flag_same_as_j L657–664
+ TestPerformance class class TestPerformance L1023–1061
+ test_agent_config_status_completes_quickly method method test_agent_config_status_completes_quickly L1035–1041
+ test_agent_list_completes_quickly method method test_agent_list_completes_quickly L1043–1048
+ test_duration_ms_in_agent_config_init_is_plausible method method test_duration_ms_in_agent_config_init_is_plausible L1057–1061
+ test_duration_ms_in_list_output_is_plausible method method test_duration_ms_in_list_output_is_plausible L1050–1055
+ test_fingerprint_1000_under_500ms method method test_fingerprint_1000_under_500ms L1026–1033
+ TestSecurity class class TestSecurity L928–1015
+ test_agent_list_with_encoded_url_returns_json method method test_agent_list_with_encoded_url_returns_json L1009–1015
+ test_hostile_hub_url_in_emit_error_json method method test_hostile_hub_url_in_emit_error_json L931–946
+ test_newline_in_error_message_survives_json method method test_newline_in_error_message_survives_json L993–1007
+ test_null_bytes_in_fingerprint_input method method test_null_bytes_in_fingerprint_input L987–991
+ test_sql_injection_in_slot_name method method test_sql_injection_in_slot_name L948–953
+ test_unicode_in_track_path_emit_error method method test_unicode_in_track_path_emit_error L955–969
+ test_very_long_account_name_in_emit_error method method test_very_long_account_name_in_emit_error L971–985
+ TestStress class class TestStress L803–858
+ test_agent_config_status_50_times method method test_agent_config_status_50_times L828–834
+ test_emit_error_json_500_calls method method test_emit_error_json_500_calls L812–826
+ test_fingerprint_1000_calls_no_crash method method test_fingerprint_1000_calls_no_crash L806–810
+ test_fingerprint_thread_safety method method test_fingerprint_thread_safety L836–858
+ TestTypedDictAgent class class TestTypedDictAgent L137–205
+ test_keygen_json_existing_fields_preserved method method test_keygen_json_existing_fields_preserved L154–159
+ test_keygen_json_has_duration_ms method method test_keygen_json_has_duration_ms L150–152
+ test_keygen_json_has_exit_code method method test_keygen_json_has_exit_code L146–148
+ test_keygen_json_has_schema_version method method test_keygen_json_has_schema_version L142–144
+ test_list_json_exists method method test_list_json_exists L183–185
+ test_list_json_has_duration_ms method method test_list_json_has_duration_ms L195–197
+ test_list_json_has_exit_code method method test_list_json_has_exit_code L191–193
+ test_list_json_has_mode_field method method test_list_json_has_mode_field L203–205
+ test_list_json_has_schema_version method method test_list_json_has_schema_version L187–189
+ test_list_json_has_slots_field method method test_list_json_has_slots_field L199–201
+ test_register_json_existing_fields_preserved method method test_register_json_existing_fields_preserved L175–179
+ test_register_json_has_duration_ms method method test_register_json_has_duration_ms L171–173
+ test_register_json_has_exit_code method method test_register_json_has_exit_code L167–169
+ test_register_json_has_schema_version method method test_register_json_has_schema_version L163–165
+ TestTypedDictAgentConfig class class TestTypedDictAgentConfig L213–340
+ test_init_json_exists method method test_init_json_exists L218–219
+ test_init_json_has_duration_ms method method test_init_json_has_duration_ms L229–231
+ test_init_json_has_exit_code method method test_init_json_has_exit_code L225–227
+ test_init_json_has_path_field method method test_init_json_has_path_field L233–235
+ test_init_json_has_schema_version method method test_init_json_has_schema_version L221–223
+ test_inspect_json_exists method method test_inspect_json_exists L302–303
+ test_inspect_json_has_context_field method method test_inspect_json_has_context_field L317–319
+ test_inspect_json_has_duration_ms method method test_inspect_json_has_duration_ms L313–315
+ test_inspect_json_has_exit_code method method test_inspect_json_has_exit_code L309–311
+ test_inspect_json_has_schema_version method method test_inspect_json_has_schema_version L305–307
+ test_read_json_exists method method test_read_json_exists L260–261
+ test_read_json_has_content_field method method test_read_json_has_content_field L275–277
+ test_read_json_has_duration_ms method method test_read_json_has_duration_ms L271–273
+ test_read_json_has_exit_code method method test_read_json_has_exit_code L267–269
+ test_read_json_has_schema_version method method test_read_json_has_schema_version L263–265
+ test_set_json_exists method method test_set_json_exists L323–324
+ test_set_json_has_adapters_field method method test_set_json_has_adapters_field L338–340
+ test_set_json_has_duration_ms method method test_set_json_has_duration_ms L334–336
+ test_set_json_has_exit_code method method test_set_json_has_exit_code L330–332
+ test_set_json_has_schema_version method method test_set_json_has_schema_version L326–328
+ test_status_json_exists method method test_status_json_exists L281–282
+ test_status_json_has_duration_ms method method test_status_json_has_duration_ms L292–294
+ test_status_json_has_exit_code method method test_status_json_has_exit_code L288–290
+ test_status_json_has_ready_field method method test_status_json_has_ready_field L296–298
+ test_status_json_has_schema_version method method test_status_json_has_schema_version L284–286
+ test_sync_json_exists method method test_sync_json_exists L239–240
+ test_sync_json_has_adapters_field method method test_sync_json_has_adapters_field L254–256
+ test_sync_json_has_duration_ms method method test_sync_json_has_duration_ms L250–252
+ test_sync_json_has_exit_code method method test_sync_json_has_exit_code L246–248
+ test_sync_json_has_schema_version method method test_sync_json_has_schema_version L242–244
+ TestTypedDictAgentMap class class TestTypedDictAgentMap L348–382
+ test_agent_map_json_exists method method test_agent_map_json_exists L351–352
+ test_agent_map_json_has_attributions method method test_agent_map_json_has_attributions L374–376
+ test_agent_map_json_has_duration_ms method method test_agent_map_json_has_duration_ms L362–364
+ test_agent_map_json_has_exit_code method method test_agent_map_json_has_exit_code L358–360
+ test_agent_map_json_has_mode method method test_agent_map_json_has_mode L366–368
+ test_agent_map_json_has_schema_version method method test_agent_map_json_has_schema_version L354–356
+ test_agent_map_json_has_track method method test_agent_map_json_has_track L370–372
+ test_bar_attribution_existing_fields_preserved method method test_bar_attribution_existing_fields_preserved L378–382
+ TestUnitEmitError class class TestUnitEmitError L435–498
+ _capture_emit_error method method _capture_emit_error L438–454
+ test_human_mode_exits_1 method method test_human_mode_exits_1 L492–494
+ test_human_mode_stdout_empty method method test_human_mode_stdout_empty L496–498
+ test_human_mode_writes_to_stderr method method test_human_mode_writes_to_stderr L488–490
+ test_json_mode_error_value_correct method method test_json_mode_error_value_correct L474–477
+ test_json_mode_exits_1 method method test_json_mode_exits_1 L484–486
+ test_json_mode_has_error_key method method test_json_mode_has_error_key L464–467
+ test_json_mode_has_message_key method method test_json_mode_has_message_key L469–472
+ test_json_mode_message_value_correct method method test_json_mode_message_value_correct L479–482
+ test_json_mode_valid_json method method test_json_mode_valid_json L460–462
+ test_json_mode_writes_to_stdout method method test_json_mode_writes_to_stdout L456–458
+ TestUnitFingerprint class class TestUnitFingerprint L390–432
+ test_deterministic method method test_deterministic L418–421
+ test_different_inputs_differ method method test_different_inputs_differ L414–416
+ test_empty_bytes method method test_empty_bytes L409–412
+ test_hex_length_is_64 method method test_hex_length_is_64 L405–407
+ test_known_input method method test_known_input L393–397
+ test_matches_hashlib_directly method method test_matches_hashlib_directly L429–432
+ test_returns_hex_string method method test_returns_hex_string L399–403
+ test_single_byte_inputs method method test_single_byte_inputs L423–427
+ _TEST_HUB variable variable _TEST_HUB L60–60
+ _TEST_MNEMONIC variable variable _TEST_MNEMONIC L61–64
+ _invoke function function _invoke L71–78
+ cfg_repo function function cfg_repo L87–96
+ identity_repo function function identity_repo L100–129
+ CliRunner import import CliRunner L52–52
+ InvokeResult import import InvokeResult L52–52
+ annotations import import annotations L37–37
+ argparse import import argparse L39–39
+ get_type_hints import import get_type_hints L48–48
+ hashlib import import hashlib L40–40
+ io import import io L41–41
+ json import import json L42–42
+ os import import os L43–43
+ pathlib import import pathlib L44–44
+ pytest import import pytest L50–50
+ sys import import sys L45–45
+ threading import import threading L46–46
+ time import import time L47–47
+ runner variable variable runner L54–54
~ muse/cli/commands/agent.py .py 3 symbols added, 6 symbols modified
+ _ListJson class class _ListJson L139–146
+ __version__ import import __version__ L96–96
+ start_timer import import start_timer L99–99
~ muse/cli/commands/agent_config.py .py 8 symbols added, 6 symbols modified
+ _InitJson class class _InitJson L129–137
+ _InspectJson class class _InspectJson L175–187
+ _ReadJson class class _ReadJson L149–157
+ _SetJson class class _SetJson L190–197
+ _StatusJson class class _StatusJson L160–172
+ _SyncJson class class _SyncJson L140–146
+ __version__ import import __version__ L63–63
+ start_timer import import start_timer L66–66
~ muse/cli/commands/agent_map.py .py 3 symbols added, 2 symbols modified
+ _AgentMapJson class class _AgentMapJson L63–71
+ __version__ import import __version__ L37–37
+ start_timer import import start_timer L41–41
~ run
← Older Oldest on dev
All commits
Newer → Latest on dev

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:01b544ab9feddd618f4d208285a69303b34d03b6552faae1efa8e95f1162d365 --body "your comment"