Executes a provided function within a managed scope, handling session creation, validation, and cleanup.
Type of the result returned by the run function.
Function to execute within the managed scope, receiving clientId and agentName as arguments.
Configuration options for the scope operation including clientId, swarmName, and optional callbacks.
If a session already exists for the clientId.
Executes a provided function within a managed scope, handling session creation, validation, and cleanup.