@mosadd/mcp 3.0.0-alpha.56 → 3.0.0-alpha.57

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 CHANGED
@@ -8,6 +8,16 @@ gateway (Phase 2) ships.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [3.0.0-alpha.57] — 2026-11-15
12
+
13
+ ### Fixed
14
+ - **`mTALK_open {label}` opens a room you own.** The room id is now `mosadd-room-<your identity id>-<label>`;
15
+ you and your accepted contacts can join it, a stranger cannot (before: one shared `mosadd-room-<label>` for every
16
+ account, refused to everyone, including its creator).
17
+ - **`mDM_list` returns voice notes with their transcript and recording.** Voice/PTT messages carry
18
+ `voice: { transcript, audio_url, duration_ms }` (signed URL, read with the caller's own permissions) instead of a
19
+ bare caption.
20
+
11
21
  ## [3.0.0-alpha.56] — 2026-11-10
12
22
 
13
23
  ### Added
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # @mosadd/mcp
2
2
 
3
- **They're apps. We're the layer.** The MCP server for [mosADD](https://mosadd.com) — the omnichannel comms layer for humans, agents, and robots. It exposes the OS modules (m\*) — **mDM (1:1 messages), mIRC (in-app channels), mURL (open/embeddable rooms), and mAYL (email 3.0)** — as Model Context Protocol tools, so any agent runtime becomes a first-class contact your team can message and direct: Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, or your own.
3
+ **They're apps. We're the layer.** The MCP server for [mosADD](https://mosadd.com) — the omnichannel comms layer for humans, agents, and robots. It exposes the OS modules (m\*) — **mDM (1:1), mIRC (channels, including open-web mURL rooms), and mAYL (email 3.0)** — as Model Context Protocol tools, so any agent runtime becomes a first-class contact your team can message and direct: Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, or your own.
4
4
 
5
- One key, one server, 85 tools — MCP-native, no SDK to wire up. **What is encrypted, plainly:** mDM between two *people* in the mosADD app is end-to-end encrypted (Signal X3DH + Double Ratchet, keys on the device). Since 3.0.0-alpha.54, when an agent line is on either side of an mDM — and every agent hub key and every m.0S key speaks as an agent line — `mDM_send` sends plain text over TLS and the service can read it. Channels, mURL rooms, mail and voice are server-readable too. The full posture: [docs/security/e2ee-posture.md](https://github.com/Hei33enberg/mosADD-OS/blob/main/docs/security/e2ee-posture.md).
5
+ **Hosted path:** `https://mcp.mosadd.com/mcp` — add it by URL and sign in with your mosADD account (OAuth), nothing to paste. Without a browser, use a key from [mosadd.com/keys](https://mosadd.com/keys) (`MOSADD_API_KEY` / `mosadd_sk_live_…`) over stdio with this package, or as a Bearer header against the same address.
6
6
 
7
- > **85 tools** across **4 modules** (mDM, mIRC, mURL, mAYL) + cross-cutting capabilities (mTALK voice, mRAG search, comms agent-actions) + agent→user action links + the `comms_capabilities` discovery tool, wired to the mosADD backend (BYOK) as a strangler-fig step. Phase 2 routes through the hosted gateway at `mcp.mosadd.com`.
7
+ One key, one server, 85 tools — MCP-native, no SDK to wire up. **What is encrypted, plainly:** mDM between two *people* in the mosADD app is end-to-end encrypted (Signal X3DH + Double Ratchet, keys on the device). Since 3.0.0-alpha.54, when an agent line is on either side of an mDM — and every agent hub key and every key for the MCP endpoint speaks as an agent line — `mDM_send` sends plain text over TLS and the service can read it. Channels, mURL rooms, mail and voice are server-readable too. The full posture: [docs/security/e2ee-posture.md](https://github.com/Hei33enberg/mosADD-OS/blob/main/docs/security/e2ee-posture.md).
8
+
9
+ > **85 tools** across **3 MVP modules** (mDM, mIRC, mAYL) — mURL open-web rooms are folded under mIRC — + cross-cutting capabilities (mTALK voice, mRAG search, comms agent-actions) + agent→user action links + the `comms_capabilities` discovery tool.
8
10
 
9
11
  ## Connect your agent
10
12
 
@@ -53,27 +55,27 @@ A `mosadd_sk_live_…` hub key does not expire; the server exchanges it for a fr
53
55
  }
54
56
  ```
55
57
 
56
- Mint a key at **[mosadd.com/keys](https://mosadd.com/keys)** — the hub shows it once, in the `mosadd_sk_live_…` format above. You can also use it as a Bearer token against the hosted MCP gateway at `https://mcp.mosadd.com/mcp`.
58
+ Mint a mosadd.com key at **[mosadd.com/keys](https://mosadd.com/keys)** — shown once as `mosadd_sk_live_…`. The same key also works as a Bearer header against `https://mcp.mosadd.com/mcp`; with a browser, sign in there instead (OAuth).
57
59
 
58
60
  ### 3. BYOK + `MOSADD_USER_JWT` — advanced / debugging
59
61
 
60
- Bring your own Supabase URL + anon key + a raw session token. **The JWT expires (~1h)** — prefer option 1 or 2 for anything ongoing.
62
+ Bring your own Supabase URL + anon key + a raw session token. **The JWT expires (~1h)** — prefer option 1 or 2, or the hosted endpoint `https://mcp.mosadd.com/mcp`, for anything ongoing.
61
63
 
62
64
  - `MOSADD_SUPABASE_URL` — your Supabase project URL (e.g. `https://abc.supabase.co`)
63
65
  - `MOSADD_SUPABASE_ANON_KEY` — the public anon key from project settings
64
66
  - `MOSADD_USER_JWT` — sign in to mosadd.com → DevTools → Application → Local Storage → `sb-<ref>-auth-token` → copy the `access_token` field
65
67
 
66
- In Phase 2 the hosted gateway at `mcp.mosadd.com` removes even this — add a URL + key once, server-side, and the broker holds the credentials.
68
+ The hosted gateway at `https://mcp.mosadd.com/mcp` is the zero-install remote path: OAuth sign-in, or Bearer with a mosadd.com key.
67
69
 
68
70
  ## Tools shipped in alpha
69
71
 
70
- **85 tools** — 4 modules (mDM, mIRC, mURL, mAYL) + capabilities (mTALK voice, mRAG search + knowledge-graph traversal, comms agent-actions) + the `comms_capabilities` discovery tool. Highlights per module:
72
+ **85 tools** — 3 MVP modules (mDM, mIRC[+mURL], mAYL) + capabilities (mTALK voice, mRAG search + knowledge-graph traversal, comms agent-actions) + the `comms_capabilities` discovery tool. Highlights:
71
73
 
72
74
  | Module | Tools | What it does |
73
75
  |---|---|---|
74
76
  | **mDM** (16) | `mDM_list_contacts`, `mDM_send`, `mDM_send_unencrypted` (DEPRECATED — migration-window fallback, only when the peer hasn't published keys), `mDM_edit`, `mDM_delete`, `mDM_list`, `mDM_publish_keys`, `mDM_respond_request`, `mDM_call_start/answer/end`, `mDM_voice_note`, `mDM_send_voice`, `mDM_send_file` | 1:1 text, voice notes, calls + file/voice attachments. Multi-thread per contact. Between two people `mDM_send` encrypts end-to-end (X3DH / Double Ratchet, `mosadd.e2ee.v2`); with an agent line on either side (alpha.54 and later) it sends plain text the service can read |
75
77
  | **mIRC** (25) | `mIRC_create/list/get/update/delete/discover/report`, member RBAC (`mIRC_join/leave/invite/kick/ban/unban/set_role/set_ptt/approve_request/reject_request/request_access`), `mIRC_post_message`, `mIRC_list_messages`, edge (`mIRC_mint_channel_token`, `mIRC_send_edge`, `mIRC_history_edge`), `mIRC_send_voice/file` | Persistent Discord/Slack-style channels + the agent-coordination edge transport |
76
- | **mURL** (7) | `mURL_read_channel`, `mURL_post`, `mURL_presence`, `mURL_list_channels`, `mURL_create`, `mURL_update`, `mURL_delete` | IRC-for-URLs — open-web text rooms, agent-native. Read/post/presence/discovery with a hub key, PLUS owner-side lifecycle: `mURL_create` (claim a domain), `mURL_update` (branding + open/claimed/blocked), `mURL_delete` (`murl-manage` EF, owner-scoped via your login session). Transport-encrypted, server-readable/public by design |
78
+ | **mURL** (7) | `mURL_read_channel`, `mURL_post`, `mURL_presence`, `mURL_list_channels`, `mURL_create`, `mURL_update`, `mURL_delete` | Open-web rooms folded under mIRC (not a separate MVP module). Read/post/presence/discovery + owner lifecycle. Transport-encrypted, server-readable/public by design |
77
79
  | **mAYL** (16) | `mAYL_send`, `mAYL_view`, `mAYL_list`, `mAYL_delete`, `mAYL_stats`, `mAYL_events`, `mAYL_metrics`, `mAYL_revoke`, `mAYL_audit_export`, `mAYL_consent`, `mAYL_notify`, `mAYL_send_as_agent`, `mAYL_agentbox_provision`, `mAYL_agentbox_list`, `mAYL_agentbox_extend`, `mAYL_agentbox_release` | Mail; every user gets `<id>@mosadd.com`. The four `mAYL_agentbox_*` tools let an AGENT mint, list, extend and release its OWN two-way disposable inbox (`agent-<hex>@mosadd.com`) — `create_inbox` parity with AgentMail, on our stack, with provenance. Transport + at-rest encrypted (server-readable), NOT E2EE. `mAYL_revoke` recalls secure-reader access; `mAYL_audit_export` emits an HMAC-SHA256-signed engagement audit; `mAYL_consent` manages recipient tracking opt-outs (GDPR); `mAYL_notify` pulls the inbound-mail feed. (Was the mp0st codename; the `mp0st_*` aliases are retired — mAYL is the one name) |
78
80
  | **mTALK** (6) | `mTALK_open`, `mTALK_join`, `mTALK_press`, `mTALK_release`, `mTALK_state`, `mTALK_ingest_ptt` | Half-duplex push-to-talk: one speaker, FIFO queue, anti-hog auto-release + transcript ingest to mRAG |
79
81
  | **mRAG** (8) | `mRAG_ingest`, `mRAG_search`, `mRAG_list_sources`, `mRAG_delete`, `mRAG_graph_refresh`, `mRAG_graph_overview`, `mRAG_graph_neighbors`, `mRAG_graph_timeline` | RAG recall over the user's own data (hybrid vector + BM25) + knowledge-graph traversal (who/what/when) |
@@ -119,7 +121,7 @@ Postgres `messages` table
119
121
  mosadd.com app (receiver)
120
122
  ```
121
123
 
122
- For PTT / CALL (real-time media), the architecture separates **control plane** (MCP) from **data plane** (WebRTC daemon). See [docs/architecture/control-data-plane.md](https://github.com/Hei33enberg/mosadd-os/blob/main/docs/architecture/control-data-plane.md) when it lands.
124
+ For PTT / CALL (real-time media), the architecture separates **control plane** (MCP) from **data plane** (WebRTC daemon). That design doc is not written yet; what the hosted service guarantees today is in [docs/architecture/phase-2-hub.md](https://github.com/Hei33enberg/mosADD-OS/blob/main/docs/architecture/phase-2-hub.md).
123
125
 
124
126
  ## Configuration via env vars
125
127
 
@@ -141,10 +143,9 @@ Missing optional keys fail closed — that channel is simply absent from `comms_
141
143
 
142
144
  ## Links
143
145
 
144
- - **Mint a key + docs** — [mosadd.com/keys](https://mosadd.com/keys) · [mosadd.com/docs](https://mosadd.com/docs) · [mosadd.com/mcp](https://mosadd.com/mcp)
145
- - **Hosted gateway** — `https://mcp.mosadd.com/mcp` (BYOK key broker, zero-install for remote agents)
146
+ - **Hosted endpoint** — `https://mcp.mosadd.com/mcp` (OAuth sign-in) · keys at [mosadd.com/keys](https://mosadd.com/keys) · see the [repo README](https://github.com/Hei33enberg/mosADD-OS#connect-your-ai-in-one-line)
147
+ - **mosADD** — [mosadd.com](https://mosadd.com) · [docs](https://mosadd.com/docs/quickstart)
146
148
  - **Source** — [github.com/Hei33enberg/mosADD-OS](https://github.com/Hei33enberg/mosADD-OS) (MIT)
147
- - **m.0S endpoint** — `https://mcp.mosadd.dev/mcp` with a key from [app.mosadd.dev](https://app.mosadd.dev); see the [repo README](https://github.com/Hei33enberg/mosADD-OS#start-in-5-minutes)
148
149
 
149
150
  ## License
150
151
 
package/dist/bin/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createMosaddServer
4
- } from "../chunk-T3KDVUAT.js";
4
+ } from "../chunk-WEGSITAH.js";
5
5
  import {
6
6
  isSessionExpired,
7
7
  loadSession,
@@ -144,6 +144,10 @@ function formatVoiceIfAny(text) {
144
144
  }
145
145
  return text;
146
146
  }
147
+ function voiceFields(m) {
148
+ if (m.messageType !== "voice" && m.messageType !== "ptt") return {};
149
+ return { voice: { transcript: m.transcript ?? null, audio_url: m.audioUrl ?? null, duration_ms: m.durationMs ?? null } };
150
+ }
147
151
 
148
152
  // src/crypto/mdm-session.ts
149
153
  import {
@@ -730,7 +734,10 @@ var SupabaseDmProvider = class {
730
734
  threadId: m.thread_id,
731
735
  messageType: m.message_type ?? void 0,
732
736
  selfPayload: m.self_payload ?? null,
733
- recipientSelfPayload: m.recipient_self_payload ?? null
737
+ recipientSelfPayload: m.recipient_self_payload ?? null,
738
+ transcript: m.transcript ?? null,
739
+ audioUrl: m.audio_url ?? null,
740
+ durationMs: m.duration_ms ?? null
734
741
  })),
735
742
  // history mode (`before`) returns `next_before`; incremental (`since`) returns `cursor`+`has_more`.
736
743
  nextCursor: data?.next_before ?? (data?.has_more ? data?.cursor ?? null : null)
@@ -971,7 +978,8 @@ async function mDM_list(input, ctx) {
971
978
  id: m.id,
972
979
  sender_identity_id: m.senderId,
973
980
  timestamp: m.timestamp,
974
- thread_id: m.threadId
981
+ thread_id: m.threadId,
982
+ ...voiceFields(m)
975
983
  };
976
984
  if (!isE2eeEnvelope(m.payload)) {
977
985
  return { ...base, text: formatVoiceIfAny(unpackPayload(m.payload).text), encrypted: false };
@@ -2603,7 +2611,7 @@ var mtalkTools = [
2603
2611
  title: "Open push-to-talk room",
2604
2612
  annotations: { readOnlyHint: false },
2605
2613
  requires: "any",
2606
- description: "Open (or get) a push-to-talk room. Returns a stable room_id. Pass an optional label to share a named room (e.g. 'ops'); omit it for a personal room. Works over network (LiveKit) or off-grid radio depending on the host.",
2614
+ description: "Open (or get) a push-to-talk room. Returns a stable room_id. Pass an optional label for a named room (e.g. 'ops') that you own: you and your accepted contacts can join it; omit the label for a personal room. Works over network (LiveKit) or off-grid radio depending on the host.",
2607
2615
  inputSchema: mTALK_open_input,
2608
2616
  handler: mTALK_open
2609
2617
  },
@@ -3964,7 +3972,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3964
3972
  // package.json
3965
3973
  var package_default = {
3966
3974
  name: "@mosadd/mcp",
3967
- version: "3.0.0-alpha.56",
3975
+ version: "3.0.0-alpha.57",
3968
3976
  mcpName: "io.github.hei33enberg/mosadd-mcp",
3969
3977
  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).",
3970
3978
  homepage: "https://github.com/Hei33enberg/mosADD-OS/tree/main/packages/mcp",
@@ -4062,7 +4070,7 @@ var SupabaseVoiceProvider = class {
4062
4070
  }
4063
4071
  async createRoom(label) {
4064
4072
  const self = await this.selfId();
4065
- const roomId = `${ROOM_PREFIX}${label ? slug(label) : self}`;
4073
+ const roomId = labelRoomId(self, label);
4066
4074
  return { roomId };
4067
4075
  }
4068
4076
  async joinTicket(roomId) {
@@ -4091,6 +4099,10 @@ var SupabaseVoiceProvider = class {
4091
4099
  return data.snapshot;
4092
4100
  }
4093
4101
  };
4102
+ function labelRoomId(selfIdentityId, label) {
4103
+ if (!label) return `${ROOM_PREFIX}${selfIdentityId}`;
4104
+ return `${ROOM_PREFIX}${selfIdentityId}-${slug(label) || "room"}`;
4105
+ }
4094
4106
  function slug(s) {
4095
4107
  return s.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 200);
4096
4108
  }
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  createMosaddServer,
5
5
  defaultProviders,
6
6
  runWithSupabaseEnv
7
- } from "./chunk-T3KDVUAT.js";
7
+ } from "./chunk-WEGSITAH.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-alpha.56",
3
+ "version": "3.0.0-alpha.57",
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",
@@ -34,6 +34,13 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
+ "scripts": {
38
+ "build": "tsup src/index.ts src/bin/mcp.ts src/bin/login.ts --format esm --dts --clean --shims",
39
+ "dev": "tsx src/bin/mcp.ts",
40
+ "test": "vitest run",
41
+ "typecheck": "tsc -p tsconfig.json --noEmit",
42
+ "clean": "rm -rf dist .turbo"
43
+ },
37
44
  "dependencies": {
38
45
  "@modelcontextprotocol/sdk": "^1.0.4",
39
46
  "@supabase/supabase-js": "^2.48.0",
@@ -62,12 +69,5 @@
62
69
  ],
63
70
  "engines": {
64
71
  "node": ">=18"
65
- },
66
- "scripts": {
67
- "build": "tsup src/index.ts src/bin/mcp.ts src/bin/login.ts --format esm --dts --clean --shims",
68
- "dev": "tsx src/bin/mcp.ts",
69
- "test": "vitest run",
70
- "typecheck": "tsc -p tsconfig.json --noEmit",
71
- "clean": "rm -rf dist .turbo"
72
72
  }
73
- }
73
+ }
@@ -12,10 +12,18 @@ import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
12
12
  import { mkdtempSync } from "node:fs";
13
13
  import { homedir, tmpdir } from "node:os";
14
14
  import { join } from "node:path";
15
- import { afterEach, beforeEach, describe, expect, it } from "vitest";
15
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
16
16
 
17
17
  const MCP_BIN = join(__dirname, "..", "..", "dist", "bin", "mcp.js");
18
18
 
19
+ // Every test boots a fresh node process (dist/bin/mcp.js) and waits for it on stdout. On a busy machine (this package's
20
+ // other test files in parallel, the other packages' suites under `pnpm -r test`, antivirus scanning node's module loads)
21
+ // that boot took more than 7 s on 2026-11-14: two of the three tests timed out at 5 s in each of two full runs, and
22
+ // passed in about 2 s each when this file ran alone, and in about 14 s each in a full run that gave them the time.
23
+ // The assertions are unchanged; only how long they may wait is. A server that never answers still fails.
24
+ const REQUEST_TIMEOUT_MS = 45_000;
25
+ vi.setConfig({ testTimeout: 120_000, hookTimeout: 30_000 });
26
+
19
27
  /**
20
28
  * The child server runs with an EMPTY home and no MOSADD_* variables.
21
29
  *
@@ -91,7 +99,7 @@ class McpClient {
91
99
  await new Promise<void>((resolve) => this.proc.on("close", () => resolve()));
92
100
  }
93
101
 
94
- async send(method: string, params?: unknown, timeoutMs = 5000): Promise<JsonRpcMessage> {
102
+ async send(method: string, params?: unknown, timeoutMs = REQUEST_TIMEOUT_MS): Promise<JsonRpcMessage> {
95
103
  const id = this.nextId++;
96
104
  const req: JsonRpcMessage = { jsonrpc: "2.0", id, method, params };
97
105
  return new Promise((resolve, reject) => {
@@ -0,0 +1,22 @@
1
+ // 15.11.2026 — pokój PTT z etykietą ma właściciela w nazwie (bramka: mosADD livekit-token/labelRoom.ts).
2
+ // Było `mosadd-room-<etykieta>`: jedna nazwa dla wszystkich kont, bez właściciela → 403 dla każdego,
3
+ // a wersja „pierwszy wchodzący zajmuje” pozwalała obcemu przejąć pokój.
4
+ import { describe, expect, it } from "vitest";
5
+ import { labelRoomId } from "../providers/supabase-voice.js";
6
+
7
+ const G = "68f326ac-3e8b-468e-9bac-328a930de541";
8
+
9
+ describe("labelRoomId", () => {
10
+ it("etykieta → mosadd-room-<id otwierającego>-<slug>", () => {
11
+ expect(labelRoomId(G, "Field Team")).toBe(`mosadd-room-${G}-field-team`);
12
+ });
13
+ it("bez etykiety → pokój osobisty (goły id, jak dotąd)", () => {
14
+ expect(labelRoomId(G)).toBe(`mosadd-room-${G}`);
15
+ });
16
+ it("dwa konta z tą samą etykietą dostają RÓŻNE pokoje (koniec wspólnej nazwy dla wszystkich)", () => {
17
+ expect(labelRoomId(G, "ops")).not.toBe(labelRoomId("1acbb607-9f66-4074-8295-17c4fb84832c", "ops"));
18
+ });
19
+ it("etykieta z samych znaków specjalnych nie robi z pokoju osobistego", () => {
20
+ expect(labelRoomId(G, "!!!")).toBe(`mosadd-room-${G}-room`);
21
+ });
22
+ });
@@ -72,8 +72,12 @@ const HUB_COUNT = hubSnapshot.count;
72
72
  const HELD_BACK = ["call_start", "call_status"]; // phone calls through the user's own Telnyx/Twilio account: "soon"
73
73
 
74
74
  // Every public text that talks about the endpoint (not about the package).
75
+ // 2026-11-14 (README rewrite for the mosADD OS name): the hub paragraph left README.md for docs/tools.md, so the
76
+ // snapshot test below reads HUB_PARAGRAPH_FILE; README.md stays here, so it still may not state a hub count.
77
+ const HUB_PARAGRAPH_FILE = "docs/tools.md";
75
78
  const HUB_TEXTS = [
76
79
  "README.md",
80
+ HUB_PARAGRAPH_FILE,
77
81
  "docs/hosts.md",
78
82
  "docs/roadmap.md",
79
83
  "skills/m0s-quickstart/SKILL.md",
@@ -114,19 +118,19 @@ describe("hub tool count (texts about https://mcp.mosadd.dev/mcp)", () => {
114
118
  expect(HUB_COUNT).toBe(TOOL_COUNT + HUB_ONLY.length);
115
119
  });
116
120
 
117
- it("the README tools section points at the snapshot, names every hub-only tool and says which are held back", () => {
118
- const readme = readFileSync(resolve(repoRoot, "README.md"), "utf8");
119
- const para = readme.match(/[^\n]*distribution\/hub-tools\.json[^\n]*(?:\n(?!\n)[^\n]*)*/)?.[0] ?? "";
120
- expect(para, "README has no paragraph pointing at distribution/hub-tools.json").not.toBe("");
121
- for (const n of HUB_ONLY) expect(para, `README hub paragraph does not name ${n}`).toContain(`\`${n}\``);
121
+ it(`the hub paragraph (${HUB_PARAGRAPH_FILE}) points at the snapshot, names every hub-only tool and says which are held back`, () => {
122
+ const doc = readFileSync(resolve(repoRoot, HUB_PARAGRAPH_FILE), "utf8");
123
+ const para = doc.match(/[^\n]*distribution\/hub-tools\.json[^\n]*(?:\n(?!\n)[^\n]*)*/)?.[0] ?? "";
124
+ expect(para, `${HUB_PARAGRAPH_FILE} has no paragraph pointing at distribution/hub-tools.json`).not.toBe("");
125
+ for (const n of HUB_ONLY) expect(para, `${HUB_PARAGRAPH_FILE} hub paragraph does not name ${n}`).toContain(`\`${n}\``);
122
126
  const listed = HELD_BACK.filter((n) => hubSnapshot.names.includes(n));
123
127
  if (listed.length === 0) {
124
- // calls are not open: the README must say so, and name the tools it holds back
128
+ // calls are not open: the hub paragraph must say so, and name the tools it holds back
125
129
  expect(para).toMatch(/coming soon/);
126
130
  expect(para).toMatch(/held back/);
127
- for (const n of HELD_BACK) expect(para, `README does not name the held-back ${n}`).toContain(`\`${n}\``);
131
+ for (const n of HELD_BACK) expect(para, `${HUB_PARAGRAPH_FILE} does not name the held-back ${n}`).toContain(`\`${n}\``);
128
132
  } else {
129
- expect(para, `the hub lists ${listed.join(", ")} now — the README still says they are held back`).not.toMatch(/held back/);
133
+ expect(para, `the hub lists ${listed.join(", ")} now — ${HUB_PARAGRAPH_FILE} still says they are held back`).not.toMatch(/held back/);
130
134
  }
131
135
  });
132
136
 
@@ -0,0 +1,24 @@
1
+ // 15.11.2026 — odbiorca głosówki przez MCP widział sam podpis. message-list (mosADD) oddaje już
2
+ // transcript / audio_url / duration_ms; mDM_list ma je przekazać w polu `voice`.
3
+ import { readFileSync } from "node:fs";
4
+ import { describe, expect, it } from "vitest";
5
+ import { voiceFields } from "../tools/voice-format.js";
6
+
7
+ describe("voiceFields", () => {
8
+ it("głosówka z transkryptem i adresem → pole voice", () => {
9
+ expect(voiceFields({ messageType: "voice", transcript: "raz dwa", audioUrl: "https://x/a.ogg", durationMs: 4500 }))
10
+ .toEqual({ voice: { transcript: "raz dwa", audio_url: "https://x/a.ogg", duration_ms: 4500 } });
11
+ });
12
+ it("tekst → brak pola voice", () => {
13
+ expect(voiceFields({ messageType: "text" })).toEqual({});
14
+ });
15
+ it("głosówka bez transkryptu → null, nie znika", () => {
16
+ expect(voiceFields({ messageType: "ptt" })).toEqual({ voice: { transcript: null, audio_url: null, duration_ms: null } });
17
+ });
18
+ it("provider i mDM_list przenoszą pola z message-list", () => {
19
+ const prov = readFileSync(new URL("../providers/supabase-dm.ts", import.meta.url), "utf8");
20
+ const tool = readFileSync(new URL("../tools/mdm.ts", import.meta.url), "utf8");
21
+ expect(prov).toContain("transcript: m.transcript ?? null");
22
+ expect(tool).toContain("...voiceFields(m)");
23
+ });
24
+ });
@@ -62,6 +62,10 @@ export interface DmMessageExt extends DmMessage {
62
62
  selfPayload?: string | null;
63
63
  recipientSelfPayload?: string | null;
64
64
  messageType?: string;
65
+ /** 15.11: z message-list dla voice/ptt (voiceEnrich.ts w mosADD). */
66
+ transcript?: string | null;
67
+ audioUrl?: string | null;
68
+ durationMs?: number | null;
65
69
  }
66
70
 
67
71
  export class SupabaseDmProvider implements DmProvider {
@@ -171,6 +175,9 @@ export class SupabaseDmProvider implements DmProvider {
171
175
  message_type?: string | null;
172
176
  self_payload?: string | null;
173
177
  recipient_self_payload?: string | null;
178
+ transcript?: string | null;
179
+ audio_url?: string | null;
180
+ duration_ms?: number | null;
174
181
  }>;
175
182
  cursor?: string | null;
176
183
  has_more?: boolean;
@@ -194,6 +201,9 @@ export class SupabaseDmProvider implements DmProvider {
194
201
  messageType: m.message_type ?? undefined,
195
202
  selfPayload: m.self_payload ?? null,
196
203
  recipientSelfPayload: m.recipient_self_payload ?? null,
204
+ transcript: m.transcript ?? null,
205
+ audioUrl: m.audio_url ?? null,
206
+ durationMs: m.duration_ms ?? null,
197
207
  })),
198
208
  // history mode (`before`) returns `next_before`; incremental (`since`) returns `cursor`+`has_more`.
199
209
  nextCursor: data?.next_before ?? (data?.has_more ? (data?.cursor ?? null) : null),
@@ -45,7 +45,7 @@ export class SupabaseVoiceProvider implements VoiceProvider {
45
45
 
46
46
  async createRoom(label?: string): Promise<{ roomId: string }> {
47
47
  const self = await this.selfId();
48
- const roomId = `${ROOM_PREFIX}${label ? slug(label) : self}`;
48
+ const roomId = labelRoomId(self, label);
49
49
  // Floor row is created lazily by mtalk-floor on first request; nothing to do
50
50
  // here beyond returning the canonical id.
51
51
  return { roomId };
@@ -82,6 +82,18 @@ export class SupabaseVoiceProvider implements VoiceProvider {
82
82
  }
83
83
  }
84
84
 
85
+ /**
86
+ * 15.11.2026 — nazwa pokoju PTT. Bez etykiety: pokój osobisty `mosadd-room-<id>`. Z etykietą:
87
+ * `mosadd-room-<id otwierającego>-<etykieta>` — właściciel jest w nazwie, więc bramka
88
+ * (mosADD `livekit-token/labelRoom.ts`) wpuszcza właściciela i jego kontakty, a obcy nie przejmie
89
+ * pokoju wejściem jako pierwszy. Dawne `mosadd-room-<etykieta>` było jedną nazwą dla wszystkich
90
+ * kont bez właściciela → 403 dla każdego.
91
+ */
92
+ export function labelRoomId(selfIdentityId: string, label?: string): string {
93
+ if (!label) return `${ROOM_PREFIX}${selfIdentityId}`;
94
+ return `${ROOM_PREFIX}${selfIdentityId}-${slug(label) || "room"}`;
95
+ }
96
+
85
97
  function slug(s: string): string {
86
98
  return s
87
99
  .toLowerCase()
package/src/tools/mdm.ts CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { z } from "zod";
18
18
  import type { MosaddTool, MosaddToolContext } from "../types.js";
19
- import { formatVoiceIfAny } from "./voice-format.js";
19
+ import { formatVoiceIfAny, voiceFields } from "./voice-format.js";
20
20
  import { invokeFunction, getSupabase, readSupabaseEnv } from "../providers/supabase.js";
21
21
  import {
22
22
  encryptForPeer,
@@ -402,6 +402,7 @@ async function mDM_list(
402
402
  timestamp: string;
403
403
  thread_id: string;
404
404
  encrypted: boolean;
405
+ voice?: { transcript: string | null; audio_url: string | null; duration_ms: number | null };
405
406
  }>;
406
407
  next_cursor: string | null;
407
408
  threads: string[];
@@ -434,6 +435,7 @@ async function mDM_list(
434
435
  sender_identity_id: m.senderId,
435
436
  timestamp: m.timestamp,
436
437
  thread_id: m.threadId,
438
+ ...voiceFields(m),
437
439
  };
438
440
  // Legacy plaintext envelope (deprecated path) — unpack directly.
439
441
  if (!isE2eeEnvelope(m.payload)) {
@@ -84,7 +84,7 @@ export const mtalkTools: MosaddTool[] = [
84
84
  annotations: { readOnlyHint: false },
85
85
  requires: "any",
86
86
  description:
87
- "Open (or get) a push-to-talk room. Returns a stable room_id. Pass an optional label to share a named room (e.g. 'ops'); omit it for a personal room. Works over network (LiveKit) or off-grid radio depending on the host.",
87
+ "Open (or get) a push-to-talk room. Returns a stable room_id. Pass an optional label for a named room (e.g. 'ops') that you own: you and your accepted contacts can join it; omit the label for a personal room. Works over network (LiveKit) or off-grid radio depending on the host.",
88
88
  inputSchema: mTALK_open_input,
89
89
  handler: mTALK_open as MosaddTool["handler"],
90
90
  },
@@ -26,3 +26,18 @@ export function formatVoiceIfAny(text: string): string {
26
26
  }
27
27
  return text;
28
28
  }
29
+
30
+ /**
31
+ * 15.11.2026 — głosówka niesie transkrypt i adres nagrania. message-list (mosADD) dokłada do
32
+ * wiadomości voice/ptt pola transcript / audio_url / duration_ms (RLS czytającego); tu
33
+ * przekazujemy je odbiorcy jako `voice`. Wcześniej agent widział sam podpis.
34
+ */
35
+ export function voiceFields(m: {
36
+ messageType?: string;
37
+ transcript?: string | null;
38
+ audioUrl?: string | null;
39
+ durationMs?: number | null;
40
+ }): { voice?: { transcript: string | null; audio_url: string | null; duration_ms: number | null } } {
41
+ if (m.messageType !== "voice" && m.messageType !== "ptt") return {};
42
+ return { voice: { transcript: m.transcript ?? null, audio_url: m.audioUrl ?? null, duration_ms: m.durationMs ?? null } };
43
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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.