[PR #2502] [MERGED] feat: add Plivo SMS tool plugin #2527

Closed
opened 2026-02-16 11:17:14 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/2502
Author: @navi-
Created: 1/27/2026
Status: Merged
Merged: 1/27/2026
Merged by: @crazywoola

Base: mainHead: feat/add-plivo-sms-tool


📝 Commits (2)

  • f3aa651 feat: add Plivo SMS tool plugin
  • 2627be3 test: add unit, smoke, and integration tests for Plivo SMS plugin

📊 Changes

14 files changed (+1926 additions, -0 deletions)

View changed files

tests/tools/plivo_sms/test_integration.py (+172 -0)
tests/tools/plivo_sms/test_manifest_and_provider.py (+104 -0)
tests/tools/plivo_sms/test_smoke_invoke.py (+219 -0)
tools/plivo_sms/.env.example (+4 -0)
tools/plivo_sms/_assets/icon.svg (+7 -0)
tools/plivo_sms/main.py (+6 -0)
tools/plivo_sms/manifest.yaml (+31 -0)
tools/plivo_sms/provider/plivo_sms.py (+26 -0)
tools/plivo_sms/provider/plivo_sms.yaml (+42 -0)
tools/plivo_sms/pyproject.toml (+15 -0)
tools/plivo_sms/requirements.txt (+2 -0)
tools/plivo_sms/tools/send_sms.py (+46 -0)
tools/plivo_sms/tools/send_sms.yaml (+51 -0)
tools/plivo_sms/uv.lock (+1201 -0)

📄 Description

Summary

  • Add a new Plivo SMS tool plugin under tools/plivo_sms/
  • Sends SMS messages via the Plivo messaging platform
  • Validates credentials by calling account.get() against the Plivo API
  • Returns message UUID and structured JSON on successful send

Plugin structure

tools/plivo_sms/
├── _assets/icon.svg
├── provider/
│   ├── plivo_sms.yaml      # Credentials: auth_id, auth_token
│   └── plivo_sms.py        # ToolProvider with validation
├── tools/
│   ├── send_sms.yaml       # Parameters: to_number, from_number, message
│   └── send_sms.py         # Tool implementation
├── main.py
├── manifest.yaml
├── requirements.txt         # dify_plugin==0.7.1, plivo==4.59.5
├── pyproject.toml
└── uv.lock

Test coverage (23 tests, all passing)

Manifest & YAML validation (7 tests)

  • Required manifest fields, type, runner config
  • Provider YAML credentials, tool references, extra.python.source
  • Tool YAML identity, descriptions, parameters, extra.python.source
  • Icon asset exists

Smoke invocation with mocked API (9 tests)

  • Provider and tool modules loadable with correct classes
  • Credential validation: success, invalid auth, missing key
  • Send SMS: success path (verifies API call args, text + JSON response)
  • Send SMS: auth failure, validation error, API error — all handled gracefully

Integration tests against real Plivo API (7 tests)

  • Credential validation: valid creds accepted, invalid token/ID/empty rejected
  • Real SMS delivery with UUID in response
  • Invalid credentials and invalid destination number return graceful errors

Test plan

  • Unit/smoke tests pass (pytest tests/tools/plivo_sms/ -v — 16 passed)
  • Integration tests pass against real Plivo API (7 passed, SMS delivered)
  • Install plugin in a Dify instance and verify end-to-end workflow

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/2502 **Author:** [@navi-](https://github.com/navi-) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/27/2026 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `feat/add-plivo-sms-tool` --- ### 📝 Commits (2) - [`f3aa651`](https://github.com/langgenius/dify-official-plugins/commit/f3aa65115ed787563773bc244683838274a4c957) feat: add Plivo SMS tool plugin - [`2627be3`](https://github.com/langgenius/dify-official-plugins/commit/2627be3d7901e6f605d119e0a3602ec8551dd52d) test: add unit, smoke, and integration tests for Plivo SMS plugin ### 📊 Changes **14 files changed** (+1926 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/tools/plivo_sms/test_integration.py` (+172 -0) ➕ `tests/tools/plivo_sms/test_manifest_and_provider.py` (+104 -0) ➕ `tests/tools/plivo_sms/test_smoke_invoke.py` (+219 -0) ➕ `tools/plivo_sms/.env.example` (+4 -0) ➕ `tools/plivo_sms/_assets/icon.svg` (+7 -0) ➕ `tools/plivo_sms/main.py` (+6 -0) ➕ `tools/plivo_sms/manifest.yaml` (+31 -0) ➕ `tools/plivo_sms/provider/plivo_sms.py` (+26 -0) ➕ `tools/plivo_sms/provider/plivo_sms.yaml` (+42 -0) ➕ `tools/plivo_sms/pyproject.toml` (+15 -0) ➕ `tools/plivo_sms/requirements.txt` (+2 -0) ➕ `tools/plivo_sms/tools/send_sms.py` (+46 -0) ➕ `tools/plivo_sms/tools/send_sms.yaml` (+51 -0) ➕ `tools/plivo_sms/uv.lock` (+1201 -0) </details> ### 📄 Description ## Summary - Add a new **Plivo SMS** tool plugin under `tools/plivo_sms/` - Sends SMS messages via the [Plivo](https://www.plivo.com/) messaging platform - Validates credentials by calling `account.get()` against the Plivo API - Returns message UUID and structured JSON on successful send ## Plugin structure ``` tools/plivo_sms/ ├── _assets/icon.svg ├── provider/ │ ├── plivo_sms.yaml # Credentials: auth_id, auth_token │ └── plivo_sms.py # ToolProvider with validation ├── tools/ │ ├── send_sms.yaml # Parameters: to_number, from_number, message │ └── send_sms.py # Tool implementation ├── main.py ├── manifest.yaml ├── requirements.txt # dify_plugin==0.7.1, plivo==4.59.5 ├── pyproject.toml └── uv.lock ``` ## Test coverage (23 tests, all passing) **Manifest & YAML validation** (7 tests) - Required manifest fields, type, runner config - Provider YAML credentials, tool references, extra.python.source - Tool YAML identity, descriptions, parameters, extra.python.source - Icon asset exists **Smoke invocation with mocked API** (9 tests) - Provider and tool modules loadable with correct classes - Credential validation: success, invalid auth, missing key - Send SMS: success path (verifies API call args, text + JSON response) - Send SMS: auth failure, validation error, API error — all handled gracefully **Integration tests against real Plivo API** (7 tests) - Credential validation: valid creds accepted, invalid token/ID/empty rejected - Real SMS delivery with UUID in response - Invalid credentials and invalid destination number return graceful errors ## Test plan - [x] Unit/smoke tests pass (`pytest tests/tools/plivo_sms/ -v` — 16 passed) - [x] Integration tests pass against real Plivo API (7 passed, SMS delivered) - [ ] Install plugin in a Dify instance and verify end-to-end workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 11:17:14 -05:00
yindo closed this issue 2026-02-16 11:17:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#2527