@superdoc-dev/sdk 1.0.0-next.73 → 1.0.0-next.75

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.
Files changed (37) hide show
  1. package/README.md +28 -21
  2. package/dist/generated/client.cjs +476 -0
  3. package/dist/generated/client.d.ts +9049 -147
  4. package/dist/generated/client.d.ts.map +1 -1
  5. package/dist/generated/client.js +475 -0
  6. package/dist/generated/contract.cjs +1338 -287
  7. package/dist/generated/contract.d.ts.map +1 -1
  8. package/dist/generated/contract.js +1338 -287
  9. package/dist/generated/intent-dispatch.generated.cjs +1 -0
  10. package/dist/generated/intent-dispatch.generated.d.ts.map +1 -1
  11. package/dist/generated/intent-dispatch.generated.js +1 -0
  12. package/dist/helpers/format.d.ts +6 -8
  13. package/dist/helpers/format.d.ts.map +1 -1
  14. package/dist/helpers/format.js +5 -8
  15. package/dist/index.cjs +130 -8
  16. package/dist/index.d.ts +73 -8
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +130 -8
  19. package/dist/runtime/process.d.ts +2 -2
  20. package/dist/runtime/process.d.ts.map +1 -1
  21. package/dist/runtime/transport-common.d.ts +7 -0
  22. package/dist/runtime/transport-common.d.ts.map +1 -1
  23. package/dist/tools.cjs +19 -6
  24. package/dist/tools.d.ts +8 -3
  25. package/dist/tools.d.ts.map +1 -1
  26. package/dist/tools.js +19 -6
  27. package/package.json +6 -6
  28. package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
  29. package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
  30. package/tools/catalog.json +100 -1039
  31. package/tools/intent_dispatch_generated.py +2 -0
  32. package/tools/system-prompt.md +47 -11
  33. package/tools/tools-policy.json +1 -1
  34. package/tools/tools.anthropic.json +96 -1039
  35. package/tools/tools.generic.json +99 -1041
  36. package/tools/tools.openai.json +96 -1039
  37. package/tools/tools.vercel.json +96 -1039
@@ -5,177 +5,49 @@
5
5
  "type": "function",
