Function record_run
pub fn record_run(
doc: &mut AutoCommit,
label: &str,
by: Option<&str>,
steps: &[RunStep],
) -> Option<String>Expand description
Record a run. Returns the document key, which is also AgentRun::id.
The transaction is left open — the caller commits, so the record lands
stamped and attributed like any other edit. A run with no steps is not
recorded: nothing changed, so there is nothing to offer undo on.