Skip to main content
Native interceptors integrate into the same operation chain as Script interceptors but always run first. They can observe, modify, cancel, or replace operation payloads before any Script-level handler sees them.

API

Call context.intercept() inside onLoad:
AetherModOperationInterceptor is a fun interface with one method:

Decision types

Your handler must return an AetherModOperationDecision that tells the chain what to do: You can also use the context.cancelOperation() extension function as a shorthand:

Built-in operations

Use "*" to intercept every operation dispatched through the kernel — useful for diagnostics, logging, or blanket policy enforcement.

Example — modifying chat.new

Clear the selected skill IDs before every new chat turn:

Example — wildcard observer

Log every operation without modifying it:

Example — cancelling an operation

Prevent a specific skill from being deselected:
Native interceptors run before Script interceptors for the same operation and priority. Within the Native tier, interceptors are ordered by their priority value — lower values run first.