Class: AgentPayloadEmitter
Makaio Framework / ai-adapters-core / AgentPayloadEmitter
Class: AgentPayloadEmitter
Section titled “Class: AgentPayloadEmitter”Defined in: ../../../adapters/core/src/agent/agent-payload-emitter.ts:50
Handles agent context enrichment and global bus emissions.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AgentPayloadEmitter(
config):AgentPayloadEmitter
Defined in: ../../../adapters/core/src/agent/agent-payload-emitter.ts:57
Create a payload emitter with context resolution dependencies.
Parameters
Section titled “Parameters”config
Section titled “config”Config controlling agent-context enrichment and global emissions
Returns
Section titled “Returns”AgentPayloadEmitter
Methods
Section titled “Methods”emitGlobal()
Section titled “emitGlobal()”emitGlobal<
S>(subject,payload,options?):Promise<void>
Defined in: ../../../adapters/core/src/agent/agent-payload-emitter.ts:114
Emit enriched payload to global bus.
Type Parameters
Section titled “Type Parameters”S extends SubjectDefinition
Parameters
Section titled “Parameters”subject
Section titled “subject”S
Subject definition to emit
payload
Section titled “payload”Omit<ExtractSubjectPayload<S>, keyof AgentIdentity> & object
Payload without AgentContext fields
options?
Section titled “options?”EmitGlobalOptions
Enrichment controls for optional analytics metadata defaults
Returns
Section titled “Returns”Promise<void>
enrichPayload()
Section titled “enrichPayload()”enrichPayload<
T>(payload,overrideMessageId?,options?):Promise<T&Required<AgentIdentity> &AgentPayloadEventFields>
Defined in: ../../../adapters/core/src/agent/agent-payload-emitter.ts:68
Enrich payload with agent context fields.
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”payload
Section titled “payload”T
Base payload to enrich
overrideMessageId?
Section titled “overrideMessageId?”string
Explicit messageId override from caller payload
options?
Section titled “options?”EmitGlobalOptions
Enrichment controls for optional analytics metadata defaults
Returns
Section titled “Returns”Promise<T & Required<AgentIdentity> & AgentPayloadEventFields>
Enriched payload with agent context