Skip to content

NotificationsAPI

Defined in: namespaces-core-plugins.ts:632

Single outbound notification surface (fn-97). Emitters NEVER choose a channel — user-authored routing rules + the filter chain decide delivery.

emit / cancel / history are routed through the fn-89 Invoker.

fn-97

channels: object

Defined in: namespaces-core-plugins.ts:655

Channel contributor sub-bridge (requires manifest notifications.channel contribution).

bind(channelId, handler): unknown

Binds the runtime handler for a manifest-declared channel. [notifications.channel.register]

string

(delivery) => AnyJSONValue | Promise<AnyJSONValue>

unknown

unbindChannel(channelId): unknown

Unbinds a channel handler. [notifications.channel.register] QUIRK: named unbindChannelunbind collides with NSObject.unbind(_:) selector in JSExport.

string

unknown


filters: object

Defined in: namespaces-core-plugins.ts:666

Filter contributor sub-bridge (requires manifest notifications.filter contribution).

register(filterId, evaluator): unknown

Registers a filter evaluator. [notifications.filter.register]

string

(notification) => AnyJSONValue | Promise<AnyJSONValue>

unknown

unregister(filterId): unknown

Unregisters a filter. [notifications.filter.register]

string

unknown

emit(input): Promise<NotificationHandle>

Defined in: namespaces-core-plugins.ts:638

Emits a typed notification. [notifications.emit] NOTE: .agent-sourced emits fail with notifications:agentAttributionUnavailable until fn-121 ships.

AnyJSONValue

Promise<NotificationHandle>


cancel(notificationId): Promise<boolean>

Defined in: namespaces-core-plugins.ts:645

Cancels by notification id. QUIRK (AD-FN97-57): returns boolean UNIFORMLY — false collapses missing / foreign-emitter / already-terminal handles; never throws unknownNotificationHandle in v1.

string

Promise<boolean>


history(filter?): Promise<AnyJSONValue[]>

Defined in: namespaces-core-plugins.ts:647

Reads own delivery history. [notifications.log.read]

AnyJSONValue

Promise<AnyJSONValue[]>


onAction(categoryId, actionId, handler): SubscriptionHandle

Defined in: namespaces-core-plugins.ts:653

Subscribes to notification action button invocations (SYNCHRONOUS per AD-FN97-85; filtered per-emitter by the host bridge). [notifications.action.register]

string

string

(invocation) => void

SubscriptionHandle