tools.bot_control module

Remote bot control tools — restart, status, git pull + deploy.

╔═══════════════════════════════════════════════════════════════════════════════╗ ║ 🎮 BOT CONTROL TOOLS ║ ╠═══════════════════════════════════════════════════════════════════════════════╣ ║ bot_status — Process uptime, memory, tool count, connections ║ ║ bot_restart — systemctl restart of the whole fleet (Redis timelock) ║ ║ bot_pull_and_restart — git pull + systemctl restart of the whole fleet ║ ╠═══════════════════════════════════════════════════════════════════════════════╣ ║ SECURITY: Requires UNSANDBOXED_EXEC privilege (bit 2) ║ ╚═══════════════════════════════════════════════════════════════════════════════╝

async tools.bot_control.dispatch_durable_fleet_restart(*, payload, intent_id)

Idempotently hand a fleet restart to a stable systemd transient unit.

systemd-run owns the actual restart after this process returns. The transient unit name is derived from the durable intent id and remains loaded after success, so recovery after an accepted-but-unreceipted dispatch observes the same unit instead of scheduling a second restart.

Return type:

dict

Parameters: