@superdoc/mcp 1.12.0-next.13 → 1.12.0-next.14
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 +15 -12
- 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.14";
|
|
31655
31655
|
|
|
31656
31656
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
31657
31657
|
import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
|
|
@@ -149412,7 +149412,7 @@ function* buildLogicalCatalogWork(raw, replacementMode, partXmlByUri, splitLinea
|
|
|
149412
149412
|
}
|
|
149413
149413
|
}
|
|
149414
149414
|
function buildLogicalCatalogWithLookupContext(lookupContext, raw, replacementMode, partXmlByUri, splitLineage, options = {}) {
|
|
149415
|
-
return
|
|
149415
|
+
return buildLogicalCatalog(raw, replacementMode, partXmlByUri, splitLineage, options, lookupContext);
|
|
149416
149416
|
}
|
|
149417
149417
|
function* buildLogicalCatalogWithLookupContextWork(lookupContext, raw, replacementMode, partXmlByUri, splitLineage, options = {}) {
|
|
149418
149418
|
const byId = new Map;
|
|
@@ -150183,8 +150183,8 @@ function proveTrackedCarrierRefinementLocalityWithLookupContext(lookupContext, i
|
|
|
150183
150183
|
return false;
|
|
150184
150184
|
const beforePartXml = new Map([[input.partUri, proof.before.paragraphXml]]);
|
|
150185
150185
|
const afterPartXml = new Map([[input.partUri, proof.after.paragraphXml]]);
|
|
150186
|
-
const beforeLogical = buildLogicalCatalogWithLookupContext(lookupContext, before, input.replacementMode, beforePartXml);
|
|
150187
|
-
const afterLogical = buildLogicalCatalogWithLookupContext(lookupContext, after, input.replacementMode, afterPartXml);
|
|
150186
|
+
const beforeLogical = buildLogicalCatalogWithLookupContext(lookupContext, before, input.replacementMode, beforePartXml, undefined, { partNamespaceBindings: new Map([[input.partUri, input.namespaceBindings ?? {}]]) });
|
|
150187
|
+
const afterLogical = buildLogicalCatalogWithLookupContext(lookupContext, after, input.replacementMode, afterPartXml, undefined, { partNamespaceBindings: new Map([[input.partUri, input.namespaceBindings ?? {}]]) });
|
|
150188
150188
|
const beforeId = beforeLogical.rsidToLogicalId.get(proof.rsid);
|
|
150189
150189
|
const afterId = afterLogical.rsidToLogicalId.get(proof.rsid);
|
|
150190
150190
|
if (!beforeId || beforeId !== afterId || beforeLogical.byId.size !== afterLogical.byId.size || [...beforeLogical.byId.keys()].some((id) => !afterLogical.byId.has(id)))
|
|
@@ -150248,8 +150248,8 @@ function buildTrackedCarrierRefinementLogicalEntryWithLookupContext(lookupContex
|
|
|
150248
150248
|
}
|
|
150249
150249
|
const beforePartXml = new Map([[input.partUri, proof.before.paragraphXml]]);
|
|
150250
150250
|
const afterPartXml = new Map([[input.partUri, proof.after.paragraphXml]]);
|
|
150251
|
-
const beforeLogical = buildLogicalCatalogWithLookupContext(lookupContext, before, input.replacementMode, beforePartXml);
|
|
150252
|
-
const afterLogical = buildLogicalCatalogWithLookupContext(lookupContext, after, input.replacementMode, afterPartXml);
|
|
150251
|
+
const beforeLogical = buildLogicalCatalogWithLookupContext(lookupContext, before, input.replacementMode, beforePartXml, undefined, { partNamespaceBindings: new Map([[input.partUri, input.namespaceBindings ?? {}]]) });
|
|
150252
|
+
const afterLogical = buildLogicalCatalogWithLookupContext(lookupContext, after, input.replacementMode, afterPartXml, undefined, { partNamespaceBindings: new Map([[input.partUri, input.namespaceBindings ?? {}]]) });
|
|
150253
150253
|
enrichLogicalChangeExcerpts(beforeLogical, beforePartXml);
|
|
150254
150254
|
enrichLogicalChangeExcerpts(afterLogical, afterPartXml);
|
|
150255
150255
|
const beforeId = beforeLogical.rsidToLogicalId.get(proof.rsid);
|
|
@@ -150359,7 +150359,7 @@ function buildIsolatedTrackedTextLogicalEntryWithLookupContext(lookupContext, in
|
|
|
150359
150359
|
if (fragments.length !== 1 || fragments[0].kind !== "ins" || fragments[0].rsid !== input.rsid || catalogHasUnsupportedLocalRefinement(raw))
|
|
150360
150360
|
return null;
|
|
150361
150361
|
const partXmlByUri = new Map([[input.partUri, input.paragraphXml]]);
|
|
150362
|
-
const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, partXmlByUri);
|
|
150362
|
+
const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, partXmlByUri, undefined, { partNamespaceBindings: new Map([[input.partUri, input.namespaceBindings ?? {}]]) });
|
|
150363
150363
|
enrichLogicalChangeExcerpts(logical, partXmlByUri);
|
|
150364
150364
|
const logicalId = logical.rsidToLogicalId.get(input.rsid);
|
|
150365
150365
|
const entry = logicalId ? logical.byId.get(logicalId) : undefined;
|
|
@@ -150401,7 +150401,7 @@ function buildIsolatedTrackedTextReplacementLogicalEntryWithLookupContext(lookup
|
|
|
150401
150401
|
if (catalogHasUnsupportedLocalRefinement(raw))
|
|
150402
150402
|
return null;
|
|
150403
150403
|
const partXmlByUri = new Map([[input.partUri, input.paragraphXml]]);
|
|
150404
|
-
const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, partXmlByUri);
|
|
150404
|
+
const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, partXmlByUri, undefined, { partNamespaceBindings: new Map([[input.partUri, input.namespaceBindings ?? {}]]) });
|
|
150405
150405
|
enrichLogicalChangeExcerpts(logical, partXmlByUri);
|
|
150406
150406
|
const logicalIds = expectedRsids.map((rsid) => logical.rsidToLogicalId.get(rsid));
|
|
150407
150407
|
const logicalId = logicalIds[0];
|
|
@@ -150468,7 +150468,7 @@ function buildBoundedTrackedParagraphRangeReceiptProjection(input) {
|
|
|
150468
150468
|
const mark = structural[0];
|
|
150469
150469
|
if (structural.length !== 1 || !mark || mark.structuralKind !== "paragraph-mark-insertion" || mark.fullParagraphInsertion === true || raw.formattingByKey.size || raw.unsupportedByStory.size)
|
|
150470
150470
|
return null;
|
|
150471
|
-
const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, new Map([[input.partUri, xml]]));
|
|
150471
|
+
const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, new Map([[input.partUri, xml]]), undefined, { partNamespaceBindings: new Map([[input.partUri, namespaceBindings]]) });
|
|
150472
150472
|
const id = input.wordId === mark.wId ? logical.structuralKeyToLogicalId.get(mark.entityKey) : input.rsids?.length ? logical.rsidToLogicalId.get(input.rsids[0]) : undefined;
|
|
150473
150473
|
const entry = id ? logical.byId.get(id) : undefined;
|
|
150474
150474
|
if (!entry || entry.type !== "insertion" || entry.subtype !== "text-insertion" || entry.reviewGroup?.kind !== "word-inserted-paragraph-range" || entry.reviewGroup.role !== "parent" || entry.subsumption || entry.overlap || entry.movePair || entry.structuralFragments.length !== 1 || input.rsids?.some((rsid) => logical.rsidToLogicalId.get(rsid) !== id))
|
|
@@ -153968,7 +153968,7 @@ function* enrichLogicalChangeExcerptsWork(catalog, partXmlByUri) {
|
|
|
153968
153968
|
const textFragments = logical.textboxAlternateContentPairing?.state === "paired" ? logical.fragments.slice(0, 1) : logical.fragments;
|
|
153969
153969
|
for (const fragment2 of textFragments) {
|
|
153970
153970
|
const visible = extractScopedReviewText(catalog, logical.partUri, xml, fragment2.byteStart, fragment2.byteEnd, fragment2.kind, () => {
|
|
153971
|
-
const parsed = collectXmlElementRanges(xml, { fragment:
|
|
153971
|
+
const parsed = collectXmlElementRanges(xml, { fragment: !/^<\?xml\s/.test(xml), additionalNamespaces: { w: NS_W } });
|
|
153972
153972
|
return parsed.errors.length ? [] : parsed.ranges;
|
|
153973
153973
|
});
|
|
153974
153974
|
if (visible.length === 0 && logical.subtype === "move-image") {
|
|
@@ -154114,7 +154114,7 @@ function retainRequiredExcerptNamespaces(catalog, partXmlByUri, issued2, partNam
|
|
|
154114
154114
|
const source = issued2.get(partUri);
|
|
154115
154115
|
let ranges = source?.xml === xml ? source.ranges : null;
|
|
154116
154116
|
if (!ranges) {
|
|
154117
|
-
const parsed = collectXmlElementRanges(xml, { fragment:
|
|
154117
|
+
const parsed = collectXmlElementRanges(xml, { fragment: !/^<\?xml\s/.test(xml), additionalNamespaces: xmlFragmentAdditionalNamespaces(xml, new Map(Object.entries(partNamespaceBindings?.get(partUri) ?? {})), { w: NS_W }) });
|
|
154118
154118
|
ranges = parsed.errors.length ? [] : parsed.ranges;
|
|
154119
154119
|
}
|
|
154120
154120
|
const byStart = new Map;
|
|
@@ -194628,6 +194628,7 @@ function prepareInsertedTextLogicalPublication(state, group, remoteEdit) {
|
|
|
194628
194628
|
const logical = buildLogicalCatalog(localRaw, mode2, parts, state.trackedChangeSplitLineage, {
|
|
194629
194629
|
sessionCreatedTrackedChangeRsids: collectSessionCreatedTrackedChangeRsids(state),
|
|
194630
194630
|
sessionCreatedTrackedChangeWIds: ownedWIds,
|
|
194631
|
+
partNamespaceBindings: new Map([[uri, namespaces]]),
|
|
194631
194632
|
numberingCatalog: list.numberingCatalog,
|
|
194632
194633
|
styleNumberingIndex: list.styleIndex,
|
|
194633
194634
|
stylesStatus: list.stylesStatus
|
|
@@ -237658,7 +237659,9 @@ function readLivePPrChildren(pPrXml) {
|
|
|
237658
237659
|
return children2;
|
|
237659
237660
|
}
|
|
237660
237661
|
function rewriteParagraphListLevel(args) {
|
|
237661
|
-
const direct = rewriteParagraphNumPr(args.paraXml, args.numPr, args.paragraphStyleId
|
|
237662
|
+
const direct = rewriteParagraphNumPr(args.paraXml, args.numPr, args.paragraphStyleId, {
|
|
237663
|
+
preserveParagraphStyle: args.paragraphStyleId == null
|
|
237664
|
+
});
|
|
237662
237665
|
if (!direct.ok)
|
|
237663
237666
|
return direct;
|
|
237664
237667
|
return resetParagraphListPosition(direct.xml, args.readNamespaces);
|
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.14",
|
|
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.14",
|
|
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.16",
|
|
33
|
+
"@superdoc/docx-engine": "0.27.0-next.15",
|
|
34
34
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
35
35
|
"@types/bun": "^1.3.8",
|
|
36
36
|
"@types/node": "22.19.2",
|