6
6
  "function": {
7
7
  "name": "superdoc_get_content",
8
- "description": "Read document content in various formats",
8
+ "description": "Read document content. Use action \"info\" for structure and styles, \"blocks\" for all block IDs and types, \"text\" or \"markdown\" for content. Call info or blocks before editing.",
9
9
  "parameters": {
10
10
  "type": "object",
11
11
  "properties": {
12
12
  "action": {
13
13
  "type": "string",
14
14
  "enum": [
15
+ "blocks",
15
16
  "html",
16
17
  "info",
17
18
  "markdown",
18
19
  "text"
19
20
  ],
20
- "description": "The action to perform. One of: html, info, markdown, text."
21
+ "description": "The action to perform. One of: blocks, html, info, markdown, text."
21
22
  },
22
- "doc": {
23
- "type": "string",
24
- "description": "Document path. Optional when a session is already open."
23
+ "unflattenLists": {
24
+ "type": "boolean",
25
+ "description": "When true, flattens nested list structures in output. Default: false. Only for action 'html'. Omit for other actions."
25
26
  },
26
- "sessionId": {
27
- "type": "string",
28
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
27
+ "offset": {
28
+ "type": "number",
29
+ "description": "Number of blocks to skip. Default: 0. Only for action 'blocks'. Omit for other actions."
29
30
  },
30
- "in": {
31
- "oneOf": [
32
- {
33
- "type": "object",
34
- "properties": {
35
- "kind": {
36
- "const": "story",
37
- "type": "string"
38
- },
39
- "storyType": {
40
- "const": "body",
41
- "type": "string"
42
- }
43
- },
44
- "required": [
45
- "kind",
46
- "storyType"
47
- ]
48
- },
49
- {
50
- "type": "object",
51
- "properties": {
52
- "kind": {
53
- "const": "story",
54
- "type": "string"
55
- },
56
- "storyType": {
57
- "const": "headerFooterSlot",
58
- "type": "string"
59
- },
60
- "section": {
61
- "type": "object",
62
- "properties": {
63
- "kind": {
64
- "const": "section",
65
- "type": "string"
66
- },
67
- "sectionId": {
68
- "type": "string"
69
- }
70
- },
71
- "required": [
72
- "kind",
73
- "sectionId"
74
- ]
75
- },
76
- "headerFooterKind": {
77
- "enum": [
78
- "header",
79
- "footer"
80
- ]
81
- },
82
- "variant": {
83
- "enum": [
84
- "default",
85
- "first",
86
- "even"
87
- ]
88
- },
89
- "resolution": {
90
- "enum": [
91
- "effective",
92
- "explicit"
93
- ]
94
- },
95
- "onWrite": {
96
- "enum": [
97
- "materializeIfInherited",
98
- "editResolvedPart",
99
- "error"
100
- ]
101
- }
102
- },
103
- "required": [
104
- "kind",
105
- "storyType",
106
- "section",
107
- "headerFooterKind",
108
- "variant"
109
- ]
110
- },
111
- {
112
- "type": "object",
113
- "properties": {
114
- "kind": {
115
- "const": "story",
116
- "type": "string"
117
- },
118
- "storyType": {
119
- "const": "headerFooterPart",
120
- "type": "string"
121
- },
122
- "refId": {
123
- "type": "string"
124
- }
125
- },
126
- "required": [
127
- "kind",
128
- "storyType",
129
- "refId"
130
- ]
131
- },
132
- {
133
- "type": "object",
134
- "properties": {
135
- "kind": {
136
- "const": "story",
137
- "type": "string"
138
- },
139
- "storyType": {
140
- "const": "footnote",
141
- "type": "string"
142
- },
143
- "noteId": {
144
- "type": "string"
145
- }
146
- },
147
- "required": [
148
- "kind",
149
- "storyType",
150
- "noteId"
151
- ]
152
- },
153
- {
154
- "type": "object",
155
- "properties": {
156
- "kind": {
157
- "const": "story",
158
- "type": "string"
159
- },
160
- "storyType": {
161
- "const": "endnote",
162
- "type": "string"
163
- },
164
- "noteId": {
165
- "type": "string"
166
- }
167
- },
168
- "required": [
169
- "kind",
170
- "storyType",
171
- "noteId"
172
- ]
173
- }
174
- ]
31
+ "limit": {
32
+ "type": "number",
33
+ "description": "Maximum blocks to return. Omit for all blocks. Only for action 'blocks'. Omit for other actions."
175
34
  },
176
- "unflattenLists": {
177
- "type": "boolean",
178
- "description": "When true, flattens nested list structures in output. Default: false."
35
+ "nodeTypes": {
36
+ "type": "array",
37
+ "items": {
38
+ "enum": [
39
+ "paragraph",
40
+ "heading",
41
+ "listItem",
42
+ "table",
43
+ "tableRow",
44
+ "tableCell",
45
+ "tableOfContents",
46
+ "image",
47
+ "sdt"
48
+ ]
49
+ },
50
+ "description": "Filter by block types (e.g. ['paragraph', 'heading']). Omit for all types. Only for action 'blocks'. Omit for other actions."
179
51
  }
180
52
  },
181
53
  "required": [
@@ -204,14 +76,6 @@
204
76
  ],
205
77
  "description": "The action to perform. One of: delete, insert, redo, replace, undo."
206
78
  },
207
- "doc": {
208
- "type": "string",
209
- "description": "Document path. Optional when a session is already open."
210
- },
211
- "sessionId": {
212
- "type": "string",
213
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
214
- },
215
79
  "force": {
216
80
  "type": "boolean",
217
81
  "description": "Bypass confirmation checks."
@@ -421,159 +285,13 @@
421
285
  ],
422
286
  "description": "Target address object. Use 'ref' instead if you have a search handle. Format: {kind:'text', blockId, range:{start,end}} or {kind:'block', nodeType, nodeId}."
423
287
  },
424
- "in": {
425
- "oneOf": [
426
- {
427
- "type": "object",
428
- "properties": {
429
- "kind": {
430
- "const": "story",
431
- "type": "string"
432
- },
433
- "storyType": {
434
- "const": "body",
435
- "type": "string"
436
- }
437
- },
438
- "required": [
439
- "kind",
440
- "storyType"
441
- ]
442
- },
443
- {
444
- "type": "object",
445
- "properties": {
446
- "kind": {
447
- "const": "story",
448
- "type": "string"
449
- },
450
- "storyType": {
451
- "const": "headerFooterSlot",
452
- "type": "string"
453
- },
454
- "section": {
455
- "type": "object",
456
- "properties": {
457
- "kind": {
458
- "const": "section",
459
- "type": "string"
460
- },
461
- "sectionId": {
462
- "type": "string"
463
- }
464
- },
465
- "required": [
466
- "kind",
467
- "sectionId"
468
- ]
469
- },
470
- "headerFooterKind": {
471
- "enum": [
472
- "header",
473
- "footer"
474
- ]
475
- },
476
- "variant": {
477
- "enum": [
478
- "default",
479
- "first",
480
- "even"
481
- ]
482
- },
483
- "resolution": {
484
- "enum": [
485
- "effective",
486
- "explicit"
487
- ]
488
- },
489
- "onWrite": {
490
- "enum": [
491
- "materializeIfInherited",
492
- "editResolvedPart",
493
- "error"
494
- ]
495
- }
496
- },
497
- "required": [
498
- "kind",
499
- "storyType",
500
- "section",
501
- "headerFooterKind",
502
- "variant"
503
- ]
504
- },
505
- {
506
- "type": "object",
507
- "properties": {
508
- "kind": {
509
- "const": "story",
510
- "type": "string"
511
- },
512
- "storyType": {
513
- "const": "headerFooterPart",
514
- "type": "string"
515
- },
516
- "refId": {
517
- "type": "string"
518
- }
519
- },
520
- "required": [
521
- "kind",
522
- "storyType",
523
- "refId"
524
- ]
525
- },
526
- {
527
- "type": "object",
528
- "properties": {
529
- "kind": {
530
- "const": "story",
531
- "type": "string"
532
- },
533
- "storyType": {
534
- "const": "footnote",
535
- "type": "string"
536
- },
537
- "noteId": {
538
- "type": "string"
539
- }
540
- },
541
- "required": [
542
- "kind",
543
- "storyType",
544
- "noteId"
545
- ]
546
- },
547
- {
548
- "type": "object",
549
- "properties": {
550
- "kind": {
551
- "const": "story",
552
- "type": "string"
553
- },
554
- "storyType": {
555
- "const": "endnote",
556
- "type": "string"
557
- },
558
- "noteId": {
559
- "type": "string"
560
- }
561
- },
562
- "required": [
563
- "kind",
564
- "storyType",
565
- "noteId"
566
- ]
567
- }
568
- ]
569
- },
570
288
  "value": {
571
289
  "type": "string",
572
- "description": "Text content to insert."
290
+ "description": "Text content to insert. Only for action 'insert'. Omit for other actions."
573
291
  },
574
292
  "type": {
575
293
  "type": "string",
576
- "description": "Content format: 'text' (default), 'markdown', or 'html'.",
294
+ "description": "Content format: 'text' (default), 'markdown', or 'html'. Only for action 'insert'. Omit for other actions.",
577
295
  "enum": [
578
296
  "text",
579
297
  "markdown",
@@ -598,11 +316,11 @@
598
316
  }
599
317
  }
600
318
  ],
601
- "description": "Document fragment to insert (structured content)."
319
+ "description": "Document fragment to insert (structured content). Only for actions 'insert', 'replace'. Omit for other actions."
602
320
  },
603
321
  "placement": {
604
322
  "type": "string",
605
- "description": "Where to place content relative to target: 'before', 'after', 'insideStart', or 'insideEnd'.",
323
+ "description": "Where to place content relative to target: 'before', 'after', 'insideStart', or 'insideEnd'. Only for action 'insert'. Omit for other actions.",
606
324
  "enum": [
607
325
  "before",
608
326
  "after",
@@ -620,7 +338,7 @@
620
338
  ]
621
339
  }
622
340
  },
623
- "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
341
+ "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables. Only for actions 'insert', 'replace'. Omit for other actions."
624
342
  },
