pub struct AgentRunSpec {
pub workflow_id: WorkflowId,
pub run_id: RunId,
pub activity_id: ActivityId,
pub attempt: u32,
pub activity_type: String,
pub input: Payload,
}Expand description
The neutral identity + input for one agent run (one activity attempt).
Carries only what every harness needs to run an attempt: the
(workflow, run, activity, attempt) key, the activity-type name the engine dispatched, and
the input Payload. It names no harness-specific configuration — an adapter holds any
harness-specific settings itself (constructed when the crate::AgentHarness is built),
keeping this spec harness-blind.
§The run axis is what the adapters stamp onto every event
Each adapter stamps this identity onto every aion_core::ActivityEvent it emits, and the
transcript keyspace is keyed on the same quad. The run therefore has to arrive here from the
dispatch that started the attempt; an adapter has no other source for it and must never
synthesise one.
Fields§
§workflow_id: WorkflowIdThe workflow this activity attempt belongs to.
run_id: RunIdThe concrete run of that workflow this attempt belongs to. Required: a continue-as-new
chain reuses one workflow_id while ordinals and attempts restart per generation.
activity_id: ActivityIdThe activity within the workflow.
attempt: u32The attempt number of the activity being run.
activity_type: StringThe activity-type name the engine dispatched to this run (e.g. "dev").
Neutral run identity, not harness configuration: it is the same type name the workflow definition routed on, so an adapter can label or parameterise a run by what the engine asked for without the spec learning anything harness-specific.
input: PayloadThe activity input handed to the agent.
Implementations§
Source§impl AgentRunSpec
impl AgentRunSpec
Sourcepub fn new(
workflow_id: WorkflowId,
run_id: RunId,
activity_id: ActivityId,
attempt: u32,
activity_type: impl Into<String>,
input: Payload,
) -> Self
pub fn new( workflow_id: WorkflowId, run_id: RunId, activity_id: ActivityId, attempt: u32, activity_type: impl Into<String>, input: Payload, ) -> Self
Builds a run spec from the neutral run identity and input payload.
Trait Implementations§
Source§impl Clone for AgentRunSpec
impl Clone for AgentRunSpec
Source§fn clone(&self) -> AgentRunSpec
fn clone(&self) -> AgentRunSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more