LemonGateway.ExecutionRequest (lemon_gateway v0.1.0)

View Source

Gateway-private execution request adapter.

Router-owned callers hand %LemonCore.ExecutionCommand{} values to the configured LemonCore.EngineRuntime. Gateway keeps this shape internally for the transition period and converts it into %LemonGateway.Types.Job{} before invoking engines.

Summary

Functions

Converts the core execution command into gateway's private scheduling shape.

Compatibility/migration helper for gateway tests and legacy internals.

Converts the gateway-private request back into the core boundary contract.

Converts the public execution contract into the internal engine-facing job shape used inside gateway run execution.

Types

conversation_key()

@type conversation_key() ::
  {:resume, binary(), binary()} | {:session, binary()} | term()

t()

@type t() :: %LemonGateway.ExecutionRequest{
  conversation_key: conversation_key() | nil,
  cwd: String.t() | nil,
  engine_id: String.t() | nil,
  images: [map()],
  lane: LemonGateway.Types.lane() | nil,
  meta: map(),
  prompt: String.t() | nil,
  resume: LemonCore.ResumeToken.t() | nil,
  run_id: String.t() | nil,
  session_key: String.t() | nil,
  tool_policy: map() | nil
}

Functions

ensure_conversation_key(request)

@spec ensure_conversation_key(t()) :: t()

from_command(command)

@spec from_command(LemonCore.ExecutionCommand.t()) :: t()

Converts the core execution command into gateway's private scheduling shape.

from_job(job, opts \\ [])

@spec from_job(
  LemonGateway.Types.Job.t(),
  keyword()
) :: t()

Compatibility/migration helper for gateway tests and legacy internals.

to_command(request)

@spec to_command(t()) :: LemonCore.ExecutionCommand.t()

Converts the gateway-private request back into the core boundary contract.

to_job(request)

@spec to_job(t()) :: LemonGateway.Types.Job.t()

Converts the public execution contract into the internal engine-facing job shape used inside gateway run execution.