@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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 m.0S / mosADD contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/bin/mcp.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  PKG_VERSION,
4
4
  allTools,
5
5
  createMosaddServer
6
- } from "../chunk-VMMJJYXF.js";
6
+ } from "../chunk-J2S44U5R.js";
7
7
  import {
8
8
  isSessionExpired,
9
9
  loadSession,
@@ -58,18 +58,18 @@ function getSupabase(env = readSupabaseEnv()) {
58
58
  autoRefreshToken: false,
59
59
  detectSessionInUrl: false
60
60
  },
61
- // ⛔ x-mosadd-origin: KAŻDE wywołanie z toolkitu/bramy MCP niesie ten znacznik (2026-08-25,
62
- // rozkaz Króla „kradną tożsamości"). Sesje agentów wpinały klucz WŁAŚCICIELA i postowały na
63
- // kanałach z jego dymka (SOVEREIGN) — serwer nie miał JAK odróżnić bramy od aplikacji, bo
64
- // hub-key-exchange zwraca zwykły JWT usera. Ten nagłówek to rozróżnia: message-send odrzuca
65
- // post na kanał z tożsamości CZŁOWIEKA, gdy przyszedł przez bramę — z komunikatem każącym
66
- // wpiąć klucz SWOJEJ linii. Aplikacja mosadd.com nigdy nie wysyła tego nagłówka.
61
+ // ⛔ x-mosadd-origin: EVERY call from the toolkit / MCP gateway carries this marker (2026-08-25,
62
+ // after agent sessions were found speaking as their owner). Agent sessions plugged in the OWNER's
63
+ // key and posted on channels from the owner's own bubble — the server had NO WAY to tell the gateway
64
+ // from the app, because hub-key-exchange returns an ordinary user JWT. This header tells them apart:
65
+ // message-send refuses a channel post from a PERSON's identity when it came through the gateway, with
66
+ // a message telling the caller to plug in its OWN line's key. The mosadd.com app never sends this header.
67
67
  global: {
68
68
  headers: {
69
69
  ...env.userJwt ? { Authorization: `Bearer ${env.userJwt}` } : {},
70
70
  "x-mosadd-origin": "hub-gateway",
71
- // Nagłówek tylko, gdy sesja MA tożsamość — puste "" (brama bez sessionKey) nie wysyła nic,
72
- // więc serwerowy strażnik 409 nie widzi fałszywych roszczeń.
71
+ // The header only when the session HAS an identity — an empty "" (gateway without sessionKey) sends
72
+ // nothing, so the server-side 409 guard sees no false claims.
73
73
  ...sessionId() ? { "x-mosadd-session": sessionId() } : {}
74
74
  // ⛔ KTÓRA TO SESJA (2026-08-27, „każdy generał co chwilę gubi mózg"). Wszyscy generałowie
75
75
  // wpinają się kluczem hub TEGO SAMEGO właściciela, więc dla serwera ich wywołania były
@@ -148,6 +148,13 @@ function voiceFields(m) {
148
148
  if (m.messageType !== "voice" && m.messageType !== "ptt") return {};
149
149
  return { voice: { transcript: m.transcript ?? null, audio_url: m.audioUrl ?? null, duration_ms: m.durationMs ?? null } };
150
150
  }
151
+ var VOICE_MARKER = /^\[voice note — \d+s\]$/;
152
+ function voiceText(text, voice) {
153
+ if (!voice) return text;
154
+ const marker = VOICE_MARKER.test(text) ? text : typeof voice.duration_ms === "number" && voice.duration_ms > 0 ? `[voice note \u2014 ${Math.max(1, Math.round(voice.duration_ms / 1e3))}s]` : "[voice note]";
155
+ const t = typeof voice.transcript === "string" ? voice.transcript.trim() : "";
156
+ return t ? `${marker} ${t}` : marker;
157
+ }
151
158
 
152
159
  // src/crypto/mdm-session.ts
153
160
  import {
@@ -626,7 +633,7 @@ async function decryptFromPeer(keystore, peerId, envelopeBytes) {
626
633
  const step = await ratchetReceive(session.ratchet);
627
634
  if (step.messageIndex !== env.i) {
628
635
  throw new Error(
629
- `Out-of-order mDM message (expected ratchet index ${step.messageIndex}, got ${env.i}). Skipped-key handling is a tracked follow-up (LINEAR-2357).`
636
+ `Out-of-order mDM message (expected ratchet index ${step.messageIndex}, got ${env.i}). Skipped-key handling is a tracked follow-up.`
630
637
  );
631
638
  }
632
639
  const plaintext = await decryptBytes(step.messageKey, env.ct);
@@ -654,7 +661,7 @@ var SupabaseDmProvider = class {
654
661
  * `identities.kind` of a PEER, or null when it cannot be read (RLS can_see_identity scopes rows
655
662
  * to contacts / thread co-members; a miss is not an error). mDM_send uses it exactly like the
656
663
  * app's ChatPanel `peerIsAgent` (theirIdent.kind === 'agent' || iAmAgent): a DM to an agent
657
- * line is sent in the clear, because the line must read it (rozkaz Króla 20.09).
664
+ * line is sent in the clear, because the line must read it (owner decision 20.09).
658
665
  */
659
666
  async peerKind(peerId) {
660
667
  try {
@@ -971,7 +978,7 @@ async function mDM_list(input, ctx) {
971
978
  }
972
979
  return p;
973
980
  };
974
- const messages = await Promise.all(
981
+ const surowe = await Promise.all(
975
982
  result.messages.map(async (raw) => {
976
983
  const m = raw;
977
984
  const base = {
@@ -1014,6 +1021,7 @@ async function mDM_list(input, ctx) {
1014
1021
  }
1015
1022
  })
1016
1023
  );
1024
+ const messages = surowe.map((m) => m.voice ? { ...m, text: voiceText(m.text, m.voice) } : m);
1017
1025
  return {
1018
1026
  messages,
1019
1027
  next_cursor: result.nextCursor,
@@ -1118,7 +1126,7 @@ var mdmTools = [
1118
1126
  title: "Send DM",
1119
1127
  annotations: { readOnlyHint: false },
1120
1128
  requires: "any",
1121
- description: 'Send a direct message via mosadd mDM. Conversations with fleet lines and with the King: ALWAYS in the clear \u2014 when either side is an agent line, or you write to yourself, the message goes as plain text (result `encrypted: false, reason: "fleet_plaintext"`), exactly like the mosadd app. Only between two PEOPLE is it END-TO-END-ENCRYPTED (X3DH + Double Ratchet; the recipient must have published keys). Pass `to` as the recipient\'s mosadd identity_id (look it up with mDM_list_contacts). Optional thread_label puts the message in a named thread \u2014 mosadd USP: multiple threads per contact, unlike WhatsApp/Telegram.',
1129
+ description: 'Send a direct message via mosadd mDM. Conversations with agent lines and with the account owner: ALWAYS in the clear \u2014 when either side is an agent line, or you write to yourself, the message goes as plain text (result `encrypted: false, reason: "fleet_plaintext"`), exactly like the mosadd app. Only between two PEOPLE is it END-TO-END-ENCRYPTED (X3DH + Double Ratchet; the recipient must have published keys). Pass `to` as the recipient\'s mosadd identity_id (look it up with mDM_list_contacts). Optional thread_label puts the message in a named thread \u2014 mosadd USP: multiple threads per contact, unlike WhatsApp/Telegram.',
1122
1130
  inputSchema: mDM_send_input,
1123
1131
  handler: mDM_send
1124
1132
  },
@@ -1127,7 +1135,7 @@ var mdmTools = [
1127
1135
  title: "Send plain-text DM",
1128
1136
  annotations: { readOnlyHint: false },
1129
1137
  requires: "any",
1130
- description: "Send a direct message as plain text, never encrypted. Conversations with fleet lines and with the King: ALWAYS in the clear \u2014 this is the path for every agent line writing to the King, to another line or to itself, and it is permanent. Pass `to` as the recipient's mosadd identity_id (look it up with mDM_list_contacts); optional thread_label puts it in a named thread. mDM_send picks the same plain-text path by itself whenever a fleet line is a party.",
1138
+ description: "Send a direct message as plain text, never encrypted. Conversations with agent lines and with the account owner: ALWAYS in the clear \u2014 this is the path for every agent line writing to the account owner, to another line or to itself, and it is permanent. Pass `to` as the recipient's mosadd identity_id (look it up with mDM_list_contacts); optional thread_label puts it in a named thread. mDM_send picks the same plain-text path by itself whenever a fleet line is a party.",
1131
1139
  inputSchema: mDM_send_input,
1132
1140
  handler: mDM_send_unencrypted
1133
1141
  },
@@ -1180,7 +1188,7 @@ var mDM_send_as_agent_input = z2.object({
1180
1188
  "Recipient identity id or mosADD address. Defaults to YOU (the key's owner) \u2014 the common case is an agent reporting to its owner. Must be a person, not another agent."
1181
1189
  ),
1182
1190
  thread_label: z2.string().min(1).max(120).regex(/^[a-zA-Z0-9._-]+$/).optional().describe(
1183
- "Optional thread label (same as mDM_send). Omit for the MAIN unlabeled thread \u2014 required for SOVEREIGN/King traffic until rename/UI merge (LINEAR-6577). A new label opens a new thread."
1191
+ "Optional thread label (same as mDM_send). Omit for the MAIN unlabeled thread \u2014 required for account-owner traffic. A new label opens a new thread."
1184
1192
  ),
1185
1193
  silent: z2.boolean().optional().describe("Deliver without waking a phone: the message still arrives and shows unread, only the OS push is skipped.")
1186
1194
  });
@@ -1205,7 +1213,7 @@ var mdmAsAgentTools = [
1205
1213
  title: "Send DM as your agent",
1206
1214
  annotations: { readOnlyHint: false },
1207
1215
  requires: "network",
1208
- description: "Send a direct message AS ONE OF YOUR OWN AGENTS instead of as yourself. Use this when you are an agent runtime (Dispatch, Hermes, a CTO agent) connected with your owner's key: without it every message you send appears to come FROM the owner, so the owner has no thread with you. Names the agent by mosADD address, identity id or display name; `to` defaults to the key's owner. Optional `thread_label` selects a named thread (omit = MAIN unlabeled \u2014 required for King/SOVEREIGN until rename lands). The server verifies you OWN that agent \u2014 speaking as someone else's agent, or as another person, is refused. Recipient must be a person: agent-to-agent DM stays blocked.",
1216
+ description: "Send a direct message AS ONE OF YOUR OWN AGENTS instead of as yourself. Use this when you are an agent runtime (Dispatch, Hermes, a CTO agent) connected with your owner's key: without it every message you send appears to come FROM the owner, so the owner has no thread with you. Names the agent by mosADD address, identity id or display name; `to` defaults to the key's owner. Optional `thread_label` selects a named thread (omit = MAIN unlabeled \u2014 required for the account owner until rename lands). The server verifies you OWN that agent \u2014 speaking as someone else's agent, or as another person, is refused. Recipient must be a person: agent-to-agent DM stays blocked.",
1209
1217
  inputSchema: mDM_send_as_agent_input,
1210
1218
  handler: mDM_send_as_agent
1211
1219
  },
@@ -2030,11 +2038,18 @@ async function mIRC_list_messages(input, ctx) {
2030
2038
  });
2031
2039
  const messages = [];
2032
2040
  for (const m of data?.messages ?? []) {
2041
+ const glos = voiceFields({
2042
+ messageType: m.message_type ?? void 0,
2043
+ transcript: m.transcript ?? null,
2044
+ audioUrl: m.audio_url ?? null,
2045
+ durationMs: m.duration_ms ?? null
2046
+ });
2033
2047
  messages.push({
2034
2048
  id: m.id,
2035
2049
  sender_identity_id: m.sender_identity_id,
2036
- text: formatVoiceIfAny(await payloadToText(input.channel_id, m.encrypted_payload)),
2037
- timestamp: m.created_at
2050
+ text: voiceText(formatVoiceIfAny(await payloadToText(input.channel_id, m.encrypted_payload)), glos.voice),
2051
+ timestamp: m.created_at,
2052
+ ...glos
2038
2053
  });
2039
2054
  }
2040
2055
  return {
@@ -2057,7 +2072,7 @@ var mircMessagesTools = [
2057
2072
  title: "Read channel messages",
2058
2073
  annotations: { readOnlyHint: true },
2059
2074
  requires: "network",
2060
- description: "List recent text messages in a persistent channel (mIRC), newest first, cursor-paginated. Pass channel_id; the backing space is resolved automatically. ENCRYPTION: messages your line can decrypt (group-key channels \u2014 auto-provisioned key material) come back as readable text; everything else is decoded as written: the app's plain text and the toolkit's JSON envelope both come back as readable text (open channels such as #adm and #command are never encrypted). Only a sealed group-key envelope your line holds no key for reads <ciphertext>.",
2075
+ description: "List recent text messages in a persistent channel (mIRC), newest first, cursor-paginated. Pass channel_id; the backing space is resolved automatically. ENCRYPTION: messages your line can decrypt (group-key channels \u2014 auto-provisioned key material) come back as readable text; everything else is decoded as written: the app's plain text and the toolkit's JSON envelope both come back as readable text (open channels such as coordination channels are never encrypted). Only a sealed group-key envelope your line holds no key for reads <ciphertext>.",
2061
2076
  inputSchema: mIRC_list_messages_input,
2062
2077
  handler: mIRC_list_messages
2063
2078
  }
@@ -2156,7 +2171,7 @@ var mircEdgeTools = [
2156
2171
  title: "Mint channel token",
2157
2172
  annotations: { readOnlyHint: false },
2158
2173
  requires: "network",
2159
- description: "Exchange the hub key (MOSADD_API_KEY) for a short-lived (5min), channel-scoped JWT. Returns { token, expires_in, channel_id, scope }. The token is safe to hand to a browser to open a WS via `Sec-WebSocket-Protocol: mosadd.v1, bearer.<token>`. The hub key NEVER leaves the server. Use this from any server-side route (Next.js /api/chat-token, Express, etc.) before showing chat in a browser. Required by LINEAR-2675/E6 to avoid leaking the hub key into CDN access logs.",
2174
+ description: "Exchange the hub key (MOSADD_API_KEY) for a short-lived (5min), channel-scoped JWT. Returns { token, expires_in, channel_id, scope }. The token is safe to hand to a browser to open a WS via `Sec-WebSocket-Protocol: mosadd.v1, bearer.<token>`. The hub key NEVER leaves the server. Use this from any server-side route (Next.js /api/chat-token, Express, etc.) before showing chat in a browser. Required to avoid leaking the hub key into CDN access logs.",
2160
2175
  inputSchema: mIRC_mint_channel_token_input,
2161
2176
  handler: mIRC_mint_channel_token
2162
2177
  },
@@ -2971,6 +2986,15 @@ var mRAG_search_input = z14.object({
2971
2986
  "Set true to also get a generated answer (answer field) grounded in the returned sources. Default false: ranked sources only, answer is empty."
2972
2987
  )
2973
2988
  });
2989
+ var DIAGNOSTIC_KEYS = ["partial", "partial_reason", "search_mode", "degraded", "timing", "stages"];
2990
+ function ragDiagnostics(data) {
2991
+ const out = {};
2992
+ for (const key of DIAGNOSTIC_KEYS) {
2993
+ const value = data[key];
2994
+ if (value !== void 0 && value !== null) out[key] = value;
2995
+ }
2996
+ return out;
2997
+ }
2974
2998
  async function mRAG_search(input, ctx) {
2975
2999
  readSupabaseEnv();
2976
3000
  ctx.log("debug", "mRAG_search via rag-query", { top_k: input.top_k ?? 8 });
@@ -2984,7 +3008,8 @@ async function mRAG_search(input, ctx) {
2984
3008
  return {
2985
3009
  answer: data.answer ?? "",
2986
3010
  sources: data.sources ?? [],
2987
- chunks_found: data.chunks_found ?? (data.sources?.length ?? 0)
3011
+ chunks_found: data.chunks_found ?? (data.sources?.length ?? 0),
3012
+ ...ragDiagnostics(data)
2988
3013
  };
2989
3014
  }
2990
3015
  var PartyArg = z14.object({
@@ -3091,7 +3116,7 @@ var knowledgeTools = [
3091
3116
  title: "Search memory",
3092
3117
  annotations: { readOnlyHint: true },
3093
3118
  requires: "network",
3094
- description: "Search and answer questions over the USER'S OWN mosadd data (messages, emails, calls, notes) with a private per-user RAG index \u2014 hybrid vector + keyword retrieval, reranked, grounded in cited sources (no fabrication). Use it to recall 'what did X say about Y', summarize a thread, or pull facts the user has received. By DEFAULT (via MCP) it returns the ranked source snippets only and `answer` is an empty string (answer_mode retrieve_only): fast, no model call. Pass answer:true to also get a generated answer grounded in those sources (slower, uses the model budget). If the index search runs out of time the call still succeeds and carries partial:true with partial_reason, instead of failing. This is agent memory (mRAG = RAG over your own data) over the user's communications, available outside the mosadd app. NOTE: RAG requires content to be indexed server-side in plaintext, so anything searchable here is NOT covered b",
3119
+ description: "Search and answer questions over the USER'S OWN mosadd data (messages, emails, calls, notes) with a private per-user RAG index \u2014 hybrid vector + keyword retrieval, reranked, grounded in cited sources (no fabrication). Use it to recall 'what did X say about Y', summarize a thread, or pull facts the user has received. By DEFAULT (via MCP) it returns the ranked source snippets only (answer_mode retrieve_only): fast, no model call; `answer` is empty or a short status note starting with '[mRAG' that names the stages and their times. Pass answer:true to also get a generated answer grounded in those sources (slower, uses the model budget). If the vector stage runs out of time the call still succeeds: the sources come from a keyword fallback and the result carries partial:true, partial_reason and search_mode:'keyword' (never a silent empty list); `timing` and `stages` give the milliseconds of every stage. This is agent memory (mRAG = RAG over your own data) over the user's communications, available outside the mosadd app. NOTE: RAG requires content to be indexed server-side in plaintext, so anything searchable here is NOT covered b",
3095
3120
  inputSchema: mRAG_search_input,
3096
3121
  handler: mRAG_search
3097
3122
  },
@@ -3879,8 +3904,8 @@ var channelTools = [
3879
3904
  ...mircMembersTools,
3880
3905
  ...mircMessagesTools,
3881
3906
  ...mircEdgeTools,
3882
- // ...mroomTools, // mROOM: killed (LINEAR-3414) — channel re-cut into ephemeral private mIRC
3883
- // ...mroomMessagesTools, // mROOM: killed (LINEAR-3414)
3907
+ // ...mroomTools, // mROOM: killed — channel re-cut into ephemeral private mIRC
3908
+ // ...mroomMessagesTools, // mROOM: killed
3884
3909
  ...mailTools,
3885
3910
  // mAYL_*: canonical email module (was the mp0st codename; renamed re-arch 2026-06-27)
3886
3911
  // ...mailAliasTools, // mp0st_* aliases RETIRED 2026-07-15 — mAYL is the one name; the mp0st codename is now backend-internal only
@@ -3902,7 +3927,7 @@ var channelTools = [
3902
3927
  // mAYL_agentbox_provision/list/release/extend — the agent mints/lists/releases/extends its OWN
3903
3928
  // real, two-way, disposable inbox (agent-<hex>@mosadd.com). create_inbox parity with AgentMail,
3904
3929
  // on our own stack + provenance. Backs the live mayl-agentbox EF; receive path landed 2026-08-06
3905
- // in mp0st-inbound-webhook (LINEAR-5201). Same requireUser auth as every other mAYL tool.
3930
+ // in mp0st-inbound-webhook. Same requireUser auth as every other mAYL tool.
3906
3931
  ...mailAgentboxTools,
3907
3932
  ...mtalkTools,
3908
3933
  ...attachmentTools,
@@ -3952,7 +3977,7 @@ var channelTools = [
3952
3977
  ...embedTools,
3953
3978
  // comms_embed_create: RE-REGISTERED 2026-07-17 — embed.mosadd.com/v1.js live; mints an embed key + paste-in snippet (mURL→mIRC rework P3)
3954
3979
  ...threatTools,
3955
- // threat_catalog + threat_classify: RE-REGISTERED 2026-07-15 (founder directive + LINEAR-3498) — pure/offline, makes the Pegasus-class classification claim a live, callable capability
3980
+ // threat_catalog + threat_classify: RE-REGISTERED 2026-07-15 (founder directive) — pure/offline, makes the Pegasus-class classification claim a live, callable capability
3956
3981
  ...murlTools
3957
3982
  // mURL: revived as a full module (founder 2026-06-27) — read/post/presence/list_channels over live domain channels
3958
3983
  // ...mcallTools, // mCALL: carrier-pending (no telephony carrier live) — re-register when a carrier is configured
@@ -3973,7 +3998,7 @@ var TOOL_COUNT = allTools.length;
3973
3998
  // package.json
3974
3999
  var package_default = {
3975
4000
  name: "@mosadd/mcp",
3976
- version: "3.0.0",
4001
+ version: "3.0.1",
3977
4002
  mcpName: "io.github.hei33enberg/mosadd-mcp",
3978
4003
  description: "Model Context Protocol server for mosadd. Exposes 4 modules (mDM, mIRC, mURL, mAYL) and capabilities (mTALK, mRAG) plus comms agent-actions \u2014 85 tools \u2014 to any agent runtime (Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom).",
3979
4004
  homepage: "https://github.com/Hei33enberg/mosADD-OS/tree/main/packages/mcp",
@@ -4152,7 +4177,7 @@ function createMosaddServer(options = {}) {
4152
4177
  // Human-facing identity of the server itself (initialize result). The icon URLs
4153
4178
  // point at the LIVE gateway origin on purpose: clients that honour serverInfo.icons
4154
4179
  // get the brand mark without scraping the favicon, and the files ship with
4155
- // the gateway's public/ folder (canon 08-26 — generated by m0ssad-3 scripts/
4180
+ // the gateway's public/ folder (brand rule of 2026-08-26 — generated by m0ssad-3 scripts/
4156
4181
  // generate-brand-icons.py, never hand-edited).
4157
4182
  title: "mosADD \u2014 omnichannel messenger for agents",
4158
4183
  websiteUrl: "https://mosadd.com",
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { DmProvider, VoiceProvider } from '@mosadd/providers';
4
4
  import { RatchetState, DhRatchetState, SessionRole } from '@mosadd/crypto';
5
5
 
6
6
  /**
7
- * mDM end-to-end encryption — session layer (LINEAR-2357).
7
+ * mDM end-to-end encryption — session layer.
8
8
  *
9
9
  * Sits ABOVE the DmProvider. The provider moves opaque bytes; THIS module
10
10
  * decides what those bytes are: an X3DH handshake + Double Ratchet ciphertext
@@ -18,7 +18,7 @@ import { RatchetState, DhRatchetState, SessionRole } from '@mosadd/crypto';
18
18
  * run X3DH (responder) and derive the SAME root key.
19
19
  * - Subsequent messages reuse the stored ratchet session (no header).
20
20
  *
21
- * SCOPE / known follow-ups (tracked on LINEAR-2357, NOT silently hidden):
21
+ * SCOPE / known follow-ups (tracked, NOT silently hidden):
22
22
  * - Ratchet is strict in-order (no skipped-message keys) — fine for a single
23
23
  * ordered thread; out-of-order/lossy transports need skipped-key handling.
24
24
  * - Signed-prekey signature is carried but NOT yet verified (auth follow-up).
@@ -236,14 +236,14 @@ declare function createMosaddServer(options?: MosaddServerOptions): McpServer;
236
236
  /**
237
237
  * Tool registry. Each m* module contributes a set of tools.
238
238
  *
239
- * User-facing modules (4): mDM, mIRC, mURL, mAYL — the re-arch (LINEAR-3938)
239
+ * User-facing modules (4): mDM, mIRC, mURL, mAYL — the re-arch
240
240
  * mAYL replaces the old mp0st name (mp0st_* still registered as back-compat
241
241
  * aliases via mail-aliases.ts; will be removed in a later alpha).
242
242
  *
243
243
  * Capabilities (not modules — cross-cutting agent tooling): mRAG, comms_.
244
244
  * mTALK = voice tier inside mIRC, still its own tools for now; folding into
245
245
  * mIRC_voice_* in a follow-up release. threat_* (threat_catalog + threat_classify)
246
- * are REGISTERED (2026-07-15, founder directive + LINEAR-3498): pure/offline
246
+ * are REGISTERED (2026-07-15, founder directive): pure/offline
247
247
  * defensive classification over the threat taxonomy — the surveillance-era
248
248
  * *marketing* was killed, the classification engine is real and wanted.
249
249
  *
@@ -253,7 +253,7 @@ declare function createMosaddServer(options?: MosaddServerOptions): McpServer;
253
253
  * when the alpha carrying mIRC_invite is published and the gateway redeployed):
254
254
  * modules mDM 16 · mIRC 25 · mURL 7 · mAYL 16 = 64; capabilities mTALK 6 · mRAG 8 ·
255
255
  * comms 5 (action_create/action_frame_get/embed_create/capabilities/session_attach) · Irondome/threat 2
256
- * = 21. 64 + 21 = 85. (mIRC 25 = 24 + mIRC_invite added 2026-09-03 (LINEAR-5870): mIRC_join adds the KEY's
256
+ * = 21. 64 + 21 = 85. (mIRC 25 = 24 + mIRC_invite added 2026-09-03: mIRC_join adds the KEY's
257
257
  * identity while channel posts are signed by the AGENT, so every channel created from the toolkit was mute
258
258
  * until its agent was added from the app — mIRC_invite wraps channel-members-manage `invite`: own agent →
259
259
  * auto_joined, anyone else → invite code. mDM 16 = 14 + mDM_send_as_agent/mDM_list_my_agents added 2026-08-17: an MCP key
@@ -273,7 +273,7 @@ declare function createMosaddServer(options?: MosaddServerOptions): McpServer;
273
273
  * mAYL_send_as_agent + mTALK_ingest_ptt were RE-REGISTERED 2026-07-29: both had been disabled
274
274
  * on 07-14 notes that had since become false, and both were re-verified on authenticated calls.
275
275
  * comms_embed_create RE-REGISTERED 2026-07-17 (embed.mosadd.com/v1.js live — P3 of mURL→mIRC).
276
- * mROOM was KILLED (LINEAR-3414, channel re-cut → ephemeral private mIRC): its tools
276
+ * mROOM was KILLED (channel re-cut → ephemeral private mIRC): its tools
277
277
  * live in tools/mroom.ts + mroom-messages.ts but are NOT registered here.
278
278
  * Plus action links: comms_action_create (agent → user one-link browser action,
279
279
  * incl. screen_share) + comms_action_frame_get (see the recipient's shared screen).
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  createMosaddServer,
5
5
  defaultProviders,
6
6
  runWithSupabaseEnv
7
- } from "./chunk-VMMJJYXF.js";
7
+ } from "./chunk-J2S44U5R.js";
8
8
  import "./chunk-Z7WR52GE.js";
9
9
  export {
10
10
  TOOL_COUNT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mosadd/mcp",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "mcpName": "io.github.hei33enberg/mosadd-mcp",
5
5
  "description": "Model Context Protocol server for mosadd. Exposes 4 modules (mDM, mIRC, mURL, mAYL) and capabilities (mTALK, mRAG) plus comms agent-actions — 85 tools — to any agent runtime (Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom).",
6
6
  "homepage": "https://github.com/Hei33enberg/mosADD-OS/tree/main/packages/mcp",
@@ -7,7 +7,7 @@
7
7
  * Buckety `file-blobs` i `voice-blobs` NIE ISTNIEJĄ w projekcie — lista bucketów
8
8
  * (16.09) to: secure_vault, brand_assets, chat-files, gemstone-models, voice-messages,
9
9
  * chat-attachments, odyssey-media, raydio-media, voice-samples, mayl-attachments,
10
- * rag-uploads, ptt-recordings, avatars, downloads, orb-media, founder-archive, krol-wrzutki.
10
+ * rag-uploads, ptt-recordings, avatars, downloads, orb-media, founder-archive and one private bucket.
11
11
  *
12
12
  * Dwa zamki, każdy pilnuje jednej połowy kontraktu z polityką RLS:
13
13
  * 1. bucket, który istnieje I przyjmie ten JWT (chat-files / voice-messages);
@@ -1,22 +1,21 @@
1
1
  /**
2
- * ZAMEK „ZERO SZYFROWANIA Z FLOTA" (29.09.2026, owner decision 28.09: no encryption on agent-line
2
+ * LOCK "NO ENCRYPTION WITH THE FLEET" (29.09.2026, owner decision 28.09: no encryption on agent-line
3
3
  * conversations, in any channel or identity).
4
4
  *
5
- * Dwie reguly bramy MCP, obie zmierzone jako zepsute 28–29.09 (Public\ZERO-SZYFROWANIA-29-09,
6
- * D1 §3 i S1 §1b):
5
+ * Two rules of the MCP gateway, both measured as broken on 28–29.09:
7
6
  *
8
- * c1 — DEKODER KANALU. #adm i #command sa otwarte, bez klucza grupowego. Aplikacja zapisuje
9
- * tekst kanalu jako goly UTF-8 w base64 (apps/web ircApi.ts `encodePayload`). Stary dekoder
10
- * (`mirc-messages.ts` / `mroom-messages.ts` `unpackPayload`) znal tylko koperte JSON, wiec
11
- * KAZDY wpis Krola czytal sie liniom jako "<ciphertext>" (f159c8d7, 776b3e9a na #adm).
12
- * Teraz: jawny tekst = tekst. "<ciphertext>" zostaje tylko dla prawdziwej koperty klucza
13
- * grupowego {iv,ciphertext,hmac}, do ktorej linia nie ma klucza (i dla bajtow nie-UTF-8).
7
+ * c1 — CHANNEL DECODER. Open channels have no group key. The app stores channel text
8
+ * as bare UTF-8 in base64 (apps/web ircApi.ts `encodePayload`). The old decoder
9
+ * (`mirc-messages.ts` / `mroom-messages.ts` `unpackPayload`) knew only the JSON envelope, so
10
+ * EVERY post of the owner read as "<ciphertext>" for the agent lines.
11
+ * Now: plain text = text. "<ciphertext>" stays only for a real group-key envelope
12
+ * {iv,ciphertext,hmac} the line holds no key for (and for bytes that are not UTF-8).
14
13
  *
15
- * b1 — mDM_send DO FLOTY JAWNIE. Gdy ktoras strona to linia agenta ALBO to wiadomosc do siebie
16
- * (to === selfId), wysylka idzie sciezka jawna: encrypted:false, reason:"fleet_plaintext".
17
- * Czlowiek↔czlowiek zostaje E2EE bez zmian (koperta X3DH + Double Ratchet).
14
+ * b1 — mDM_send TO THE FLEET IN THE CLEAR. When either side is an agent line OR it is a note to self
15
+ * (to === selfId), the send takes the plain path: encrypted:false, reason:"fleet_plaintext".
16
+ * Person↔person stays E2EE, unchanged (X3DH + Double Ratchet envelope).
18
17
  *
19
- * Kazdy zamek sprawdzony na czerwono przed naprawa (kod alpha.54) i pod sabotazem po naprawie.
18
+ * Every lock was checked red before the fix (alpha.54 code) and under sabotage after the fix.
20
19
  */
21
20
  import { describe, expect, it, vi, beforeEach } from "vitest";
22
21
  import type { DmProvider, DmListArgs, DmListResult, DmSendResult } from "@mosadd/providers";
@@ -66,82 +65,82 @@ const listCtx = { log: noopLog } as unknown as MosaddToolContext;
66
65
  const appEncode = (text: string) => Buffer.from(new TextEncoder().encode(text)).toString("base64");
67
66
  const b64json = (obj: unknown) => Buffer.from(JSON.stringify(obj), "utf8").toString("base64");
68
67
 
69
- const ADM = "6c251ebf-acb4-4f49-bd9a-7fc28e5cfee6";
70
- const KING = "king-identity";
71
- const LINE = "general-line-identity";
68
+ const CHANNEL = "00000000-0000-4000-8000-000000000001";
69
+ const OWNER = "owner-identity";
70
+ const LINE = "agent-line-identity";
72
71
  const PEER = "peer-human-identity";
73
- // Synthetic (the repo is public — no real message of the King goes into a fixture): Polish
74
- // diacritics, an em dash, an @mention, a newline and an emoji, like the King writes.
75
- const KING_TEXT = "Kto dowodzi flotą? Zgłoście się na #adm — żółć, źdźbło 🦞\n@all baczność";
72
+ // Synthetic (the repo is public — no real message goes into a fixture): Polish
73
+ // diacritics, an em dash, an @mention, a newline and an emoji, like a real owner post.
74
+ const OWNER_TEXT = "Zażółć gęślą jaźń — spotkanie o 9:00 🦞\n@all proszę o potwierdzenie";
76
75
 
77
76
  type ListOut = { messages: Array<{ id: string; text: string }> };
78
77
 
79
78
  async function readChannel(rows: Array<[string, string]>): Promise<string[]> {
80
79
  storedRows = rows.map(([id, payload], i) => ({
81
80
  id,
82
- sender_identity_id: KING,
81
+ sender_identity_id: OWNER,
83
82
  encrypted_payload: payload,
84
83
  created_at: new Date(i * 1000).toISOString(),
85
84
  }));
86
85
  const out = (await handler(mircMessagesTools, "mIRC_list_messages")(
87
- { channel_id: ADM, space_id: "space-adm", limit: 50 },
86
+ { channel_id: CHANNEL, space_id: "space-1", limit: 50 },
88
87
  listCtx,
89
88
  )) as ListOut;
90
89
  return out.messages.map((m) => m.text);
91
90
  }
92
91
 
93
- describe("c1 — dekoder kanalu: tekst Krola czyta sie jako tekst, <ciphertext> tylko dla zamknietej koperty", () => {
92
+ describe("c1 — channel decoder: the owner's text reads as text, <ciphertext> only for a sealed envelope", () => {
94
93
  beforeEach(() => {
95
94
  storedRows = [];
96
95
  groupKeyOpens = () => null;
97
96
  });
98
97
 
99
- it("wpis Krola z aplikacji (goly UTF-8 w base64) na otwartym #adm → czytelny tekst, nie <ciphertext>", async () => {
98
+ it("an owner post from the app (bare UTF-8 in base64) on an open channel → readable text, not <ciphertext>", async () => {
100
99
  const texts = await readChannel([
101
- ["f159c8d7", appEncode(KING_TEXT)],
102
- ["776b3e9a", appEncode("@all bacznosc")],
100
+ ["msg-1", appEncode(OWNER_TEXT)],
101
+ ["msg-2", appEncode("@all please confirm")],
103
102
  ]);
104
- expect(texts).toEqual([KING_TEXT, "@all bacznosc"]);
103
+ expect(texts).toEqual([OWNER_TEXT, "@all please confirm"]);
105
104
  expect(texts).not.toContain("<ciphertext>");
106
105
  });
107
106
 
108
- it("koperta mosadd.chat.v1 z narzedzia (linie) → jej tekst, jak dotad", async () => {
107
+ it("a mosadd.chat.v1 envelope from the tool (agent lines) → its text, as before", async () => {
109
108
  const texts = await readChannel([
110
- ["line-1", b64json({ v: "mosadd.chat.v1", type: "text", text: "meldunek linii", reply_to: null })],
109
+ ["line-1", b64json({ v: "mosadd.chat.v1", type: "text", text: "line report", reply_to: null })],
111
110
  ]);
112
- expect(texts).toEqual(["meldunek linii"]);
111
+ expect(texts).toEqual(["line report"]);
113
112
  });
114
113
 
115
- it("koperta klucza grupowego {iv,ciphertext,hmac} BEZ klucza → <ciphertext> zostaje", async () => {
114
+ it("a group-key envelope {iv,ciphertext,hmac} WITHOUT the key → <ciphertext> stays", async () => {
116
115
  const texts = await readChannel([["sealed", b64json({ iv: "AAAAAAAAAAAAAAAA", ciphertext: "c2VhbGVk", hmac: "aG1hYw==" })]]);
117
116
  expect(texts).toEqual(["<ciphertext>"]);
118
117
  });
119
118
 
120
- it("koperta klucza grupowego, linia MA klucz → odszyfrowany tekst (sciezka bez zmian)", async () => {
119
+ it("a group-key envelope, the line HAS the key → decrypted text (path unchanged)", async () => {
121
120
  const sealed = b64json({ iv: "AAAAAAAAAAAAAAAA", ciphertext: "c2VhbGVk", hmac: "aG1hYw==" });
122
- groupKeyOpens = (_c, p) => (p === sealed ? JSON.stringify({ v: "mosadd.chat.v1", type: "text", text: "z klucza" }) : null);
123
- expect(await readChannel([["sealed", sealed]])).toEqual(["z klucza"]);
121
+ groupKeyOpens = (_c, p) => (p === sealed ? JSON.stringify({ v: "mosadd.chat.v1", type: "text", text: "from the key" }) : null);
122
+ expect(await readChannel([["sealed", sealed]])).toEqual(["from the key"]);
124
123
  });
125
124
 
126
- it("koperta ratchetu mDM (v: mosadd.e2ee.*) wklejona w kanal → <ciphertext>", async () => {
125
+ it("an mDM ratchet envelope (v: mosadd.e2ee.*) pasted into a channel → <ciphertext>", async () => {
127
126
  const texts = await readChannel([["e2ee", b64json({ v: "mosadd.e2ee.v2", dh: "x", n: 0, ct: "y" })]]);
128
127
  expect(texts).toEqual(["<ciphertext>"]);
129
128
  });
130
129
 
131
- it("bajty nie-UTF-8 → <ciphertext> (to nie slowa)", async () => {
130
+ it("non-UTF-8 bytes → <ciphertext> (these are not words)", async () => {
132
131
  const texts = await readChannel([["bin", Buffer.from([0xff, 0xfe, 0x00, 0x81, 0xc3]).toString("base64")]]);
133
132
  expect(texts).toEqual(["<ciphertext>"]);
134
133
  });
135
134
 
136
- it("glos {audio, mime, dur} → znacznik notatki glosowej (formatVoiceIfAny bez zmian)", async () => {
135
+ it("voice {audio, mime, dur} → voice note marker (formatVoiceIfAny unchanged)", async () => {
137
136
  const texts = await readChannel([["voice", b64json({ audio: "A".repeat(2000), mime: "audio/webm", dur: 4200 })]]);
138
137
  expect(texts).toEqual(["[voice note — 4s]"]);
139
138
  });
140
139
 
141
- it("mROOM: ta sama regula — tekst z aplikacji czyta sie jako tekst", async () => {
142
- storedRows = [{ id: "r1", sender_identity_id: KING, encrypted_payload: appEncode(KING_TEXT), created_at: new Date(0).toISOString() }];
140
+ it("mROOM: the same rule — text from the app reads as text", async () => {
141
+ storedRows = [{ id: "r1", sender_identity_id: OWNER, encrypted_payload: appEncode(OWNER_TEXT), created_at: new Date(0).toISOString() }];
143
142
  const out = (await handler(mroomMessagesTools, "mROOM_list_messages")({ room_id: "room-1" }, listCtx)) as ListOut;
144
- expect(out.messages.map((m) => m.text)).toEqual([KING_TEXT]);
143
+ expect(out.messages.map((m) => m.text)).toEqual([OWNER_TEXT]);
145
144
  });
146
145
  });
147
146
 
@@ -189,56 +188,56 @@ const send = (b: Backend, from: string, to: string, text: string) =>
189
188
  handler(mdmTools, "mDM_send")({ to, text }, gatewayRequest(b, from)) as Promise<SendOut>;
190
189
  const plain = (row: Row) => new TextDecoder().decode(row.payload);
191
190
 
192
- describe("b1 — mDM_send: z liniami floty i z Krolem zawsze jawnie, czlowiek↔czlowiek E2EE", () => {
193
- it("linia agenta → Krol: encrypted:false, reason fleet_plaintext, Krol czyta goly tekst", async () => {
191
+ describe("b1 — mDM_send: with fleet lines and with the owner always in the clear, person↔person E2EE", () => {
192
+ it("agent line → owner: encrypted:false, reason fleet_plaintext, the owner reads bare text", async () => {
194
193
  const b = new Backend();
195
194
  b.kinds.set(LINE, "agent");
196
- await person(b, KING, 7);
197
- const s = await send(b, LINE, KING, "meldunek");
195
+ await person(b, OWNER, 7);
196
+ const s = await send(b, LINE, OWNER, "report");
198
197
  expect(s).toMatchObject({ encrypted: false, reason: "fleet_plaintext" });
199
198
  expect(b.rows.at(-1)!.messageType).toBe("txt");
200
- expect(plain(b.rows.at(-1)!)).toBe("meldunek");
199
+ expect(plain(b.rows.at(-1)!)).toBe("report");
201
200
  });
202
201
 
203
- it("Krol (klucz czlowieka) → linia agenta: jawnie, mimo ze linia ma stary pek", async () => {
202
+ it("owner (a person's key) → agent line: in the clear, even though the line has an old bundle", async () => {
204
203
  const b = new Backend();
205
204
  b.kinds.set(LINE, "agent");
206
- await person(b, KING, 7);
205
+ await person(b, OWNER, 7);
207
206
  b.bundles.set(LINE, serializePublicBundle(await new SeededMdmKeyStore(new Uint8Array(32).fill(9)).getOwnMaterial()));
208
- const s = await send(b, KING, LINE, "rozkaz");
207
+ const s = await send(b, OWNER, LINE, "instruction");
209
208
  expect(s).toMatchObject({ encrypted: false, reason: "fleet_plaintext" });
210
- expect(plain(b.rows.at(-1)!)).toBe("rozkaz");
209
+ expect(plain(b.rows.at(-1)!)).toBe("instruction");
211
210
  });
212
211
 
213
- it("Krol pisze do SIEBIE (to === selfId) przez MCP: jawnie — zero kopert we wlasnym watku", async () => {
212
+ it("the owner writes to SELF (to === selfId) through MCP: in the clear — zero envelopes in the own thread", async () => {
214
213
  const b = new Backend();
215
- await person(b, KING, 7);
216
- const s = await send(b, KING, KING, "notatka do siebie");
214
+ await person(b, OWNER, 7);
215
+ const s = await send(b, OWNER, OWNER, "note to self");
217
216
  expect(s).toMatchObject({ encrypted: false, reason: "fleet_plaintext" });
218
217
  const row = b.rows.at(-1)!;
219
- expect(row.threadId).toBe(`dm:${KING}:${KING}`);
218
+ expect(row.threadId).toBe(`dm:${OWNER}:${OWNER}`);
220
219
  expect(isE2eeEnvelope(row.payload)).toBe(false);
221
- expect(plain(row)).toBe("notatka do siebie");
220
+ expect(plain(row)).toBe("note to self");
222
221
  });
223
222
 
224
- it("czlowiek → czlowiek: E2EE zostaje — koperta ratchetu, tekstu nie widac, odbiorca otwiera", async () => {
223
+ it("person → person: E2EE stays — ratchet envelope, text not visible, the recipient opens it", async () => {
225
224
  const b = new Backend();
226
- await person(b, KING, 7);
225
+ await person(b, OWNER, 7);
227
226
  const peerKeys = await person(b, PEER, 5);
228
- const s = await send(b, KING, PEER, "tajne");
227
+ const s = await send(b, OWNER, PEER, "secret");
229
228
  expect(s).toMatchObject({ encrypted: true, mode: "e2ee" });
230
229
  expect(s.reason).not.toBe("fleet_plaintext");
231
230
  const row = b.rows.at(-1)!;
232
231
  expect(isE2eeEnvelope(row.payload)).toBe(true);
233
- expect(plain(row)).not.toContain("tajne");
234
- expect(new TextDecoder().decode(await decryptFromPeer(peerKeys, KING, row.payload))).toBe("tajne");
232
+ expect(plain(row)).not.toContain("secret");
233
+ expect(new TextDecoder().decode(await decryptFromPeer(peerKeys, OWNER, row.payload))).toBe("secret");
235
234
  });
236
235
 
237
- it("opisy narzedzi: mDM_send_unencrypted nie jest 'DEPRECATED / prefer mDM_send', obie mowia: floty zawsze jawnie", () => {
236
+ it("tool descriptions: mDM_send_unencrypted is not 'DEPRECATED / prefer mDM_send', both say: fleet always in the clear", () => {
238
237
  const d = (n: string) => mdmTools.find((t) => t.name === n)!.description;
239
238
  expect(d("mDM_send_unencrypted")).not.toMatch(/DEPRECATED|Prefer mDM_send|Will be removed/i);
240
239
  for (const n of ["mDM_send", "mDM_send_unencrypted"]) {
241
- expect(d(n)).toMatch(/fleet lines and with the King: ALWAYS in the clear/);
240
+ expect(d(n)).toMatch(/Conversations with fleet lines and with the [A-Za-z ]+: ALWAYS in the clear/);
242
241
  }
243
242
  });
244
243
  });
@@ -176,7 +176,7 @@ describe("@mosadd/mcp — integration (real stdio)", () => {
176
176
  expect(names).toContain("mDM_send");
177
177
  expect(names).toContain("mIRC_create");
178
178
  expect(names).toContain("mURL_post"); // mURL revived module (2026-06-27)
179
- expect(names).toContain("mAYL_send"); // mAYL = email 3.0 (was mp0st); threat_catalog/threat_classify ARE registered (LINEAR-3498)
179
+ expect(names).toContain("mAYL_send"); // mAYL = email 3.0 (was mp0st); threat_catalog/threat_classify ARE registered
180
180
  expect(names).not.toContain("mp0st_send"); // mp0st_* aliases RETIRED 2026-07-15 — mAYL only
181
181
  expect(names).toContain("mTALK_press"); // mTALK PTT now shipped
182
182
  expect(names).toContain("mRAG_search"); // mRAG RAG-for-devs now shipped
@@ -1,5 +1,5 @@
1
1
  /**
2
- * mDM E2EE golden path (LINEAR-2357) — the "done" bar.
2
+ * mDM E2EE golden path — the "done" bar.
3
3
  *
4
4
  * Two parties (alice, bob) sharing ONE backend that acts as both the message
5
5
  * store AND the key directory (decision "1a": prekey bundles ride the same
@@ -105,7 +105,7 @@ describe("mDM E2EE golden path — X3DH handshake + ratchet, both directions", (
105
105
  const wire = backend.messages[0]!.payload;
106
106
  const wireStr = Buffer.from(wire).toString("utf8");
107
107
  expect(wireStr).not.toContain("first contact");
108
- expect(wireStr).toContain("mosadd.e2ee.v2"); // DH-ratchet sealed envelope (PCS — LINEAR-3409)
108
+ expect(wireStr).toContain("mosadd.e2ee.v2"); // DH-ratchet sealed envelope (PCS)
109
109
 
110
110
  // 4. Bob lists the thread and decrypts Alice's message.
111
111
  const bobView = (await tool("mDM_list")({ contact_id: "alice" }, bob)) as {
@@ -178,7 +178,7 @@ describe("mDM E2EE golden path — X3DH handshake + ratchet, both directions", (
178
178
  });
179
179
  });
180
180
 
181
- describe("auto-publish prekeys on startup (LINEAR-3104 cold-start fix)", () => {
181
+ describe("auto-publish prekeys on startup (cold-start fix)", () => {
182
182
  it("publishes the local prekey bundle when autoPublishKeys is set", async () => {
183
183
  const backend = new SharedBackend();
184
184
  createMosaddServer({