625
343
  "blockId": {
626
344
  "type": "string",
@@ -636,11 +354,11 @@
636
354
  },
637
355
  "offset": {
638
356
  "type": "number",
639
- "description": "Character offset for insertion (alias for --start/--end with same value)."
357
+ "description": "Character offset for insertion (alias for --start/--end with same value). Only for action 'insert'. Omit for other actions."
640
358
  },
641
359
  "text": {
642
360
  "type": "string",
643
- "description": "Replacement text content."
361
+ "description": "Replacement text content. Only for action 'replace'. Omit for other actions."
644
362
  },
645
363
  "behavior": {
646
364
  "type": "string",
@@ -648,7 +366,7 @@
648
366
  "selection",
649
367
  "exact"
650
368
  ],
651
- "description": "Delete behavior: 'selection' (default) or 'exact'."
369
+ "description": "Delete behavior: 'selection' (default) or 'exact'. Only for action 'delete'. Omit for other actions."
652
370
  }
653
371
  },
654
372
  "required": [
@@ -662,7 +380,7 @@
662
380
  "type": "function",
663
381
  "function": {
664
382
  "name": "superdoc_format",
665
- "description": "Change text and paragraph formatting",
383
+ "description": "Change text and paragraph formatting. Use action \"inline\" with a search ref for bold/italic/etc. Use action \"set_style\" with a styleId from superdoc_get_content info to apply a named paragraph style.",
666
384
  "parameters": {
667
385
  "type": "object",
668
386
  "properties": {
@@ -678,14 +396,6 @@
678
396
  ],
679
397
  "description": "The action to perform. One of: inline, set_alignment, set_direction, set_indentation, set_spacing, set_style."
680
398
  },
681
- "doc": {
682
- "type": "string",
683
- "description": "Document path. Optional when a session is already open."
684
- },
685
- "sessionId": {
686
- "type": "string",
687
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
688
- },
689
399
  "force": {
690
400
  "type": "boolean",
691
401
  "description": "Bypass confirmation checks."
@@ -861,152 +571,6 @@
861
571
  ],
862
572
  "description": "Selection target: {kind:'selection', start:{kind:'text', blockId, offset}, end:{kind:'text', blockId, offset}}. Use 'ref' instead when you have a search result handle. Required for actions 'set_style', 'set_alignment', 'set_indentation', 'set_spacing', 'set_direction'."
863
573
  },
864
- "in": {
865
- "oneOf": [
866
- {
867
- "type": "object",
868
- "properties": {
869
- "kind": {
870
- "const": "story",
871
- "type": "string"
872
- },
873
- "storyType": {
874
- "const": "body",
875
- "type": "string"
876
- }
877
- },
878
- "required": [
879
- "kind",
880
- "storyType"
881
- ]
882
- },
883
- {
884
- "type": "object",
885
- "properties": {
886
- "kind": {
887
- "const": "story",
888
- "type": "string"
889
- },
890
- "storyType": {
891
- "const": "headerFooterSlot",
892
- "type": "string"
893
- },
894
- "section": {
895
- "type": "object",
896
- "properties": {
897
- "kind": {
898
- "const": "section",
899
- "type": "string"
900
- },
901
- "sectionId": {
902
- "type": "string"
903
- }
904
- },
905
- "required": [
906
- "kind",
907
- "sectionId"
908
- ]
909
- },
910
- "headerFooterKind": {
911
- "enum": [
912
- "header",
913
- "footer"
914
- ]
915
- },
916
- "variant": {
917
- "enum": [
918
- "default",
919
- "first",
920
- "even"
921
- ]
922
- },
923
- "resolution": {
924
- "enum": [
925
- "effective",
926
- "explicit"
927
- ]
928
- },
929
- "onWrite": {
930
- "enum": [
931
- "materializeIfInherited",
932
- "editResolvedPart",
933
- "error"
934
- ]
935
- }
936
- },
937
- "required": [
938
- "kind",
939
- "storyType",
940
- "section",
941
- "headerFooterKind",
942
- "variant"
943
- ]
944
- },
945
- {
946
- "type": "object",
947
- "properties": {
948
- "kind": {
949
- "const": "story",
950
- "type": "string"
951
- },
952
- "storyType": {
953
- "const": "headerFooterPart",
954
- "type": "string"
955
- },
956
- "refId": {
957
- "type": "string"
958
- }
959
- },
960
- "required": [
961
- "kind",
962
- "storyType",
963
- "refId"
964
- ]
965
- },
966
- {
967
- "type": "object",
968
- "properties": {
969
- "kind": {
970
- "const": "story",
971
- "type": "string"
972
- },
973
- "storyType": {
974
- "const": "footnote",
975
- "type": "string"
976
- },
977
- "noteId": {
978
- "type": "string"
979
- }
980
- },
981
- "required": [
982
- "kind",
983
- "storyType",
984
- "noteId"
985
- ]
986
- },
987
- {
988
- "type": "object",
989
- "properties": {
990
- "kind": {
991
- "const": "story",
992
- "type": "string"
993
- },
994
- "storyType": {
995
- "const": "endnote",
996
- "type": "string"
997
- },
998
- "noteId": {
999
- "type": "string"
1000
- }
1001
- },
1002
- "required": [
1003
- "kind",
1004
- "storyType",
1005
- "noteId"
1006
- ]
1007
- }
1008
- ]
1009
- },
1010
574
  "inline": {
1011
575
  "type": "object",
1012
576
  "properties": {
@@ -1266,27 +830,15 @@
1266
830
  "type": "boolean"
1267
831
  }
1268
832
  },
1269
- "description": "Inline formatting properties to apply. Set a property to apply it, use null to clear it. Example: {bold: true, italic: true} or {bold: null} to remove bold."
833
+ "description": "Inline formatting properties to apply. Set a property to apply it, use null to clear it. Example: {bold: true, italic: true} or {bold: null} to remove bold. Only for action 'inline'. Omit for other actions."
1270
834
  },
