Skip to content

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:

The type declarations are also available as a single file: automation.d.ts.