pub struct HarnessCapabilities {
pub credential_required: bool,
pub previews_edits: bool,
pub models: Vec<HarnessModel>,
pub allows_custom_model: bool,
pub supports_effort: bool,
pub supports_max_turns: bool,
pub supports_login: bool,
}Expand description
What a harness supports, so every consumer (the picker, the options
panel, the credential preflight, the chat availability gate) adapts
to it declaratively instead of branching on the harness id. A new
adapter that, say, needs a stored key just sets credential_required: true here — no id == "bob" checks to hunt down.
Fields§
§credential_required: boolCompose stores this harness’s credential (bob). When false,
the CLI owns its own login (claude/codex) and Compose runs no
credential/install preflight — a missing login surfaces as the
harness’s own run error rather than a Compose prompt.
previews_edits: boolEmits previewable suggested edits the user approves before they
apply (bob). When false, edits land on disk directly and the
file watcher reflects them (claude/codex).
models: Vec<HarnessModel>Curated model choices for the picker’s selector. Empty → no
curated list (rely on allows_custom_model).
allows_custom_model: boolWhether a free-text model id is accepted beyond models (codex,
whose model names change frequently). Drives a text field vs a
fixed dropdown in the picker.
supports_effort: boolHonors RunTuning::effort (codex reasoning effort).
supports_max_turns: boolHonors RunTuning::max_turns (claude turn cap).
supports_login: boolSupports an interactive Harness::login flow (the CLI’s own
OAuth, e.g. claude auth login / codex login). Drives the
picker’s “Sign in” affordance when installed-but-not-signed-in.
false for harnesses Compose authenticates itself (bob).
Trait Implementations§
Source§impl Clone for HarnessCapabilities
impl Clone for HarnessCapabilities
Source§fn clone(&self) -> HarnessCapabilities
fn clone(&self) -> HarnessCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more