UpsertAutomationInput
Create or update an autonomous process (automation / NPC). Upsert key is (app, name).
input UpsertAutomationInput {
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
}
Fields
UpsertAutomationInput.appId ● BigInt! non-null scalar
The app (tenant) that owns the automation.
UpsertAutomationInput.name ● String! non-null scalar
Automation name (unique per app). The upsert key.
UpsertAutomationInput.description ● String scalar
Optional description.
UpsertAutomationInput.enabled ● Boolean scalar
Whether it may run. Defaults to true.
UpsertAutomationInput.actionKind ● String scalar
Action kind: model_function (default — invoke a Model function) or compute_invoke (invoke a compute-module export directly; the trusted server path, no invoke policy evaluation).
UpsertAutomationInput.functionName ● String scalar
Entry-point function name (must be autonomous_invocable). Required for action_kind=model_function; ignored for compute_invoke.
UpsertAutomationInput.computeModuleName ● String scalar
For action_kind=compute_invoke: the compute module name to invoke.
UpsertAutomationInput.computeExport ● String scalar
For action_kind=compute_invoke: the module invoke export to call (must be bound as an invoke trigger on the module).
UpsertAutomationInput.targetMode ● String scalar
Target mode: container | type | global. Defaults to container (model_function) / global (compute_invoke).
UpsertAutomationInput.selfContainerId ● String scalar
For target_mode=container: the self container UUID.
UpsertAutomationInput.targetTypeName ● String scalar
For target_mode=type: the container type to fan out over.
UpsertAutomationInput.sessionId ● String scalar
Optional session scope (UUID).
UpsertAutomationInput.paramsJson ● String scalar
JSON object of static params.
UpsertAutomationInput.selectorJson ● String scalar
JSON selector resolving candidate refs/scalars over model data into params (e.g. {"pick":"nearest","ofType":"Unit","where":[...],"by":"manhattan","bindAs":{...}}). Also supports grid-permission filters "selfPermissionWhere"/"candidatePermissionWhere": arrays of {"userFrom":"owner"|{"property":k},"op":"has"|"lacks","key":<runtime permission key>,"grid":<id>|{"property":k}} checked against the live grid ACL (omit "grid" for any-grid).
UpsertAutomationInput.runAsUserId ● BigInt scalar
Identity to act as (drives owner_of_self / $caller_user_id). Null = trusted server caller.
UpsertAutomationInput.triggerType ● String scalar
Trigger type: schedule | event | manual. Defaults to schedule.
UpsertAutomationInput.scheduleKind ● String scalar
For schedule triggers: interval | cron.
UpsertAutomationInput.intervalMs ● Int scalar
Interval in ms (schedule_kind=interval).
UpsertAutomationInput.cronExpr ● String scalar
Cron expression (schedule_kind=cron).
UpsertAutomationInput.maxTargets ● Int scalar
Max fan-out targets per run.
UpsertAutomationInput.maxFnDepth ● Int scalar
Override: max fn: depth per invoke.
UpsertAutomationInput.gasLimit ● Int scalar
Override: gas per invoke.
UpsertAutomationInput.runTimeoutMs ● Int scalar
Override: wall-clock budget per invoke (ms).
UpsertAutomationInput.maxRunsPerMinute ● Int scalar
Max runs per minute for this automation.
UpsertAutomationInput.failureThreshold ● Int scalar
Consecutive failures that open the circuit.
UpsertAutomationInput.cooldownMs ● Int scalar
Cooldown (ms) while the circuit is open.
Member Of
gameModelUpsertAutomation mutation