@superdoc-dev/sdk 1.8.0-next.5 → 1.8.0-next.7
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/generated/client.cjs +4 -0
- package/dist/generated/client.d.ts +97 -0
- package/dist/generated/client.d.ts.map +1 -1
- package/dist/generated/client.js +4 -0
- package/dist/generated/contract.cjs +875 -226
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +875 -226
- package/dist/generated/intent-dispatch.generated.cjs +5 -0
- package/dist/generated/intent-dispatch.generated.d.ts.map +1 -1
- package/dist/generated/intent-dispatch.generated.js +5 -0
- package/package.json +6 -6
- package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
- package/tools/catalog.json +85 -4
- package/tools/intent_dispatch_generated.py +10 -0
- package/tools/prompt-templates/system-prompt-core.md +88 -0
- package/tools/system-prompt-mcp.md +88 -0
- package/tools/system-prompt.md +88 -0
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +47 -4
- package/tools/tools.generic.json +53 -5
- package/tools/tools.openai.json +47 -4
- package/tools/tools.vercel.json +47 -4
|
@@ -1079,22 +1079,27 @@
|
|
|
1079
1079
|
},
|
|
1080
1080
|
{
|
|
1081
1081
|
"name": "superdoc_list",
|
|
1082
|
-
"description": "Create and manipulate bullet and numbered lists.
|
|
1082
|
+
"description": "Create and manipulate bullet and numbered lists. Most actions require a list-item target: {kind:\"block\", nodeType:\"listItem\", nodeId:\"<id>\"}. Exceptions: \"create\" and \"attach\" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via superdoc_get_content({action:\"blocks\"}) — pick listItem blocks for most actions, paragraph blocks for create/attach.\n\nCREATE & CONVERT:\n• \"create\" — make a NEW list from paragraphs. Two modes: mode:\"empty\" with at:{kind:\"block\", nodeType:\"paragraph\", nodeId} converts a single paragraph; mode:\"fromParagraphs\" with target:{from:{...paragraph block address}, to:{...paragraph block address}} converts a range — ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset (\"disc\"|\"circle\"|\"square\"|\"dash\" for bullets; \"decimal\"|\"decimalParenthesis\"|\"lowerLetter\"|\"upperLetter\"|\"lowerRoman\"|\"upperRoman\" for ordered) or a custom style. Use \"create\" to start a fresh list — NOT to extend an existing one (use \"attach\" for that).\n• \"attach\" — add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:{paragraph block address} (or {from, to} range of paragraphs) + attachTo:{kind:\"block\", nodeType:\"listItem\", nodeId:\"<any item in destination list>\"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see \"join\" below).\n• \"set_type\" — convert an existing list between ordered and bullet. Pass target:{listItem} + kind:\"ordered\" or \"bullet\". Adjacent compatible sequences are merged automatically to preserve continuous numbering.\n• \"detach\" — convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"insert\" — add a new list item adjacent to an existing item in the same list. Pass target:{listItem} + position:\"before\"|\"after\" + optional text. Use this (NOT superdoc_create) to add items to an existing list.\n• \"indent\" / \"outdent\" — bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\" — jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"set_value\" — restart numbering at the target. Pass target:{listItem} + value:<number> (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence.\n• \"continue_previous\" — make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:{listItem of the sequence you want to renumber}. Fails with NO_COMPATIBLE_PREVIOUS or INCOMPATIBLE_DEFINITIONS if no matching prior sequence exists.\n\nSEQUENCE SHAPE (merge / split):\n• \"merge\" — merge the target's sequence with an adjacent one into one continuous list. Pass target:{listItem} + direction:\"withPrevious\" or \"withNext\". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously.\n• \"split\" — split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:{listItem}; add restartNumbering:false to keep the count continuing instead of restarting.",
|
|
1083
1083
|
"input_schema": {
|
|
1084
1084
|
"type": "object",
|
|
1085
1085
|
"properties": {
|
|
1086
1086
|
"action": {
|
|
1087
1087
|
"type": "string",
|
|
1088
1088
|
"enum": [
|
|
1089
|
+
"attach",
|
|
1090
|
+
"continue_previous",
|
|
1089
1091
|
"create",
|
|
1090
1092
|
"detach",
|
|
1091
1093
|
"indent",
|
|
1092
1094
|
"insert",
|
|
1095
|
+
"merge",
|
|
1093
1096
|
"outdent",
|
|
1094
1097
|
"set_level",
|
|
1095
|
-
"set_type"
|
|
1098
|
+
"set_type",
|
|
1099
|
+
"set_value",
|
|
1100
|
+
"split"
|
|
1096
1101
|
],
|
|
1097
|
-
"description": "The action to perform. One of: create, detach, indent, insert, outdent, set_level, set_type."
|
|
1102
|
+
"description": "The action to perform. One of: attach, continue_previous, create, detach, indent, insert, merge, outdent, set_level, set_type, set_value, split."
|
|
1098
1103
|
},
|
|
1099
1104
|
"force": {
|
|
1100
1105
|
"type": "boolean",
|
|
@@ -1132,7 +1137,7 @@
|
|
|
1132
1137
|
"nodeType",
|
|
1133
1138
|
"nodeId"
|
|
1134
1139
|
],
|
|
1135
|
-
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'detach', 'indent', 'outdent', 'set_level', 'set_type'."
|
|
1140
|
+
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'attach', 'detach', 'indent', 'outdent', 'merge', 'split', 'set_level', 'set_value', 'continue_previous', 'set_type'."
|
|
1136
1141
|
},
|
|
1137
1142
|
"position": {
|
|
1138
1143
|
"type": "string",
|
|
@@ -1316,6 +1321,44 @@
|
|
|
1316
1321
|
],
|
|
1317
1322
|
"description": "Only for action 'create'. Omit for other actions."
|
|
1318
1323
|
},
|
|
1324
|
+
"attachTo": {
|
|
1325
|
+
"type": "object",
|
|
1326
|
+
"properties": {
|
|
1327
|
+
"kind": {
|
|
1328
|
+
"const": "block",
|
|
1329
|
+
"type": "string"
|
|
1330
|
+
},
|
|
1331
|
+
"nodeType": {
|
|
1332
|
+
"const": "listItem",
|
|
1333
|
+
"type": "string"
|
|
1334
|
+
},
|
|
1335
|
+
"nodeId": {
|
|
1336
|
+
"type": "string"
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
"required": [
|
|
1340
|
+
"kind",
|
|
1341
|
+
"nodeType",
|
|
1342
|
+
"nodeId"
|
|
1343
|
+
],
|
|
1344
|
+
"description": "Required for action 'attach'."
|
|
1345
|
+
},
|
|
1346
|
+
"direction": {
|
|
1347
|
+
"type": "string",
|
|
1348
|
+
"enum": [
|
|
1349
|
+
"withPrevious",
|
|
1350
|
+
"withNext"
|
|
1351
|
+
],
|
|
1352
|
+
"description": "Required for action 'merge'."
|
|
1353
|
+
},
|
|
1354
|
+
"restartNumbering": {
|
|
1355
|
+
"type": "boolean",
|
|
1356
|
+
"description": "Only for action 'split'. Omit for other actions."
|
|
1357
|
+
},
|
|
1358
|
+
"value": {
|
|
1359
|
+
"type": "object",
|
|
1360
|
+
"description": "Required for action 'set_value'."
|
|
1361
|
+
},
|
|
1319
1362
|
"continuity": {
|
|
1320
1363
|
"type": "string",
|
|
1321
1364
|
"description": "Numbering continuity: 'preserve' keeps numbering; 'none' restarts. Only for action 'set_type'. Omit for other actions.",
|
package/tools/tools.generic.json
CHANGED
|
@@ -1160,22 +1160,27 @@
|
|
|
1160
1160
|
},
|
|
1161
1161
|
{
|
|
1162
1162
|
"name": "superdoc_list",
|
|
1163
|
-
"description": "Create and manipulate bullet and numbered lists.
|
|
1163
|
+
"description": "Create and manipulate bullet and numbered lists. Most actions require a list-item target: {kind:\"block\", nodeType:\"listItem\", nodeId:\"<id>\"}. Exceptions: \"create\" and \"attach\" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via superdoc_get_content({action:\"blocks\"}) — pick listItem blocks for most actions, paragraph blocks for create/attach.\n\nCREATE & CONVERT:\n• \"create\" — make a NEW list from paragraphs. Two modes: mode:\"empty\" with at:{kind:\"block\", nodeType:\"paragraph\", nodeId} converts a single paragraph; mode:\"fromParagraphs\" with target:{from:{...paragraph block address}, to:{...paragraph block address}} converts a range — ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset (\"disc\"|\"circle\"|\"square\"|\"dash\" for bullets; \"decimal\"|\"decimalParenthesis\"|\"lowerLetter\"|\"upperLetter\"|\"lowerRoman\"|\"upperRoman\" for ordered) or a custom style. Use \"create\" to start a fresh list — NOT to extend an existing one (use \"attach\" for that).\n• \"attach\" — add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:{paragraph block address} (or {from, to} range of paragraphs) + attachTo:{kind:\"block\", nodeType:\"listItem\", nodeId:\"<any item in destination list>\"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see \"join\" below).\n• \"set_type\" — convert an existing list between ordered and bullet. Pass target:{listItem} + kind:\"ordered\" or \"bullet\". Adjacent compatible sequences are merged automatically to preserve continuous numbering.\n• \"detach\" — convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"insert\" — add a new list item adjacent to an existing item in the same list. Pass target:{listItem} + position:\"before\"|\"after\" + optional text. Use this (NOT superdoc_create) to add items to an existing list.\n• \"indent\" / \"outdent\" — bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\" — jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"set_value\" — restart numbering at the target. Pass target:{listItem} + value:<number> (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence.\n• \"continue_previous\" — make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:{listItem of the sequence you want to renumber}. Fails with NO_COMPATIBLE_PREVIOUS or INCOMPATIBLE_DEFINITIONS if no matching prior sequence exists.\n\nSEQUENCE SHAPE (merge / split):\n• \"merge\" — merge the target's sequence with an adjacent one into one continuous list. Pass target:{listItem} + direction:\"withPrevious\" or \"withNext\". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously.\n• \"split\" — split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:{listItem}; add restartNumbering:false to keep the count continuing instead of restarting.",
|
|
1164
1164
|
"parameters": {
|
|
1165
1165
|
"type": "object",
|
|
1166
1166
|
"properties": {
|
|
1167
1167
|
"action": {
|
|
1168
1168
|
"type": "string",
|
|
1169
1169
|
"enum": [
|
|
1170
|
+
"attach",
|
|
1171
|
+
"continue_previous",
|
|
1170
1172
|
"create",
|
|
1171
1173
|
"detach",
|
|
1172
1174
|
"indent",
|
|
1173
1175
|
"insert",
|
|
1176
|
+
"merge",
|
|
1174
1177
|
"outdent",
|
|
1175
1178
|
"set_level",
|
|
1176
|
-
"set_type"
|
|
1179
|
+
"set_type",
|
|
1180
|
+
"set_value",
|
|
1181
|
+
"split"
|
|
1177
1182
|
],
|
|
1178
|
-
"description": "The action to perform. One of: create, detach, indent, insert, outdent, set_level, set_type."
|
|
1183
|
+
"description": "The action to perform. One of: attach, continue_previous, create, detach, indent, insert, merge, outdent, set_level, set_type, set_value, split."
|
|
1179
1184
|
},
|
|
1180
1185
|
"force": {
|
|
1181
1186
|
"type": "boolean",
|
|
@@ -1213,7 +1218,7 @@
|
|
|
1213
1218
|
"nodeType",
|
|
1214
1219
|
"nodeId"
|
|
1215
1220
|
],
|
|
1216
|
-
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'detach', 'indent', 'outdent', 'set_level', 'set_type'."
|
|
1221
|
+
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'attach', 'detach', 'indent', 'outdent', 'merge', 'split', 'set_level', 'set_value', 'continue_previous', 'set_type'."
|
|
1217
1222
|
},
|
|
1218
1223
|
"position": {
|
|
1219
1224
|
"type": "string",
|
|
@@ -1397,6 +1402,44 @@
|
|
|
1397
1402
|
],
|
|
1398
1403
|
"description": "Only for action 'create'. Omit for other actions."
|
|
1399
1404
|
},
|
|
1405
|
+
"attachTo": {
|
|
1406
|
+
"type": "object",
|
|
1407
|
+
"properties": {
|
|
1408
|
+
"kind": {
|
|
1409
|
+
"const": "block",
|
|
1410
|
+
"type": "string"
|
|
1411
|
+
},
|
|
1412
|
+
"nodeType": {
|
|
1413
|
+
"const": "listItem",
|
|
1414
|
+
"type": "string"
|
|
1415
|
+
},
|
|
1416
|
+
"nodeId": {
|
|
1417
|
+
"type": "string"
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
"required": [
|
|
1421
|
+
"kind",
|
|
1422
|
+
"nodeType",
|
|
1423
|
+
"nodeId"
|
|
1424
|
+
],
|
|
1425
|
+
"description": "Required for action 'attach'."
|
|
1426
|
+
},
|
|
1427
|
+
"direction": {
|
|
1428
|
+
"type": "string",
|
|
1429
|
+
"enum": [
|
|
1430
|
+
"withPrevious",
|
|
1431
|
+
"withNext"
|
|
1432
|
+
],
|
|
1433
|
+
"description": "Required for action 'merge'."
|
|
1434
|
+
},
|
|
1435
|
+
"restartNumbering": {
|
|
1436
|
+
"type": "boolean",
|
|
1437
|
+
"description": "Only for action 'split'. Omit for other actions."
|
|
1438
|
+
},
|
|
1439
|
+
"value": {
|
|
1440
|
+
"type": "object",
|
|
1441
|
+
"description": "Required for action 'set_value'."
|
|
1442
|
+
},
|
|
1400
1443
|
"continuity": {
|
|
1401
1444
|
"type": "string",
|
|
1402
1445
|
"description": "Numbering continuity: 'preserve' keeps numbering; 'none' restarts. Only for action 'set_type'. Omit for other actions.",
|
|
@@ -1413,14 +1456,19 @@
|
|
|
1413
1456
|
},
|
|
1414
1457
|
"metadata": {
|
|
1415
1458
|
"mutates": true,
|
|
1416
|
-
"operationCount":
|
|
1459
|
+
"operationCount": 12,
|
|
1417
1460
|
"operations": [
|
|
1418
1461
|
"doc.lists.insert",
|
|
1419
1462
|
"doc.lists.create",
|
|
1463
|
+
"doc.lists.attach",
|
|
1420
1464
|
"doc.lists.detach",
|
|
1421
1465
|
"doc.lists.indent",
|
|
1422
1466
|
"doc.lists.outdent",
|
|
1467
|
+
"doc.lists.merge",
|
|
1468
|
+
"doc.lists.split",
|
|
1423
1469
|
"doc.lists.setLevel",
|
|
1470
|
+
"doc.lists.setValue",
|
|
1471
|
+
"doc.lists.continuePrevious",
|
|
1424
1472
|
"doc.lists.setType"
|
|
1425
1473
|
]
|
|
1426
1474
|
},
|
package/tools/tools.openai.json
CHANGED
|
@@ -1093,22 +1093,27 @@
|
|
|
1093
1093
|
"type": "function",
|
|
1094
1094
|
"function": {
|
|
1095
1095
|
"name": "superdoc_list",
|
|
1096
|
-
"description": "Create and manipulate bullet and numbered lists.
|
|
1096
|
+
"description": "Create and manipulate bullet and numbered lists. Most actions require a list-item target: {kind:\"block\", nodeType:\"listItem\", nodeId:\"<id>\"}. Exceptions: \"create\" and \"attach\" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via superdoc_get_content({action:\"blocks\"}) — pick listItem blocks for most actions, paragraph blocks for create/attach.\n\nCREATE & CONVERT:\n• \"create\" — make a NEW list from paragraphs. Two modes: mode:\"empty\" with at:{kind:\"block\", nodeType:\"paragraph\", nodeId} converts a single paragraph; mode:\"fromParagraphs\" with target:{from:{...paragraph block address}, to:{...paragraph block address}} converts a range — ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset (\"disc\"|\"circle\"|\"square\"|\"dash\" for bullets; \"decimal\"|\"decimalParenthesis\"|\"lowerLetter\"|\"upperLetter\"|\"lowerRoman\"|\"upperRoman\" for ordered) or a custom style. Use \"create\" to start a fresh list — NOT to extend an existing one (use \"attach\" for that).\n• \"attach\" — add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:{paragraph block address} (or {from, to} range of paragraphs) + attachTo:{kind:\"block\", nodeType:\"listItem\", nodeId:\"<any item in destination list>\"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see \"join\" below).\n• \"set_type\" — convert an existing list between ordered and bullet. Pass target:{listItem} + kind:\"ordered\" or \"bullet\". Adjacent compatible sequences are merged automatically to preserve continuous numbering.\n• \"detach\" — convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"insert\" — add a new list item adjacent to an existing item in the same list. Pass target:{listItem} + position:\"before\"|\"after\" + optional text. Use this (NOT superdoc_create) to add items to an existing list.\n• \"indent\" / \"outdent\" — bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\" — jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"set_value\" — restart numbering at the target. Pass target:{listItem} + value:<number> (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence.\n• \"continue_previous\" — make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:{listItem of the sequence you want to renumber}. Fails with NO_COMPATIBLE_PREVIOUS or INCOMPATIBLE_DEFINITIONS if no matching prior sequence exists.\n\nSEQUENCE SHAPE (merge / split):\n• \"merge\" — merge the target's sequence with an adjacent one into one continuous list. Pass target:{listItem} + direction:\"withPrevious\" or \"withNext\". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously.\n• \"split\" — split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:{listItem}; add restartNumbering:false to keep the count continuing instead of restarting.",
|
|
1097
1097
|
"parameters": {
|
|
1098
1098
|
"type": "object",
|
|
1099
1099
|
"properties": {
|
|
1100
1100
|
"action": {
|
|
1101
1101
|
"type": "string",
|
|
1102
1102
|
"enum": [
|
|
1103
|
+
"attach",
|
|
1104
|
+
"continue_previous",
|
|
1103
1105
|
"create",
|
|
1104
1106
|
"detach",
|
|
1105
1107
|
"indent",
|
|
1106
1108
|
"insert",
|
|
1109
|
+
"merge",
|
|
1107
1110
|
"outdent",
|
|
1108
1111
|
"set_level",
|
|
1109
|
-
"set_type"
|
|
1112
|
+
"set_type",
|
|
1113
|
+
"set_value",
|
|
1114
|
+
"split"
|
|
1110
1115
|
],
|
|
1111
|
-
"description": "The action to perform. One of: create, detach, indent, insert, outdent, set_level, set_type."
|
|
1116
|
+
"description": "The action to perform. One of: attach, continue_previous, create, detach, indent, insert, merge, outdent, set_level, set_type, set_value, split."
|
|
1112
1117
|
},
|
|
1113
1118
|
"force": {
|
|
1114
1119
|
"type": "boolean",
|
|
@@ -1146,7 +1151,7 @@
|
|
|
1146
1151
|
"nodeType",
|
|
1147
1152
|
"nodeId"
|
|
1148
1153
|
],
|
|
1149
|
-
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'detach', 'indent', 'outdent', 'set_level', 'set_type'."
|
|
1154
|
+
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'attach', 'detach', 'indent', 'outdent', 'merge', 'split', 'set_level', 'set_value', 'continue_previous', 'set_type'."
|
|
1150
1155
|
},
|
|
1151
1156
|
"position": {
|
|
1152
1157
|
"type": "string",
|
|
@@ -1330,6 +1335,44 @@
|
|
|
1330
1335
|
],
|
|
1331
1336
|
"description": "Only for action 'create'. Omit for other actions."
|
|
1332
1337
|
},
|
|
1338
|
+
"attachTo": {
|
|
1339
|
+
"type": "object",
|
|
1340
|
+
"properties": {
|
|
1341
|
+
"kind": {
|
|
1342
|
+
"const": "block",
|
|
1343
|
+
"type": "string"
|
|
1344
|
+
},
|
|
1345
|
+
"nodeType": {
|
|
1346
|
+
"const": "listItem",
|
|
1347
|
+
"type": "string"
|
|
1348
|
+
},
|
|
1349
|
+
"nodeId": {
|
|
1350
|
+
"type": "string"
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
"required": [
|
|
1354
|
+
"kind",
|
|
1355
|
+
"nodeType",
|
|
1356
|
+
"nodeId"
|
|
1357
|
+
],
|
|
1358
|
+
"description": "Required for action 'attach'."
|
|
1359
|
+
},
|
|
1360
|
+
"direction": {
|
|
1361
|
+
"type": "string",
|
|
1362
|
+
"enum": [
|
|
1363
|
+
"withPrevious",
|
|
1364
|
+
"withNext"
|
|
1365
|
+
],
|
|
1366
|
+
"description": "Required for action 'merge'."
|
|
1367
|
+
},
|
|
1368
|
+
"restartNumbering": {
|
|
1369
|
+
"type": "boolean",
|
|
1370
|
+
"description": "Only for action 'split'. Omit for other actions."
|
|
1371
|
+
},
|
|
1372
|
+
"value": {
|
|
1373
|
+
"type": "object",
|
|
1374
|
+
"description": "Required for action 'set_value'."
|
|
1375
|
+
},
|
|
1333
1376
|
"continuity": {
|
|
1334
1377
|
"type": "string",
|
|
1335
1378
|
"description": "Numbering continuity: 'preserve' keeps numbering; 'none' restarts. Only for action 'set_type'. Omit for other actions.",
|
package/tools/tools.vercel.json
CHANGED
|
@@ -1093,22 +1093,27 @@
|
|
|
1093
1093
|
"type": "function",
|
|
1094
1094
|
"function": {
|
|
1095
1095
|
"name": "superdoc_list",
|
|
1096
|
-
"description": "Create and manipulate bullet and numbered lists.
|
|
1096
|
+
"description": "Create and manipulate bullet and numbered lists. Most actions require a list-item target: {kind:\"block\", nodeType:\"listItem\", nodeId:\"<id>\"}. Exceptions: \"create\" and \"attach\" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via superdoc_get_content({action:\"blocks\"}) — pick listItem blocks for most actions, paragraph blocks for create/attach.\n\nCREATE & CONVERT:\n• \"create\" — make a NEW list from paragraphs. Two modes: mode:\"empty\" with at:{kind:\"block\", nodeType:\"paragraph\", nodeId} converts a single paragraph; mode:\"fromParagraphs\" with target:{from:{...paragraph block address}, to:{...paragraph block address}} converts a range — ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset (\"disc\"|\"circle\"|\"square\"|\"dash\" for bullets; \"decimal\"|\"decimalParenthesis\"|\"lowerLetter\"|\"upperLetter\"|\"lowerRoman\"|\"upperRoman\" for ordered) or a custom style. Use \"create\" to start a fresh list — NOT to extend an existing one (use \"attach\" for that).\n• \"attach\" — add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:{paragraph block address} (or {from, to} range of paragraphs) + attachTo:{kind:\"block\", nodeType:\"listItem\", nodeId:\"<any item in destination list>\"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see \"join\" below).\n• \"set_type\" — convert an existing list between ordered and bullet. Pass target:{listItem} + kind:\"ordered\" or \"bullet\". Adjacent compatible sequences are merged automatically to preserve continuous numbering.\n• \"detach\" — convert a list item back to a plain paragraph. Pass target:{listItem}.\n\nITEMS & NESTING:\n• \"insert\" — add a new list item adjacent to an existing item in the same list. Pass target:{listItem} + position:\"before\"|\"after\" + optional text. Use this (NOT superdoc_create) to add items to an existing list.\n• \"indent\" / \"outdent\" — bump the target item's nesting level by one (0-8 range). Pass target:{listItem}.\n• \"set_level\" — jump the target item to an explicit level. Pass target:{listItem} + level:0..8.\n\nNUMBERING (ordered lists):\n• \"set_value\" — restart numbering at the target. Pass target:{listItem} + value:<number> (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence.\n• \"continue_previous\" — make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:{listItem of the sequence you want to renumber}. Fails with NO_COMPATIBLE_PREVIOUS or INCOMPATIBLE_DEFINITIONS if no matching prior sequence exists.\n\nSEQUENCE SHAPE (merge / split):\n• \"merge\" — merge the target's sequence with an adjacent one into one continuous list. Pass target:{listItem} + direction:\"withPrevious\" or \"withNext\". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously.\n• \"split\" — split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:{listItem}; add restartNumbering:false to keep the count continuing instead of restarting.",
|
|
1097
1097
|
"parameters": {
|
|
1098
1098
|
"type": "object",
|
|
1099
1099
|
"properties": {
|
|
1100
1100
|
"action": {
|
|
1101
1101
|
"type": "string",
|
|
1102
1102
|
"enum": [
|
|
1103
|
+
"attach",
|
|
1104
|
+
"continue_previous",
|
|
1103
1105
|
"create",
|
|
1104
1106
|
"detach",
|
|
1105
1107
|
"indent",
|
|
1106
1108
|
"insert",
|
|
1109
|
+
"merge",
|
|
1107
1110
|
"outdent",
|
|
1108
1111
|
"set_level",
|
|
1109
|
-
"set_type"
|
|
1112
|
+
"set_type",
|
|
1113
|
+
"set_value",
|
|
1114
|
+
"split"
|
|
1110
1115
|
],
|
|
1111
|
-
"description": "The action to perform. One of: create, detach, indent, insert, outdent, set_level, set_type."
|
|
1116
|
+
"description": "The action to perform. One of: attach, continue_previous, create, detach, indent, insert, merge, outdent, set_level, set_type, set_value, split."
|
|
1112
1117
|
},
|
|
1113
1118
|
"force": {
|
|
1114
1119
|
"type": "boolean",
|
|
@@ -1146,7 +1151,7 @@
|
|
|
1146
1151
|
"nodeType",
|
|
1147
1152
|
"nodeId"
|
|
1148
1153
|
],
|
|
1149
|
-
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'detach', 'indent', 'outdent', 'set_level', 'set_type'."
|
|
1154
|
+
"description": "The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: {kind:'block', nodeType:'listItem', nodeId:'<id>'}. Required for actions 'insert', 'attach', 'detach', 'indent', 'outdent', 'merge', 'split', 'set_level', 'set_value', 'continue_previous', 'set_type'."
|
|
1150
1155
|
},
|
|
1151
1156
|
"position": {
|
|
1152
1157
|
"type": "string",
|
|
@@ -1330,6 +1335,44 @@
|
|
|
1330
1335
|
],
|
|
1331
1336
|
"description": "Only for action 'create'. Omit for other actions."
|
|
1332
1337
|
},
|
|
1338
|
+
"attachTo": {
|
|
1339
|
+
"type": "object",
|
|
1340
|
+
"properties": {
|
|
1341
|
+
"kind": {
|
|
1342
|
+
"const": "block",
|
|
1343
|
+
"type": "string"
|
|
1344
|
+
},
|
|
1345
|
+
"nodeType": {
|
|
1346
|
+
"const": "listItem",
|
|
1347
|
+
"type": "string"
|
|
1348
|
+
},
|
|
1349
|
+
"nodeId": {
|
|
1350
|
+
"type": "string"
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
"required": [
|
|
1354
|
+
"kind",
|
|
1355
|
+
"nodeType",
|
|
1356
|
+
"nodeId"
|
|
1357
|
+
],
|
|
1358
|
+
"description": "Required for action 'attach'."
|
|
1359
|
+
},
|
|
1360
|
+
"direction": {
|
|
1361
|
+
"type": "string",
|
|
1362
|
+
"enum": [
|
|
1363
|
+
"withPrevious",
|
|
1364
|
+
"withNext"
|
|
1365
|
+
],
|
|
1366
|
+
"description": "Required for action 'merge'."
|
|
1367
|
+
},
|
|
1368
|
+
"restartNumbering": {
|
|
1369
|
+
"type": "boolean",
|
|
1370
|
+
"description": "Only for action 'split'. Omit for other actions."
|
|
1371
|
+
},
|
|
1372
|
+
"value": {
|
|
1373
|
+
"type": "object",
|
|
1374
|
+
"description": "Required for action 'set_value'."
|
|
1375
|
+
},
|
|
1333
1376
|
"continuity": {
|
|
1334
1377
|
"type": "string",
|
|
1335
1378
|
"description": "Numbering continuity: 'preserve' keeps numbering; 'none' restarts. Only for action 'set_type'. Omit for other actions.",
|