AbstractOptionallogger: ILoggerAbstract ReadonlynameCLI name
Protected ReadonlyloggerProtectedcapacityProtectedinitializedProtected OptionallastProtected OptionalcachedReadonlytransportTransport type
Protected Abstract ReadonlyparserProtected ReadonlytransientTransient-error retry config. Override in subclass to enable.
Gets the capability profile for this CLI.
ProtectedinitInitializes the capacity tracker. Called by subclasses after name is set.
AbstractgetAbstract method for getting model info. Implemented by concrete adapters.
Executes a task with error handling and retries.
Timeout priority (highest to lowest):
Optionaloptions: CliExecutionOptionsPerforms a health check.
Gets CLI version.
Gets current capacity status based on tracked usage. Uses usage-based tracking since CLI subprocess execution doesn't expose HTTP rate limit headers.
ProtectedrecordProtectedparseParses version from CLI output.
ProtectedcheckProtectedgetGets version status message.
ProtectedcreateCreates a CLI error.
Optionalcause: ErrorProtectednormalizeNormalizes CLI response to common format.
Optionalusage: CliTokenUsageOptionalextra: Partial<CliResponse>ProtecteddelayDelays for the specified milliseconds.
Protected AbstractgetGets CLI command and arguments for execution. If stdin is provided, it will be written to the process stdin.
Executes a task via subprocess, with optional transient-error retry.
When transientRetry.enabled is true, transient errors (timeout,
rate_limit, connection, parse) are retried with exponential backoff
(500ms, 1000ms). Parse errors get max 1 retry (#1533); others get 2.
Initializes the adapter and capacity tracker.
Disposes the adapter (no-op for subprocess).
Base class for subprocess-based CLI adapters. Used by ClaudeCliAdapter and GeminiCliAdapter.