Skip to content

RemoteReplClient

A CLI-profile client. Disposing it leaves caller-provided streams open.

public sealed class RemoteReplClient : IAsyncDisposable

Creates a client over a borrowed duplex stream.

public RemoteReplClient(Stream stream)

Creates a client over borrowed input and output streams.

public RemoteReplClient(Stream input, Stream output)

Reads the exposed command graph.

public Task<RemoteCommandGraph> DescribeAsync(CancellationToken cancellationToken = default)

Task<RemoteCommandGraph>

Reads the peer’s OpenRPC document and checks the CLI profile major version.

public Task<JsonElement> DiscoverAsync(CancellationToken cancellationToken = default)

Task<JsonElement>

Disconnects this client, disposing only a stream created by its named-pipe factory.

public ValueTask DisposeAsync()

ValueTask

ExecuteAsync(RemoteInvocationRequest, CancellationToken)

Section titled “ExecuteAsync(RemoteInvocationRequest, CancellationToken)”

Executes once; a lost response is never retried automatically.

public Task<RemoteExecutionResult> ExecuteAsync(RemoteInvocationRequest request, CancellationToken cancellationToken = default)

Task<RemoteExecutionResult>

OpenTerminalAsync(RemoteTerminalOptions?, CancellationToken)

Section titled “OpenTerminalAsync(RemoteTerminalOptions?, CancellationToken)”

Opens a terminal; consume its output until completion.

public Task<RemoteTerminal> OpenTerminalAsync(RemoteTerminalOptions? options = null, CancellationToken cancellationToken = default)

Task<RemoteTerminal>