Skip to content

Extension

An extension’s exported shape: blips (update), tools, or both. Build one with defineExtension.

optional tools?: Record<string, Tool>

Tools for the notch’s tool tray, keyed by name (the tool’s id becomes <extensionId>/<name>). Declare each with tool({...}). See “Tools” in the extension authoring guide.

optional onAction(ctx, action): Promise<void>

Runs when a surface invokes one of this extension’s actions.

Parameter Type
ctx Context
action ActionEvent

Promise<void>


optional onEvent(ctx, event): Promise<void>

Runs when a webhook or a watched file fires. Only called if the manifest declares that trigger.

Parameter Type
ctx Context
event HostEvent

Promise<void>


optional update(ctx): Promise<void | UpdateResult>

Runs on launch, on the manifest’s interval, on a manual run, and after a preferences change. Optional for an extension that only contributes tools.

Parameter Type
ctx Context

Promise<void | UpdateResult>