@blogmcp/sdk 0.10.1 → 0.11.0

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.
Files changed (53) hide show
  1. package/dist/community/channels.d.ts +3 -2
  2. package/dist/community/client.d.ts +129 -2
  3. package/dist/community/client.js +231 -161
  4. package/dist/community/forum.d.ts +82 -0
  5. package/dist/community/forum.js +96 -0
  6. package/dist/community/index.d.ts +14 -7
  7. package/dist/community/index.js +185 -121
  8. package/dist/community/links.d.ts +38 -0
  9. package/dist/community/links.js +98 -71
  10. package/dist/community/messages.cs.d.ts +160 -1
  11. package/dist/community/messages.cs.js +178 -1
  12. package/dist/community/messages.d.ts +19 -1
  13. package/dist/community/messages.en.d.ts +150 -1
  14. package/dist/community/messages.en.js +161 -1
  15. package/dist/community/messages.js +37 -28
  16. package/dist/community/outcome.d.ts +8 -3
  17. package/dist/community/outcome.js +61 -20
  18. package/dist/community/poll.d.ts +28 -4
  19. package/dist/community/poll.js +70 -47
  20. package/dist/community/realtime/index.d.ts +19 -3
  21. package/dist/community/realtime/index.js +175 -145
  22. package/dist/community/routes.d.ts +36 -1
  23. package/dist/community/routes.js +51 -21
  24. package/dist/community/server/bff.d.ts +25 -2
  25. package/dist/community/server/bff.js +135 -118
  26. package/dist/community/server/host-routes.d.ts +3 -0
  27. package/dist/community/server/host-routes.js +17 -0
  28. package/dist/community/server/index.d.ts +5 -1
  29. package/dist/community/shapes.d.ts +634 -7
  30. package/dist/community/shapes.js +92 -61
  31. package/dist/community/store.d.ts +15 -0
  32. package/dist/community/store.js +65 -61
  33. package/dist/community/topic.d.ts +173 -0
  34. package/dist/community/topic.js +225 -0
  35. package/package.json +3 -3
  36. package/src/community/channels.ts +3 -2
  37. package/src/community/client.ts +209 -5
  38. package/src/community/forum.ts +209 -0
  39. package/src/community/index.ts +146 -2
  40. package/src/community/links.ts +64 -4
  41. package/src/community/messages.cs.ts +179 -1
  42. package/src/community/messages.en.ts +162 -1
  43. package/src/community/messages.ts +25 -2
  44. package/src/community/outcome.ts +47 -1
  45. package/src/community/poll.ts +79 -17
  46. package/src/community/realtime/index.ts +124 -48
  47. package/src/community/routes.ts +42 -1
  48. package/src/community/server/bff.ts +89 -30
  49. package/src/community/server/host-routes.ts +20 -0
  50. package/src/community/server/index.ts +5 -1
  51. package/src/community/shapes.ts +662 -6
  52. package/src/community/store.ts +11 -5
  53. package/src/community/topic.ts +521 -0
