@superdoc/cli 0.23.0 → 0.25.0
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/dist/assets/blank.docx +0 -0
- package/dist/index.js +35886 -21454
- package/dist/prompts/system-prompt.md +2 -1
- package/dist/tools/catalog.json +38 -1
- package/dist/tools/tools.anthropic.json +38 -1
- package/dist/tools/tools.generic.json +38 -1
- package/dist/tools/tools.openai.json +38 -1
- package/dist/tools/tools.vercel.json +38 -1
- package/package.json +25 -13
- package/skill/SKILL.md +1 -1
|
@@ -49,7 +49,8 @@ ACTIONS (superdoc_perform_action with flat args)
|
|
|
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
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.
|
|
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.
|
|
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
|
+
- 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.
|
|
53
54
|
- rewrite_block: selector, text. Inspect first to gather current text; never ask the user to paste text already in the doc.
|
|
54
55
|
- create_table: rows, columns, optional cellTexts (2D array). rows counts ALL rows INCLUDING the header — header plus one data row is rows:2. placement defaults to document end. changeMode:"tracked" if asked ("track-changes table") — the insertion itself becomes a tracked change.
|
|
55
56
|
- comment_paragraphs: commentText. excludeBlockQuotes:true to skip block quotes. Applies the SAME text to every BODY paragraph (it does NOT comment the title/heading) — broadcast notes only, never review feedback (see REVIEW rule). To comment a heading too, add_comments on it explicitly.
|
package/dist/tools/catalog.json
CHANGED
|
@@ -4725,7 +4725,7 @@
|
|
|
4725
4725
|
},
|
|
4726
4726
|
{
|
|
4727
4727
|
"toolName": "superdoc_comment",
|
|
4728
|
-
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment;
|
|
4728
|
+
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; \"action\", \"text\", and \"target\" are required, while commentId (the v1 compatibility alias for externalId), externalId, author fields, and metadata are optional correlation fields.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
|
|
4729
4729
|
"inputSchema": {
|
|
4730
4730
|
"type": "object",
|
|
4731
4731
|
"properties": {
|
|
@@ -4850,6 +4850,43 @@
|
|
|
4850
4850
|
"type": "string",
|
|
4851
4851
|
"description": "Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions."
|
|
4852
4852
|
},
|
|
4853
|
+
"commentId": {
|
|
4854
|
+
"type": "string",
|
|
4855
|
+
"minLength": 1,
|
|
4856
|
+
"maxLength": 1024,
|
|
4857
|
+
"description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4858
|
+
},
|
|
4859
|
+
"externalId": {
|
|
4860
|
+
"type": "string",
|
|
4861
|
+
"minLength": 1,
|
|
4862
|
+
"maxLength": 1024,
|
|
4863
|
+
"description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4864
|
+
},
|
|
4865
|
+
"author": {
|
|
4866
|
+
"type": "string",
|
|
4867
|
+
"minLength": 1,
|
|
4868
|
+
"description": "Author display name. Defaults to the configured session author. Only for action 'create'. Omit for other actions."
|
|
4869
|
+
},
|
|
4870
|
+
"authorId": {
|
|
4871
|
+
"type": "string",
|
|
4872
|
+
"minLength": 1,
|
|
4873
|
+
"description": "Stable caller-owned author id. Only for action 'create'. Omit for other actions."
|
|
4874
|
+
},
|
|
4875
|
+
"authorEmail": {
|
|
4876
|
+
"type": "string",
|
|
4877
|
+
"minLength": 1,
|
|
4878
|
+
"description": "Caller-owned author email. Only for action 'create'. Omit for other actions."
|
|
4879
|
+
},
|
|
4880
|
+
"authorImage": {
|
|
4881
|
+
"type": "string",
|
|
4882
|
+
"minLength": 1,
|
|
4883
|
+
"description": "Caller-owned author image URL. Only for action 'create'. Omit for other actions."
|
|
4884
|
+
},
|
|
4885
|
+
"metadata": {
|
|
4886
|
+
"type": "object",
|
|
4887
|
+
"additionalProperties": true,
|
|
4888
|
+
"description": "Caller-owned JSON metadata persisted with the comment. Only for action 'create'. Omit for other actions."
|
|
4889
|
+
},
|
|
4853
4890
|
"id": {
|
|
4854
4891
|
"type": "string",
|
|
4855
4892
|
"description": "Required for actions 'delete', 'get'."
|
|
@@ -4440,7 +4440,7 @@
|
|
|
4440
4440
|
},
|
|
4441
4441
|
{
|
|
4442
4442
|
"name": "superdoc_comment",
|
|
4443
|
-
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment;
|
|
4443
|
+
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; \"action\", \"text\", and \"target\" are required, while commentId (the v1 compatibility alias for externalId), externalId, author fields, and metadata are optional correlation fields.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
|
|
4444
4444
|
"input_schema": {
|
|
4445
4445
|
"type": "object",
|
|
4446
4446
|
"properties": {
|
|
@@ -4565,6 +4565,43 @@
|
|
|
4565
4565
|
"type": "string",
|
|
4566
4566
|
"description": "Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions."
|
|
4567
4567
|
},
|
|
4568
|
+
"commentId": {
|
|
4569
|
+
"type": "string",
|
|
4570
|
+
"minLength": 1,
|
|
4571
|
+
"maxLength": 1024,
|
|
4572
|
+
"description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4573
|
+
},
|
|
4574
|
+
"externalId": {
|
|
4575
|
+
"type": "string",
|
|
4576
|
+
"minLength": 1,
|
|
4577
|
+
"maxLength": 1024,
|
|
4578
|
+
"description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4579
|
+
},
|
|
4580
|
+
"author": {
|
|
4581
|
+
"type": "string",
|
|
4582
|
+
"minLength": 1,
|
|
4583
|
+
"description": "Author display name. Defaults to the configured session author. Only for action 'create'. Omit for other actions."
|
|
4584
|
+
},
|
|
4585
|
+
"authorId": {
|
|
4586
|
+
"type": "string",
|
|
4587
|
+
"minLength": 1,
|
|
4588
|
+
"description": "Stable caller-owned author id. Only for action 'create'. Omit for other actions."
|
|
4589
|
+
},
|
|
4590
|
+
"authorEmail": {
|
|
4591
|
+
"type": "string",
|
|
4592
|
+
"minLength": 1,
|
|
4593
|
+
"description": "Caller-owned author email. Only for action 'create'. Omit for other actions."
|
|
4594
|
+
},
|
|
4595
|
+
"authorImage": {
|
|
4596
|
+
"type": "string",
|
|
4597
|
+
"minLength": 1,
|
|
4598
|
+
"description": "Caller-owned author image URL. Only for action 'create'. Omit for other actions."
|
|
4599
|
+
},
|
|
4600
|
+
"metadata": {
|
|
4601
|
+
"type": "object",
|
|
4602
|
+
"additionalProperties": true,
|
|
4603
|
+
"description": "Caller-owned JSON metadata persisted with the comment. Only for action 'create'. Omit for other actions."
|
|
4604
|
+
},
|
|
4568
4605
|
"id": {
|
|
4569
4606
|
"type": "string",
|
|
4570
4607
|
"description": "Required for actions 'delete', 'get'."
|
|
@@ -4550,7 +4550,7 @@
|
|
|
4550
4550
|
},
|
|
4551
4551
|
{
|
|
4552
4552
|
"name": "superdoc_comment",
|
|
4553
|
-
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment;
|
|
4553
|
+
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; \"action\", \"text\", and \"target\" are required, while commentId (the v1 compatibility alias for externalId), externalId, author fields, and metadata are optional correlation fields.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
|
|
4554
4554
|
"parameters": {
|
|
4555
4555
|
"type": "object",
|
|
4556
4556
|
"properties": {
|
|
@@ -4675,6 +4675,43 @@
|
|
|
4675
4675
|
"type": "string",
|
|
4676
4676
|
"description": "Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions."
|
|
4677
4677
|
},
|
|
4678
|
+
"commentId": {
|
|
4679
|
+
"type": "string",
|
|
4680
|
+
"minLength": 1,
|
|
4681
|
+
"maxLength": 1024,
|
|
4682
|
+
"description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4683
|
+
},
|
|
4684
|
+
"externalId": {
|
|
4685
|
+
"type": "string",
|
|
4686
|
+
"minLength": 1,
|
|
4687
|
+
"maxLength": 1024,
|
|
4688
|
+
"description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4689
|
+
},
|
|
4690
|
+
"author": {
|
|
4691
|
+
"type": "string",
|
|
4692
|
+
"minLength": 1,
|
|
4693
|
+
"description": "Author display name. Defaults to the configured session author. Only for action 'create'. Omit for other actions."
|
|
4694
|
+
},
|
|
4695
|
+
"authorId": {
|
|
4696
|
+
"type": "string",
|
|
4697
|
+
"minLength": 1,
|
|
4698
|
+
"description": "Stable caller-owned author id. Only for action 'create'. Omit for other actions."
|
|
4699
|
+
},
|
|
4700
|
+
"authorEmail": {
|
|
4701
|
+
"type": "string",
|
|
4702
|
+
"minLength": 1,
|
|
4703
|
+
"description": "Caller-owned author email. Only for action 'create'. Omit for other actions."
|
|
4704
|
+
},
|
|
4705
|
+
"authorImage": {
|
|
4706
|
+
"type": "string",
|
|
4707
|
+
"minLength": 1,
|
|
4708
|
+
"description": "Caller-owned author image URL. Only for action 'create'. Omit for other actions."
|
|
4709
|
+
},
|
|
4710
|
+
"metadata": {
|
|
4711
|
+
"type": "object",
|
|
4712
|
+
"additionalProperties": true,
|
|
4713
|
+
"description": "Caller-owned JSON metadata persisted with the comment. Only for action 'create'. Omit for other actions."
|
|
4714
|
+
},
|
|
4678
4715
|
"id": {
|
|
4679
4716
|
"type": "string",
|
|
4680
4717
|
"description": "Required for actions 'delete', 'get'."
|
|
@@ -4457,7 +4457,7 @@
|
|
|
4457
4457
|
"type": "function",
|
|
4458
4458
|
"function": {
|
|
4459
4459
|
"name": "superdoc_comment",
|
|
4460
|
-
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment;
|
|
4460
|
+
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; \"action\", \"text\", and \"target\" are required, while commentId (the v1 compatibility alias for externalId), externalId, author fields, and metadata are optional correlation fields.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
|
|
4461
4461
|
"parameters": {
|
|
4462
4462
|
"type": "object",
|
|
4463
4463
|
"properties": {
|
|
@@ -4582,6 +4582,43 @@
|
|
|
4582
4582
|
"type": "string",
|
|
4583
4583
|
"description": "Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions."
|
|
4584
4584
|
},
|
|
4585
|
+
"commentId": {
|
|
4586
|
+
"type": "string",
|
|
4587
|
+
"minLength": 1,
|
|
4588
|
+
"maxLength": 1024,
|
|
4589
|
+
"description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4590
|
+
},
|
|
4591
|
+
"externalId": {
|
|
4592
|
+
"type": "string",
|
|
4593
|
+
"minLength": 1,
|
|
4594
|
+
"maxLength": 1024,
|
|
4595
|
+
"description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4596
|
+
},
|
|
4597
|
+
"author": {
|
|
4598
|
+
"type": "string",
|
|
4599
|
+
"minLength": 1,
|
|
4600
|
+
"description": "Author display name. Defaults to the configured session author. Only for action 'create'. Omit for other actions."
|
|
4601
|
+
},
|
|
4602
|
+
"authorId": {
|
|
4603
|
+
"type": "string",
|
|
4604
|
+
"minLength": 1,
|
|
4605
|
+
"description": "Stable caller-owned author id. Only for action 'create'. Omit for other actions."
|
|
4606
|
+
},
|
|
4607
|
+
"authorEmail": {
|
|
4608
|
+
"type": "string",
|
|
4609
|
+
"minLength": 1,
|
|
4610
|
+
"description": "Caller-owned author email. Only for action 'create'. Omit for other actions."
|
|
4611
|
+
},
|
|
4612
|
+
"authorImage": {
|
|
4613
|
+
"type": "string",
|
|
4614
|
+
"minLength": 1,
|
|
4615
|
+
"description": "Caller-owned author image URL. Only for action 'create'. Omit for other actions."
|
|
4616
|
+
},
|
|
4617
|
+
"metadata": {
|
|
4618
|
+
"type": "object",
|
|
4619
|
+
"additionalProperties": true,
|
|
4620
|
+
"description": "Caller-owned JSON metadata persisted with the comment. Only for action 'create'. Omit for other actions."
|
|
4621
|
+
},
|
|
4585
4622
|
"id": {
|
|
4586
4623
|
"type": "string",
|
|
4587
4624
|
"description": "Required for actions 'delete', 'get'."
|
|
@@ -4457,7 +4457,7 @@
|
|
|
4457
4457
|
"type": "function",
|
|
4458
4458
|
"function": {
|
|
4459
4459
|
"name": "superdoc_comment",
|
|
4460
|
-
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment;
|
|
4460
|
+
"description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, changes status to \"resolved\", or toggles the legacy `sdcom:internal` flag for v1 compatibility. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; \"action\", \"text\", and \"target\" are required, while commentId (the v1 compatibility alias for externalId), externalId, author fields, and metadata are optional correlation fields.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
|
|
4461
4461
|
"parameters": {
|
|
4462
4462
|
"type": "object",
|
|
4463
4463
|
"properties": {
|
|
@@ -4582,6 +4582,43 @@
|
|
|
4582
4582
|
"type": "string",
|
|
4583
4583
|
"description": "Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions."
|
|
4584
4584
|
},
|
|
4585
|
+
"commentId": {
|
|
4586
|
+
"type": "string",
|
|
4587
|
+
"minLength": 1,
|
|
4588
|
+
"maxLength": 1024,
|
|
4589
|
+
"description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4590
|
+
},
|
|
4591
|
+
"externalId": {
|
|
4592
|
+
"type": "string",
|
|
4593
|
+
"minLength": 1,
|
|
4594
|
+
"maxLength": 1024,
|
|
4595
|
+
"description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId. Only for action 'create'. Omit for other actions."
|
|
4596
|
+
},
|
|
4597
|
+
"author": {
|
|
4598
|
+
"type": "string",
|
|
4599
|
+
"minLength": 1,
|
|
4600
|
+
"description": "Author display name. Defaults to the configured session author. Only for action 'create'. Omit for other actions."
|
|
4601
|
+
},
|
|
4602
|
+
"authorId": {
|
|
4603
|
+
"type": "string",
|
|
4604
|
+
"minLength": 1,
|
|
4605
|
+
"description": "Stable caller-owned author id. Only for action 'create'. Omit for other actions."
|
|
4606
|
+
},
|
|
4607
|
+
"authorEmail": {
|
|
4608
|
+
"type": "string",
|
|
4609
|
+
"minLength": 1,
|
|
4610
|
+
"description": "Caller-owned author email. Only for action 'create'. Omit for other actions."
|
|
4611
|
+
},
|
|
4612
|
+
"authorImage": {
|
|
4613
|
+
"type": "string",
|
|
4614
|
+
"minLength": 1,
|
|
4615
|
+
"description": "Caller-owned author image URL. Only for action 'create'. Omit for other actions."
|
|
4616
|
+
},
|
|
4617
|
+
"metadata": {
|
|
4618
|
+
"type": "object",
|
|
4619
|
+
"additionalProperties": true,
|
|
4620
|
+
"description": "Caller-owned JSON metadata persisted with the comment. Only for action 'create'. Omit for other actions."
|
|
4621
|
+
},
|
|
4585
4622
|
"id": {
|
|
4586
4623
|
"type": "string",
|
|
4587
4624
|
"description": "Required for actions 'delete', 'get'."
|
package/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
|
+
"description": "Command-line interface for SuperDoc: inspect, convert, and edit .docx files from a terminal or a script.",
|
|
4
5
|
"type": "module",
|
|
6
|
+
"license": "AGPL-3.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/superdoc/docx-editor.git",
|
|
10
|
+
"directory": "apps/cli"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/superdoc/docx-editor/tree/main/apps/cli#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/superdoc/docx-editor/issues"
|
|
15
|
+
},
|
|
5
16
|
"main": "./dist/index.js",
|
|
6
17
|
"module": "./dist/index.js",
|
|
7
18
|
"bin": {
|
|
@@ -18,9 +29,9 @@
|
|
|
18
29
|
"fast-glob": "^3.3.3",
|
|
19
30
|
"happy-dom": "^20.3.4",
|
|
20
31
|
"ws": "^8.18.0",
|
|
21
|
-
"superdoc": "2.3.0",
|
|
22
32
|
"y-websocket": "^3.0.0",
|
|
23
|
-
"yjs": "13.6.31"
|
|
33
|
+
"yjs": "13.6.31",
|
|
34
|
+
"superdoc": "2.5.0"
|
|
24
35
|
},
|
|
25
36
|
"devDependencies": {
|
|
26
37
|
"@types/bun": "^1.3.8",
|
|
@@ -29,20 +40,21 @@
|
|
|
29
40
|
"jszip": "3.10.1",
|
|
30
41
|
"lib0": "^0.2.114",
|
|
31
42
|
"typescript": "^5.9.2",
|
|
43
|
+
"vite-plus": "0.2.8",
|
|
32
44
|
"y-protocols": "^1.0.6",
|
|
33
45
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
34
|
-
"@superdoc/sdk": "2.
|
|
35
|
-
"@superdoc/docx-engine": "0.
|
|
46
|
+
"@superdoc/sdk": "2.2.0",
|
|
47
|
+
"@superdoc/docx-engine": "0.3.0-next.60"
|
|
36
48
|
},
|
|
37
49
|
"publishConfig": {
|
|
38
50
|
"access": "public"
|
|
39
51
|
},
|
|
40
52
|
"optionalDependencies": {
|
|
41
|
-
"@superdoc/cli-darwin-
|
|
42
|
-
"@superdoc/cli-darwin-
|
|
43
|
-
"@superdoc/cli-linux-
|
|
44
|
-
"@superdoc/cli-
|
|
45
|
-
"@superdoc/cli-
|
|
53
|
+
"@superdoc/cli-darwin-x64": "0.25.0",
|
|
54
|
+
"@superdoc/cli-darwin-arm64": "0.25.0",
|
|
55
|
+
"@superdoc/cli-linux-arm64": "0.25.0",
|
|
56
|
+
"@superdoc/cli-linux-x64": "0.25.0",
|
|
57
|
+
"@superdoc/cli-windows-x64": "0.25.0"
|
|
46
58
|
},
|
|
47
59
|
"scripts": {
|
|
48
60
|
"predev": "node scripts/ensure-superdoc-build.js",
|
|
@@ -61,9 +73,9 @@
|
|
|
61
73
|
"publish:platforms:dry": "node scripts/publish.js --tag latest --dry-run",
|
|
62
74
|
"pretest": "node scripts/ensure-superdoc-build.js",
|
|
63
75
|
"test": "NODE_ENV=test bun test",
|
|
64
|
-
"lint": "
|
|
65
|
-
"lint:fix": "
|
|
66
|
-
"format": "
|
|
76
|
+
"lint": "pnpm -w exec vp lint apps/cli",
|
|
77
|
+
"lint:fix": "pnpm -w exec vp lint --fix apps/cli",
|
|
78
|
+
"format": "pnpm -w exec vp fmt apps/cli",
|
|
67
79
|
"pretypecheck": "node scripts/ensure-superdoc-build.js --types",
|
|
68
80
|
"typecheck": "tsc --noEmit -p tsconfig.check.json",
|
|
69
81
|
"release": "pnpx semantic-release",
|
package/skill/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ description: Edit, query, and transform Word documents with the SuperDoc CLI v1
|
|
|
8
8
|
Use SuperDoc CLI for DOCX work. Use v1 commands (canonical operations and their helper wrappers).
|
|
9
9
|
Do not default to legacy commands unless explicitly needed for v0-style bulk workflows.
|
|
10
10
|
|
|
11
|
-
Use `superdoc` if installed, or `npx @superdoc/cli@latest` as a fallback.
|
|
11
|
+
Use `superdoc` if installed, or `npx @superdoc-dev/cli@latest` as a fallback.
|
|
12
12
|
|
|
13
13
|
## First Step: Discover Exact Params
|
|
14
14
|
|