@langlink/dsh-memoq 0.1.8 → 0.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langlink/dsh-memoq",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "LangLink memoQ Desktop connector for DeepSeek Harness (dsh): Preview bidirectional bridge, staging pool, confirmed feedback, and DSH live LLM+TM/TB MT fallback.",
@@ -48,6 +48,7 @@
48
48
  "@deepseek-ai/dsh-tools": ">=0.2.1-rc.2 <0.3.0"
49
49
  },
50
50
  "dependencies": {
51
+ "exceljs": "^4.4.0",
51
52
  "fflate": "^0.8.3",
52
53
  "htmlparser2": "^12.0.0",
53
54
  "saxes": "^6.0.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memoq-setup-troubleshoot
3
- description: Diagnose and safely install or remove MemoQ.AI.Hub.Plugin.dll for memoQ Desktop 10/11/12 using the transparent local setup wizard (zero PowerShell scripts, SHA-256 verified, coexists with memoQ AI Hub).
3
+ description: Diagnose and safely install or remove MemoQ.AI.Hub.Plugin.dll for memoQ Desktop 10/11/12 via Agent-assisted path discovery and confirm-before-copy helper (with visual setup wizard fallback, zero PowerShell scripts, SHA-256 verified, coexists with memoQ AI Hub).
4
4
  ---
5
5
 
6
6
  # memoQ Connector Setup & Troubleshooting (DSH)
@@ -9,9 +9,11 @@ Follow these safety rules whenever helping the user connect memoQ Desktop MT:
9
9
 
10
10
  1. **Preview works immediately without any DLL or admin prompt**: Never ask the user to install DLLs just to use `memoq_get_active_segment`, `memoq_get_document_segments`, or `memoq_focus_segment`.
11
11
  2. **Reuse existing installation if present**: Run `memoq_status` first. If `MemoQ.AI.Hub.Plugin.dll` is already installed (`integration.canReuseExisting: true`), tell the user they do **not** need to reinstall anything—just make sure the memoQ AI Hub desktop app is closed so DSH holds loopback port `5271`.
12
- 3. **Transparent local wizard instead of blind scripts**: If the MT plugin is missing, call `memoq_setup` and give the user the localhost clickable link (`[打开 memoQ 连接器安装与诊断向导](...)`).
12
+ 3. **Two-phase Agent-assisted install (discover → user confirmation → helper copy) instead of blind scripts**:
13
+ - First call `memoq_setup({ action: "plan" })` (read-only). It auto-discovers memoQ Desktop roots (running `MemoQ.exe`, Registry, fixed drives) and local `MemoQ.AI.Hub.Plugin.dll` / `.zip` packages, or accepts user-supplied `customInstallDir` / `dllPath`.
14
+ - Present the exact `plan.plannedChanges` to the user in chat: source path (copied, original preserved), expected SHA-256, target `<memoqRoot>\Addins\MemoQ.AI.Hub.Plugin.dll` (MOTW removed), `ClientDevConfig.xml` `.bak` backup + merge, and whether UAC elevation will appear.
15
+ - **Only after explicit user confirmation**, call `memoq_setup({ action: "install", confirmed: true, memoqRoot, dllPath })`. You may also share the local visual wizard link (`url`) as an alternative UI.
13
16
  - Do **not** generate PowerShell scripts or tell the user to run unsigned commands in Terminal.
14
- - The setup page previews the exact 2 paths written (`ClientDevConfig.xml` with `.bak` backup + `MemoQ.AI.Hub.Plugin.dll` with SHA-256) and invokes `MemoQ.Bridge.Helper.exe` UAC only when the user clicks Install, or provides a 3-step manual fallback.
15
17
  4. **Port 5271 Conflict (`port5271Owner`)**:
16
18
  - If `memoq_status` shows `port5271Owner: "memoq-ai-hub"`, tell the user to close the memoQ AI Hub Electron app (or adjust `MEMOQ_BRIDGE_PORT`), then reload the plugin / restart memoQ.
17
19
  5. After installing `MemoQ.AI.Hub.Plugin.dll`, remind the user to **restart memoQ Desktop** once and enable `memoQ AI Hub` in memoQ *Options -> Machine translation*.
@@ -19,6 +19,8 @@ Use this workflow when translating or polishing batches in advance (or preparing
19
19
  - When the user asks to apply feedback from the workbench, call `memoq_list_staged({ status: "needs_revision", onlyWithComment: true })` to read each item's `reviewComment` and revision history, then re-stage updated translations via `memoq_stage_translations` (revision number increments automatically and history is preserved).
20
20
  6. Final release back into memoQ:
21
21
  - Either the translator clicks **"一键放行全部定稿到 memoQ"** in the Review Workbench, or the agent calls `memoq_approve_staged`.
22
+ - Always check `coverage` (`uncoveredPreviewCount`, `draftTotal`, `needsRevisionTotal`, `missedPretranslateCount`) returned by `memoq_approve_staged` / `memoq_status` and explicitly warn the user if any segments remain uncovered or pending approval.
22
23
  - Optional: call `memoq_live_mt_config({ mode: "staging_only" })` when you want memoQ Pre-translate to serve strictly approved staged translations without live LLM fallback.
23
24
  - Ask the translator to run **Pre-translate** in memoQ Desktop using **memoQ AI Hub** (allowing overwrite of unconfirmed segments if replacing earlier translations).
25
+ - If memoQ Pre-translate finishes with a warning or leaves any segment empty (for example a segment outside Preview's current window), immediately call `memoq_get_recent_mt_requests` and inspect `deduplicatedMissed` (or point the user to the red **"Pre-translate 漏翻告警"** banner in the Review Workbench) so those exact segments can be staged (`sourceHtml`/`targetHtml` if `hasInlineTags: true`), approved, and pulled cleanly.
24
26
  7. Periodically read `memoq_get_confirmed_translations` (`StoreTranslation` feedback) to incorporate the translator's live stylistic corrections, and call `memoq_clear_staged` when switching documents.