receives
A receives rule names events or a schedule that reach an entry's live instances.
Rule keys
| Key | Type | Default | Description |
|---|---|---|---|
event | string | none | Names an event type or glob, such as issue/updated. See Events. Set exactly one of event and cron. |
cron | string | none | Sets a 5-field cron expression, m h dom mon dow. |
timezone | string | UTC | Sets the IANA timezone for cron. Valid only in a rule that sets cron. |
name | string | required with cron | Names the cron schedule. The name must be unique within the entry. Valid only in a rule that sets cron. |
message | string | none | Sets the text that a cron firing carries in data.message. Valid only in a rule that sets cron. |
match | pattern | none | Sets a graph pattern, such as (event.subject)-[child-of]->(self). Valid only in a rule that sets event. |
where | expression | none | Sets a condition on event, self and the pattern's variables. |
broadcast | bool | false | When true, Hydra delivers the event to every live instance. Valid only in a rule that sets event. |
agents:
lead:
prompts: [/agents/lead/prompt.md]
runs_when:
track:
lives_on: issue
where: self.status == "in-progress"
mode: interactive
receives:
- event: issue/updated
match: (event.subject)-[child-of]->(self)
where: event.old.exists(old => old.status != event.subject.status)
- event: issue/created
broadcast: true
cron
A firing reaches the entry's live instances, and starts each singleton that is not live and whose where holds. Day-of-week 0 and 7 are Sunday, and 6 is Saturday, so 1-5 is Monday to Friday. The expression also accepts day names such as MON-FRI.
where
Expressions use the expression language.
For the fields of event, see Event fields in expressions.
where may read match! with one hop of one relation from one of these starts:
self, on alives_onentry and in a rule withoutbroadcastevent.subject, when every matched event type has a subject- a node the
matchnames
A cron rule's match! starts only from self. These reads count against the per-event read limit.
broadcast
- An
eventrule whosematchorwherementionsselfmust not setbroadcast. - An
eventrule that does not mentionselfmust setbroadcast: true. - A
match!fromselfcounts as mentioningself.