feat(hooks): add managed hooks
Closed
VI
6mo ago+282+282+012345678901234567890123456789-4-4-0123456789
Summary
Adds a managed-policy control for lifecycle hooks and surfaces a startup warning when hooks are loaded.
Changes
- Add
allow_managed_hooks_only/allowManagedHooksOnlyto config requirements and app-server protocol surfaces. - Apply the new requirement to
requirements.toml, MDM-managedrequirements_toml_base64, and cloud requirements; legacymanaged_config.tomlremains limited toapproval_policyandsandbox_mode. - Skip non-managed
hooks.jsonfiles when the managed-only requirement is enabled. - Emit a startup warning that hooks run arbitrary shell commands outside the sandbox and list the loaded
hooks.jsonfiles. - Show the new requirement in TUI debug config output and document it in
docs/config.md.
Why
Hooks are privileged by design and run outside the sandbox. This makes that behavior explicit at startup and gives admins a lockdown option that still allows managed hooks.