@superdoc/cli 0.36.0-next.9 → 0.36.1-next.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.
@@ -111,7 +111,357 @@
111
111
  "required": [
112
112
  "action"
113
113
  ],
114
- "additionalProperties": false
114
+ "additionalProperties": false,
115
+ "$defs": {
116
+ "BlockNodeAddress": {
117
+ "type": "object",
118
+ "properties": {
119
+ "kind": {
120
+ "const": "block",
121
+ "type": "string"
122
+ },
123
+ "nodeType": {
124
+ "enum": [
125
+ "paragraph",
126
+ "heading",
127
+ "listItem",
128
+ "table",
129
+ "tableRow",
130
+ "tableCell",
131
+ "tableOfContents",
132
+ "image",
133
+ "sdt"
134
+ ]
135
+ },
136
+ "nodeId": {
137
+ "type": "string"
138
+ },
139
+ "story": {
140
+ "$ref": "#/$defs/StoryLocator"
141
+ }
142
+ },
143
+ "additionalProperties": false,
144
+ "required": [
145
+ "kind",
146
+ "nodeType",
147
+ "nodeId"
148
+ ]
149
+ },
150
+ "SDProjectionReviewMode": {
151
+ "enum": [
152
+ "final",
153
+ "original",
154
+ "redline"
155
+ ]
156
+ },
157
+ "SDProjectionScope": {
158
+ "oneOf": [
159
+ {
160
+ "$ref": "#/$defs/BlockNodeAddress"
161
+ },
162
+ {
163
+ "$ref": "#/$defs/SelectionTarget"
164
+ }
165
+ ]
166
+ },
167
+ "SectionAddress": {
168
+ "type": "object",
169
+ "properties": {
170
+ "kind": {
171
+ "const": "section",
172
+ "type": "string"
173
+ },
174
+ "sectionId": {
175
+ "type": "string"
176
+ }
177
+ },
178
+ "additionalProperties": false,
179
+ "required": [
180
+ "kind",
181
+ "sectionId"
182
+ ]
183
+ },
184
+ "SelectionEdgeNodeAddress": {
185
+ "type": "object",
186
+ "properties": {
187
+ "kind": {
188
+ "const": "block",
189
+ "type": "string"
190
+ },
191
+ "nodeType": {
192
+ "enum": [
193
+ "paragraph",
194
+ "heading",
195
+ "listItem",
196
+ "table",
197
+ "tableOfContents",
198
+ "sdt",
199
+ "image"
200
+ ]
201
+ },
202
+ "nodeId": {
203
+ "type": "string"
204
+ },
205
+ "story": {
206
+ "$ref": "#/$defs/StoryLocator"
207
+ }
208
+ },
209
+ "additionalProperties": false,
210
+ "required": [
211
+ "kind",
212
+ "nodeType",
213
+ "nodeId"
214
+ ]
215
+ },
216
+ "SelectionPoint": {
217
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.",
218
+ "oneOf": [
219
+ {
220
+ "type": "object",
221
+ "properties": {
222
+ "kind": {
223
+ "const": "text",
224
+ "type": "string"
225
+ },
226
+ "blockId": {
227
+ "type": "string"
228
+ },
229
+ "offset": {
230
+ "type": "integer",
231
+ "minimum": 0
232
+ },
233
+ "story": {
234
+ "$ref": "#/$defs/StoryLocator"
235
+ }
236
+ },
237
+ "additionalProperties": false,
238
+ "required": [
239
+ "kind",
240
+ "blockId",
241
+ "offset"
242
+ ]
243
+ },
244
+ {
245
+ "type": "object",
246
+ "properties": {
247
+ "kind": {
248
+ "const": "nodeEdge",
249
+ "type": "string"
250
+ },
251
+ "node": {
252
+ "$ref": "#/$defs/SelectionEdgeNodeAddress"
253
+ },
254
+ "edge": {
255
+ "enum": [
256
+ "before",
257
+ "after"
258
+ ]
259
+ }
260
+ },
261
+ "additionalProperties": false,
262
+ "required": [
263
+ "kind",
264
+ "node",
265
+ "edge"
266
+ ]
267
+ }
268
+ ]
269
+ },
270
+ "SelectionTarget": {
271
+ "type": "object",
272
+ "properties": {
273
+ "kind": {
274
+ "const": "selection",
275
+ "type": "string"
276
+ },
277
+ "start": {
278
+ "$ref": "#/$defs/SelectionPoint"
279
+ },
280
+ "end": {
281
+ "$ref": "#/$defs/SelectionPoint"
282
+ },
283
+ "story": {
284
+ "$ref": "#/$defs/StoryLocator"
285
+ },
286
+ "coordinateSpace": {
287
+ "$ref": "#/$defs/TextCoordinateSpace"
288
+ }
289
+ },
290
+ "additionalProperties": false,
291
+ "required": [
292
+ "kind",
293
+ "start",
294
+ "end"
295
+ ]
296
+ },
297
+ "StoryLocator": {
298
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
299
+ "oneOf": [
300
+ {
301
+ "type": "object",
302
+ "properties": {
303
+ "kind": {
304
+ "const": "story",
305
+ "type": "string"
306
+ },
307
+ "storyType": {
308
+ "const": "body",
309
+ "type": "string"
310
+ }
311
+ },
312
+ "additionalProperties": false,
313
+ "required": [
314
+ "kind",
315
+ "storyType"
316
+ ]
317
+ },
318
+ {
319
+ "type": "object",
320
+ "properties": {
321
+ "kind": {
322
+ "const": "story",
323
+ "type": "string"
324
+ },
325
+ "storyType": {
326
+ "const": "headerFooterSlot",
327
+ "type": "string"
328
+ },
329
+ "section": {
330
+ "$ref": "#/$defs/SectionAddress"
331
+ },
332
+ "headerFooterKind": {
333
+ "enum": [
334
+ "header",
335
+ "footer"
336
+ ]
337
+ },
338
+ "variant": {
339
+ "enum": [
340
+ "default",
341
+ "first",
342
+ "even"
343
+ ]
344
+ },
345
+ "resolution": {
346
+ "enum": [
347
+ "effective",
348
+ "explicit"
349
+ ]
350
+ },
351
+ "onWrite": {
352
+ "enum": [
353
+ "materializeIfInherited",
354
+ "editResolvedPart",
355
+ "error"
356
+ ]
357
+ }
358
+ },
359
+ "additionalProperties": false,
360
+ "required": [
361
+ "kind",
362
+ "storyType",
363
+ "section",
364
+ "headerFooterKind",
365
+ "variant"
366
+ ]
367
+ },
368
+ {
369
+ "type": "object",
370
+ "properties": {
371
+ "kind": {
372
+ "const": "story",
373
+ "type": "string"
374
+ },
375
+ "storyType": {
376
+ "const": "headerFooterPart",
377
+ "type": "string"
378
+ },
379
+ "refId": {
380
+ "type": "string"
381
+ }
382
+ },
383
+ "additionalProperties": false,
384
+ "required": [
385
+ "kind",
386
+ "storyType",
387
+ "refId"
388
+ ]
389
+ },
390
+ {
391
+ "type": "object",
392
+ "properties": {
393
+ "kind": {
394
+ "const": "story",
395
+ "type": "string"
396
+ },
397
+ "storyType": {
398
+ "const": "footnote",
399
+ "type": "string"
400
+ },
401
+ "noteId": {
402
+ "type": "string"
403
+ }
404
+ },
405
+ "additionalProperties": false,
406
+ "required": [
407
+ "kind",
408
+ "storyType",
409
+ "noteId"
410
+ ]
411
+ },
412
+ {
413
+ "type": "object",
414
+ "properties": {
415
+ "kind": {
416
+ "const": "story",
417
+ "type": "string"
418
+ },
419
+ "storyType": {
420
+ "const": "endnote",
421
+ "type": "string"
422
+ },
423
+ "noteId": {
424
+ "type": "string"
425
+ }
426
+ },
427
+ "additionalProperties": false,
428
+ "required": [
429
+ "kind",
430
+ "storyType",
431
+ "noteId"
432
+ ]
433
+ },
434
+ {
435
+ "type": "object",
436
+ "properties": {
437
+ "kind": {
438
+ "const": "story",
439
+ "type": "string"
440
+ },
441
+ "storyType": {
442
+ "const": "textbox",
443
+ "type": "string"
444
+ },
445
+ "textboxId": {
446
+ "type": "string"
447
+ }
448
+ },
449
+ "additionalProperties": false,
450
+ "required": [
451
+ "kind",
452
+ "storyType",
453
+ "textboxId"
454
+ ]
455
+ }
456
+ ]
457
+ },
458
+ "TextCoordinateSpace": {
459
+ "enum": [
460
+ "visible",
461
+ "tracked"
462
+ ]
463
+ }
464
+ }
115
465
  }
116
466
  },
