@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.
- package/CHANGELOG.md +415 -410
- package/LICENSE +21 -0
- package/dist/bin/mcp.js +1 -1
- package/dist/{chunk-VMMJJYXF.js → chunk-J2S44U5R.js} +52 -27
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/__tests__/blob-upload.test.ts +1 -1
- package/src/__tests__/{flota-jawnie.test.ts → fleet-plaintext.test.ts} +59 -60
- package/src/__tests__/integration.test.ts +1 -1
- package/src/__tests__/mdm-e2ee.test.ts +3 -3
- package/src/__tests__/mdm-mcp-readable.test.ts +95 -95
- package/src/__tests__/mirc-invite.test.ts +1 -1
- package/src/__tests__/mirc-voice.test.ts +82 -0
- package/src/__tests__/mrag-search-diagnostics.test.ts +78 -0
- package/src/__tests__/presence.test.ts +2 -2
- package/src/__tests__/server.test.ts +3 -3
- package/src/__tests__/tool-count-consistency.test.ts +4 -4
- package/src/crypto/channel-e2ee.ts +1 -1
- package/src/crypto/mdm-session.ts +14 -14
- package/src/providers/supabase-dm.ts +1 -1
- package/src/providers/supabase.ts +8 -8
- package/src/server.ts +4 -4
- package/src/tools/channel-payload.ts +3 -3
- package/src/tools/index.ts +13 -13
- package/src/tools/knowledge.ts +384 -351
- package/src/tools/mail-aliases.ts +1 -1
- package/src/tools/mail-provenance.ts +1 -1
- package/src/tools/mdm-as-agent.ts +3 -4
- package/src/tools/mdm.ts +15 -13
- package/src/tools/mirc-edge.ts +4 -4
- package/src/tools/mirc-members.ts +1 -1
- package/src/tools/mirc-messages.ts +36 -12
- package/src/tools/mirc.ts +1 -1
- package/src/tools/mroom-messages.ts +1 -1
- package/src/tools/presence.ts +10 -10
- package/src/tools/ptt-ingest.ts +1 -1
- package/src/tools/threat.ts +1 -1
- 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
|
@@ -58,18 +58,18 @@ function getSupabase(env = readSupabaseEnv()) {
|
|
|
58
58
|
autoRefreshToken: false,
|
|
59
59
|
detectSessionInUrl: false
|
|
60
60
|
},
|
|
61
|
-
// ⛔ x-mosadd-origin:
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
// hub-key-exchange
|
|
65
|
-
//
|
|
66
|
-
//
|
|
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
|
-
//
|
|
72
|
-
//
|
|
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
|
|
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 (
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
3883
|
-
// ...mroomMessagesTools, // mROOM: killed
|
|
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
|
|
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
|
|
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.
|
|
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 (
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosadd/mcp",
|
|
3
|
-
"version": "3.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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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 —
|
|
9
|
-
*
|
|
10
|
-
* (`mirc-messages.ts` / `mroom-messages.ts` `unpackPayload`)
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
|
16
|
-
* (to === selfId),
|
|
17
|
-
*
|
|
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
|
-
*
|
|
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
|
|
70
|
-
const
|
|
71
|
-
const LINE = "
|
|
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
|
|
74
|
-
// diacritics, an em dash, an @mention, a newline and an emoji, like
|
|
75
|
-
const
|
|
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:
|
|
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:
|
|
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 —
|
|
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("
|
|
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
|
-
["
|
|
102
|
-
["
|
|
100
|
+
["msg-1", appEncode(OWNER_TEXT)],
|
|
101
|
+
["msg-2", appEncode("@all please confirm")],
|
|
103
102
|
]);
|
|
104
|
-
expect(texts).toEqual([
|
|
103
|
+
expect(texts).toEqual([OWNER_TEXT, "@all please confirm"]);
|
|
105
104
|
expect(texts).not.toContain("<ciphertext>");
|
|
106
105
|
});
|
|
107
106
|
|
|
108
|
-
it("
|
|
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: "
|
|
109
|
+
["line-1", b64json({ v: "mosadd.chat.v1", type: "text", text: "line report", reply_to: null })],
|
|
111
110
|
]);
|
|
112
|
-
expect(texts).toEqual(["
|
|
111
|
+
expect(texts).toEqual(["line report"]);
|
|
113
112
|
});
|
|
114
113
|
|
|
115
|
-
it("
|
|
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("
|
|
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: "
|
|
123
|
-
expect(await readChannel([["sealed", sealed]])).toEqual(["
|
|
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("
|
|
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("
|
|
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("
|
|
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:
|
|
142
|
-
storedRows = [{ id: "r1", sender_identity_id:
|
|
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([
|
|
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:
|
|
193
|
-
it("
|
|
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,
|
|
197
|
-
const s = await send(b, LINE,
|
|
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("
|
|
199
|
+
expect(plain(b.rows.at(-1)!)).toBe("report");
|
|
201
200
|
});
|
|
202
201
|
|
|
203
|
-
it("
|
|
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,
|
|
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,
|
|
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("
|
|
209
|
+
expect(plain(b.rows.at(-1)!)).toBe("instruction");
|
|
211
210
|
});
|
|
212
211
|
|
|
213
|
-
it("
|
|
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,
|
|
216
|
-
const s = await send(b,
|
|
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:${
|
|
218
|
+
expect(row.threadId).toBe(`dm:${OWNER}:${OWNER}`);
|
|
220
219
|
expect(isE2eeEnvelope(row.payload)).toBe(false);
|
|
221
|
-
expect(plain(row)).toBe("
|
|
220
|
+
expect(plain(row)).toBe("note to self");
|
|
222
221
|
});
|
|
223
222
|
|
|
224
|
-
it("
|
|
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,
|
|
225
|
+
await person(b, OWNER, 7);
|
|
227
226
|
const peerKeys = await person(b, PEER, 5);
|
|
228
|
-
const s = await send(b,
|
|
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("
|
|
234
|
-
expect(new TextDecoder().decode(await decryptFromPeer(peerKeys,
|
|
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("
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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({
|