n8n-nodes-adeu 1.10.0 → 1.11.2
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
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
An [n8n](https://n8n.io) community node for **[Adeu](https://adeu.ai)** — the AI-native Virtual DOM for Microsoft Word.
|
|
7
7
|
|
|
8
|
+
> **🆕 New in Upcomming release:** `Apply Edits` now supports a **Dry Run** mode that previews edits without committing them. AI Agents can use it as a self-correction primitive to verify anchors before issuing a real edit. See the [Dry Run section](#-dry-run-mode-self-correction-for-ai-agents) and the [`$fromAI` recipe](#apply-edits) below. **Existing workflows must hand-add the `Dry_Run` binding** — n8n caches `$fromAI` expressions per workflow and does not retroactively update them on package upgrades.
|
|
9
|
+
|
|
8
10
|
This node bridges the gap between Large Language Models (LLMs) and Microsoft Word. It translates complex OpenXML (`.docx`) files into token-efficient Markdown, allows AI models to reason over legal or technical text, and translates the AI's JSON output back into **native Word Tracked Changes and Comments** — all completely in-process, without your documents ever leaving the n8n runtime.
|
|
9
11
|
|
|
10
12
|
---
|
|
@@ -67,6 +69,16 @@ Applies a JSON array of `DocumentChange` operations back to the Word document as
|
|
|
67
69
|
- **Output**: A new redlined `.docx` binary + JSON application stats.
|
|
68
70
|
- **Atomic Batch Validation**: Adeu pre-validates the *entire* array of edits before touching the document. If even one edit is invalid (e.g., target text not found, ambiguous match), the engine safely rejects the entire batch to prevent partial or corrupted document states.
|
|
69
71
|
|
|
72
|
+
#### 🔍 Dry Run Mode (Self-Correction for AI Agents)
|
|
73
|
+
`Apply Edits` accepts an optional `Dry Run` boolean (default `false`). When enabled:
|
|
74
|
+
- Every edit is validated and simulated in-memory.
|
|
75
|
+
- The outgoing JSON contains a `stats.edits` array where each entry includes `status` (`applied` / `failed`), a `critic_markup` preview (~30 chars of surrounding context showing exactly where the change would land), a `clean_text` post-accept preview, a `warning` field (e.g. for punctuation-anchored targets prone to tokenization splits), and an `error` field if validation failed.
|
|
76
|
+
- The document is **not** modified. No redlined `.docx` binary is produced. No `redlinedBinaryId` is stashed in workflow static data. The incoming binary passes through unchanged on the outgoing item, so downstream nodes that expected continuity do not break.
|
|
77
|
+
- **Critical behavioral difference**: in a wet run (`Dry Run=false`), the engine throws a `BatchValidationError` atomically on the first invalid edit. In a dry run, invalid edits return as `failed` entries in the `edits` array instead — making dry-run also useful as a probe for whether an edit will succeed.
|
|
78
|
+
- The downstream `Hydrate Tool Output` node naturally short-circuits during a dry run (no static-data entry to read), so the existing AI Agent pipeline correctly skips the file-write step.
|
|
79
|
+
|
|
80
|
+
**When the AI should use it**: as a self-correction primitive for uncertain anchors (long quotes, legal terminology, possible duplicate phrases). The agent dry-runs, inspects the `critic_markup` preview, then re-calls with `Dry_Run=false` to commit. The system prompt in the example workflow tells the LLM explicitly to use dry-run sparingly — every dry run is an extra round trip.
|
|
81
|
+
|
|
70
82
|
### 3. Generate Diff
|
|
71
83
|
Produces a sub-word level `@@ Word Patch @@` diff between two versions of a document.
|
|
72
84
|
- **Input**: Two `.docx` binaries on the same item (e.g., `data` and `data2`).
|
|
@@ -236,6 +248,11 @@ AI Agents cannot pass binary `.docx` data through JSON arguments anyway — that
|
|
|
236
248
|
={{ $fromAI('Return_Markdown', `Boolean. When true (default), the tool returns the post-edit document as Markdown with CriticMarkup so you can verify what changed and reason about follow-up edits. Set false only to skip extraction when you are confident no follow-up review is needed.`, 'boolean', true) }}
|
|
237
249
|
```
|
|
238
250
|
|
|
251
|
+
**Dry Run:**
|
|
252
|
+
```
|
|
253
|
+
={{ $fromAI('Dry_Run', `Boolean. Default false (commit edits to the document). Set true ONLY as a self-correction primitive when you are uncertain that a target_text anchor is unique or matches the source verbatim, OR when you want to preview a complex multi-edit batch before committing. A dry run validates and simulates every edit and returns a per-edit report containing 'status' (applied/failed), 'critic_markup' (a ~30-char CriticMarkup preview showing exactly where the change would land), 'clean_text' (the post-accept preview), 'warning' (punctuation/tokenization hints), and 'error' (if the edit failed) — but the document is NOT modified, no redlined binary is produced, and no static-data stash is written. Invalid edits in a dry run come back as failed entries in the array rather than throwing a BatchValidationError, so dry-run is also how you probe whether an edit will succeed without aborting the batch. After inspecting the preview, re-call with Dry_Run=false to commit. Do NOT default to true — every dry run is an extra round trip that costs the user time and tokens.`, 'boolean', false) }}
|
|
254
|
+
```
|
|
255
|
+
|
|
239
256
|
---
|
|
240
257
|
|
|
241
258
|
### Generate Diff
|