Find chats that appear stuck and need recovery: 1. Running chats whose heartbeat has expired (worker crash). 2. requires_action chats past the timeout threshold (client disappeared). 3. Waiting chats with a non-empty queue and stale updated_at (deferred-promote stranding when the worker dies before
(ctx context.Context, staleThreshold time.Time)
| 663 | // (deferred-promote stranding when the worker dies before its |
| 664 | // post-cancel cleanup runs). |
| 665 | GetStaleChats(ctx context.Context, staleThreshold time.Time) ([]Chat, error) |
| 666 | GetTailnetPeers(ctx context.Context, id uuid.UUID) ([]TailnetPeer, error) |
| 667 | GetTailnetTunnelPeerBindingsBatch(ctx context.Context, ids []uuid.UUID) ([]GetTailnetTunnelPeerBindingsBatchRow, error) |
| 668 | GetTailnetTunnelPeerIDsBatch(ctx context.Context, ids []uuid.UUID) ([]GetTailnetTunnelPeerIDsBatchRow, error) |
no outgoing calls