Skip to content

fix(examples): propagate Samva SDK 0.44 and reply only to delivered mail - #124

Merged
aryasaatvik merged 3 commits into
mainfrom
fix/inbound-replies-disposition
Nov 13, 2026
Merged

aryasaatvik merged 3 commits into
mainfrom
fix/inbound-replies-disposition

Conversation

@aryasaatvik

@aryasaatvik aryasaatvik commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Propagates Samva SDK 0.44 and CLI 0.39 into the maintained integrations. The inbound-replies example and the inbound-email cookbook now answer only delivered mail.

SDK 0.44 makes disposition (delivered, quarantined, isolated) and reason required on the message.received webhook, and @samva/webhooks validates both. They record the decision Samva made when the message arrived. Samva still sends the event, with its body, for mail it quarantined on arrival, so a receiver that replies automatically must check disposition first.

Repository surface Change Disposition
Inbound-replies example The handler returns { accepted: false, reason: "not-delivered" } for held mail without reading the conversation or sending. Its guard validates both fields; it has a new no-send test and a README note. affected
Inbound-email cookbook The handler's payload type gains both fields and a delivered-only check before replying. affected
Both adapters, all example manifests, Supabase Deno import map SDK ranges move to ^0.44.0; the Deno import pins samva@0.44.0; the TSX example uses CLI ^0.39.0. The lockfile resolves samva@0.44.0, @samva/webhooks@0.44.0, and @samva/cli@0.39.0. affected
Root, adapter, and TSX example READMEs; cookbooks Current-minor references move to 0.44 and CLI 0.39. affected
Plugin README compatibility section Covers the delivered-only rule, sendable senders, starting a template from a brief, --gallery-template, and the API-side 422 checks. affected
.tegami/2026-11-14-sdk-044.md Minor bump of @samva/better-auth and @samva/email-sdk for the peer-range change. affected
Adapter send paths email.send and messages.send payloads are unchanged in 0.44. unaffected
Mailbox-agent examples They read mailbox.message.received, which 0.44 did not change. unaffected
TSX template docs templates init without a flag still starts from the canonical project; no file uses the removed --starter. unaffected
Bundled skill and provenance.json Not refreshed here. unchanged

Source release: samva 0.44.0 and @samva/webhooks 0.44.0 (AryaLabsHQ/samva#3030 and the pending changesets of #3034, #3035, and #3039). It is on npm as latest and deployed in production.

Checklist

  • Conventional Commit title
  • bun run build, typecheck, test (225 tests across 15 files), lint, format:check, release:packages:check, and validate:agent-plugin pass
  • Added or updated tests: a held-message no-send case; the fixtures carry disposition: "delivered" and reason: null
  • Updated READMEs, cookbooks, the plugin compatibility section, and the Tegami note

Samva's message.received event now carries the disposition committed at
receipt. The inbound-replies handler ignores quarantined and isolated
mail, so a forged or malicious message never draws a reply.
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The reviewed changes appear safe to merge in the rollout order stated in the PR.

Summary

Limits automatic inbound email replies to delivered mail and updates integrations and examples to samva@^0.44.0.

  • The inbound reply example answers only mail marked as delivered.
  • Samva examples and adapters now target SDK 0.44 and CLI 0.39.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Inbound webhook] --> B[Verify signature and check event fields]
  B --> C{Delivered mail?}
  C -->|No| D[Return without reading or sending]
  C -->|Yes| E[Skip automatic replies and duplicates]
  E --> F[Read conversation]
  F --> G{Read succeeded?}
  G -->|No| H[Return or throw for retry]
  G -->|Yes| I[Send reply using the webhook ID]
  I --> J[Record completion after send succeeds]
Loading

Reviews (3) · Last reviewed commit: "chore(deps): propagate Samva SDK 0.44 an..." · Reviewed by Greptile

@aryasaatvik

Copy link
Copy Markdown
Member Author

@greptile review

@aryasaatvik aryasaatvik changed the title fix(examples): reply only to delivered inbound mail fix(examples): propagate Samva SDK 0.44 and reply only to delivered mail Nov 13, 2026
@aryasaatvik

Copy link
Copy Markdown
Member Author

@greptile review

@aryasaatvik
aryasaatvik merged commit 6ba9e44 into main Nov 13, 2026
2 checks passed
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