@mosadd/mcp 3.0.0-alpha.30 → 3.0.0-alpha.32

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,18 @@ gateway (Phase 2) ships.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [3.0.0-alpha.31] — 2026-07-17
12
+
13
+ ### Fixed
14
+ - **`mURL_create` / `mURL_update` branding validation.** The `branding` arg used
15
+ `z.record(z.any())` — the Zod v3 single-argument form — which fails typecheck under
16
+ this project's Zod v4, where `z.record` requires both a key and a value schema. Now
17
+ `z.record(z.string(), z.any())`. alpha.30 shipped with the pre-fix source; alpha.31
18
+ corrects it so the published package builds clean and validates branding correctly.
19
+ - **CI green (repo).** Synced the version refs (`server.json`, `server.ts` serverInfo,
20
+ `marketplace.json`) to `package.json`, and updated the MCP smoke test to expect
21
+ `mAYL_send` — the `mp0st_*` aliases were retired in alpha.28.
22
+
11
23
  ## [3.0.0-alpha.30] — 2026-07-17
12
24
 
13
25
  ### Added
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-6PGDNIKR.js";
4
+ } from "../chunk-KX34DDJB.js";
5
5
  import {
6
6
  isSessionExpired,
7
7
  loadSession,
@@ -786,15 +786,18 @@ var ChannelId = z3.string().min(1).max(120).describe("Channel id (UUID). Use mIR
786
786
  var AccessMode = z3.enum(["open", "password", "private"]).describe("open: anyone can join \xB7 password: join with a shared password \xB7 private: invite-only.");
787
787
  var Capabilities = z3.object({
788
788
  txt: z3.boolean().default(true),
789
+ voice: z3.boolean().default(false),
790
+ files: z3.boolean().default(false),
789
791
  ptt: z3.boolean().default(false),
790
792
  live: z3.boolean().default(false)
791
- }).describe("Which modes are enabled in this channel: txt (text), ptt (push-to-talk voice), live (live stream).").optional();
793
+ }).describe("Which modes are enabled: txt (text), voice (group voice), files (file attach), ptt (push-to-talk), live (live stream). Voice/PTT/live are server-relayed via LiveKit \u2014 NOT end-to-end encrypted.").optional();
792
794
  var mIRC_create_input = z3.object({
793
795
  name: z3.string().min(1).max(80).describe("Channel display name."),
794
796
  topic: z3.string().max(500).optional().describe("Optional channel topic/description."),
795
797
  access_mode: AccessMode.default("open"),
796
798
  password: z3.string().min(6).max(120).optional().describe("Password (only for access_mode=password)."),
797
799
  capabilities: Capabilities,
800
+ discoverable: z3.boolean().optional().describe("List this channel in the PUBLIC directory (mIRC_discover). Honoured ONLY for access_mode=open; ignored for password/private."),
798
801
  wrapped_group_key: z3.string().optional().describe(
799
802
  "Required for access_mode=password|private (these are E2EE channels): the channel's group key wrapped to the creator's identity key. Open channels ignore it. If omitted on a non-open channel the backend rejects the call with a 'wrapped_group_key required' error."
800
803
  )
@@ -816,7 +819,18 @@ var mIRC_update_input = z3.object({
816
819
  // NOTE: access_mode was removed — channel-manage's update branch ignores it, and
817
820
  // switching an existing channel to/from an E2EE (password/private) mode needs
818
821
  // group-key handling that isn't wired yet. Recreate the channel to change mode.
819
- capabilities: Capabilities
822
+ capabilities: Capabilities,
823
+ discoverable: z3.boolean().optional().describe("Toggle public-directory listing (open channels only).")
824
+ });
825
+ var mIRC_discover_input = z3.object({
826
+ q: z3.string().max(100).optional().describe("Optional channel-name filter."),
827
+ limit: z3.number().int().min(1).max(500).default(50).optional(),
828
+ offset: z3.number().int().min(0).default(0).optional()
829
+ });
830
+ var mIRC_report_input = z3.object({
831
+ channel_id: ChannelId,
832
+ reason: z3.enum(["spam", "abuse", "harassment", "illegal", "other"]).describe("Report reason."),
833
+ detail: z3.string().max(1e3).optional().describe("Optional free-text context.")
820
834
  });
821
835
  var mIRC_delete_input = z3.object({
822
836
  channel_id: ChannelId
@@ -866,11 +880,28 @@ async function mIRC_delete(input, ctx) {
866
880
  });
867
881
  return { deleted: true };
868
882
  }
883
+ async function mIRC_discover(input, ctx) {
884
+ readSupabaseEnv();
885
+ ctx.log("debug", "mIRC_discover invoking channel-manage");
886
+ return await invokeFunction("channel-manage", {
887
+ action: "discover",
888
+ ...input
889
+ });
890
+ }
891
+ async function mIRC_report(input, ctx) {
892
+ readSupabaseEnv();
893
+ ctx.log("debug", "mIRC_report invoking report-content", { channel_id: input.channel_id });
894
+ return await invokeFunction("report-content", {
895
+ thread_id: `channel:${input.channel_id}`,
896
+ reason: input.reason,
897
+ detail: input.detail
898
+ });
899
+ }
869
900
  var mircTools = [
870
901
  {
871
902
  name: "mIRC_create",
872
903
  requires: "network",
873
- description: "Create a new persistent channel (Discord/Slack-style). Set access_mode to open (anyone joins), password (shared-password gated), or private (invite-only). capabilities controls modes (txt/ptt/live). NOTE: password and private channels are end-to-end encrypted \u2014 you must supply wrapped_group_key (the group key wrapped to your identity key); open channels do not need it.",
904
+ description: "Create a new persistent channel (Discord/Slack-style). Set access_mode to open (anyone joins), password (shared-password gated), or private (invite-only). capabilities controls modes (txt/voice/files/ptt/live; voice/ptt/live are server-relayed via LiveKit, NOT E2EE). Set discoverable:true (open channels only) to list it in the public directory. NOTE: password and private channels have end-to-end encrypted TEXT \u2014 supply wrapped_group_key (the group key wrapped to your identity key); open channels do not need it. Channel voice is never E2EE.",
874
905
  inputSchema: mIRC_create_input,
875
906
  handler: mIRC_create
876
907
  },
@@ -901,6 +932,20 @@ var mircTools = [
901
932
  description: "Delete a channel and cascade-remove its members. Owner only.",
902
933
  inputSchema: mIRC_delete_input,
903
934
  handler: mIRC_delete
935
+ },
936
+ {
937
+ name: "mIRC_discover",
938
+ requires: "network",
939
+ description: "Browse the PUBLIC channel DIRECTORY \u2014 open channels whose owners opted in (discoverable=true). Returns {id, channel_key, name, description, capabilities, member_count, is_member}. Filter by name with q; paginated. Join a result with mIRC_join (open = one-click). Private/password/partner channels never appear.",
940
+ inputSchema: mIRC_discover_input,
941
+ handler: mIRC_discover
942
+ },
943
+ {
944
+ name: "mIRC_report",
945
+ requires: "network",
946
+ description: "Report a channel for abuse (spam/harassment/illegal/etc). Metadata + reason only \u2014 never message content. The reported party is the channel owner (server-derived). Use for public-directory moderation.",
947
+ inputSchema: mIRC_report_input,
948
+ handler: mIRC_report
904
949
  }
905
950
  ];
906
951
 
@@ -911,7 +956,7 @@ var MemberIdentity = z4.string().min(1).describe("Target user's identity id (UUI
911
956
  var Role = z4.enum(["superadmin", "admin", "moderator", "member"]).describe("Role to assign. owner = channel creator (not assignable); promote up to one tier below your own.");
912
957
  var mIRC_join_input = z4.object({
913
958
  channel_id: ChannelId2,
914
- password: z4.string().min(1).optional().describe("Required if the channel is access_mode=private.")
959
+ password: z4.string().min(1).optional().describe("Pass only for access_mode=password channels. Private channels cannot be joined directly (403) \u2014 use mIRC_request_access.")
915
960
  });
916
961
  var mIRC_request_access_input = z4.object({
917
962
  channel_id: ChannelId2
@@ -979,7 +1024,7 @@ var mircMembersTools = [
979
1024
  {
980
1025
  name: "mIRC_join",
981
1026
  requires: "network",
982
- description: "Join a channel as the current user. For private channels pass `password`. Returns a membership row or 409 if already a member.",
1027
+ description: "Join a channel as the current user. Pass `password` only for access_mode=password channels; private channels cannot be joined directly (403) \u2014 use mIRC_request_access + approval. Idempotent: an existing active member gets their membership row back (200, no 409).",
983
1028
  inputSchema: mIRC_join_input,
984
1029
  handler: ((input, ctx) => invokeChannelMembers("join", input, ctx))
985
1030
  },
@@ -1035,7 +1080,7 @@ var mircMembersTools = [
1035
1080
  {
1036
1081
  name: "mIRC_set_role",
1037
1082
  requires: "network",
1038
- description: "Promote / demote a member. Roles: owner > admin > moderator > member > guest. Only owner can promote to admin; only admin+ can promote to moderator.",
1083
+ description: "Promote / demote a member. Roles: owner(100) > superadmin(90) > admin(80) > moderator(70) > member(10). No 'guest'. An actor may assign any role below their own tier \u2014 so a superadmin (not only the owner) can promote to admin.",
1039
1084
  inputSchema: mIRC_set_role_input,
1040
1085
  handler: ((input, ctx) => invokeChannelMembers("set-role", input, ctx))
1041
1086
  },
@@ -1133,7 +1178,7 @@ var mircMessagesTools = [
1133
1178
  {
1134
1179
  name: "mIRC_post_message",
1135
1180
  requires: "network",
1136
- description: "Post a text message into a persistent channel (mIRC). Pass channel_id from mIRC_create / mIRC_list; the backing space is resolved automatically. You must be a member of private channels (use mIRC_join first). This is how an agent actually talks in a channel \u2014 the other mIRC_* tools only manage it. NOTE (alpha): the payload is NOT end-to-end encrypted \u2014 it is plaintext base64 and is readable by the server; the mosadd.com app uses per-channel group-key encryption, so app clients cannot read these messages yet (and vice-versa). Group-key parity is planned.",
1181
+ description: "Post a text message into a persistent channel (mIRC). Pass channel_id from mIRC_create / mIRC_list; the backing space is resolved automatically. This is how an agent actually talks in a channel \u2014 the other mIRC_* tools only manage it. ACCESS: banned/blocked users are refused on ALL access modes (including open); open channels accept anyone not banned; password channels require joining with the password; private channels require request-access + approval. ENCRYPTION: OPEN channels are server-readable plaintext base64 \u2014 app clients CAN read toolkit-posted messages. Password/private channels use per-channel group-key E2EE text in the mosadd.com app; toolkit interop on those (group-key parity) is not yet wired.",
1137
1182
  inputSchema: mIRC_post_message_input,
1138
1183
  handler: mIRC_post_message
1139
1184
  },
@@ -2173,7 +2218,7 @@ async function mURL_presence(input, ctx) {
2173
2218
  }
2174
2219
  var mURL_create_input = z14.object({
2175
2220
  domain: DomainArg,
2176
- branding: z14.record(z14.any()).optional().describe("Optional branding JSON (e.g. display name, colour, avatar URL) shown on the channel."),
2221
+ branding: z14.record(z14.string(), z14.any()).optional().describe("Optional branding JSON (e.g. display name, colour, avatar URL) shown on the channel."),
2177
2222
  status: z14.enum(["open", "claimed", "blocked"]).optional().describe("Initial status: 'open' (default) = public agent-native room; 'claimed' = registered as yours; 'blocked' = closed.")
2178
2223
  });
2179
2224
  async function mURL_create(input, ctx) {
@@ -2189,7 +2234,7 @@ async function mURL_create(input, ctx) {
2189
2234
  }
2190
2235
  var mURL_update_input = z14.object({
2191
2236
  domain: DomainArg,
2192
- branding: z14.record(z14.any()).optional().describe("New branding JSON to set on the channel."),
2237
+ branding: z14.record(z14.string(), z14.any()).optional().describe("New branding JSON to set on the channel."),
2193
2238
  status: z14.enum(["open", "claimed", "blocked"]).optional().describe("New status: 'claimed' to mark owned, 'blocked' to close the room, 'open' to reopen.")
2194
2239
  });
2195
2240
  async function mURL_update(input, ctx) {
@@ -2497,7 +2542,7 @@ function createMosaddServer(options = {}) {
2497
2542
  const server = new McpServer(
2498
2543
  {
2499
2544
  name: "mosadd",
2500
- version: "3.0.0-alpha.28"
2545
+ version: "3.0.0-alpha.32"
2501
2546
  },
2502
2547
  {
2503
2548
  capabilities: {
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  createMosaddServer,
5
5
  defaultProviders,
6
6
  runWithSupabaseEnv
7
- } from "./chunk-6PGDNIKR.js";
7
+ } from "./chunk-KX34DDJB.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.30",
3
+ "version": "3.0.0-alpha.32",
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 — 69 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",
@@ -38,10 +38,10 @@
38
38
  "@modelcontextprotocol/sdk": "^1.0.4",
39
39
  "@supabase/supabase-js": "^2.48.0",
40
40
  "zod": "^4.3.6",
41
- "@mosadd/crypto": "3.0.0-alpha.26",
42
- "@mosadd/providers": "3.0.0-alpha.26",
43
41
  "@mosadd/protocol": "3.0.0-alpha.26",
44
- "@mosadd/threat-engine": "3.0.0-alpha.26"
42
+ "@mosadd/providers": "3.0.0-alpha.26",
43
+ "@mosadd/threat-engine": "3.0.0-alpha.26",
44
+ "@mosadd/crypto": "3.0.0-alpha.26"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.3.5",
@@ -0,0 +1,44 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { readFileSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ import { dirname, resolve } from "node:path";
5
+ import { TOOL_COUNT } from "../tools/index.js";
6
+
7
+ // ── Anti-drift gate ──────────────────────────────────────────────────────────
8
+ // The advertised tool count has drifted across surfaces repeatedly (68/69/65/61/
9
+ // "70+"), which the founder rightly hates. TOOL_COUNT (= allTools.length) is the ONE
10
+ // source of truth; every hardcoded doc surface must equal it. If you add/remove a
11
+ // tool, this test fails until you update the surfaces below (or vice-versa).
12
+ //
13
+ // NOT checked here: the mosADD app's LP `McpToolReference` computes its total
14
+ // dynamically from the rendered list, so it cannot drift; and the mosadd-agent README
15
+ // lives in a separate repo. Both are noted in the migration handoff.
16
+
17
+ const here = dirname(fileURLToPath(import.meta.url));
18
+ const repoRoot = resolve(here, "../../../.."); // packages/mcp/src/__tests__ -> repo root
19
+
20
+ const SURFACES: { file: string; re: RegExp; what: string }[] = [
21
+ { file: "packages/mcp/server.json", re: /(\d+)\s+MCP tools/, what: "MCP registry manifest description" },
22
+ { file: "apps/realm/index.html", re: /#\s*(\d+)\s+tools/, what: "mosadd.dev Realm hero" },
23
+ { file: "apps/dev/app/docs/mcp/page.tsx", re: /Total surface today:[\s\S]*?(\d+)\s+tools/, what: "dev docs /docs/mcp" },
24
+ { file: "apps/dev/app/opengraph-image.tsx", re: /(\d+)\s+MCP tools/, what: "dev OG image" },
25
+ ];
26
+
27
+ describe("tool-count consistency (anti-drift gate)", () => {
28
+ it("TOOL_COUNT is a positive integer", () => {
29
+ expect(Number.isInteger(TOOL_COUNT)).toBe(true);
30
+ expect(TOOL_COUNT).toBeGreaterThan(0);
31
+ });
32
+
33
+ for (const s of SURFACES) {
34
+ it(`${s.what} (${s.file}) advertises exactly TOOL_COUNT (${TOOL_COUNT})`, () => {
35
+ const txt = readFileSync(resolve(repoRoot, s.file), "utf8");
36
+ const m = txt.match(s.re);
37
+ expect(m, `no tool-count number found in ${s.file} — did the surface change shape?`).toBeTruthy();
38
+ expect(
39
+ Number(m![1]),
40
+ `${s.file} says ${m![1]} tools but TOOL_COUNT is ${TOOL_COUNT} — sync the surface or the registry`,
41
+ ).toBe(TOOL_COUNT);
42
+ });
43
+ }
44
+ });
package/src/server.ts CHANGED
@@ -60,7 +60,7 @@ export function createMosaddServer(options: MosaddServerOptions = {}) {
60
60
  const server = new McpServer(
61
61
  {
62
62
  name: "mosadd",
63
- version: "3.0.0-alpha.28",
63
+ version: "3.0.0-alpha.32",
64
64
  },
65
65
  {
66
66
  capabilities: {
@@ -33,7 +33,7 @@ const Role = z
33
33
 
34
34
  const mIRC_join_input = z.object({
35
35
  channel_id: ChannelId,
36
- password: z.string().min(1).optional().describe("Required if the channel is access_mode=private."),
36
+ password: z.string().min(1).optional().describe("Pass only for access_mode=password channels. Private channels cannot be joined directly (403) — use mIRC_request_access."),
37
37
  });
38
38
 
39
39
  const mIRC_request_access_input = z.object({
@@ -122,7 +122,7 @@ export const mircMembersTools: MosaddTool[] = [
122
122
  name: "mIRC_join",
123
123
  requires: "network",
124
124
  description:
125
- "Join a channel as the current user. For private channels pass `password`. Returns a membership row or 409 if already a member.",
125
+ "Join a channel as the current user. Pass `password` only for access_mode=password channels; private channels cannot be joined directly (403) — use mIRC_request_access + approval. Idempotent: an existing active member gets their membership row back (200, no 409).",
126
126
  inputSchema: mIRC_join_input,
127
127
  handler: ((input, ctx) => invokeChannelMembers("join", input as Record<string, unknown>, ctx)) as MosaddTool["handler"],
128
128
  },
@@ -183,7 +183,7 @@ export const mircMembersTools: MosaddTool[] = [
183
183
  name: "mIRC_set_role",
184
184
  requires: "network",
185
185
  description:
186
- "Promote / demote a member. Roles: owner > admin > moderator > member > guest. Only owner can promote to admin; only admin+ can promote to moderator.",
186
+ "Promote / demote a member. Roles: owner(100) > superadmin(90) > admin(80) > moderator(70) > member(10). No 'guest'. An actor may assign any role below their own tier — so a superadmin (not only the owner) can promote to admin.",
187
187
  inputSchema: mIRC_set_role_input,
188
188
  handler: ((input, ctx) => invokeChannelMembers("set-role", input as Record<string, unknown>, ctx)) as MosaddTool["handler"],
189
189
  },
@@ -140,7 +140,7 @@ export const mircMessagesTools: MosaddTool[] = [
140
140
  name: "mIRC_post_message",
141
141
  requires: "network",
142
142
  description:
143
- "Post a text message into a persistent channel (mIRC). Pass channel_id from mIRC_create / mIRC_list; the backing space is resolved automatically. You must be a member of private channels (use mIRC_join first). This is how an agent actually talks in a channel — the other mIRC_* tools only manage it. NOTE (alpha): the payload is NOT end-to-end encrypted — it is plaintext base64 and is readable by the server; the mosadd.com app uses per-channel group-key encryption, so app clients cannot read these messages yet (and vice-versa). Group-key parity is planned.",
143
+ "Post a text message into a persistent channel (mIRC). Pass channel_id from mIRC_create / mIRC_list; the backing space is resolved automatically. This is how an agent actually talks in a channel — the other mIRC_* tools only manage it. ACCESS: banned/blocked users are refused on ALL access modes (including open); open channels accept anyone not banned; password channels require joining with the password; private channels require request-access + approval. ENCRYPTION: OPEN channels are server-readable plaintext base64 — app clients CAN read toolkit-posted messages. Password/private channels use per-channel group-key E2EE text in the mosadd.com app; toolkit interop on those (group-key parity) is not yet wired.",
144
144
  inputSchema: mIRC_post_message_input,
145
145
  handler: mIRC_post_message as MosaddTool["handler"],
146
146
  },
package/src/tools/mirc.ts CHANGED
@@ -30,10 +30,12 @@ const AccessMode = z
30
30
  const Capabilities = z
31
31
  .object({
32
32
  txt: z.boolean().default(true),
33
+ voice: z.boolean().default(false),
34
+ files: z.boolean().default(false),
33
35
  ptt: z.boolean().default(false),
34
36
  live: z.boolean().default(false),
35
37
  })
36
- .describe("Which modes are enabled in this channel: txt (text), ptt (push-to-talk voice), live (live stream).")
38
+ .describe("Which modes are enabled: txt (text), voice (group voice), files (file attach), ptt (push-to-talk), live (live stream). Voice/PTT/live are server-relayed via LiveKit — NOT end-to-end encrypted.")
37
39
  .optional();
38
40
 
39
41
  const mIRC_create_input = z.object({
@@ -42,6 +44,10 @@ const mIRC_create_input = z.object({
42
44
  access_mode: AccessMode.default("open"),
43
45
  password: z.string().min(6).max(120).optional().describe("Password (only for access_mode=password)."),
44
46
  capabilities: Capabilities,
47
+ discoverable: z
48
+ .boolean()
49
+ .optional()
50
+ .describe("List this channel in the PUBLIC directory (mIRC_discover). Honoured ONLY for access_mode=open; ignored for password/private."),
45
51
  wrapped_group_key: z
46
52
  .string()
47
53
  .optional()
@@ -70,6 +76,19 @@ const mIRC_update_input = z.object({
70
76
  // switching an existing channel to/from an E2EE (password/private) mode needs
71
77
  // group-key handling that isn't wired yet. Recreate the channel to change mode.
72
78
  capabilities: Capabilities,
79
+ discoverable: z.boolean().optional().describe("Toggle public-directory listing (open channels only)."),
80
+ });
81
+
82
+ const mIRC_discover_input = z.object({
83
+ q: z.string().max(100).optional().describe("Optional channel-name filter."),
84
+ limit: z.number().int().min(1).max(500).default(50).optional(),
85
+ offset: z.number().int().min(0).default(0).optional(),
86
+ });
87
+
88
+ const mIRC_report_input = z.object({
89
+ channel_id: ChannelId,
90
+ reason: z.enum(["spam", "abuse", "harassment", "illegal", "other"]).describe("Report reason."),
91
+ detail: z.string().max(1000).optional().describe("Optional free-text context."),
73
92
  });
74
93
 
75
94
  const mIRC_delete_input = z.object({
@@ -147,6 +166,31 @@ async function mIRC_delete(
147
166
  return { deleted: true };
148
167
  }
149
168
 
169
+ async function mIRC_discover(
170
+ input: z.infer<typeof mIRC_discover_input>,
171
+ ctx: MosaddToolContext,
172
+ ): Promise<{ channels: unknown[] }> {
173
+ readSupabaseEnv();
174
+ ctx.log("debug", "mIRC_discover invoking channel-manage");
175
+ return await invokeFunction<{ channels: unknown[] }>("channel-manage", {
176
+ action: "discover",
177
+ ...input,
178
+ });
179
+ }
180
+
181
+ async function mIRC_report(
182
+ input: z.infer<typeof mIRC_report_input>,
183
+ ctx: MosaddToolContext,
184
+ ): Promise<{ ok: boolean }> {
185
+ readSupabaseEnv();
186
+ ctx.log("debug", "mIRC_report invoking report-content", { channel_id: input.channel_id });
187
+ return await invokeFunction<{ ok: boolean }>("report-content", {
188
+ thread_id: `channel:${input.channel_id}`,
189
+ reason: input.reason,
190
+ detail: input.detail,
191
+ });
192
+ }
193
+
150
194
  // ---- Registration ----
151
195
 
152
196
  export const mircTools: MosaddTool[] = [
@@ -154,7 +198,7 @@ export const mircTools: MosaddTool[] = [
154
198
  name: "mIRC_create",
155
199
  requires: "network",
156
200
  description:
157
- "Create a new persistent channel (Discord/Slack-style). Set access_mode to open (anyone joins), password (shared-password gated), or private (invite-only). capabilities controls modes (txt/ptt/live). NOTE: password and private channels are end-to-end encrypted — you must supply wrapped_group_key (the group key wrapped to your identity key); open channels do not need it.",
201
+ "Create a new persistent channel (Discord/Slack-style). Set access_mode to open (anyone joins), password (shared-password gated), or private (invite-only). capabilities controls modes (txt/voice/files/ptt/live; voice/ptt/live are server-relayed via LiveKit, NOT E2EE). Set discoverable:true (open channels only) to list it in the public directory. NOTE: password and private channels have end-to-end encrypted TEXT — supply wrapped_group_key (the group key wrapped to your identity key); open channels do not need it. Channel voice is never E2EE.",
158
202
  inputSchema: mIRC_create_input,
159
203
  handler: mIRC_create as MosaddTool["handler"],
160
204
  },
@@ -187,4 +231,20 @@ export const mircTools: MosaddTool[] = [
187
231
  inputSchema: mIRC_delete_input,
188
232
  handler: mIRC_delete as MosaddTool["handler"],
189
233
  },
234
+ {
235
+ name: "mIRC_discover",
236
+ requires: "network",
237
+ description:
238
+ "Browse the PUBLIC channel DIRECTORY — open channels whose owners opted in (discoverable=true). Returns {id, channel_key, name, description, capabilities, member_count, is_member}. Filter by name with q; paginated. Join a result with mIRC_join (open = one-click). Private/password/partner channels never appear.",
239
+ inputSchema: mIRC_discover_input,
240
+ handler: mIRC_discover as MosaddTool["handler"],
241
+ },
242
+ {
243
+ name: "mIRC_report",
244
+ requires: "network",
245
+ description:
246
+ "Report a channel for abuse (spam/harassment/illegal/etc). Metadata + reason only — never message content. The reported party is the channel owner (server-derived). Use for public-directory moderation.",
247
+ inputSchema: mIRC_report_input,
248
+ handler: mIRC_report as MosaddTool["handler"],
249
+ },
190
250
  ];
package/src/tools/murl.ts CHANGED
@@ -177,7 +177,7 @@ async function mURL_presence(
177
177
  const mURL_create_input = z.object({
178
178
  domain: DomainArg,
179
179
  branding: z
180
- .record(z.any())
180
+ .record(z.string(), z.any())
181
181
  .optional()
182
182
  .describe("Optional branding JSON (e.g. display name, colour, avatar URL) shown on the channel."),
183
183
  status: z
@@ -203,7 +203,7 @@ async function mURL_create(
203
203
  // ── update (claim status / block / branding) ────────────────────────────────────
204
204
  const mURL_update_input = z.object({
205
205
  domain: DomainArg,
206
- branding: z.record(z.any()).optional().describe("New branding JSON to set on the channel."),
206
+ branding: z.record(z.string(), z.any()).optional().describe("New branding JSON to set on the channel."),
207
207
  status: z
208
208
  .enum(["open", "claimed", "blocked"])
209
209
  .optional()