Skip to main content

wire/answer/
harnesses.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4// Copyright (c) 2026 2youg1 and the sprawling contributors
5
6//! The harness page: each official harness, the command that starts it
7//! as an ACP agent, and whether this machine can run that command
8//! (`crates/wire/spec/Answer/Harnesses.lean` ยง8-52).
9//!
10//! Nothing here is about a credential: the person signs in inside the
11//! harness, and `docs` is where its own vendor says how.
12
13use serde::{Deserialize, Serialize};
14
15/// Every official harness, in the roster's order.
16#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
17#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
18pub struct HarnessesAnswer {
19    pub harnesses: Vec<HarnessLine>,
20}
21
22/// One harness as the page draws it.
23#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
24#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
25pub struct HarnessLine {
26    /// The roster's word for it: `claude_code`, `codex`, `grok_build`,
27    /// `kimi_code` or `pi`.
28    pub name: String,
29    /// The command that starts it as an ACP agent, word by word.
30    pub launch: Vec<String>,
31    /// Whether the command's program is on this machine's search path.
32    pub found: bool,
33    /// Where its vendor says how a person signs in.
34    pub docs: String,
35}