@superdoc/mcp 1.6.1-next.2 → 1.7.0-next.1
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 +58 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -31600,7 +31600,7 @@ var init_host = __esm(() => {
|
|
|
31600
31600
|
});
|
|
31601
31601
|
|
|
31602
31602
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
31603
|
-
var SDK_VERSION = "2.
|
|
31603
|
+
var SDK_VERSION = "2.20.0-next.1";
|
|
31604
31604
|
|
|
31605
31605
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
31606
31606
|
import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
|
|
@@ -104793,6 +104793,50 @@ var init_export_types = __esm(() => {
|
|
|
104793
104793
|
SD_EXPORT_MODES = ["review-preserving", "final", "original"];
|
|
104794
104794
|
});
|
|
104795
104795
|
|
|
104796
|
+
// ../../packages/document-api/dist/write/operation-cancellation.js
|
|
104797
|
+
function cancelledBeforeDispatch() {
|
|
104798
|
+
return new OperationCancellationError("CANCELLED", CANCELLED_MESSAGE, { cause: "cancelled" });
|
|
104799
|
+
}
|
|
104800
|
+
function isAbortSignal(value) {
|
|
104801
|
+
if (typeof value !== "object" || value === null)
|
|
104802
|
+
return false;
|
|
104803
|
+
const signal = value;
|
|
104804
|
+
return typeof signal.aborted === "boolean" && typeof signal.addEventListener === "function";
|
|
104805
|
+
}
|
|
104806
|
+
function assertOperationCanStart(options) {
|
|
104807
|
+
if (options === undefined)
|
|
104808
|
+
return;
|
|
104809
|
+
if (options.signal !== undefined && !isAbortSignal(options.signal)) {
|
|
104810
|
+
throw new DocumentApiValidationError("VALIDATION_ERROR", "signal must be an AbortSignal.", {
|
|
104811
|
+
field: "signal"
|
|
104812
|
+
});
|
|
104813
|
+
}
|
|
104814
|
+
if (options.timeoutMs !== undefined) {
|
|
104815
|
+
if (typeof options.timeoutMs !== "number" || !Number.isFinite(options.timeoutMs) || options.timeoutMs < 0) {
|
|
104816
|
+
throw new DocumentApiValidationError("VALIDATION_ERROR", "timeoutMs must be a finite number of milliseconds, 0 or greater.", {
|
|
104817
|
+
field: "timeoutMs",
|
|
104818
|
+
value: options.timeoutMs
|
|
104819
|
+
});
|
|
104820
|
+
}
|
|
104821
|
+
}
|
|
104822
|
+
if (options.signal?.aborted || options.timeoutMs !== undefined && options.timeoutMs <= 0) {
|
|
104823
|
+
throw cancelledBeforeDispatch();
|
|
104824
|
+
}
|
|
104825
|
+
}
|
|
104826
|
+
var OperationCancellationError, CANCELLED_MESSAGE = "The operation was cancelled before it changed the document.";
|
|
104827
|
+
var init_operation_cancellation = __esm(() => {
|
|
104828
|
+
init_errors5();
|
|
104829
|
+
OperationCancellationError = class OperationCancellationError extends Error {
|
|
104830
|
+
constructor(code, message, details) {
|
|
104831
|
+
super(message);
|
|
104832
|
+
this.name = "OperationCancellationError";
|
|
104833
|
+
this.code = code;
|
|
104834
|
+
this.details = details;
|
|
104835
|
+
Object.setPrototypeOf(this, OperationCancellationError.prototype);
|
|
104836
|
+
}
|
|
104837
|
+
};
|
|
104838
|
+
});
|
|
104839
|
+
|
|
104796
104840
|
// ../../packages/document-api/dist/validation/selection-target-validator.js
|
|
104797
104841
|
function isSelectionEdgeNodeAddress(value) {
|
|
104798
104842
|
if (!isRecord6(value))
|
|
@@ -105540,6 +105584,7 @@ function validateStructuralInsertInput(input) {
|
|
|
105540
105584
|
validateDocumentFragment(content);
|
|
105541
105585
|
}
|
|
105542
105586
|
function executeInsert(selectionAdapter, writeAdapter, input, options) {
|
|
105587
|
+
assertOperationCanStart(options);
|
|
105543
105588
|
validateInsertInput(input);
|
|
105544
105589
|
if (isStructuralInsertInput(input)) {
|
|
105545
105590
|
return writeAdapter.insertStructured(input, normalizeMutationOptions(options));
|
|
@@ -105564,6 +105609,7 @@ var init_insert = __esm(() => {
|
|
|
105564
105609
|
init_write();
|
|
105565
105610
|
init_placement();
|
|
105566
105611
|
init_errors5();
|
|
105612
|
+
init_operation_cancellation();
|
|
105567
105613
|
init_validation_primitives();
|
|
105568
105614
|
init_selection_target_validator();
|
|
105569
105615
|
init_fragment_validator();
|
|
@@ -120857,7 +120903,8 @@ function createDocumentApi(adapters) {
|
|
|
120857
120903
|
info(input) {
|
|
120858
120904
|
return executeInfo(adapters.info, input);
|
|
120859
120905
|
},
|
|
120860
|
-
extract(input) {
|
|
120906
|
+
extract(input, options) {
|
|
120907
|
+
assertOperationCanStart(options);
|
|
120861
120908
|
return executeExtract(adapters.extract, input);
|
|
120862
120909
|
},
|
|
120863
120910
|
clearContent(input, options) {
|
|
@@ -122032,7 +122079,8 @@ function createDocumentApi(adapters) {
|
|
|
122032
122079
|
preview(input) {
|
|
122033
122080
|
return adapters.mutations.preview(input);
|
|
122034
122081
|
},
|
|
122035
|
-
apply(input) {
|
|
122082
|
+
apply(input, options) {
|
|
122083
|
+
assertOperationCanStart(options);
|
|
122036
122084
|
return adapters.mutations.apply(input);
|
|
122037
122085
|
}
|
|
122038
122086
|
},
|
|
@@ -122169,6 +122217,7 @@ var init_dist = __esm(() => {
|
|
|
122169
122217
|
init_find_text();
|
|
122170
122218
|
init_blocks();
|
|
122171
122219
|
init_track_changes();
|
|
122220
|
+
init_operation_cancellation();
|
|
122172
122221
|
init_capabilities();
|
|
122173
122222
|
init_operation_definitions();
|
|
122174
122223
|
init_invoke();
|
|
@@ -246392,6 +246441,7 @@ class TxContext {
|
|
|
246392
246441
|
}
|
|
246393
246442
|
commitInsertComment(op) {
|
|
246394
246443
|
const replay = this.compareCommentCreateMetadata;
|
|
246444
|
+
const commentDate = replay ? replay.date ?? undefined : this.txTimestamp;
|
|
246395
246445
|
const commentAuthor = replay?.author ?? op.author ?? this.author;
|
|
246396
246446
|
if (!commentAuthor)
|
|
246397
246447
|
return rejected20(this.txId, "no-author-configured");
|
|
@@ -246473,7 +246523,7 @@ class TxContext {
|
|
|
246473
246523
|
paraId: nextParaId,
|
|
246474
246524
|
author: commentAuthor,
|
|
246475
246525
|
body: op.body,
|
|
246476
|
-
|
|
246526
|
+
date: commentDate,
|
|
246477
246527
|
isExplicitRoot: true,
|
|
246478
246528
|
trackedChangeMetadata: op.trackedChangeMetadata,
|
|
246479
246529
|
externalId: op.externalId,
|
|
@@ -246524,7 +246574,7 @@ class TxContext {
|
|
|
246524
246574
|
paraId: nextParaId,
|
|
246525
246575
|
author: commentAuthor,
|
|
246526
246576
|
body: op.body,
|
|
246527
|
-
|
|
246577
|
+
date: commentDate,
|
|
246528
246578
|
isExplicitRoot: true,
|
|
246529
246579
|
trackedChangeMetadata: op.trackedChangeMetadata,
|
|
246530
246580
|
externalId: op.externalId,
|
|
@@ -246757,6 +246807,7 @@ class TxContext {
|
|
|
246757
246807
|
paraId: nextParaId,
|
|
246758
246808
|
author: commentAuthor,
|
|
246759
246809
|
body: op.body,
|
|
246810
|
+
date: this.txTimestamp,
|
|
246760
246811
|
isExplicitRoot: true,
|
|
246761
246812
|
trackedChangeMetadata: op.trackedChangeMetadata,
|
|
246762
246813
|
externalId: op.externalId,
|
|
@@ -246788,6 +246839,7 @@ class TxContext {
|
|
|
246788
246839
|
paraId: nextParaId,
|
|
246789
246840
|
author: commentAuthor,
|
|
246790
246841
|
body: op.body,
|
|
246842
|
+
date: this.txTimestamp,
|
|
246791
246843
|
isExplicitRoot: true,
|
|
246792
246844
|
trackedChangeMetadata: op.trackedChangeMetadata,
|
|
246793
246845
|
externalId: op.externalId,
|
|
@@ -247088,6 +247140,7 @@ class TxContext {
|
|
|
247088
247140
|
paraId: nextParaId,
|
|
247089
247141
|
author: commentAuthor,
|
|
247090
247142
|
body: op.body,
|
|
247143
|
+
date: this.txTimestamp,
|
|
247091
247144
|
trackedChangeMetadata: op.trackedChangeMetadata,
|
|
247092
247145
|
externalId: op.externalId,
|
|
247093
247146
|
authorId: op.authorId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-next.1",
|
|
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.
|
|
27
|
+
"@superdoc/sdk": "2.20.0-next.1",
|
|
28
28
|
"debug": "^4.4.3",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"superdoc": "2.
|
|
33
|
-
"@superdoc/docx-engine": "0.
|
|
32
|
+
"superdoc": "2.23.0-next.1",
|
|
33
|
+
"@superdoc/docx-engine": "0.22.0-next.1",
|
|
34
34
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
35
35
|
"@types/bun": "^1.3.8",
|
|
36
36
|
"@types/node": "22.19.2",
|