Repository navigation
Preserve host metadata on user delivered messages #900
astrobot-houston
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary of Changes
When a host dispatches a
kind: 'user'delivered message, any custom host metadata (such as transport origin, client session details, or bridge routing tags) was stripped becauseDeliveredUserMessageSchemainsrc/runtime/schemas.tsonly declaredkind,body, andattachments.This PR:
metadata: v.optional(v.record(v.string(), v.string()))property toDeliveredUserMessageSchema.DeliveredMessageunderpackages/runtime/src/types.tsto include optional host-privatemetadata?: Record<string, string>.packages/runtime/src/runtime/schemas.test.tsverifying host metadata is preserved on user messages and unknown unexpected fields are still filtered.Verification
vitest run): 3/3 tests passed.biome check): passed with 0 errors.tsdown: build succeeded.tsc --noEmit): passed with 0 errors.Closes #851
Original implementation from #894 by @praveen-kumary
All reactions