LemonCore. RunRequest
(lemon_core v0.1.0)
View Source
Canonical run submission contract shared by router-facing callers.
This module centralizes normalization for run submission fields so different entry points (channels, control plane, automation) can submit consistently to the router orchestrator.
Summary
Functions
Build a normalized run request from a keyword list or map.
Normalize request input into the canonical run request struct.
Types
@type origin() :: :channel | :control_plane | :cron | :node | :unknown | atom()
@type queue_mode() :: :collect | :followup | :steer | :steer_backlog | :interrupt | term()
@type t() :: %LemonCore.RunRequest{ agent_id: term(), cwd: term(), engine_id: term(), images: [map()], meta: map(), model: term(), origin: origin(), prompt: term(), queue_mode: queue_mode(), resume: LemonCore.ResumeToken.t() | nil, run_id: binary() | nil, session_key: binary() | nil, tool_policy: map() | nil }
Functions
Build a normalized run request from a keyword list or map.
Normalize request input into the canonical run request struct.
Accepts %RunRequest{} or maps with atom/string keys.
@spec normalize_queue_mode(term()) :: queue_mode()
@spec normalize_resume(term()) :: LemonCore.ResumeToken.t() | nil