@mosadd/mcp 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +415 -410
  2. package/LICENSE +21 -0
  3. package/dist/bin/mcp.js +1 -1
  4. package/dist/{chunk-VMMJJYXF.js → chunk-J2S44U5R.js} +52 -27
  5. package/dist/index.d.ts +6 -6
  6. package/dist/index.js +1 -1
  7. package/package.json +1 -1
  8. package/src/__tests__/blob-upload.test.ts +1 -1
  9. package/src/__tests__/{flota-jawnie.test.ts → fleet-plaintext.test.ts} +59 -60
  10. package/src/__tests__/integration.test.ts +1 -1
  11. package/src/__tests__/mdm-e2ee.test.ts +3 -3
  12. package/src/__tests__/mdm-mcp-readable.test.ts +95 -95
  13. package/src/__tests__/mirc-invite.test.ts +1 -1
  14. package/src/__tests__/mirc-voice.test.ts +82 -0
  15. package/src/__tests__/mrag-search-diagnostics.test.ts +78 -0
  16. package/src/__tests__/presence.test.ts +2 -2
  17. package/src/__tests__/server.test.ts +3 -3
  18. package/src/__tests__/tool-count-consistency.test.ts +4 -4
  19. package/src/crypto/channel-e2ee.ts +1 -1
  20. package/src/crypto/mdm-session.ts +14 -14
  21. package/src/providers/supabase-dm.ts +1 -1
  22. package/src/providers/supabase.ts +8 -8
  23. package/src/server.ts +4 -4
  24. package/src/tools/channel-payload.ts +3 -3
  25. package/src/tools/index.ts +13 -13
  26. package/src/tools/knowledge.ts +384 -351
  27. package/src/tools/mail-aliases.ts +1 -1
  28. package/src/tools/mail-provenance.ts +1 -1
  29. package/src/tools/mdm-as-agent.ts +3 -4
  30. package/src/tools/mdm.ts +15 -13
  31. package/src/tools/mirc-edge.ts +4 -4
  32. package/src/tools/mirc-members.ts +1 -1
  33. package/src/tools/mirc-messages.ts +36 -12
  34. package/src/tools/mirc.ts +1 -1
  35. package/src/tools/mroom-messages.ts +1 -1
  36. package/src/tools/presence.ts +10 -10
  37. package/src/tools/ptt-ingest.ts +1 -1
  38. package/src/tools/threat.ts +1 -1
  39. package/src/tools/voice-format.ts +30 -7