@@ -0,0 +1,173 @@
1
+ /**
2
+ * One forum topic as an immutable two-level tree (m3-contracts.md §5.2, §3.2): the discussion store
3
+ * (createDiscussionStore) under the topic's header. A topic IS a discussion — a `community.conversations` row whose
4
+ * opening post is seq 1 and whose replies are two levels deep, as under an article — so every rule of the
5
+ * discussion store holds unchanged: the cursor pages, the optimistic writes under a `clientMsgId`, the viewer's
6
+ * blocks, the open enums (a message of an unknown author kind or state is skipped), and M2's live updates by `rev`
7
+ * with their `resync` (m2-contracts.md §3.5).
8
+ *
9
+ * What the topic adds:
10
+ * applyPage a `forum/topics/get` page: the messages as a discussion page, the header (`topic`) and the viewer's
11
+ * `moderator` beside them — one change, one notification;
12
+ * applyTopic a newer header of the topic shown: the answer of a title edit (`messages/edit { title }`), of a
13
+ * moderator's lock, move or pin, or a follow's new `following`;
14
+ * applyHead a `forum/topics/head` answer (pollTopicHead): true when newer than what is loaded (→ refreshTopic);
15
+ * applyEvent a `disc:<conversationId>` publication, as the discussion store applies it — and `resync` after a
16
+ * change of the opening post (seq 1), whose title travels in the header, not in the message;
17
+ * the opening post's own delete (its `confirm`) clears the header's title, as the database does („Smazané téma").
18
+ *
19
+ * A null title is not always a deletion (m3-contracts.md §3.1, B06): kb-api withholds it from a viewer while the opening
20
+ * post is held, removed or held back and a reply keeps the topic readable — topicTitleOf tells the two apart by the
21
+ * opening post's state, and a re-read (a resync, a released hold) may bring the title back.
22
+ *
23
+ * A write addressed by the topic's conversation id that comes back `notFound` may be any refusal of the forum's gate
24
+ * (A11): settleTopicFailure re-reads the topic, whose answer names the surface's own code.
25
+ *
26
+ * One store may show one topic after another (reset(), or a page of another topic); an answer that outlives the
27
+ * switch changes nothing, exactly as in the discussion store.
28
+ */
29
+ import type { CommunityCallOptions, CommunityClient } from './client.js';
30
+ import type { CommunityFailure, CommunityOutcome } from './outcome.js';
31
+ import { type ForumTopicItem, type KnownAuthor, type KnownMessageState, type ReactionSummary, type RealtimeEvent, type Topic, type TopicHead, type TopicState, type TopicThread } from './shapes.js';
32
+ import { type DiscussionMessage, type DiscussionViewer, type MessageChange, type RealtimeEventOutcome } from './store.js';
33
+ /** The topic's header as the store keeps it: a known author (a deleted member's placeholder otherwise). */
34
+ export interface TopicHeader {
35
+ readonly conversationId: string;
36
+ /** The category the topic lives in (it follows a move); null when kb-api named none. */
37
+ readonly category: {
38
+ readonly id: string;
39
+ readonly slug: string;
40
+ readonly name: string;
41
+ } | null;
42
+ /**
43
+ * null once the opening post was deleted, or while kb-api withholds it from the viewer (§3.1): render it through
44
+ * topicTitleOf — „Smazané téma" (`topic.deleted`) for a deleted opening post, `topic.withheld` otherwise.
45
+ */
46
+ readonly title: string | null;
47
+ readonly state: TopicState;
48
+ readonly pinned: boolean;
49
+ readonly createdAt: string;
50
+ readonly author: KnownAuthor;
51
+ /** The viewer follows the topic. */
52
+ readonly following: boolean;
53
+ }
54
+ /** The viewer of a topic: the discussion's viewer, and whether they moderate the topic's category. */
55
+ export interface TopicViewer extends DiscussionViewer {
56
+ readonly moderator: boolean;
57
+ }
58
+ export interface TopicStoreState {
59
+ /** The topic shown (as kb-api answers it), or null before the first page. */
60
+ readonly conversationId: string | null;
61
+ /** Its header, or null before the first page. */
62
+ readonly topic: TopicHeader | null;
63
+ /** The messages everyone is shown. */
64
+ readonly count: number;
65
+ readonly lastSeq: number;
66
+ readonly lastChangeAt: string | null;
67
+ /** The loaded top-level messages, oldest first (the opening post is seq 1); an optimistic post comes last. */
68
+ readonly messages: readonly DiscussionMessage[];
69
+ /**
70
+ * The opening post's state as the store has it — its loaded row's (a placeholder's for another member), or
71
+ * `deleted` once the viewer's own delete of it was confirmed (a tombstone without replies leaves the list) — or null
72
+ * while it is not loaded. topicTitleOf reads a missing title by it.
73
+ */
74
+ readonly openingState: KnownMessageState | null;
75
+ /** Where „load more" continues, or null when the end is loaded. */
76
+ readonly nextCursor: number | null;
77
+ readonly reactionSet: readonly string[];
78
+ readonly preset: string | null;
79
+ readonly viewer: TopicViewer;
80
+ /** A page was applied. */
81
+ readonly loaded: boolean;
82
+ /** A head newer than the loaded pages arrived: refresh. */
83
+ readonly stale: boolean;
84
+ }
85
+ export interface TopicStore {
86
+ getState(): TopicStoreState;
87
+ /** Called after every change with the new state; returns the unsubscribe. */
88
+ subscribe(listener: (state: TopicStoreState) => void): () => void;
89
+ /** A page of `forum/topics/get`; `cursor` is the one it was asked with (null or absent: the first page). */
90
+ applyPage(page: TopicThread, options?: {
91
+ cursor?: number | null;
92
+ }): void;
93
+ /** A newer header of the topic shown (another topic's is ignored). */
94
+ applyTopic(topic: Topic): void;
95
+ /** An optimistic post (`replyToSeq` for a reply), edit or delete, and how it settles — as the discussion store. */
96
+ applyMessage(change: MessageChange): void;
97
+ /** True when the head is newer than the loaded pages (the state turns `stale`): refresh. */
98
+ applyHead(head: TopicHead): boolean;
99
+ /** A message's reaction summary (a topic has no reactions of its own: the opening post's are seq 1's). */
100
+ applyReaction(target: {
101
+ readonly conversationId: string;
102
+ readonly seq: number;
103
+ }, reactions: ReactionSummary): void;
104
+ /** The viewer blocked (true) or unblocked (false) a member. */
105
+ collapse(memberId: string, blocked: boolean): void;
106
+ /** A publication of the topic's `disc:` channel (`@blogmcp/sdk/community/realtime` hands each one over). */
107
+ applyEvent(event: RealtimeEvent): RealtimeEventOutcome;
108
+ /** Back to the empty state (another topic); the answers still on their way are dropped when they come. */
109
+ reset(): void;
110
+ }
111
+ /** kb-api's topic as the store keeps it, or null without a conversation id (no topic to show). */
112
+ export declare function topicHeaderOf(raw: unknown): TopicHeader | null;
113
+ export declare function createTopicStore(): TopicStore;
114
+ /**
115
+ * Whether the topic takes new messages: an `open` topic. `locked` and `archived` do not (TOPIC_LOCKED), and neither
116
+ * does a state this SDK does not know — offer no composer; kb-api's `viewer.canPost` still has the last word.
117
+ */
118
+ export declare function isTopicOpen(topic: Pick<TopicHeader, 'state'> | Pick<Topic, 'state'> | null | undefined): boolean;
119
+ /**
120
+ * How a topic's title reads (m3-contracts.md §3.1, §3.2, §5.2; B06): `shown` with its text; `deleted` — the opening
121
+ * post was deleted and its title went with it („Smazané téma", `topic.deleted`); `withheld` — kb-api keeps the title
122
+ * from this viewer while the opening post is held, removed or held back (`topic.withheld`). A null title is never read
123
+ * as a deletion without the opening post's own word for it.
124
+ */
125
+ export type TopicTitle = {
126
+ readonly kind: 'shown';
127
+ readonly text: string;
128
+ } | {
129
+ readonly kind: 'deleted';
130
+ } | {
131
+ readonly kind: 'withheld';
132
+ };
133
+ /**
134
+ * The title of a topic as it reads — from a topic store's state (its header's title, and its opening post, seq 1, for
135
+ * why a title is missing) or from anything that carries `title` and `openingState`: a category's row, a forum search
136
+ * hit, a moderator's package item of an opening post (M3 FX2, S12). `withheld` for anything else.
137
+ */
138
+ export declare function topicTitleOf(source: TopicStoreState | Pick<ForumTopicItem, 'title' | 'openingState'> | null | undefined): TopicTitle;
139
+ type TopicClient = Pick<CommunityClient, 'forum'>;
140
+ /**
141
+ * Loads the topic, or brings the loaded pages up to date (after a newer head, a `resync`): the first page, then the
142
+ * next ones until the pages loaded before are covered — refreshDiscussion's rules over `forum/topics/get`. The first
143
+ * failure is the outcome (`membersOnly` for a viewer the forum is not open to, `notFound` for a topic they may not
144
+ * see); a page that comes back after the store moved on (reset(), another topic) is not applied.
145
+ */
146
+ export declare function refreshTopic(store: TopicStore, client: TopicClient, input: {
147
+ conversationId: string;
148
+ languageCode?: string | null;
149
+ }, options?: CommunityCallOptions): Promise<CommunityOutcome<TopicStoreState>>;
150
+ /** The next page after the loaded ones („load more"), as loadMoreDiscussion. */
151
+ export declare function loadMoreTopic(store: TopicStore, client: TopicClient, input: {
152
+ conversationId: string;
153
+ languageCode?: string | null;
154
+ }, options?: CommunityCallOptions): Promise<CommunityOutcome<TopicStoreState>>;
155
+ /**
156
+ * What a refused write addressed by the topic's conversation id means (m3-contracts.md §3.1, §5.2; A11). kb-api answers
157
+ * every refusal of the forum's gate on such an operation — the forum switched off, the module dark, a viewer the forum
158
+ * is not open to, a topic the viewer may no longer see — as the one `notFound` an unknown id gets, so a `notFound`
159
+ * re-reads the topic (refreshTopic): its refusal is the surface's own code (`surfaceOff`, `unavailable` for a dark
160
+ * module, `membersOnly` with its `needs`, `notFound` for the topic itself). A topic that reads fine keeps the write's
161
+ * own `notFound` — the message it named is gone, and the store now shows the topic as it is. Any other refusal comes
162
+ * back as it is, nothing read.
163
+ */
164
+ export declare function settleTopicFailure(store: TopicStore, client: TopicClient, input: {
165
+ conversationId: string;
166
+ languageCode?: string | null;
167
+ }, failure: CommunityFailure, options?: CommunityCallOptions): Promise<CommunityFailure>;
168
+ /**
169
+ * Whether a store is a topic store (its own `applyTopic`) — how `@blogmcp/sdk/community/realtime` tells a topic from
170
+ * an article discussion. Structural on purpose: a store from another copy of the SDK counts too.
171
+ */
172
+ export declare function isTopicStore(store: unknown): store is TopicStore;
173
+ export {};
@@ -0,0 +1,225 @@
1
+ import { isKnownTopicState as _ } from "./shapes.js";
2
+ import { createDiscussionStore as F, authorOf as M, placeOf as G } from "./store.js";
3
+ const a = (e) => typeof e == "object" && e !== null && !Array.isArray(e), g = (e) => typeof e == "string" ? e : null, J = Object.freeze({ counts: Object.freeze({}), mine: null }), W = Object.freeze({
4
+ kind: "member",
5
+ memberId: null,
6
+ handle: null,
7
+ displayName: null,
8
+ avatarPreset: null,
9
+ deleted: !0
10
+ });
11
+ function K(e) {
12
+ if (!a(e)) return null;
13
+ const n = g(e.id), r = g(e.slug), s = g(e.name);
14
+ return n === null || r === null || s === null ? null : Object.freeze({ id: n, slug: r, name: s });
15
+ }
16
+ function A(e) {
17
+ if (!a(e)) return null;
18
+ const n = g(e.conversationId);
19
+ return n === null || n === "" ? null : Object.freeze({
20
+ conversationId: n,
21
+ category: K(e.category),
22
+ title: g(e.title),
23
+ // An open enum: an unknown state is kept as kb-api sent it (isTopicOpen reads it as closed).
24
+ state: g(e.state) ?? "open",
25
+ pinned: e.pinned === !0,
26
+ createdAt: g(e.createdAt) ?? "",
27
+ author: M(e.author) ?? W,
28
+ following: e.following === !0
29
+ });
30
+ }
31
+ const Q = (e, n) => e === n || e !== null && n !== null && e.id === n.id && e.slug === n.slug && e.name === n.name, U = (e, n) => JSON.stringify(e) === JSON.stringify(n);
32
+ function T(e, n) {
33
+ return e === n ? !0 : e === null || n === null ? !1 : e.conversationId === n.conversationId && e.title === n.title && e.state === n.state && e.pinned === n.pinned && e.createdAt === n.createdAt && e.following === n.following && Q(e.category, n.category) && U(e.author, n.author);
34
+ }
35
+ const v = 1, E = /* @__PURE__ */ new WeakMap();
36
+ function ee() {
37
+ const e = F();
38
+ let n = null, r = !1, s = !1;
39
+ const c = /* @__PURE__ */ new Set();
40
+ let i = null, u = null;
41
+ const d = (t) => {
42
+ if (u && u.from === t && u.moderator === r) return u.viewer;
43
+ const o = Object.freeze({ ...t, moderator: r });
44
+ return u = { from: t, moderator: r, viewer: o }, o;
45
+ }, m = () => {
46
+ const t = e.getState();
47
+ if (i && i.from === t && i.header === n && i.moderator === r && i.openingDeleted === s) return i.state;
48
+ const o = t.messages.find((y) => y.seq === v), l = Object.freeze({
49
+ conversationId: t.loaded ? t.conversationId : null,
50
+ topic: t.loaded ? n : null,
51
+ count: t.count,
52
+ lastSeq: t.lastSeq,
53
+ lastChangeAt: t.lastChangeAt,
54
+ messages: t.messages,
55
+ openingState: o ? o.state : s && t.loaded ? "deleted" : null,
56
+ nextCursor: t.nextCursor,
57
+ reactionSet: t.reactionSet,
58
+ preset: t.preset,
59
+ viewer: d(t.viewer),
60
+ loaded: t.loaded,
61
+ stale: t.stale
62
+ });
63
+ return i = { from: t, header: n, moderator: r, openingDeleted: s, state: l }, l;
64
+ };
65
+ let p = m(), f = !1;
66
+ const I = () => {
67
+ if (f) return;
68
+ const t = m();
69
+ if (t !== p) {
70
+ p = t;
71
+ for (const o of [...c])
72
+ try {
73
+ o(t);
74
+ } catch {
75
+ }
76
+ }
77
+ };
78
+ e.subscribe(I);
79
+ const S = (t) => {
80
+ f = !0;
81
+ try {
82
+ return t();
83
+ } finally {
84
+ f = !1, I();
85
+ }
86
+ }, O = () => e.getState().articleId;
87
+ function q(t, o = {}) {
88
+ if (!a(t)) return;
89
+ const l = A(t.topic);
90
+ if (l === null) return;
91
+ const y = l.conversationId.toLowerCase(), P = {
92
+ articleId: y,
93
+ conversationId: l.conversationId,
94
+ count: t.count,
95
+ lastSeq: t.lastSeq,
96
+ lastChangeAt: t.lastChangeAt,
97
+ messages: t.messages,
98
+ nextCursor: t.nextCursor,
99
+ articleReactions: J,
100
+ reactionSet: t.reactionSet,
101
+ preset: t.preset,
102
+ viewer: t.viewer
103
+ };
104
+ S(() => {
105
+ const R = O() !== y, L = Array.isArray(t.messages) && t.messages.some((k) => a(k) && k.seq === v);
106
+ (R || L) && (s = !1), T(n, l) || (n = l), r = a(t.viewer) && t.viewer.moderator === !0, e.applyPage(P, o);
107
+ });
108
+ }
109
+ function j(t) {
110
+ const o = A(t), l = O();
111
+ o === null || l === null || o.conversationId.toLowerCase() !== l || T(n, o) || (n = o, I());
112
+ }
113
+ function x() {
114
+ s = !0, !(n === null || n.title === null) && (n = Object.freeze({ ...n, title: null }));
115
+ }
116
+ function z(t) {
117
+ a(t) && S(() => {
118
+ const o = e.getState();
119
+ if (e.applyMessage(t), t.type !== "confirm" || e.getState() === o) return;
120
+ const l = a(t.message) ? t.message : null;
121
+ l !== null && l.seq === v && l.state === "deleted" && x();
122
+ });
123
+ }
124
+ function D(t) {
125
+ if (!a(t) || typeof t.conversationId != "string") return !1;
126
+ const o = { articleId: t.conversationId, count: t.count, lastSeq: t.lastSeq, lastChangeAt: t.lastChangeAt };
127
+ return e.applyHead(o);
128
+ }
129
+ function H(t, o) {
130
+ !a(t) || typeof t.conversationId != "string" || e.applyReaction({ conversationId: t.conversationId, seq: t.seq }, o);
131
+ }
132
+ function N(t) {
133
+ if (!a(t) || t.kind === "reaction" && t.seq === void 0) return "dropped";
134
+ const o = S(() => e.applyEvent(t)), l = a(t.message) ? t.message : null, y = l !== null && l.seq === v && (t.kind === "edit" || t.kind === "delete" || t.kind === "message");
135
+ return o === "applied" && y ? "resync" : o;
136
+ }
137
+ const C = {
138
+ getState: m,
139
+ subscribe(t) {
140
+ return c.add(t), () => {
141
+ c.delete(t);
142
+ };
143
+ },
144
+ applyPage: q,
145
+ applyTopic: j,
146
+ applyMessage: z,
147
+ applyHead: D,
148
+ applyReaction: H,
149
+ collapse: (t, o) => e.collapse(t, o),
150
+ applyEvent: N,
151
+ reset() {
152
+ S(() => {
153
+ n = null, r = !1, s = !1, e.reset();
154
+ });
155
+ }
156
+ };
157
+ return E.set(C, e), C;
158
+ }
159
+ function te(e) {
160
+ return e != null && _(e.state) && e.state === "open";
161
+ }
162
+ const X = Object.freeze({ kind: "deleted" }), w = Object.freeze({ kind: "withheld" });
163
+ function h(e, n) {
164
+ return typeof e == "string" && e.trim() !== "" ? Object.freeze({ kind: "shown", text: e }) : n === "deleted" ? X : w;
165
+ }
166
+ function ne(e) {
167
+ if (!a(e)) return w;
168
+ if ("messages" in e && "topic" in e) {
169
+ const { topic: r, openingState: s } = e;
170
+ return h(a(r) ? r.title : null, s);
171
+ }
172
+ const n = e;
173
+ return h(n.title, n.openingState);
174
+ }
175
+ const B = 20;
176
+ function b(e) {
177
+ const n = E.get(e);
178
+ if (n) return G(n);
179
+ let r = e.getState().conversationId;
180
+ return {
181
+ moved: () => e.getState().conversationId !== r,
182
+ mark() {
183
+ r = e.getState().conversationId;
184
+ }
185
+ };
186
+ }
187
+ const V = (e) => typeof e == "number" && Number.isFinite(e) ? e : null;
188
+ async function Y(e, n, r, s) {
189
+ const c = e.getState(), i = c.loaded ? c.nextCursor : 0, u = b(e);
190
+ let d = null;
191
+ for (let m = 0; m < B; m++) {
192
+ const p = await n.forum.topics.get({ conversationId: r.conversationId, languageCode: r.languageCode ?? null, cursor: d }, s);
193
+ if (!p.ok) return p;
194
+ if (u.moved()) break;
195
+ e.applyPage(p.value, { cursor: d }), u.mark();
196
+ const f = V(p.value.nextCursor);
197
+ if (f === null || i !== null && f >= i || d !== null && f <= d) break;
198
+ d = f;
199
+ }
200
+ return { ok: !0, value: e.getState() };
201
+ }
202
+ async function oe(e, n, r, s) {
203
+ const c = e.getState().nextCursor;
204
+ if (c === null) return { ok: !0, value: e.getState() };
205
+ const i = b(e), u = await n.forum.topics.get({ conversationId: r.conversationId, languageCode: r.languageCode ?? null, cursor: c }, s);
206
+ return u.ok ? (i.moved() || e.applyPage(u.value, { cursor: c }), { ok: !0, value: e.getState() }) : u;
207
+ }
208
+ async function re(e, n, r, s, c) {
209
+ if (s.code !== "notFound") return s;
210
+ const i = await Y(e, n, r, c);
211
+ return i.ok ? s : i;
212
+ }
213
+ function se(e) {
214
+ return a(e) && typeof e.applyTopic == "function" && typeof e.getState == "function";
215
+ }
216
+ export {
217
+ ee as createTopicStore,
218
+ te as isTopicOpen,
219
+ se as isTopicStore,
220
+ oe as loadMoreTopic,
221
+ Y as refreshTopic,
222
+ re as settleTopicFailure,
223
+ A as topicHeaderOf,
224
+ ne as topicTitleOf
225
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/sdk",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Headless SDK for Knowledge Base blog — core client, Vue composables, Nuxt adapter",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -98,8 +98,8 @@
98
98
  }
99
99
  },
100
100
  "dependencies": {
101
- "@blogmcp/mdx-schema": "^0.10.1",
102
- "@blogmcp/sanitize": "^0.10.1",
101
+ "@blogmcp/mdx-schema": "^0.11.0",
102
+ "@blogmcp/sanitize": "^0.11.0",
103
103
  "marked": "^15.0.7"
104
104
  },
105
105
  "optionalDependencies": {
@@ -4,8 +4,9 @@
4
4
  * before anything used them.
5
5
  *
6
6
  * `disc:<conversationId>` carries a public discussion's projection (`@blogmcp/sdk/community/realtime` subscribes to
7
- * it); `user:` is reserved for the member's own inbox of the private surfaces (ids and codes only, invariant 6) —
8
- * nothing mints a token for it in M2.
7
+ * it) — M3: a forum topic's too, its token minted for an onboarded member or an interactive team session only
8
+ * (m3-contracts.md §3.5). `user:` is reserved for the member's own inbox of the private surfaces (ids and codes only,
9
+ * invariant 6) — nothing mints a token for it in M2.
9
10
  */
10
11
  export const COMMUNITY_CHANNELS = Object.freeze({
11
12
  discussion: (conversationId: string): string => `disc:${conversationId}`,