pub struct HarnessAdapter {
pub descriptor: WorkerDescriptor,
pub program: String,
pub build_args: ArgsBuilder,
pub plan_args: Option<ArgsBuilder>,
pub parse: OutputParser,
pub line_mapper: LineMapper,
pub prompt_via_stdin: bool,
pub default_timeout: Duration,
pub provisioner: Option<McpProvisioner>,
}Expand description
A generic harness worker driven over the subprocess-json transport. Each
concrete CLI supplies its program name, argv builder, output parser, and an
optional line mapper for richer streaming.
Fields§
§descriptor: WorkerDescriptor§program: String§build_args: ArgsBuilder§plan_args: Option<ArgsBuilder>Lean argv used when the harness runs as the planner (Role::Planner):
a plain-text completion, not the agentic/streaming work invocation. When
set, planning reads the full stdout as the answer (more robust across CLI
versions than parsing a streaming format). None → planning reuses
build_args and the normal parser unchanged.
parse: OutputParser§line_mapper: LineMapper§prompt_via_stdin: boolWhether the prompt is piped via stdin (vs. passed as an argument).
default_timeout: Duration§provisioner: Option<McpProvisioner>How this harness is told to use a node’s MCP servers (MCP_SKILLS.md §6).
None means the harness has no MCP provisioning wired: a node’s tools are
simply unavailable to it (the node still runs), so the conductor should
prefer an API worker for tool-heavy nodes on such a harness.
Trait Implementations§
Source§impl Worker for HarnessAdapter
impl Worker for HarnessAdapter
Source§fn serves_mcp_tools(&self) -> bool
fn serves_mcp_tools(&self) -> bool
A harness serves MCP tools when it has a provisioner wired (the provision
path, MCP_SKILLS.md §6).
Source§fn descriptor(&self) -> &WorkerDescriptor
fn descriptor(&self) -> &WorkerDescriptor
needs to a concrete worker.Source§fn execute<'life0, 'async_trait>(
&'life0 self,
request: ExecuteRequest,
events: EventSink,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: ExecuteRequest,
events: EventSink,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ExecStatus::Failed).