/api/ai/chat admits every signed-in user, and API tokens that hold only
ai:chat. Nothing tied the caller's role to the tools the model could
call, so a viewer could ask the Assistant to read files, logs or command
output on any agent with commands enabled. Those commands run as the
agent's user, root by default.
Assistant invocations that run a command on a host now carry a
HostCommand class: every pulse_read subaction, pulse_kubernetes logs,
pulse_docker check_updates, and the fail-closed class. The chat route
binds the caller's action-execute capability, the same rule the Actions
routes use (instance admin or admin proxy role under the default
authorizer, the RBAC grant otherwise, and an execute scope for API
tokens). Without it the registry drops those tools from the manifest,
refuses a fabricated call before its handler, and the prompt tells the
model why, so it can explain the limit to the user.
Viewers keep the Assistant for Pulse's own data. Patrol and other system
runs bind no caller and are unchanged.