feat: add Plivo SMS service (#322)#326
Conversation
luthien-m
left a comment
There was a problem hiding this comment.
Clean implementation, follows existing patterns. LGTM ✅
One merge concern:
Both this PR and #324 (Twilio) independently create a messaging category in serviceRegistry.js. Whichever merges second will conflict. The fix is simple — just combine services: ["twilio", "plivo"] — but whoever merges second needs to handle it.
Minor notes (non-blocking):
-
No
writeGuidelinesin serviceInfo — Twilio's PR included guidelines about SMS costing money, verifying phone numbers, etc. Worth adding for agent safety since Plivo also sends paid SMS. -
Nice improvement: Auth token field uses
type="password"by default in the UI card — better than Twilio'stype="text"default. 👍
Tests are thorough (7 cases including network errors). Basic auth pattern is correct. Plivo API path structure with trailing slashes is handled properly.
jimleighy
left a comment
There was a problem hiding this comment.
Solid work, Rad. Follows existing service patterns well:
- Route handler with proper auth (Basic Auth via authId/authToken) ✅
- Service registry + categories integration ✅
- Queue executor support (buildUrl, buildHeaders, getAccessToken) ✅
- UI setup card with proper escaping ✅
- 9 passing tests ✅
- Clean SVG icon ✅
One minor note (non-blocking): the wildcard GET route and the specific message routes overlap — Express will hit the specific ones first due to ordering, so it works fine. LGTM 👍
Adds Plivo SMS as a new messaging service, following the existing service pattern.
Changes
src/routes/plivo.js— Route handler with Basic Auth, message listing, single message retrieval, account info, and wildcard GETsrc/routes/ui/plivo.js— UI setup card (Account Name, Auth ID, Auth Token)src/lib/serviceRegistry.js— Added plivo to SERVICE_REGISTRY, SERVICE_READERS, and new messaging categorysrc/lib/queueExecutor.js— Added plivo to SERVICE_URLS, getAccessToken, buildUrl, buildHeaderssrc/routes/ui/services.js— Registered plivo UI module and catalog entrysrc/routes/ui/service-detail.js— Added plivo icon and form fieldssrc/index.js— Mounted plivo routes at/api/plivosrc/services/queueService.js— Added plivo to VALID_SERVICES for write proxytests/plivo.test.js— Jest tests (9 passing)public/icons/plivo.svg— SMS chat bubble iconCloses #322