AgentResult

sealed interface AgentResult<out T>(source)

Result of an AgentProvider callback.

Provider failures are values rather than thrown exceptions so an agent backend failure cannot terminate the SSH connection's packet loop.

Inheritors

Types

Link copied to clipboard
data class Failure(val message: String, val cause: Throwable? = null) : AgentResult<Nothing>

The provider could not complete the request.

Link copied to clipboard
data class Success<T>(val value: T) : AgentResult<T>

The provider completed successfully with value.