Wardrik.Trigger (wardrik_protocol v0.1.0-rc.1)

Copy Markdown

Asks an agent something without anyone typing. A trigger fires:

  • on a schedule, every cron expression or interval, read in timezone
  • when one of its feed URLs has new entries
  • when a service sends its webhook a request

See the Trigger agents guide.

Summary

Functions

Builds one from the protocol's JSON.

Returns it as the protocol's JSON, without fields that are nil.

Types

t()

@type t() :: %Wardrik.Trigger{
  every: term(),
  feed: term(),
  jitter: term(),
  missed: term(),
  name: term(),
  overlap: term(),
  prompt: term(),
  prompt_file: term(),
  timezone: term(),
  webhook: term()
}

Functions

from_json(json)

@spec from_json(map()) :: t()

Builds one from the protocol's JSON.

to_json(value)

@spec to_json(t()) :: map()

Returns it as the protocol's JSON, without fields that are nil.