@langlink/memoq-mcp 0.2.2 → 0.2.5
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/README.md +1 -1
- package/bin/MemoQ.Bridge.Helper.exe +0 -0
- package/dist/index.js +5368 -609
- package/dist/index.js.map +4 -4
- package/package.json +2 -1
- package/skills/memoq-setup-troubleshoot/SKILL.md +12 -4
- package/skills/memoq-stage-translate/SKILL.md +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langlink/memoq-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "LangLink memoQ connector over stdio MCP for WorkBuddy, Codex, ZCode, and Trae: live Preview read/jump, staged translations, confirmed feedback, and local setup wizard.",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"THIRD_PARTY_NOTICES.txt"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"exceljs": "^4.4.0",
|
|
33
34
|
"fflate": "^0.8.3",
|
|
34
35
|
"htmlparser2": "^12.0.0",
|
|
35
36
|
"saxes": "^6.0.0"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memoq-setup-troubleshoot
|
|
3
|
-
description: Guide the user through safe memoQ MT DLL setup, port 5271 coexistence with memoQ AI Hub, and Preview pipe troubleshooting without scary scripts.
|
|
3
|
+
description: Guide the user through safe Agent-assisted memoQ MT DLL discovery and confirm-before-copy setup, port 5271 coexistence with memoQ AI Hub, and Preview pipe troubleshooting without scary scripts.
|
|
4
4
|
whenToUse: The user asks how to connect memoQ, install the memoQ plugin DLL, or reports memoQ connection, port 5271, or Preview errors.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# memoQ 连接器安装与排错(memoq-setup-troubleshoot)
|
|
8
8
|
|
|
9
|
-
**禁止给用户粘贴 `powershell -ExecutionPolicy Bypass`
|
|
9
|
+
**禁止给用户粘贴 `powershell -ExecutionPolicy Bypass` 等提权脚本,禁止跳过用户确认直接写入 `Addins` 或 `ClientDevConfig.xml`。**
|
|
10
10
|
|
|
11
11
|
## 标准处理步骤
|
|
12
12
|
|
|
@@ -14,9 +14,17 @@ whenToUse: The user asks how to connect memoQ, install the memoQ plugin DLL, or
|
|
|
14
14
|
- Preview 状态(`preview.state` / `preview.connected` / `preview.lastError`)
|
|
15
15
|
- 端口 5271 归属(`port5271Owner`)
|
|
16
16
|
- DLL 与 `ClientDevConfig.xml` 状态(`integration.status`)
|
|
17
|
-
2. **未安装或需要修复 DLL
|
|
17
|
+
2. **未安装或需要修复 DLL(Agent 找路径 → 确认 → 复制安装)**:
|
|
18
18
|
- 若 `integration.canReuseExisting === true`:告知用户本机已有兼容的 `MemoQ.AI.Hub.Plugin.dll`,无需重复安装。
|
|
19
|
-
-
|
|
19
|
+
- 否则先调用只读预检:`memoq_setup({ action: "plan" })`(若用户提供了本地 `.dll` / `.zip` 路径或自定义 memoQ 目录,一并传入 `dllPath` / `customInstallDir`)。
|
|
20
|
+
- 工具会自动探测运行中 `MemoQ.exe` 进程路径、Windows 注册表与本机盘符中的 memoQ 安装目录,以及常用目录中的 `MemoQ.AI.Hub.Plugin.dll` / 发布 `.zip` 包。
|
|
21
|
+
- **在对话中把 `plan.plannedChanges` 的精确内容列给用户确认**:
|
|
22
|
+
1. 源文件路径与种类(复制安装,**保留原文件不删除**)及 SHA-256 校验值;
|
|
23
|
+
2. 目标路径(`<memoqRoot>\Addins\MemoQ.AI.Hub.Plugin.dll`,自动清除 MOTW);
|
|
24
|
+
3. 配置变更(`C:\ProgramData\MemoQ\ClientDevConfig.xml`,如存在先备份 `.bak` 再启用 `LoadUnsignedPlugins`);
|
|
25
|
+
4. 若 `requiresElevation: true`,提前说明将触发一次系统原生 UAC 提权弹窗。
|
|
26
|
+
- **等待用户明确回复确认后**,再调用 `memoq_setup({ action: "install", confirmed: true, memoqRoot, dllPath })` 执行受控 Helper 安装;也可同时附上返回的本地可视化向导链接作为备选兜底。
|
|
27
|
+
- 安装完成后提示用户**完全重启 memoQ**并在 `Options → Default resources → MT settings` 勾选启用 `memoQ AI Hub`。
|
|
20
28
|
3. **端口 5271 被 `memoQ AI Hub` 占用**:
|
|
21
29
|
- 若 `port5271Owner === "memoq-ai-hub"`:说明用户同时开着 `memoQ AI Hub` 桌面端。Preview 读写和跳转完全不受影响;如需使用本连接器的暂存池/Agent 翻译,请用户在两个方案中二选一:① 暂时关闭 `memoQ AI Hub`;② 在 memoQ 插件 Options 中把网关端口改为 `5272` 并配置环境变量 `MEMOQ_BRIDGE_PORT=5272`。
|
|
22
30
|
4. **Preview 连接不到或无文本**:
|
|
@@ -26,6 +26,7 @@ whenToUse: The user asks to translate, pre-translate, or polish segments from me
|
|
|
26
26
|
- 用户在工作台标出修改意见后,调用 `memoq_list_staged({ status: "needs_revision", onlyWithComment: true })` 读取 `reviewComment` 逐条改好后重新调用 `memoq_stage_translations`(自动记录修订版本 `v1→v2...`)。
|
|
27
27
|
5. **处理复杂格式或特殊内联标签句段**:
|
|
28
28
|
- 若某句在 memoQ 中包含无法通过占位符对齐的格式标签(如 `<b>/<i>/<u>`)并被标签守卫记入 `memoq_get_recent_mt_requests`,调用 `memoq_get_recent_mt_requests({ onlyWithTags: true })` 获取 memoQ 发来的完整带标签 `text`(以及 `tmSource`/`tmTarget`),保留全部 `<span data-mqitag="...">` 和格式标签后通过 `sourceHtml` + `targetHtml` 重新暂存。
|
|
29
|
-
6.
|
|
29
|
+
6. **放行定稿与漏翻兜底检查**:
|
|
30
30
|
- 若返回 `integrationReady: false`,调用 `memoq_setup` 给出本地安装引导页链接(切勿给用户发 PowerShell 脚本)。
|
|
31
31
|
- 用户确认最终版后,可在工作台点击「一键放行全部定稿到 memoQ」或由 Agent 调用 `memoq_approve_staged` 将状态切为 `approved`,再回 memoQ 点击目标句段或运行 **Pre-translate** 即可毫秒级写入,人工确认后的译文会自动回流供下一批参考。
|
|
32
|
+
- **必须汇报覆盖缺口**:调用 `memoq_approve_staged` 或 `memoq_status` 时务必检查返回的 `coverage`(`uncoveredPreviewCount` / `draftTotal` / `needsRevisionTotal` / `missedPretranslateCount`);若有未覆盖或未放行句段,必须明确提醒用户。若 memoQ Pre-translate 弹窗提示部分句段出错/告警(往往是 Preview 未加载到末尾页之外的极短句或带标签句段),立即调用 `memoq_get_recent_mt_requests` 读取 `deduplicatedMissed`(或让用户在工作台顶部红色「Pre-translate 漏翻告警」横幅查看并点击「复制原文」/交由 Agent 补暂存并放行)。
|