Repository navigation
feat: require a verified email for customer data tools - #106
Merged
Merged
Conversation
Captain could look up billing data for any email a chat visitor typed. The customer lookup now takes the email Chatwoot verified by one-time code, and the list tools run only for a verified customer.
Find Person now takes the email Chatwoot verified by one-time code. The phone lookup is removed because a phone number typed in chat is not verified, so it would let a verified customer look up anyone. The other tools run only for a verified customer.
Booking lookup took any email from the chat. It now uses the email Chatwoot verified by one-time code. Open slots stay public.
New toolsets should gate customer data the same way, so the guide and the checklist now say how.
scmmishra
marked this pull request as ready for review
October 15, 2026 10:56
Captain reads these descriptions only where it fills the parameter itself, in the playground and in reply suggestions. Saying Chatwoot fills the email, or calling it verified, was wrong there. The verification step is explained in each README instead.
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.
Makes the Stripe, Attio, and Cal.com tools work only for a customer who verified their email with a one-time code. Lookups by email now use the verified email, so Captain can't look up someone else's data from an email typed in the chat.
Depends on chatwoot/chatwoot#16230, which adds
requires_email_verificationandsource: verified.email.Changes
emailusessource: verified.emailrequires_email_verification: trueemailusessource: verified.email. Thephoneparameter is removed, because a phone number typed in chat is not verified.requires_email_verification: trueattendee_emailusessource: verified.email0.1.0, with README notes on verification.CONTRIBUTING.mdgets a "Protect customer data" rule and a checklist item.Before merging
chatwoot.com/api/captain/tools/validate, which does not knowrequires_email_verificationorsourceyet.sourceon a parameter, so installing or updating these toolsets would fail there.Testing
Each edited tool was checked against the custom tool validation in chatwoot/chatwoot#16230, and all of them pass. The new Attio request body was rendered for a normal and a blank email.
tool-tester.rbwas not run against the live APIs.