actions/connection_closer.ts view source
ConnectionCloser Narrow capability — three idempotent socket-close methods, each returning the number of sockets actually closed (zero when none matched). Callers typically ignore the return value (used by telemetry / tests).
close_sockets_for_session
Close every connection authenticated with a session whose blake3
hash matches session_token_hash. Idempotent — calling on an
already-closed session is a no-op.
(session_token_hash: string) => numberclose_sockets_for_token
Close every connection authenticated with the given API token id. Idempotent — calling on an already-revoked token is a no-op.
(api_token_id: string) => numberclose_sockets_for_account
Close every connection bound to account_id, regardless of
credential type (session / api_token / daemon_token). Coarse
closure used when every credential on an account is invalidated
— password change, session-revoke-all, token-revoke-all, logout.
Idempotent.
(account_id: string) => number