pub struct CreateStepInput {
pub id: Option<Uuid>,
pub request_id: Option<RequestId>,
pub prev_step_id: Option<StepId>,
pub parent_step_id: Option<StepId>,
pub step_kind: StepKind,
pub step_sequence: i64,
pub request_payload: Value,
}Expand description
Input to ResponseStepStore::create_step.
step_sequence is monotonic per chain (head step) across the whole
response tree. Callers (the orchestration loop) are responsible for
picking the next sequence value.
Idempotency under crash recovery is the caller’s responsibility:
walk the existing chain via ResponseStepStore::list_chain and
only emit successors that aren’t already present. There is no
database-side unique constraint on (parent_step_id, prev_step_id, step_kind) — branching is intrinsic to the data model (a model_call
returning multiple tool_calls emits sibling rows with that exact
tuple identical), so any uniqueness on those columns rejects
ordinary parallel tool dispatch.
Fields§
§id: Option<Uuid>Optional pre-generated step UUID. When Some, becomes the step’s
primary key — useful when the caller needs to reference the id
before the row is committed (e.g., emitting an SSE event with the
step id while the row is still being inserted).
request_id: Option<RequestId>FK to requests.id for the upstream HTTP fire this step
represents. None on tool_call steps.
prev_step_id: Option<StepId>§parent_step_id: Option<StepId>§step_kind: StepKind§step_sequence: i64§request_payload: ValueTrait Implementations§
Source§impl Clone for CreateStepInput
impl Clone for CreateStepInput
Source§fn clone(&self) -> CreateStepInput
fn clone(&self) -> CreateStepInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more