GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(linq): audit fixes + native auto-registering webhook trigger by waleedlatif1 · Pull Request #5301 · simstudioai/sim

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Comprehensive audit of the Linq integration (34 tools + block) against the live Linq partner API and OpenAPI spec, with fixes:
    • create_chat: read the sent message from the top-level response.message (was nested under chat, so always null)
    • get_message/edit_message: expose canonical deliveryStatus; mark is_delivered/is_read deprecated
    • send_message: fall back to from_handle.service/preferred_service for the service output
    • list_phone_numbers: migrate deprecated health_status → reputation, add forwardingNumber, guard JSON parse
    • check_imessage/check_rcs: guard response.json() parse
    • mark_chat_read: document 1:1-only / group no-op behavior
  • New native webhook trigger with automatic subscription lifecycle:
    • 6 triggers — message received / delivered / failed / read, reaction added, and all-events
    • Standard Webhooks signature verification (HMAC-SHA256 over {id}.{timestamp}.{body}, whsec_ secret)
    • createSubscription/deleteSubscription register and deregister the Linq webhook automatically on deploy/undeploy — no manual setup
    • event_id-based idempotency; full 27-value WebhookEventType enum for the all-events trigger
  • Regenerated integration docs

Type of Change

  • Bug fix
  • New feature

Testing

Tested manually. Typecheck clean, biome clean, check:api-validation passes. Tools and trigger validated field-by-field against the live Linq OpenAPI spec; signature scheme and event enum verified verbatim.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@waleedlatif1
feat(linq): audit fixes + native auto-registering webhook trigger
b1ea65b
Tools/block audit (validated against the live Linq partner API + OpenAPI spec):
- create_chat: read the sent message from top-level response.message (was always null)
- get_message/edit_message: expose canonical deliveryStatus; mark is_delivered/is_read deprecated
- send_message: fall back to from_handle.service/preferred_service for service output
- list_phone_numbers: migrate deprecated health_status to reputation; add forwardingNumber; guard JSON parse
- check_imessage/check_rcs: guard response.json() parse
- mark_chat_read: note 1:1-only / group no-op behavior

Native webhook trigger (auto register + deregister):
- 6 triggers (message received/delivered/failed/read, reaction added, all-events)
- Standard Webhooks signature verification (HMAC-SHA256, whsec_ secret)
- createSubscription/deleteSubscription manage the Linq subscription lifecycle
- event_id idempotency; full 27-value WebhookEventType enum for all-events
- regenerated docs
@vercel

vercel Bot commented Jun 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 1, 2026 12:13am

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Jun 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
New inbound webhook path with signature verification and stored signing secrets is security-sensitive; subscription lifecycle also depends on user-supplied API keys. Tool output shape changes (deliveryStatus, phone number fields) may affect existing workflows that relied on older fields.

Overview
Adds six Linq workflow triggers (message received/delivered/failed/read, reaction added, and all-events) with block UI wiring, trigger registry entries, and integration metadata/docs.

Implements a Linq webhook provider that verifies Standard Webhooks signatures (HMAC-SHA256, clock skew), maps payloads to trigger inputs, deduplicates on event_id, filters by trigger-specific event_type, and auto-creates/deletes Linq webhook subscriptions on deploy/undeploy using the trigger API key and optional phone-number filters.

Linq tool outputs are aligned with the current API: canonical deliveryStatus on get/edit message (with deprecated isDelivered/isRead), expanded status enum on send, service fallbacks on send, forwardingNumber and reputation (with health_status fallback) on list phone numbers, safer response.json() handling on several tools, tighter RCS check docs (E.164 only), and clarified mark chat read behavior for 1:1 vs group chats.

Reviewed by Cursor Bugbot for commit 1f8c0ef. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Jun 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the Linq integration with audited tool fixes and native webhook triggers. The main changes are:

  • Corrected Linq message, delivery status, and phone number output shapes.
  • Added six Linq webhook triggers with automatic subscription create and delete handling.
  • Added Standard Webhooks signature verification for Linq events.
  • Registered the new triggers in the Linq block, trigger registry, docs, and integration metadata.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/triggers/linq/utils.ts Defines shared Linq trigger event mappings, setup text, outputs, and trigger-only configuration fields.
