@superdoc/cli 0.45.0-next.11 → 0.45.0-next.13
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 +97644 -97812
- package/dist/prompts/mcp-prompt.md +2 -0
- package/dist/prompts/system-prompt.md +1 -1
- package/package.json +9 -9
|
@@ -18,6 +18,8 @@ These tools handle the OOXML format correctly and preserve document structure.
|
|
|
18
18
|
|
|
19
19
|
**Edit with named actions.** `superdoc_perform_action` takes an `action` plus flat arguments — the full action list, argument shapes, selector vocabulary, and placement rules are documented in the tool's own description. Every action returns a receipt with real pre/post evidence: trust `status` (`ok` | `partial` | `failed`), read `errors[].message` for recovery guidance, and re-inspect after `partial`.
|
|
20
20
|
|
|
21
|
+
**Target one repeated match.** For `replace_text`, scope to one block with a selector and set `occurrence` on the edit (1 = first match in that block) to change only that match. Also pass `expectedRevision` from your latest inspect or receipt; on `REVISION_CONFLICT`, inspect again and recount.
|
|
22
|
+
|
|
21
23
|
**Tracked changes (redlining).** Most mutating actions accept `changeMode: "tracked"` to record the edit as a reviewable suggestion instead of applying it directly. Review with `accept_tracked_changes` / `reject_tracked_changes` (target one change with `id`, or an exact set with `id:[…]`; or filter by `author` or `changeType`). Do not combine exact IDs with filters. Recover with `undo_changes` / `redo_changes`.
|
|
22
24
|
|
|
23
25
|
**Failures are safe.** A `failed` receipt with `MATCH_NOT_FOUND` or a refused action means nothing was changed — fix the target and retry rather than improvising a different mutation path.
|
|
@@ -48,7 +48,7 @@ ACTIONS (superdoc_perform_action with flat args)
|
|
|
48
48
|
- undo_changes: untilMarker (rendered marker from the original state, e.g. "2.1.") or steps (1-25). Deterministic revert — steps history back until the marker reappears; the receipt proves it. NEVER use steps > 1 blindly: prefer untilMarker, and after ANY undo verify (superdoc_inspect) that content you meant to KEEP still exists — if you overshot, redo_changes {steps:N} steps forward again to recover it.
|
|
49
49
|
- redo_changes: steps (1-25, default 1). Steps history FORWARD to re-apply edits a prior undo removed — THE recovery for an undo overshoot. Only reaches the forward branch until a NEW edit is made.
|
|
50
50
|
- attach_numbering: anchorText (text of the block) or nodeId, likeMarker (rendered marker of a sibling clause, e.g. "10."). Makes an EXISTING block a numbered clause at the same scheme/level — "make this the section 11 heading" in a clause-numbered document is exactly this (it will render as the next number).
|
|
51
|
-
- replace_text: edits:[{find,replace}], caseSensitive default false. selector to scope. changeMode:"tracked" if asked. The receipt reports editsApplied and editsSkipped per find — READ IT: a skipped find is not in the selected block; re-target instead of assuming success.
|
|
51
|
+
- replace_text: edits:[{find,replace,occurrence?}], caseSensitive default false. selector to scope. Keep find/replace spans MINIMAL. If the find appears more than once in the selected block and only one should change, give that edit occurrence (1 = first match in the block; needs selector; not selector.occurrence). With occurrence, also pass expectedRevision from your latest inspect or receipt; on REVISION_CONFLICT inspect again and recount. changeMode:"tracked" if asked. The receipt reports editsApplied and editsSkipped per find — READ IT: a skipped find is not in the selected block; re-target instead of assuming success.
|
|
52
52
|
- delete_text: finds:[string]. selector to scope deletions to ONE block — REQUIRED for whitespace-only finds (unscoped whitespace matches document-wide and is refused). changeMode:"tracked" if asked. Deletes TEXT ONLY: the block survives, so a list item keeps its bullet/number and an accepted tracked deletion leaves an empty numbered item behind. To remove the item itself use delete_blocks.
|
|
53
53
|
- delete_blocks: selectors:[…], each resolving to ONE block (list item, paragraph or heading). changeMode:"tracked" if asked. THE way to DELETE a whole LIST ITEM, paragraph or heading — the bullet/number goes with it and the remaining items renumber. "Delete the first item under Article II" / "remove that clause" is exactly this, NOT delete_text. Pass every target in ONE call. Use delete_table for a whole table.
|
|
54
54
|
- rewrite_block: selector, text. Inspect first to gather current text; never ask the user to paste text already in the doc.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/cli",
|
|
3
|
-
"version": "0.45.0-next.
|
|
3
|
+
"version": "0.45.0-next.13",
|
|
4
4
|
"description": "Command-line interface for SuperDoc: inspect, convert, and edit .docx files from a terminal or a script.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"fast-glob": "^3.3.3",
|
|
30
30
|
"happy-dom": "^20.3.4",
|
|
31
31
|
"ws": "^8.18.0",
|
|
32
|
-
"superdoc": "2.25.0-next.
|
|
32
|
+
"superdoc": "2.25.0-next.13",
|
|
33
33
|
"y-websocket": "^3.0.0",
|
|
34
34
|
"yjs": "13.6.31"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@hocuspocus/server": "^2.13.6",
|
|
38
|
-
"@superdoc/sdk": "2.22.0-next.
|
|
38
|
+
"@superdoc/sdk": "2.22.0-next.13",
|
|
39
39
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
40
|
-
"@superdoc/docx-engine": "0.24.0-next.
|
|
40
|
+
"@superdoc/docx-engine": "0.24.0-next.13",
|
|
41
41
|
"@types/bun": "^1.3.8",
|
|
42
42
|
"@types/node": "22.19.2",
|
|
43
43
|
"@types/ws": "^8.5.13",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"@superdoc/cli-darwin-arm64": "0.45.0-next.
|
|
55
|
-
"@superdoc/cli-darwin-x64": "0.45.0-next.
|
|
56
|
-
"@superdoc/cli-linux-x64": "0.45.0-next.
|
|
57
|
-
"@superdoc/cli-linux-arm64": "0.45.0-next.
|
|
58
|
-
"@superdoc/cli-windows-x64": "0.45.0-next.
|
|
54
|
+
"@superdoc/cli-darwin-arm64": "0.45.0-next.13",
|
|
55
|
+
"@superdoc/cli-darwin-x64": "0.45.0-next.13",
|
|
56
|
+
"@superdoc/cli-linux-x64": "0.45.0-next.13",
|
|
57
|
+
"@superdoc/cli-linux-arm64": "0.45.0-next.13",
|
|
58
|
+
"@superdoc/cli-windows-x64": "0.45.0-next.13"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"predev": "node scripts/ensure-superdoc-build.js --internal",
|