API
Callcontext.intercept() inside onLoad:
AetherModOperationInterceptor is a fun interface with one method:
| Parameter | Description |
|---|---|
operation | The operation name to intercept, or "*" to intercept every operation. |
priority | Higher-priority interceptors run first within the Native interceptor tier. |
interceptor | AetherModOperationInterceptor receiving the current payload and an operation context object; returns an AetherModOperationDecision. |
Decision types
Your handler must return anAetherModOperationDecision that tells the chain what to do:
| Decision | Effect |
|---|---|
AetherModOperationDecision(payload = ...) | Pass the operation through with a modified payload. |
AetherModOperationDecision(cancelled = true, reason = "...") | Cancel the operation. No further interceptors or built-in handlers run. |
AetherModOperationDecision(payload = payload) | Pass through with the payload unchanged. |
context.cancelOperation() extension function as a shorthand:
Built-in operations
| Operation | Triggered by |
|---|---|
chat.new | A new chat turn starting. |
skills.selection | The user or an extension changing the active skill selection. |
"*" 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 — higher values run first.