A messenger's costs live in its files, so what may be attached is a rule
this package can answer: checkAttachment (allowlist, a ceiling per kind,
a count per message, a quota per person), the lifetime predicates, and
the Attachment type a Message can carry. Nothing is stored or signed
here.
readState answers none/some/all over the humans a message was for. In
OrangeCat an assistant that had joined a conversation never read
anything, so every later message stayed at delivered.
mentionsAny/mentionMatcher export the whole-word matcher whenMentioned
used, now aware of letters outside ASCII.
mergeMessages, visibleMessages and unreadMessages are generic over the
caller's message type.
Released as 0.1.2: additive, inside every consumer's ^0.1.1 range.
Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6
Co-authored-by: Claude <noreply@anthropic.com>
Owner, 2026-11-06: the fleet's packages belong under the @bitbaum npm
organization; this one was published earlier, unscoped, and never moved
(fleet docs/package-scope-migration-plan.md). Name, imports in tests, examples
and docs change; no API changes. The old name stays installable and is
deprecated once no adopter uses it.
Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD
Co-authored-by: Claude <noreply@anthropic.com>
* chore: add a formatter, matching the style this repo already writes
singleQuote=true was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.
Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* style: format with prettier (12 files)
Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore: teach git blame to skip the reformat
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Each invariant was verified to fail when broken: forcing the visibility
window open fails 4 targeted tests, and swapping the per-participant read
mark for a shared one fails exactly the test that names that bug.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Permission is participation, never role. Unread is a per-participant
high-water mark, never a flag on the message row. An AI is a participant
and reads through the same visibility window as everyone else.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>