@superdoc/mcp 1.12.0-next.11 → 1.12.0-next.12
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/dist/index.js +39 -6
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -31651,7 +31651,7 @@ var init_host = __esm(() => {
|
|
|
31651
31651
|
});
|
|
31652
31652
|
|
|
31653
31653
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
31654
|
-
var SDK_VERSION = "2.25.0-next.
|
|
31654
|
+
var SDK_VERSION = "2.25.0-next.12";
|
|
31655
31655
|
|
|
31656
31656
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
31657
31657
|
import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
|
|
@@ -487124,6 +487124,35 @@ var init_dist8 = __esm(() => {
|
|
|
487124
487124
|
});
|
|
487125
487125
|
|
|
487126
487126
|
// ../../../v2/collaboration-v2/dist/adapters/liveblocks-single-doc.js
|
|
487127
|
+
function wrapLiveblocksAwareness(awareness, room) {
|
|
487128
|
+
const listeners = new Set;
|
|
487129
|
+
let known = new Set(awareness.getStates().keys());
|
|
487130
|
+
const unsubscribe3 = room.events.others.subscribe((event) => {
|
|
487131
|
+
const current = new Set(awareness.getStates().keys());
|
|
487132
|
+
const removed = event.type === "reset" ? [...known].filter((clientId) => !current.has(clientId)) : [];
|
|
487133
|
+
known = current;
|
|
487134
|
+
if (removed.length === 0)
|
|
487135
|
+
return;
|
|
487136
|
+
for (const listener of [...listeners])
|
|
487137
|
+
listener({ added: [], updated: [], removed });
|
|
487138
|
+
});
|
|
487139
|
+
const source = {
|
|
487140
|
+
getLocalState: () => awareness.getLocalState(),
|
|
487141
|
+
setLocalState: (state) => awareness.setLocalState(state),
|
|
487142
|
+
getStates: () => awareness.getStates(),
|
|
487143
|
+
on(event, listener) {
|
|
487144
|
+
awareness.on(event, listener);
|
|
487145
|
+
if (event === "change")
|
|
487146
|
+
listeners.add(listener);
|
|
487147
|
+
},
|
|
487148
|
+
off(event, listener) {
|
|
487149
|
+
awareness.off(event, listener);
|
|
487150
|
+
if (event === "change")
|
|
487151
|
+
listeners.delete(listener);
|
|
487152
|
+
}
|
|
487153
|
+
};
|
|
487154
|
+
return wrapAwareness(source, unsubscribe3);
|
|
487155
|
+
}
|
|
487127
487156
|
function resolveClientPolyfills(configured) {
|
|
487128
487157
|
if (configured?.fetch)
|
|
487129
487158
|
return configured;
|
|
@@ -487163,6 +487192,7 @@ function createLiveblocksSingleDocAdapter(config2) {
|
|
|
487163
487192
|
const client = createClient(clientOptions);
|
|
487164
487193
|
let activeProvider = null;
|
|
487165
487194
|
let activeLeave = null;
|
|
487195
|
+
let activeRoom = null;
|
|
487166
487196
|
return createSDYjsSingleDocProvider({
|
|
487167
487197
|
capabilities: buildSingleDocCapabilities3(),
|
|
487168
487198
|
defaultSyncTimeoutMs: config2.defaultSyncTimeoutMs,
|
|
@@ -487172,6 +487202,7 @@ function createLiveblocksSingleDocAdapter(config2) {
|
|
|
487172
487202
|
const provider = new LiveblocksYjsProvider(room, ydoc);
|
|
487173
487203
|
activeProvider = provider;
|
|
487174
487204
|
activeLeave = leave;
|
|
487205
|
+
activeRoom = room;
|
|
487175
487206
|
let hasSynced = false;
|
|
487176
487207
|
const onSync = (synced) => {
|
|
487177
487208
|
if (synced) {
|
|
@@ -487216,6 +487247,7 @@ function createLiveblocksSingleDocAdapter(config2) {
|
|
|
487216
487247
|
if (activeProvider === provider) {
|
|
487217
487248
|
activeProvider = null;
|
|
487218
487249
|
activeLeave = null;
|
|
487250
|
+
activeRoom = null;
|
|
487219
487251
|
}
|
|
487220
487252
|
}
|
|
487221
487253
|
};
|
|
@@ -487225,9 +487257,9 @@ function createLiveblocksSingleDocAdapter(config2) {
|
|
|
487225
487257
|
if (!activeProvider)
|
|
487226
487258
|
return null;
|
|
487227
487259
|
const awareness = activeProvider.awareness;
|
|
487228
|
-
if (!awareness)
|
|
487260
|
+
if (!awareness || !activeRoom)
|
|
487229
487261
|
return null;
|
|
487230
|
-
return
|
|
487262
|
+
return wrapLiveblocksAwareness(awareness, activeRoom);
|
|
487231
487263
|
},
|
|
487232
487264
|
destroyProvider() {
|
|
487233
487265
|
if (activeProvider) {
|
|
@@ -487242,6 +487274,7 @@ function createLiveblocksSingleDocAdapter(config2) {
|
|
|
487242
487274
|
}
|
|
487243
487275
|
activeProvider = null;
|
|
487244
487276
|
activeLeave = null;
|
|
487277
|
+
activeRoom = null;
|
|
487245
487278
|
}
|
|
487246
487279
|
}
|
|
487247
487280
|
});
|
|
@@ -508439,7 +508472,7 @@ var init_projection = __esm(() => {
|
|
|
508439
508472
|
});
|
|
508440
508473
|
|
|
508441
508474
|
// ../../../v2/collaboration-v2/dist/presence/constants.js
|
|
508442
|
-
var PRESENCE_SCHEMA_VERSION = "1.0", PRESENCE_FIELD, PRESENCE_LIVENESS, PRESENCE_OPERATION_INTENT,
|
|
508475
|
+
var PRESENCE_SCHEMA_VERSION = "1.0", PRESENCE_FIELD, PRESENCE_LIVENESS, PRESENCE_OPERATION_INTENT, PRESENCE_PUBLISH_CAP_HZ = 20, PRESENCE_PUBLISH_WINDOW_MS, PRESENCE_COALESCE_WINDOW_MS = 40, PRESENCE_PAYLOAD_BUDGET_BYTES = 2048;
|
|
508443
508476
|
var init_constants9 = __esm(() => {
|
|
508444
508477
|
PRESENCE_FIELD = {
|
|
508445
508478
|
schemaVersion: "schemaVersion",
|
|
@@ -508678,7 +508711,7 @@ function createPresenceRuntime(options) {
|
|
|
508678
508711
|
const setTimer = options.setTimer ?? defaultTimer;
|
|
508679
508712
|
const clearTimer = options.clearTimer ?? defaultClear;
|
|
508680
508713
|
const coalesceWindow = options.coalesceWindowMs ?? PRESENCE_COALESCE_WINDOW_MS;
|
|
508681
|
-
const staleTtl = options.staleTtlMs
|
|
508714
|
+
const staleTtl = options.staleTtlMs;
|
|
508682
508715
|
const connectionId = options.connectionId ?? generateConnectionId();
|
|
508683
508716
|
const listeners = new Set;
|
|
508684
508717
|
const peerLastSeen = new Map;
|
|
@@ -508768,7 +508801,7 @@ function createPresenceRuntime(options) {
|
|
|
508768
508801
|
if (decoded.state.connectionId === connectionId)
|
|
508769
508802
|
continue;
|
|
508770
508803
|
const lastSeen = peerLastSeen.get(decoded.state.connectionId) ?? nowMs7;
|
|
508771
|
-
const livenessFromTtl = nowMs7 - lastSeen > staleTtl ? PRESENCE_LIVENESS.stale : decoded.state.state;
|
|
508804
|
+
const livenessFromTtl = staleTtl !== undefined && nowMs7 - lastSeen > staleTtl ? PRESENCE_LIVENESS.stale : decoded.state.state;
|
|
508772
508805
|
const selection = degradeSelectionIfUnloaded(decoded.state.selection ?? null, options.isStoryShardLoaded);
|
|
508773
508806
|
peers.push({ ...decoded.state, state: livenessFromTtl, selection });
|
|
508774
508807
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/mcp",
|
|
3
|
-
"version": "1.12.0-next.
|
|
3
|
+
"version": "1.12.0-next.12",
|
|
4
4
|
"description": "Model Context Protocol server for SuperDoc, giving an AI agent tools to read and edit .docx files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
27
|
-
"@superdoc/sdk": "2.25.0-next.
|
|
27
|
+
"@superdoc/sdk": "2.25.0-next.12",
|
|
28
28
|
"debug": "^4.4.3",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"superdoc": "2.28.0-next.
|
|
33
|
-
"@superdoc/docx-engine": "0.27.0-next.
|
|
32
|
+
"superdoc": "2.28.0-next.14",
|
|
33
|
+
"@superdoc/docx-engine": "0.27.0-next.13",
|
|
34
34
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
35
35
|
"@types/bun": "^1.3.8",
|
|
36
36
|
"@types/node": "22.19.2",
|