117
467
  {
@@ -856,28 +1206,414 @@
856
1206
  "required": [
857
1207
  "action"
858
1208
  ],
859
- "additionalProperties": false
860
- }
861
- },
862
- {
863
- "name": "superdoc_format",
864
- "description": "Change text and paragraph formatting. To format multiple items at once, use superdoc_mutations with format.apply steps instead of calling this tool repeatedly. Use require \"all\" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when you have a valid ref or nodeId. Action \"inline\" applies character formatting (bold, italic, underline, color, fontSize, fontFamily, highlight, strike, vertAlign) to a text range via \"ref\". Action \"set_style\" applies a named paragraph style by styleId (get available styles from superdoc_get_content info). Actions \"set_alignment\", \"set_indentation\", \"set_spacing\", \"set_direction\", and \"set_flow_options\" change paragraph-level properties and require a block target: {kind:\"block\", nodeType:\"paragraph\", nodeId:\"<nodeId>\"}, NOT a ref. Use \"set_flow_options\" with pageBreakBefore:true to start a paragraph on a new page. Supports \"dryRun\" and \"changeMode: tracked\" for inline formatting. Paragraph-level actions do NOT support tracked changes. Do NOT use a search ref for paragraph-level actions; they require a block target with nodeId. Do NOT use {kind:\"block\", start:{kind:\"nodeEdge\",...}} or selection-like structures for paragraph actions. ONLY {kind:\"block\", nodeType, nodeId} is accepted. Do NOT issue multiple superdoc_format calls in parallel; each call invalidates refs for subsequent calls.\n\nEXAMPLES:\n 1. {\"action\":\"inline\",\"ref\":\"<handle.ref>\",\"inline\":{\"bold\":true}}\n 2. {\"action\":\"inline\",\"ref\":\"<create.ref>\",\"inline\":{\"fontFamily\":\"Calibri\",\"fontSize\":11,\"color\":\"#000000\",\"bold\":false}}\n 3. {\"action\":\"set_alignment\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"alignment\":\"center\"}\n 4. {\"action\":\"set_flow_options\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"pageBreakBefore\":true}\n 5. {\"action\":\"set_spacing\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"lineSpacing\":{\"rule\":\"auto\",\"value\":1.5}}",
865
- "input_schema": {
866
- "type": "object",
867
- "properties": {
868
- "action": {
869
- "type": "string",
870
- "enum": [
871
- "inline",
872
- "set_alignment",
873
- "set_direction",
874
- "set_flow_options",
875
- "set_indentation",
876
- "set_spacing",
877
- "set_style",
878
- "set_style_ref"
879
- ],
880
- "description": "The action to perform. One of: inline, set_alignment, set_direction, set_flow_options, set_indentation, set_spacing, set_style, set_style_ref."
1209
+ "additionalProperties": false,
1210
+ "$defs": {
1211
+ "BlockNodeAddress": {
1212
+ "type": "object",
1213
+ "properties": {
1214
+ "kind": {
1215
+ "const": "block",
1216
+ "type": "string"
1217
+ },
1218
+ "nodeType": {
1219
+ "enum": [
1220
+ "paragraph",
1221
+ "heading",
1222
+ "listItem",
1223
+ "table",
1224
+ "tableRow",
1225
+ "tableCell",
1226
+ "tableOfContents",
1227
+ "image",
1228
+ "sdt"
1229
+ ]
1230
+ },
1231
+ "nodeId": {
1232
+ "type": "string"
1233
+ },
1234
+ "story": {
1235
+ "$ref": "#/$defs/StoryLocator"
1236
+ }
1237
+ },
1238
+ "additionalProperties": false,
1239
+ "required": [
1240
+ "kind",
1241
+ "nodeType",
1242
+ "nodeId"
1243
+ ]
1244
+ },
1245
+ "DeletableBlockNodeAddress": {
1246
+ "type": "object",
1247
+ "properties": {
1248
+ "kind": {
1249
+ "const": "block",
1250
+ "type": "string"
1251
+ },
1252
+ "nodeType": {
1253
+ "enum": [
1254
+ "paragraph",
1255
+ "heading",
1256
+ "listItem",
1257
+ "table",
1258
+ "sdt"
1259
+ ]
1260
+ },
1261
+ "nodeId": {
1262
+ "type": "string"
1263
+ },
1264
+ "story": {
1265
+ "$ref": "#/$defs/StoryLocator"
1266
+ }
1267
+ },
1268
+ "additionalProperties": false,
1269
+ "required": [
1270
+ "kind",
1271
+ "nodeType",
1272
+ "nodeId"
1273
+ ]
1274
+ },
1275
+ "DeleteBehavior": {
1276
+ "enum": [
1277
+ "selection",
1278
+ "exact"
1279
+ ]
1280
+ },
1281
+ "SDProjectionReviewMode": {
1282
+ "enum": [
1283
+ "final",
1284
+ "original",
1285
+ "redline"
1286
+ ]
1287
+ },
1288
+ "SDProjectionScope": {
1289
+ "oneOf": [
1290
+ {
1291
+ "$ref": "#/$defs/BlockNodeAddress"
1292
+ },
1293
+ {
1294
+ "$ref": "#/$defs/SelectionTarget"
1295
+ }
1296
+ ]
1297
+ },
1298
+ "SectionAddress": {
1299
+ "type": "object",
1300
+ "properties": {
1301
+ "kind": {
1302
+ "const": "section",
1303
+ "type": "string"
1304
+ },
1305
+ "sectionId": {
1306
+ "type": "string"
1307
+ }
1308
+ },
1309
+ "additionalProperties": false,
1310
+ "required": [
1311
+ "kind",
1312
+ "sectionId"
1313
+ ]
1314
+ },
1315
+ "SelectionEdgeNodeAddress": {
1316
+ "type": "object",
1317
+ "properties": {
1318
+ "kind": {
1319
+ "const": "block",
1320
+ "type": "string"
1321
+ },
1322
+ "nodeType": {
1323
+ "enum": [
1324
+ "paragraph",
1325
+ "heading",
1326
+ "listItem",
1327
+ "table",
1328
+ "tableOfContents",
1329
+ "sdt",
1330
+ "image"
1331
+ ]
1332
+ },
1333
+ "nodeId": {
1334
+ "type": "string"
1335
+ },
1336
+ "story": {
1337
+ "$ref": "#/$defs/StoryLocator"
1338
+ }
1339
+ },
1340
+ "additionalProperties": false,
1341
+ "required": [
1342
+ "kind",
1343
+ "nodeType",
1344
+ "nodeId"
1345
+ ]
1346
+ },
1347
+ "SelectionPoint": {
1348
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.",
1349
+ "oneOf": [
1350
+ {
1351
+ "type": "object",
1352
+ "properties": {
1353
+ "kind": {
1354
+ "const": "text",
1355
+ "type": "string"
1356
+ },
1357
+ "blockId": {
1358
+ "type": "string"
1359
+ },
1360
+ "offset": {
1361
+ "type": "integer",
1362
+ "minimum": 0
1363
+ },
1364
+ "story": {
1365
+ "$ref": "#/$defs/StoryLocator"
1366
+ }
1367
+ },
1368
+ "additionalProperties": false,
1369
+ "required": [
1370
+ "kind",
1371
+ "blockId",
1372
+ "offset"
1373
+ ]
1374
+ },
1375
+ {
1376
+ "type": "object",
1377
+ "properties": {
1378
+ "kind": {
1379
+ "const": "nodeEdge",
1380
+ "type": "string"
1381
+ },
1382
+ "node": {
1383
+ "$ref": "#/$defs/SelectionEdgeNodeAddress"
1384
+ },
1385
+ "edge": {
1386
+ "enum": [
1387
+ "before",
1388
+ "after"
1389
+ ]
1390
+ }
1391
+ },
1392
+ "additionalProperties": false,
1393
+ "required": [
1394
+ "kind",
1395
+ "node",
1396
+ "edge"
1397
+ ]
1398
+ }
1399
+ ]
1400
+ },
1401
+ "SelectionTarget": {
1402
+ "type": "object",
1403
+ "properties": {
1404
+ "kind": {
1405
+ "const": "selection",
1406
+ "type": "string"
1407
+ },
1408
+ "start": {
1409
+ "$ref": "#/$defs/SelectionPoint"
1410
+ },
1411
+ "end": {
1412
+ "$ref": "#/$defs/SelectionPoint"
1413
+ },
1414
+ "story": {
1415
+ "$ref": "#/$defs/StoryLocator"
1416
+ },
1417
+ "coordinateSpace": {
1418
+ "$ref": "#/$defs/TextCoordinateSpace"
1419
+ }
1420
+ },
1421
+ "additionalProperties": false,
1422
+ "required": [
1423
+ "kind",
1424
+ "start",
1425
+ "end"
1426
+ ]
1427
+ },
1428
+ "StoryLocator": {
1429
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
1430
+ "oneOf": [
1431
+ {
1432
+ "type": "object",
1433
+ "properties": {
1434
+ "kind": {
1435
+ "const": "story",
1436
+ "type": "string"
1437
+ },
1438
+ "storyType": {
1439
+ "const": "body",
1440
+ "type": "string"
1441
+ }
1442
+ },
1443
+ "additionalProperties": false,
1444
+ "required": [
1445
+ "kind",
1446
+ "storyType"
1447
+ ]
1448
+ },
1449
+ {
1450
+ "type": "object",
1451
+ "properties": {
1452
+ "kind": {
1453
+ "const": "story",
1454
+ "type": "string"
1455
+ },
1456
+ "storyType": {
1457
+ "const": "headerFooterSlot",
1458
+ "type": "string"
1459
+ },
1460
+ "section": {
1461
+ "$ref": "#/$defs/SectionAddress"
1462
+ },
1463
+ "headerFooterKind": {
1464
+ "enum": [
1465
+ "header",
1466
+ "footer"
1467
+ ]
1468
+ },
1469
+ "variant": {
1470
+ "enum": [
1471
+ "default",
1472
+ "first",
1473
+ "even"
1474
+ ]
1475
+ },
1476
+ "resolution": {
1477
+ "enum": [
1478
+ "effective",
1479
+ "explicit"
1480
+ ]
1481
+ },
1482
+ "onWrite": {
1483
+ "enum": [
1484
+ "materializeIfInherited",
1485
+ "editResolvedPart",
1486
+ "error"
1487
+ ]
1488
+ }
1489
+ },
1490
+ "additionalProperties": false,
1491
+ "required": [
1492
+ "kind",
1493
+ "storyType",
1494
+ "section",
1495
+ "headerFooterKind",
1496
+ "variant"
1497
+ ]
1498
+ },
1499
+ {
1500
+ "type": "object",
1501
+ "properties": {
1502
+ "kind": {
1503
+ "const": "story",
1504
+ "type": "string"
1505
+ },
1506
+ "storyType": {
1507
+ "const": "headerFooterPart",
1508
+ "type": "string"
1509
+ },
1510
+ "refId": {
1511
+ "type": "string"
1512
+ }
1513
+ },
1514
+ "additionalProperties": false,
1515
+ "required": [
1516
+ "kind",
1517
+ "storyType",
1518
+ "refId"
1519
+ ]
1520
+ },
1521
+ {
1522
+ "type": "object",
1523
+ "properties": {
1524
+ "kind": {
1525
+ "const": "story",
1526
+ "type": "string"
1527
+ },
1528
+ "storyType": {
1529
+ "const": "footnote",
1530
+ "type": "string"
1531
+ },
1532
+ "noteId": {
1533
+ "type": "string"
1534
+ }
1535
+ },
1536
+ "additionalProperties": false,
1537
+ "required": [
1538
+ "kind",
1539
+ "storyType",
1540
+ "noteId"
1541
+ ]
1542
+ },
1543
+ {
1544
+ "type": "object",
1545
+ "properties": {
1546
+ "kind": {
1547
+ "const": "story",
1548
+ "type": "string"
1549
+ },
1550
+ "storyType": {
1551
+ "const": "endnote",
1552
+ "type": "string"
1553
+ },
1554
+ "noteId": {
1555
+ "type": "string"
1556
+ }
1557
+ },
1558
+ "additionalProperties": false,
1559
+ "required": [
1560
+ "kind",
1561
+ "storyType",
1562
+ "noteId"
1563
+ ]
1564
+ },
1565
+ {
1566
+ "type": "object",
1567
+ "properties": {
1568
+ "kind": {
1569
+ "const": "story",
1570
+ "type": "string"
1571
+ },
1572
+ "storyType": {
1573
+ "const": "textbox",
1574
+ "type": "string"
1575
+ },
1576
+ "textboxId": {
1577
+ "type": "string"
1578
+ }
1579
+ },
1580
+ "additionalProperties": false,
1581
+ "required": [
1582
+ "kind",
1583
+ "storyType",
1584
+ "textboxId"
1585
+ ]
1586
+ }
1587
+ ]
1588
+ },
1589
+ "TextCoordinateSpace": {
1590
+ "enum": [
1591
+ "visible",
1592
+ "tracked"
1593
+ ]
1594
+ }
1595
+ }
1596
+ }
1597
+ },
1598
+ {
1599
+ "name": "superdoc_format",
1600
+ "description": "Change text and paragraph formatting. To format multiple items at once, use superdoc_mutations with format.apply steps instead of calling this tool repeatedly. Use require \"all\" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when you have a valid ref or nodeId. Action \"inline\" applies character formatting (bold, italic, underline, color, fontSize, fontFamily, highlight, strike, vertAlign) to a text range via \"ref\". Action \"set_style\" applies a named paragraph style by styleId (get available styles from superdoc_get_content info). Actions \"set_alignment\", \"set_indentation\", \"set_spacing\", \"set_direction\", and \"set_flow_options\" change paragraph-level properties and require a block target: {kind:\"block\", nodeType:\"paragraph\", nodeId:\"<nodeId>\"}, NOT a ref. Use \"set_flow_options\" with pageBreakBefore:true to start a paragraph on a new page. Supports \"dryRun\" and \"changeMode: tracked\" for inline formatting. Paragraph-level actions do NOT support tracked changes. Do NOT use a search ref for paragraph-level actions; they require a block target with nodeId. Do NOT use {kind:\"block\", start:{kind:\"nodeEdge\",...}} or selection-like structures for paragraph actions. ONLY {kind:\"block\", nodeType, nodeId} is accepted. Do NOT issue multiple superdoc_format calls in parallel; each call invalidates refs for subsequent calls.\n\nEXAMPLES:\n 1. {\"action\":\"inline\",\"ref\":\"<handle.ref>\",\"inline\":{\"bold\":true}}\n 2. {\"action\":\"inline\",\"ref\":\"<create.ref>\",\"inline\":{\"fontFamily\":\"Calibri\",\"fontSize\":11,\"color\":\"#000000\",\"bold\":false}}\n 3. {\"action\":\"set_alignment\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"alignment\":\"center\"}\n 4. {\"action\":\"set_flow_options\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"pageBreakBefore\":true}\n 5. {\"action\":\"set_spacing\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"lineSpacing\":{\"rule\":\"auto\",\"value\":1.5}}",
1601
+ "input_schema": {
1602
+ "type": "object",
1603
+ "properties": {
1604
+ "action": {
1605
+ "type": "string",
1606
+ "enum": [
1607
+ "inline",
1608
+ "set_alignment",
1609
+ "set_direction",
1610
+ "set_flow_options",
1611
+ "set_indentation",
1612
+ "set_spacing",
1613
+ "set_style",
1614
+ "set_style_ref"
1615
+ ],
1616
+ "description": "The action to perform. One of: inline, set_alignment, set_direction, set_flow_options, set_indentation, set_spacing, set_style, set_style_ref."
881
1617
  },
882
1618
  "force": {
883
1619
  "type": "boolean",
@@ -2015,18 +2751,392 @@
2015
2751
  "required": [
2016
2752
  "action"
2017
2753
  ],
2018
- "additionalProperties": false
2019
- }
2020
- },
2021
- {
2022
- "name": "superdoc_create",
2023
- "description": "IMPORTANT: For headings and paragraphs, use superdoc_edit with type \"markdown\" instead: it is faster, creates proper styles, and handles positioning via target + placement. Only use superdoc_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate superdoc_format call. For subsequent operations, re-fetch blocks with superdoc_get_content to get fresh refs (refs expire after any mutation). When the user asks for a \"heading\", use action \"heading\" with a level (default 1). Use action \"paragraph\" for regular body text. Position with \"at\": {kind:\"documentEnd\"} (default), {kind:\"documentStart\"}, or {kind:\"after\"/\"before\", target:{kind:\"block\", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next \"at\" target to maintain correct ordering. Do NOT use newlines in \"text\" to create multiple paragraphs; call this tool separately for each one.\n\nEXAMPLES:\n 1. {\"action\":\"paragraph\",\"text\":\"New paragraph content.\",\"at\":{\"kind\":\"documentEnd\"}}\n 2. {\"action\":\"heading\",\"text\":\"Section Title\",\"level\":2,\"at\":{\"kind\":\"after\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"}}}\n 3. {\"action\":\"paragraph\",\"text\":\"Chained item.\",\"at\":{\"kind\":\"after\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<previousNodeId>\"}}}\n 4. {\"action\":\"table\",\"rows\":3,\"columns\":4,\"at\":{\"kind\":\"documentEnd\"}}",
2024
- "input_schema": {
2025
- "type": "object",
2026
- "properties": {
2027
- "action": {
2028
- "type": "string",
2029
- "enum": [
2754
+ "additionalProperties": false,
2755
+ "$defs": {
2756
+ "HeadingAddress": {
2757
+ "type": "object",
2758
+ "properties": {
2759
+ "kind": {
2760
+ "const": "block",
2761
+ "type": "string"
2762
+ },
2763
+ "nodeType": {
2764
+ "const": "heading",
2765
+ "type": "string"
2766
+ },
2767
+ "nodeId": {
2768
+ "type": "string"
2769
+ },
2770
+ "story": {
2771
+ "$ref": "#/$defs/StoryLocator"
2772
+ }
2773
+ },
2774
+ "additionalProperties": false,
2775
+ "required": [
2776
+ "kind",
2777
+ "nodeType",
2778
+ "nodeId"
2779
+ ]
2780
+ },
2781
+ "ListItemAddress": {
2782
+ "type": "object",
2783
+ "properties": {
2784
+ "kind": {
2785
+ "const": "block",
2786
+ "type": "string"
2787
+ },
2788
+ "nodeType": {
2789
+ "const": "listItem",
2790
+ "type": "string"
2791
+ },
2792
+ "nodeId": {
2793
+ "type": "string"
2794
+ },
2795
+ "story": {
2796
+ "$ref": "#/$defs/StoryLocator"
2797
+ }
2798
+ },
2799
+ "additionalProperties": false,
2800
+ "required": [
2801
+ "kind",
2802
+ "nodeType",
2803
+ "nodeId"
2804
+ ]
2805
+ },
2806
+ "ParagraphAddress": {
2807
+ "type": "object",
2808
+ "properties": {
2809
+ "kind": {
2810
+ "const": "block",
2811
+ "type": "string"
2812
+ },
2813
+ "nodeType": {
2814
+ "const": "paragraph",
2815
+ "type": "string"
2816
+ },
2817
+ "nodeId": {
2818
+ "type": "string"
2819
+ },
2820
+ "story": {
2821
+ "$ref": "#/$defs/StoryLocator"
2822
+ }
2823
+ },
2824
+ "additionalProperties": false,
2825
+ "required": [
2826
+ "kind",
2827
+ "nodeType",
2828
+ "nodeId"
2829
+ ]
2830
+ },
2831
+ "SectionAddress": {
2832
+ "type": "object",
2833
+ "properties": {
2834
+ "kind": {
2835
+ "const": "section",
2836
+ "type": "string"
2837
+ },
2838
+ "sectionId": {
2839
+ "type": "string"
2840
+ }
2841
+ },
2842
+ "additionalProperties": false,
2843
+ "required": [
2844
+ "kind",
2845
+ "sectionId"
2846
+ ]
2847
+ },
2848
+ "SelectionEdgeNodeAddress": {
2849
+ "type": "object",
2850
+ "properties": {
2851
+ "kind": {
2852
+ "const": "block",
2853
+ "type": "string"
2854
+ },
2855
+ "nodeType": {
2856
+ "enum": [
2857
+ "paragraph",
2858
+ "heading",
2859
+ "listItem",
2860
+ "table",
2861
+ "tableOfContents",
2862
+ "sdt",
2863
+ "image"
2864
+ ]
2865
+ },
2866
+ "nodeId": {
2867
+ "type": "string"
2868
+ },
2869
+ "story": {
2870
+ "$ref": "#/$defs/StoryLocator"
2871
+ }
2872
+ },
2873
+ "additionalProperties": false,
2874
+ "required": [
2875
+ "kind",
2876
+ "nodeType",
2877
+ "nodeId"
2878
+ ]
2879
+ },
2880
+ "SelectionPoint": {
2881
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.",
2882
+ "oneOf": [
2883
+ {
2884
+ "type": "object",
2885
+ "properties": {
2886
+ "kind": {
2887
+ "const": "text",
2888
+ "type": "string"
2889
+ },
2890
+ "blockId": {
2891
+ "type": "string"
2892
+ },
2893
+ "offset": {
2894
+ "type": "integer",
2895
+ "minimum": 0
2896
+ },
2897
+ "story": {
2898
+ "$ref": "#/$defs/StoryLocator"
2899
+ }
2900
+ },
2901
+ "additionalProperties": false,
2902
+ "required": [
2903
+ "kind",
2904
+ "blockId",
2905
+ "offset"
2906
+ ]
2907
+ },
2908
+ {
2909
+ "type": "object",
2910
+ "properties": {
2911
+ "kind": {
2912
+ "const": "nodeEdge",
2913
+ "type": "string"
2914
+ },
2915
+ "node": {
2916
+ "$ref": "#/$defs/SelectionEdgeNodeAddress"
2917
+ },
2918
+ "edge": {
2919
+ "enum": [
2920
+ "before",
2921
+ "after"
2922
+ ]
2923
+ }
2924
+ },
2925
+ "additionalProperties": false,
2926
+ "required": [
2927
+ "kind",
2928
+ "node",
2929
+ "edge"
2930
+ ]
2931
+ }
2932
+ ]
2933
+ },
2934
+ "SelectionTarget": {
2935
+ "type": "object",
2936
+ "properties": {
2937
+ "kind": {
2938
+ "const": "selection",
2939
+ "type": "string"
2940
+ },
2941
+ "start": {
2942
+ "$ref": "#/$defs/SelectionPoint"
2943
+ },
2944
+ "end": {
2945
+ "$ref": "#/$defs/SelectionPoint"
2946
+ },
2947
+ "story": {
2948
+ "$ref": "#/$defs/StoryLocator"
2949
+ },
2950
+ "coordinateSpace": {
2951
+ "$ref": "#/$defs/TextCoordinateSpace"
2952
+ }
2953
+ },
2954
+ "additionalProperties": false,
2955
+ "required": [
2956
+ "kind",
2957
+ "start",
2958
+ "end"
2959
+ ]
2960
+ },
2961
+ "StoryLocator": {
2962
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
2963
+ "oneOf": [
2964
+ {
2965
+ "type": "object",
2966
+ "properties": {
2967
+ "kind": {
2968
+ "const": "story",
2969
+ "type": "string"
2970
+ },
2971
+ "storyType": {
2972
+ "const": "body",
2973
+ "type": "string"
2974
+ }
2975
+ },
2976
+ "additionalProperties": false,
2977
+ "required": [
2978
+ "kind",
2979
+ "storyType"
2980
+ ]
2981
+ },
2982
+ {
2983
+ "type": "object",
2984
+ "properties": {
2985
+ "kind": {
2986
+ "const": "story",
2987
+ "type": "string"
2988
+ },
2989
+ "storyType": {
2990
+ "const": "headerFooterSlot",
2991
+ "type": "string"
2992
+ },
2993
+ "section": {
2994
+ "$ref": "#/$defs/SectionAddress"
2995
+ },
2996
+ "headerFooterKind": {
2997
+ "enum": [
2998
+ "header",
2999
+ "footer"
3000
+ ]
3001
+ },
3002
+ "variant": {
3003
+ "enum": [
3004
+ "default",
3005
+ "first",
3006
+ "even"
3007
+ ]
3008
+ },
3009
+ "resolution": {
3010
+ "enum": [
3011
+ "effective",
3012
+ "explicit"
3013
+ ]
3014
+ },
3015
+ "onWrite": {
3016
+ "enum": [
3017
+ "materializeIfInherited",
3018
+ "editResolvedPart",
3019
+ "error"
3020
+ ]
3021
+ }
3022
+ },
3023
+ "additionalProperties": false,
3024
+ "required": [
3025
+ "kind",
3026
+ "storyType",
3027
+ "section",
3028
+ "headerFooterKind",
3029
+ "variant"
3030
+ ]
3031
+ },
3032
+ {
3033
+ "type": "object",
3034
+ "properties": {
3035
+ "kind": {
3036
+ "const": "story",
3037
+ "type": "string"
3038
+ },
3039
+ "storyType": {
3040
+ "const": "headerFooterPart",
3041
+ "type": "string"
3042
+ },
3043
+ "refId": {
3044
+ "type": "string"
3045
+ }
3046
+ },
3047
+ "additionalProperties": false,
3048
+ "required": [
3049
+ "kind",
3050
+ "storyType",
3051
+ "refId"
3052
+ ]
3053
+ },
3054
+ {
3055
+ "type": "object",
3056
+ "properties": {
3057
+ "kind": {
3058
+ "const": "story",
3059
+ "type": "string"
3060
+ },
3061
+ "storyType": {
3062
+ "const": "footnote",
3063
+ "type": "string"
3064
+ },
3065
+ "noteId": {
3066
+ "type": "string"
3067
+ }
3068
+ },
3069
+ "additionalProperties": false,
3070
+ "required": [
3071
+ "kind",
3072
+ "storyType",
3073
+ "noteId"
3074
+ ]
3075
+ },
3076
+ {
3077
+ "type": "object",
3078
+ "properties": {
3079
+ "kind": {
3080
+ "const": "story",
3081
+ "type": "string"
3082
+ },
3083
+ "storyType": {
3084
+ "const": "endnote",
3085
+ "type": "string"
3086
+ },
3087
+ "noteId": {
3088
+ "type": "string"
3089
+ }
3090
+ },
3091
+ "additionalProperties": false,
3092
+ "required": [
3093
+ "kind",
3094
+ "storyType",
3095
+ "noteId"
3096
+ ]
3097
+ },
3098
+ {
3099
+ "type": "object",
3100
+ "properties": {
3101
+ "kind": {
3102
+ "const": "story",
3103
+ "type": "string"
3104
+ },
3105
+ "storyType": {
3106
+ "const": "textbox",
3107
+ "type": "string"
3108
+ },
3109
+ "textboxId": {
3110
+ "type": "string"
3111
+ }
3112
+ },
3113
+ "additionalProperties": false,
3114
+ "required": [
3115
+ "kind",
3116
+ "storyType",
3117
+ "textboxId"
3118
+ ]
3119
+ }
3120
+ ]
3121
+ },
3122
+ "TextCoordinateSpace": {
3123
+ "enum": [
3124
+ "visible",
3125
+ "tracked"
3126
+ ]
3127
+ }
3128
+ }
3129
+ }
3130
+ },
3131
+ {
3132
+ "name": "superdoc_create",
3133
+ "description": "IMPORTANT: For headings and paragraphs, use superdoc_edit with type \"markdown\" instead: it is faster, creates proper styles, and handles positioning via target + placement. Only use superdoc_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate superdoc_format call. For subsequent operations, re-fetch blocks with superdoc_get_content to get fresh refs (refs expire after any mutation). When the user asks for a \"heading\", use action \"heading\" with a level (default 1). Use action \"paragraph\" for regular body text. Position with \"at\": {kind:\"documentEnd\"} (default), {kind:\"documentStart\"}, or {kind:\"after\"/\"before\", target:{kind:\"block\", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next \"at\" target to maintain correct ordering. Do NOT use newlines in \"text\" to create multiple paragraphs; call this tool separately for each one.\n\nEXAMPLES:\n 1. {\"action\":\"paragraph\",\"text\":\"New paragraph content.\",\"at\":{\"kind\":\"documentEnd\"}}\n 2. {\"action\":\"heading\",\"text\":\"Section Title\",\"level\":2,\"at\":{\"kind\":\"after\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"}}}\n 3. {\"action\":\"paragraph\",\"text\":\"Chained item.\",\"at\":{\"kind\":\"after\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<previousNodeId>\"}}}\n 4. {\"action\":\"table\",\"rows\":3,\"columns\":4,\"at\":{\"kind\":\"documentEnd\"}}",
3134
+ "input_schema": {
3135
+ "type": "object",
3136
+ "properties": {
3137
+ "action": {
3138
+ "type": "string",
3139
+ "enum": [
2030
3140
  "heading",
2031
3141
  "paragraph",
2032
3142
  "table"
@@ -2291,14 +3401,228 @@
2291
3401
  "required": [
2292
3402
  "action"
2293
3403
  ],
2294
- "additionalProperties": false
2295
- }
2296
- },
2297
- {
2298
- "name": "superdoc_list",
2299
- "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\"|\"lowerLetterParenthesis\"|\"upperLetter\"|\"upperLetterParenthesis\"|\"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.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"mode\":\"fromParagraphs\",\"preset\":\"disc\",\"target\":{\"from\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<firstId>\"},\"to\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<lastId>\"}}}\n 2. {\"action\":\"set_type\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"kind\":\"ordered\"}\n 3. {\"action\":\"insert\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"position\":\"after\",\"text\":\"New list item\"}\n 4. {\"action\":\"indent\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"}}\n 5. {\"action\":\"merge\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"direction\":\"withPrevious\"}\n 6. {\"action\":\"split\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"}}\n 7. {\"action\":\"set_value\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"value\":1}\n 8. {\"action\":\"continue_previous\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"}}",
2300
- "input_schema": {
2301
- "type": "object",
3404
+ "additionalProperties": false,
3405
+ "$defs": {
3406
+ "BlockNodeAddress": {
3407
+ "type": "object",
3408
+ "properties": {
3409
+ "kind": {
3410
+ "const": "block",
3411
+ "type": "string"
3412
+ },
3413
+ "nodeType": {
3414
+ "enum": [
3415
+ "paragraph",
3416
+ "heading",
3417
+ "listItem",
3418
+ "table",
3419
+ "tableRow",
3420
+ "tableCell",
3421
+ "tableOfContents",
3422
+ "image",
3423
+ "sdt"
3424
+ ]
3425
+ },
3426
+ "nodeId": {
3427
+ "type": "string"
3428
+ },
3429
+ "story": {
3430
+ "$ref": "#/$defs/StoryLocator"
3431
+ }
3432
+ },
3433
+ "additionalProperties": false,
3434
+ "required": [
3435
+ "kind",
3436
+ "nodeType",
3437
+ "nodeId"
3438
+ ]
3439
+ },
3440
+ "SectionAddress": {
3441
+ "type": "object",
3442
+ "properties": {
3443
+ "kind": {
3444
+ "const": "section",
3445
+ "type": "string"
3446
+ },
3447
+ "sectionId": {
3448
+ "type": "string"
3449
+ }
3450
+ },
3451
+ "additionalProperties": false,
3452
+ "required": [
3453
+ "kind",
3454
+ "sectionId"
3455
+ ]
3456
+ },
3457
+ "StoryLocator": {
3458
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
3459
+ "oneOf": [
3460
+ {
3461
+ "type": "object",
3462
+ "properties": {
3463
+ "kind": {
3464
+ "const": "story",
3465
+ "type": "string"
3466
+ },
3467
+ "storyType": {
3468
+ "const": "body",
3469
+ "type": "string"
3470
+ }
3471
+ },
3472
+ "additionalProperties": false,
3473
+ "required": [
3474
+ "kind",
3475
+ "storyType"
3476
+ ]
3477
+ },
3478
+ {
3479
+ "type": "object",
3480
+ "properties": {
3481
+ "kind": {
3482
+ "const": "story",
3483
+ "type": "string"
3484
+ },
3485
+ "storyType": {
3486
+ "const": "headerFooterSlot",
3487
+ "type": "string"
3488
+ },
3489
+ "section": {
3490
+ "$ref": "#/$defs/SectionAddress"
3491
+ },
3492
+ "headerFooterKind": {
3493
+ "enum": [
3494
+ "header",
3495
+ "footer"
3496
+ ]
3497
+ },
3498
+ "variant": {
3499
+ "enum": [
3500
+ "default",
3501
+ "first",
3502
+ "even"
3503
+ ]
3504
+ },
3505
+ "resolution": {
3506
+ "enum": [
3507
+ "effective",
3508
+ "explicit"
3509
+ ]
3510
+ },
3511
+ "onWrite": {
3512
+ "enum": [
3513
+ "materializeIfInherited",
3514
+ "editResolvedPart",
3515
+ "error"
3516
+ ]
3517
+ }
3518
+ },
3519
+ "additionalProperties": false,
3520
+ "required": [
3521
+ "kind",
3522
+ "storyType",
3523
+ "section",
3524
+ "headerFooterKind",
3525
+ "variant"
3526
+ ]
3527
+ },
3528
+ {
3529
+ "type": "object",
3530
+ "properties": {
3531
+ "kind": {
3532
+ "const": "story",
3533
+ "type": "string"
3534
+ },
3535
+ "storyType": {
3536
+ "const": "headerFooterPart",
3537
+ "type": "string"
3538
+ },
3539
+ "refId": {
3540
+ "type": "string"
3541
+ }
3542
+ },
3543
+ "additionalProperties": false,
3544
+ "required": [
3545
+ "kind",
3546
+ "storyType",
3547
+ "refId"
3548
+ ]
3549
+ },
3550
+ {
3551
+ "type": "object",
3552
+ "properties": {
3553
+ "kind": {
3554
+ "const": "story",
3555
+ "type": "string"
3556
+ },
3557
+ "storyType": {
3558
+ "const": "footnote",
3559
+ "type": "string"
3560
+ },
3561
+ "noteId": {
3562
+ "type": "string"
3563
+ }
3564
+ },
3565
+ "additionalProperties": false,
3566
+ "required": [
3567
+ "kind",
3568
+ "storyType",
3569
+ "noteId"
3570
+ ]
3571
+ },
3572
+ {
3573
+ "type": "object",
3574
+ "properties": {
3575
+ "kind": {
3576
+ "const": "story",
3577
+ "type": "string"
3578
+ },
3579
+ "storyType": {
3580
+ "const": "endnote",
3581
+ "type": "string"
3582
+ },
3583
+ "noteId": {
3584
+ "type": "string"
3585
+ }
3586
+ },
3587
+ "additionalProperties": false,
3588
+ "required": [
3589
+ "kind",
3590
+ "storyType",
3591
+ "noteId"
3592
+ ]
3593
+ },
3594
+ {
3595
+ "type": "object",
3596
+ "properties": {
3597
+ "kind": {
3598
+ "const": "story",
3599
+ "type": "string"
3600
+ },
3601
+ "storyType": {
3602
+ "const": "textbox",
3603
+ "type": "string"
3604
+ },
3605
+ "textboxId": {
3606
+ "type": "string"
3607
+ }
3608
+ },
3609
+ "additionalProperties": false,
3610
+ "required": [
3611
+ "kind",
3612
+ "storyType",
3613
+ "textboxId"
3614
+ ]
3615
+ }
3616
+ ]
3617
+ }
3618
+ }
3619
+ }
3620
+ },
3621
+ {
3622
+ "name": "superdoc_list",
3623
+ "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\"|\"lowerLetterParenthesis\"|\"upperLetter\"|\"upperLetterParenthesis\"|\"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.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"mode\":\"fromParagraphs\",\"preset\":\"disc\",\"target\":{\"from\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<firstId>\"},\"to\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<lastId>\"}}}\n 2. {\"action\":\"set_type\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"kind\":\"ordered\"}\n 3. {\"action\":\"insert\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"position\":\"after\",\"text\":\"New list item\"}\n 4. {\"action\":\"indent\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"}}\n 5. {\"action\":\"merge\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"direction\":\"withPrevious\"}\n 6. {\"action\":\"split\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"}}\n 7. {\"action\":\"set_value\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"},\"value\":1}\n 8. {\"action\":\"continue_previous\",\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"<itemId>\"}}",
3624
+ "input_schema": {
3625
+ "type": "object",
2302
3626
  "properties": {
2303
3627
  "action": {
2304
3628
  "type": "string",
@@ -2662,63 +3986,316 @@
2662
3986
  "required": [
2663
3987
  "action"
2664
3988
  ],
2665
- "additionalProperties": false
2666
- }
2667
- },
2668
- {
2669
- "name": "superdoc_comment",
2670
- "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>\"}",
2671
- "input_schema": {
2672
- "type": "object",
2673
- "properties": {
2674
- "action": {
2675
- "type": "string",
2676
- "enum": [
2677
- "create",
2678
- "delete",
2679
- "get",
2680
- "list",
2681
- "update"
2682
- ],
2683
- "description": "The action to perform. One of: create, delete, get, list, update."
2684
- },
2685
- "force": {
2686
- "type": "boolean",
2687
- "description": "Bypass confirmation checks."
2688
- },
2689
- "changeMode": {
2690
- "type": "string",
2691
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
3989
+ "additionalProperties": false,
3990
+ "$defs": {
3991
+ "BlockAddress": {
3992
+ "type": "object",
3993
+ "properties": {
3994
+ "kind": {
3995
+ "const": "block",
3996
+ "type": "string"
3997
+ },
3998
+ "nodeType": {
3999
+ "const": "paragraph",
4000
+ "type": "string"
4001
+ },
4002
+ "nodeId": {
4003
+ "type": "string"
4004
+ }
4005
+ },
4006
+ "additionalProperties": false,
4007
+ "required": [
4008
+ "kind",
4009
+ "nodeType",
4010
+ "nodeId"
4011
+ ]
2692
4012
  },
2693
- "text": {
2694
- "anyOf": [
4013
+ "BlockAddressOrRange": {
4014
+ "oneOf": [
2695
4015
  {
2696
- "type": "string",
2697
- "description": "Comment text content."
4016
+ "$ref": "#/$defs/BlockAddress"
2698
4017
  },
2699
4018
  {
2700
- "type": "string",
2701
- "description": "Updated comment text."
4019
+ "$ref": "#/$defs/BlockRange"
2702
4020
  }
2703
- ],
2704
- "description": "Comment text content. Required for action 'create'."
4021
+ ]
2705
4022
  },
2706
- "target": {
2707
- "anyOf": [
4023
+ "BlockRange": {
4024
+ "type": "object",
4025
+ "properties": {
4026
+ "from": {
4027
+ "$ref": "#/$defs/BlockAddress"
4028
+ },
4029
+ "to": {
4030
+ "$ref": "#/$defs/BlockAddress"
4031
+ }
4032
+ },
4033
+ "additionalProperties": false,
4034
+ "required": [
4035
+ "from",
4036
+ "to"
4037
+ ]
4038
+ },
4039
+ "ListItemAddress": {
4040
+ "type": "object",
4041
+ "properties": {
4042
+ "kind": {
4043
+ "const": "block",
4044
+ "type": "string"
4045
+ },
4046
+ "nodeType": {
4047
+ "const": "listItem",
4048
+ "type": "string"
4049
+ },
4050
+ "nodeId": {
4051
+ "type": "string"
4052
+ },
4053
+ "story": {
4054
+ "$ref": "#/$defs/StoryLocator"
4055
+ }
4056
+ },
4057
+ "additionalProperties": false,
4058
+ "required": [
4059
+ "kind",
4060
+ "nodeType",
4061
+ "nodeId"
4062
+ ]
4063
+ },
4064
+ "SectionAddress": {
4065
+ "type": "object",
4066
+ "properties": {
4067
+ "kind": {
4068
+ "const": "section",
4069
+ "type": "string"
4070
+ },
4071
+ "sectionId": {
4072
+ "type": "string"
4073
+ }
4074
+ },
4075
+ "additionalProperties": false,
4076
+ "required": [
4077
+ "kind",
4078
+ "sectionId"
4079
+ ]
4080
+ },
4081
+ "StoryLocator": {
4082
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
4083
+ "oneOf": [
2708
4084
  {
2709
- "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range}, a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks, a SelectionTarget {kind:'selection', start, end} returned by query.match, a TextSearchCommentTarget {text, story?}, or a TrackedChangeCommentTarget ({kind:'trackedChange', trackedChangeId, side?} or {trackedChangeId, side?}) that names a logical tracked-change id as a convenience anchor .",
2710
- "oneOf": [
2711
- {
2712
- "$ref": "#/$defs/TextAddress"
4085
+ "type": "object",
4086
+ "properties": {
4087
+ "kind": {
4088
+ "const": "story",
4089
+ "type": "string"
2713
4090
  },
2714
- {
2715
- "$ref": "#/$defs/TextTarget"
4091
+ "storyType": {
4092
+ "const": "body",
4093
+ "type": "string"
4094
+ }
4095
+ },
4096
+ "additionalProperties": false,
4097
+ "required": [
4098
+ "kind",
4099
+ "storyType"
4100
+ ]
4101
+ },
4102
+ {
4103
+ "type": "object",
4104
+ "properties": {
4105
+ "kind": {
4106
+ "const": "story",
4107
+ "type": "string"
2716
4108
  },
2717
- {
2718
- "$ref": "#/$defs/SelectionTarget"
4109
+ "storyType": {
4110
+ "const": "headerFooterSlot",
4111
+ "type": "string"
2719
4112
  },
2720
- {
2721
- "$ref": "#/$defs/CommentTrackedChangeTarget"
4113
+ "section": {
4114
+ "$ref": "#/$defs/SectionAddress"
4115
+ },
4116
+ "headerFooterKind": {
4117
+ "enum": [
4118
+ "header",
4119
+ "footer"
4120
+ ]
4121
+ },
4122
+ "variant": {
4123
+ "enum": [
4124
+ "default",
4125
+ "first",
4126
+ "even"
4127
+ ]
4128
+ },
4129
+ "resolution": {
4130
+ "enum": [
4131
+ "effective",
4132
+ "explicit"
4133
+ ]
4134
+ },
4135
+ "onWrite": {
4136
+ "enum": [
4137
+ "materializeIfInherited",
4138
+ "editResolvedPart",
4139
+ "error"
4140
+ ]
4141
+ }
4142
+ },
4143
+ "additionalProperties": false,
4144
+ "required": [
4145
+ "kind",
4146
+ "storyType",
4147
+ "section",
4148
+ "headerFooterKind",
4149
+ "variant"
4150
+ ]
4151
+ },
4152
+ {
4153
+ "type": "object",
4154
+ "properties": {
4155
+ "kind": {
4156
+ "const": "story",
4157
+ "type": "string"
4158
+ },
4159
+ "storyType": {
4160
+ "const": "headerFooterPart",
4161
+ "type": "string"
4162
+ },
4163
+ "refId": {
4164
+ "type": "string"
4165
+ }
4166
+ },
4167
+ "additionalProperties": false,
4168
+ "required": [
4169
+ "kind",
4170
+ "storyType",
4171
+ "refId"
4172
+ ]
4173
+ },
4174
+ {
4175
+ "type": "object",
4176
+ "properties": {
4177
+ "kind": {
4178
+ "const": "story",
4179
+ "type": "string"
4180
+ },
4181
+ "storyType": {
4182
+ "const": "footnote",
4183
+ "type": "string"
4184
+ },
4185
+ "noteId": {
4186
+ "type": "string"
4187
+ }
4188
+ },
4189
+ "additionalProperties": false,
4190
+ "required": [
4191
+ "kind",
4192
+ "storyType",
4193
+ "noteId"
4194
+ ]
4195
+ },
4196
+ {
4197
+ "type": "object",
4198
+ "properties": {
4199
+ "kind": {
4200
+ "const": "story",
4201
+ "type": "string"
4202
+ },
4203
+ "storyType": {
4204
+ "const": "endnote",
4205
+ "type": "string"
4206
+ },
4207
+ "noteId": {
4208
+ "type": "string"
4209
+ }
4210
+ },
4211
+ "additionalProperties": false,
4212
+ "required": [
4213
+ "kind",
4214
+ "storyType",
4215
+ "noteId"
4216
+ ]
4217
+ },
4218
+ {
4219
+ "type": "object",
4220
+ "properties": {
4221
+ "kind": {
4222
+ "const": "story",
4223
+ "type": "string"
4224
+ },
4225
+ "storyType": {
4226
+ "const": "textbox",
4227
+ "type": "string"
4228
+ },
4229
+ "textboxId": {
4230
+ "type": "string"
4231
+ }
4232
+ },
4233
+ "additionalProperties": false,
4234
+ "required": [
4235
+ "kind",
4236
+ "storyType",
4237
+ "textboxId"
4238
+ ]
4239
+ }
4240
+ ]
4241
+ }
4242
+ }
4243
+ }
4244
+ },
4245
+ {
4246
+ "name": "superdoc_comment",
4247
+ "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>\"}",
4248
+ "input_schema": {
4249
+ "type": "object",
4250
+ "properties": {
4251
+ "action": {
4252
+ "type": "string",
4253
+ "enum": [
4254
+ "create",
4255
+ "delete",
4256
+ "get",
4257
+ "list",
4258
+ "update"
4259
+ ],
4260
+ "description": "The action to perform. One of: create, delete, get, list, update."
4261
+ },
4262
+ "force": {
4263
+ "type": "boolean",
4264
+ "description": "Bypass confirmation checks."
4265
+ },
4266
+ "changeMode": {
4267
+ "type": "string",
4268
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
4269
+ },
4270
+ "text": {
4271
+ "anyOf": [
4272
+ {
4273
+ "type": "string",
4274
+ "description": "Comment text content."
4275
+ },
4276
+ {
4277
+ "type": "string",
4278
+ "description": "Updated comment text."
4279
+ }
4280
+ ],
4281
+ "description": "Comment text content. Required for action 'create'."
4282
+ },
4283
+ "target": {
4284
+ "anyOf": [
4285
+ {
4286
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range}, a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks, a SelectionTarget {kind:'selection', start, end} returned by query.match, a TextSearchCommentTarget {text, story?}, or a TrackedChangeCommentTarget ({kind:'trackedChange', trackedChangeId, side?} or {trackedChangeId, side?}) that names a logical tracked-change id as a convenience anchor .",
4287
+ "oneOf": [
4288
+ {
4289
+ "$ref": "#/$defs/TextAddress"
4290
+ },
4291
+ {
4292
+ "$ref": "#/$defs/TextTarget"
4293
+ },
4294
+ {
4295
+ "$ref": "#/$defs/SelectionTarget"
4296
+ },
4297
+ {
4298
+ "$ref": "#/$defs/CommentTrackedChangeTarget"
2722
4299
  },
2723
4300
  {
2724
4301
  "type": "object",
@@ -2860,87 +4437,498 @@
2860
4437
  "required": [
2861
4438
  "action"
2862
4439
  ],
2863
- "additionalProperties": false
2864
- }
2865
- },
2866
- {
2867
- "name": "superdoc_track_changes",
2868
- "description": "Review and resolve tracked changes (insertions, deletions, replacements, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, replacement, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"}, several whole changes atomically with {kind:\"ids\", ids:[...]}, a partial selection with {kind:\"range\", range:{...}}, or all changes at once with {scope:\"all\"} (optionally plus story). Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"insertion\",\"limit\":10}\n 3. {\"action\":\"list\",\"type\":\"replacement\",\"limit\":10}\n 4. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 5. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"kind\":\"ids\",\"ids\":[\"<changeId1>\",\"<changeId2>\"]}}\n 6. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"kind\":\"range\",\"range\":{\"kind\":\"text\",\"segments\":[{\"blockId\":\"<blockId>\",\"range\":{\"start\":0,\"end\":5}}]}}}\n 7. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2869
- "input_schema": {
2870
- "type": "object",
2871
- "properties": {
2872
- "action": {
2873
- "type": "string",
2874
- "enum": [
2875
- "decide",
2876
- "list"
2877
- ],
2878
- "description": "The action to perform. One of: decide, list."
2879
- },
2880
- "limit": {
2881
- "type": "integer",
2882
- "description": "Maximum number of tracked changes to return. Only for action 'list'. Omit for other actions."
2883
- },
2884
- "offset": {
2885
- "type": "integer",
2886
- "description": "Number of tracked changes to skip for pagination. Only for action 'list'. Omit for other actions."
2887
- },
2888
- "type": {
2889
- "enum": [
2890
- "insertion",
2891
- "deletion",
2892
- "replacement",
2893
- "formatting",
2894
- "move",
2895
- "structural",
2896
- "insert",
2897
- "delete",
2898
- "format"
2899
- ],
2900
- "description": "Filter by change type. Canonical values: 'insertion', 'deletion', 'replacement', 'formatting', 'move', 'structural'. Legacy aliases 'insert', 'delete', and 'format' remain accepted during migration. Only for action 'list'. Omit for other actions."
2901
- },
2902
- "in": {
2903
- "oneOf": [
2904
- {
2905
- "$ref": "#/$defs/StoryLocator"
4440
+ "additionalProperties": false,
4441
+ "$defs": {
4442
+ "CommentTrackedChangeTarget": {
4443
+ "type": "object",
4444
+ "properties": {
4445
+ "kind": {
4446
+ "const": "trackedChange",
4447
+ "description": "Optional discriminator. Omit it for the Labs-compatible { trackedChangeId } shape.",
4448
+ "type": "string"
2906
4449
  },
2907
- {
2908
- "const": "all",
4450
+ "trackedChangeId": {
2909
4451
  "type": "string"
4452
+ },
4453
+ "side": {
4454
+ "enum": [
4455
+ "inserted",
4456
+ "deleted",
4457
+ "source",
4458
+ "destination"
4459
+ ],
4460
+ "description": "Which revision side to anchor the comment on. Optional for grouped replacements (defaults to inserted) and paired moves (defaults to destination); required for separate replacements where both sides are reviewed independently."
4461
+ },
4462
+ "story": {
4463
+ "$ref": "#/$defs/StoryLocator"
2910
4464
  }
2911
- ],
2912
- "description": "Story scope. Omit for body only, pass a StoryLocator for a single story, or 'all' for body + every revision-capable non-body story. Only for action 'list'. Omit for other actions."
2913
- },
2914
- "force": {
2915
- "type": "boolean",
2916
- "description": "Bypass confirmation checks. Only for action 'decide'. Omit for other actions."
4465
+ },
4466
+ "additionalProperties": false,
4467
+ "required": [
4468
+ "trackedChangeId"
4469
+ ]
2917
4470
  },
2918
- "changeMode": {
2919
- "type": "string",
2920
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions. Only for action 'decide'. Omit for other actions."
4471
+ "Range": {
4472
+ "type": "object",
4473
+ "properties": {
4474
+ "start": {
4475
+ "type": "integer"
4476
+ },
4477
+ "end": {
4478
+ "type": "integer"
4479
+ }
4480
+ },
4481
+ "additionalProperties": false,
4482
+ "required": [
4483
+ "start",
4484
+ "end"
4485
+ ]
2921
4486
  },
2922
- "decision": {
2923
- "enum": [
2924
- "accept",
2925
- "reject"
2926
- ],
2927
- "description": "Required for action 'decide'."
4487
+ "SectionAddress": {
4488
+ "type": "object",
4489
+ "properties": {
4490
+ "kind": {
4491
+ "const": "section",
4492
+ "type": "string"
4493
+ },
4494
+ "sectionId": {
4495
+ "type": "string"
4496
+ }
4497
+ },
4498
+ "additionalProperties": false,
4499
+ "required": [
4500
+ "kind",
4501
+ "sectionId"
4502
+ ]
2928
4503
  },
2929
- "expectedRevision": {
2930
- "type": "string",
2931
- "description": "Backward-compatible alias for options.expectedRevision. Explicit mutation options take precedence when both are supplied. Only for action 'decide'. Omit for other actions."
4504
+ "SelectionEdgeNodeAddress": {
4505
+ "type": "object",
4506
+ "properties": {
4507
+ "kind": {
4508
+ "const": "block",
4509
+ "type": "string"
4510
+ },
4511
+ "nodeType": {
4512
+ "enum": [
4513
+ "paragraph",
4514
+ "heading",
4515
+ "listItem",
4516
+ "table",
4517
+ "tableOfContents",
4518
+ "sdt",
4519
+ "image"
4520
+ ]
4521
+ },
4522
+ "nodeId": {
4523
+ "type": "string"
4524
+ },
4525
+ "story": {
4526
+ "$ref": "#/$defs/StoryLocator"
4527
+ }
4528
+ },
4529
+ "additionalProperties": false,
4530
+ "required": [
4531
+ "kind",
4532
+ "nodeType",
4533
+ "nodeId"
4534
+ ]
2932
4535
  },
2933
- "target": {
2934
- "description": "Decision target. Canonical shapes: { kind: 'id', id, story? } (one whole logical tracked change), { kind: 'ids', ids } (several whole logical tracked changes in one atomic history unit), { kind: 'range', range: TextTarget, coordinateSpace?, overlap?, side?, story?, part? } or { kind: 'range', range: { anchor, relativeStart, relativeEnd }, overlap?, side?, story?, part? } (resolves only the selected overlap; may split fragments), { kind: 'all' } (every active tracked change). Legacy { id, story? } / { id, range: { kind: 'partial', start, end } } / { scope: 'all' } shapes are accepted and transparently promoted to canonical targets. Required for action 'decide'.",
4536
+ "SelectionPoint": {
4537
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.",
2935
4538
  "oneOf": [
2936
4539
  {
2937
4540
  "type": "object",
2938
4541
  "properties": {
2939
4542
  "kind": {
2940
- "const": "id",
4543
+ "const": "text",
2941
4544
  "type": "string"
2942
4545
  },
2943
- "id": {
4546
+ "blockId": {
4547
+ "type": "string"
4548
+ },
4549
+ "offset": {
4550
+ "type": "integer",
4551
+ "minimum": 0
4552
+ },
4553
+ "story": {
4554
+ "$ref": "#/$defs/StoryLocator"
4555
+ }
4556
+ },
4557
+ "additionalProperties": false,
4558
+ "required": [
4559
+ "kind",
4560
+ "blockId",
4561
+ "offset"
4562
+ ]
4563
+ },
4564
+ {
4565
+ "type": "object",
4566
+ "properties": {
4567
+ "kind": {
4568
+ "const": "nodeEdge",
4569
+ "type": "string"
4570
+ },
4571
+ "node": {
4572
+ "$ref": "#/$defs/SelectionEdgeNodeAddress"
4573
+ },
4574
+ "edge": {
4575
+ "enum": [
4576
+ "before",
4577
+ "after"
4578
+ ]
4579
+ }
4580
+ },
4581
+ "additionalProperties": false,
4582
+ "required": [
4583
+ "kind",
4584
+ "node",
4585
+ "edge"
4586
+ ]
4587
+ }
4588
+ ]
4589
+ },
4590
+ "SelectionTarget": {
4591
+ "type": "object",
4592
+ "properties": {
4593
+ "kind": {
4594
+ "const": "selection",
4595
+ "type": "string"
4596
+ },
4597
+ "start": {
4598
+ "$ref": "#/$defs/SelectionPoint"
4599
+ },
4600
+ "end": {
4601
+ "$ref": "#/$defs/SelectionPoint"
4602
+ },
4603
+ "story": {
4604
+ "$ref": "#/$defs/StoryLocator"
4605
+ },
4606
+ "coordinateSpace": {
4607
+ "$ref": "#/$defs/TextCoordinateSpace"
4608
+ }
4609
+ },
4610
+ "additionalProperties": false,
4611
+ "required": [
4612
+ "kind",
4613
+ "start",
4614
+ "end"
4615
+ ]
4616
+ },
4617
+ "StoryLocator": {
4618
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
4619
+ "oneOf": [
4620
+ {
4621
+ "type": "object",
4622
+ "properties": {
4623
+ "kind": {
4624
+ "const": "story",
4625
+ "type": "string"
4626
+ },
4627
+ "storyType": {
4628
+ "const": "body",
4629
+ "type": "string"
4630
+ }
4631
+ },
4632
+ "additionalProperties": false,
4633
+ "required": [
4634
+ "kind",
4635
+ "storyType"
4636
+ ]
4637
+ },
4638
+ {
4639
+ "type": "object",
4640
+ "properties": {
4641
+ "kind": {
4642
+ "const": "story",
4643
+ "type": "string"
4644
+ },
4645
+ "storyType": {
4646
+ "const": "headerFooterSlot",
4647
+ "type": "string"
4648
+ },
4649
+ "section": {
4650
+ "$ref": "#/$defs/SectionAddress"
4651
+ },
4652
+ "headerFooterKind": {
4653
+ "enum": [
4654
+ "header",
4655
+ "footer"
4656
+ ]
4657
+ },
4658
+ "variant": {
4659
+ "enum": [
4660
+ "default",
4661
+ "first",
4662
+ "even"
4663
+ ]
4664
+ },
4665
+ "resolution": {
4666
+ "enum": [
4667
+ "effective",
4668
+ "explicit"
4669
+ ]
4670
+ },
4671
+ "onWrite": {
4672
+ "enum": [
4673
+ "materializeIfInherited",
4674
+ "editResolvedPart",
4675
+ "error"
4676
+ ]
4677
+ }
4678
+ },
4679
+ "additionalProperties": false,
4680
+ "required": [
4681
+ "kind",
4682
+ "storyType",
4683
+ "section",
4684
+ "headerFooterKind",
4685
+ "variant"
4686
+ ]
4687
+ },
4688
+ {
4689
+ "type": "object",
4690
+ "properties": {
4691
+ "kind": {
4692
+ "const": "story",
4693
+ "type": "string"
4694
+ },
4695
+ "storyType": {
4696
+ "const": "headerFooterPart",
4697
+ "type": "string"
4698
+ },
4699
+ "refId": {
4700
+ "type": "string"
4701
+ }
4702
+ },
4703
+ "additionalProperties": false,
4704
+ "required": [
4705
+ "kind",
4706
+ "storyType",
4707
+ "refId"
4708
+ ]
4709
+ },
4710
+ {
4711
+ "type": "object",
4712
+ "properties": {
4713
+ "kind": {
4714
+ "const": "story",
4715
+ "type": "string"
4716
+ },
4717
+ "storyType": {
4718
+ "const": "footnote",
4719
+ "type": "string"
4720
+ },
4721
+ "noteId": {
4722
+ "type": "string"
4723
+ }
4724
+ },
4725
+ "additionalProperties": false,
4726
+ "required": [
4727
+ "kind",
4728
+ "storyType",
4729
+ "noteId"
4730
+ ]
4731
+ },
4732
+ {
4733
+ "type": "object",
4734
+ "properties": {
4735
+ "kind": {
4736
+ "const": "story",
4737
+ "type": "string"
4738
+ },
4739
+ "storyType": {
4740
+ "const": "endnote",
4741
+ "type": "string"
4742
+ },
4743
+ "noteId": {
4744
+ "type": "string"
4745
+ }
4746
+ },
4747
+ "additionalProperties": false,
4748
+ "required": [
4749
+ "kind",
4750
+ "storyType",
4751
+ "noteId"
4752
+ ]
4753
+ },
4754
+ {
4755
+ "type": "object",
4756
+ "properties": {
4757
+ "kind": {
4758
+ "const": "story",
4759
+ "type": "string"
4760
+ },
4761
+ "storyType": {
4762
+ "const": "textbox",
4763
+ "type": "string"
4764
+ },
4765
+ "textboxId": {
4766
+ "type": "string"
4767
+ }
4768
+ },
4769
+ "additionalProperties": false,
4770
+ "required": [
4771
+ "kind",
4772
+ "storyType",
4773
+ "textboxId"
4774
+ ]
4775
+ }
4776
+ ]
4777
+ },
4778
+ "TextAddress": {
4779
+ "type": "object",
4780
+ "properties": {
4781
+ "kind": {
4782
+ "const": "text",
4783
+ "type": "string"
4784
+ },
4785
+ "blockId": {
4786
+ "type": "string"
4787
+ },
4788
+ "range": {
4789
+ "$ref": "#/$defs/Range"
4790
+ },
4791
+ "story": {
4792
+ "$ref": "#/$defs/StoryLocator"
4793
+ }
4794
+ },
4795
+ "additionalProperties": false,
4796
+ "required": [
4797
+ "kind",
4798
+ "blockId",
4799
+ "range"
4800
+ ]
4801
+ },
4802
+ "TextCoordinateSpace": {
4803
+ "enum": [
4804
+ "visible",
4805
+ "tracked"
4806
+ ]
4807
+ },
4808
+ "TextSegment": {
4809
+ "type": "object",
4810
+ "properties": {
4811
+ "blockId": {
4812
+ "type": "string"
4813
+ },
4814
+ "range": {
4815
+ "$ref": "#/$defs/Range"
4816
+ }
4817
+ },
4818
+ "additionalProperties": false,
4819
+ "required": [
4820
+ "blockId",
4821
+ "range"
4822
+ ]
4823
+ },
4824
+ "TextTarget": {
4825
+ "type": "object",
4826
+ "properties": {
4827
+ "kind": {
4828
+ "const": "text",
4829
+ "type": "string"
4830
+ },
4831
+ "segments": {
4832
+ "type": "array",
4833
+ "items": {
4834
+ "$ref": "#/$defs/TextSegment"
4835
+ },
4836
+ "minItems": 1
4837
+ },
4838
+ "story": {
4839
+ "$ref": "#/$defs/StoryLocator"
4840
+ },
4841
+ "coordinateSpace": {
4842
+ "$ref": "#/$defs/TextCoordinateSpace"
4843
+ }
4844
+ },
4845
+ "additionalProperties": false,
4846
+ "required": [
4847
+ "kind",
4848
+ "segments"
4849
+ ]
4850
+ }
4851
+ }
4852
+ }
4853
+ },
4854
+ {
4855
+ "name": "superdoc_track_changes",
4856
+ "description": "Review and resolve tracked changes (insertions, deletions, replacements, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, replacement, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"}, several whole changes atomically with {kind:\"ids\", ids:[...]}, a partial selection with {kind:\"range\", range:{...}}, or all changes at once with {scope:\"all\"} (optionally plus story). Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"insertion\",\"limit\":10}\n 3. {\"action\":\"list\",\"type\":\"replacement\",\"limit\":10}\n 4. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 5. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"kind\":\"ids\",\"ids\":[\"<changeId1>\",\"<changeId2>\"]}}\n 6. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"kind\":\"range\",\"range\":{\"kind\":\"text\",\"segments\":[{\"blockId\":\"<blockId>\",\"range\":{\"start\":0,\"end\":5}}]}}}\n 7. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
4857
+ "input_schema": {
4858
+ "type": "object",
4859
+ "properties": {
4860
+ "action": {
4861
+ "type": "string",
4862
+ "enum": [
4863
+ "decide",
4864
+ "list"
4865
+ ],
4866
+ "description": "The action to perform. One of: decide, list."
4867
+ },
4868
+ "limit": {
4869
+ "type": "integer",
4870
+ "description": "Maximum number of tracked changes to return. Only for action 'list'. Omit for other actions."
4871
+ },
4872
+ "offset": {
4873
+ "type": "integer",
4874
+ "description": "Number of tracked changes to skip for pagination. Only for action 'list'. Omit for other actions."
4875
+ },
4876
+ "type": {
4877
+ "enum": [
4878
+ "insertion",
4879
+ "deletion",
4880
+ "replacement",
4881
+ "formatting",
4882
+ "move",
4883
+ "structural",
4884
+ "insert",
4885
+ "delete",
4886
+ "format"
4887
+ ],
4888
+ "description": "Filter by change type. Canonical values: 'insertion', 'deletion', 'replacement', 'formatting', 'move', 'structural'. Legacy aliases 'insert', 'delete', and 'format' remain accepted during migration. Only for action 'list'. Omit for other actions."
4889
+ },
4890
+ "in": {
4891
+ "oneOf": [
4892
+ {
4893
+ "$ref": "#/$defs/StoryLocator"
4894
+ },
4895
+ {
4896
+ "const": "all",
4897
+ "type": "string"
4898
+ }
4899
+ ],
4900
+ "description": "Story scope. Omit for body only, pass a StoryLocator for a single story, or 'all' for body + every revision-capable non-body story. Only for action 'list'. Omit for other actions."
4901
+ },
4902
+ "force": {
4903
+ "type": "boolean",
4904
+ "description": "Bypass confirmation checks. Only for action 'decide'. Omit for other actions."
4905
+ },
4906
+ "changeMode": {
4907
+ "type": "string",
4908
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions. Only for action 'decide'. Omit for other actions."
4909
+ },
4910
+ "decision": {
4911
+ "enum": [
4912
+ "accept",
4913
+ "reject"
4914
+ ],
4915
+ "description": "Required for action 'decide'."
4916
+ },
4917
+ "expectedRevision": {
4918
+ "type": "string",
4919
+ "description": "Backward-compatible alias for options.expectedRevision. Explicit mutation options take precedence when both are supplied. Only for action 'decide'. Omit for other actions."
4920
+ },
4921
+ "target": {
4922
+ "description": "Decision target. Canonical shapes: { kind: 'id', id, story? } (one whole logical tracked change), { kind: 'ids', ids } (several whole logical tracked changes in one atomic history unit), { kind: 'range', range: TextTarget, coordinateSpace?, overlap?, side?, story?, part? } or { kind: 'range', range: { anchor, relativeStart, relativeEnd }, overlap?, side?, story?, part? } (resolves only the selected overlap; may split fragments), { kind: 'all' } (every active tracked change). Legacy { id, story? } / { id, range: { kind: 'partial', start, end } } / { scope: 'all' } shapes are accepted and transparently promoted to canonical targets. Required for action 'decide'.",
4923
+ "oneOf": [
4924
+ {
4925
+ "type": "object",
4926
+ "properties": {
4927
+ "kind": {
4928
+ "const": "id",
4929
+ "type": "string"
4930
+ },
4931
+ "id": {
2944
4932
  "type": "string"
2945
4933
  },
2946
4934
  "story": {
@@ -3202,72 +5190,317 @@
3202
5190
  "id": {
3203
5191
  "type": "string"
3204
5192
  },
3205
- "range": {
3206
- "type": "object",
3207
- "properties": {
3208
- "kind": {
3209
- "const": "partial",
3210
- "type": "string"
3211
- },
3212
- "start": {
3213
- "type": "integer",
3214
- "minimum": 0
3215
- },
3216
- "end": {
3217
- "type": "integer",
3218
- "minimum": 0
3219
- }
3220
- },
3221
- "additionalProperties": false,
3222
- "required": [
3223
- "kind",
3224
- "start",
3225
- "end"
3226
- ]
5193
+ "range": {
5194
+ "type": "object",
5195
+ "properties": {
5196
+ "kind": {
5197
+ "const": "partial",
5198
+ "type": "string"
5199
+ },
5200
+ "start": {
5201
+ "type": "integer",
5202
+ "minimum": 0
5203
+ },
5204
+ "end": {
5205
+ "type": "integer",
5206
+ "minimum": 0
5207
+ }
5208
+ },
5209
+ "additionalProperties": false,
5210
+ "required": [
5211
+ "kind",
5212
+ "start",
5213
+ "end"
5214
+ ]
5215
+ },
5216
+ "story": {
5217
+ "$ref": "#/$defs/StoryLocator"
5218
+ }
5219
+ },
5220
+ "additionalProperties": false,
5221
+ "required": [
5222
+ "id",
5223
+ "range"
5224
+ ]
5225
+ },
5226
+ {
5227
+ "type": "object",
5228
+ "properties": {
5229
+ "scope": {
5230
+ "enum": [
5231
+ "all"
5232
+ ]
5233
+ },
5234
+ "story": {
5235
+ "oneOf": [
5236
+ {
5237
+ "$ref": "#/$defs/StoryLocator"
5238
+ },
5239
+ {
5240
+ "const": "all",
5241
+ "type": "string"
5242
+ }
5243
+ ],
5244
+ "description": "Optional explicit bulk filter. Omit or pass 'all' to target every revision-capable story, or pass a StoryLocator to scope the decision to one story."
5245
+ }
5246
+ },
5247
+ "additionalProperties": false,
5248
+ "required": [
5249
+ "scope"
5250
+ ]
5251
+ }
5252
+ ]
5253
+ }
5254
+ },
5255
+ "required": [
5256
+ "action"
5257
+ ],
5258
+ "additionalProperties": false,
5259
+ "$defs": {
5260
+ "Range": {
5261
+ "type": "object",
5262
+ "properties": {
5263
+ "start": {
5264
+ "type": "integer"
5265
+ },
5266
+ "end": {
5267
+ "type": "integer"
5268
+ }
5269
+ },
5270
+ "additionalProperties": false,
5271
+ "required": [
5272
+ "start",
5273
+ "end"
5274
+ ]
5275
+ },
5276
+ "SectionAddress": {
5277
+ "type": "object",
5278
+ "properties": {
5279
+ "kind": {
5280
+ "const": "section",
5281
+ "type": "string"
5282
+ },
5283
+ "sectionId": {
5284
+ "type": "string"
5285
+ }
5286
+ },
5287
+ "additionalProperties": false,
5288
+ "required": [
5289
+ "kind",
5290
+ "sectionId"
5291
+ ]
5292
+ },
5293
+ "StoryLocator": {
5294
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
5295
+ "oneOf": [
5296
+ {
5297
+ "type": "object",
5298
+ "properties": {
5299
+ "kind": {
5300
+ "const": "story",
5301
+ "type": "string"
5302
+ },
5303
+ "storyType": {
5304
+ "const": "body",
5305
+ "type": "string"
5306
+ }
5307
+ },
5308
+ "additionalProperties": false,
5309
+ "required": [
5310
+ "kind",
5311
+ "storyType"
5312
+ ]
5313
+ },
5314
+ {
5315
+ "type": "object",
5316
+ "properties": {
5317
+ "kind": {
5318
+ "const": "story",
5319
+ "type": "string"
5320
+ },
5321
+ "storyType": {
5322
+ "const": "headerFooterSlot",
5323
+ "type": "string"
5324
+ },
5325
+ "section": {
5326
+ "$ref": "#/$defs/SectionAddress"
5327
+ },
5328
+ "headerFooterKind": {
5329
+ "enum": [
5330
+ "header",
5331
+ "footer"
5332
+ ]
5333
+ },
5334
+ "variant": {
5335
+ "enum": [
5336
+ "default",
5337
+ "first",
5338
+ "even"
5339
+ ]
5340
+ },
5341
+ "resolution": {
5342
+ "enum": [
5343
+ "effective",
5344
+ "explicit"
5345
+ ]
5346
+ },
5347
+ "onWrite": {
5348
+ "enum": [
5349
+ "materializeIfInherited",
5350
+ "editResolvedPart",
5351
+ "error"
5352
+ ]
5353
+ }
5354
+ },
5355
+ "additionalProperties": false,
5356
+ "required": [
5357
+ "kind",
5358
+ "storyType",
5359
+ "section",
5360
+ "headerFooterKind",
5361
+ "variant"
5362
+ ]
5363
+ },
5364
+ {
5365
+ "type": "object",
5366
+ "properties": {
5367
+ "kind": {
5368
+ "const": "story",
5369
+ "type": "string"
5370
+ },
5371
+ "storyType": {
5372
+ "const": "headerFooterPart",
5373
+ "type": "string"
5374
+ },
5375
+ "refId": {
5376
+ "type": "string"
5377
+ }
5378
+ },
5379
+ "additionalProperties": false,
5380
+ "required": [
5381
+ "kind",
5382
+ "storyType",
5383
+ "refId"
5384
+ ]
5385
+ },
5386
+ {
5387
+ "type": "object",
5388
+ "properties": {
5389
+ "kind": {
5390
+ "const": "story",
5391
+ "type": "string"
5392
+ },
5393
+ "storyType": {
5394
+ "const": "footnote",
5395
+ "type": "string"
5396
+ },
5397
+ "noteId": {
5398
+ "type": "string"
5399
+ }
5400
+ },
5401
+ "additionalProperties": false,
5402
+ "required": [
5403
+ "kind",
5404
+ "storyType",
5405
+ "noteId"
5406
+ ]
5407
+ },
5408
+ {
5409
+ "type": "object",
5410
+ "properties": {
5411
+ "kind": {
5412
+ "const": "story",
5413
+ "type": "string"
5414
+ },
5415
+ "storyType": {
5416
+ "const": "endnote",
5417
+ "type": "string"
3227
5418
  },
3228
- "story": {
3229
- "$ref": "#/$defs/StoryLocator"
5419
+ "noteId": {
5420
+ "type": "string"
3230
5421
  }
3231
5422
  },
3232
5423
  "additionalProperties": false,
3233
5424
  "required": [
3234
- "id",
3235
- "range"
5425
+ "kind",
5426
+ "storyType",
5427
+ "noteId"
3236
5428
  ]
3237
5429
  },
3238
5430
  {
3239
5431
  "type": "object",
3240
5432
  "properties": {
3241
- "scope": {
3242
- "enum": [
3243
- "all"
3244
- ]
5433
+ "kind": {
5434
+ "const": "story",
5435
+ "type": "string"
3245
5436
  },
3246
- "story": {
3247
- "oneOf": [
3248
- {
3249
- "$ref": "#/$defs/StoryLocator"
3250
- },
3251
- {
3252
- "const": "all",
3253
- "type": "string"
3254
- }
3255
- ],
3256
- "description": "Optional explicit bulk filter. Omit or pass 'all' to target every revision-capable story, or pass a StoryLocator to scope the decision to one story."
5437
+ "storyType": {
5438
+ "const": "textbox",
5439
+ "type": "string"
5440
+ },
5441
+ "textboxId": {
5442
+ "type": "string"
3257
5443
  }
3258
5444
  },
3259
5445
  "additionalProperties": false,
3260
5446
  "required": [
3261
- "scope"
5447
+ "kind",
5448
+ "storyType",
5449
+ "textboxId"
3262
5450
  ]
3263
5451
  }
3264
5452
  ]
5453
+ },
5454
+ "TextCoordinateSpace": {
5455
+ "enum": [
5456
+ "visible",
5457
+ "tracked"
5458
+ ]
5459
+ },
5460
+ "TextSegment": {
5461
+ "type": "object",
5462
+ "properties": {
5463
+ "blockId": {
5464
+ "type": "string"
5465
+ },
5466
+ "range": {
5467
+ "$ref": "#/$defs/Range"
5468
+ }
5469
+ },
5470
+ "additionalProperties": false,
5471
+ "required": [
5472
+ "blockId",
5473
+ "range"
5474
+ ]
5475
+ },
5476
+ "TextTarget": {
5477
+ "type": "object",
5478
+ "properties": {
5479
+ "kind": {
5480
+ "const": "text",
5481
+ "type": "string"
5482
+ },
5483
+ "segments": {
5484
+ "type": "array",
5485
+ "items": {
5486
+ "$ref": "#/$defs/TextSegment"
5487
+ },
5488
+ "minItems": 1
5489
+ },
5490
+ "story": {
5491
+ "$ref": "#/$defs/StoryLocator"
5492
+ },
5493
+ "coordinateSpace": {
5494
+ "$ref": "#/$defs/TextCoordinateSpace"
5495
+ }
5496
+ },
5497
+ "additionalProperties": false,
5498
+ "required": [
5499
+ "kind",
5500
+ "segments"
5501
+ ]
3265
5502
  }
3266
- },
3267
- "required": [
3268
- "action"
3269
- ],
3270
- "additionalProperties": false
5503
+ }
3271
5504
  }
3272
5505
  },
3273
5506
  {
@@ -3366,50 +5599,264 @@
3366
5599
  },
3367
5600
  "additionalProperties": false,
3368
5601
  "required": [
3369
- "type"
5602
+ "type"
5603
+ ]
5604
+ }
5605
+ ]
5606
+ },
5607
+ "within": {
5608
+ "$ref": "#/$defs/BlockNodeAddress",
5609
+ "description": "Limit search scope to within a specific block: {kind:'block', nodeType:'...', nodeId:'...'}."
5610
+ },
5611
+ "require": {
5612
+ "enum": [
5613
+ "any",
5614
+ "first",
5615
+ "exactlyOne",
5616
+ "all"
5617
+ ],
5618
+ "description": "Match cardinality: 'any' (all matches), 'first' (only first), 'exactlyOne' (fail if != 1), 'all' (fail if 0)."
5619
+ },
5620
+ "mode": {
5621
+ "enum": [
5622
+ "strict",
5623
+ "candidates"
5624
+ ],
5625
+ "description": "Search mode: 'strict' (default, exact matching) or 'candidates' (returns scored potential matches)."
5626
+ },
5627
+ "includeNodes": {
5628
+ "type": "boolean",
5629
+ "description": "When true, includes full node data in results. Default: false."
5630
+ },
5631
+ "limit": {
5632
+ "type": "integer",
5633
+ "minimum": 1,
5634
+ "description": "Maximum number of matches to return."
5635
+ },
5636
+ "offset": {
5637
+ "type": "integer",
5638
+ "minimum": 0,
5639
+ "description": "Number of matches to skip for pagination."
5640
+ }
5641
+ },
5642
+ "required": [
5643
+ "select"
5644
+ ],
5645
+ "additionalProperties": false,
5646
+ "$defs": {
5647
+ "BlockNodeAddress": {
5648
+ "type": "object",
5649
+ "properties": {
5650
+ "kind": {
5651
+ "const": "block",
5652
+ "type": "string"
5653
+ },
5654
+ "nodeType": {
5655
+ "enum": [
5656
+ "paragraph",
5657
+ "heading",
5658
+ "listItem",
5659
+ "table",
5660
+ "tableRow",
5661
+ "tableCell",
5662
+ "tableOfContents",
5663
+ "image",
5664
+ "sdt"
5665
+ ]
5666
+ },
5667
+ "nodeId": {
5668
+ "type": "string"
5669
+ },
5670
+ "story": {
5671
+ "$ref": "#/$defs/StoryLocator"
5672
+ }
5673
+ },
5674
+ "additionalProperties": false,
5675
+ "required": [
5676
+ "kind",
5677
+ "nodeType",
5678
+ "nodeId"
5679
+ ]
5680
+ },
5681
+ "SectionAddress": {
5682
+ "type": "object",
5683
+ "properties": {
5684
+ "kind": {
5685
+ "const": "section",
5686
+ "type": "string"
5687
+ },
5688
+ "sectionId": {
5689
+ "type": "string"
5690
+ }
5691
+ },
5692
+ "additionalProperties": false,
5693
+ "required": [
5694
+ "kind",
5695
+ "sectionId"
5696
+ ]
5697
+ },
5698
+ "StoryLocator": {
5699
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
5700
+ "oneOf": [
5701
+ {
5702
+ "type": "object",
5703
+ "properties": {
5704
+ "kind": {
5705
+ "const": "story",
5706
+ "type": "string"
5707
+ },
5708
+ "storyType": {
5709
+ "const": "body",
5710
+ "type": "string"
5711
+ }
5712
+ },
5713
+ "additionalProperties": false,
5714
+ "required": [
5715
+ "kind",
5716
+ "storyType"
5717
+ ]
5718
+ },
5719
+ {
5720
+ "type": "object",
5721
+ "properties": {
5722
+ "kind": {
5723
+ "const": "story",
5724
+ "type": "string"
5725
+ },
5726
+ "storyType": {
5727
+ "const": "headerFooterSlot",
5728
+ "type": "string"
5729
+ },
5730
+ "section": {
5731
+ "$ref": "#/$defs/SectionAddress"
5732
+ },
5733
+ "headerFooterKind": {
5734
+ "enum": [
5735
+ "header",
5736
+ "footer"
5737
+ ]
5738
+ },
5739
+ "variant": {
5740
+ "enum": [
5741
+ "default",
5742
+ "first",
5743
+ "even"
5744
+ ]
5745
+ },
5746
+ "resolution": {
5747
+ "enum": [
5748
+ "effective",
5749
+ "explicit"
5750
+ ]
5751
+ },
5752
+ "onWrite": {
5753
+ "enum": [
5754
+ "materializeIfInherited",
5755
+ "editResolvedPart",
5756
+ "error"
5757
+ ]
5758
+ }
5759
+ },
5760
+ "additionalProperties": false,
5761
+ "required": [
5762
+ "kind",
5763
+ "storyType",
5764
+ "section",
5765
+ "headerFooterKind",
5766
+ "variant"
5767
+ ]
5768
+ },
5769
+ {
5770
+ "type": "object",
5771
+ "properties": {
5772
+ "kind": {
5773
+ "const": "story",
5774
+ "type": "string"
5775
+ },
5776
+ "storyType": {
5777
+ "const": "headerFooterPart",
5778
+ "type": "string"
5779
+ },
5780
+ "refId": {
5781
+ "type": "string"
5782
+ }
5783
+ },
5784
+ "additionalProperties": false,
5785
+ "required": [
5786
+ "kind",
5787
+ "storyType",
5788
+ "refId"
5789
+ ]
5790
+ },
5791
+ {
5792
+ "type": "object",
5793
+ "properties": {
5794
+ "kind": {
5795
+ "const": "story",
5796
+ "type": "string"
5797
+ },
5798
+ "storyType": {
5799
+ "const": "footnote",
5800
+ "type": "string"
5801
+ },
5802
+ "noteId": {
5803
+ "type": "string"
5804
+ }
5805
+ },
5806
+ "additionalProperties": false,
5807
+ "required": [
5808
+ "kind",
5809
+ "storyType",
5810
+ "noteId"
5811
+ ]
5812
+ },
5813
+ {
5814
+ "type": "object",
5815
+ "properties": {
5816
+ "kind": {
5817
+ "const": "story",
5818
+ "type": "string"
5819
+ },
5820
+ "storyType": {
5821
+ "const": "endnote",
5822
+ "type": "string"
5823
+ },
5824
+ "noteId": {
5825
+ "type": "string"
5826
+ }
5827
+ },
5828
+ "additionalProperties": false,
5829
+ "required": [
5830
+ "kind",
5831
+ "storyType",
5832
+ "noteId"
5833
+ ]
5834
+ },
5835
+ {
5836
+ "type": "object",
5837
+ "properties": {
5838
+ "kind": {
5839
+ "const": "story",
5840
+ "type": "string"
5841
+ },
5842
+ "storyType": {
5843
+ "const": "textbox",
5844
+ "type": "string"
5845
+ },
5846
+ "textboxId": {
5847
+ "type": "string"
5848
+ }
5849
+ },
5850
+ "additionalProperties": false,
5851
+ "required": [
5852
+ "kind",
5853
+ "storyType",
5854
+ "textboxId"
3370
5855
  ]
3371
5856
  }
3372
5857
  ]
3373
- },
3374
- "within": {
3375
- "$ref": "#/$defs/BlockNodeAddress",
3376
- "description": "Limit search scope to within a specific block: {kind:'block', nodeType:'...', nodeId:'...'}."
3377
- },
3378
- "require": {
3379
- "enum": [
3380
- "any",
3381
- "first",
3382
- "exactlyOne",
3383
- "all"
3384
- ],
3385
- "description": "Match cardinality: 'any' (all matches), 'first' (only first), 'exactlyOne' (fail if != 1), 'all' (fail if 0)."
3386
- },
3387
- "mode": {
3388
- "enum": [
3389
- "strict",
3390
- "candidates"
3391
- ],
3392
- "description": "Search mode: 'strict' (default, exact matching) or 'candidates' (returns scored potential matches)."
3393
- },
3394
- "includeNodes": {
3395
- "type": "boolean",
3396
- "description": "When true, includes full node data in results. Default: false."
3397
- },
3398
- "limit": {
3399
- "type": "integer",
3400
- "minimum": 1,
3401
- "description": "Maximum number of matches to return."
3402
- },
3403
- "offset": {
3404
- "type": "integer",
3405
- "minimum": 0,
3406
- "description": "Number of matches to skip for pagination."
3407
5858
  }
3408
- },
3409
- "required": [
3410
- "select"
3411
- ],
3412
- "additionalProperties": false
5859
+ }
3413
5860
  }
3414
5861
  },
3415
5862
  {
@@ -5486,46 +7933,385 @@
5486
7933
  ]
5487
7934
  }
5488
7935
  },
5489
- "additionalProperties": false,
5490
- "required": [
5491
- "id",
5492
- "op",
5493
- "where",
5494
- "args"
5495
- ]
5496
- }
5497
- ]
5498
- },
5499
- "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
5500
- },
5501
- "detail": {
5502
- "type": "object",
5503
- "properties": {
5504
- "offset": {
5505
- "type": "number",
5506
- "minimum": 0
7936
+ "additionalProperties": false,
7937
+ "required": [
7938
+ "id",
7939
+ "op",
7940
+ "where",
7941
+ "args"
7942
+ ]
7943
+ }
7944
+ ]
7945
+ },
7946
+ "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
7947
+ },
7948
+ "detail": {
7949
+ "type": "object",
7950
+ "properties": {
7951
+ "offset": {
7952
+ "type": "number",
7953
+ "minimum": 0
7954
+ },
7955
+ "limit": {
7956
+ "type": "number",
7957
+ "minimum": 0,
7958
+ "maximum": 1000
7959
+ }
7960
+ },
7961
+ "additionalProperties": false,
7962
+ "description": "Only for action 'preview'. Omit for other actions."
7963
+ },
7964
+ "force": {
7965
+ "type": "boolean",
7966
+ "description": "Bypass confirmation checks. Only for action 'apply'. Omit for other actions."
7967
+ }
7968
+ },
7969
+ "required": [
7970
+ "action",
7971
+ "atomic",
7972
+ "changeMode",
7973
+ "steps"
7974
+ ],
7975
+ "additionalProperties": false,
7976
+ "$defs": {
7977
+ "BlockNodeAddress": {
7978
+ "type": "object",
7979
+ "properties": {
7980
+ "kind": {
7981
+ "const": "block",
7982
+ "type": "string"
7983
+ },
7984
+ "nodeType": {
7985
+ "enum": [
7986
+ "paragraph",
7987
+ "heading",
7988
+ "listItem",
7989
+ "table",
7990
+ "tableRow",
7991
+ "tableCell",
7992
+ "tableOfContents",
7993
+ "image",
7994
+ "sdt"
7995
+ ]
7996
+ },
7997
+ "nodeId": {
7998
+ "type": "string"
7999
+ },
8000
+ "story": {
8001
+ "$ref": "#/$defs/StoryLocator"
8002
+ }
8003
+ },
8004
+ "additionalProperties": false,
8005
+ "required": [
8006
+ "kind",
8007
+ "nodeType",
8008
+ "nodeId"
8009
+ ]
8010
+ },
8011
+ "DeleteBehavior": {
8012
+ "enum": [
8013
+ "selection",
8014
+ "exact"
8015
+ ]
8016
+ },
8017
+ "SectionAddress": {
8018
+ "type": "object",
8019
+ "properties": {
8020
+ "kind": {
8021
+ "const": "section",
8022
+ "type": "string"
8023
+ },
8024
+ "sectionId": {
8025
+ "type": "string"
8026
+ }
8027
+ },
8028
+ "additionalProperties": false,
8029
+ "required": [
8030
+ "kind",
8031
+ "sectionId"
8032
+ ]
8033
+ },
8034
+ "SelectionEdgeNodeAddress": {
8035
+ "type": "object",
8036
+ "properties": {
8037
+ "kind": {
8038
+ "const": "block",
8039
+ "type": "string"
8040
+ },
8041
+ "nodeType": {
8042
+ "enum": [
8043
+ "paragraph",
8044
+ "heading",
8045
+ "listItem",
8046
+ "table",
8047
+ "tableOfContents",
8048
+ "sdt",
8049
+ "image"
8050
+ ]
8051
+ },
8052
+ "nodeId": {
8053
+ "type": "string"
8054
+ },
8055
+ "story": {
8056
+ "$ref": "#/$defs/StoryLocator"
8057
+ }
8058
+ },
8059
+ "additionalProperties": false,
8060
+ "required": [
8061
+ "kind",
8062
+ "nodeType",
8063
+ "nodeId"
8064
+ ]
8065
+ },
8066
+ "SelectionPoint": {
8067
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.",
8068
+ "oneOf": [
8069
+ {
8070
+ "type": "object",
8071
+ "properties": {
8072
+ "kind": {
8073
+ "const": "text",
8074
+ "type": "string"
8075
+ },
8076
+ "blockId": {
8077
+ "type": "string"
8078
+ },
8079
+ "offset": {
8080
+ "type": "integer",
8081
+ "minimum": 0
8082
+ },
8083
+ "story": {
8084
+ "$ref": "#/$defs/StoryLocator"
8085
+ }
8086
+ },
8087
+ "additionalProperties": false,
8088
+ "required": [
8089
+ "kind",
8090
+ "blockId",
8091
+ "offset"
8092
+ ]
8093
+ },
8094
+ {
8095
+ "type": "object",
8096
+ "properties": {
8097
+ "kind": {
8098
+ "const": "nodeEdge",
8099
+ "type": "string"
8100
+ },
8101
+ "node": {
8102
+ "$ref": "#/$defs/SelectionEdgeNodeAddress"
8103
+ },
8104
+ "edge": {
8105
+ "enum": [
8106
+ "before",
8107
+ "after"
8108
+ ]
8109
+ }
8110
+ },
8111
+ "additionalProperties": false,
8112
+ "required": [
8113
+ "kind",
8114
+ "node",
8115
+ "edge"
8116
+ ]
8117
+ }
8118
+ ]
8119
+ },
8120
+ "SelectionTarget": {
8121
+ "type": "object",
8122
+ "properties": {
8123
+ "kind": {
8124
+ "const": "selection",
8125
+ "type": "string"
8126
+ },
8127
+ "start": {
8128
+ "$ref": "#/$defs/SelectionPoint"
8129
+ },
8130
+ "end": {
8131
+ "$ref": "#/$defs/SelectionPoint"
8132
+ },
8133
+ "story": {
8134
+ "$ref": "#/$defs/StoryLocator"
8135
+ },
8136
+ "coordinateSpace": {
8137
+ "$ref": "#/$defs/TextCoordinateSpace"
8138
+ }
8139
+ },
8140
+ "additionalProperties": false,
8141
+ "required": [
8142
+ "kind",
8143
+ "start",
8144
+ "end"
8145
+ ]
8146
+ },
8147
+ "StoryLocator": {
8148
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
8149
+ "oneOf": [
8150
+ {
8151
+ "type": "object",
8152
+ "properties": {
8153
+ "kind": {
8154
+ "const": "story",
8155
+ "type": "string"
8156
+ },
8157
+ "storyType": {
8158
+ "const": "body",
8159
+ "type": "string"
8160
+ }
8161
+ },
8162
+ "additionalProperties": false,
8163
+ "required": [
8164
+ "kind",
8165
+ "storyType"
8166
+ ]
8167
+ },
8168
+ {
8169
+ "type": "object",
8170
+ "properties": {
8171
+ "kind": {
8172
+ "const": "story",
8173
+ "type": "string"
8174
+ },
8175
+ "storyType": {
8176
+ "const": "headerFooterSlot",
8177
+ "type": "string"
8178
+ },
8179
+ "section": {
8180
+ "$ref": "#/$defs/SectionAddress"
8181
+ },
8182
+ "headerFooterKind": {
8183
+ "enum": [
8184
+ "header",
8185
+ "footer"
8186
+ ]
8187
+ },
8188
+ "variant": {
8189
+ "enum": [
8190
+ "default",
8191
+ "first",
8192
+ "even"
8193
+ ]
8194
+ },
8195
+ "resolution": {
8196
+ "enum": [
8197
+ "effective",
8198
+ "explicit"
8199
+ ]
8200
+ },
8201
+ "onWrite": {
8202
+ "enum": [
8203
+ "materializeIfInherited",
8204
+ "editResolvedPart",
8205
+ "error"
8206
+ ]
8207
+ }
8208
+ },
8209
+ "additionalProperties": false,
8210
+ "required": [
8211
+ "kind",
8212
+ "storyType",
8213
+ "section",
8214
+ "headerFooterKind",
8215
+ "variant"
8216
+ ]
8217
+ },
8218
+ {
8219
+ "type": "object",
8220
+ "properties": {
8221
+ "kind": {
8222
+ "const": "story",
8223
+ "type": "string"
8224
+ },
8225
+ "storyType": {
8226
+ "const": "headerFooterPart",
8227
+ "type": "string"
8228
+ },
8229
+ "refId": {
8230
+ "type": "string"
8231
+ }
8232
+ },
8233
+ "additionalProperties": false,
8234
+ "required": [
8235
+ "kind",
8236
+ "storyType",
8237
+ "refId"
8238
+ ]
8239
+ },
8240
+ {
8241
+ "type": "object",
8242
+ "properties": {
8243
+ "kind": {
8244
+ "const": "story",
8245
+ "type": "string"
8246
+ },
8247
+ "storyType": {
8248
+ "const": "footnote",
8249
+ "type": "string"
8250
+ },
8251
+ "noteId": {
8252
+ "type": "string"
8253
+ }
8254
+ },
8255
+ "additionalProperties": false,
8256
+ "required": [
8257
+ "kind",
8258
+ "storyType",
8259
+ "noteId"
8260
+ ]
8261
+ },
8262
+ {
8263
+ "type": "object",
8264
+ "properties": {
8265
+ "kind": {
8266
+ "const": "story",
8267
+ "type": "string"
8268
+ },
8269
+ "storyType": {
8270
+ "const": "endnote",
8271
+ "type": "string"
8272
+ },
8273
+ "noteId": {
8274
+ "type": "string"
8275
+ }
8276
+ },
8277
+ "additionalProperties": false,
8278
+ "required": [
8279
+ "kind",
8280
+ "storyType",
8281
+ "noteId"
8282
+ ]
5507
8283
  },
5508
- "limit": {
5509
- "type": "number",
5510
- "minimum": 0,
5511
- "maximum": 1000
8284
+ {
8285
+ "type": "object",
8286
+ "properties": {
8287
+ "kind": {
8288
+ "const": "story",
8289
+ "type": "string"
8290
+ },
8291
+ "storyType": {
8292
+ "const": "textbox",
8293
+ "type": "string"
8294
+ },
8295
+ "textboxId": {
8296
+ "type": "string"
8297
+ }
8298
+ },
8299
+ "additionalProperties": false,
8300
+ "required": [
8301
+ "kind",
8302
+ "storyType",
8303
+ "textboxId"
8304
+ ]
5512
8305
  }
5513
- },
5514
- "additionalProperties": false,
5515
- "description": "Only for action 'preview'. Omit for other actions."
8306
+ ]
5516
8307
  },
5517
- "force": {
5518
- "type": "boolean",
5519
- "description": "Bypass confirmation checks. Only for action 'apply'. Omit for other actions."
8308
+ "TextCoordinateSpace": {
8309
+ "enum": [
8310
+ "visible",
8311
+ "tracked"
8312
+ ]
5520
8313
  }
5521
- },
5522
- "required": [
5523
- "action",
5524
- "atomic",
5525
- "changeMode",
5526
- "steps"
5527
- ],
5528
- "additionalProperties": false
8314
+ }
5529
8315
  }
5530
8316
  },
5531
8317
  {
@@ -6494,7 +9280,311 @@
6494
9280
  "required": [
6495
9281
  "action"
6496
9282
  ],
6497
- "additionalProperties": false
9283
+ "additionalProperties": false,
9284
+ "$defs": {
9285
+ "BlockNodeAddress": {
9286
+ "type": "object",
9287
+ "properties": {
9288
+ "kind": {
9289
+ "const": "block",
9290
+ "type": "string"
9291
+ },
9292
+ "nodeType": {
9293
+ "enum": [
9294
+ "paragraph",
9295
+ "heading",
9296
+ "listItem",
9297
+ "table",
9298
+ "tableRow",
9299
+ "tableCell",
9300
+ "tableOfContents",
9301
+ "image",
9302
+ "sdt"
9303
+ ]
9304
+ },
9305
+ "nodeId": {
9306
+ "type": "string"
9307
+ },
9308
+ "story": {
9309
+ "$ref": "#/$defs/StoryLocator"
9310
+ }
9311
+ },
9312
+ "additionalProperties": false,
9313
+ "required": [
9314
+ "kind",
9315
+ "nodeType",
9316
+ "nodeId"
9317
+ ]
9318
+ },
9319
+ "SectionAddress": {
9320
+ "type": "object",
9321
+ "properties": {
9322
+ "kind": {
9323
+ "const": "section",
9324
+ "type": "string"
9325
+ },
9326
+ "sectionId": {
9327
+ "type": "string"
9328
+ }
9329
+ },
9330
+ "additionalProperties": false,
9331
+ "required": [
9332
+ "kind",
9333
+ "sectionId"
9334
+ ]
9335
+ },
9336
+ "StoryLocator": {
9337
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
9338
+ "oneOf": [
9339
+ {
9340
+ "type": "object",
9341
+ "properties": {
9342
+ "kind": {
9343
+ "const": "story",
9344
+ "type": "string"
9345
+ },
9346
+ "storyType": {
9347
+ "const": "body",
9348
+ "type": "string"
9349
+ }
9350
+ },
9351
+ "additionalProperties": false,
9352
+ "required": [
9353
+ "kind",
9354
+ "storyType"
9355
+ ]
9356
+ },
9357
+ {
9358
+ "type": "object",
9359
+ "properties": {
9360
+ "kind": {
9361
+ "const": "story",
9362
+ "type": "string"
9363
+ },
9364
+ "storyType": {
9365
+ "const": "headerFooterSlot",
9366
+ "type": "string"
9367
+ },
9368
+ "section": {
9369
+ "$ref": "#/$defs/SectionAddress"
9370
+ },
9371
+ "headerFooterKind": {
9372
+ "enum": [
9373
+ "header",
9374
+ "footer"
9375
+ ]
9376
+ },
9377
+ "variant": {
9378
+ "enum": [
9379
+ "default",
9380
+ "first",
9381
+ "even"
9382
+ ]
9383
+ },
9384
+ "resolution": {
9385
+ "enum": [
9386
+ "effective",
9387
+ "explicit"
9388
+ ]
9389
+ },
9390
+ "onWrite": {
9391
+ "enum": [
9392
+ "materializeIfInherited",
9393
+ "editResolvedPart",
9394
+ "error"
9395
+ ]
9396
+ }
9397
+ },
9398
+ "additionalProperties": false,
9399
+ "required": [
9400
+ "kind",
9401
+ "storyType",
9402
+ "section",
9403
+ "headerFooterKind",
9404
+ "variant"
9405
+ ]
9406
+ },
9407
+ {
9408
+ "type": "object",
9409
+ "properties": {
9410
+ "kind": {
9411
+ "const": "story",
9412
+ "type": "string"
9413
+ },
9414
+ "storyType": {
9415
+ "const": "headerFooterPart",
9416
+ "type": "string"
9417
+ },
9418
+ "refId": {
9419
+ "type": "string"
9420
+ }
9421
+ },
9422
+ "additionalProperties": false,
9423
+ "required": [
9424
+ "kind",
9425
+ "storyType",
9426
+ "refId"
9427
+ ]
9428
+ },
9429
+ {
9430
+ "type": "object",
9431
+ "properties": {
9432
+ "kind": {
9433
+ "const": "story",
9434
+ "type": "string"
9435
+ },
9436
+ "storyType": {
9437
+ "const": "footnote",
9438
+ "type": "string"
9439
+ },
9440
+ "noteId": {
9441
+ "type": "string"
9442
+ }
9443
+ },
9444
+ "additionalProperties": false,
9445
+ "required": [
9446
+ "kind",
9447
+ "storyType",
9448
+ "noteId"
9449
+ ]
9450
+ },
9451
+ {
9452
+ "type": "object",
9453
+ "properties": {
9454
+ "kind": {
9455
+ "const": "story",
9456
+ "type": "string"
9457
+ },
9458
+ "storyType": {
9459
+ "const": "endnote",
9460
+ "type": "string"
9461
+ },
9462
+ "noteId": {
9463
+ "type": "string"
9464
+ }
9465
+ },
9466
+ "additionalProperties": false,
9467
+ "required": [
9468
+ "kind",
9469
+ "storyType",
9470
+ "noteId"
9471
+ ]
9472
+ },
9473
+ {
9474
+ "type": "object",
9475
+ "properties": {
9476
+ "kind": {
9477
+ "const": "story",
9478
+ "type": "string"
9479
+ },
9480
+ "storyType": {
9481
+ "const": "textbox",
9482
+ "type": "string"
9483
+ },
9484
+ "textboxId": {
9485
+ "type": "string"
9486
+ }
9487
+ },
9488
+ "additionalProperties": false,
9489
+ "required": [
9490
+ "kind",
9491
+ "storyType",
9492
+ "textboxId"
9493
+ ]
9494
+ }
9495
+ ]
9496
+ },
9497
+ "TableAddress": {
9498
+ "type": "object",
9499
+ "properties": {
9500
+ "kind": {
9501
+ "const": "block",
9502
+ "type": "string"
9503
+ },
9504
+ "nodeType": {
9505
+ "const": "table",
9506
+ "type": "string"
9507
+ },
9508
+ "nodeId": {
9509
+ "type": "string"
9510
+ }
9511
+ },
9512
+ "additionalProperties": false,
9513
+ "required": [
9514
+ "kind",
9515
+ "nodeType",
9516
+ "nodeId"
9517
+ ]
9518
+ },
9519
+ "TableCellAddress": {
9520
+ "type": "object",
9521
+ "properties": {
9522
+ "kind": {
9523
+ "const": "block",
9524
+ "type": "string"
9525
+ },
9526
+ "nodeType": {
9527
+ "const": "tableCell",
9528
+ "type": "string"
9529
+ },
9530
+ "nodeId": {
9531
+ "type": "string"
9532
+ }
9533
+ },
9534
+ "additionalProperties": false,
9535
+ "required": [
9536
+ "kind",
9537
+ "nodeType",
9538
+ "nodeId"
9539
+ ]
9540
+ },
9541
+ "TableOrCellAddress": {
9542
+ "type": "object",
9543
+ "properties": {
9544
+ "kind": {
9545
+ "const": "block",
9546
+ "type": "string"
9547
+ },
9548
+ "nodeType": {
9549
+ "enum": [
9550
+ "table",
9551
+ "tableCell"
9552
+ ]
9553
+ },
9554
+ "nodeId": {
9555
+ "type": "string"
9556
+ }
9557
+ },
9558
+ "additionalProperties": false,
9559
+ "required": [
9560
+ "kind",
9561
+ "nodeType",
9562
+ "nodeId"
9563
+ ]
9564
+ },
9565
+ "TableRowAddress": {
9566
+ "type": "object",
9567
+ "properties": {
9568
+ "kind": {
9569
+ "const": "block",
9570
+ "type": "string"
9571
+ },
9572
+ "nodeType": {
9573
+ "const": "tableRow",
9574
+ "type": "string"
9575
+ },
9576
+ "nodeId": {
9577
+ "type": "string"
9578
+ }
9579
+ },
9580
+ "additionalProperties": false,
9581
+ "required": [
9582
+ "kind",
9583
+ "nodeType",
9584
+ "nodeId"
9585
+ ]
9586
+ }
9587
+ }
6498
9588
  }
6499
9589
  }
6500
9590
  ]