1271
835
  "ref": {
1272
836
  "type": "string",
1273
- "description": "Handle ref string from a superdoc_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting."
1274
- },
1275
- "blockId": {
1276
- "type": "string",
1277
- "description": "Block ID of the target paragraph."
1278
- },
1279
- "start": {
1280
- "type": "number",
1281
- "description": "Start offset within the block (character index)."
1282
- },
1283
- "end": {
1284
- "type": "number",
1285
- "description": "End offset within the block (character index)."
837
+ "description": "Handle ref string from a superdoc_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting. Only for action 'inline'. Omit for other actions."
1286
838
  },
1287
839
  "styleId": {
1288
840
  "type": "string",
1289
- "description": "Required for action 'set_style'."
841
+ "description": "Named paragraph style ID (e.g. 'Normal', 'Heading1', 'BodyText'). Use superdoc_search to find a nearby paragraph, then inspect its style to determine the correct styleId. Required for action 'set_style'."
1290
842
  },
1291
843
  "alignment": {
1292
844
  "type": "string",
@@ -1300,35 +852,35 @@
1300
852
  },
1301
853
  "left": {
1302
854
  "type": "number",
1303
- "description": "Left indentation in twips (1440 = 1 inch)."
855
+ "description": "Left indentation in twips (1440 = 1 inch). Only for action 'set_indentation'. Omit for other actions."
1304
856
  },
1305
857
  "right": {
1306
858
  "type": "number",
1307
- "description": "Right indentation in twips (1440 = 1 inch)."
859
+ "description": "Right indentation in twips (1440 = 1 inch). Only for action 'set_indentation'. Omit for other actions."
1308
860
  },
1309
861
  "firstLine": {
1310
862
  "type": "number",
1311
- "description": "First line indent in twips. Cannot be combined with hanging."
863
+ "description": "First line indent in twips. Cannot be combined with hanging. Only for action 'set_indentation'. Omit for other actions."
1312
864
  },
1313
865
  "hanging": {
1314
866
  "type": "number",
1315
- "description": "Hanging indent in twips. Cannot be combined with firstLine."
867
+ "description": "Hanging indent in twips. Cannot be combined with firstLine. Only for action 'set_indentation'. Omit for other actions."
1316
868
  },
1317
869
  "before": {
1318
870
  "type": "number",
1319
- "description": "Space before paragraph in twips (20 twips = 1pt)."
871
+ "description": "Space before paragraph in twips (20 twips = 1pt). Only for action 'set_spacing'. Omit for other actions."
1320
872
  },
1321
873
  "after": {
1322
874
  "type": "number",
1323
- "description": "Space after paragraph in twips (20 twips = 1pt)."
875
+ "description": "Space after paragraph in twips (20 twips = 1pt). Only for action 'set_spacing'. Omit for other actions."
1324
876
  },
1325
877
  "line": {
1326
878
  "type": "number",
1327
- "description": "Line spacing value. Meaning depends on lineRule. Must be provided together with lineRule."
879
+ "description": "Line spacing value. Meaning depends on lineRule. Must be provided together with lineRule. Only for action 'set_spacing'. Omit for other actions."
1328
880
  },
1329
881
  "lineRule": {
1330
882
  "type": "string",
1331
- "description": "Line spacing rule. Required when 'line' is set.",
883
+ "description": "Line spacing rule. Required when 'line' is set. Only for action 'set_spacing'. Omit for other actions.",
1332
884
  "enum": [
1333
885
  "auto",
1334
886
  "exact",
@@ -1348,7 +900,8 @@
1348
900
  "enum": [
1349
901
  "preserve",
1350
902
  "matchDirection"
1351
- ]
903
+ ],
904
+ "description": "Only for action 'set_direction'. Omit for other actions."
1352
905
  }
1353
906
  },
