cancelOutput

declare function cancelOutput(clientId: string, agentName: string): Promise<void>;

Cancels the awaited output for a specific client and agent by emitting an empty string. Validates the agent, session, and swarm, ensuring the current agent matches the provided agent before cancellation. Runs within a beginContext wrapper for execution context management, logging operations via LoggerService. Integrates with AgentValidationService (agent validation), SessionValidationService (session and swarm retrieval), SwarmValidationService (swarm validation), and SwarmPublicService (agent retrieval and output cancellation).

Parameter Description
clientId The ID of the client whose output is to be canceled, validated against active sessions.
agentName The name of the agent for which the output is canceled, validated against registered agents.