feat(web): agents copy the person on handoff mail (CL-8577) - #926
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
apps/web/src/chat/room-roster.ts:RosterEntrygains akind("person" | "agent");appendRosteradds a trailing instruction naming every person in the roster and telling agents to copy them intoon a handoff.stripRosterneeded no change — it already discards everything from theParticipants:marker onward.apps/web/src/chat/threads-api.ts:sendToRoomnow takes the full participant list (not just agents), builds the roster from the person(s) plus live agents, whiletostill targets only live agents.apps/web/src/workbench-create.ts/apps/web/src/pages/workbench-room-page.tsx: pass the full participant list through tosendToRoom.agents/myra/src/system-prompt.ts: one added sentence stating the same rule.Testing
bun test apps/web/src/chat/room-roster.test.tsbun run check(typecheck, lint, fmt, full test suite) — greenFindings on mail_send cc/comma support
@intx/tools-mail(0.3.0)mail_sendschema has noccfield — onlyto: string | string[].createOutboundMessagebuilder (vendor/intx/mime/src/mail-builder.ts) does support accfield, but the mail tool never exposes it.tois not viable: each string is validated as a single RFC-5322-ish address with/^[^@\s]+@[^@\s]+$/, so"a@x,b@x"fails validation. Multiple recipients must be passed as an array.torecipient, not acc.Reader check
readRoomFolder/readRoominthreads-api.tsdo not filter messages by participant/address match (unlike the one-on-one chat reader) — every message in the room mailbox's INBOX/Sent folders is already shown, author included, regardless of whether the person is a primary or secondarytorecipient. No reader change was needed.