1354
907
  "required": [
@@ -1362,187 +915,33 @@
1362
915
  "type": "function",
1363
916
  "function": {
1364
917
  "name": "superdoc_create",
1365
- "description": "Create structural block elements",
918
+ "description": "Create one paragraph or heading per call. After creating, search for it and apply formatting (fontFamily, fontSize) from neighboring blocks. For multiple paragraphs, use superdoc_mutations with text.insert steps instead of calling create repeatedly.",
1366
919
  "parameters": {
1367
920
  "type": "object",
1368
921
  "properties": {
1369
922
  "action": {
1370
923
  "type": "string",
1371
- "enum": [
1372
- "heading",
1373
- "paragraph"
1374
- ],
1375
- "description": "The action to perform. One of: heading, paragraph."
1376
- },
1377
- "doc": {
1378
- "type": "string",
1379
- "description": "Document path. Optional when a session is already open."
1380
- },
1381
- "sessionId": {
1382
- "type": "string",
1383
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
1384
- },
1385
- "force": {
1386
- "type": "boolean",
1387
- "description": "Bypass confirmation checks."
1388
- },
1389
- "changeMode": {
1390
- "type": "string",
1391
- "enum": [
1392
- "direct",
1393
- "tracked"
1394
- ],
1395
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
1396
- },
1397
- "dryRun": {
1398
- "type": "boolean",
1399
- "description": "Preview the result without applying changes."
1400
- },
1401
- "in": {
1402
- "oneOf": [
1403
- {
1404
- "type": "object",
1405
- "properties": {
1406
- "kind": {
1407
- "const": "story",
1408
- "type": "string"
1409
- },
1410
- "storyType": {
1411
- "const": "body",
1412
- "type": "string"
1413
- }
1414
- },
1415
- "required": [
1416
- "kind",
1417
- "storyType"
1418
- ]
1419
- },
1420
- {
1421
- "type": "object",
1422
- "properties": {
1423
- "kind": {
1424
- "const": "story",
1425
- "type": "string"
1426
- },
1427
- "storyType": {
1428
- "const": "headerFooterSlot",
1429
- "type": "string"
1430
- },
1431
- "section": {
1432
- "type": "object",
1433
- "properties": {
1434
- "kind": {
1435
- "const": "section",
1436
- "type": "string"
1437
- },
1438
- "sectionId": {
1439
- "type": "string"
1440
- }
1441
- },
1442
- "required": [
1443
- "kind",
1444
- "sectionId"
1445
- ]
1446
- },
1447
- "headerFooterKind": {
1448
- "enum": [
1449
- "header",
1450
- "footer"
1451
- ]
1452
- },
1453
- "variant": {
1454
- "enum": [
1455
- "default",
1456
- "first",
1457
- "even"
1458
- ]
1459
- },
1460
- "resolution": {
1461
- "enum": [
1462
- "effective",
1463
- "explicit"
1464
- ]
1465
- },
1466
- "onWrite": {
1467
- "enum": [
1468
- "materializeIfInherited",
1469
- "editResolvedPart",
1470
- "error"
1471
- ]
1472
- }
1473
- },
1474
- "required": [
1475
- "kind",
1476
- "storyType",
1477
- "section",
1478
- "headerFooterKind",
1479
- "variant"
1480
- ]
1481
- },
1482
- {
1483
- "type": "object",
1484
- "properties": {
1485
- "kind": {
1486
- "const": "story",
1487
- "type": "string"
1488
- },
1489
- "storyType": {
1490
- "const": "headerFooterPart",
1491
- "type": "string"
1492
- },
1493
- "refId": {
1494
- "type": "string"
1495
- }
1496
- },
1497
- "required": [
1498
- "kind",
1499
- "storyType",
1500
- "refId"
1501
- ]
1502
- },
1503
- {
1504
- "type": "object",
1505
- "properties": {
1506
- "kind": {
1507
- "const": "story",
1508
- "type": "string"
1509
- },
1510
- "storyType": {
1511
- "const": "footnote",
1512
- "type": "string"
1513
- },
1514
- "noteId": {
1515
- "type": "string"
1516
- }
1517
- },
1518
- "required": [
1519
- "kind",
1520
- "storyType",
1521
- "noteId"
1522
- ]
1523
- },
1524
- {
1525
- "type": "object",
1526
- "properties": {
1527
- "kind": {
1528
- "const": "story",
1529
- "type": "string"
1530
- },
1531
- "storyType": {
1532
- "const": "endnote",
1533
- "type": "string"
1534
- },
1535
- "noteId": {
1536
- "type": "string"
1537
- }
1538
- },
1539
- "required": [
1540
- "kind",
1541
- "storyType",
1542
- "noteId"
1543
- ]
1544
- }
1545
- ]
924
+ "enum": [
925
+ "heading",
926
+ "paragraph"
927
+ ],
928
+ "description": "The action to perform. One of: heading, paragraph."
929
+ },
930
+ "force": {
931
+ "type": "boolean",
932
+ "description": "Bypass confirmation checks."
933
+ },
934
+ "changeMode": {
935
+ "type": "string",
936
+ "enum": [
937
+ "direct",
938
+ "tracked"
939
+ ],
940
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
941
+ },
942
+ "dryRun": {
943
+ "type": "boolean",
944
+ "description": "Preview the result without applying changes."
1546
945
  },
1547
946
  "at": {
1548
947
  "oneOf": [
@@ -1661,7 +1060,7 @@
1661
1060
  },
1662
1061
  "text": {
1663
1062
  "type": "string",
1664
- "description": "Paragraph text content."
1063
+ "description": "Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call superdoc_create separately for each item — do NOT use newlines to put multiple items in one paragraph."
1665
1064
  },
1666
1065
  "input": {
1667
1066
  "type": "object",
@@ -1700,14 +1099,6 @@
1700
1099
  ],
1701
1100
  "description": "The action to perform. One of: create, detach, indent, insert, outdent, set_level, set_type."
1702
1101
  },
1703
- "doc": {
1704
- "type": "string",
1705
- "description": "Document path. Optional when a session is already open."
1706
- },
1707
- "sessionId": {
1708
- "type": "string",
1709
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
1710
- },
1711
1102
  "force": {
1712
1103
  "type": "boolean",
1713
1104
  "description": "Bypass confirmation checks."
@@ -1756,7 +1147,7 @@
1756
1147
  },
1757
1148
  "text": {
1758
1149
  "type": "string",
1759
- "description": "Text content for the new list item."
1150
+ "description": "Text content for the new list item. Only for action 'insert'. Omit for other actions."
1760
1151
  },
1761
1152
  "input": {
1762
1153
  "type": "object",
@@ -1768,7 +1159,7 @@
1768
1159
  },
1769
1160
  "mode": {
1770
1161
  "type": "string",
1771
- "description": "Required. Creation mode: 'empty' creates a new empty list at the paragraph specified by 'at'; 'fromParagraphs' converts existing paragraph(s) specified by 'target' into list items. Required for action 'create'.",
1162
+ "description": "Required. 'fromParagraphs' converts existing paragraphs into list items — each paragraph becomes one item, so create one paragraph per item first. 'empty' creates a new empty list at 'at'. Required for action 'create'.",
1772
1163
  "enum": [
1773
1164
  "empty",
1774
1165
  "fromParagraphs"
@@ -1794,7 +1185,7 @@
1794
1185
  "nodeType",
1795
1186
  "nodeId"
1796
1187
  ],
1797
- "description": "Required when mode is 'empty'. The paragraph to create the list at. Format: {kind:'block', nodeType:'paragraph', nodeId:'<id>'}."
1188
+ "description": "Required when mode is 'empty'. The paragraph to create the list at. Format: {kind:'block', nodeType:'paragraph', nodeId:'<id>'}. Only for action 'create'. Omit for other actions."
1798
1189
  },
1799
1190
  "kind": {
1800
1191
  "type": "string",
@@ -1810,7 +1201,7 @@
1810
1201
  },
1811
1202
  "preset": {
1812
1203
  "type": "string",
1813
- "description": "Predefined list style preset. Overrides 'kind' with a specific numbering or bullet format.",
1204
+ "description": "Predefined list style preset. Overrides 'kind' with a specific numbering or bullet format. Only for action 'create'. Omit for other actions.",
1814
1205
  "enum": [
1815
1206
  "decimal",
1816
1207
  "decimalParenthesis",
@@ -1893,7 +1284,8 @@
1893
1284
  "required": [
1894
1285
  "version",
1895
1286
  "levels"
1896
- ]
1287
+ ],
1288
+ "description": "Only for action 'create'. Omit for other actions."
1897
1289
  },
1898
1290
  "sequence": {
1899
1291
  "oneOf": [
@@ -1924,11 +1316,12 @@
1924
1316
  "mode"
1925
1317
  ]
1926
1318
  }
1927
- ]
1319
+ ],
1320
+ "description": "Only for action 'create'. Omit for other actions."
1928
1321
  },
1929
1322
  "continuity": {
1930
1323
  "type": "string",
1931
- "description": "Numbering continuity: 'preserve' keeps numbering; 'none' restarts.",
1324
+ "description": "Numbering continuity: 'preserve' keeps numbering; 'none' restarts. Only for action 'set_type'. Omit for other actions.",
1932
1325
  "enum": [
1933
1326
  "preserve",
1934
1327
  "none"
@@ -1961,14 +1354,6 @@
1961
1354
  ],
1962
1355
  "description": "The action to perform. One of: create, delete, get, list, update."
1963
1356
  },
1964
- "doc": {
1965
- "type": "string",
1966
- "description": "Document path. Optional when a session is already open."
1967
- },
1968
- "sessionId": {
1969
- "type": "string",
1970
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
1971
- },
1972
1357
  "force": {
1973
1358
  "type": "boolean",
1974
1359
  "description": "Bypass confirmation checks."
@@ -2016,23 +1401,11 @@
2016
1401
  "blockId",
2017
1402
  "range"
2018
1403
  ],
2019
- "description": "Text range to anchor the comment: {kind:'text', blockId:'...', range:{start:N, end:N}}."
1404
+ "description": "Text range to anchor the comment: {kind:'text', blockId:'...', range:{start:N, end:N}}. Only for actions 'create', 'update'. Omit for other actions."
2020
1405
  },
