feat(linq): add Linq iMessage/SMS/RCS integration#4831
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview The PR introduces 34 Docs and discovery get a new Reviewed by Cursor Bugbot for commit 88bf28c. Configure here. |
Greptile SummaryThis PR adds a complete Linq iMessage/SMS/RCS integration to Sim — 34 tools covering chats, messages, attachments, phone numbers, capability checks, contact cards, and webhook subscriptions — all wired through a single
Confidence Score: 5/5This PR is safe to merge; the new Linq integration is well-scoped, follows established patterns, and carries no changes to existing functionality. All 34 tools follow the same auth, error-handling, and response-mapping conventions as existing integrations. The file-upload proxy route correctly chains auth, access authorization, size validation, and the two-step Linq presigned-PUT flow. Prior review concerns around empty-body messages and voice-memo double-dereference were resolved in the earlier commit. The one remaining suggestion (guarding against empty PUT bodies in apps/sim/tools/linq/update_chat.ts and apps/sim/tools/linq/update_webhook_subscription.ts — both PUT endpoints can receive an empty body when all optional fields are omitted. Important Files Changed
Sequence DiagramsequenceDiagram
participant Block as Linq Block (UI)
participant Tool as linq_create_attachment tool
participant Route as /api/tools/linq/upload
participant Auth as checkInternalAuth
participant Storage as File Storage
participant LinqReg as Linq POST /attachments
participant S3 as Presigned PUT URL
Block->>Tool: "params { apiKey, file, filename, contentType }"
Tool->>Route: POST /api/tools/linq/upload (JSON body)
Route->>Auth: checkInternalAuth(request)
Auth-->>Route: "{ success, userId }"
Route->>Route: parseRequest(linqUploadAttachmentContract)
alt file provided (UserFile reference)
Route->>Storage: downloadFileFromStorage(userFile)
Storage-->>Route: buffer
else fileContent provided (base64)
Route->>Route: Buffer.from(fileContent, 'base64')
end
Route->>Route: validate size ≤ 100MB
Route->>LinqReg: "POST /attachments { filename, content_type, size_bytes }"
LinqReg-->>Route: "{ attachment_id, upload_url, required_headers, http_method }"
Route->>S3: PUT upload_url (file bytes, required_headers)
S3-->>Route: 200 OK
Route-->>Tool: "{ success: true, output: { attachmentId, downloadUrl, … } }"
Tool-->>Block: output.attachmentId
Reviews (4): Last reviewed commit: "feat(linq): add Linq iMessage/SMS/RCS in..." | Re-trigger Greptile |
5d63850 to
cc22eb1
Compare
|
@greptile |
|
@cursor review |
cc22eb1 to
21534a1
Compare
|
@greptile |
|
@cursor review |
21534a1 to
88bf28c
Compare
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 88bf28c. Configure here.
…ttachment upload)
88bf28c to
1fdf75f
Compare
Summary
linqblock (API-key auth, Communication) with an operation dropdown, conditional fields, and full param wiringfile-uploadsubBlock → internal/api/tools/linq/uploadroute (withRouteHandler+ contract +downloadFileFromStorage) that performs Linq's two-step pre-upload + presigned PUTType of Change
Testing
Tested manually.
bun run lintclean;bun run check:api-validation:strictpasses (route baseline bumped 758→759 for the new upload route, counted as Zod-backed via contract). Each tool independently re-audited against live docs via parallel review.Checklist