@adeu/mcp-server 1.19.0 → 1.20.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.
- package/dist/index.js +4 -4
- package/package.json +4 -4
- package/src/index.test.ts +36 -2
- package/src/mcp.bugs.test.ts +9 -1
package/dist/index.js
CHANGED
|
@@ -1334,8 +1334,8 @@ var READ_DOCX_TAIL = "Modes:\n- 'full' (default): paginated body content. Use pa
|
|
|
1334
1334
|
var PROCESS_BATCH_COMMON_DESC = "Applies a batch of edits and review actions to a DOCX.\n\nAll changes evaluate against the ORIGINAL document state \u2014 do not chain dependent edits within one batch (e.g. rename X to Y, then modify Y). Apply the rename first, then send a second batch.\n\n";
|
|
1335
1335
|
var PROCESS_BATCH_OPERATIONS_DESC = "Each item in `changes` must specify a `type`:\n1. 'modify': Search-and-replace. By default `target_text` must match uniquely (`match_mode`:'strict') \u2014 add surrounding context to disambiguate, or set `match_mode`:'first'/'all' to edit the first or every occurrence. Set `regex`:true to treat `target_text` as a regular expression (capture groups available in `new_text` as $1, $2\u2026). `new_text` supports Markdown: '# Heading 1' through '###### Heading 6', '**bold**', '_italic_', and '\\n\\n' to split into multiple paragraphs. Empty `new_text` deletes. Do NOT write CriticMarkup tags ({++, {--, {>>) manually \u2014 use the `comment` parameter for comments.\n \u2022 EMPTY/FORM TABLE CELLS: a blank cell has no text to match. `read_docx` renders each cell with a trailing `{#cell:<id>}` anchor \u2014 to fill a blank cell, set `target_text` to that exact anchor (e.g. '{#cell:0000005E}') and put the value in `new_text`. Do NOT try to match the pipe layout ('Date | | |'); the pipes are display separators, not editable text.\n2. 'accept' / 'reject': Finalize or revert a tracked change by `target_id` (e.g. 'Chg:12').\n3. 'reply': Reply to a comment by `target_id` (e.g. 'Com:5') with `text`.\n4. 'insert_row' / 'delete_row': Table edits. Disk mode only \u2014 not supported on Live Word canvas.\n\nID VOLATILITY: 'Chg:N' and 'Com:N' shift between document states. Always call `read_docx` immediately before any accept/reject/reply \u2014 do not reuse IDs from earlier in the conversation. The `{#cell:<id>}` anchors are stable (Word-assigned) and safe to reuse across reads.\n\n`author_name` is used for attribution on all tracked changes and comments, in both disk and Live Word modes.";
|
|
1336
1336
|
var DIFF_DOCX_DESC = "Compares two DOCX files and returns a compact `@@ Word Patch @@` diff \u2014 Adeu's token-level, sub-word patch format \u2014 of their text content. Useful for analyzing differences between versions before editing.";
|
|
1337
|
-
var gitSha = "
|
|
1338
|
-
var packageVersion = "1.
|
|
1337
|
+
var gitSha = "c60ac0a";
|
|
1338
|
+
var packageVersion = "1.20.0";
|
|
1339
1339
|
var buildTag = ` [Adeu v${packageVersion}+${gitSha}]`;
|
|
1340
1340
|
var args = process.argv.slice(2);
|
|
1341
1341
|
var scopeIdx = args.indexOf("--scope");
|
|
@@ -2018,8 +2018,8 @@ ${stats.skipped_details.join("\n")}`;
|
|
|
2018
2018
|
async function main() {
|
|
2019
2019
|
const transport = new StdioServerTransport();
|
|
2020
2020
|
await server.connect(transport);
|
|
2021
|
-
const gitSha2 = "
|
|
2022
|
-
const buildTs = "2026-07-
|
|
2021
|
+
const gitSha2 = "c60ac0a";
|
|
2022
|
+
const buildTs = "2026-07-16T10:28:45.581Z";
|
|
2023
2023
|
console.error(
|
|
2024
2024
|
`Adeu MCP Server (Node.js Engine: ${identifyEngine()}) running on stdio build=${gitSha2}@${buildTs}`
|
|
2025
2025
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adeu/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"mcpName": "ai.adeu/adeu",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"type": "module",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@adeu/core": "^1.
|
|
34
|
+
"@adeu/core": "^1.20.0",
|
|
35
35
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
36
|
-
"@modelcontextprotocol/ext-apps": "^1.
|
|
37
|
-
"zod": "
|
|
36
|
+
"@modelcontextprotocol/ext-apps": "^1.7.4",
|
|
37
|
+
"zod": "4.4.3"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/index.test.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { readFileSync, existsSync } from 'node:fs';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
2
|
+
import { readFileSync, existsSync, readdirSync, statSync } from 'node:fs';
|
|
3
|
+
import { resolve, join } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
|
|
6
6
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
7
7
|
|
|
8
|
+
function walkDir(dir: string, callback: (filepath: string) => void) {
|
|
9
|
+
const files = readdirSync(dir);
|
|
10
|
+
for (const file of files) {
|
|
11
|
+
const filepath = join(dir, file);
|
|
12
|
+
if (statSync(filepath).isDirectory()) {
|
|
13
|
+
walkDir(filepath, callback);
|
|
14
|
+
} else {
|
|
15
|
+
callback(filepath);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
8
20
|
describe('MCP Server', () => {
|
|
9
21
|
it('guarantees that @adeu/core dependency version is aligned with the core package version', () => {
|
|
10
22
|
const mcpPackageJsonPath = resolve(__dirname, '../package.json');
|
|
@@ -23,4 +35,26 @@ describe('MCP Server', () => {
|
|
|
23
35
|
// to prevent resolving stale/cached core versions that lack newly added exports.
|
|
24
36
|
expect(coreDependencyRange).toBe(`^${coreWorkspaceVersion}`);
|
|
25
37
|
});
|
|
38
|
+
|
|
39
|
+
it('should not contain console.log in production code (MCP stdio safety)', () => {
|
|
40
|
+
const violations: string[] = [];
|
|
41
|
+
|
|
42
|
+
const coreSrc = resolve(__dirname, '../../core/src');
|
|
43
|
+
const mcpSrc = resolve(__dirname, '../src');
|
|
44
|
+
|
|
45
|
+
[coreSrc, mcpSrc].forEach(srcDir => {
|
|
46
|
+
walkDir(srcDir, (filepath) => {
|
|
47
|
+
if (!filepath.endsWith('.ts') || filepath.endsWith('.test.ts') || filepath.endsWith('test-utils.ts')) return;
|
|
48
|
+
|
|
49
|
+
const lines = readFileSync(filepath, 'utf-8').split('\n');
|
|
50
|
+
lines.forEach((line, i) => {
|
|
51
|
+
if (line.includes('console.log') && !line.trim().startsWith('//')) {
|
|
52
|
+
violations.push(`${filepath.split(/packages[\\/]/)[1]}:${i + 1}`);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
expect(violations, 'Found console.log in production code. This corrupts MCP stdio streams! Use console.error instead.').toEqual([]);
|
|
59
|
+
});
|
|
26
60
|
});
|
package/src/mcp.bugs.test.ts
CHANGED
|
@@ -144,7 +144,15 @@ describe("Resolved Bugs MCP Server Verification", () => {
|
|
|
144
144
|
);
|
|
145
145
|
|
|
146
146
|
const rawText = resRaw.result.content[0].text;
|
|
147
|
-
|
|
147
|
+
// The zero-width insertion anchors right before "document", where it
|
|
148
|
+
// coalesces with the pre-existing {++golden ++} run in the raw
|
|
149
|
+
// projection ({++golden dirty modified ++}). A standalone
|
|
150
|
+
// "{++dirty modified ++}" block only existed while the insertion-anchor
|
|
151
|
+
// bug dropped the text at paragraph start, so assert the raw-markup
|
|
152
|
+
// intent instead of that exact placement.
|
|
153
|
+
expect(rawText).toContain("dirty modified");
|
|
154
|
+
expect(rawText).toContain("{++"); // CriticMarkup IS present in raw mode
|
|
155
|
+
expect(rawText).toContain("[Chg:5 insert] Reviewer");
|
|
148
156
|
});
|
|
149
157
|
it("BUG-10: Traps ENOENT and returns clean File Not Found errors", async () => {
|
|
150
158
|
const res = await sendRpc(
|