Wardrik. Notice
(wardrik_protocol v0.1.0-rc.1)
Copy Markdown
Tells someone what an agent did while nobody watched.
agent is the agent's ID. at is when it happened. kind is one of:
:parked- a turn waits on a person.callslists eachWardrik.Interrupt, with theargumentsthe model wrote, where known.:failed- a turn failed.reasonsays why.:finished- a turn answered.textis the answer.
Summary
Functions
Returns the notice's event name: turn_parked, turn_failed or turn_finished.
Returns the notice as the JSON a webhook receives.
Returns every kind of notice.
Types
@type call() :: %{interrupt: Wardrik.Interrupt.t(), arguments: term()}
A call a parked turn waits on, with its arguments.
@type kind() :: :parked | :failed | :finished
Functions
Returns the notice's event name: turn_parked, turn_failed or turn_finished.
Returns the notice as the JSON a webhook receives.
Wardrik.Notice.json(notice)
#=> %{"event" => "turn_failed", "agent" => "acme/triage", "reason" => "It timed out.", ...}
@spec kinds() :: [kind()]
Returns every kind of notice.