Skip to main content

GmAutomation

An autonomous process (automation / NPC): a server-driven entry-point function bound to a trigger (schedule or model activity) plus a safety budget and circuit-breaker state.

type GmAutomation {
automationId: String!
appId: BigInt!
name: String!
description: String
enabled: Boolean!
actionKind: String!
functionName: String
computeModuleName: String
computeExport: String
targetMode: String!
selfContainerId: String
targetTypeName: String
sessionId: String
paramsJson: String!
selectorJson: String
runAsUserId: BigInt
triggerType: String!
scheduleKind: String
intervalMs: Int
cronExpr: String
maxTargets: Int!
maxFnDepth: Int
gasLimit: Int
runTimeoutMs: Int
maxRunsPerMinute: Int!
failureThreshold: Int!
cooldownMs: Int!
circuitState: String!
consecutiveFailures: Int!
pausedUntil: DateTime
lastError: String
lastRunAt: DateTime
nextRunAt: DateTime
}

Fields

GmAutomation.automationId ● String! non-null scalar

Unique automation id (UUID).

GmAutomation.appId ● BigInt! non-null scalar

The app (tenant) that owns the automation.

GmAutomation.name ● String! non-null scalar

Automation name (unique per app); the upsert key.

GmAutomation.description ● String scalar

Optional description.

GmAutomation.enabled ● Boolean! non-null scalar

Whether the automation is eligible to run.

GmAutomation.actionKind ● String! non-null scalar

Action kind: model_function (invoke a Model function) or compute_invoke (invoke a compute-module export).

GmAutomation.functionName ● String scalar

The entry-point function name (must be autonomous_invocable). Null for compute_invoke actions.

GmAutomation.computeModuleName ● String scalar

For action_kind=compute_invoke: the compute module name invoked.

GmAutomation.computeExport ● String scalar

For action_kind=compute_invoke: the module invoke export called.

GmAutomation.targetMode ● String! non-null scalar

Target resolution mode: container | type | global.

GmAutomation.selfContainerId ● String scalar

For target_mode=container: the specific self container UUID.

GmAutomation.targetTypeName ● String scalar

For target_mode=type: the container type to fan out over.

GmAutomation.sessionId ● String scalar

Optional session scope (UUID).

GmAutomation.paramsJson ● String! non-null scalar

JSON object of static params passed to the entry point.

GmAutomation.selectorJson ● String scalar

JSON selector that resolves candidate refs/scalars over model data (e.g. nearest enemy) into params. Null when unused.

GmAutomation.runAsUserId ● BigInt scalar

Identity the automation acts as (drives owner_of_self / $caller_user_id). Null = trusted server caller.

GmAutomation.triggerType ● String! non-null scalar

Trigger type: schedule | event | manual.

GmAutomation.scheduleKind ● String scalar

For schedule triggers: interval | cron.

GmAutomation.intervalMs ● Int scalar

Interval in ms (schedule_kind=interval).

GmAutomation.cronExpr ● String scalar

Cron expression (schedule_kind=cron).

GmAutomation.maxTargets ● Int! non-null scalar

Max targets per run (fan-out cap).

GmAutomation.maxFnDepth ● Int scalar

Override: max fn: call depth per invoke.

GmAutomation.gasLimit ● Int scalar

Override: evaluation gas per invoke.

GmAutomation.runTimeoutMs ● Int scalar

Override: wall-clock budget per invoke (ms).

GmAutomation.maxRunsPerMinute ● Int! non-null scalar

Max runs per minute for this automation.

GmAutomation.failureThreshold ● Int! non-null scalar

Consecutive failures that trip the circuit breaker.

GmAutomation.cooldownMs ● Int! non-null scalar

Cooldown (ms) while the circuit is open.

GmAutomation.circuitState ● String! non-null scalar

Circuit-breaker state: closed | open | half_open.

GmAutomation.consecutiveFailures ● Int! non-null scalar

Current consecutive-failure count.

GmAutomation.pausedUntil ● DateTime scalar

When the open circuit may retry (half-open).

GmAutomation.lastError ● String scalar

Last error recorded for this automation.

GmAutomation.lastRunAt ● DateTime scalar

When the automation last ran.

GmAutomation.nextRunAt ● DateTime scalar

When the automation is next due (schedule).

Returned By

gameModelAutomation query ● gameModelAutomations query ● gameModelSetAutomationEnabled mutation ● gameModelUpsertAutomation mutation