@mosadd/mcp 3.0.0-alpha.19 → 3.0.0-alpha.20

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
+ ### Fixed
12
+ - **mIRC `reject_request` / `approve_request` field (LINEAR-3522):** the tools sent
13
+ `request_id` but `channel-members-manage` reads `target_identity_id` → 400 every
14
+ call. Renamed to `identity_id` (normalized to `target_identity_id`). `reject` now
15
+ works; `approve` of an E2EE channel still needs a wrapped group key (LINEAR-3523).
16
+ - **mDM / mIRC message pagination (LINEAR-3524):** `mDM_list` read `cursor`/`has_more`
17
+ but `message-list` history mode returns `next_before`, and `mIRC_list_messages`
18
+ sent `cursor` (ignored; EF reads `before`) and read `next_cursor` (never returned)
19
+ → neither paged past page 1. Send `before`, read `next_before`.
20
+
21
+ ## [3.0.0-alpha.19] — 2026-06-19
22
+
11
23
  ### Removed
12
24
  - **BREAKING — mROOM module killed (LINEAR-3414):** the 11 `mROOM_*` tools
13
25
  (`mROOM_create`, `mROOM_create_guest_link`, `mROOM_join`, `mROOM_leave`,
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-QUJGZUTE.js";
4
+ } from "../chunk-FZNAGICW.js";
5
5
  import {
6
6
  isSessionExpired,
7
7
  loadSession,
@@ -807,7 +807,10 @@ var mIRC_leave_input = z4.object({
807
807
  });
808
808
  var mIRC_approve_request_input = z4.object({
809
809
  channel_id: ChannelId2,
810
- request_id: z4.string().min(1).describe("Pending request id.")
810
+ // EF channel-members-manage reads `target_identity_id` (normalizer below maps
811
+ // identity_id → target_identity_id). The old `request_id` field was ignored →
812
+ // 400 "target_identity_id required" on every approve/reject.
813
+ identity_id: z4.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 \u2014 LINEAR-3523.")
811
814
  });
812
815
  var mIRC_reject_request_input = mIRC_approve_request_input;
813
816
  var mIRC_kick_input = z4.object({
@@ -996,7 +999,7 @@ async function mIRC_list_messages(input, ctx) {
996
999
  space_id,
997
1000
  thread_id,
998
1001
  limit: input.limit ?? 50,
999
- cursor: input.cursor
1002
+ before: input.cursor
1000
1003
  });
1001
1004
  return {
1002
1005
  messages: (data?.messages ?? []).map((m) => ({
@@ -1005,7 +1008,7 @@ async function mIRC_list_messages(input, ctx) {
1005
1008
  text: unpackPayload2(m.encrypted_payload).text,
1006
1009
  timestamp: m.created_at
1007
1010
  })),
1008
- next_cursor: data?.next_cursor ?? null
1011
+ next_cursor: data?.next_before ?? data?.cursor ?? null
1009
1012
  };
1010
1013
  }
1011
1014
  var mircMessagesTools = [
@@ -2200,7 +2203,8 @@ var SupabaseDmProvider = class {
2200
2203
  timestamp: m.created_at,
2201
2204
  threadId: m.thread_id
2202
2205
  })),
2203
- nextCursor: data?.has_more ? data?.cursor ?? null : null
2206
+ // history mode (`before`) returns `next_before`; incremental (`since`) returns `cursor`+`has_more`.
2207
+ nextCursor: data?.next_before ?? (data?.has_more ? data?.cursor ?? null : null)
2204
2208
  };
2205
2209
  }
2206
2210
  };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createMosaddServer,
4
4
  defaultProviders,
5
5
  runWithSupabaseEnv
6
- } from "./chunk-QUJGZUTE.js";
6
+ } from "./chunk-FZNAGICW.js";
7
7
  import "./chunk-Z7WR52GE.js";
8
8
  export {
9
9
  allTools,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mosadd/mcp",
3
- "version": "3.0.0-alpha.19",
3
+ "version": "3.0.0-alpha.20",
4
4
  "description": "Model Context Protocol server for mosadd. Exposes the 5 live m* modules (mDM, mIRC, mTALK, mp0st, mRAG) plus comms + threat tools — 64 tools — to any agent runtime (Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom).",
5
5
  "homepage": "https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp",
6
6
  "repository": {
@@ -37,9 +37,9 @@
37
37
  "@modelcontextprotocol/sdk": "^1.0.4",
38
38
  "@supabase/supabase-js": "^2.48.0",
39
39
  "zod": "^4.3.6",
40
+ "@mosadd/protocol": "3.0.0-alpha.4",
40
41
  "@mosadd/crypto": "3.0.0-alpha.4",
41
42
  "@mosadd/providers": "3.0.0-alpha.4",
42
- "@mosadd/protocol": "3.0.0-alpha.4",
43
43
  "@mosadd/threat-engine": "3.0.0-alpha.5"
44
44
  },
45
45
  "devDependencies": {
@@ -97,6 +97,7 @@ export class SupabaseDmProvider implements DmProvider {
97
97
  }>;
98
98
  cursor?: string | null;
99
99
  has_more?: boolean;
100
+ next_before?: string | null;
100
101
  };
101
102
  // message-list paginates history via `before` (a created_at marker) and returns
102
103
  // the next marker as `cursor` — NOT `cursor` in / `next_cursor` out.
@@ -114,7 +115,8 @@ export class SupabaseDmProvider implements DmProvider {
114
115
  timestamp: m.created_at,
115
116
  threadId: m.thread_id,
116
117
  })),
117
- nextCursor: data?.has_more ? (data?.cursor ?? null) : null,
118
+ // history mode (`before`) returns `next_before`; incremental (`since`) returns `cursor`+`has_more`.
119
+ nextCursor: data?.next_before ?? (data?.has_more ? (data?.cursor ?? null) : null),
118
120
  };
119
121
  }
120
122
  }
@@ -47,7 +47,10 @@ const mIRC_leave_input = z.object({
47
47
 
48
48
  const mIRC_approve_request_input = z.object({
49
49
  channel_id: ChannelId,
50
- request_id: z.string().min(1).describe("Pending request id."),
50
+ // EF channel-members-manage reads `target_identity_id` (normalizer below maps
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."),
51
54
  });
52
55
 
53
56
  const mIRC_reject_request_input = mIRC_approve_request_input;
@@ -116,13 +116,16 @@ async function mIRC_list_messages(
116
116
 
117
117
  type MessageListResponse = {
118
118
  messages?: Array<{ id: string; sender_identity_id: string; encrypted_payload: string; created_at: string }>;
119
- next_cursor?: string | null;
119
+ next_before?: string | null;
120
+ cursor?: string | null;
120
121
  };
122
+ // message-list reads `before` (history) / `since` (incremental) — NOT `cursor`.
123
+ // Sending `cursor` left `before` unset → every call returned the newest page.
121
124
  const data = await invokeFunction<MessageListResponse>("message-list", {
122
125
  space_id,
123
126
  thread_id,
124
127
  limit: input.limit ?? 50,
125
- cursor: input.cursor,
128
+ before: input.cursor,
126
129
  });
127
130
 
128
131
  return {
@@ -132,7 +135,7 @@ async function mIRC_list_messages(
132
135
  text: unpackPayload(m.encrypted_payload).text,
133
136
  timestamp: m.created_at,
134
137
  })),
135
- next_cursor: data?.next_cursor ?? null,
138
+ next_cursor: data?.next_before ?? data?.cursor ?? null,
136
139
  };
137
140
  }
138
141