feat(cli): wire up ACMS context sub-app to main CLI entry point

The ACMS context CLI commands ('context show' / 'context clear') were fully
implemented in 'acms_context.py' with comprehensive tests, mocks, benchmarks,
and documentation — but the module was never imported or registered in
'cli/main.py'. This commit wires up the 'acms_context.app' Typer sub-app
so that 'agents acms context show' and 'agents acms context clear' are
actually accessible from the CLI.

Changes:
- Import acms_context in _register_subcommands()
- Register acms_context.app as the 'acms' sub-app on the main Typer app
- Add 'acms' to valid_cmds list in main() for fast-path validation
- Add 'acms context' entry to _print_basic_help() output
- Minor formatting cleanup applied by ruff

ISSUES CLOSED: #9586
Refs: #9675
This commit is contained in:
2026-04-30 03:41:52 +00:00
committed by Forgejo
parent c65a0726a8
commit ea25627051
4 changed files with 22 additions and 30 deletions
+2 -6
View File
@@ -152,9 +152,7 @@ def _cmd_context_show_empty() -> int:
print(f"acms-fail: context show empty exited with code {exit_code}")
return 1
if "No context found for view: empty_view" not in output:
print(
f"acms-fail: expected 'No context found for view' in output\n{output}"
)
print(f"acms-fail: expected 'No context found for view' in output\n{output}")
return 1
print("acms-context-show-empty-ok")
return 0
@@ -238,9 +236,7 @@ def _cmd_context_clear_no_match() -> int:
print(f"acms-fail: context clear no-match exited with code {exit_code}")
return 1
if "No context entries match the specified filters" not in output:
print(
f"acms-fail: expected 'No context entries match' in output\n{output}"
)
print(f"acms-fail: expected 'No context entries match' in output\n{output}")
return 1
print("acms-context-clear-no-match-ok")
return 0