@adeu/mcp-server 1.18.5 → 1.19.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 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 = "ffa5978";
1338
- var packageVersion = "1.18.5";
1337
+ var gitSha = "1aea2a8";
1338
+ var packageVersion = "1.19.1";
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 = "ffa5978";
2022
- const buildTs = "2026-07-07T14:01:12.607Z";
2021
+ const gitSha2 = "1aea2a8";
2022
+ const buildTs = "2026-07-13T10:32:41.788Z";
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.18.5",
3
+ "version": "1.19.1",
4
4
  "description": "",
5
5
  "mcpName": "ai.adeu/adeu",
6
6
  "main": "./dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "license": "MIT",
32
32
  "type": "module",
33
33
  "dependencies": {
34
- "@adeu/core": "^1.18.5",
34
+ "@adeu/core": "^1.19.1",
35
35
  "@modelcontextprotocol/sdk": "^1.0.0",
36
36
  "@modelcontextprotocol/ext-apps": "^1.0.0",
37
37
  "zod": "^3.23.8"
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
  });