- seedgo: new check_introspection_rich_formatting (delegation-aware) + introspection.md richness section + tests - 13 branches: wrap print_introspection in Rich markup -> all at seedgo 100% - S202 CLI polish: @hooks --help rewrite (hooksound on/off/status surfaced), spawn repair help clarity, drone Rich colour restore for --help/introspection/status - flow: playbook plan-type (PPLAN) self-serve templates (default.md, sunday_merge.md SOP) + register-overrides-auto fix + --help rewrite - hooks: setup.sh installs auto_process bridges + seedgo snapshot fixture learns them (TDPLAN-0005 followup, clears commit-gate blocker) - remove orphaned devpulse/SETUP.md (vectorized to @memory) - CHANGELOG [2026.W23]
61 lines
1.9 KiB
Python
61 lines
1.9 KiB
Python
# =================== AIPass ====================
|
|
# Name: hooksound.py
|
|
# Version: 1.0.0
|
|
# Description: Hook sound control — mute/unmute all hook audio
|
|
# Branch: hooks
|
|
# Layer: apps/modules
|
|
# Created: 2026-05-22
|
|
# Modified: 2026-05-22
|
|
# =============================================
|
|
|
|
"""Hook sound control — mute and unmute all hook audio via drone @hooks hooksound."""
|
|
|
|
from aipass.cli.apps.modules import err_console
|
|
from aipass.hooks.apps.sound import MUTE_FLAG, is_muted
|
|
from aipass.prax.apps.modules.logger import system_logger as logger # noqa: F401
|
|
|
|
CONSOLE = err_console
|
|
|
|
HELP_COMMANDS = [
|
|
("hooksound on", "Unmute all hook sounds"),
|
|
("hooksound off", "Mute all hook sounds"),
|
|
("hooksound", "Show current sound status"),
|
|
]
|
|
|
|
|
|
def print_introspection():
|
|
"""Print module structure for drone routing."""
|
|
status = "MUTED" if is_muted() else "ACTIVE"
|
|
CONSOLE.print(f"[bold cyan]hooksound[/bold cyan] — Hook sound control ({status})")
|
|
|
|
|
|
def handle_command(command: str, args: list) -> bool:
|
|
"""Route hooksound commands from drone @hooks."""
|
|
if command == "hooksound":
|
|
if not args:
|
|
print_introspection()
|
|
return True
|
|
|
|
sub = args[0]
|
|
|
|
if sub in ("--help", "-h", "help"):
|
|
CONSOLE.print("[bold cyan]hooksound[/bold cyan] — Mute/unmute all hook audio")
|
|
CONSOLE.print()
|
|
CONSOLE.print(" drone @hooks hooksound Show current status")
|
|
CONSOLE.print(" drone @hooks hooksound on Unmute all hook sounds")
|
|
CONSOLE.print(" drone @hooks hooksound off Mute all hook sounds")
|
|
return True
|
|
|
|
if sub == "off":
|
|
MUTE_FLAG.touch()
|
|
CONSOLE.print("[yellow]Hook sounds MUTED[/yellow]")
|
|
return True
|
|
|
|
if sub == "on":
|
|
if MUTE_FLAG.exists():
|
|
MUTE_FLAG.unlink()
|
|
CONSOLE.print("[green]Hook sounds ACTIVE[/green]")
|
|
return True
|
|
|
|
return False
|