CopilotClientOptions class

Options for creating a CopilotClient.

Constructors

CopilotClientOptions({String? cliPath, List<String> cliArgs = const [], String? cwd, int port = 0, bool useStdio = true, String? cliUrl, LogLevel? logLevel, bool autoStart = true, bool autoRestart = true, Map<String, String>? env, String? githubToken, bool? useLoggedInUser, void log(String message)?, List<Tool> tools = const [], SessionHooks? hooks, PermissionHandler? onPermissionRequest, UserInputHandler? onUserInputRequest})
const

Properties

autoRestart bool
Auto-restart the CLI server if it crashes.
final
autoStart bool
Auto-start the CLI server on first use.
final
cliArgs List<String>
Extra arguments to pass to the CLI executable.
final
cliPath String?
Path to the CLI executable. If null, searches PATH for 'copilot'.
final
cliUrl String?
URL of an existing CLI server to connect to (e.g., "localhost:8080"). When set, the client does not spawn a CLI process.
final
cwd String?
Working directory for the CLI process.
final
env Map<String, String>?
Environment variables for the CLI process.
final
githubToken String?
GitHub token for authentication.
final
hashCode int
The hash code for this object.
no setterinherited
hooks SessionHooks?
Client-level hooks. Used as fallback when session hooks are not provided.
final
log → void Function(String message)?
Optional log callback for SDK diagnostic messages.
final
logLevel LogLevel?
Log level for the CLI server.
final
onPermissionRequest PermissionHandler?
Client-level permission handler. Used as fallback when session config does not provide one.
final
onUserInputRequest UserInputHandler?
Client-level user input handler. Used as fallback when session config does not provide one.
final
port int
Port for the CLI server (TCP mode only). 0 = random available port.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tools List<Tool>
Client-level tools available to all sessions.
final
useLoggedInUser bool?
Whether to use the logged-in user for authentication.
final
useStdio bool
Use stdio transport instead of TCP.
final

Methods

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