2021
1406
  "parentId": {
2022
1407
  "type": "string",
2023
- "description": "Parent comment ID for creating a threaded reply."
2024
- },
2025
- "blockId": {
2026
- "type": "string",
2027
- "description": "Block ID of the target paragraph."
2028
- },
2029
- "start": {
2030
- "type": "number",
2031
- "description": "Start offset within the block (character index)."
2032
- },
2033
- "end": {
2034
- "type": "number",
2035
- "description": "End offset within the block (character index)."
1408
+ "description": "Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions."
2036
1409
  },
2037
1410
  "id": {
2038
1411
  "type": "string",
@@ -2040,26 +1413,26 @@
2040
1413
  },
2041
1414
  "status": {
2042
1415
  "type": "string",
2043
- "description": "Set comment status. Use 'resolved' to mark as resolved.",
1416
+ "description": "Set comment status. Use 'resolved' to mark as resolved. Only for action 'update'. Omit for other actions.",
2044
1417
  "enum": [
2045
1418
  "resolved"
2046
1419
  ]
2047
1420
  },
2048
1421
  "isInternal": {
2049
1422
  "type": "boolean",
2050
- "description": "When true, marks the comment as internal (hidden from external collaborators)."
1423
+ "description": "When true, marks the comment as internal (hidden from external collaborators). Only for action 'update'. Omit for other actions."
2051
1424
  },
