CliServerAiChannel class final

A connected CLI-server endpoint, reduced to the one operation the AI adapter needs.

Constructors

CliServerAiChannel({required String transportId, required VSCodeBridgeClient client})

Properties

client → VSCodeBridgeClient
The JSON-RPC client. Owned by this channel: close disconnects it.
final
hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
Whether the underlying socket is connected.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transportId → String
The transport id reported in errors raised from this channel.
final

Methods

close() → Future<void>
Disconnects, waiting at most closeBound. Idempotent.
complete(AgentSdkCompletionRequest request) → Stream<AgentSdkCompletionEvent>
Runs one completion, mapping SDKMessages to AgentSdkCompletionEvents through an SdkTrailTranslator: the far end's start, thinking and text as they stream, each tool call and its result, every announced retry, and the result's usage and end. Everything else the far end sends is AgentSdkLiveness; the provider's gap bound counts it as evidence of life, so a model thinking for two minutes before its first token is never mistaken for one that has died.
connect() → Future<void>
Connects the socket, translating failure into the seam's error type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

debugMessageTap ↔ void Function(String transportId, Map<String, dynamic> raw)?
Sees every Agent SDK message every channel receives, before translation, with the id of the transport it arrived on.
getter/setter pair

Constants

closeBound → const Duration
How long close waits for the socket to finish closing.