@mosadd/mcp 3.0.0-alpha.22 → 3.0.0-alpha.24
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 +37 -0
- package/README.md +6 -6
- package/dist/bin/mcp.js +1 -1
- package/dist/{chunk-TNWL6GPV.js → chunk-S6OWXISZ.js} +221 -98
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/src/providers/supabase.ts +33 -5
- package/src/tools/index.ts +8 -6
- package/src/tools/mail.ts +4 -1
- package/src/tools/mdm-voice.ts +9 -3
- package/src/tools/mdm.ts +33 -5
- package/src/tools/mirc-members.ts +25 -15
- package/src/tools/mirc.ts +20 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,43 @@ gateway (Phase 2) ships.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.0.0-alpha.23] — 2026-06-26
|
|
12
|
+
|
|
13
|
+
Toolkit hardening pass: every registered tool's request/response contract was
|
|
14
|
+
adversarially verified against the deployed edge functions. Two tools were broken on
|
|
15
|
+
every call; the rest had silent field drops, wrong results, or a confidentiality/access gap.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **Edge-function errors are now legible.** `invokeFunction` only ever surfaced the fixed
|
|
19
|
+
string "Edge Function returned a non-2xx status code"; the real reason lives in
|
|
20
|
+
`error.context`. It now reads that body (and the HTTP status), so every EF-backed tool
|
|
21
|
+
returns an actionable error the agent can act on — the single highest-impact fix.
|
|
22
|
+
- **mDM_edit no longer strips E2EE.** It used to store a server-readable plaintext body even
|
|
23
|
+
on an E2EE thread (and the forward-only ratchet means an edit can't be re-sealed). It now
|
|
24
|
+
refuses to edit E2EE messages (use delete + re-send) and only edits legacy plaintext.
|
|
25
|
+
- **mp0st_send cc/bcc/reply_to are actually delivered** — the backend dropped them silently;
|
|
26
|
+
now forwarded to the mail provider (edge-function fix, deployed).
|
|
27
|
+
- **mDM call rooms are access-gated (security)** — call-room tokens were mintable by any
|
|
28
|
+
authenticated user who learned the room name; the backend now restricts them to the two
|
|
29
|
+
participants, and the room name is per-pair so the gate is robust (edge-function fix, deployed).
|
|
30
|
+
- **mDM_call_end / mDM_voice_note** now return the real message id (was always undefined).
|
|
31
|
+
- **mp0st_view** no longer advertises a `received_at` field the backend doesn't return (it's `sent_at`).
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- **Unregistered `comms_embed_create`** — its `embed-keys` edge function isn't deployed (404
|
|
35
|
+
on every call) and the embed surface is parked. Tool count **62 → 61**. Re-register when the
|
|
36
|
+
backend + widget ship.
|
|
37
|
+
- **mIRC tools stop advertising fields the backend ignores.** Removed: `mIRC_kick` `reason`,
|
|
38
|
+
`mIRC_request_access` `message`, `mIRC_ban` `reason`+`until` (the latter silently made a
|
|
39
|
+
"temporary" ban permanent), and `access_mode` on `mIRC_update`/`mIRC_list` (no-ops). Added
|
|
40
|
+
`wrapped_group_key` to `mIRC_create`/`mIRC_approve_request` so E2EE (password/private)
|
|
41
|
+
channels are honestly callable. Descriptions corrected to match.
|
|
42
|
+
- **mp0st_consent** now fails fast client-side when `check`/`optin` is missing a recipient.
|
|
43
|
+
|
|
44
|
+
### Verified (no changes needed)
|
|
45
|
+
- Install/boot, full build + typecheck across all packages, dependency-export resolution, and
|
|
46
|
+
the mDM X3DH + Double-Ratchet crypto round-trip all pass.
|
|
47
|
+
|
|
11
48
|
## [3.0.0-alpha.22] — 2026-06-26
|
|
12
49
|
|
|
13
50
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @mosadd/mcp
|
|
2
2
|
|
|
3
|
-
MCP server for [mosADD](https://mosadd.com) —
|
|
3
|
+
MCP server for [mosADD](https://mosadd.com) — **the comms layer for AI agents and the humans who direct them.** Exposes the OS modules (m\*) — **mDM (1:1 E2EE), mIRC (in-app channels), mURL (open/embeddable text rooms), and mAYL (email 3.0)** — as Model Context Protocol tools so any agent runtime can talk to mosadd: Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom.
|
|
4
4
|
|
|
5
|
-
> **3.0.0-alpha.
|
|
5
|
+
> **3.0.0-alpha.23** — **61 live tools across 5 live modules** (mDM incl. voice + files, mIRC, mp0st, mTALK, mRAG) + agent→user action links + the `comms_capabilities` discovery tool + the defensive `threat_*` engine, wired to the mosADD backend (BYOK) as a strangler-fig step. Phase 2 routes through the hosted gateway at `mcp.mosadd.com` with the 166-event radar in front.
|
|
6
6
|
|
|
7
7
|
## Connect your agent
|
|
8
8
|
|
|
9
|
-
Three ways to authenticate, friendliest first — all three end with the same ~
|
|
9
|
+
Three ways to authenticate, friendliest first — all three end with the same ~61 tools.
|
|
10
10
|
|
|
11
11
|
### 1. `mosadd login` — recommended (one command, stays logged in)
|
|
12
12
|
|
|
@@ -65,7 +65,7 @@ In Phase 2 the hosted gateway at `mcp.mosadd.com` removes even this — add a UR
|
|
|
65
65
|
|
|
66
66
|
## Tools shipped in alpha
|
|
67
67
|
|
|
68
|
-
**
|
|
68
|
+
**61 live tools across 5 live modules** (mDM, mIRC, mp0st, mTALK, mRAG) + agent→user action links + the `comms_capabilities` discovery tool + the defensive `threat_*` engine. Highlights per module:
|
|
69
69
|
|
|
70
70
|
| Module | Tools | What it does |
|
|
71
71
|
|---|---|---|
|
|
@@ -74,10 +74,10 @@ In Phase 2 the hosted gateway at `mcp.mosadd.com` removes even this — add a UR
|
|
|
74
74
|
| **mp0st** (11) | `mp0st_send`, `mp0st_view`, `mp0st_list`, `mp0st_delete`, `mp0st_stats`, `mp0st_events`, `mp0st_metrics`, `mp0st_revoke`, `mp0st_audit_export`, `mp0st_consent`, `mp0st_notify` | Mail; every user gets `<id>@mosadd.com`. `mp0st_revoke` recalls secure-reader access; `mp0st_audit_export` emits an HMAC-SHA256-signed engagement audit; `mp0st_consent` manages recipient tracking opt-outs (GDPR); `mp0st_notify` pulls the inbound-mail feed |
|
|
75
75
|
| **mTALK** (5) | `mTALK_open`, `mTALK_join`, `mTALK_press`, `mTALK_release`, `mTALK_state` | Half-duplex push-to-talk: one speaker, FIFO queue, anti-hog auto-release |
|
|
76
76
|
| **mRAG** (4) | `mRAG_ingest`, `mRAG_search`, `mRAG_list_sources`, `mRAG_delete` | RAG recall over the user's own data (hybrid vector + BM25) |
|
|
77
|
-
| **comms_** (
|
|
77
|
+
| **comms_** (3) | `comms_action_create`, `comms_action_frame_get`, `comms_capabilities` | `comms_action_create` mints an agent→user one-link browser action (Tier 1); `comms_action_frame_get` fetches a framed action; `comms_capabilities` is one-call discovery of every tool's transport `requires` flag |
|
|
78
78
|
| **threat_** (2) | `threat_catalog`, `threat_classify` | Pure defensive threat-event classification engine — enumerate the catalog and classify an operation against it |
|
|
79
79
|
|
|
80
|
-
Counts by module prefix sum to **56 channel tools**; the
|
|
80
|
+
Counts by module prefix sum to **56 channel tools**; the 3 `comms_*` tools and 2 `threat_*` tools make **61 callable** in total. `mCALL` (telephony), `mROOM`, `mURL` — and the `mp0st_send_as_agent` provenance, `mTALK_ingest_ptt` PTT-ingest, and `comms_embed_create` (embed-keys EF undeployed) scaffolds — exist in the source but are **not registered**, so agents only ever see tools that actually work.
|
|
81
81
|
|
|
82
82
|
All tool names follow [RFC 0001](https://github.com/Hei33enberg/mosadd-os/blob/main/docs/rfcs/0001-module-naming.md) — `m<MODULE>_<operation>` snake_case.
|
|
83
83
|
|
package/dist/bin/mcp.js
CHANGED
|
@@ -52,7 +52,25 @@ async function invokeFunction(fn, body) {
|
|
|
52
52
|
const client = getSupabase();
|
|
53
53
|
const { data, error } = await client.functions.invoke(fn, { body });
|
|
54
54
|
if (error) {
|
|
55
|
-
|
|
55
|
+
let msg = error instanceof Error && error.message ? error.message : `Edge function ${fn} failed`;
|
|
56
|
+
const ctx = error.context;
|
|
57
|
+
if (ctx && typeof ctx.text === "function") {
|
|
58
|
+
const res = ctx;
|
|
59
|
+
try {
|
|
60
|
+
const raw = await res.text();
|
|
61
|
+
if (raw) {
|
|
62
|
+
let detail = raw;
|
|
63
|
+
try {
|
|
64
|
+
const parsed = JSON.parse(raw);
|
|
65
|
+
detail = typeof parsed.error === "string" && parsed.error || typeof parsed.message === "string" && parsed.message || raw;
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
const status = typeof res.status === "number" ? res.status : void 0;
|
|
69
|
+
msg = status ? `${fn} (${status}): ${detail}` : `${fn}: ${detail}`;
|
|
70
|
+
}
|
|
71
|
+
} catch {
|
|
72
|
+
}
|
|
73
|
+
}
|
|
56
74
|
throw new Error(msg);
|
|
57
75
|
}
|
|
58
76
|
if (data == null) {
|
|
@@ -535,14 +553,33 @@ async function mDM_respond_request(input, ctx) {
|
|
|
535
553
|
}
|
|
536
554
|
var mDM_publish_keys_input = z.object({});
|
|
537
555
|
var mDM_edit_input = z.object({
|
|
556
|
+
to: ContactRef.describe(
|
|
557
|
+
"Recipient identity id of the conversation the message is in (needed to locate it and verify the edit won't break E2EE)."
|
|
558
|
+
),
|
|
538
559
|
message_id: z.string().min(1).describe("Id of the message to edit (from mDM_list)."),
|
|
539
|
-
new_text: z.string().min(1).max(64e3).describe("Replacement message body (UTF-8). Max 64 KB.")
|
|
560
|
+
new_text: z.string().min(1).max(64e3).describe("Replacement message body (UTF-8). Max 64 KB."),
|
|
561
|
+
thread_label: ThreadSuffix.optional()
|
|
540
562
|
});
|
|
541
563
|
var mDM_delete_input = z.object({
|
|
542
564
|
message_id: z.string().min(1).describe("Id of the message to delete (from mDM_list).")
|
|
543
565
|
});
|
|
544
566
|
async function mDM_edit(input, ctx) {
|
|
545
567
|
readSupabaseEnv();
|
|
568
|
+
const dm = ctx.providers.dm;
|
|
569
|
+
const selfId = await dm.selfId();
|
|
570
|
+
const threadId = dmThreadId(selfId, input.to, input.thread_label);
|
|
571
|
+
const recent = await dm.list({ threadId, limit: 100 });
|
|
572
|
+
const target = recent.messages.find((m) => m.id === input.message_id);
|
|
573
|
+
if (!target) {
|
|
574
|
+
throw new Error(
|
|
575
|
+
`mDM_edit could not find message ${input.message_id} in the recent history of this thread. Pass the 'to' (and 'thread_label') of the conversation the message belongs to.`
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
if (isE2eeEnvelope(target.payload)) {
|
|
579
|
+
throw new Error(
|
|
580
|
+
"mDM_edit cannot edit an end-to-end-encrypted message: the Double Ratchet is forward-only, so the edit can't be re-sealed and storing a new body would strip E2EE. Delete it with mDM_delete and send a replacement with mDM_send instead."
|
|
581
|
+
);
|
|
582
|
+
}
|
|
546
583
|
const envelope = {
|
|
547
584
|
v: PROTOCOL_VERSION,
|
|
548
585
|
type: "text",
|
|
@@ -551,7 +588,7 @@ async function mDM_edit(input, ctx) {
|
|
|
551
588
|
sent_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
552
589
|
};
|
|
553
590
|
const encrypted_payload = Buffer.from(JSON.stringify(envelope), "utf8").toString("base64");
|
|
554
|
-
ctx.log("debug", "mDM_edit via message-edit", { message_id: input.message_id });
|
|
591
|
+
ctx.log("debug", "mDM_edit via message-edit (legacy plaintext only)", { message_id: input.message_id });
|
|
555
592
|
await invokeFunction("message-edit", { message_id: input.message_id, encrypted_payload });
|
|
556
593
|
return { message_id: input.message_id, edited: true };
|
|
557
594
|
}
|
|
@@ -607,7 +644,7 @@ var mdmTools = [
|
|
|
607
644
|
{
|
|
608
645
|
name: "mDM_edit",
|
|
609
646
|
requires: "any",
|
|
610
|
-
description: "Edit a direct message you sent \u2014 replace its body by message_id (
|
|
647
|
+
description: "Edit a direct message you sent \u2014 replace its body by message_id (pass the conversation's `to` so it can be located). NOTE: end-to-end-encrypted messages CANNOT be edited (the ratchet is forward-only) \u2014 mDM_edit refuses them and you should mDM_delete + mDM_send a replacement instead. Only legacy non-E2EE messages are editable.",
|
|
611
648
|
inputSchema: mDM_edit_input,
|
|
612
649
|
handler: mDM_edit
|
|
613
650
|
},
|
|
@@ -656,13 +693,13 @@ async function signalDm(ctx, to, threadLabel, envelope) {
|
|
|
656
693
|
const selfId = await dm.selfId();
|
|
657
694
|
const threadId = dmThreadId2(selfId, to, threadLabel);
|
|
658
695
|
const res = await dm.send({ to, threadId, payload: packEnvelope(envelope) });
|
|
659
|
-
return { message_id: res?.
|
|
696
|
+
return { message_id: res?.id, thread_id: threadId };
|
|
660
697
|
}
|
|
661
698
|
async function mDM_call_start(input, ctx) {
|
|
662
699
|
const dm = ctx.providers.dm;
|
|
663
700
|
const selfId = await dm.selfId();
|
|
664
701
|
const mode = input.video ? "video" : "audio";
|
|
665
|
-
const label = `dmcall-${dmThreadId2(selfId, input.to
|
|
702
|
+
const label = `dmcall-${dmThreadId2(selfId, input.to).replace(/[^a-zA-Z0-9._-]/g, "-")}`.slice(0, 120);
|
|
666
703
|
const { roomId } = await ctx.providers.voice.createRoom(label);
|
|
667
704
|
const ticket = await ctx.providers.voice.joinTicket(roomId);
|
|
668
705
|
let invited = false;
|
|
@@ -757,12 +794,17 @@ var mIRC_create_input = z3.object({
|
|
|
757
794
|
topic: z3.string().max(500).optional().describe("Optional channel topic/description."),
|
|
758
795
|
access_mode: AccessMode.default("open"),
|
|
759
796
|
password: z3.string().min(6).max(120).optional().describe("Password (only for access_mode=password)."),
|
|
760
|
-
capabilities: Capabilities
|
|
797
|
+
capabilities: Capabilities,
|
|
798
|
+
wrapped_group_key: z3.string().optional().describe(
|
|
799
|
+
"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
|
+
)
|
|
761
801
|
});
|
|
762
802
|
var mIRC_list_input = z3.object({
|
|
763
803
|
limit: z3.number().int().min(1).max(500).default(100).optional(),
|
|
764
|
-
offset: z3.number().int().min(0).default(0).optional()
|
|
765
|
-
|
|
804
|
+
offset: z3.number().int().min(0).default(0).optional()
|
|
805
|
+
// NOTE: an access_mode filter was removed — channel-manage's list branch doesn't
|
|
806
|
+
// filter by it (it was a silent no-op). Filter client-side on the returned
|
|
807
|
+
// access_mode field. Server-side filtering is tracked in the consistency ticket.
|
|
766
808
|
});
|
|
767
809
|
var mIRC_get_input = z3.object({
|
|
768
810
|
channel_id: ChannelId
|
|
@@ -771,7 +813,9 @@ var mIRC_update_input = z3.object({
|
|
|
771
813
|
channel_id: ChannelId,
|
|
772
814
|
name: z3.string().min(1).max(80).optional(),
|
|
773
815
|
topic: z3.string().max(500).optional(),
|
|
774
|
-
|
|
816
|
+
// NOTE: access_mode was removed — channel-manage's update branch ignores it, and
|
|
817
|
+
// switching an existing channel to/from an E2EE (password/private) mode needs
|
|
818
|
+
// group-key handling that isn't wired yet. Recreate the channel to change mode.
|
|
775
819
|
capabilities: Capabilities
|
|
776
820
|
});
|
|
777
821
|
var mIRC_delete_input = z3.object({
|
|
@@ -780,9 +824,11 @@ var mIRC_delete_input = z3.object({
|
|
|
780
824
|
async function mIRC_create(input, ctx) {
|
|
781
825
|
readSupabaseEnv();
|
|
782
826
|
ctx.log("debug", "mIRC_create invoking channel-manage", { name: input.name });
|
|
827
|
+
const { topic, ...rest } = input;
|
|
828
|
+
const payload = topic !== void 0 ? { ...rest, description: topic } : { ...rest };
|
|
783
829
|
return await invokeFunction("channel-manage", {
|
|
784
830
|
action: "create",
|
|
785
|
-
...
|
|
831
|
+
...payload
|
|
786
832
|
});
|
|
787
833
|
}
|
|
788
834
|
async function mIRC_list(input, ctx) {
|
|
@@ -824,14 +870,14 @@ var mircTools = [
|
|
|
824
870
|
{
|
|
825
871
|
name: "mIRC_create",
|
|
826
872
|
requires: "network",
|
|
827
|
-
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).",
|
|
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.",
|
|
828
874
|
inputSchema: mIRC_create_input,
|
|
829
875
|
handler: mIRC_create
|
|
830
876
|
},
|
|
831
877
|
{
|
|
832
878
|
name: "mIRC_list",
|
|
833
879
|
requires: "network",
|
|
834
|
-
description: "List channels available to the current user.
|
|
880
|
+
description: "List channels available to the current user.",
|
|
835
881
|
inputSchema: mIRC_list_input,
|
|
836
882
|
handler: mIRC_list
|
|
837
883
|
},
|
|
@@ -845,7 +891,7 @@ var mircTools = [
|
|
|
845
891
|
{
|
|
846
892
|
name: "mIRC_update",
|
|
847
893
|
requires: "network",
|
|
848
|
-
description: "Update channel metadata (name, topic,
|
|
894
|
+
description: "Update channel metadata (name, topic, capabilities). Owner only. Access mode is fixed at creation \u2014 recreate the channel to change it.",
|
|
849
895
|
inputSchema: mIRC_update_input,
|
|
850
896
|
handler: mIRC_update
|
|
851
897
|
},
|
|
@@ -868,31 +914,34 @@ var mIRC_join_input = z4.object({
|
|
|
868
914
|
password: z4.string().min(1).optional().describe("Required if the channel is access_mode=private.")
|
|
869
915
|
});
|
|
870
916
|
var mIRC_request_access_input = z4.object({
|
|
871
|
-
channel_id: ChannelId2
|
|
872
|
-
message: z4.string().max(500).optional().describe("Optional note for the channel owner explaining why.")
|
|
917
|
+
channel_id: ChannelId2
|
|
873
918
|
});
|
|
874
919
|
var mIRC_leave_input = z4.object({
|
|
875
920
|
channel_id: ChannelId2
|
|
876
921
|
});
|
|
877
|
-
var
|
|
922
|
+
var mIRC_reject_request_input = z4.object({
|
|
878
923
|
channel_id: ChannelId2,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
924
|
+
identity_id: z4.string().min(1).describe("Identity id of the requester to reject (state=requested; from mIRC_list members).")
|
|
925
|
+
});
|
|
926
|
+
var mIRC_approve_request_input = mIRC_reject_request_input.extend({
|
|
927
|
+
wrapped_group_key: z4.string().optional().describe(
|
|
928
|
+
"Required to approve a join to a password/private (E2EE) channel: the channel group key wrapped to the approved member's identity key. Without it the backend rejects the approval with a 'wrapped_group_key required' error. (Access requests only exist on non-open channels, so this is effectively always required.)"
|
|
929
|
+
)
|
|
883
930
|
});
|
|
884
|
-
var mIRC_reject_request_input = mIRC_approve_request_input;
|
|
885
931
|
var mIRC_kick_input = z4.object({
|
|
886
932
|
channel_id: ChannelId2,
|
|
887
|
-
identity_id: MemberIdentity
|
|
888
|
-
|
|
933
|
+
identity_id: MemberIdentity
|
|
934
|
+
// NOTE: a `reason` field used to be advertised here but channel-members-manage
|
|
935
|
+
// never persists it (no audit row on kick) — removed until the backend logs it
|
|
936
|
+
// (see consistency ticket) so the tool doesn't claim an audit trail it can't deliver.
|
|
889
937
|
});
|
|
890
938
|
var mIRC_ban_input = z4.object({
|
|
891
939
|
channel_id: ChannelId2,
|
|
892
|
-
identity_id: MemberIdentity
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
until
|
|
940
|
+
identity_id: MemberIdentity
|
|
941
|
+
// NOTE: `reason` (no storage) and `until` (timed ban) were removed — the EF ban
|
|
942
|
+
// branch ignores both, so `until` produced a SILENT PERMANENT ban when a caller
|
|
943
|
+
// asked for a temporary one. Ban is permanent-until-unban; enforced temp-bans +
|
|
944
|
+
// ban audit are tracked in the consistency ticket.
|
|
896
945
|
});
|
|
897
946
|
var mIRC_unban_input = z4.object({
|
|
898
947
|
channel_id: ChannelId2,
|
|
@@ -937,7 +986,7 @@ var mircMembersTools = [
|
|
|
937
986
|
{
|
|
938
987
|
name: "mIRC_request_access",
|
|
939
988
|
requires: "network",
|
|
940
|
-
description: "Request access to
|
|
989
|
+
description: "Request access to a password/private channel (your membership goes to state=requested for an admin to approve).",
|
|
941
990
|
inputSchema: mIRC_request_access_input,
|
|
942
991
|
handler: ((input, ctx) => invokeChannelMembers("request-access", input, ctx))
|
|
943
992
|
},
|
|
@@ -951,7 +1000,7 @@ var mircMembersTools = [
|
|
|
951
1000
|
{
|
|
952
1001
|
name: "mIRC_approve_request",
|
|
953
1002
|
requires: "network",
|
|
954
|
-
description: "Approve a pending access request. Admins / moderators / owner only.",
|
|
1003
|
+
description: "Approve a pending access request (state=requested \u2192 active). Admins / moderators / owner only. Because access requests only exist on E2EE (password/private) channels, you must pass wrapped_group_key \u2014 the channel group key wrapped to the approved member's identity key.",
|
|
955
1004
|
inputSchema: mIRC_approve_request_input,
|
|
956
1005
|
handler: ((input, ctx) => invokeChannelMembers("approve-request", input, ctx))
|
|
957
1006
|
},
|
|
@@ -965,14 +1014,14 @@ var mircMembersTools = [
|
|
|
965
1014
|
{
|
|
966
1015
|
name: "mIRC_kick",
|
|
967
1016
|
requires: "network",
|
|
968
|
-
description: "Remove a member from the channel. They can rejoin if not banned. Requires moderator+.
|
|
1017
|
+
description: "Remove a member from the channel. They can rejoin if not banned. Requires moderator+.",
|
|
969
1018
|
inputSchema: mIRC_kick_input,
|
|
970
1019
|
handler: ((input, ctx) => invokeChannelMembers("kick", input, ctx))
|
|
971
1020
|
},
|
|
972
1021
|
{
|
|
973
1022
|
name: "mIRC_ban",
|
|
974
1023
|
requires: "network",
|
|
975
|
-
description: "Ban a member from the channel.
|
|
1024
|
+
description: "Ban a member from the channel. The ban is permanent until you call mIRC_unban. Requires admin+.",
|
|
976
1025
|
inputSchema: mIRC_ban_input,
|
|
977
1026
|
handler: ((input, ctx) => invokeChannelMembers("ban", input, ctx))
|
|
978
1027
|
},
|
|
@@ -1324,6 +1373,9 @@ async function mp0st_audit_export(input, ctx) {
|
|
|
1324
1373
|
}
|
|
1325
1374
|
async function mp0st_consent(input, ctx) {
|
|
1326
1375
|
readSupabaseEnv();
|
|
1376
|
+
if ((input.action === "check" || input.action === "optin") && !input.recipient) {
|
|
1377
|
+
throw new Error(`mp0st_consent action '${input.action}' requires a 'recipient' email address.`);
|
|
1378
|
+
}
|
|
1327
1379
|
ctx.log("debug", "mp0st_consent invoking mp0st-consent", { action: input.action });
|
|
1328
1380
|
return await invokeFunction("mp0st-consent", { action: input.action, recipient: input.recipient ?? null });
|
|
1329
1381
|
}
|
|
@@ -1912,70 +1964,16 @@ var actionTools = [
|
|
|
1912
1964
|
}
|
|
1913
1965
|
];
|
|
1914
1966
|
|
|
1915
|
-
// src/tools/embed.ts
|
|
1916
|
-
import { z as z12 } from "zod";
|
|
1917
|
-
var EMBED_CDN = (process.env.MOSADD_EMBED_CDN ?? "https://embed.mosadd.com").replace(/\/+$/, "");
|
|
1918
|
-
var POSITIONS = ["inline", "sidebar-left", "sidebar-right", "floating-bl", "floating-br", "fullscreen"];
|
|
1919
|
-
var SKINS = ["default", "retro-irc-1990", "terminal", "minimal-dark", "minimal-light"];
|
|
1920
|
-
var embed_create_input = z12.object({
|
|
1921
|
-
channel: z12.string().min(1).max(128).regex(/^[A-Za-z0-9_-]+$/).describe("The mIRC channel id everyone on the embed shares (e.g. 'acme-support'). Auto-created on first message if new."),
|
|
1922
|
-
allowed_origins: z12.array(z12.string().min(1)).min(1).max(10).describe("REQUIRED. Domain(s) where the widget will be served \u2014 the key only works from these origins. Use the host(s) of the app you're building, e.g. ['app.acme.com','*.acme.com']. For local testing use mode:'test' and e.g. 'localhost:3000'."),
|
|
1923
|
-
name: z12.string().max(64).optional().describe("Label for the key in the owner's dashboard. Default 'embed: <channel>'."),
|
|
1924
|
-
position: z12.enum(POSITIONS).optional().describe("Where the widget renders. Default 'inline'."),
|
|
1925
|
-
skin: z12.enum(SKINS).optional().describe("Visual skin. Default 'default' (mosadd-branded retro mIRC)."),
|
|
1926
|
-
title: z12.string().max(60).optional().describe("Header title shown in the widget. Default 'mIRC'."),
|
|
1927
|
-
anon: z12.boolean().optional().describe("Allow visitors to join with just a nick (no mosadd account). Default true."),
|
|
1928
|
-
locale: z12.enum(["en", "pl"]).optional().describe("Widget UI language. Default 'en'."),
|
|
1929
|
-
mode: z12.enum(["live", "test"]).optional().describe("Key mode \u2014 'test' for local/dev origins, 'live' for production. Default 'live'.")
|
|
1930
|
-
});
|
|
1931
|
-
var attrSafe = (s) => s.replace(/["'<>]/g, "");
|
|
1932
|
-
function buildSnippet(input, key) {
|
|
1933
|
-
const attrs = [`data-channel="${attrSafe(input.channel)}"`, `data-position="${input.position ?? "inline"}"`];
|
|
1934
|
-
if (input.skin) attrs.push(`data-skin="${input.skin}"`);
|
|
1935
|
-
if (input.title) attrs.push(`data-title="${attrSafe(input.title)}"`);
|
|
1936
|
-
if (input.anon === false) attrs.push(`data-anon="false"`);
|
|
1937
|
-
if (input.locale) attrs.push(`data-locale="${input.locale}"`);
|
|
1938
|
-
return `<div id="mosadd-mirc" ${attrs.join(" ")}></div>
|
|
1939
|
-
<script src="${EMBED_CDN}/v1.js" data-key="${key}"></script>`;
|
|
1940
|
-
}
|
|
1941
|
-
async function embed_create(input, ctx) {
|
|
1942
|
-
readSupabaseEnv();
|
|
1943
|
-
ctx.log("debug", "comms_embed_create minting embed key", { channel: input.channel, origins: input.allowed_origins.length });
|
|
1944
|
-
const res = await invokeFunction("embed-keys", {
|
|
1945
|
-
name: input.name ?? `embed: ${input.channel}`,
|
|
1946
|
-
channels: [input.channel],
|
|
1947
|
-
allowed_origins: input.allowed_origins,
|
|
1948
|
-
mode: input.mode ?? "live"
|
|
1949
|
-
});
|
|
1950
|
-
if (res.error) throw new Error(res.error);
|
|
1951
|
-
if (!res.key) throw new Error("embed-keys returned no publishable key (missing `key`).");
|
|
1952
|
-
return {
|
|
1953
|
-
embed_key: res.key,
|
|
1954
|
-
channel: input.channel,
|
|
1955
|
-
allowed_origins: input.allowed_origins,
|
|
1956
|
-
snippet: buildSnippet(input, res.key)
|
|
1957
|
-
};
|
|
1958
|
-
}
|
|
1959
|
-
var embedTools = [
|
|
1960
|
-
{
|
|
1961
|
-
name: "comms_embed_create",
|
|
1962
|
-
requires: "network",
|
|
1963
|
-
description: "Embed a LIVE mosadd chat channel into an app/site you're building (great for builder-agents on Lovable/Bolt/Cursor/v0). Mints a publishable embed key scoped to a channel + the app's domain(s) and returns a ready-to-paste HTML snippet (a <div> + <script src=embed.mosadd.com/v1.js data-key=\u2026>). Visitors of the host page chat in real time (anonymous nick or mosadd login). REQUIRES `allowed_origins` \u2014 the domain(s) the app is served from (the key only works there). The publishable key is browser-safe (mints only channel-scoped JWTs); your hub key never leaves the server. Returns { embed_key, channel, allowed_origins, snippet }.",
|
|
1964
|
-
inputSchema: embed_create_input,
|
|
1965
|
-
handler: embed_create
|
|
1966
|
-
}
|
|
1967
|
-
];
|
|
1968
|
-
|
|
1969
1967
|
// src/tools/threat.ts
|
|
1970
|
-
import { z as
|
|
1968
|
+
import { z as z12 } from "zod";
|
|
1971
1969
|
import {
|
|
1972
1970
|
THREAT_EVENTS,
|
|
1973
1971
|
THREAT_EVENT_COUNT,
|
|
1974
1972
|
evaluateEvent
|
|
1975
1973
|
} from "@mosadd/threat-engine";
|
|
1976
|
-
var threat_catalog_input =
|
|
1977
|
-
category:
|
|
1978
|
-
platform:
|
|
1974
|
+
var threat_catalog_input = z12.object({
|
|
1975
|
+
category: z12.enum(["COMINT", "ELINT", "MASINT", "CYBER", "BEHAVIORAL", "PRIVACY", "SIGINT", "OSINT", "MPOST"]).optional().describe("Filter the catalog to one intelligence-discipline category. Omit for the full catalog."),
|
|
1976
|
+
platform: z12.enum(["apk", "ios", "pwa", "harmony"]).optional().describe("Filter to events detectable on this platform. Omit for all platforms.")
|
|
1979
1977
|
});
|
|
1980
1978
|
async function threat_catalog(input, _ctx) {
|
|
1981
1979
|
let events = THREAT_EVENTS;
|
|
@@ -1983,10 +1981,10 @@ async function threat_catalog(input, _ctx) {
|
|
|
1983
1981
|
if (input.platform) events = events.filter((e) => e.platforms.includes(input.platform));
|
|
1984
1982
|
return { count: events.length, total: THREAT_EVENT_COUNT, events };
|
|
1985
1983
|
}
|
|
1986
|
-
var threat_classify_input =
|
|
1987
|
-
event_type:
|
|
1988
|
-
severity:
|
|
1989
|
-
details:
|
|
1984
|
+
var threat_classify_input = z12.object({
|
|
1985
|
+
event_type: z12.string().min(1).max(120).describe('Event type to classify, e.g. "SIM_SWAP", "AUTH_BRUTEFORCE", "TOLL_FRAUD". Case-insensitive.'),
|
|
1986
|
+
severity: z12.string().optional().describe('Optional producer severity hint. "killswitch" \u2192 lock_account; "critical" \u2192 revoke_sessions; anything else is informational.'),
|
|
1987
|
+
details: z12.string().max(2e3).optional().describe("Optional free-text context (informational only).")
|
|
1990
1988
|
});
|
|
1991
1989
|
async function threat_classify(input, _ctx) {
|
|
1992
1990
|
return evaluateEvent({ eventType: input.event_type, severity: input.severity, details: input.details });
|
|
@@ -2008,6 +2006,131 @@ var threatTools = [
|
|
|
2008
2006
|
}
|
|
2009
2007
|
];
|
|
2010
2008
|
|
|
2009
|
+
// src/tools/murl.ts
|
|
2010
|
+
import { z as z13 } from "zod";
|
|
2011
|
+
var DEFAULT_EDGE_URL2 = "https://mosadd-edge.mr-brics-33.workers.dev";
|
|
2012
|
+
function edgeUrl2() {
|
|
2013
|
+
return process.env.MOSADD_EDGE_URL?.replace(/\/$/, "") ?? DEFAULT_EDGE_URL2;
|
|
2014
|
+
}
|
|
2015
|
+
function hubKey2() {
|
|
2016
|
+
const key = process.env.MOSADD_API_KEY ?? process.env.MOSADD_HUB_KEY ?? "";
|
|
2017
|
+
if (!key) throw new Error("MOSADD_API_KEY required for mURL tools (see `mosadd login` / hub-keys).");
|
|
2018
|
+
return key;
|
|
2019
|
+
}
|
|
2020
|
+
function domainToSlug(input) {
|
|
2021
|
+
let host = String(input).trim().toLowerCase();
|
|
2022
|
+
host = host.replace(/^[a-z]+:\/\//, "").replace(/[/?#].*$/, "").replace(/:\d+$/, "");
|
|
2023
|
+
if (host.startsWith("www.")) host = host.slice(4);
|
|
2024
|
+
if (!host || !/^[a-z0-9-]+(\.[a-z0-9-]+)+$/.test(host)) {
|
|
2025
|
+
throw new Error(`Invalid domain: "${input}" \u2014 pass a domain like "example.com" or a URL.`);
|
|
2026
|
+
}
|
|
2027
|
+
return { domain: host, slug: host.replace(/\./g, "-") };
|
|
2028
|
+
}
|
|
2029
|
+
var DomainArg = z13.string().min(3).max(255).describe("A domain (e.g. 'example.com') or a full URL \u2014 the channel is keyed to the domain.");
|
|
2030
|
+
var mURL_read_channel_input = z13.object({
|
|
2031
|
+
domain: DomainArg,
|
|
2032
|
+
limit: z13.number().int().min(1).max(100).optional().describe("Recent messages to return (max 100). Default 50.")
|
|
2033
|
+
});
|
|
2034
|
+
async function mURL_read_channel(input, ctx) {
|
|
2035
|
+
const { domain, slug: slug2 } = domainToSlug(input.domain);
|
|
2036
|
+
const limit = input.limit ?? 50;
|
|
2037
|
+
ctx.log("debug", "mURL_read_channel", { domain });
|
|
2038
|
+
const r = await fetch(`${edgeUrl2()}/c/${slug2}/history?limit=${limit}`, {
|
|
2039
|
+
headers: { Authorization: `Bearer ${hubKey2()}` }
|
|
2040
|
+
});
|
|
2041
|
+
if (!r.ok) {
|
|
2042
|
+
const e = await r.text().catch(() => "");
|
|
2043
|
+
throw new Error(`mosadd-edge ${r.status}: ${e.slice(0, 200)}`);
|
|
2044
|
+
}
|
|
2045
|
+
const data = await r.json();
|
|
2046
|
+
return {
|
|
2047
|
+
domain,
|
|
2048
|
+
messages: (data.messages ?? []).map((m) => ({ id: m.id, from: m.from ?? null, text: m.text, timestamp: m.ts }))
|
|
2049
|
+
};
|
|
2050
|
+
}
|
|
2051
|
+
var mURL_post_input = z13.object({
|
|
2052
|
+
domain: DomainArg,
|
|
2053
|
+
text: z13.string().min(1).max(2e3).describe("Message body (max 2000 chars, up to 3 lines \u2014 Worker-enforced)."),
|
|
2054
|
+
from: z13.string().max(120).optional().describe("Sender hint shown to others (defaults to the hub-key owner / your agent name).")
|
|
2055
|
+
});
|
|
2056
|
+
async function mURL_post(input, ctx) {
|
|
2057
|
+
const { domain, slug: slug2 } = domainToSlug(input.domain);
|
|
2058
|
+
ctx.log("debug", "mURL_post", { domain });
|
|
2059
|
+
const r = await fetch(`${edgeUrl2()}/c/${slug2}/send`, {
|
|
2060
|
+
method: "POST",
|
|
2061
|
+
headers: { "Content-Type": "application/json", Authorization: `Bearer ${hubKey2()}` },
|
|
2062
|
+
body: JSON.stringify({ text: input.text, from: input.from })
|
|
2063
|
+
});
|
|
2064
|
+
if (!r.ok) {
|
|
2065
|
+
const e = await r.text().catch(() => "");
|
|
2066
|
+
throw new Error(`mosadd-edge ${r.status}: ${e.slice(0, 200)}`);
|
|
2067
|
+
}
|
|
2068
|
+
const data = await r.json();
|
|
2069
|
+
if (!data?.id) throw new Error("mosadd-edge: send returned no id");
|
|
2070
|
+
return { domain, message_id: data.id, posted_at: data.ts ?? Date.now() };
|
|
2071
|
+
}
|
|
2072
|
+
var mURL_list_channels_input = z13.object({
|
|
2073
|
+
action: z13.enum(["trending", "list", "mine"]).optional().describe("'trending' (default) = most active domain channels in the last N hours; 'list' = paginated catalogue filtered by status; 'mine' = channels you own (DNS-verified)."),
|
|
2074
|
+
limit: z13.number().int().min(1).max(100).optional().describe("Max channels to return. Default 20."),
|
|
2075
|
+
hours: z13.number().int().min(1).max(168).optional().describe("Trending window in hours. Default 24, max 168 (7d)."),
|
|
2076
|
+
status: z13.enum(["open", "claimed", "blocked"]).optional().describe("For action='list': filter (default 'open')."),
|
|
2077
|
+
cursor: z13.string().optional().describe("For action='list': pagination \u2014 pass previous response's next_cursor (created_at ISO).")
|
|
2078
|
+
});
|
|
2079
|
+
async function mURL_list_channels(input, ctx) {
|
|
2080
|
+
readSupabaseEnv();
|
|
2081
|
+
const action = input.action ?? "trending";
|
|
2082
|
+
ctx.log("debug", "mURL_list_channels invoking murl-channels", { action });
|
|
2083
|
+
return await invokeFunction("murl-channels", {
|
|
2084
|
+
action,
|
|
2085
|
+
limit: input.limit ?? null,
|
|
2086
|
+
hours: input.hours ?? null,
|
|
2087
|
+
status: input.status ?? null,
|
|
2088
|
+
cursor: input.cursor ?? null
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
var mURL_presence_input = z13.object({ domain: DomainArg });
|
|
2092
|
+
async function mURL_presence(input, ctx) {
|
|
2093
|
+
const { domain, slug: slug2 } = domainToSlug(input.domain);
|
|
2094
|
+
ctx.log("debug", "mURL_presence", { domain });
|
|
2095
|
+
const r = await fetch(`${edgeUrl2()}/c/${slug2}/presence`);
|
|
2096
|
+
if (!r.ok) {
|
|
2097
|
+
const e = await r.text().catch(() => "");
|
|
2098
|
+
throw new Error(`mosadd-edge ${r.status}: ${e.slice(0, 200)}`);
|
|
2099
|
+
}
|
|
2100
|
+
const data = await r.json();
|
|
2101
|
+
return { domain, count: data.count ?? 0, roster: data.roster ?? [], status: data.status ?? "open" };
|
|
2102
|
+
}
|
|
2103
|
+
var murlTools = [
|
|
2104
|
+
{
|
|
2105
|
+
name: "mURL_read_channel",
|
|
2106
|
+
requires: "network",
|
|
2107
|
+
description: "Read the live chat channel for a web DOMAIN (mURL \u2014 'IRC for URLs'). Returns the most recent messages humans and agents have posted about that domain. Use it to get real-time, crowd-sourced context before acting on a site \u2014 e.g. scam warnings, promo codes, outage reports, 'is this legit?'. The channel auto-exists for any domain. Auth: MOSADD_API_KEY (hub key).",
|
|
2108
|
+
inputSchema: mURL_read_channel_input,
|
|
2109
|
+
handler: mURL_read_channel
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
name: "mURL_post",
|
|
2113
|
+
requires: "network",
|
|
2114
|
+
description: "Post a message into a web DOMAIN's mURL chat channel \u2014 leave context for the humans and agents who visit that site next (a finding, warning, tip, or coordination note). Sub-100ms global fan-out to everyone currently on the channel. Auth: MOSADD_API_KEY (hub key).",
|
|
2115
|
+
inputSchema: mURL_post_input,
|
|
2116
|
+
handler: mURL_post
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
name: "mURL_presence",
|
|
2120
|
+
requires: "network",
|
|
2121
|
+
description: "Who is on a domain's mURL channel right now: live participant count + roster nicknames + channel status (open/claimed/blocked). Public (no key needed). Use it to gauge whether a domain has an active audience before posting.",
|
|
2122
|
+
inputSchema: mURL_presence_input,
|
|
2123
|
+
handler: mURL_presence
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
name: "mURL_list_channels",
|
|
2127
|
+
requires: "network",
|
|
2128
|
+
description: "Discovery for mURL domain channels: 'trending' (most active in the last N hours, default 24) / 'list' (paginated catalogue, status-filtered) / 'mine' (channels you DNS-verified). Returns domain, slug, status, branding, verified_at + (for trending) messages_in_window. For who's-on-now, follow up with mURL_presence on the slug.",
|
|
2129
|
+
inputSchema: mURL_list_channels_input,
|
|
2130
|
+
handler: mURL_list_channels
|
|
2131
|
+
}
|
|
2132
|
+
];
|
|
2133
|
+
|
|
2011
2134
|
// src/tools/capabilities.ts
|
|
2012
2135
|
import { z as z14 } from "zod";
|
|
2013
2136
|
var CONTRACT_VERSION = "1.0.0";
|
|
@@ -2060,11 +2183,11 @@ var channelTools = [
|
|
|
2060
2183
|
...knowledgeTools,
|
|
2061
2184
|
...actionTools,
|
|
2062
2185
|
// Action links (Tier 1): agent → user one-link browser action via action-create EF
|
|
2063
|
-
...embedTools,
|
|
2064
|
-
|
|
2065
|
-
...threatTools
|
|
2186
|
+
// ...embedTools, // comms_embed_create: SCAFFOLD — embed-keys EF undeployed (404) + embed widget parked. Unregistered.
|
|
2187
|
+
...threatTools,
|
|
2066
2188
|
// threat_catalog + threat_classify: pure defensive threat-event engine (@mosadd/threat-engine, LINEAR-3498)
|
|
2067
|
-
|
|
2189
|
+
...murlTools
|
|
2190
|
+
// mURL: revived as a full module (founder 2026-06-27) — read/post/presence/list_channels over live domain channels
|
|
2068
2191
|
// ...mcallTools, // mCALL: carrier-pending (no telephony carrier live) — re-register when a carrier is configured
|
|
2069
2192
|
// mirlTools,
|
|
2070
2193
|
// mmatrixTools, mdiscordTools, mtelegramTools, mslackTools, msignalTools,
|
package/dist/index.d.ts
CHANGED
|
@@ -200,8 +200,8 @@ declare function createMosaddServer(options?: MosaddServerOptions): McpServer;
|
|
|
200
200
|
/**
|
|
201
201
|
* Tool registry. Each m* module contributes a set of tools.
|
|
202
202
|
*
|
|
203
|
-
* Live modules (
|
|
204
|
-
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) =
|
|
203
|
+
* Live modules (6): mDM, mIRC, mURL, mTALK, mp0st, mRAG (60 channel tools) + comms (3)
|
|
204
|
+
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) = 65 callable.
|
|
205
205
|
* mROOM was KILLED (LINEAR-3414, channel re-cut → ephemeral private mIRC): its tools
|
|
206
206
|
* live in tools/mroom.ts + mroom-messages.ts but are NOT registered here.
|
|
207
207
|
* Plus action links: comms_action_create (agent → user one-link browser action,
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosadd/mcp",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.24",
|
|
4
4
|
"mcpName": "io.github.hei33enberg/mosadd-mcp",
|
|
5
|
-
"description": "Model Context Protocol server for mosadd. Exposes the
|
|
5
|
+
"description": "Model Context Protocol server for mosadd. Exposes the 6 live m* modules (mDM, mIRC, mURL, mTALK, mp0st, mRAG) plus comms + threat tools — 65 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
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -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/
|
|
42
|
-
"@mosadd/
|
|
43
|
-
"@mosadd/providers": "3.0.0-alpha.
|
|
44
|
-
"@mosadd/
|
|
41
|
+
"@mosadd/protocol": "3.0.0-alpha.24",
|
|
42
|
+
"@mosadd/threat-engine": "3.0.0-alpha.24",
|
|
43
|
+
"@mosadd/providers": "3.0.0-alpha.24",
|
|
44
|
+
"@mosadd/crypto": "3.0.0-alpha.24"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.3.5",
|
|
@@ -105,12 +105,40 @@ export async function invokeFunction<T = unknown>(
|
|
|
105
105
|
const client = getSupabase();
|
|
106
106
|
const { data, error } = await client.functions.invoke<T>(fn, { body });
|
|
107
107
|
if (error) {
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
// supabase-js throws FunctionsHttpError for any non-2xx, whose `.message`
|
|
109
|
+
// is the FIXED generic string "Edge Function returned a non-2xx status
|
|
110
|
+
// code" — the *real* reason (e.g. {"error":"wrapped_group_key required"},
|
|
111
|
+
// "forbidden", an RLS denial) lives in `error.context`, a Response. Read it
|
|
112
|
+
// so the agent gets an actionable message (and the HTTP status) it can
|
|
113
|
+
// reason about and self-correct on, instead of the same opaque sentence
|
|
114
|
+
// for every failure across mDM/mIRC/mp0st/mRAG/prekey/message-list.
|
|
115
|
+
let msg =
|
|
116
|
+
error instanceof Error && error.message
|
|
110
117
|
? error.message
|
|
111
|
-
:
|
|
112
|
-
|
|
113
|
-
|
|
118
|
+
: `Edge function ${fn} failed`;
|
|
119
|
+
const ctx = (error as { context?: unknown }).context;
|
|
120
|
+
if (ctx && typeof (ctx as Response).text === "function") {
|
|
121
|
+
const res = ctx as Response;
|
|
122
|
+
try {
|
|
123
|
+
const raw = await res.text();
|
|
124
|
+
if (raw) {
|
|
125
|
+
let detail = raw;
|
|
126
|
+
try {
|
|
127
|
+
const parsed = JSON.parse(raw) as { error?: unknown; message?: unknown };
|
|
128
|
+
detail =
|
|
129
|
+
(typeof parsed.error === "string" && parsed.error) ||
|
|
130
|
+
(typeof parsed.message === "string" && parsed.message) ||
|
|
131
|
+
raw;
|
|
132
|
+
} catch {
|
|
133
|
+
// non-JSON body — use the raw text as-is
|
|
134
|
+
}
|
|
135
|
+
const status = typeof res.status === "number" ? res.status : undefined;
|
|
136
|
+
msg = status ? `${fn} (${status}): ${detail}` : `${fn}: ${detail}`;
|
|
137
|
+
}
|
|
138
|
+
} catch {
|
|
139
|
+
// body already consumed or unreadable — keep the generic message
|
|
140
|
+
}
|
|
141
|
+
}
|
|
114
142
|
throw new Error(msg);
|
|
115
143
|
}
|
|
116
144
|
if (data == null) {
|
package/src/tools/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool registry. Each m* module contributes a set of tools.
|
|
3
3
|
*
|
|
4
|
-
* Live modules (
|
|
5
|
-
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) =
|
|
4
|
+
* Live modules (6): mDM, mIRC, mURL, mTALK, mp0st, mRAG (60 channel tools) + comms (3)
|
|
5
|
+
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) = 65 callable.
|
|
6
6
|
* mROOM was KILLED (LINEAR-3414, channel re-cut → ephemeral private mIRC): its tools
|
|
7
7
|
* live in tools/mroom.ts + mroom-messages.ts but are NOT registered here.
|
|
8
8
|
* Plus action links: comms_action_create (agent → user one-link browser action,
|
|
@@ -31,9 +31,11 @@ import { attachmentTools } from "./attachments.js";
|
|
|
31
31
|
// import { mcallTools } from "./mcall.js"; // mCALL: carrier-pending — not registered (see header note)
|
|
32
32
|
import { knowledgeTools } from "./knowledge.js";
|
|
33
33
|
import { actionTools } from "./actions.js";
|
|
34
|
-
import { embedTools } from "./embed.js";
|
|
34
|
+
// import { embedTools } from "./embed.js"; // comms_embed_create: SCAFFOLD — its
|
|
35
|
+
// embed-keys EF is NOT deployed to prod (404s every call) and the embed.mosadd.com
|
|
36
|
+
// widget surface is parked. Unregister until both ship. See consistency ticket.
|
|
35
37
|
import { threatTools } from "./threat.js";
|
|
36
|
-
|
|
38
|
+
import { murlTools } from "./murl.js"; // mURL: REGISTERED — revived as a full dev module (founder 2026-06-27, re-arch). IRC-for-URLs, agent-native; backends live (mosadd-edge + murl-channels EF).
|
|
37
39
|
import { makeCapabilitiesTool } from "./capabilities.js";
|
|
38
40
|
|
|
39
41
|
/** The m* channel tools (everything except the meta discovery tool). */
|
|
@@ -57,9 +59,9 @@ const channelTools: MosaddTool[] = [
|
|
|
57
59
|
// call) and the PTT→RAG path needs rework. Unregister until both are fixed. See consistency ticket.
|
|
58
60
|
...knowledgeTools,
|
|
59
61
|
...actionTools, // Action links (Tier 1): agent → user one-link browser action via action-create EF
|
|
60
|
-
...embedTools, // comms_embed_create:
|
|
62
|
+
// ...embedTools, // comms_embed_create: SCAFFOLD — embed-keys EF undeployed (404) + embed widget parked. Unregistered.
|
|
61
63
|
...threatTools, // threat_catalog + threat_classify: pure defensive threat-event engine (@mosadd/threat-engine, LINEAR-3498)
|
|
62
|
-
|
|
64
|
+
...murlTools, // mURL: revived as a full module (founder 2026-06-27) — read/post/presence/list_channels over live domain channels
|
|
63
65
|
// ...mcallTools, // mCALL: carrier-pending (no telephony carrier live) — re-register when a carrier is configured
|
|
64
66
|
// mirlTools,
|
|
65
67
|
// mmatrixTools, mdiscordTools, mtelegramTools, mslackTools, msignalTools,
|
package/src/tools/mail.ts
CHANGED
|
@@ -150,7 +150,7 @@ async function mp0st_view(
|
|
|
150
150
|
subject: string;
|
|
151
151
|
body_text: string | null;
|
|
152
152
|
body_html: string | null;
|
|
153
|
-
|
|
153
|
+
sent_at: string;
|
|
154
154
|
}> {
|
|
155
155
|
readSupabaseEnv();
|
|
156
156
|
// mp0st-get (NOT mp0st-view): mp0st-view is the open-tracking pixel endpoint
|
|
@@ -268,6 +268,9 @@ async function mp0st_consent(
|
|
|
268
268
|
ctx: MosaddToolContext,
|
|
269
269
|
): Promise<Record<string, unknown>> {
|
|
270
270
|
readSupabaseEnv();
|
|
271
|
+
if ((input.action === "check" || input.action === "optin") && !input.recipient) {
|
|
272
|
+
throw new Error(`mp0st_consent action '${input.action}' requires a 'recipient' email address.`);
|
|
273
|
+
}
|
|
271
274
|
ctx.log("debug", "mp0st_consent invoking mp0st-consent", { action: input.action });
|
|
272
275
|
return await invokeFunction("mp0st-consent", { action: input.action, recipient: input.recipient ?? null });
|
|
273
276
|
}
|
package/src/tools/mdm-voice.ts
CHANGED
|
@@ -80,8 +80,10 @@ async function signalDm(
|
|
|
80
80
|
const dm = ctx.providers.dm;
|
|
81
81
|
const selfId = await dm.selfId();
|
|
82
82
|
const threadId = dmThreadId(selfId, to, threadLabel);
|
|
83
|
+
// DmProvider.send returns DmSendResult { id, deliveredAt } — read `id` (the old
|
|
84
|
+
// `message_id` lookup was always undefined, so the echoed id never populated).
|
|
83
85
|
const res = await dm.send({ to, threadId, payload: packEnvelope(envelope) });
|
|
84
|
-
return { message_id: (res as {
|
|
86
|
+
return { message_id: (res as { id?: string })?.id, thread_id: threadId };
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
// ---- Handlers ----
|
|
@@ -102,8 +104,12 @@ async function mDM_call_start(
|
|
|
102
104
|
const selfId = await dm.selfId();
|
|
103
105
|
const mode = input.video ? "video" : "audio";
|
|
104
106
|
|
|
105
|
-
// Stable room label tied to the DM
|
|
106
|
-
|
|
107
|
+
// Stable room label tied to the DM PAIR (no thread_label) so re-dials reuse one
|
|
108
|
+
// room AND the name stays short enough that both participants' full identity ids
|
|
109
|
+
// are always present — the livekit-token gate authorizes by full-id inclusion, so
|
|
110
|
+
// truncating an id would lock a real participant out. (thread_label still routes
|
|
111
|
+
// the call_invite message below, just not the room id.)
|
|
112
|
+
const label = `dmcall-${dmThreadId(selfId, input.to).replace(/[^a-zA-Z0-9._-]/g, "-")}`.slice(0, 120);
|
|
107
113
|
const { roomId } = await ctx.providers.voice.createRoom(label);
|
|
108
114
|
const ticket = await ctx.providers.voice.joinTicket(roomId);
|
|
109
115
|
|
package/src/tools/mdm.ts
CHANGED
|
@@ -342,8 +342,12 @@ async function mDM_respond_request(
|
|
|
342
342
|
const mDM_publish_keys_input = z.object({});
|
|
343
343
|
|
|
344
344
|
const mDM_edit_input = z.object({
|
|
345
|
+
to: ContactRef.describe(
|
|
346
|
+
"Recipient identity id of the conversation the message is in (needed to locate it and verify the edit won't break E2EE).",
|
|
347
|
+
),
|
|
345
348
|
message_id: z.string().min(1).describe("Id of the message to edit (from mDM_list)."),
|
|
346
349
|
new_text: z.string().min(1).max(64_000).describe("Replacement message body (UTF-8). Max 64 KB."),
|
|
350
|
+
thread_label: ThreadSuffix.optional(),
|
|
347
351
|
});
|
|
348
352
|
|
|
349
353
|
const mDM_delete_input = z.object({
|
|
@@ -355,9 +359,33 @@ async function mDM_edit(
|
|
|
355
359
|
ctx: MosaddToolContext,
|
|
356
360
|
): Promise<{ message_id: string; edited: true }> {
|
|
357
361
|
readSupabaseEnv();
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
362
|
+
const dm = ctx.providers.dm;
|
|
363
|
+
const selfId = await dm.selfId();
|
|
364
|
+
const threadId = dmThreadId(selfId, input.to, input.thread_label);
|
|
365
|
+
|
|
366
|
+
// Locate the target message before editing. mDM is E2EE by default and the
|
|
367
|
+
// Double Ratchet is FORWARD-ONLY (strict in-order, no skipped keys) — an edit
|
|
368
|
+
// cannot be re-sealed (the recipient's ratchet has already advanced past this
|
|
369
|
+
// message, so a re-encrypt would decrypt as <undecryptable>), and writing a
|
|
370
|
+
// fresh plaintext body would SILENTLY STRIP E2EE. So only legacy plaintext
|
|
371
|
+
// messages are editable; E2EE messages must be deleted + re-sent.
|
|
372
|
+
const recent = await dm.list({ threadId, limit: 100 });
|
|
373
|
+
const target = recent.messages.find((m) => m.id === input.message_id);
|
|
374
|
+
if (!target) {
|
|
375
|
+
throw new Error(
|
|
376
|
+
`mDM_edit could not find message ${input.message_id} in the recent history of this thread. ` +
|
|
377
|
+
`Pass the 'to' (and 'thread_label') of the conversation the message belongs to.`,
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
if (isE2eeEnvelope(target.payload)) {
|
|
381
|
+
throw new Error(
|
|
382
|
+
"mDM_edit cannot edit an end-to-end-encrypted message: the Double Ratchet is forward-only, so the edit " +
|
|
383
|
+
"can't be re-sealed and storing a new body would strip E2EE. Delete it with mDM_delete and send a " +
|
|
384
|
+
"replacement with mDM_send instead.",
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Legacy plaintext message — a plaintext edit matches its (non-E2EE) storage.
|
|
361
389
|
const envelope = {
|
|
362
390
|
v: PROTOCOL_VERSION,
|
|
363
391
|
type: "text",
|
|
@@ -366,7 +394,7 @@ async function mDM_edit(
|
|
|
366
394
|
sent_at: new Date().toISOString(),
|
|
367
395
|
};
|
|
368
396
|
const encrypted_payload = Buffer.from(JSON.stringify(envelope), "utf8").toString("base64");
|
|
369
|
-
ctx.log("debug", "mDM_edit via message-edit", { message_id: input.message_id });
|
|
397
|
+
ctx.log("debug", "mDM_edit via message-edit (legacy plaintext only)", { message_id: input.message_id });
|
|
370
398
|
await invokeFunction("message-edit", { message_id: input.message_id, encrypted_payload });
|
|
371
399
|
return { message_id: input.message_id, edited: true };
|
|
372
400
|
}
|
|
@@ -436,7 +464,7 @@ export const mdmTools: MosaddTool[] = [
|
|
|
436
464
|
name: "mDM_edit",
|
|
437
465
|
requires: "any",
|
|
438
466
|
description:
|
|
439
|
-
"Edit a direct message you sent — replace its body by message_id (
|
|
467
|
+
"Edit a direct message you sent — replace its body by message_id (pass the conversation's `to` so it can be located). NOTE: end-to-end-encrypted messages CANNOT be edited (the ratchet is forward-only) — mDM_edit refuses them and you should mDM_delete + mDM_send a replacement instead. Only legacy non-E2EE messages are editable.",
|
|
440
468
|
inputSchema: mDM_edit_input,
|
|
441
469
|
handler: mDM_edit as MosaddTool["handler"],
|
|
442
470
|
},
|
|
@@ -38,35 +38,44 @@ const mIRC_join_input = z.object({
|
|
|
38
38
|
|
|
39
39
|
const mIRC_request_access_input = z.object({
|
|
40
40
|
channel_id: ChannelId,
|
|
41
|
-
message: z.string().max(500).optional().describe("Optional note for the channel owner explaining why."),
|
|
42
41
|
});
|
|
43
42
|
|
|
44
43
|
const mIRC_leave_input = z.object({
|
|
45
44
|
channel_id: ChannelId,
|
|
46
45
|
});
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
// EF channel-members-manage reads `target_identity_id` (the normalizer below maps
|
|
48
|
+
// identity_id → target_identity_id). The old `request_id` field was ignored →
|
|
49
|
+
// 400 "target_identity_id required" on every approve/reject.
|
|
50
|
+
const mIRC_reject_request_input = z.object({
|
|
49
51
|
channel_id: ChannelId,
|
|
50
|
-
|
|
51
|
-
// identity_id → target_identity_id). The old `request_id` field was ignored →
|
|
52
|
-
// 400 "target_identity_id required" on every approve/reject.
|
|
53
|
-
identity_id: z.string().min(1).describe("Identity id of the requester to approve/reject (state=requested; from mIRC_list members). NOTE: approving an E2EE channel also needs a wrapped group key — LINEAR-3523."),
|
|
52
|
+
identity_id: z.string().min(1).describe("Identity id of the requester to reject (state=requested; from mIRC_list members)."),
|
|
54
53
|
});
|
|
55
54
|
|
|
56
|
-
const
|
|
55
|
+
const mIRC_approve_request_input = mIRC_reject_request_input.extend({
|
|
56
|
+
wrapped_group_key: z
|
|
57
|
+
.string()
|
|
58
|
+
.optional()
|
|
59
|
+
.describe(
|
|
60
|
+
"Required to approve a join to a password/private (E2EE) channel: the channel group key wrapped to the approved member's identity key. Without it the backend rejects the approval with a 'wrapped_group_key required' error. (Access requests only exist on non-open channels, so this is effectively always required.)",
|
|
61
|
+
),
|
|
62
|
+
});
|
|
57
63
|
|
|
58
64
|
const mIRC_kick_input = z.object({
|
|
59
65
|
channel_id: ChannelId,
|
|
60
66
|
identity_id: MemberIdentity,
|
|
61
|
-
|
|
67
|
+
// NOTE: a `reason` field used to be advertised here but channel-members-manage
|
|
68
|
+
// never persists it (no audit row on kick) — removed until the backend logs it
|
|
69
|
+
// (see consistency ticket) so the tool doesn't claim an audit trail it can't deliver.
|
|
62
70
|
});
|
|
63
71
|
|
|
64
72
|
const mIRC_ban_input = z.object({
|
|
65
73
|
channel_id: ChannelId,
|
|
66
74
|
identity_id: MemberIdentity,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
until
|
|
75
|
+
// NOTE: `reason` (no storage) and `until` (timed ban) were removed — the EF ban
|
|
76
|
+
// branch ignores both, so `until` produced a SILENT PERMANENT ban when a caller
|
|
77
|
+
// asked for a temporary one. Ban is permanent-until-unban; enforced temp-bans +
|
|
78
|
+
// ban audit are tracked in the consistency ticket.
|
|
70
79
|
});
|
|
71
80
|
|
|
72
81
|
const mIRC_unban_input = z.object({
|
|
@@ -121,7 +130,7 @@ export const mircMembersTools: MosaddTool[] = [
|
|
|
121
130
|
name: "mIRC_request_access",
|
|
122
131
|
requires: "network",
|
|
123
132
|
description:
|
|
124
|
-
"Request access to
|
|
133
|
+
"Request access to a password/private channel (your membership goes to state=requested for an admin to approve).",
|
|
125
134
|
inputSchema: mIRC_request_access_input,
|
|
126
135
|
handler: ((input, ctx) => invokeChannelMembers("request-access", input as Record<string, unknown>, ctx)) as MosaddTool["handler"],
|
|
127
136
|
},
|
|
@@ -135,7 +144,8 @@ export const mircMembersTools: MosaddTool[] = [
|
|
|
135
144
|
{
|
|
136
145
|
name: "mIRC_approve_request",
|
|
137
146
|
requires: "network",
|
|
138
|
-
description:
|
|
147
|
+
description:
|
|
148
|
+
"Approve a pending access request (state=requested → active). Admins / moderators / owner only. Because access requests only exist on E2EE (password/private) channels, you must pass wrapped_group_key — the channel group key wrapped to the approved member's identity key.",
|
|
139
149
|
inputSchema: mIRC_approve_request_input,
|
|
140
150
|
handler: ((input, ctx) => invokeChannelMembers("approve-request", input as Record<string, unknown>, ctx)) as MosaddTool["handler"],
|
|
141
151
|
},
|
|
@@ -150,7 +160,7 @@ export const mircMembersTools: MosaddTool[] = [
|
|
|
150
160
|
name: "mIRC_kick",
|
|
151
161
|
requires: "network",
|
|
152
162
|
description:
|
|
153
|
-
"Remove a member from the channel. They can rejoin if not banned. Requires moderator+.
|
|
163
|
+
"Remove a member from the channel. They can rejoin if not banned. Requires moderator+.",
|
|
154
164
|
inputSchema: mIRC_kick_input,
|
|
155
165
|
handler: ((input, ctx) => invokeChannelMembers("kick", input as Record<string, unknown>, ctx)) as MosaddTool["handler"],
|
|
156
166
|
},
|
|
@@ -158,7 +168,7 @@ export const mircMembersTools: MosaddTool[] = [
|
|
|
158
168
|
name: "mIRC_ban",
|
|
159
169
|
requires: "network",
|
|
160
170
|
description:
|
|
161
|
-
"Ban a member from the channel.
|
|
171
|
+
"Ban a member from the channel. The ban is permanent until you call mIRC_unban. Requires admin+.",
|
|
162
172
|
inputSchema: mIRC_ban_input,
|
|
163
173
|
handler: ((input, ctx) => invokeChannelMembers("ban", input as Record<string, unknown>, ctx)) as MosaddTool["handler"],
|
|
164
174
|
},
|
package/src/tools/mirc.ts
CHANGED
|
@@ -42,12 +42,20 @@ const mIRC_create_input = z.object({
|
|
|
42
42
|
access_mode: AccessMode.default("open"),
|
|
43
43
|
password: z.string().min(6).max(120).optional().describe("Password (only for access_mode=password)."),
|
|
44
44
|
capabilities: Capabilities,
|
|
45
|
+
wrapped_group_key: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe(
|
|
49
|
+
"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.",
|
|
50
|
+
),
|
|
45
51
|
});
|
|
46
52
|
|
|
47
53
|
const mIRC_list_input = z.object({
|
|
48
54
|
limit: z.number().int().min(1).max(500).default(100).optional(),
|
|
49
55
|
offset: z.number().int().min(0).default(0).optional(),
|
|
50
|
-
|
|
56
|
+
// NOTE: an access_mode filter was removed — channel-manage's list branch doesn't
|
|
57
|
+
// filter by it (it was a silent no-op). Filter client-side on the returned
|
|
58
|
+
// access_mode field. Server-side filtering is tracked in the consistency ticket.
|
|
51
59
|
});
|
|
52
60
|
|
|
53
61
|
const mIRC_get_input = z.object({
|
|
@@ -58,7 +66,9 @@ const mIRC_update_input = z.object({
|
|
|
58
66
|
channel_id: ChannelId,
|
|
59
67
|
name: z.string().min(1).max(80).optional(),
|
|
60
68
|
topic: z.string().max(500).optional(),
|
|
61
|
-
|
|
69
|
+
// NOTE: access_mode was removed — channel-manage's update branch ignores it, and
|
|
70
|
+
// switching an existing channel to/from an E2EE (password/private) mode needs
|
|
71
|
+
// group-key handling that isn't wired yet. Recreate the channel to change mode.
|
|
62
72
|
capabilities: Capabilities,
|
|
63
73
|
});
|
|
64
74
|
|
|
@@ -74,9 +84,13 @@ async function mIRC_create(
|
|
|
74
84
|
): Promise<{ channel: unknown }> {
|
|
75
85
|
readSupabaseEnv();
|
|
76
86
|
ctx.log("debug", "mIRC_create invoking channel-manage", { name: input.name });
|
|
87
|
+
// channel-manage reads `description`, not `topic` — map it so the channel
|
|
88
|
+
// topic isn't silently dropped on create (the update handler does the same).
|
|
89
|
+
const { topic, ...rest } = input as typeof input & { topic?: string };
|
|
90
|
+
const payload = topic !== undefined ? { ...rest, description: topic } : { ...rest };
|
|
77
91
|
return await invokeFunction<{ channel: unknown }>("channel-manage", {
|
|
78
92
|
action: "create",
|
|
79
|
-
...
|
|
93
|
+
...payload,
|
|
80
94
|
});
|
|
81
95
|
}
|
|
82
96
|
|
|
@@ -140,7 +154,7 @@ export const mircTools: MosaddTool[] = [
|
|
|
140
154
|
name: "mIRC_create",
|
|
141
155
|
requires: "network",
|
|
142
156
|
description:
|
|
143
|
-
"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).",
|
|
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.",
|
|
144
158
|
inputSchema: mIRC_create_input,
|
|
145
159
|
handler: mIRC_create as MosaddTool["handler"],
|
|
146
160
|
},
|
|
@@ -148,7 +162,7 @@ export const mircTools: MosaddTool[] = [
|
|
|
148
162
|
name: "mIRC_list",
|
|
149
163
|
requires: "network",
|
|
150
164
|
description:
|
|
151
|
-
"List channels available to the current user.
|
|
165
|
+
"List channels available to the current user.",
|
|
152
166
|
inputSchema: mIRC_list_input,
|
|
153
167
|
handler: mIRC_list as MosaddTool["handler"],
|
|
154
168
|
},
|
|
@@ -162,7 +176,7 @@ export const mircTools: MosaddTool[] = [
|
|
|
162
176
|
{
|
|
163
177
|
name: "mIRC_update",
|
|
164
178
|
requires: "network",
|
|
165
|
-
description: "Update channel metadata (name, topic,
|
|
179
|
+
description: "Update channel metadata (name, topic, capabilities). Owner only. Access mode is fixed at creation — recreate the channel to change it.",
|
|
166
180
|
inputSchema: mIRC_update_input,
|
|
167
181
|
handler: mIRC_update as MosaddTool["handler"],
|
|
168
182
|
},
|