Add types for lifecycle events.

A deadlocked server will fail health checks, but the script might still be runnable.