ShtukbaseStandard

Actions and automations

automations · version 0.1.1
Agents and automations2 norms2 checks

What the factory can run (actions: a script, an agent, an edit of a record) and what runs by itself (automations: an event, a reaction, limits); checks that an action has something to run it and that an automation has an event, a reaction and a limit.

About the package

Two collections. Actions are what the factory can run: a program (a script or a command), an agent, a move or an edit of a record. Automations are an event and a reaction: when trigger fires, reaction runs, no more often than the limits limits allow.

The page format is the same one the Shtukbase node reads: type: Action with kind, type: Automation with trigger, reaction, limits, mode. So without a node a page is an instruction for a person and an agent (mode: manual), and with a node it is something the node runs by itself (mode: auto).

Norms: ACT-R01 says an action has something to run it (check action); ACT-R02 says an automation states when, what and how many times (check automation).

Boundary: the node's sensors (Sensor) and events (Event) are not part of the package; the event is written straight into trigger. Commit gates and agent hooks are not automations: they stop work from passing, they do not react to an event after it. The run log is the runs package.

Norms 2

IDNormLevelModeEnforcer
ACT-R01
A program has a script in place or a command; an agent action has an existing agent
SHOULD blocks
check
ACT-R02
An automation has an event, a reaction to an existing page and a mode; one that runs by itself has limits
SHOULD blocks
check

"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.

Actions 3

NameWhat it doesFileWhen
placeAdd the Action and Automation kinds to the placement mapbin/place.ts
after install after update
actionAn action has a script in place or an existing agent
norm ACT-R01
checks/t01_action.ts
check
automationAn automation has an event, a reaction and a limit
norm ACT-R02
checks/t02_automation.ts
check

shtuk check runs the checks; shtuk run automations <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.

Pages 4

They go into the project at these paths.

Package files 4

They go into .shtukbase/packages/automations/; actions run from there.