pub enum Runner {
WsOperator {
variant: String,
tools: Vec<String>,
},
WsClaudeCode {
variant: String,
tools: Vec<String>,
},
AgentBlockInProcess {
tools: Vec<String>,
},
Subprocess {
template: String,
overrides: SubprocessOverrides,
},
}Expand description
The execution shell an agent’s Worker IMPL runs inside — holding tool grant, model selection, and runtime capabilities. Tier 1 of the GH #46 3-tier Worker model (Runner / Agent / Context).
Runner here is broader than the ADK / OpenAI Agents SDK Runner (a loop driver): it is the execution shell holding tool grant, model selection, and runtime capabilities. Loop driving itself is the backend’s job (Claude Code harness / AgentBlock runtime).
Resolved per-agent by resolve_runner’s 5-step cascade; wiring the
resolved value into the launch path is Milestone 3 — this Milestone
only declares the shape and the pure resolver.
Variants§
WsOperator
Platform-neutral WebSocket Operator backend. The joined execution environment may be Claude Code, Codex, or another MainAI/plugin that implements the common binding and spawn contracts.
Fields
WsClaudeCode
WS backend: Claude Code subagent wrapper. variant is the
wrapper’s subagent_type; tools mirrors the wrapper frontmatter =
enforced grant.
Kept as a compatibility backend for existing Blueprints. New
platform-neutral declarations should use Self::WsOperator.
Fields
AgentBlockInProcess
In-process backend: agent-block runtime. tools is the effective
(enforced) tool set for the in-process registry.
Enforcement is per AgentKind::AgentBlock mode (GH #86) and is
server-granular: PromptBasedAgent embeds only the
spec.mcp_servers entries named by an mcp__<server>__<tool> entry
of this list, so an unlisted server is unreachable — but every tool
of a listed server is reachable. ScriptBasedAgent
(spec.script_path present) cannot be enforced at all — the script
drives its own mcp.connect — so declaring mcp__ entries there is
a compile error rather than a silent no-op.
Fields
tools: Vec<String>Effective (enforced) tool set passed to the agent-block runtime’s registry — unlike WebSocket Runner tool requests, this list is not merely informational.
Declaring this Runner at all overrides profile.tools,
including when the list is empty: an empty list is an
enforced-empty grant (the way a Blueprint revokes an agent.md’s
inherited tools: line), not “unset”. An agent that declares no
Runner keeps profile.tools as its effective set. The override
is applied once, when the Run’s immutable BoundAgent snapshot
is projected for the compiler, so it is pinned for resume.
Subprocess
GH #83 — Subprocess EmbedAgent backend: the step runs headless
through the ProcessSpawner path, with the invocation described by
a SubprocessDef template looked up by name in
Blueprint::subprocesses. Name symmetry with
AgentKind::Subprocess is deliberate (1:1 — this variant is the
Runner-axis face of the same Worker IMPL kind).
Per-agent overrides live HERE (not on SubprocessDef) so the
template struct stays flat and shareable across agents.
Fields
template: StringSubprocessDef::name reference into
Blueprint::subprocesses.
overrides: SubprocessOverridesPer-agent overrides applied on top of the referenced template and the agent profile. Empty (all defaults) is omitted on the wire.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Runner
impl<'de> Deserialize<'de> for Runner
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Runner, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Runner, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Runner
Source§impl JsonSchema for Runner
impl JsonSchema for Runner
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for Runner
impl Serialize for Runner
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Runner
Auto Trait Implementations§
impl Freeze for Runner
impl RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnsafeUnpin for Runner
impl UnwindSafe for Runner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more