feat(sms): Twilio SMS integration#576
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 27, 2026
Merged
Conversation
Adds end-to-end SMS support via Twilio, following the same registry/AsyncLocalStorage/credential-resolution patterns as the email integration. ## Backend - `src/sms/` — provider interface, registry, AsyncLocalStorage scoping, integration credential resolution, and Twilio adapter - `src/gadgets/sms/SendSms` — LLMist gadget that agents call to send SMS - `src/router/adapters/twilio.ts` — inbound webhook handler with Twilio signature validation (`POST /twilio/webhook/:projectId`) - SMS provider scoped in all three agent execution paths: pm/webhook-handler, github/webhook-handler, manual-runner - Pre-execution integration validation for agents that declare `sms` as a required integration ## Database - Migration 0020: extends `chk_integration_category_provider` to include `sms/twilio`, and `chk_integration_credential_role` to include `account_sid`, `auth_token`, `phone_number` - `getAllProjectIdsWithSmsIntegration()` in settingsRepository (mirrors email equivalent, ready for future SMS scheduler) ## API / CLI - `integrationsDiscovery.verifyTwilio` tRPC mutation — validates Account SID + Auth Token against the Twilio API - `projects.integrations.*` and `integrationCredentials.*` routers updated to accept `sms` category - CLI `integration-credentials`, `integration-credential-set`, `integration-credential-rm` commands updated to include `sms` ## Dashboard UI - `TwilioWizard` — 3-step accordion (credentials → verify → save) with inline credential creator, copy-to-clipboard webhook URL panel, and edit-mode pre-verification - `IntegrationForm` — new SMS tab wired to TwilioWizard ## Tests - Unit tests for SMS context, TwilioSmsProvider, TwilioIntegration, webhook handler, SendSms gadget, settingsRepository, and CLI commands - 206 test files, all passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
SmsIntegration/SmsProviderinterfaces withAsyncLocalStoragescoping, mirroring the email integration patternSendSmsgadget; inbound webhook handler (POST /twilio/webhook/:projectId) with Twilio signature validationintegrationRoles.ts, tRPCverifyTwiliomutation, CLIintegration-credential-*commands, dashboard 3-step wizard with copy-to-clipboard webhook URL and edit-mode pre-verificationChanged files
src/db/migrations/0020_sms_twilio_integration.sql,meta/_journal.jsonsrc/sms/(context, registry, integration, provider, types, twilio adapter)src/gadgets/sms/(SendSms, core/sendSms)src/router/adapters/twilio.ts,src/router/index.tssrc/pm/webhook-handler.ts,src/triggers/github/webhook-handler.ts,src/triggers/shared/manual-runner.ts,src/triggers/shared/integration-validation.tssrc/config/integrationRoles.ts,src/agents/definitions/schema.tssrc/api/routers/integrationsDiscovery.ts(verifyTwilio),src/api/routers/projects.tssrc/cli/dashboard/projects/override-{rm,set,s}.tssrc/db/repositories/settingsRepository.tsweb/src/components/projects/twilio-wizard.tsx,web/src/components/projects/integration-form.tsxtests/unit/sms/,tests/unit/gadgets/sms/,tests/unit/router/adapters/twilio.test.ts, updated cli/db testsCLAUDE.mdTest plan
npm run typecheck— cleannpm run lint— cleannpm test— 206 files, 3483 tests, all passing (including 5 new SMS test files)POST /twilio/webhook/<project-id>with valid Twilio signature returns200with empty<Response/>🤖 Generated with Claude Code