Skip to content

feat: require a verified email for customer data tools - #106

Merged
scmmishra merged 5 commits into
mainfrom
feat/verified-email-tools
Oct 16, 2026
Merged

scmmishra merged 5 commits into
mainfrom
feat/verified-email-tools

Conversation

@scmmishra

Copy link
Copy Markdown
Member

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_verification and source: verified.email.

Changes

Toolset Tool Change
Stripe Find Customers by Email email uses source: verified.email
Stripe List Payments, List Invoices, List Subscriptions requires_email_verification: true
Attio Find Person email uses source: verified.email. The phone parameter is removed, because a phone number typed in chat is not verified.
Attio Get Company, List Deals, List Notes, Add Note requires_email_verification: true
Cal.com Find Bookings by Email attendee_email uses source: verified.email
Cal.com Get Available Slots No change. Open slots are public.
  • Stripe, Attio, and Cal.com are bumped to 0.1.0, with README notes on verification.
  • CONTRIBUTING.md gets a "Protect customer data" rule and a checklist item.
  • Better Stack, OpenStatus, and Context.dev are unchanged. Context.dev Enrich Person still looks up any person by email. It enriches public professional profiles, not the customer's own account, so it is left open on purpose.

Before merging

  • The validator must accept the new keys. CI sends each manifest to chatwoot.com/api/captain/tools/validate, which does not know requires_email_verification or source yet.
  • Merge only after feat: verify customer email before Captain uses sensitive tools [PR-3] chatwoot#16230 is released. Chatwoot versions without it reject source on a parameter, so installing or updating these toolsets would fail there.
  • The tools that take a customer, company, or record ID still accept any ID Captain passes, once the customer is verified. Binding IDs to the verified customer is a follow-up.

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.rb was not run against the live APIs.

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
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.
@scmmishra
scmmishra merged commit 159674d into main Oct 16, 2026
6 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.

1 participant