Skip to content

Add media metadata support to event bus#379

Merged
StanislavBG merged 1 commit into
mainfrom
feature/media-metadata-event-bus
Mar 14, 2026
Merged

Add media metadata support to event bus#379
StanislavBG merged 1 commit into
mainfrom
feature/media-metadata-event-bus

Conversation

@dellis317
Copy link
Copy Markdown
Collaborator

Summary

  • Event bus events can now carry media attachments (image/audio/video) via metadata.media[]
  • Media flows through publish, result, and SSE endpoints unchanged
  • EventBus expanded view renders image/audio/video inline in log entries
  • Aligns media metadata format with BSOffice notification system

Media Metadata Convention

{
  "metadata": {
    "media": [
      {
        "type": "image|audio|video",
        "url": "https://...",
        "mimeType": "image/png",
        "label": "Screenshot",
        "duration": 45,
        "source": "provocations"
      }
    ]
  }
}

Shorthand fields also supported by BSOffice: imageUrl, audioUrl, videoUrl.

Changes

  • server/routes.ts: Result endpoint accepts metadata param, passes media through to eventBusLog and SSE events. Publish endpoint carries media to log entries. New API-key document metadata endpoint.
  • EventBusExpandedView.tsx: Renders image (click to open), audio (controls), video (controls) inline in expanded log entries. Media type icons shown as badges on collapsed rows.
  • useFlowCanvas.ts: eventBusLog type extended with optional media field.

Test plan

  • Publish an event with metadata.media containing an image URL — verify it shows in listen node's log
  • Post a result with metadata.media containing an audio URL — verify audio controls render in expanded view
  • Verify SSE subscribers receive media metadata in event payload
  • Verify backwards compatibility — events without media still work normally

🤖 Generated with Claude Code

Event bus events can now carry media attachments (image/audio/video)
in metadata.media[]. Media flows through publish, result, and SSE
endpoints and renders inline in the EventBus expanded view log.

- Result endpoint accepts metadata with media array, passes through
  to eventBusLog entries and SSE events
- Publish endpoint carries media from metadata into log entries
- EventBus UI renders image/audio/video inline in expanded log entries
  with type-specific icons as badges on collapsed rows
- FlowNode.eventBusLog type extended with optional media field
- API-key document metadata endpoint for external agent references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@StanislavBG StanislavBG merged commit 85a9723 into main Mar 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants