Skip to main content

Module definition

Module definition 

Source
Expand description

The job definition (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §5.1): a trigger, an action, a policy and an owner, as JSON. Published as schema/agentmux-job.v1.schema.json; definition_tests.rs pins the two together.

JobDefinition::parse is the strict reading, for definitions a caller sends: unknown fields are refused, and so are the kinds reserved for later phases (§6): any policy.approval but none. A stored row is read leniently (storage::cron), so a newer build’s extra field doesn’t lose the row.

Modules§

action_kind
Action kinds (action.kind).
event_source
The sources an event trigger may name (Drone real-world jobs spec §3.2).
trigger_kind
Trigger kinds (trigger.kind).

Structs§

Caps
Check
How JobDefinition::validate reads the definition.
EventTrigger
What an event trigger waits for: the source, and a filter of plain values (text, numbers, true or false) the source matches an event against. A filter value is never an expression and never read as one.
JobDefinition
Policy
SecretRef
A secret the job’s runs use, by Vault entry: never a value (§7).
TemplateRef

Enums§

Action
CatchUp
Overlap
Trigger

Constants§

DEFAULT_EVENT_RATE_PER_HOUR
How many runs an event job starts in an hour when its trigger does not say.
JOB_VERSION
The only jobVersion this build reads.
LATER
What a kind reserved for a later phase answers (§6).
MAX_EVENT_DELAY_MINUTES
The longest an event’s run may be held back by delay: a week.
MAX_EVENT_FILTER
The most entries an event trigger’s filter holds, and the longest a filter key or text value may be.
MAX_EVENT_FILTER_TEXT
MAX_EVENT_RATE_PER_HOUR
MIN_EVERY_SECS
The shortest every interval for any job.
MIN_UNATTENDED_INTERVAL_SECS
The shortest interval between two fires of an unattended agent action (§5.1 “Triggers”), checked when a trigger or action is set.
RESULTS
policy.results values.