Expand description
A job made from a template, and a template’s update diff (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §5.4).
apply works on the definition as JSON, before it is parsed: it pins the
job to the approved template (id, version, hash), checks the parameters
against the template’s schema, renders the brief from them, and sets the
outputs and secrets the template declares. A template that isn’t approved,
or changed since it was, can’t make a job (resolve_approved). On a create
it also fills in what the request left out from the template’s defaults
(name, trigger, action, policy).
A job keeps the version it was made from. A newer one is offered with
update_diff; accepting it is an edit that names the new version, which
apply reads as an update and lays the template’s policy defaults over
the job’s.
Structs§
- List
Change - A list’s difference.
- Policy
Change - One policy setting that accepting the update changes.
- Template
PinView - The template a job was made from, as the tab’s row shows it.
- Template
Update Diff - Template
Update View - A newer version of a job’s template, installed.
- Text
Change - A text before and after.
Enums§
- Update
Status - What
jobs.templates.update_diffsays about a job’s template.
Functions§
- apply
- Lay the approved template under
def, a job definition as JSON. Does nothing whendefnames no template. - brief_
of - The text an action carries: a task’s payload, else the brief.
- edit_
needs_ render - Whether an edit (
fieldslaid overbefore) changes what a template’s render depends on: its pin or parameters, or the brief itself. An action edit that leaves the brief as it was (a new target) needs none. One that leaves the brief out, or writes another, is rendered again, so the template stays the brief’s only author. - pin_
view pinas the row shows it.latestremembers each template read, so a list of jobs made from one reads it once.- update_
diff - Compare
job’s pinned template with the one installed now, as a job edit that accepts it would make it.
Type Aliases§
- Latest
- What the installed template is, for the pins that name it.