Skip to content

bodhi-realtime-agent / PublishNotification

Interface: PublishNotification ​

Defined in: src/agent/background-agent.ts:34

Producer-facing notification payload. Published via BackgroundAgentContext.publish.

Shape mirrors the inbound notification.publish actor message minus caller-side conveniences:

  • id is auto-assigned by NotificationActor when omitted.
  • correlationId is destructured by the host actor and forwarded as the envelope's correlationId — it is NOT a payload field on the wire.

Properties ​

correlationId? ​

optional correlationId?: string

Defined in: src/agent/background-agent.ts:65

Optional caller-supplied envelope correlation id. Caller ergonomics only — the host actor strips this off the publish payload before sending and forwards it as the envelope's correlationId. If omitted, the host synthesizes ${sessionId}-${agent.name}-${randomId} for trace continuity.


dedupKey? ​

optional dedupKey?: string

Defined in: src/agent/background-agent.ts:56

When set, NotificationActor replaces any pending entry with the same key (latest-wins). Useful for periodic reminders where only the freshest value matters (e.g. 'time-reminder').


label ​

label: string & object | KnownNotificationLabel

Defined in: src/agent/background-agent.ts:40

Label that NotificationActor wraps as [label]: text at TransportActor's wire-out boundary. Normalized on ingest (uppercase + sanitize to [A-Z0-9 _-], max 32 chars, fallback to 'SYSTEM' if empty).


priority? ​

optional priority?: "high" | "normal"

Defined in: src/agent/background-agent.ts:46

Default 'normal'. 'high' triggers cancel-and-deliver on truncation-capable transports.


text ​

text: string

Defined in: src/agent/background-agent.ts:43

Body text the LLM will speak (after normalization through synthetic user turn).


turnComplete? ​

optional turnComplete?: boolean

Defined in: src/agent/background-agent.ts:49

Default true. Forwarded as transport.send_content.turnComplete.

Built with VitePress