2052
1425
  "includeResolved": {
2053
1426
  "type": "boolean",
2054
- "description": "When true, includes resolved comments in results. Default: false."
1427
+ "description": "When true, includes resolved comments in results. Default: false. Only for action 'list'. Omit for other actions."
2055
1428
  },
2056
1429
  "limit": {
2057
1430
  "type": "number",
2058
- "description": "Maximum number of comments to return."
1431
+ "description": "Maximum number of comments to return. Only for action 'list'. Omit for other actions."
2059
1432
  },
2060
1433
  "offset": {
2061
1434
  "type": "number",
2062
- "description": "Number of comments to skip for pagination."
1435
+ "description": "Number of comments to skip for pagination. Only for action 'list'. Omit for other actions."
2063
1436
  }
2064
1437
  },
2065
1438
  "required": [
@@ -2085,25 +1458,17 @@
2085
1458
  ],
2086
1459
  "description": "The action to perform. One of: decide, list."
2087
1460
  },
2088
- "doc": {
2089
- "type": "string",
2090
- "description": "Document path. Optional when a session is already open."
2091
- },
2092
- "sessionId": {
2093
- "type": "string",
2094
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
2095
- },
2096
1461
  "limit": {
2097
1462
  "type": "number",
2098
- "description": "Maximum number of tracked changes to return."
1463
+ "description": "Maximum number of tracked changes to return. Only for action 'list'. Omit for other actions."
2099
1464
  },
2100
1465
  "offset": {
2101
1466
  "type": "number",
2102
- "description": "Number of tracked changes to skip for pagination."
1467
+ "description": "Number of tracked changes to skip for pagination. Only for action 'list'. Omit for other actions."
2103
1468
  },
2104
1469
  "type": {
2105
1470
  "type": "string",
2106
- "description": "Filter by change type: 'insert', 'delete', or 'format'.",
1471
+ "description": "Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions.",
2107
1472
  "enum": [
2108
1473
  "insert",
2109
1474
  "delete",
@@ -2112,7 +1477,7 @@
2112
1477
  },
2113
1478
  "force": {
2114
1479
  "type": "boolean",
2115
- "description": "Bypass confirmation checks."
1480
+ "description": "Bypass confirmation checks. Only for action 'decide'. Omit for other actions."
2116
1481
  },
2117
1482
  "changeMode": {
2118
1483
  "type": "string",
@@ -2120,7 +1485,7 @@
2120
1485
  "direct",
2121
1486
  "tracked"
2122
1487
  ],
2123
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
1488
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions. Only for action 'decide'. Omit for other actions."
2124
1489
  },
