Skip to content

feat(eve): project structured file parts on message.received#481

Open
NicoMoli wants to merge 3 commits into
vercel:mainfrom
NicoMoli:fix/message-received-file-parts
Open

feat(eve): project structured file parts on message.received#481
NicoMoli wants to merge 3 commits into
vercel:mainfrom
NicoMoli:fix/message-received-file-parts

Conversation

@NicoMoli

@NicoMoli NicoMoli commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The message.received stream event now carries structured parts (text plus file/image attachment metadata) alongside the flattened message summary. The default message reducer projects attachments as file message parts, so chat UIs can render user-attached files and images instead of parsing the [file: …] placeholder text.

  • Bumps EVE_MESSAGE_STREAM_VERSION 16 → 17.
  • Attachment bytes and internal sandbox paths are never projected.
  • A url is included only when the attachment is a client-resolvable http(s)/data: URL.

This PR should address this issue:
#286

Testing

  • Unit coverage for createMessageReceivedEvent parts projection (inline bytes, URL parts, eve-url: refs, data: URLs, eve-sandbox: refs, opaque base64, image normalization).
  • Reducer tests projecting structured file parts and the no-parts fallback.
  • E2E image-attachment.eval.ts now asserts message.received carries a structured image/png file part.

The message.received stream event now carries structured parts (text plus
file/image attachment metadata) alongside the flattened message summary, and
the default reducer projects attachments as file message parts so chat UIs can
render user-attached files instead of parsing [file: …] placeholder text.
Attachment bytes and internal sandbox paths are never projected; a url is
included only for client-resolvable http(s)/data: URLs.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Nicolas Molina <n_m09@hotmail.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@NicoMoli is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

…d-file-parts

Signed-off-by: Nicolas Molina <n_m09@hotmail.com>

# Conflicts:
#	e2e/fixtures/agent-basic-runtime/evals/runtime/image-attachment.eval.ts
@NicoMoli NicoMoli force-pushed the fix/message-received-file-parts branch from c121b7e to 71b8f9e Compare July 2, 2026 12:10
…llish coalesce

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Nicolas Molina <n_m09@hotmail.com>
@krzkz94

krzkz94 commented Jul 6, 2026

Copy link
Copy Markdown

This would be really nice, hitting the same issue as you right now :)

@AndrewBarba

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