OptionalaiOptionalchosencontact_type_id -> contact_id chosen at kickoff; unknown types resolve to no_answer, never an error.
OptionalincludeAlso open the patient's EMR namespace to retrieval.
OptionalresumeTake over a running run. Off by default so a redelivered message cannot start a second execution;
only RunFormFillJobbable sets it, after its atomic claimRun. The check here is read-then-write.
OptionalrunnerRunner levers, passed in because the caller owns the flag provider and @repo/ai-agents never reads flags.
OptionalselectedThe patient_charts the AI lane may read; recorded on the generated form's chart row as its sources.
OptionalselectedThe patient's completed session notes the AI lane may quote; recorded beside the documents as sources.sessions.
OptionaltreatmentScopes patient-context resolution to one episode.
Fields per runner invocation, each batch persisted before the next starts. Omitted,
DEFAULT_AI_BATCH_SIZE.