package/CHANGELOG.md CHANGED
@@ -1,410 +1,415 @@
1
- # Changelog
2
-
3
- All notable changes to `@mosadd/mcp` are documented here.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project follows [Semantic Versioning](https://semver.org/). The `3.0.0-alpha.N` pre-releases led up to the stable 3.0.0.
7
-
8
- ## [Unreleased]
9
-
10
- ## [3.0.0] — 2026-11-16
11
-
12
- The first stable release of the 3.0 line. Same tools as `3.0.0-alpha.59`: default host `https://api.mosadd.com`, `mRAG_search` with `answer`. `latest` on npm now points here; install with `npx -y @mosadd/mcp`.
13
-
14
- ## [3.0.0-alpha.59] — 2026-11-16
15
-
16
- ### Added
17
- - **`mRAG_search` accepts `answer: boolean`** (default `false`). It is forwarded to `rag-query`: by default the tool returns the ranked sources only; pass `answer: true` to also get a generated answer grounded in them.
18
-
19
- ### Fixed
20
- - **Default backend host.** `MOSADD_API_KEY` login (`hub-key-exchange`) and the mail-provenance / mIRC edge defaults pointed at the retired cloud `rooffhgbxafyjcwmwpsy.supabase.co`, which no longer answers. They now default to `https://api.mosadd.com` (`MOSADD_HUB_URL` still overrides). A test fails if any source file carries the old host again.
21
-
22
- ## [3.0.0-alpha.58] — 2026-11-16
23
-
24
- ### Added
25
- - **CLI:** `npx @mosadd/mcp --version`, `--help` and `tools` print (version, commands + env vars, all tools grouped by module) and exit instead of starting the stdio server.
26
-
27
- ### Fixed
28
- - The "ready" log line now reports the `package.json` version (it said `3.0.0-alpha.0`).
29
-
30
- ## [3.0.0-alpha.57] — 2026-11-15
31
-
32
- ### Fixed
33
- - **`mTALK_open {label}` opens a room you own.** The room id is now `mosadd-room-<your identity id>-<label>`;
34
- you and your accepted contacts can join it, a stranger cannot (before: one shared `mosadd-room-<label>` for every
35
- account, refused to everyone, including its creator).
36
- - **`mDM_list` returns voice notes with their transcript and recording.** Voice/PTT messages carry
37
- `voice: { transcript, audio_url, duration_ms }` (signed URL, read with the caller's own permissions) instead of a
38
- bare caption.
39
-
40
- ## [3.0.0-alpha.56] — 2026-11-10
41
-
42
- ### Added
43
- - **`mDM_send_as_agent` `thread_label?`** (LINEAR-6577) — same optional label alphabet as
44
- `mDM_send` (`[a-zA-Z0-9._-]`, 1–120). Omit = MAIN unlabeled thread (ops lock for SOVEREIGN/King
45
- until rename/UI merge). A new label opens a new `dm:A:B:label` thread.
46
-
47
- ## [3.0.0-alpha.55] — 2026-09-29
48
-
49
- ### Fixed
50
- - **Channel/room reader: the King's posts read as text, not `<ciphertext>`** (ZERO SZYFROWANIA,
51
- rozkaz Krola 28.09). `mIRC_list_messages` and `mROOM_list_messages` understood only a JSON
52
- `mosadd.chat.v1` envelope and stamped everything else `<ciphertext>` — including every post
53
- the app writes (plain UTF-8 in base64, `ircApi.ts encodePayload`) on the OPEN, keyless #adm and
54
- #command (measured 28–29.09: f159c8d7, 776b3e9a). New shared decoder `tools/channel-payload.ts`
55
- (same rule as `mdm.ts unpackPayload` and the mKEEPER bridge `decodePayload.mjs`): envelope →
56
- its `text`; plain UTF-8 → the text; other JSON (voice `{audio, mime, dur}`) → raw, so
57
- `formatVoiceIfAny` shapes it (mROOM now too). `<ciphertext>` stays ONLY for a sealed envelope
58
- the line cannot open — group-key `{iv, ciphertext, hmac}` without the key, `mosadd.e2ee.*` —
59
- and for bytes that are not UTF-8 text.
60
- - **`mDM_send`: conversations with fleet lines and with the King always in the clear.** Besides
61
- an agent line on either side (alpha.54), a note to SELF (`to === selfId`) now goes plain too
62
- (MCP sessions on the King's key sealed his own thread; `message-send` refuses envelopes there
63
- with `fleet_plaintext_only`). The result carries `reason: "fleet_plaintext"` (plain) or
64
- `"human_to_human"` (E2EE). Person↔person stays X3DH + Double Ratchet, unchanged.
65
- - **Tool descriptions:** `mDM_send_unencrypted` is no longer "DEPRECATED / prefer mDM_send / will
66
- be removed" — that text steered every LLM line to the sealing tool. Both DM send tools now say:
67
- conversations with fleet lines and with the King are ALWAYS in the clear.
68
- - Lock `src/__tests__/flota-jawnie.test.ts` (13 tests): red on alpha.54 (7/13, the King's text →
69
- `<ciphertext>`), red under five sabotages of the new rules, green after.
70
-
71
- ## [3.0.0-alpha.54] — 2026-09-27
72
-
73
- ### Fixed
74
- - **`mDM_send` — readable on EVERY key of the identity, and never a false reason in the app**
75
- (correction of alpha.53 after independent verification, LINEAR-6089 follow-up). alpha.53 seeded
76
- the mDM identity from ONE API key and let an agent line (re)publish it. An identity holds many
77
- keys (each OAuth connector mints its own; measured 27.09: general@ has 8 active, 7 of 17 agent
78
- identities have several), so the key directory flapped between per-key identities: a `s1.`
79
- copy opened only under the key that wrote it, and `r1.` copies stopped opening for the
80
- recipient after the next send from another key. alpha.53 also typed sends on a PERSON's key
81
- `txt` with a `s1.` copy the app can never open, so the app told the owner a false reason
82
- ("sent from another device" / "unlock your identity") instead of "sent by MCP".
83
- - **Agent lines send in the clear** — the King's rule of 20.09 (no E2EE for lines<->lines,
84
- lines<->King, human->line), the same rule the app applies (`peerIsAgent`). When the sender
85
- or the recipient is `kind = 'agent'`, `mDM_send` writes plain UTF-8, type `txt`, and never
86
- touches the key directory. Every key of the line and the recipient's app on every device read
87
- it. Result field `mode: "plaintext_agent_lane"`, `encrypted: false`.
88
- - **Human<->human stays E2EE**, but on a person's key MCP never writes their key directory
89
- automatically (neither over the app's bundle nor on an empty directory), writes no `s1.`
90
- copy, and types the envelope `text`, which the app reads as "sent by MCP, no copy for this
91
- device". A note-to-self is sealed to the app's bundle and opens in the app.
92
- - **`mDM_publish_keys` no longer overwrites a person's app bundle** (`published: false`,
93
- `identity: "foreign"`, with a note). It may fill an empty directory. Agent lines may still
94
- publish explicitly.
95
- - **`autoPublishKeys`** (stdio) follows the same policy (`bundlePolicyForKind`): agent lines and
96
- people write nothing; other lanes (radio) publish on an empty directory as before.
97
- - New `SupabaseDmProvider.peerKind(id)`; `ensureOwnBundlePublished` takes a `BundlePolicy` and
98
- can return `"absent"`.
99
-
100
- ## [3.0.0-alpha.53] — 2026-09-27
101
-
102
- ### Fixed
103
- - **`mDM_send` — the envelope is born READABLE, for the sender and for the recipient**
104
- (follow-up to LINEAR-6089). Measured on prod 27.09: every DM sent through the hosted gateway
105
- was sealed by a brand-new random identity (a fresh `InMemoryMdmKeyStore` per HTTP request),
106
- carried no `self_payload` / `recipient_self_payload`, and was typed `text`. The sender could
107
- never read its own message again; the recipient only through a live ratchet session.
108
- - **One identity per login secret.** With an API key the mDM identity is derived from it by
109
- HKDF (`SeededMdmKeyStore`, labels identical to the app's `deriveOwnMaterialFromSeed`: zero
110
- one-time prekeys, signed-prekey id 1). Every gateway instance, call and restart = same keys.
111
- - **The key directory agrees with it** (`ensureOwnBundlePublished`): empty → publish; an
112
- AGENT line with a stale bundle → replace; a PERSON's app-anchored bundle → never overwritten
113
- (the send still works, only the recipient copy is skipped). `autoPublishKeys` uses the same
114
- policy instead of a blind publish.
115
- - **`self_payload`** ("s1.", AES-GCM under the seed's self-read key) and
116
- **`recipient_self_payload`** ("r1.", AES-GCM under HKDF(ECDH(sender IK, recipient IK))) —
117
- the app's exact formats, so `mDM_list` on any process and the app on any device open them.
118
- - **`message_type: "txt"`** (the app's type; `text` is legacy) for `mDM_send` and
119
- `mDM_send_unencrypted`.
120
- - `mDM_list` opens own messages from `self_payload` and incoming ones from
121
- `recipient_self_payload` before touching the ratchet.
122
- - `mDM_send` result gains `sender_copy`, `recipient_copy`, `identity` (additive).
123
- - `server.json` version drifted to alpha.51 while the package was alpha.52; both now alpha.53.
124
-
125
- ## [3.0.0-alpha.33] — 2026-08-11
126
-
127
- **The republish that closes a three-week gap between the repo and the client's disk.**
128
- `3.0.0-alpha.32` was published 2026-07-19 and every change since then lived only in git.
129
- Measured on the published tarball that day: it registers **71** tools while its own npm
130
- description advertises **69** and the website advertises **77**. Three numbers, one
131
- package. This release makes the published artifact the thing the docs describe.
132
-
133
- ### Added
134
- - **`mAYL_send_as_agent`** re-registered (2026-07-29) after the hub-claim → mp0st-send
135
- chain was proven on an authenticated call.
136
- - **`mTALK_ingest_ptt`** re-registered (2026-07-29) after the ingest path was repointed
137
- at `rag-transcribe` and returned a real `200 {"queued":true}` on prod.
138
- - **`mAYL_agentbox_provision` / `_list` / `_extend` / `_release`** (2026-08-06,
139
- LINEAR-5201) — an agent mints, lists, extends and releases its OWN two-way disposable
140
- inbox (`agent-<hex>@mosadd.com`). `create_inbox` parity with AgentMail, on our stack.
141
- - **`mRAG_graph_refresh` / `_overview` / `_neighbors` / `_timeline`** (2026-08-11) — the MCP
142
- door onto the per-user knowledge graph (`kg_*` RPCs). Search finds text; these walk who/what/
143
- when (parties, connections, dated timelines), built from message METADATA only, never bodies.
144
- - Stdio hub-key auth (`MOSADD_API_KEY`) in `src/bin/mcp.ts` — the local stdio server can
145
- exchange a hub key instead of requiring the BYOK env trio.
146
-
147
- Tool count **71 → 81**: six tools existed in the repo but had **never been published**
148
- (71 → 77 — an agent installing `@mosadd/mcp` got 71 while every doc surface promised 77),
149
- AND four new `mRAG_graph_*` knowledge-graph traversal tools were added 2026-08-11 (77 → 81).
150
- `TOOL_COUNT` (`= allTools.length`) stays the single source of truth.
151
-
152
- ### Changed
153
- - **`mRAG_search` can now filter on the source types the writers actually stamp.**
154
- The `source_types` enum was missing `file` and `ptt` — `file` is what `mRAG_ingest`
155
- itself writes (its default, and where `note` ingests are mapped), `ptt` is what
156
- `mTALK_ingest_ptt` writes. Measured on prod 2026-08-11: 63 indexed rows were
157
- unreachable by any `source_types` filter. The tool advertised a filter that could not
158
- see its own writes.
159
- - **`mURL_create` no longer promises a status it does not set.** `murl-manage` applies
160
- `status` only on the INSERT of a new row; on an existing channel it writes owner +
161
- branding and leaves status untouched. Since mURL rooms auto-create on first activity,
162
- "already exists" is the COMMON case — so the old "set initial status" wording was
163
- wrong nearly every time it was read. Schema + description now say so and point at
164
- `mURL_update`.
165
- - **`mIRC_post_message` encryption wording.** It posts server-readable plaintext base64
166
- on EVERY access mode, private and password channels included; the app's group-key
167
- encryption is not something the toolkit holds a key for.
168
-
169
- ### Fixed
170
- - Doc surfaces across the repo that hand-typed **73** while `TOOL_COUNT` was 77 (README
171
- breakdown, `packages/mcp/README.md`, `apps/mcp-http/README.md`, dev docs, Realm,
172
- examples). The anti-drift vitest gate pinned one regex per file, so a single corrected
173
- line kept the gate green while the sentence around it stayed wrong — the gate now pins
174
- the PER-MODULE numbers too, not just the total.
175
-
176
- ## [3.0.0-alpha.32] — 2026-07-19
177
-
178
- ### Added
179
- - **`mIRC_discover`** — browse the PUBLIC channel directory (open channels whose
180
- owners set `discoverable=true`). Filter by name, paginated; join a result with
181
- `mIRC_join` (open = one-click). Private/password/partner channels never appear.
182
- - **`mIRC_report`** — report a channel for abuse/moderation (routes to the shared
183
- `content_reports` store as `channel:<id>`), the moderation floor for public discovery.
184
- - **`discoverable`** flag on `mIRC_create` / `mIRC_update` (honoured only for
185
- `access_mode=open`), plus `voice` + `files` added to the capabilities enum.
186
- - Tool count **69 → 71** (mIRC **22 → 24**); `TOOL_COUNT` (`= allTools.length`) stays
187
- the single source of truth.
188
-
189
- ### Changed
190
- - **Encryption posture wording corrected across docs.** `mIRC_post_message` posts a
191
- **server-readable** plaintext payload — the per-channel group-key TEXT E2EE is the
192
- mosadd.com **app** (supported clients), not the toolkit (parity is the next crypto
193
- milestone). Tool descriptions, README, MANIFESTO, e2ee-posture and the registry
194
- copy now state this instead of implying private/password channels are E2EE via the
195
- toolkit. Voice/PTT is always server-relayed (LiveKit SFU, DTLS-SRTP hop-by-hop).
196
-
197
- ## [3.0.0-alpha.31] — 2026-07-17
198
-
199
- ### Fixed
200
- - **`mURL_create` / `mURL_update` branding validation.** The `branding` arg used
201
- `z.record(z.any())` — the Zod v3 single-argument form — which fails typecheck under
202
- this project's Zod v4, where `z.record` requires both a key and a value schema. Now
203
- `z.record(z.string(), z.any())`. alpha.30 shipped with the pre-fix source; alpha.31
204
- corrects it so the published package builds clean and validates branding correctly.
205
- - **CI green (repo).** Synced the version refs (`server.json`, `server.ts` serverInfo,
206
- `marketplace.json`) to `package.json`, and updated the MCP smoke test to expect
207
- `mAYL_send` — the `mp0st_*` aliases were retired in alpha.28.
208
-
209
- ## [3.0.0-alpha.30] — 2026-07-17
210
-
211
- ### Added
212
- - **`comms_embed_create` RE-REGISTERED — tool count 68 → 69.** The paste-in
213
- live-channel widget is finally end-to-end real: `https://embed.mosadd.com/v1.js`
214
- is deployed (served by the mosadd Vercel project; skins are inlined in the
215
- bundle), and the whole backend (`embed-keys` publishable keys, `mirc-embed-token`
216
- Origin-allowlisted 5-min JWTs with MAT plan tiers, `embed-plan-settings` PAYG,
217
- GDPR `embed-dsr-delete`) was already live. The tool mints an `m_pk_live_…` key
218
- and returns a `<script>` snippet with skin + position (incl. sidebar-left/right)
219
- options. Part of the mURL→mIRC rework P3 ("open WWW channel: dedicated page +
220
- branding + embed").
221
-
222
- ## [3.0.0-alpha.29] — 2026-07-17
223
-
224
- ### Added
225
- - **mURL owner-side management — 3 new tools.** `mURL_create` (claim a domain channel and
226
- become its owner; idempotent, 409 if another account owns it), `mURL_update` (set branding /
227
- mark `claimed` / `blocked` to close / reopen as `open`), `mURL_delete` (remove a channel you
228
- own). Wired to the deployed, owner-scoped `murl-manage` EF via the same user-JWT auth as
229
- `mURL_list_channels action='mine'`. mURL goes from read-only (read/post/presence/list) to a
230
- full lifecycle — an agent can now provision and manage a domain's room, not just chat in it.
231
- - **`TOOL_COUNT` export** (`= allTools.length`) — one source of truth for the callable-tool
232
- count, mirroring `@mosadd/threat-engine`'s `THREAT_EVENT_COUNT`. Docs reference it, not a
233
- hand-typed number that drifts.
234
-
235
- ### Changed
236
- - **Tool count corrected to 68** — it had been advertised inconsistently as "70+" / "65" across
237
- READMEs, docs, registry submissions and the dev site. The registry holds exactly 68 callable
238
- tools: mDM 14 · mIRC 22 · mURL 7 · mAYL 11 · mTALK 5 · mRAG 4 · comms_ 3 · Irondome (`threat_*`) 2.
239
- Also fixed two stale claims in the reference table: `threat_*` IS registered (was labelled
240
- "unregistered"), and the `mp0st_*` mAYL aliases are retired (were claimed as still functioning).
241
-
242
- ## [3.0.0-alpha.23] — 2026-06-26
243
-
244
- Toolkit hardening pass: every registered tool's request/response contract was
245
- adversarially verified against the deployed edge functions. Two tools were broken on
246
- every call; the rest had silent field drops, wrong results, or a confidentiality/access gap.
247
-
248
- ### Fixed
249
- - **Edge-function errors are now legible.** `invokeFunction` only ever surfaced the fixed
250
- string "Edge Function returned a non-2xx status code"; the real reason lives in
251
- `error.context`. It now reads that body (and the HTTP status), so every EF-backed tool
252
- returns an actionable error the agent can act on — the single highest-impact fix.
253
- - **mDM_edit no longer strips E2EE.** It used to store a server-readable plaintext body even
254
- on an E2EE thread (and the forward-only ratchet means an edit can't be re-sealed). It now
255
- refuses to edit E2EE messages (use delete + re-send) and only edits legacy plaintext.
256
- - **mp0st_send cc/bcc/reply_to are actually delivered** — the backend dropped them silently;
257
- now forwarded to the mail provider (edge-function fix, deployed).
258
- - **mDM call rooms are access-gated (security)** — call-room tokens were mintable by any
259
- authenticated user who learned the room name; the backend now restricts them to the two
260
- participants, and the room name is per-pair so the gate is robust (edge-function fix, deployed).
261
- - **mDM_call_end / mDM_voice_note** now return the real message id (was always undefined).
262
- - **mp0st_view** no longer advertises a `received_at` field the backend doesn't return (it's `sent_at`).
263
-
264
- ### Changed
265
- - **Unregistered `comms_embed_create`** — its `embed-keys` edge function isn't deployed (404
266
- on every call) and the embed surface is parked. Tool count **62 → 61**. Re-register when the
267
- backend + widget ship.
268
- - **mIRC tools stop advertising fields the backend ignores.** Removed: `mIRC_kick` `reason`,
269
- `mIRC_request_access` `message`, `mIRC_ban` `reason`+`until` (the latter silently made a
270
- "temporary" ban permanent), and `access_mode` on `mIRC_update`/`mIRC_list` (no-ops). Added
271
- `wrapped_group_key` to `mIRC_create`/`mIRC_approve_request` so E2EE (password/private)
272
- channels are honestly callable. Descriptions corrected to match.
273
- - **mp0st_consent** now fails fast client-side when `check`/`optin` is missing a recipient.
274
-
275
- ### Verified (no changes needed)
276
- - Install/boot, full build + typecheck across all packages, dependency-export resolution, and
277
- the mDM X3DH + Double-Ratchet crypto round-trip all pass.
278
-
279
- ## [3.0.0-alpha.22] — 2026-06-26
280
-
281
- ### Fixed
282
- - **alpha.21 was broken on a fresh install** — it crashed on startup with
283
- `SyntaxError: The requested module '@mosadd/crypto' does not provide an export named
284
- 'initRatchetInitiator'`. The workspace dependency packages (`@mosadd/crypto`, `protocol`,
285
- `providers`, `threat-engine`) had drifted: their *source* gained new exports (the mDM
286
- Double-Ratchet work) but their version was never bumped, so npm still served the stale
287
- alpha.4/alpha.5 builds while `@mosadd/mcp` was built against the newer API. Bumped the whole
288
- alpha-line in lockstep to alpha.22 and republished so every published package matches current
289
- source and `workspace:*` cross-deps resolve. Verified: a clean `npm i @mosadd/mcp@alpha`
290
- now boots and lists 62 tools. (The previous alpha.20 was broken-on-install the same way.)
291
-
292
- ### Changed
293
- - **Unregistered 2 scaffold tools that failed on every call.** `mp0st_send_as_agent`
294
- (POSTed to a non-existent `hub-claim-mint` endpoint → 404, and sent provenance body
295
- fields the deployed `mp0st-send` EF never reads) and `mTALK_ingest_ptt` (request body
296
- didn't match the deployed `ptt-ingest` EF → 400). Both are now commented out in
297
- `tools/index.ts` like the other not-registered modules, so an agent only ever discovers
298
- tools that actually work. Registered tool count **64 → 62** (mp0st 12→11, mTALK 6→5).
299
- Source is kept; both re-register once their backend contracts are wired + tested.
300
-
301
- ### Fixed
302
- - **mIRC `reject_request` / `approve_request` field (LINEAR-3522):** the tools sent
303
- `request_id` but `channel-members-manage` reads `target_identity_id` → 400 every
304
- call. Renamed to `identity_id` (normalized to `target_identity_id`). `reject` now
305
- works; `approve` of an E2EE channel still needs a wrapped group key (LINEAR-3523).
306
- - **mDM / mIRC message pagination (LINEAR-3524):** `mDM_list` read `cursor`/`has_more`
307
- but `message-list` history mode returns `next_before`, and `mIRC_list_messages`
308
- sent `cursor` (ignored; EF reads `before`) and read `next_cursor` (never returned)
309
- → neither paged past page 1. Send `before`, read `next_before`.
310
-
311
- ## [3.0.0-alpha.19] — 2026-06-19
312
-
313
- ### Removed
314
- - **BREAKING — mROOM module killed (LINEAR-3414):** the 11 `mROOM_*` tools
315
- (`mROOM_create`, `mROOM_create_guest_link`, `mROOM_join`, `mROOM_leave`,
316
- `mROOM_close`, `mROOM_list`, `mROOM_voice_join`, `mROOM_send_message`,
317
- `mROOM_list_messages`, `mROOM_send_voice`, `mROOM_send_file`) are no longer
318
- registered. Ephemeral private rooms are re-cut into private mIRC channels.
319
- The source stays in `tools/mroom*.ts` (unregistered, like mURL/mCALL).
320
-
321
- ### Added
322
- - **Defensive threat engine as MCP tools (LINEAR-3498):** `threat_catalog`
323
- (list the canonical 160+ threat-event taxonomy) and `threat_classify`
324
- (pure `evaluateEvent` decision → action/severity/reason). Wraps
325
- `@mosadd/threat-engine`; deterministic, offline, `requires: "any"`.
326
-
327
- Net: 70 → **64 callable tools** across 5 live modules + comms + threat.
328
-
329
- ### Changed
330
- - **BREAKING — mail tool rename:** the 12 email MCP tools are renamed
331
- `mAIL_*` → `mp0st_*` (`mp0st_list`, `mp0st_send`, `mp0st_view`, `mp0st_delete`,
332
- `mp0st_stats`, `mp0st_events`, `mp0st_metrics`, `mp0st_revoke`,
333
- `mp0st_audit_export`, `mp0st_consent`, `mp0st_notify`, `mp0st_send_as_agent`).
334
- No aliases — the old `mAIL_*` names no longer resolve. Backend Edge Functions
335
- (`mp0st-*`) are unchanged.
336
-
337
- ## [3.0.0-alpha.18] — 2026-06-18
338
-
339
- ### Added
340
- - **`comms_embed_create`** — embed a LIVE mosadd channel into an app/site a builder-agent is
341
- generating (Lovable / Bolt / Cursor / v0). Mints a publishable embed key (`m_pk_live_…`,
342
- origin-scoped, via the `embed-keys` EF) and returns a paste-in widget snippet
343
- (`<div>` + `<script src="https://embed.mosadd.com/v1.js" data-key=…>`). The widget exchanges
344
- the publishable key for a short-lived channel-scoped JWT at runtime; the hub key never enters
345
- the browser. Extends `mROOM_create_guest_link` (link → embeddable widget). CDN override via
346
- `MOSADD_EMBED_CDN`. (Widget served from the dedicated `embed.mosadd.com` deploy.)
347
-
348
- ## [3.0.0-alpha.17] — 2026-06-18
349
-
350
- ### Added
351
- - **Action Links — screen share.** `comms_action_create` gains a `screen_share` action
352
- type, and a new `comms_action_frame_get` tool lets the creating agent read frames of the
353
- recipient's shared screen (consent-gated, browser-sandbox only). Turns Action Links into
354
- "remote-desktop-lite" — the agent sees what the human chooses to share.
355
-
356
- ### Changed
357
- - **Durable `mosadd login`.** The saved session (`~/.mosadd/session.json`) is now refreshed
358
- from its refresh token at server boot, so a single `mosadd login` keeps working across
359
- restarts — no more re-login when the access token expires.
360
- - Onboarding README restructured (recommended auth path — `mosadd login` — first; hub API
361
- key second; DevTools JWT demoted), and the 61→70 / `mosadd.dev`→`mosadd.com` reconciliation
362
- (first shipped on the published package with this release).
363
-
364
- ## [3.0.0-alpha.16] — 2026-06-17
365
-
366
- ### Fixed
367
- - `mAIL_view` now calls the `mp0st-get` Edge Function (read a message by id,
368
- owner-scoped) instead of `mp0st-view` (the tracking-pixel endpoint, which
369
- returned "Missing tracking ID"). ([LINEAR-2917])
370
- - CI publish drops `--provenance` — npm returned 422 because the source repo
371
- (`mosadd-os`) is private, so provenance attestation is not available.
372
-
373
- ### Added (cumulative since alpha.4 — tool count 61 → 70)
374
- - **Action links (Tier 1):** `comms_action_create` mints a one-link browser
375
- action an agent can hand to a human (run-with-consent in the mosadd sandbox).
376
- - **mAIL provenance:** `mAIL_send_as_agent` stamps agent/human provenance on the
377
- message so the recipient sees who actually sent it.
378
- - **File & voice attachments:** `mDM_send_voice` / `mDM_send_file`,
379
- `mROOM_send_voice` / `mROOM_send_file`, `mIRC_send_voice` / `mIRC_send_file`
380
- (reuse the existing `chat-files` bucket — no new transport).
381
- - **mTALK → RAG:** `mTALK_ingest_ptt` feeds push-to-talk audio into the RAG index
382
- (opt-in, gated server-side).
383
- - **mROOM:** `mROOM_create_guest_link` (single-call, no-account guest links) and
384
- `mROOM_voice_join`.
385
- - **mIRC edge transport:** `mIRC_mint_channel_token`, `mIRC_send_edge`,
386
- `mIRC_history_edge` — the low-latency path the agent-coordination skill rides.
387
-
388
- ### Changed
389
- - README, `package.json`, and the plugin `marketplace.json` reconciled to the
390
- current surface: **70 tools across 6 modules** + `comms_capabilities`
391
- discovery (71 callable), version `alpha.16`, and `mosadd.dev` → `mosadd.com`
392
- (the dev surface was consolidated into the main site). ([LINEAR-3391])
393
- - `mCALL` (telephony, carrier-pending) and `mURL` (brand/consumer surface)
394
- remain **unregistered** in `tools/index.ts` — an agent only ever discovers
395
- tools that actually work.
396
-
397
- ## [3.0.0-alpha.4]
398
-
399
- ### Added
400
- - Initial public alpha: **61 tools across 6 live modules** — mDM (incl. voice),
401
- mIRC, mROOM, mAIL, mTALK, mRAG — plus the `comms_capabilities` discovery tool.
402
- - BYOK mode: the server talks to your own mosadd Supabase backend via
403
- `MOSADD_SUPABASE_URL` / `MOSADD_SUPABASE_ANON_KEY` / `MOSADD_USER_JWT`.
404
- - Apache-2.0 license; tool names follow [RFC 0001] (`m<MODULE>_<operation>`).
405
-
406
- [3.0.0-alpha.16]: https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp
407
- [3.0.0-alpha.4]: https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp
408
- [LINEAR-2917]: https://linear.app/ip-ra/issue/LINEAR-2917
409
- [LINEAR-3391]: https://linear.app/ip-ra/issue/LINEAR-3391
410
- [RFC 0001]: https://github.com/Hei33enberg/mosadd-os/blob/main/docs/rfcs/0001-module-naming.md
1
+ # Changelog
2
+
3
+ All notable changes to `@mosadd/mcp` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project follows [Semantic Versioning](https://semver.org/). The `3.0.0-alpha.N` pre-releases led up to the stable 3.0.0.
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [3.0.1] — 2026-11-30
11
+
12
+ ### Fixed
13
+ - **Agents now hear push-to-talk in channels.** `mIRC_list_messages` dropped the `transcript` that `message-list` attaches to a voice / PTT message, so an agent reading a channel saw only `[voice note — 25s]`. It now returns the same `voice: {transcript, audio_url, duration_ms}` field as `mDM_list`, and for every voice message `text` reads `[voice note — 25s] <transcript>` (the bare marker while the transcript is still being made). The transcript comes with the reader's own permissions (channel member / thread participant), so a non-member gets neither the field nor the text.
14
+ - **`mDM_list` puts the transcript in `text` too**, with the same `[voice note — Ns] <transcript>` form, so the other side of a DM hears a voice note without reading a separate field.
15
+ - **`mRAG_search` no longer hides how it found the sources.** The tool description promised `partial:true` with `partial_reason`, but the handler kept only `answer`/`sources`/`chunks_found`, so a keyword-only fallback after a vector timeout looked like an empty memory and no stage time was visible. It now also forwards, when the backend sends them: `partial`, `partial_reason` (`search_timeout` | `embed_failed` | `search_error`), `search_mode` (`hybrid` | `keyword`), `degraded` (a model answer was requested but not produced) and per-stage milliseconds as `timing` and `stages`. An older backend yields the same three-field result as before.
16
+
17
+ ## [3.0.0] — 2026-11-16
18
+
19
+ The first stable release of the 3.0 line. Same tools as `3.0.0-alpha.59`: default host `https://api.mosadd.com`, `mRAG_search` with `answer`. `latest` on npm now points here; install with `npx -y @mosadd/mcp`.
20
+
21
+ ## [3.0.0-alpha.59] — 2026-11-16
22
+
23
+ ### Added
24
+ - **`mRAG_search` accepts `answer: boolean`** (default `false`). It is forwarded to `rag-query`: by default the tool returns the ranked sources only; pass `answer: true` to also get a generated answer grounded in them.
25
+
26
+ ### Fixed
27
+ - **Default backend host.** `MOSADD_API_KEY` login (`hub-key-exchange`) and the mail-provenance / mIRC edge defaults pointed at the retired cloud `rooffhgbxafyjcwmwpsy.supabase.co`, which no longer answers. They now default to `https://api.mosadd.com` (`MOSADD_HUB_URL` still overrides). A test fails if any source file carries the old host again.
28
+
29
+ ## [3.0.0-alpha.58] — 2026-11-16
30
+
31
+ ### Added
32
+ - **CLI:** `npx @mosadd/mcp --version`, `--help` and `tools` print (version, commands + env vars, all tools grouped by module) and exit instead of starting the stdio server.
33
+
34
+ ### Fixed
35
+ - The "ready" log line now reports the `package.json` version (it said `3.0.0-alpha.0`).
36
+
37
+ ## [3.0.0-alpha.57] — 2026-11-15
38
+
39
+ ### Fixed
40
+ - **`mTALK_open {label}` opens a room you own.** The room id is now `mosadd-room-<your identity id>-<label>`;
41
+ you and your accepted contacts can join it, a stranger cannot (before: one shared `mosadd-room-<label>` for every
42
+ account, refused to everyone, including its creator).
43
+ - **`mDM_list` returns voice notes with their transcript and recording.** Voice/PTT messages carry
44
+ `voice: { transcript, audio_url, duration_ms }` (signed URL, read with the caller's own permissions) instead of a
45
+ bare caption.
46
+
47
+ ## [3.0.0-alpha.56] — 2026-11-10
48
+
49
+ ### Added
50
+ - **`mDM_send_as_agent` `thread_label?`** — same optional label alphabet as
51
+ `mDM_send` (`[a-zA-Z0-9._-]`, 1–120). Omit = MAIN unlabeled thread (ops lock for the top plan and the account owner
52
+ until rename/UI merge). A new label opens a new `dm:A:B:label` thread.
53
+
54
+ ## [3.0.0-alpha.55] — 2026-09-29
55
+
56
+ ### Fixed
57
+ - **Channel/room reader: the owner's posts read as text, not `<ciphertext>`** (
58
+ owner's rule, 28.09). `mIRC_list_messages` and `mROOM_list_messages` understood only a JSON
59
+ `mosadd.chat.v1` envelope and stamped everything else `<ciphertext>` — including every post
60
+ the app writes (plain UTF-8 in base64, `ircApi.ts encodePayload`) on the OPEN, keyless ops
61
+ channels (measured 28–29.09). New shared decoder `tools/channel-payload.ts`
62
+ (same rule as `mdm.ts unpackPayload` and the mKEEPER bridge `decodePayload.mjs`): envelope →
63
+ its `text`; plain UTF-8 → the text; other JSON (voice `{audio, mime, dur}`) → raw, so
64
+ `formatVoiceIfAny` shapes it (mROOM now too). `<ciphertext>` stays ONLY for a sealed envelope
65
+ the line cannot open — group-key `{iv, ciphertext, hmac}` without the key, `mosadd.e2ee.*` —
66
+ and for bytes that are not UTF-8 text.
67
+ - **`mDM_send`: conversations with agent lines and with the owner always in the clear.** Besides
68
+ an agent line on either side (alpha.54), a note to SELF (`to === selfId`) now goes plain too
69
+ (MCP sessions on the owner's key sealed his own thread; `message-send` refuses envelopes there
70
+ with `fleet_plaintext_only`). The result carries `reason: "fleet_plaintext"` (plain) or
71
+ `"human_to_human"` (E2EE). Person↔person stays X3DH + Double Ratchet, unchanged.
72
+ - **Tool descriptions:** `mDM_send_unencrypted` is no longer "DEPRECATED / prefer mDM_send / will
73
+ be removed" — that text steered every LLM line to the sealing tool. Both DM send tools now say:
74
+ conversations with agent lines and with the owner are ALWAYS in the clear.
75
+ - Lock `src/__tests__/fleet-plaintext.test.ts` (13 tests): red on alpha.54 (7/13, the owner's text →
76
+ `<ciphertext>`), red under five sabotages of the new rules, green after.
77
+
78
+ ## [3.0.0-alpha.54] — 2026-09-27
79
+
80
+ ### Fixed
81
+ - **`mDM_send` — readable on EVERY key of the identity, and never a false reason in the app**
82
+ (correction of alpha.53 after independent verification). alpha.53 seeded
83
+ the mDM identity from ONE API key and let an agent line (re)publish it. An identity holds many
84
+ keys (each OAuth connector mints its own; measured 27.09: one account has 8 active, 7 of 17 agent
85
+ identities have several), so the key directory flapped between per-key identities: a `s1.`
86
+ copy opened only under the key that wrote it, and `r1.` copies stopped opening for the
87
+ recipient after the next send from another key. alpha.53 also typed sends on a PERSON's key
88
+ `txt` with a `s1.` copy the app can never open, so the app told the owner a false reason
89
+ ("sent from another device" / "unlock your identity") instead of "sent by MCP".
90
+ - **Agent lines send in the clear** — the owner's rule of 20.09 (no E2EE for lines<->lines,
91
+ lines<->owner, human->line), the same rule the app applies (`peerIsAgent`). When the sender
92
+ or the recipient is `kind = 'agent'`, `mDM_send` writes plain UTF-8, type `txt`, and never
93
+ touches the key directory. Every key of the line and the recipient's app on every device read
94
+ it. Result field `mode: "plaintext_agent_lane"`, `encrypted: false`.
95
+ - **Human<->human stays E2EE**, but on a person's key MCP never writes their key directory
96
+ automatically (neither over the app's bundle nor on an empty directory), writes no `s1.`
97
+ copy, and types the envelope `text`, which the app reads as "sent by MCP, no copy for this
98
+ device". A note-to-self is sealed to the app's bundle and opens in the app.
99
+ - **`mDM_publish_keys` no longer overwrites a person's app bundle** (`published: false`,
100
+ `identity: "foreign"`, with a note). It may fill an empty directory. Agent lines may still
101
+ publish explicitly.
102
+ - **`autoPublishKeys`** (stdio) follows the same policy (`bundlePolicyForKind`): agent lines and
103
+ people write nothing; other lanes (radio) publish on an empty directory as before.
104
+ - New `SupabaseDmProvider.peerKind(id)`; `ensureOwnBundlePublished` takes a `BundlePolicy` and
105
+ can return `"absent"`.
106
+
107
+ ## [3.0.0-alpha.53] — 2026-09-27
108
+
109
+ ### Fixed
110
+ - **`mDM_send` — the envelope is born READABLE, for the sender and for the recipient**
111
+ (follow-up fix). Measured on prod 27.09: every DM sent through the hosted gateway
112
+ was sealed by a brand-new random identity (a fresh `InMemoryMdmKeyStore` per HTTP request),
113
+ carried no `self_payload` / `recipient_self_payload`, and was typed `text`. The sender could
114
+ never read its own message again; the recipient only through a live ratchet session.
115
+ - **One identity per login secret.** With an API key the mDM identity is derived from it by
116
+ HKDF (`SeededMdmKeyStore`, labels identical to the app's `deriveOwnMaterialFromSeed`: zero
117
+ one-time prekeys, signed-prekey id 1). Every gateway instance, call and restart = same keys.
118
+ - **The key directory agrees with it** (`ensureOwnBundlePublished`): empty → publish; an
119
+ AGENT line with a stale bundle → replace; a PERSON's app-anchored bundle → never overwritten
120
+ (the send still works, only the recipient copy is skipped). `autoPublishKeys` uses the same
121
+ policy instead of a blind publish.
122
+ - **`self_payload`** ("s1.", AES-GCM under the seed's self-read key) and
123
+ **`recipient_self_payload`** ("r1.", AES-GCM under HKDF(ECDH(sender IK, recipient IK))) —
124
+ the app's exact formats, so `mDM_list` on any process and the app on any device open them.
125
+ - **`message_type: "txt"`** (the app's type; `text` is legacy) for `mDM_send` and
126
+ `mDM_send_unencrypted`.
127
+ - `mDM_list` opens own messages from `self_payload` and incoming ones from
128
+ `recipient_self_payload` before touching the ratchet.
129
+ - `mDM_send` result gains `sender_copy`, `recipient_copy`, `identity` (additive).
130
+ - `server.json` version drifted to alpha.51 while the package was alpha.52; both now alpha.53.
131
+
132
+ ## [3.0.0-alpha.33] — 2026-08-11
133
+
134
+ **The republish that closes a three-week gap between the repo and the client's disk.**
135
+ `3.0.0-alpha.32` was published 2026-07-19 and every change since then lived only in git.
136
+ Measured on the published tarball that day: it registers **71** tools while its own npm
137
+ description advertises **69** and the website advertises **77**. Three numbers, one
138
+ package. This release makes the published artifact the thing the docs describe.
139
+
140
+ ### Added
141
+ - **`mAYL_send_as_agent`** re-registered (2026-07-29) after the hub-claim → mp0st-send
142
+ chain was proven on an authenticated call.
143
+ - **`mTALK_ingest_ptt`** re-registered (2026-07-29) after the ingest path was repointed
144
+ at `rag-transcribe` and returned a real `200 {"queued":true}` on prod.
145
+ - **`mAYL_agentbox_provision` / `_list` / `_extend` / `_release`** (2026-08-06)
146
+ — an agent mints, lists, extends and releases its OWN two-way disposable
147
+ inbox (`agent-<hex>@mosadd.com`). `create_inbox` parity with AgentMail, on our stack.
148
+ - **`mRAG_graph_refresh` / `_overview` / `_neighbors` / `_timeline`** (2026-08-11) — the MCP
149
+ door onto the per-user knowledge graph (`kg_*` RPCs). Search finds text; these walk who/what/
150
+ when (parties, connections, dated timelines), built from message METADATA only, never bodies.
151
+ - Stdio hub-key auth (`MOSADD_API_KEY`) in `src/bin/mcp.ts` — the local stdio server can
152
+ exchange a hub key instead of requiring the BYOK env trio.
153
+
154
+ Tool count **71 → 81**: six tools existed in the repo but had **never been published**
155
+ (71 → 77 — an agent installing `@mosadd/mcp` got 71 while every doc surface promised 77),
156
+ AND four new `mRAG_graph_*` knowledge-graph traversal tools were added 2026-08-11 (77 → 81).
157
+ `TOOL_COUNT` (`= allTools.length`) stays the single source of truth.
158
+
159
+ ### Changed
160
+ - **`mRAG_search` can now filter on the source types the writers actually stamp.**
161
+ The `source_types` enum was missing `file` and `ptt` — `file` is what `mRAG_ingest`
162
+ itself writes (its default, and where `note` ingests are mapped), `ptt` is what
163
+ `mTALK_ingest_ptt` writes. Measured on prod 2026-08-11: 63 indexed rows were
164
+ unreachable by any `source_types` filter. The tool advertised a filter that could not
165
+ see its own writes.
166
+ - **`mURL_create` no longer promises a status it does not set.** `murl-manage` applies
167
+ `status` only on the INSERT of a new row; on an existing channel it writes owner +
168
+ branding and leaves status untouched. Since mURL rooms auto-create on first activity,
169
+ "already exists" is the COMMON case — so the old "set initial status" wording was
170
+ wrong nearly every time it was read. Schema + description now say so and point at
171
+ `mURL_update`.
172
+ - **`mIRC_post_message` encryption wording.** It posts server-readable plaintext base64
173
+ on EVERY access mode, private and password channels included; the app's group-key
174
+ encryption is not something the toolkit holds a key for.
175
+
176
+ ### Fixed
177
+ - Doc surfaces across the repo that hand-typed **73** while `TOOL_COUNT` was 77 (README
178
+ breakdown, `packages/mcp/README.md`, `apps/mcp-http/README.md`, dev docs, Realm,
179
+ examples). The anti-drift vitest gate pinned one regex per file, so a single corrected
180
+ line kept the gate green while the sentence around it stayed wrong — the gate now pins
181
+ the PER-MODULE numbers too, not just the total.
182
+
183
+ ## [3.0.0-alpha.32] — 2026-07-19
184
+
185
+ ### Added
186
+ - **`mIRC_discover`** — browse the PUBLIC channel directory (open channels whose
187
+ owners set `discoverable=true`). Filter by name, paginated; join a result with
188
+ `mIRC_join` (open = one-click). Private/password/partner channels never appear.
189
+ - **`mIRC_report`** — report a channel for abuse/moderation (routes to the shared
190
+ `content_reports` store as `channel:<id>`), the moderation floor for public discovery.
191
+ - **`discoverable`** flag on `mIRC_create` / `mIRC_update` (honoured only for
192
+ `access_mode=open`), plus `voice` + `files` added to the capabilities enum.
193
+ - Tool count **69 → 71** (mIRC **22 → 24**); `TOOL_COUNT` (`= allTools.length`) stays
194
+ the single source of truth.
195
+
196
+ ### Changed
197
+ - **Encryption posture wording corrected across docs.** `mIRC_post_message` posts a
198
+ **server-readable** plaintext payload — the per-channel group-key TEXT E2EE is the
199
+ mosadd.com **app** (supported clients), not the toolkit (parity is the next crypto
200
+ milestone). Tool descriptions, README, MANIFESTO, e2ee-posture and the registry
201
+ copy now state this instead of implying private/password channels are E2EE via the
202
+ toolkit. Voice/PTT is always server-relayed (LiveKit SFU, DTLS-SRTP hop-by-hop).
203
+
204
+ ## [3.0.0-alpha.31] — 2026-07-17
205
+
206
+ ### Fixed
207
+ - **`mURL_create` / `mURL_update` branding validation.** The `branding` arg used
208
+ `z.record(z.any())` — the Zod v3 single-argument form — which fails typecheck under
209
+ this project's Zod v4, where `z.record` requires both a key and a value schema. Now
210
+ `z.record(z.string(), z.any())`. alpha.30 shipped with the pre-fix source; alpha.31
211
+ corrects it so the published package builds clean and validates branding correctly.
212
+ - **CI green (repo).** Synced the version refs (`server.json`, `server.ts` serverInfo,
213
+ `marketplace.json`) to `package.json`, and updated the MCP smoke test to expect
214
+ `mAYL_send` — the `mp0st_*` aliases were retired in alpha.28.
215
+
216
+ ## [3.0.0-alpha.30] — 2026-07-17
217
+
218
+ ### Added
219
+ - **`comms_embed_create` RE-REGISTERED — tool count 68 → 69.** The paste-in
220
+ live-channel widget is finally end-to-end real: `https://embed.mosadd.com/v1.js`
221
+ is deployed (served by the mosadd Vercel project; skins are inlined in the
222
+ bundle), and the whole backend (`embed-keys` publishable keys, `mirc-embed-token`
223
+ Origin-allowlisted 5-min JWTs with MAT plan tiers, `embed-plan-settings` PAYG,
224
+ GDPR `embed-dsr-delete`) was already live. The tool mints an `m_pk_live_…` key
225
+ and returns a `<script>` snippet with skin + position (incl. sidebar-left/right)
226
+ options. Part of the mURL→mIRC rework P3 ("open WWW channel: dedicated page +
227
+ branding + embed").
228
+
229
+ ## [3.0.0-alpha.29] — 2026-07-17
230
+
231
+ ### Added
232
+ - **mURL owner-side management — 3 new tools.** `mURL_create` (claim a domain channel and
233
+ become its owner; idempotent, 409 if another account owns it), `mURL_update` (set branding /
234
+ mark `claimed` / `blocked` to close / reopen as `open`), `mURL_delete` (remove a channel you
235
+ own). Wired to the deployed, owner-scoped `murl-manage` EF via the same user-JWT auth as
236
+ `mURL_list_channels action='mine'`. mURL goes from read-only (read/post/presence/list) to a
237
+ full lifecycle — an agent can now provision and manage a domain's room, not just chat in it.
238
+ - **`TOOL_COUNT` export** (`= allTools.length`) — one source of truth for the callable-tool
239
+ count, mirroring `@mosadd/threat-engine`'s `THREAT_EVENT_COUNT`. Docs reference it, not a
240
+ hand-typed number that drifts.
241
+
242
+ ### Changed
243
+ - **Tool count corrected to 68** — it had been advertised inconsistently as "70+" / "65" across
244
+ READMEs, docs, registry submissions and the dev site. The registry holds exactly 68 callable
245
+ tools: mDM 14 · mIRC 22 · mURL 7 · mAYL 11 · mTALK 5 · mRAG 4 · comms_ 3 · Irondome (`threat_*`) 2.
246
+ Also fixed two stale claims in the reference table: `threat_*` IS registered (was labelled
247
+ "unregistered"), and the `mp0st_*` mAYL aliases are retired (were claimed as still functioning).
248
+
249
+ ## [3.0.0-alpha.23] — 2026-06-26
250
+
251
+ Toolkit hardening pass: every registered tool's request/response contract was
252
+ adversarially verified against the deployed edge functions. Two tools were broken on
253
+ every call; the rest had silent field drops, wrong results, or a confidentiality/access gap.
254
+
255
+ ### Fixed
256
+ - **Edge-function errors are now legible.** `invokeFunction` only ever surfaced the fixed
257
+ string "Edge Function returned a non-2xx status code"; the real reason lives in
258
+ `error.context`. It now reads that body (and the HTTP status), so every EF-backed tool
259
+ returns an actionable error the agent can act on — the single highest-impact fix.
260
+ - **mDM_edit no longer strips E2EE.** It used to store a server-readable plaintext body even
261
+ on an E2EE thread (and the forward-only ratchet means an edit can't be re-sealed). It now
262
+ refuses to edit E2EE messages (use delete + re-send) and only edits legacy plaintext.
263
+ - **mp0st_send cc/bcc/reply_to are actually delivered** — the backend dropped them silently;
264
+ now forwarded to the mail provider (edge-function fix, deployed).
265
+ - **mDM call rooms are access-gated (security)** — call-room tokens were mintable by any
266
+ authenticated user who learned the room name; the backend now restricts them to the two
267
+ participants, and the room name is per-pair so the gate is robust (edge-function fix, deployed).
268
+ - **mDM_call_end / mDM_voice_note** now return the real message id (was always undefined).
269
+ - **mp0st_view** no longer advertises a `received_at` field the backend doesn't return (it's `sent_at`).
270
+
271
+ ### Changed
272
+ - **Unregistered `comms_embed_create`** — its `embed-keys` edge function isn't deployed (404
273
+ on every call) and the embed surface is parked. Tool count **62 → 61**. Re-register when the
274
+ backend + widget ship.
275
+ - **mIRC tools stop advertising fields the backend ignores.** Removed: `mIRC_kick` `reason`,
276
+ `mIRC_request_access` `message`, `mIRC_ban` `reason`+`until` (the latter silently made a
277
+ "temporary" ban permanent), and `access_mode` on `mIRC_update`/`mIRC_list` (no-ops). Added
278
+ `wrapped_group_key` to `mIRC_create`/`mIRC_approve_request` so E2EE (password/private)
279
+ channels are honestly callable. Descriptions corrected to match.
280
+ - **mp0st_consent** now fails fast client-side when `check`/`optin` is missing a recipient.
281
+
282
+ ### Verified (no changes needed)
283
+ - Install/boot, full build + typecheck across all packages, dependency-export resolution, and
284
+ the mDM X3DH + Double-Ratchet crypto round-trip all pass.
285
+
286
+ ## [3.0.0-alpha.22] — 2026-06-26
287
+
288
+ ### Fixed
289
+ - **alpha.21 was broken on a fresh install** — it crashed on startup with
290
+ `SyntaxError: The requested module '@mosadd/crypto' does not provide an export named
291
+ 'initRatchetInitiator'`. The workspace dependency packages (`@mosadd/crypto`, `protocol`,
292
+ `providers`, `threat-engine`) had drifted: their *source* gained new exports (the mDM
293
+ Double-Ratchet work) but their version was never bumped, so npm still served the stale
294
+ alpha.4/alpha.5 builds while `@mosadd/mcp` was built against the newer API. Bumped the whole
295
+ alpha-line in lockstep to alpha.22 and republished so every published package matches current
296
+ source and `workspace:*` cross-deps resolve. Verified: a clean `npm i @mosadd/mcp@alpha`
297
+ now boots and lists 62 tools. (The previous alpha.20 was broken-on-install the same way.)
298
+
299
+ ### Changed
300
+ - **Unregistered 2 scaffold tools that failed on every call.** `mp0st_send_as_agent`
301
+ (POSTed to a non-existent `hub-claim-mint` endpoint → 404, and sent provenance body
302
+ fields the deployed `mp0st-send` EF never reads) and `mTALK_ingest_ptt` (request body
303
+ didn't match the deployed `ptt-ingest` EF → 400). Both are now commented out in
304
+ `tools/index.ts` like the other not-registered modules, so an agent only ever discovers
305
+ tools that actually work. Registered tool count **64 → 62** (mp0st 12→11, mTALK 6→5).
306
+ Source is kept; both re-register once their backend contracts are wired + tested.
307
+
308
+ ### Fixed
309
+ - **mIRC `reject_request` / `approve_request` field:** the tools sent
310
+ `request_id` but `channel-members-manage` reads `target_identity_id` → 400 every
311
+ call. Renamed to `identity_id` (normalized to `target_identity_id`). `reject` now
312
+ works; `approve` of an E2EE channel still needs a wrapped group key.
313
+ - **mDM / mIRC message pagination:** `mDM_list` read `cursor`/`has_more`
314
+ but `message-list` history mode returns `next_before`, and `mIRC_list_messages`
315
+ sent `cursor` (ignored; EF reads `before`) and read `next_cursor` (never returned)
316
+ → neither paged past page 1. Send `before`, read `next_before`.
317
+
318
+ ## [3.0.0-alpha.19] — 2026-06-19
319
+
320
+ ### Removed
321
+ - **BREAKING — mROOM module killed:** the 11 `mROOM_*` tools
322
+ (`mROOM_create`, `mROOM_create_guest_link`, `mROOM_join`, `mROOM_leave`,
323
+ `mROOM_close`, `mROOM_list`, `mROOM_voice_join`, `mROOM_send_message`,
324
+ `mROOM_list_messages`, `mROOM_send_voice`, `mROOM_send_file`) are no longer
325
+ registered. Ephemeral private rooms are re-cut into private mIRC channels.
326
+ The source stays in `tools/mroom*.ts` (unregistered, like mURL/mCALL).
327
+
328
+ ### Added
329
+ - **Defensive threat engine as MCP tools:** `threat_catalog`
330
+ (list the canonical 160+ threat-event taxonomy) and `threat_classify`
331
+ (pure `evaluateEvent` decision → action/severity/reason). Wraps
332
+ `@mosadd/threat-engine`; deterministic, offline, `requires: "any"`.
333
+
334
+ Net: 70 → **64 callable tools** across 5 live modules + comms + threat.
335
+
336
+ ### Changed
337
+ - **BREAKING — mail tool rename:** the 12 email MCP tools are renamed
338
+ `mAIL_*` → `mp0st_*` (`mp0st_list`, `mp0st_send`, `mp0st_view`, `mp0st_delete`,
339
+ `mp0st_stats`, `mp0st_events`, `mp0st_metrics`, `mp0st_revoke`,
340
+ `mp0st_audit_export`, `mp0st_consent`, `mp0st_notify`, `mp0st_send_as_agent`).
341
+ No aliases — the old `mAIL_*` names no longer resolve. Backend Edge Functions
342
+ (`mp0st-*`) are unchanged.
343
+
344
+ ## [3.0.0-alpha.18] — 2026-06-18
345
+
346
+ ### Added
347
+ - **`comms_embed_create`** — embed a LIVE mosadd channel into an app/site a builder-agent is
348
+ generating (Lovable / Bolt / Cursor / v0). Mints a publishable embed key (`m_pk_live_…`,
349
+ origin-scoped, via the `embed-keys` EF) and returns a paste-in widget snippet
350
+ (`<div>` + `<script src="https://embed.mosadd.com/v1.js" data-key=…>`). The widget exchanges
351
+ the publishable key for a short-lived channel-scoped JWT at runtime; the hub key never enters
352
+ the browser. Extends `mROOM_create_guest_link` (link → embeddable widget). CDN override via
353
+ `MOSADD_EMBED_CDN`. (Widget served from the dedicated `embed.mosadd.com` deploy.)
354
+
355
+ ## [3.0.0-alpha.17] — 2026-06-18
356
+
357
+ ### Added
358
+ - **Action Links — screen share.** `comms_action_create` gains a `screen_share` action
359
+ type, and a new `comms_action_frame_get` tool lets the creating agent read frames of the
360
+ recipient's shared screen (consent-gated, browser-sandbox only). Turns Action Links into
361
+ "remote-desktop-lite" — the agent sees what the human chooses to share.
362
+
363
+ ### Changed
364
+ - **Durable `mosadd login`.** The saved session (`~/.mosadd/session.json`) is now refreshed
365
+ from its refresh token at server boot, so a single `mosadd login` keeps working across
366
+ restarts — no more re-login when the access token expires.
367
+ - Onboarding README restructured (recommended auth path — `mosadd login` — first; hub API
368
+ key second; DevTools JWT demoted), and the 61→70 / `mosadd.dev`→`mosadd.com` reconciliation
369
+ (first shipped on the published package with this release).
370
+
371
+ ## [3.0.0-alpha.16] — 2026-06-17
372
+
373
+ ### Fixed
374
+ - `mAIL_view` now calls the `mp0st-get` Edge Function (read a message by id,
375
+ owner-scoped) instead of `mp0st-view` (the tracking-pixel endpoint, which
376
+ returned "Missing tracking ID").
377
+ - CI publish drops `--provenance` — npm returned 422 because the source repo
378
+ (`mosadd-os`) is private, so provenance attestation is not available.
379
+
380
+ ### Added (cumulative since alpha.4 — tool count 61 → 70)
381
+ - **Action links (Tier 1):** `comms_action_create` mints a one-link browser
382
+ action an agent can hand to a human (run-with-consent in the mosadd sandbox).
383
+ - **mAIL provenance:** `mAIL_send_as_agent` stamps agent/human provenance on the
384
+ message so the recipient sees who actually sent it.
385
+ - **File & voice attachments:** `mDM_send_voice` / `mDM_send_file`,
386
+ `mROOM_send_voice` / `mROOM_send_file`, `mIRC_send_voice` / `mIRC_send_file`
387
+ (reuse the existing `chat-files` bucket — no new transport).
388
+ - **mTALK → RAG:** `mTALK_ingest_ptt` feeds push-to-talk audio into the RAG index
389
+ (opt-in, gated server-side).
390
+ - **mROOM:** `mROOM_create_guest_link` (single-call, no-account guest links) and
391
+ `mROOM_voice_join`.
392
+ - **mIRC edge transport:** `mIRC_mint_channel_token`, `mIRC_send_edge`,
393
+ `mIRC_history_edge` — the low-latency path the agent-coordination skill rides.
394
+
395
+ ### Changed
396
+ - README, `package.json`, and the plugin `marketplace.json` reconciled to the
397
+ current surface: **70 tools across 6 modules** + `comms_capabilities`
398
+ discovery (71 callable), version `alpha.16`, and `mosadd.dev` → `mosadd.com`
399
+ (the dev surface was consolidated into the main site).
400
+ - `mCALL` (telephony, carrier-pending) and `mURL` (brand/consumer surface)
401
+ remain **unregistered** in `tools/index.ts` — an agent only ever discovers
402
+ tools that actually work.
403
+
404
+ ## [3.0.0-alpha.4]
405
+
406
+ ### Added
407
+ - Initial public alpha: **61 tools across 6 live modules** — mDM (incl. voice),
408
+ mIRC, mROOM, mAIL, mTALK, mRAG — plus the `comms_capabilities` discovery tool.
409
+ - BYOK mode: the server talks to your own mosadd Supabase backend via
410
+ `MOSADD_SUPABASE_URL` / `MOSADD_SUPABASE_ANON_KEY` / `MOSADD_USER_JWT`.
411
+ - Apache-2.0 license; tool names follow [RFC 0001] (`m<MODULE>_<operation>`).
412
+
413
+ [3.0.0-alpha.16]: https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp
414
+ [3.0.0-alpha.4]: https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp
415
+ [RFC 0001]: https://github.com/Hei33enberg/mosadd-os/blob/main/docs/rfcs/0001-module-naming.md