#[non_exhaustive]pub enum Transport {
Default,
Stdio,
InProcess,
Tcp {
port: u16,
connection_token: Option<String>,
},
External {
host: String,
port: u16,
connection_token: Option<String>,
},
}Expand description
How the SDK communicates with the CLI server.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Default
Resolve the transport from COPILOT_SDK_DEFAULT_CONNECTION, falling
back to Transport::Stdio when the variable is unset.
Stdio
Communicate over stdin/stdout pipes (default).
InProcess
Host the runtime in-process over FFI (no child process).
Loads the native runtime library and speaks JSON-RPC over its C ABI.
This is experimental. Per-client ClientOptions::program,
ClientOptions::extra_args, ClientOptions::working_directory,
ClientOptions::env/ClientOptions::env_remove,
and ClientOptions::telemetry are not supported because native
runtime code shares the host process. Typed runtime options such as
authentication, log level, and ClientOptions::base_directory remain
supported.
Requires the bundled-in-process Cargo feature.
Tcp
Spawn the CLI with --port and connect via TCP.
Fields
External
Connect to an already-running CLI server (no process spawning).