The connection_guard.py module#

Summary#

require_connected_result

Surface missing-session errors before an aggregator discards their code.

with_connection_recovery

Normalize missing-session errors without forbidding offline operations.

Description#

Server-owned recovery for every registered tool’s no-session outcome.

Module detail#

connection_guard.require_connected_result(result)#

Surface missing-session errors before an aggregator discards their code.

connection_guard.with_connection_recovery(function, recover)#

Normalize missing-session errors without forbidding offline operations.

recover belongs to the registering server, which knows its actual connect arguments and owning product. This applies independently of the optional host contract and preserves already complete recovery responses.