2125
1490
  "decision": {
2126
1491
  "type": "string",
@@ -2175,160 +1540,6 @@
2175
1540
  "parameters": {
2176
1541
  "type": "object",
2177
1542
  "properties": {
2178
- "doc": {
2179
- "type": "string",
2180
- "description": "Document path. Optional when a session is already open."
2181
- },
2182
- "sessionId": {
2183
- "type": "string",
2184
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
2185
- },
2186
- "in": {
2187
- "oneOf": [
2188
- {
2189
- "type": "object",
2190
- "properties": {
2191
- "kind": {
2192
- "const": "story",
2193
- "type": "string"
2194
- },
2195
- "storyType": {
2196
- "const": "body",
2197
- "type": "string"
2198
- }
2199
- },
2200
- "required": [
2201
- "kind",
2202
- "storyType"
2203
- ]
2204
- },
2205
- {
2206
- "type": "object",
2207
- "properties": {
2208
- "kind": {
2209
- "const": "story",
2210
- "type": "string"
2211
- },
2212
- "storyType": {
2213
- "const": "headerFooterSlot",
2214
- "type": "string"
2215
- },
2216
- "section": {
2217
- "type": "object",
2218
- "properties": {
2219
- "kind": {
2220
- "const": "section",
2221
- "type": "string"
2222
- },
2223
- "sectionId": {
2224
- "type": "string"
2225
- }
2226
- },
2227
- "required": [
2228
- "kind",
2229
- "sectionId"
2230
- ]
2231
- },
2232
- "headerFooterKind": {
2233
- "enum": [
2234
- "header",
2235
- "footer"
2236
- ]
2237
- },
2238
- "variant": {
2239
- "enum": [
2240
- "default",
2241
- "first",
2242
- "even"
2243
- ]
2244
- },
2245
- "resolution": {
2246
- "enum": [
2247
- "effective",
2248
- "explicit"
2249
- ]
2250
- },
2251
- "onWrite": {
2252
- "enum": [
2253
- "materializeIfInherited",
2254
- "editResolvedPart",
2255
- "error"
2256
- ]
2257
- }
2258
- },
2259
- "required": [
2260
- "kind",
2261
- "storyType",
2262
- "section",
2263
- "headerFooterKind",
2264
- "variant"
2265
- ]
2266
- },
2267
- {
2268
- "type": "object",
2269
- "properties": {
2270
- "kind": {
2271
- "const": "story",
2272
- "type": "string"
2273
- },
2274
- "storyType": {
2275
- "const": "headerFooterPart",
2276
- "type": "string"
2277
- },
2278
- "refId": {
2279
- "type": "string"
2280
- }
2281
- },
2282
- "required": [
2283
- "kind",
2284
- "storyType",
2285
- "refId"
2286
- ]
2287
- },
2288
- {
2289
- "type": "object",
2290
- "properties": {
2291
- "kind": {
2292
- "const": "story",
2293
- "type": "string"
2294
- },
2295
- "storyType": {
2296
- "const": "footnote",
2297
- "type": "string"
2298
- },
2299
- "noteId": {
2300
- "type": "string"
2301
- }
2302
- },
2303
- "required": [
2304
- "kind",
2305
- "storyType",
2306
- "noteId"
2307
- ]
2308
- },
2309
- {
2310
- "type": "object",
2311
- "properties": {
2312
- "kind": {
2313
- "const": "story",
2314
- "type": "string"
2315
- },
2316
- "storyType": {
2317
- "const": "endnote",
2318
- "type": "string"
2319
- },
2320
- "noteId": {
2321
- "type": "string"
2322
- }
2323
- },
2324
- "required": [
2325
- "kind",
2326
- "storyType",
2327
- "noteId"
2328
- ]
2329
- }
2330
- ]
2331
- },
2332
1543
  "select": {
2333
1544
  "oneOf": [
2334
1545
  {
@@ -2495,163 +1706,9 @@
2495
1706
  ],
2496
1707
  "description": "The action to perform. One of: apply, preview."
2497
1708
  },
2498
- "doc": {
2499
- "type": "string",
2500
- "description": "Document path. Optional when a session is already open."
2501
- },
2502
- "sessionId": {
2503
- "type": "string",
2504
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
2505
- },
2506
- "in": {
2507
- "oneOf": [
2508
- {
2509
- "type": "object",
2510
- "properties": {
2511
- "kind": {
2512
- "const": "story",
2513
- "type": "string"
2514
- },
2515
- "storyType": {
2516
- "const": "body",
2517
- "type": "string"
2518
- }
2519
- },
2520
- "required": [
2521
- "kind",
2522
- "storyType"
2523
- ]
2524
- },
2525
- {
2526
- "type": "object",
2527
- "properties": {
2528
- "kind": {
2529
- "const": "story",
2530
- "type": "string"
2531
- },
2532
- "storyType": {
2533
- "const": "headerFooterSlot",
2534
- "type": "string"
2535
- },
2536
- "section": {
2537
- "type": "object",
2538
- "properties": {
2539
- "kind": {
2540
- "const": "section",
2541
- "type": "string"
2542
- },
2543
- "sectionId": {
2544
- "type": "string"
2545
- }
2546
- },
2547
- "required": [
2548
- "kind",
2549
- "sectionId"
2550
- ]
2551
- },
2552
- "headerFooterKind": {
2553
- "enum": [
2554
- "header",
2555
- "footer"
2556
- ]
2557
- },
2558
- "variant": {
2559
- "enum": [
2560
- "default",
2561
- "first",
2562
- "even"
2563
- ]
2564
- },
2565
- "resolution": {
2566
- "enum": [
2567
- "effective",
2568
- "explicit"
2569
- ]
2570
- },
2571
- "onWrite": {
2572
- "enum": [
2573
- "materializeIfInherited",
2574
- "editResolvedPart",
2575
- "error"
2576
- ]
2577
- }
2578
- },
2579
- "required": [
2580
- "kind",
2581
- "storyType",
2582
- "section",
2583
- "headerFooterKind",
2584
- "variant"
2585
- ]
2586
- },
2587
- {
2588
- "type": "object",
2589
- "properties": {
2590
- "kind": {
2591
- "const": "story",
2592
- "type": "string"
2593
- },
2594
- "storyType": {
2595
- "const": "headerFooterPart",
2596
- "type": "string"
2597
- },
2598
- "refId": {
2599
- "type": "string"
2600
- }
2601
- },
2602
- "required": [
2603
- "kind",
2604
- "storyType",
2605
- "refId"
2606
- ]
2607
- },
2608
- {
2609
- "type": "object",
2610
- "properties": {
2611
- "kind": {
2612
- "const": "story",
2613
- "type": "string"
2614
- },
2615
- "storyType": {
2616
- "const": "footnote",
2617
- "type": "string"
2618
- },
2619
- "noteId": {
2620
- "type": "string"
2621
- }
2622
- },
2623
- "required": [
2624
- "kind",
2625
- "storyType",
2626
- "noteId"
2627
- ]
2628
- },
2629
- {
2630
- "type": "object",
2631
- "properties": {
2632
- "kind": {
2633
- "const": "story",
2634
- "type": "string"
2635
- },
2636
- "storyType": {
2637
- "const": "endnote",
2638
- "type": "string"
2639
- },
2640
- "noteId": {
2641
- "type": "string"
2642
- }
2643
- },
2644
- "required": [
2645
- "kind",
2646
- "storyType",
2647
- "noteId"
2648
- ]
2649
- }
2650
- ]
2651
- },
2652
1709
  "expectedRevision": {
2653
1710
  "type": "string",
2654
- "description": "Document revision for optimistic concurrency. Mutation fails if document was modified since this revision."
1711
+ "description": "Document revision for optimistic concurrency. Mutation fails if document was modified since this revision. Only for action 'preview'. Omit for other actions."
2655
1712
  },
2656
1713
  "atomic": {
2657
1714
  "type": "boolean",
@@ -4574,7 +3631,7 @@
4574
3631
  },
4575
3632
  "force": {
4576
3633
  "type": "boolean",
4577
- "description": "Bypass confirmation checks."
3634
+ "description": "Bypass confirmation checks. Only for action 'apply'. Omit for other actions."
4578
3635
  }
4579
3636
  },
4580
3637
  "required": [