PromptRunner.Control.Entry (PromptRunnerSDK v0.10.0)

Copy Markdown View Source

One line of the control log: a command, who issued it, when, and what happened to it.

Every command that reaches the plane gets an entry, including the ones that are refused. A refusal that leaves no trace is indistinguishable from a command that was never sent.

Summary

Types

outcome()

@type outcome() :: :applied | :rejected | :received

t()

@type t() :: %PromptRunner.Control.Entry{
  at: DateTime.t() | nil,
  attempt: pos_integer() | nil,
  author: String.t() | nil,
  command: String.t() | nil,
  outcome: outcome() | nil,
  params: map(),
  prompt_id: String.t() | nil,
  reason: String.t() | nil,
  run_id: String.t() | nil
}

Functions

from_map(map)

@spec from_map(map()) :: t()

to_map(entry)

@spec to_map(t()) :: map()