OptionalcompletedOptional completion timestamp. Capture it at the moment the step actually finished and pass it in,
so that re-applying this finalize later (e.g. the queue re-asserts it AFTER the INSERT lands) yields
the SAME CompletedAt/durationMs rather than drifting to "now". Defaults to new Date().
OptionalerrorOptional failure detail (empty/undefined → null).
OptionaloutputOptional output payload; wrapped in a standard { success, durationMs, errorMessage } context envelope.
Whether the step succeeded — drives Status (Completed/Failed) and Success.
OptionaltargetOptional run-log id to stamp now (when not known at start — e.g. a prompt run id captured after execution).
Inputs for finalizeAgentRunStep — the "completion" field set of an agent run step.