Actions
The Action union decide() returns.
A plugin's decide() returns Action[] — a declarative list of intent, not transactions. The executor materializes each action into a moveCall via @automark/sdk, mapping it onto a method of the SDK's Vault class.
Rule: a plugin NEVER builds tx.moveCall directly, NEVER touches keys, NEVER calls RPC. You return intent; the runtime turns it into a tx.
Every variant is a tagged union member with a kind and (except noop) a params object. All amounts and strikes are bigint.
noop
{ kind: "noop"; reason: string }noop means "decided not to act" plus a reason for structured logging. You can also return [], but that is hard to debug ("why did it do nothing?"). The runtime treats both paths the same — prefer [{ kind: "noop", reason: "..." }] when staying idle is a deliberate decision.
Position actions
vault.mintBinary—MintBinaryActionParams:marketId: string,strike: bigint,isUp: boolean,quantity: bigint,skipAutoFund?: boolean. Opens a binary position on one side of a strike (isUptrue = UP, false = DOWN).vault.mintRange—MintRangeActionParams:marketId: string,lowerStrike: bigint,higherStrike: bigint,quantity: bigint,skipAutoFund?: boolean. Opens a range position bounded by two strikes.vault.redeemBinary—RedeemBinaryActionParams:marketId: string,strike: bigint,isUp: boolean,quantity: bigint. Closes a binary position.vault.redeemRange—RedeemRangeActionParams:marketId: string,lowerStrike: bigint,higherStrike: bigint,quantity: bigint. Closes a range position.
marketId is Market.id everywhere. Under the hood it's the Predict oracleId; the runtime translates.
Funding and liquidity actions
vault.pmDeposit—PmActionParams:amount: bigint. Moves quote into the position-manager balance.vault.pmWithdraw—PmActionParams:amount: bigint. Pulls quote back out of the position manager.vault.supplyPlp—PlpSupplyActionParams:amount: bigint. Supplies quote as protocol liquidity.vault.withdrawPlp—PlpWithdrawActionParams:sharesAmount: bigint. Withdraws by PLP shares (not quote — pass what a priorsupplyPlpreturned).
NAV and fee actions
vault.refreshNavSnapshot—params?: NavRefreshRefs(predictPackageId: string,predictObjectId: string). Re-snapshots vault NAV.vault.crystallizeFees—params?: { includeNavRefresh?: boolean; refs?: NavRefreshRefs }. Crystallizes accrued fees, optionally refreshing NAV first.
Both params are optional — the runtime fills in the Predict refs when you omit them.
skipAutoFund
skipAutoFund exists only on mintBinary and mintRange. It defaults to false. When true, the runtime SKIPS the auto-fund pmDeposit preflight for that mint. Set it when you've already arranged PM balance yourself — a manual pmDeposit earlier in the same batch, or a PM that already holds plenty. See Auto-fund.
Next: what comes back after a tick → Result and error.