Repository navigation
feat(sms): add Twilio MMS support - #118664
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:19 PM ET / 21:19 UTC. ClawSweeper reviewWhat this changesAdds Twilio MMS receive and send support to the SMS plugin, including bounded inbound attachment retrieval, temporary hosted outbound media URLs, and related hosted-media SDK hardening. Merge readinessKeep this maintainer-authored feature PR open. Current Priority: P3 Review scores
Verification
How this fits togetherThe SMS plugin accepts Twilio webhook forms, turns authorized inbound messages into agent context, and sends agent replies through Twilio. MMS adds attachment download on ingress and a temporary authenticated media-hosting route so Twilio can fetch outbound attachments. flowchart LR
A[Twilio MMS webhook] --> B[SMS plugin route]
B --> C[Validate sender and media URLs]
C --> D[Download bounded attachments]
D --> E[Agent inbound context]
E --> F[SMS reply with attachment]
F --> G[Temporary hosted media URL]
G --> H[Twilio Messages API]
Decision needed
Why: The implementation is intentionally additive, but the SDK is a third-party plugin contract and this PR also changes a sensitive local-file authorization path; that permanence decision cannot be inferred from tests alone. Before merge
Agent review detailsSecurityNone. PR surfaceSource +1285, Tests +3242, Docs +28, Config 0, Generated 0, Other 0. Total +4555 across 42 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep Twilio-specific retrieval, limits, and hosting policy in the SMS plugin, land the additive hosted-media SDK additions only after exact-head boundary checks pass, and preserve the existing text-only path unchanged for operators not sending attachments. Do we have a high-confidence way to reproduce the issue? Yes, source proves the current-main limitation: Is this the best way to solve the issue? Yes, with the SDK decision confirmed: the branch uses the existing hosted-media seam while leaving Twilio-specific authentication, URL validation, limits, and webhook behavior in the SMS plugin rather than adding channel policy to core. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 361c07f9932b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
cafcc86 to
0fdd04b
Compare
5f8b9c6 to
2ac8111
Compare
0fdd04b to
ddd6ce1
Compare
|
Maintainer decision for #118664:
The other Rank-up move, reconstructing the branch as MMS-only after the prerequisite changes landed, is complete at @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ddd6ce1 to
960a550
Compare
|
Exact-head closeout for
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
* origin/main: (90 commits) fix(googlechat): recover durable lanes after oversized attachments (#118986) test(qa): cover runtime telemetry evidence (#118950) fix(gateway): resolve SQLite usage details (#118918) test(cron): cover durable scheduler state (#118981) test(gateway): cover node exec approval relay (#118825) test(qa): add Active Memory recall coverage (#118963) test(qa): promote package-backed Docker artifact proof (#118826) test(qa): cover diagnostic event boundary (#118844) test(gateway): cover WebSocket runtime contracts (#118797) fix(signal): drain accepted websocket messages before shutdown (#118975) fix(plugins): remove stale load paths during uninstall (#118930) test(qa): cover bundled runtime discovery (#118922) chore(clawhub): cover plugin release policy contracts (#118971) test(qa): cover support export and stability (#118956) fix(feishu): enforce exact signed webhook request boundaries (#118758) feat(sms): add Twilio MMS support (#118664) test(gateway): prove TLS certificate pinning (#118812) test(qa): cover tool policy and sandbox gates (#118925) fix(cli): keep update dry-run state immutable (#118856) fix(scripts): honor last repeated CLI flag value (#118710) ... # Conflicts: # pnpm-workspace.yaml
* feat(sms): add Twilio MMS support * fix(sms): harden hosted media bearer handling * fix(sms): discard staged media before dispatch * fix(sms): close staged media cleanup races * fix(sms): finalize MMS metadata and race proof * fix(media): bind local reads to authorized descriptors * fix(sms): close MMS review gaps * fix(media): make inbound root matching type-safe * fix(media): route bounded reads through fs-safe facade * test(media): satisfy async lint contracts
Related: #118044
What Problem This Solves
The Twilio SMS channel accepted text only. Inbound MMS metadata was discarded, media-only webhooks could not reach the agent, and outbound attachments could not be sent through Twilio.
Why This Change Was Made
NumMedia,MediaUrlN, andMediaContentTypeNfields after Twilio signature validation.MediaUrlvalues.Maintainer Decision
mediaAccessforwarding and opt-in reject-new capacity semantics as additive hardening of the existing Plugin SDK hosted-media contract. This adds no new SDK subpath or shared delivery-observation API.User Impact
Twilio operators can receive media-only or mixed MMS messages and send supported attachments from the existing SMS channel. Text-only behavior remains unchanged, and invalid or oversized media fails explicitly instead of disappearing.
No changelog entry: OpenClaw's release changelog generation owns final release notes.
Evidence
Exact head:
8992a7cc87b18c4abdfdf292899a62e3ffc1832aOPENCLAW_TESTBOX=1 scripts/pr prepare-run: passed; the remote branch already matched the reviewed prep head.@openclaw/fs-safeimport now routed through the core-only infra facade, and three test-only async-lint findings. No independent runtime, test-type, or extension-boundary defect remained.MediaUrlform submission, hosted GET/HEAD retrieval, bearer rejection, expiry, pre-dispatch cleanup, retention after partial or ambiguous dispatch, and descriptor-bound local reads.git diff --check origin/main...HEADpassed.