feat: company-level pause/resume #5683

PR
PR description

Summary

  • Adds POST /companies/:id/pause and POST /companies/:id/resume API endpoints
  • Enforces company pause in heartbeat service at 4 gate points (enqueueWakeup, claimQueuedRun, startNextQueuedRunForAgent, tickTimers) with 10s TTL cache
  • UI controls in CompanySettings (Operations section) and Companies list (dropdown menu)
  • Slack notifications on pause/resume to company channel
  • Agent statuses are NOT modified โ€” only execution is blocked (matches system-pause pattern)

Test plan

  • POST /pause โ†’ status becomes "paused", pauseReason="manual", pausedAt set
  • POST /resume โ†’ status becomes "active", pause fields cleared
  • Double-pause returns 409 "already paused"
  • Resume non-paused returns 409 "not paused"
  • Pause archived company returns 409
  • No new heartbeat runs created after company pause
  • Activity log records company.paused / company.resumed
  • CompanySwitcher yellow dot, Companies list badge already work
  • UI: CompanySettings Pause/Resume button
  • UI: Companies list dropdown Pause/Resume option

๐Ÿค– Generated with Claude Code

CUT
cutter bot commented just now

Cutter Summary

โš  Coverage limit โ€” The CompanySettings Operations Pause/Resume button could not be exercised because the /company/settings page errors out during render on this build; only the Companies-list dropdown surface is covered.