@superdoc/sdk 2.3.0 → 2.4.1
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/embedded-tools.generated.cjs +5 -5
- package/dist/embedded-tools.generated.js +5 -5
- package/dist/generated/client.cjs +8 -0
- package/dist/generated/client.d.ts +23755 -10966
- package/dist/generated/client.js +8 -0
- package/dist/generated/contract.cjs +44374 -26683
- package/dist/generated/contract.js +45789 -26683
- package/dist/generated/intent-dispatch.generated.cjs +3 -0
- package/dist/generated/intent-dispatch.generated.js +3 -0
- package/package.json +6 -6
- package/skills/editing-docx.md +5 -2
- package/tools/__pycache__/__init__.cpython-311.pyc +0 -0
- package/tools/__pycache__/intent_dispatch_generated.cpython-311.pyc +0 -0
- package/tools/catalog.json +577 -2344
- package/tools/intent_dispatch_generated.py +6 -0
- package/tools/prompt-templates/system-prompt-core.md +19 -2
- package/tools/prompt-templates/system-prompt-mcp-header.md +1 -0
- package/tools/system-prompt-mcp.md +20 -2
- package/tools/system-prompt.md +19 -2
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +413 -2245
- package/tools/tools.generic.json +418 -2247
- package/tools/tools.openai.json +413 -2245
- package/tools/tools.vercel.json +413 -2245
- package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
|
@@ -9,6 +9,8 @@ function dispatchIntentTool(toolName, args, execute) {
|
|
|
9
9
|
case 'text': return execute('doc.getText', rest);
|
|
10
10
|
case 'markdown': return execute('doc.getMarkdown', rest);
|
|
11
11
|
case 'html': return execute('doc.getHtml', rest);
|
|
12
|
+
case 'markdown_projection': return execute('doc.projectMarkdown', rest);
|
|
13
|
+
case 'html_projection': return execute('doc.projectHtml', rest);
|
|
12
14
|
case 'info': return execute('doc.info', rest);
|
|
13
15
|
case 'extract': return execute('doc.extract', rest);
|
|
14
16
|
case 'blocks': return execute('doc.blocks.list', rest);
|
|
@@ -21,6 +23,7 @@ function dispatchIntentTool(toolName, args, execute) {
|
|
|
21
23
|
case 'insert': return execute('doc.insert', rest);
|
|
22
24
|
case 'replace': return execute('doc.replace', rest);
|
|
23
25
|
case 'delete': return execute('doc.delete', rest);
|
|
26
|
+
case 'check_support': return execute('doc.capabilities.check', rest);
|
|
24
27
|
case 'undo': return execute('doc.history.undo', rest);
|
|
25
28
|
case 'redo': return execute('doc.history.redo', rest);
|
|
26
29
|
default: throw new Error(`Unknown action for superdoc_edit: ${action}`);
|
|
@@ -7,6 +7,8 @@ export function dispatchIntentTool(toolName, args, execute) {
|
|
|
7
7
|
case 'text': return execute('doc.getText', rest);
|
|
8
8
|
case 'markdown': return execute('doc.getMarkdown', rest);
|
|
9
9
|
case 'html': return execute('doc.getHtml', rest);
|
|
10
|
+
case 'markdown_projection': return execute('doc.projectMarkdown', rest);
|
|
11
|
+
case 'html_projection': return execute('doc.projectHtml', rest);
|
|
10
12
|
case 'info': return execute('doc.info', rest);
|
|
11
13
|
case 'extract': return execute('doc.extract', rest);
|
|
12
14
|
case 'blocks': return execute('doc.blocks.list', rest);
|
|
@@ -19,6 +21,7 @@ export function dispatchIntentTool(toolName, args, execute) {
|
|
|
19
21
|
case 'insert': return execute('doc.insert', rest);
|
|
20
22
|
case 'replace': return execute('doc.replace', rest);
|
|
21
23
|
case 'delete': return execute('doc.delete', rest);
|
|
24
|
+
case 'check_support': return execute('doc.capabilities.check', rest);
|
|
22
25
|
case 'undo': return execute('doc.history.undo', rest);
|
|
23
26
|
case 'redo': return execute('doc.history.redo', rest);
|
|
24
27
|
default: throw new Error(`Unknown action for superdoc_edit: ${action}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Node SDK for SuperDoc, wrapping the SuperDoc CLI to read and edit .docx files from JavaScript and TypeScript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"typescript": "^5.9.2"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@superdoc/sdk-darwin-arm64": "2.
|
|
41
|
-
"@superdoc/sdk-darwin-x64": "2.
|
|
42
|
-
"@superdoc/sdk-linux-x64": "2.
|
|
43
|
-
"@superdoc/sdk-linux-arm64": "2.
|
|
44
|
-
"@superdoc/sdk-windows-x64": "2.
|
|
40
|
+
"@superdoc/sdk-darwin-arm64": "2.4.1",
|
|
41
|
+
"@superdoc/sdk-darwin-x64": "2.4.1",
|
|
42
|
+
"@superdoc/sdk-linux-x64": "2.4.1",
|
|
43
|
+
"@superdoc/sdk-linux-arm64": "2.4.1",
|
|
44
|
+
"@superdoc/sdk-windows-x64": "2.4.1"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
package/skills/editing-docx.md
CHANGED
|
@@ -16,8 +16,9 @@ that let you open, read, search, and modify `.docx` files programmatically.
|
|
|
16
16
|
|
|
17
17
|
- `doc.find` — Search by text pattern, node type, or structured query
|
|
18
18
|
- `doc.getNode` — Get a specific node by address
|
|
19
|
-
- `doc.insert` — Insert text
|
|
20
|
-
- `doc.replace` — Replace
|
|
19
|
+
- `doc.insert` — Insert plain text, HTML, Markdown, or a preconverted fragment
|
|
20
|
+
- `doc.replace` — Replace a target with plain text, HTML, Markdown, or a preconverted fragment
|
|
21
|
+
- `doc.htmlToFragment` / `doc.markdownToFragment` — Preview structured conversion and diagnostics
|
|
21
22
|
- `doc.delete` — Delete content at a position
|
|
22
23
|
- `doc.format.*` — Apply bold, italic, underline, strikethrough
|
|
23
24
|
- `doc.comments.*` — Add, edit, resolve, remove comments
|
|
@@ -28,4 +29,6 @@ that let you open, read, search, and modify `.docx` files programmatically.
|
|
|
28
29
|
- Always open before operating, save when done
|
|
29
30
|
- Use `doc.find` to locate content before modifying
|
|
30
31
|
- Use `doc.info` to check document capabilities
|
|
32
|
+
- Pass `changeMode: 'tracked'` when an HTML or Markdown insert or replacement should remain reviewable
|
|
33
|
+
- Treat HTML and Markdown as bounded structured inputs, not arbitrary CSS or complete DOCX package fragments; inspect conversion diagnostics before relying on normalized or dropped content
|
|
31
34
|
- Handle errors gracefully — operations may fail if targets are invalid
|
|
Binary file
|
|
Binary file
|