apps/sim/lib/webhooks/providers/linq.ts Adds Linq webhook authentication, event matching, idempotency extraction, and subscription lifecycle handling.
apps/sim/tools/linq/list_phone_numbers.ts Updates phone number response parsing and output metadata for reputation and forwarding number fields.
apps/sim/tools/linq/list_webhook_subscriptions.ts Updates webhook subscription output metadata for nullable response fields.
apps/sim/blocks/blocks/linq.ts Registers the new Linq triggers and their configuration fields on the Linq block.

Reviews (4): Last reviewed commit: "fix(linq): mark nullable list_webhook_su..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Jun 30, 2026
View reviewed changes
Comment thread apps/sim/triggers/linq/utils.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/sim/tools/linq/list_phone_numbers.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot deployed to Preview June 30, 2026 23:37
View deployment
@waleedlatif1
refactor(linq): drop phantom create_chat response path, complete deli…
88e9b34
…veryStatus enum doc

Final validation against the raw Linq OpenAPI spec confirmed the sent message
is at chat.message (CreateChatResult exposes only chat), so the data.message
fallback was dead code. Also list all 7 DeliveryStatus values in the
send_message output description.
@vercel
vercel Bot temporarily deployed to Preview June 30, 2026 23:38 Inactive
@waleedlatif1 waleedlatif1 mentioned this pull request Jun 30, 2026
v0.7.18: landing, tools depth, media embeds in md editor, sonnet 5 #5296
Merged
@waleedlatif1
fix(linq): namespace trigger credential keys, handle edit_message 204…
3975117
…, nullable forwardingNumber

Review + final pre-merge audit fixes:
- Trigger apiKey/phoneNumbers subblocks collided with the block's tool apiKey
  state key — rename to triggerApiKey/triggerPhoneNumbers (per the namespacing
  rule from #2133) and read them in the webhook handler
- edit_message: the API returns 204 No Content when editing an already-deleted
  message; guard the empty body instead of throwing on response.json()
- list_phone_numbers: mark forwardingNumber output nullable (returns null)
- check_rcs: tighten address hint (RCS is phone-only, not email)
- regenerated docs
@waleedlatif1

waleedlatif1 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jun 30, 2026
View reviewed changes
Comment thread apps/sim/lib/webhooks/providers/linq.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Jun 30, 2026
View reviewed changes
Comment thread apps/sim/lib/webhooks/providers/linq.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot deployed to Preview June 30, 2026 23:59
View deployment
@waleedlatif1
fix(linq): read triggerApiKey in webhook deleteSubscription
8f8db29
deleteSubscription still read config.apiKey after the credential rename, so
undeploy would skip the DELETE and orphan the Linq subscription. Match
createSubscription's triggerApiKey key.
@vercel
vercel Bot temporarily deployed to Preview July 1, 2026 00:06 Inactive
@waleedlatif1

waleedlatif1 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jul 1, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 8f8db29. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
greptile-apps[bot]
greptile-apps Bot reviewed Jul 1, 2026
View reviewed changes
Comment thread apps/sim/tools/linq/list_phone_numbers.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
fix(linq): mark list_phone_numbers healthStatus output nullable
4a7fc21
healthStatus returns null when Linq omits reputation/health_status; declare
nullable: true to match the runtime value (same as forwardingNumber).
@vercel
vercel Bot temporarily deployed to Preview July 1, 2026 00:11 Inactive
@waleedlatif1
fix(linq): mark nullable list_webhook_subscriptions item fields
1f8c0ef
phoneNumbers/createdAt/updatedAt are null-coerced by mapWebhookSubscription;
declare nullable: true on the array-item schema to match runtime (consistent
with the top-level webhook outputs' optional flags).
@vercel
vercel Bot temporarily deployed to Preview July 1, 2026 00:13 Inactive
@waleedlatif1

waleedlatif1 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jul 1, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 1f8c0ef. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waleedlatif1
waleedlatif1 merged commit c1b84e4 into staging Jul 1, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the worktree-linq-audit branch July 1, 2026 00:19

This branch was previously deployed

1 inactive deployment
Preview — 1f8c0ef5 Deployed Jul 1, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@waleedlatif1
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.