PHPackages                             artisan-build/sink-contracts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. artisan-build/sink-contracts

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

artisan-build/sink-contracts
============================

The thin, versioned mail capture envelope shared between sink-client and sink-server.

v0.1.0(yesterday)01↑2900%2MITPHPPHP ^8.3

Since Aug 24Pushed yesterdayCompare

[ Source](https://github.com/artisan-build/sink-contracts)[ Packagist](https://packagist.org/packages/artisan-build/sink-contracts)[ RSS](/packages/artisan-build-sink-contracts/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (2)

sink-contracts
==============

[](#sink-contracts)

> **Read-only mirror.** This repository is a read-only split of the [`artisan-build/sink`](https://github.com/artisan-build/sink) monorepo. Issues and pull requests are disabled here — please open them on the monorepo.

The versioned wire envelope shared between `sink-client` and `sink-server`.

This package is intentionally tiny: it is the single place Sink's wire compatibility will live.

The package is dependency-light by design. The idempotency key is an opaque client-supplied string; this package does not validate or mint ULIDs.

Envelope
--------

[](#envelope)

`ArtisanBuild\SinkContracts\Envelope` is the wire DTO that both `sink-client` and `sink-server`share. It serializes to JSON with these snake-case keys, in this order:

- `envelope_version` — integer major version. Current version: `1`.
- `idempotency_key` — client-minted opaque unique key for this send.
- `sent_at` — client-observed ISO-8601 timestamp string.
- `stream` — nullable string, reserved for future per-run isolation. V1 senders leave this `null`, but the key is always present on the wire.
- `message` — base64-encoded raw RFC-822 MIME string. Sink contracts treat it as opaque bytes.
- `truncation` — one of `none`, `attachments_dropped`, or `headers_only`. Defaults to `none`.

There is no `app` field in the envelope. The server resolves the source application from the bearer token used to ingest the message.

Compatibility
-------------

[](#compatibility)

The envelope evolves additively within a major version. New optional fields may be added, but existing fields are never removed or repurposed. Parsers therefore ignore unknown extra keys and supply defaults for absent optional keys.

Breaking wire changes require a new major version so servers can reject senders that are ahead with a loud 4xx before attempting to parse the payload.

Installation
------------

[](#installation)

```
composer require artisan-build/sink-contracts
```

You usually don't install this directly; it arrives as a dependency of `sink-client` or `sink-server`.

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1053395?v=4)[Ed Grosvenor](/maintainers/edgrosvenor)[@edgrosvenor](https://github.com/edgrosvenor)

---

Top Contributors

[![edgrosvenor](https://avatars.githubusercontent.com/u/1053395?v=4)](https://github.com/edgrosvenor "edgrosvenor (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

contractslaravelmailenvelopesink

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/artisan-build-sink-contracts/health.svg)

```
[![Health](https://phpackages.com/badges/artisan-build-sink-contracts/health.svg)](https://phpackages.com/packages/artisan-build-sink-contracts)
```

###  Alternatives

[railsware/mailtrap-php

The Mailtrap SDK provides methods for all API functions.

60981.0k](/packages/railsware-mailtrap-php)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.8M1](/packages/vemcogroup-laravel-sparkpost-driver)[modernmcguire/mailthief

A Laravel package to catch outbound mail (similar to Mailtrap) that also provides a UI to view them.

319.1k](/packages/modernmcguire-mailthief)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
