Skip to content

feat(messaging): Inkbox, Linq, Contiguity and WhatsApp through shared Hub contracts - #303

Open
drewstone wants to merge 15 commits into
mainfrom
feat/reachable-messaging-providers
Open

drewstone wants to merge 15 commits into
mainfrom
feat/reachable-messaging-providers

Conversation

@drewstone

@drewstone drewstone commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Implementation

Reuse the existing connector, webhook-router and ConversationEvent contracts. No additional OAuth service, credential vault, agent loop or product-owned provider catalog.

  • Inkbox email/SMS/iMessage, Linq v3 and corrected Contiguity actions/signatures.
  • Linq WhatsApp is a separate service and credential. Add owned-number/history/template reads and replies to an existing chat with a host-owned Idempotency-Key. Never substitute a template or a different sender after refusal.
  • Verify incoming bytes with the existing webhook router. Normalize fresh incoming snapshots, reject outbound/status echoes and preserve source identity.
  • WhatsApp's message.from is the owned destination, not the customer: preserve the customer as an opaque chat-scoped identity rather than leaking the owner's private conversation to a guessed address.
  • Reply targets derive from authenticated stored events; historical/incomplete input and unreviewed groups do not become automatic commands.
  • Export shared listConversationChannels() metadata so applications do not copy provider tables. This describes protocol support, not deployed-account readiness.

Verification — exact current head

Head: da8816583ec3a3c4be04f688ea9a2b57b4c40198.

5,595 tests passed; zero failures or skips. Full typecheck, packed-release verification and consumer packaging also passed.

Run: https://github.com/tangle-network/agent-integrations/actions/runs/35023138244
Artifact: messaging-verification-303, id 10418572765; exact source, structured test report, package and SHA256SUMS retained.

External provider HTTP is simulated at the wire boundary. Actual connectors, signature verification, normalization, reply planning and durable-router deduplication run in the tests. No live handset delivery, provider account, paid-number purchase or production deployment is claimed.

Release and host composition

Host #7334 supplies existing email/iMessage/SMS provisioning, encrypted signing keys and queued source-connection checks. The WhatsApp host companion must additionally register the WhatsApp verifier and its distinct /v1/webhook_endpoints setup contract before activation.

Publish through the normal package process and update the host/application lockfiles to the resulting release. The candidate retains the base package version: the existing registry 0.53.55 is NOT this feature build. Authorization companions: #302 and tangle-network/agent-app#579.

Provider contracts

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-12T22:50:42.169227Z 3fc04e3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fc04e30de

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/verify-pr.yml Outdated
Comment on lines +27 to +29
for (const name of ['inkbox', 'linq']) {
const line = `export { ${name}Connector } from './${name}.js'`;
if (!text.includes(line)) text += '\n' + line + '\n';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Commit the adapter registry with the source change

The reviewed commit neither exports inkboxConnector/linqConnector from src/connectors/adapters/index.ts nor updates data/bundled-adapter-manifests.json; this workflow patches those files only in the runner, and the persistence step is explicitly skipped for fork PRs. Such a PR can therefore pass because tests and release checks run against the modified working tree, while the merged or cherry-picked commit still omits both adapters from the public package and retains the old Contiguity manifest. Commit the generated registry files as part of the source change rather than relying on this conditional CI mutation.

Useful? React with 👍 / 👎.

Comment thread src/webhooks/messaging.ts
Comment on lines +40 to +41
&& part.slice(3).length === expected.length
&& timingSafeEqual(Buffer.from(part.slice(3)), Buffer.from(expected)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject non-base64 signatures before timing-safe comparison

When an attacker supplies a v1, candidate with the same JavaScript string length as the expected signature but containing a multibyte character, the character-count check passes while the resulting buffers have different byte lengths; timingSafeEqual then throws ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH. Because the router does not catch verifier exceptions, a malformed Linq signature produces an unhandled request failure instead of the intended 401. Validate/decode the candidate as base64 and compare buffer lengths before calling timingSafeEqual.

Useful? React with 👍 / 👎.

@drewstone drewstone changed the title feat(messaging): Inkbox, Linq and Contiguity through existing connectors and webhook ingress feat(messaging): Inkbox, Linq, Contiguity and WhatsApp through shared Hub contracts Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant