Skip to content

docs(readme): registry install and current public API (CL-8775) - #28

Merged
TheGreatAxios merged 18 commits into
mainfrom
cl-8775-readme-mailbox
Sep 22, 2026
Merged

TheGreatAxios merged 18 commits into
mainfrom
cl-8775-readme-mailbox

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rewrites the README's Quickstart to model real production usage instead of self-contained fakes.

  • Leads with the real entry point, mountMailbox on a Hono app, wrapped in one installMailbox(app, { databaseUrl, resolvePrincipal?, senderAddressFor, deliver }) function that owns the mount, matching how a hub mounts it under its own tenant prefix (/api/tenants/:tenantId/mailbox).
  • senderAddressFor and deliver are typed as MountMailboxOpts["senderAddressFor"] / MountMailboxOpts["deliver"] parameters the host supplies — no invented .example address, no console.log standing in for delivery. Prose explains what a real host answers with (a directory lookup for the address, the host's own request pipeline for delivery) without fabricating an implementation.
  • "Agent-originated mail" section wraps createMailboxPersist in wrapPersistMail(db, bus, { upstream, authorizeSender }), again taking the package's own AuthorizeMailboxSender / MailboxPersistArgs-typed upstream as host-supplied parameters — no invented sender_directory or transport_log tables.
  • Every option and type named is grepped against current src/ exports.

Verification

README-only. Both ts fences copied into scratch files and typechecked against this repo's own tsc (via a temporary paths mapping to src/index.ts); zero errors. Scratch files were not committed.

Registry install (npm/pnpm/yarn/bun) is the primary path.
Document the current public API. Fixes CL-8775.
Use Quickstart / How it works / Development / License instead of
Install / Use / Full example / Contributing.
@TheGreatAxios
TheGreatAxios merged commit 80d706a into main Sep 22, 2026
1 check passed
@TheGreatAxios
TheGreatAxios deleted the cl-8775-readme-mailbox branch September 22, 2026 05:20
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