Skip to content

Home > intention-kernel > CapabilityEventPublisher > emit

CapabilityEventPublisher.emit() method ​

Publish one named domain event in the causal branch of the current capability.

Signature:

typescript
emit(name: string, data: unknown, options?: CapabilityEventOptions): Promise<void>;

Parameters ​

Parameter

Type

Description

name

string

data

unknown

options

CapabilityEventOptions

(Optional)

Returns:

Promise<void>

Remarks ​

The kernel wraps the event as capability.event, associates it with the current step and applies the configured redactor before it reaches the host sink. Event names must use stable lowercase dot or hyphen segments, for example subgraph.node.started.