Skip to main content
Aether extensions can subscribe to app events and intercept operations to observe, modify, or cancel built-in behaviors. Events give you a passive window into app activity; interceptors let you actively shape or stop operations before they complete.

on() — event subscription

on() registers a handler for a named event and returns a cleanup function you can call to unsubscribe. Event names are defined by Aether core or by other extensions; use intercept() to act on the built-in operations documented below.

intercept() — operation interception

intercept() registers a handler that runs inside the operation dispatch chain. Interceptors can observe, modify, or cancel the operation. Native interceptors run first, followed by Script handlers in extension registration order.

Built-in operations

OperationPayload fieldsDescription
chat.newselected_skill_idsFired when a new chat is created
skills.selectionskill_id, selectedFired when a Skill is toggled

Returning from an interceptor

Your interceptor handler controls how the operation proceeds based on its return value:
  • Return undefined or nothing — the payload passes through to the next interceptor unchanged.
  • Return an object with top-level fields — those fields are merged into the chained payload.
  • Return { payload: {...} } — explicitly replaces all payload fields with the supplied object.
  • Return { cancel: true, reason: "..." } — stops the operation entirely and surfaces the reason.

chat.new example

Set default Skills for every new chat by intercepting chat.new and returning the updated selected_skill_ids:

skills.selection example

Lock a specific Skill so it cannot be deselected:

Wildcard interception (Native Mods only)

In a Native Mod interceptor, pass "*" as the operation name to observe every operation dispatched through the registry:
Script interceptors and Native interceptors form one shared chain. Native interceptors always run before Script interceptors for the same operation, regardless of registration order.