Automation SDK
An automation is a TypeScript module. It declares when it starts in a literal header and does its work in run, calling a small set of functions on ctx.
import { defineAutomation } from '@heliana/automation'
export default defineAutomation({ async run(ctx) { await ctx.rcon('AdminBroadcast Welcome!') }, trigger: { event: 'join', kind: 'event' },})This reference is generated from the same contract the platform checks modules against, so it cannot drift from the code:
- Module header: header fields and trigger kinds.
- Run context:
ctxfunctions and player reads. - Squad events: events a module can start on.
- Limits: what stops a run and what refuses a call.
- Examples: complete modules.
The type declarations are also available as a single file: automation.d.ts.