@superdoc-dev/sdk 1.8.0-next.5 → 1.8.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2062,9 +2062,52 @@ const CONTRACT = {
2062
2062
  "type": "string",
2063
2063
  "description": "Full plain text content of the block."
2064
2064
  },
2065
+ "textSpans": {
2066
+ "type": "array",
2067
+ "description": "Block text broken into runs with tracked-change marks preserved per run. Present only when the block contains at least one tracked change. Concatenating span text yields `text`.",
2068
+ "items": {
2069
+ "type": "object",
2070
+ "properties": {
2071
+ "text": {
2072
+ "type": "string",
2073
+ "description": "Raw text of the run."
2074
+ },
2075
+ "trackedChanges": {
2076
+ "type": "array",
2077
+ "description": "Tracked-change marks applied to this run.",
2078
+ "items": {
2079
+ "type": "object",
2080
+ "properties": {
2081
+ "entityId": {
2082
+ "type": "string",
2083
+ "description": "Tracked change entity ID matching an entry in trackedChanges[]."
2084
+ },
2085
+ "type": {
2086
+ "type": "string",
2087
+ "enum": [
2088
+ "insert",
2089
+ "delete",
2090
+ "format"
2091
+ ]
2092
+ }
2093
+ },
2094
+ "additionalProperties": false,
2095
+ "required": [
2096
+ "entityId",
2097
+ "type"
2098
+ ]
2099
+ }
2100
+ }
2101
+ },
2102
+ "additionalProperties": false,
2103
+ "required": [
2104
+ "text"
2105
+ ]
2106
+ }
2107
+ },
2065
2108
  "headingLevel": {
2066
2109
  "type": "integer",
2067
- "description": "Heading level (16). Only present for headings."
2110
+ "description": "Heading level (1-6). Only present for headings."
2068
2111
  },
2069
2112
  "tableContext": {
2070
2113
  "type": "object",
@@ -2167,7 +2210,7 @@ const CONTRACT = {
2167
2210
  "properties": {
2168
2211
  "entityId": {
2169
2212
  "type": "string",
2170
- "description": "Tracked change entity ID pass to scrollToElement() for navigation."
2213
+ "description": "Tracked change entity ID. Pass to scrollToElement() for navigation."
2171
2214
  },
2172
2215
  "type": {
2173
2216
  "type": "string",
@@ -2175,11 +2218,37 @@ const CONTRACT = {
2175
2218
  "insert",
2176
2219
  "delete",
2177
2220
  "format"
2178
- ]
2221
+ ],
2222
+ "description": "Aggregate type at the entity level. In paired replacement mode, a delete+insert pair shares one entity and this collapses to 'insert'; per-half type lives on block.textSpans[].trackedChanges[]."
2223
+ },
2224
+ "blockIds": {
2225
+ "type": "array",
2226
+ "description": "Block IDs whose textSpans carry this change.",
2227
+ "items": {
2228
+ "type": "string"
2229
+ }
2230
+ },
2231
+ "wordRevisionIds": {
2232
+ "type": "object",
2233
+ "properties": {
2234
+ "insert": {
2235
+ "type": "string",
2236
+ "description": "Original OOXML w:id from a w:ins mark."
2237
+ },
2238
+ "delete": {
2239
+ "type": "string",
2240
+ "description": "Original OOXML w:id from a w:del mark."
2241
+ },
2242
+ "format": {
2243
+ "type": "string",
2244
+ "description": "Original OOXML w:id from a w:rPrChange mark."
2245
+ }
2246
+ },
2247
+ "additionalProperties": false
2179
2248
  },
2180
2249
  "excerpt": {
2181
2250
  "type": "string",
2182
- "description": "Short text excerpt of the changed content."
2251
+ "description": "Short text excerpt of the changed content. Omitted for paired replacements; read block.textSpans for the per-half text."
2183
2252
  },
2184
2253
  "author": {
2185
2254
  "type": "string",
@@ -51156,7 +51225,9 @@ const CONTRACT = {
51156
51225
  "success",
51157
51226
  "failure"
51158
51227
  ]
51159
- }
51228
+ },
51229
+ "intentGroup": "list",
51230
+ "intentAction": "attach"
51160
51231
  },
51161
51232
  "doc.lists.detach": {
51162
51233
  "operationId": "doc.lists.detach",
@@ -51289,14 +51360,470 @@ const CONTRACT = {
51289
51360
  "success": {
51290
51361
  "const": true
51291
51362
  },
51292
- "paragraph": {
51293
- "$ref": "#/$defs/ParagraphAddress"
51363
+ "paragraph": {
51364
+ "$ref": "#/$defs/ParagraphAddress"
51365
+ }
51366
+ },
51367
+ "additionalProperties": false,
51368
+ "required": [
51369
+ "success",
51370
+ "paragraph"
51371
+ ]
51372
+ },
51373
+ {
51374
+ "type": "object",
51375
+ "properties": {
51376
+ "success": {
51377
+ "const": false
51378
+ },
51379
+ "failure": {
51380
+ "type": "object",
51381
+ "properties": {
51382
+ "code": {
51383
+ "enum": [
51384
+ "INVALID_TARGET"
51385
+ ]
51386
+ },
51387
+ "message": {
51388
+ "type": "string"
51389
+ },
51390
+ "details": {}
51391
+ },
51392
+ "additionalProperties": false,
51393
+ "required": [
51394
+ "code",
51395
+ "message"
51396
+ ]
51397
+ }
51398
+ },
51399
+ "additionalProperties": false,
51400
+ "required": [
51401
+ "success",
51402
+ "failure"
51403
+ ]
51404
+ }
51405
+ ]
51406
+ },
51407
+ "successSchema": {
51408
+ "type": "object",
51409
+ "properties": {
51410
+ "success": {
51411
+ "const": true
51412
+ },
51413
+ "paragraph": {
51414
+ "$ref": "#/$defs/ParagraphAddress"
51415
+ }
51416
+ },
51417
+ "additionalProperties": false,
51418
+ "required": [
51419
+ "success",
51420
+ "paragraph"
51421
+ ]
51422
+ },
51423
+ "failureSchema": {
51424
+ "type": "object",
51425
+ "properties": {
51426
+ "success": {
51427
+ "const": false
51428
+ },
51429
+ "failure": {
51430
+ "type": "object",
51431
+ "properties": {
51432
+ "code": {
51433
+ "enum": [
51434
+ "INVALID_TARGET"
51435
+ ]
51436
+ },
51437
+ "message": {
51438
+ "type": "string"
51439
+ },
51440
+ "details": {}
51441
+ },
51442
+ "additionalProperties": false,
51443
+ "required": [
51444
+ "code",
51445
+ "message"
51446
+ ]
51447
+ }
51448
+ },
51449
+ "additionalProperties": false,
51450
+ "required": [
51451
+ "success",
51452
+ "failure"
51453
+ ]
51454
+ },
51455
+ "intentGroup": "list",
51456
+ "intentAction": "detach"
51457
+ },
51458
+ "doc.lists.indent": {
51459
+ "operationId": "doc.lists.indent",
51460
+ "sdkSurface": "document",
51461
+ "command": "lists indent",
51462
+ "commandTokens": [
51463
+ "lists",
51464
+ "indent"
51465
+ ],
51466
+ "category": "lists",
51467
+ "description": "Increase the indentation level of a list item.",
51468
+ "requiresDocumentContext": true,
51469
+ "docRequirement": "optional",
51470
+ "responseEnvelopeKey": "result",
51471
+ "params": [
51472
+ {
51473
+ "name": "doc",
51474
+ "kind": "doc",
51475
+ "type": "string",
51476
+ "description": "Document path. Optional when a session is already open."
51477
+ },
51478
+ {
51479
+ "name": "sessionId",
51480
+ "kind": "flag",
51481
+ "type": "string",
51482
+ "flag": "session",
51483
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
51484
+ },
51485
+ {
51486
+ "name": "out",
51487
+ "kind": "flag",
51488
+ "type": "string",
51489
+ "agentVisible": false
51490
+ },
51491
+ {
51492
+ "name": "force",
51493
+ "kind": "flag",
51494
+ "type": "boolean",
51495
+ "description": "Bypass confirmation checks."
51496
+ },
51497
+ {
51498
+ "name": "expectedRevision",
51499
+ "kind": "flag",
51500
+ "type": "number",
51501
+ "flag": "expected-revision",
51502
+ "agentVisible": false
51503
+ },
51504
+ {
51505
+ "name": "changeMode",
51506
+ "kind": "flag",
51507
+ "type": "string",
51508
+ "flag": "change-mode",
51509
+ "schema": {
51510
+ "enum": [
51511
+ "direct",
51512
+ "tracked"
51513
+ ]
51514
+ },
51515
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
51516
+ },
51517
+ {
51518
+ "name": "dryRun",
51519
+ "kind": "flag",
51520
+ "type": "boolean",
51521
+ "flag": "dry-run",
51522
+ "description": "Preview the result without applying changes."
51523
+ },
51524
+ {
51525
+ "name": "target",
51526
+ "kind": "jsonFlag",
51527
+ "type": "json",
51528
+ "flag": "target-json",
51529
+ "schema": {
51530
+ "type": "object",
51531
+ "properties": {
51532
+ "kind": {
51533
+ "const": "block"
51534
+ },
51535
+ "nodeType": {
51536
+ "const": "listItem"
51537
+ },
51538
+ "nodeId": {
51539
+ "type": "string"
51540
+ }
51541
+ },
51542
+ "required": [
51543
+ "kind",
51544
+ "nodeType",
51545
+ "nodeId"
51546
+ ]
51547
+ }
51548
+ },
51549
+ {
51550
+ "name": "input",
51551
+ "kind": "jsonFlag",
51552
+ "type": "json",
51553
+ "flag": "input-json",
51554
+ "description": "Operation input as JSON object."
51555
+ },
51556
+ {
51557
+ "name": "nodeId",
51558
+ "kind": "flag",
51559
+ "type": "string",
51560
+ "flag": "node-id",
51561
+ "description": "Node ID of the target list item."
51562
+ }
51563
+ ],
51564
+ "constraints": null,
51565
+ "mutates": true,
51566
+ "idempotency": "conditional",
51567
+ "supportsTrackedMode": false,
51568
+ "supportsDryRun": true,
51569
+ "inputSchema": {
51570
+ "type": "object",
51571
+ "properties": {
51572
+ "target": {
51573
+ "$ref": "#/$defs/ListItemAddress"
51574
+ }
51575
+ },
51576
+ "additionalProperties": false,
51577
+ "required": [
51578
+ "target"
51579
+ ]
51580
+ },
51581
+ "outputSchema": {
51582
+ "oneOf": [
51583
+ {
51584
+ "type": "object",
51585
+ "properties": {
51586
+ "success": {
51587
+ "const": true
51588
+ },
51589
+ "item": {
51590
+ "$ref": "#/$defs/ListItemAddress"
51591
+ }
51592
+ },
51593
+ "additionalProperties": false,
51594
+ "required": [
51595
+ "success",
51596
+ "item"
51597
+ ]
51598
+ },
51599
+ {
51600
+ "type": "object",
51601
+ "properties": {
51602
+ "success": {
51603
+ "const": false
51604
+ },
51605
+ "failure": {
51606
+ "type": "object",
51607
+ "properties": {
51608
+ "code": {
51609
+ "enum": [
51610
+ "NO_OP",
51611
+ "INVALID_TARGET",
51612
+ "LEVEL_OUT_OF_RANGE"
51613
+ ]
51614
+ },
51615
+ "message": {
51616
+ "type": "string"
51617
+ },
51618
+ "details": {}
51619
+ },
51620
+ "additionalProperties": false,
51621
+ "required": [
51622
+ "code",
51623
+ "message"
51624
+ ]
51625
+ }
51626
+ },
51627
+ "additionalProperties": false,
51628
+ "required": [
51629
+ "success",
51630
+ "failure"
51631
+ ]
51632
+ }
51633
+ ]
51634
+ },
51635
+ "successSchema": {
51636
+ "type": "object",
51637
+ "properties": {
51638
+ "success": {
51639
+ "const": true
51640
+ },
51641
+ "item": {
51642
+ "$ref": "#/$defs/ListItemAddress"
51643
+ }
51644
+ },
51645
+ "additionalProperties": false,
51646
+ "required": [
51647
+ "success",
51648
+ "item"
51649
+ ]
51650
+ },
51651
+ "failureSchema": {
51652
+ "type": "object",
51653
+ "properties": {
51654
+ "success": {
51655
+ "const": false
51656
+ },
51657
+ "failure": {
51658
+ "type": "object",
51659
+ "properties": {
51660
+ "code": {
51661
+ "enum": [
51662
+ "NO_OP",
51663
+ "INVALID_TARGET",
51664
+ "LEVEL_OUT_OF_RANGE"
51665
+ ]
51666
+ },
51667
+ "message": {
51668
+ "type": "string"
51669
+ },
51670
+ "details": {}
51671
+ },
51672
+ "additionalProperties": false,
51673
+ "required": [
51674
+ "code",
51675
+ "message"
51676
+ ]
51677
+ }
51678
+ },
51679
+ "additionalProperties": false,
51680
+ "required": [
51681
+ "success",
51682
+ "failure"
51683
+ ]
51684
+ },
51685
+ "intentGroup": "list",
51686
+ "intentAction": "indent"
51687
+ },
51688
+ "doc.lists.outdent": {
51689
+ "operationId": "doc.lists.outdent",
51690
+ "sdkSurface": "document",
51691
+ "command": "lists outdent",
51692
+ "commandTokens": [
51693
+ "lists",
51694
+ "outdent"
51695
+ ],
51696
+ "category": "lists",
51697
+ "description": "Decrease the indentation level of a list item.",
51698
+ "requiresDocumentContext": true,
51699
+ "docRequirement": "optional",
51700
+ "responseEnvelopeKey": "result",
51701
+ "params": [
51702
+ {
51703
+ "name": "doc",
51704
+ "kind": "doc",
51705
+ "type": "string",
51706
+ "description": "Document path. Optional when a session is already open."
51707
+ },
51708
+ {
51709
+ "name": "sessionId",
51710
+ "kind": "flag",
51711
+ "type": "string",
51712
+ "flag": "session",
51713
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
51714
+ },
51715
+ {
51716
+ "name": "out",
51717
+ "kind": "flag",
51718
+ "type": "string",
51719
+ "agentVisible": false
51720
+ },
51721
+ {
51722
+ "name": "force",
51723
+ "kind": "flag",
51724
+ "type": "boolean",
51725
+ "description": "Bypass confirmation checks."
51726
+ },
51727
+ {
51728
+ "name": "expectedRevision",
51729
+ "kind": "flag",
51730
+ "type": "number",
51731
+ "flag": "expected-revision",
51732
+ "agentVisible": false
51733
+ },
51734
+ {
51735
+ "name": "changeMode",
51736
+ "kind": "flag",
51737
+ "type": "string",
51738
+ "flag": "change-mode",
51739
+ "schema": {
51740
+ "enum": [
51741
+ "direct",
51742
+ "tracked"
51743
+ ]
51744
+ },
51745
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
51746
+ },
51747
+ {
51748
+ "name": "dryRun",
51749
+ "kind": "flag",
51750
+ "type": "boolean",
51751
+ "flag": "dry-run",
51752
+ "description": "Preview the result without applying changes."
51753
+ },
51754
+ {
51755
+ "name": "target",
51756
+ "kind": "jsonFlag",
51757
+ "type": "json",
51758
+ "flag": "target-json",
51759
+ "schema": {
51760
+ "type": "object",
51761
+ "properties": {
51762
+ "kind": {
51763
+ "const": "block"
51764
+ },
51765
+ "nodeType": {
51766
+ "const": "listItem"
51767
+ },
51768
+ "nodeId": {
51769
+ "type": "string"
51770
+ }
51771
+ },
51772
+ "required": [
51773
+ "kind",
51774
+ "nodeType",
51775
+ "nodeId"
51776
+ ]
51777
+ }
51778
+ },
51779
+ {
51780
+ "name": "input",
51781
+ "kind": "jsonFlag",
51782
+ "type": "json",
51783
+ "flag": "input-json",
51784
+ "description": "Operation input as JSON object."
51785
+ },
51786
+ {
51787
+ "name": "nodeId",
51788
+ "kind": "flag",
51789
+ "type": "string",
51790
+ "flag": "node-id",
51791
+ "description": "Node ID of the target list item."
51792
+ }
51793
+ ],
51794
+ "constraints": null,
51795
+ "mutates": true,
51796
+ "idempotency": "conditional",
51797
+ "supportsTrackedMode": false,
51798
+ "supportsDryRun": true,
51799
+ "inputSchema": {
51800
+ "type": "object",
51801
+ "properties": {
51802
+ "target": {
51803
+ "$ref": "#/$defs/ListItemAddress"
51804
+ }
51805
+ },
51806
+ "additionalProperties": false,
51807
+ "required": [
51808
+ "target"
51809
+ ]
51810
+ },
51811
+ "outputSchema": {
51812
+ "oneOf": [
51813
+ {
51814
+ "type": "object",
51815
+ "properties": {
51816
+ "success": {
51817
+ "const": true
51818
+ },
51819
+ "item": {
51820
+ "$ref": "#/$defs/ListItemAddress"
51294
51821
  }
51295
51822
  },
51296
51823
  "additionalProperties": false,
51297
51824
  "required": [
51298
51825
  "success",
51299
- "paragraph"
51826
+ "item"
51300
51827
  ]
51301
51828
  },
51302
51829
  {
@@ -51310,7 +51837,9 @@ const CONTRACT = {
51310
51837
  "properties": {
51311
51838
  "code": {
51312
51839
  "enum": [
51313
- "INVALID_TARGET"
51840
+ "NO_OP",
51841
+ "INVALID_TARGET",
51842
+ "LEVEL_OUT_OF_RANGE"
51314
51843
  ]
51315
51844
  },
51316
51845
  "message": {
@@ -51339,14 +51868,14 @@ const CONTRACT = {
51339
51868
  "success": {
51340
51869
  "const": true
51341
51870
  },
51342
- "paragraph": {
51343
- "$ref": "#/$defs/ParagraphAddress"
51871
+ "item": {
51872
+ "$ref": "#/$defs/ListItemAddress"
51344
51873
  }
51345
51874
  },
51346
51875
  "additionalProperties": false,
51347
51876
  "required": [
51348
51877
  "success",
51349
- "paragraph"
51878
+ "item"
51350
51879
  ]
51351
51880
  },
51352
51881
  "failureSchema": {
@@ -51360,7 +51889,9 @@ const CONTRACT = {
51360
51889
  "properties": {
51361
51890
  "code": {
51362
51891
  "enum": [
51363
- "INVALID_TARGET"
51892
+ "NO_OP",
51893
+ "INVALID_TARGET",
51894
+ "LEVEL_OUT_OF_RANGE"
51364
51895
  ]
51365
51896
  },
51366
51897
  "message": {
@@ -51382,18 +51913,18 @@ const CONTRACT = {
51382
51913
  ]
51383
51914
  },
51384
51915
  "intentGroup": "list",
51385
- "intentAction": "detach"
51916
+ "intentAction": "outdent"
51386
51917
  },
51387
- "doc.lists.indent": {
51388
- "operationId": "doc.lists.indent",
51918
+ "doc.lists.join": {
51919
+ "operationId": "doc.lists.join",
51389
51920
  "sdkSurface": "document",
51390
- "command": "lists indent",
51921
+ "command": "lists join",
51391
51922
  "commandTokens": [
51392
51923
  "lists",
51393
- "indent"
51924
+ "join"
51394
51925
  ],
51395
51926
  "category": "lists",
51396
- "description": "Increase the indentation level of a list item.",
51927
+ "description": "Merge two adjacent list sequences into one.",
51397
51928
  "requiresDocumentContext": true,
51398
51929
  "docRequirement": "optional",
51399
51930
  "responseEnvelopeKey": "result",
@@ -51475,19 +52006,27 @@ const CONTRACT = {
51475
52006
  ]
51476
52007
  }
51477
52008
  },
52009
+ {
52010
+ "name": "direction",
52011
+ "kind": "flag",
52012
+ "type": "string",
52013
+ "schema": {
52014
+ "oneOf": [
52015
+ {
52016
+ "const": "withPrevious"
52017
+ },
52018
+ {
52019
+ "const": "withNext"
52020
+ }
52021
+ ]
52022
+ }
52023
+ },
51478
52024
  {
51479
52025
  "name": "input",
51480
52026
  "kind": "jsonFlag",
51481
52027
  "type": "json",
51482
52028
  "flag": "input-json",
51483
52029
  "description": "Operation input as JSON object."
51484
- },
51485
- {
51486
- "name": "nodeId",
51487
- "kind": "flag",
51488
- "type": "string",
51489
- "flag": "node-id",
51490
- "description": "Node ID of the target list item."
51491
52030
  }
51492
52031
  ],
51493
52032
  "constraints": null,
@@ -51500,11 +52039,18 @@ const CONTRACT = {
51500
52039
  "properties": {
51501
52040
  "target": {
51502
52041
  "$ref": "#/$defs/ListItemAddress"
52042
+ },
52043
+ "direction": {
52044
+ "enum": [
52045
+ "withPrevious",
52046
+ "withNext"
52047
+ ]
51503
52048
  }
51504
52049
  },
51505
52050
  "additionalProperties": false,
51506
52051
  "required": [
51507
- "target"
52052
+ "target",
52053
+ "direction"
51508
52054
  ]
51509
52055
  },
51510
52056
  "outputSchema": {
@@ -51515,14 +52061,14 @@ const CONTRACT = {
51515
52061
  "success": {
51516
52062
  "const": true
51517
52063
  },
51518
- "item": {
51519
- "$ref": "#/$defs/ListItemAddress"
52064
+ "listId": {
52065
+ "type": "string"
51520
52066
  }
51521
52067
  },
51522
52068
  "additionalProperties": false,
51523
52069
  "required": [
51524
52070
  "success",
51525
- "item"
52071
+ "listId"
51526
52072
  ]
51527
52073
  },
51528
52074
  {
@@ -51536,9 +52082,10 @@ const CONTRACT = {
51536
52082
  "properties": {
51537
52083
  "code": {
51538
52084
  "enum": [
51539
- "NO_OP",
51540
52085
  "INVALID_TARGET",
51541
- "LEVEL_OUT_OF_RANGE"
52086
+ "NO_ADJACENT_SEQUENCE",
52087
+ "INCOMPATIBLE_DEFINITIONS",
52088
+ "ALREADY_SAME_SEQUENCE"
51542
52089
  ]
51543
52090
  },
51544
52091
  "message": {
@@ -51567,14 +52114,14 @@ const CONTRACT = {
51567
52114
  "success": {
51568
52115
  "const": true
51569
52116
  },
51570
- "item": {
51571
- "$ref": "#/$defs/ListItemAddress"
52117
+ "listId": {
52118
+ "type": "string"
51572
52119
  }
51573
52120
  },
51574
52121
  "additionalProperties": false,
51575
52122
  "required": [
51576
52123
  "success",
51577
- "item"
52124
+ "listId"
51578
52125
  ]
51579
52126
  },
51580
52127
  "failureSchema": {
@@ -51588,9 +52135,10 @@ const CONTRACT = {
51588
52135
  "properties": {
51589
52136
  "code": {
51590
52137
  "enum": [
51591
- "NO_OP",
51592
52138
  "INVALID_TARGET",
51593
- "LEVEL_OUT_OF_RANGE"
52139
+ "NO_ADJACENT_SEQUENCE",
52140
+ "INCOMPATIBLE_DEFINITIONS",
52141
+ "ALREADY_SAME_SEQUENCE"
51594
52142
  ]
51595
52143
  },
51596
52144
  "message": {
@@ -51610,20 +52158,140 @@ const CONTRACT = {
51610
52158
  "success",
51611
52159
  "failure"
51612
52160
  ]
52161
+ }
52162
+ },
52163
+ "doc.lists.canJoin": {
52164
+ "operationId": "doc.lists.canJoin",
52165
+ "sdkSurface": "document",
52166
+ "command": "lists can-join",
52167
+ "commandTokens": [
52168
+ "lists",
52169
+ "can-join"
52170
+ ],
52171
+ "category": "lists",
52172
+ "description": "Check whether two adjacent list sequences can be joined.",
52173
+ "requiresDocumentContext": true,
52174
+ "docRequirement": "optional",
52175
+ "responseEnvelopeKey": "result",
52176
+ "params": [
52177
+ {
52178
+ "name": "doc",
52179
+ "kind": "doc",
52180
+ "type": "string",
52181
+ "description": "Document path. Optional when a session is already open."
52182
+ },
52183
+ {
52184
+ "name": "sessionId",
52185
+ "kind": "flag",
52186
+ "type": "string",
52187
+ "flag": "session",
52188
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
52189
+ },
52190
+ {
52191
+ "name": "target",
52192
+ "kind": "jsonFlag",
52193
+ "type": "json",
52194
+ "flag": "target-json",
52195
+ "schema": {
52196
+ "type": "object",
52197
+ "properties": {
52198
+ "kind": {
52199
+ "const": "block"
52200
+ },
52201
+ "nodeType": {
52202
+ "const": "listItem"
52203
+ },
52204
+ "nodeId": {
52205
+ "type": "string"
52206
+ }
52207
+ },
52208
+ "required": [
52209
+ "kind",
52210
+ "nodeType",
52211
+ "nodeId"
52212
+ ]
52213
+ }
52214
+ },
52215
+ {
52216
+ "name": "direction",
52217
+ "kind": "flag",
52218
+ "type": "string",
52219
+ "schema": {
52220
+ "oneOf": [
52221
+ {
52222
+ "const": "withPrevious"
52223
+ },
52224
+ {
52225
+ "const": "withNext"
52226
+ }
52227
+ ]
52228
+ }
52229
+ },
52230
+ {
52231
+ "name": "input",
52232
+ "kind": "jsonFlag",
52233
+ "type": "json",
52234
+ "flag": "input-json",
52235
+ "description": "Operation input as JSON object."
52236
+ }
52237
+ ],
52238
+ "constraints": null,
52239
+ "mutates": false,
52240
+ "idempotency": "idempotent",
52241
+ "supportsTrackedMode": false,
52242
+ "supportsDryRun": false,
52243
+ "inputSchema": {
52244
+ "type": "object",
52245
+ "properties": {
52246
+ "target": {
52247
+ "$ref": "#/$defs/ListItemAddress"
52248
+ },
52249
+ "direction": {
52250
+ "enum": [
52251
+ "withPrevious",
52252
+ "withNext"
52253
+ ]
52254
+ }
52255
+ },
52256
+ "additionalProperties": false,
52257
+ "required": [
52258
+ "target",
52259
+ "direction"
52260
+ ]
51613
52261
  },
51614
- "intentGroup": "list",
51615
- "intentAction": "indent"
52262
+ "outputSchema": {
52263
+ "type": "object",
52264
+ "properties": {
52265
+ "canJoin": {
52266
+ "type": "boolean"
52267
+ },
52268
+ "reason": {
52269
+ "enum": [
52270
+ "NO_ADJACENT_SEQUENCE",
52271
+ "INCOMPATIBLE_DEFINITIONS",
52272
+ "ALREADY_SAME_SEQUENCE"
52273
+ ]
52274
+ },
52275
+ "adjacentListId": {
52276
+ "type": "string"
52277
+ }
52278
+ },
52279
+ "additionalProperties": false,
52280
+ "required": [
52281
+ "canJoin"
52282
+ ]
52283
+ }
51616
52284
  },
51617
- "doc.lists.outdent": {
51618
- "operationId": "doc.lists.outdent",
52285
+ "doc.lists.separate": {
52286
+ "operationId": "doc.lists.separate",
51619
52287
  "sdkSurface": "document",
51620
- "command": "lists outdent",
52288
+ "command": "lists separate",
51621
52289
  "commandTokens": [
51622
52290
  "lists",
51623
- "outdent"
52291
+ "separate"
51624
52292
  ],
51625
52293
  "category": "lists",
51626
- "description": "Decrease the indentation level of a list item.",
52294
+ "description": "Split a list sequence at the target item, creating a new sequence from that point forward.",
51627
52295
  "requiresDocumentContext": true,
51628
52296
  "docRequirement": "optional",
51629
52297
  "responseEnvelopeKey": "result",
@@ -51705,6 +52373,12 @@ const CONTRACT = {
51705
52373
  ]
51706
52374
  }
51707
52375
  },
52376
+ {
52377
+ "name": "copyOverrides",
52378
+ "kind": "flag",
52379
+ "type": "boolean",
52380
+ "flag": "copy-overrides"
52381
+ },
51708
52382
  {
51709
52383
  "name": "input",
51710
52384
  "kind": "jsonFlag",
@@ -51730,6 +52404,9 @@ const CONTRACT = {
51730
52404
  "properties": {
51731
52405
  "target": {
51732
52406
  "$ref": "#/$defs/ListItemAddress"
52407
+ },
52408
+ "copyOverrides": {
52409
+ "type": "boolean"
51733
52410
  }
51734
52411
  },
51735
52412
  "additionalProperties": false,
@@ -51745,14 +52422,18 @@ const CONTRACT = {
51745
52422
  "success": {
51746
52423
  "const": true
51747
52424
  },
51748
- "item": {
51749
- "$ref": "#/$defs/ListItemAddress"
52425
+ "listId": {
52426
+ "type": "string"
52427
+ },
52428
+ "numId": {
52429
+ "type": "integer"
51750
52430
  }
51751
52431
  },
51752
52432
  "additionalProperties": false,
51753
52433
  "required": [
51754
52434
  "success",
51755
- "item"
52435
+ "listId",
52436
+ "numId"
51756
52437
  ]
51757
52438
  },
51758
52439
  {
@@ -51766,9 +52447,8 @@ const CONTRACT = {
51766
52447
  "properties": {
51767
52448
  "code": {
51768
52449
  "enum": [
51769
- "NO_OP",
51770
52450
  "INVALID_TARGET",
51771
- "LEVEL_OUT_OF_RANGE"
52451
+ "NO_OP"
51772
52452
  ]
51773
52453
  },
51774
52454
  "message": {
@@ -51797,14 +52477,18 @@ const CONTRACT = {
51797
52477
  "success": {
51798
52478
  "const": true
51799
52479
  },
51800
- "item": {
51801
- "$ref": "#/$defs/ListItemAddress"
52480
+ "listId": {
52481
+ "type": "string"
52482
+ },
52483
+ "numId": {
52484
+ "type": "integer"
51802
52485
  }
51803
52486
  },
51804
52487
  "additionalProperties": false,
51805
52488
  "required": [
51806
52489
  "success",
51807
- "item"
52490
+ "listId",
52491
+ "numId"
51808
52492
  ]
51809
52493
  },
51810
52494
  "failureSchema": {
@@ -51818,9 +52502,8 @@ const CONTRACT = {
51818
52502
  "properties": {
51819
52503
  "code": {
51820
52504
  "enum": [
51821
- "NO_OP",
51822
52505
  "INVALID_TARGET",
51823
- "LEVEL_OUT_OF_RANGE"
52506
+ "NO_OP"
51824
52507
  ]
51825
52508
  },
51826
52509
  "message": {
@@ -51840,23 +52523,21 @@ const CONTRACT = {
51840
52523
  "success",
51841
52524
  "failure"
51842
52525
  ]
51843
- },
51844
- "intentGroup": "list",
51845
- "intentAction": "outdent"
52526
+ }
51846
52527
  },
51847
- "doc.lists.join": {
51848
- "operationId": "doc.lists.join",
52528
+ "doc.lists.merge": {
52529
+ "operationId": "doc.lists.merge",
51849
52530
  "sdkSurface": "document",
51850
- "command": "lists join",
52531
+ "command": "lists merge",
51851
52532
  "commandTokens": [
51852
52533
  "lists",
51853
- "join"
52534
+ "merge"
51854
52535
  ],
51855
52536
  "category": "lists",
51856
- "description": "Merge two adjacent list sequences into one.",
52537
+ "description": "Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check — absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing \"merge these lists\" intent.",
51857
52538
  "requiresDocumentContext": true,
51858
52539
  "docRequirement": "optional",
51859
- "responseEnvelopeKey": "result",
52540
+ "responseEnvelopeKey": null,
51860
52541
  "params": [
51861
52542
  {
51862
52543
  "name": "doc",
@@ -51915,6 +52596,7 @@ const CONTRACT = {
51915
52596
  "kind": "jsonFlag",
51916
52597
  "type": "json",
51917
52598
  "flag": "target-json",
52599
+ "required": true,
51918
52600
  "schema": {
51919
52601
  "type": "object",
51920
52602
  "properties": {
@@ -51939,6 +52621,7 @@ const CONTRACT = {
51939
52621
  "name": "direction",
51940
52622
  "kind": "flag",
51941
52623
  "type": "string",
52624
+ "required": true,
51942
52625
  "schema": {
51943
52626
  "oneOf": [
51944
52627
  {
@@ -51949,13 +52632,6 @@ const CONTRACT = {
51949
52632
  }
51950
52633
  ]
51951
52634
  }
51952
- },
51953
- {
51954
- "name": "input",
51955
- "kind": "jsonFlag",
51956
- "type": "json",
51957
- "flag": "input-json",
51958
- "description": "Operation input as JSON object."
51959
52635
  }
51960
52636
  ],
51961
52637
  "constraints": null,
@@ -51992,12 +52668,20 @@ const CONTRACT = {
51992
52668
  },
51993
52669
  "listId": {
51994
52670
  "type": "string"
52671
+ },
52672
+ "absorbedCount": {
52673
+ "type": "integer"
52674
+ },
52675
+ "removedEmptyBlocks": {
52676
+ "type": "integer"
51995
52677
  }
51996
52678
  },
51997
52679
  "additionalProperties": false,
51998
52680
  "required": [
51999
52681
  "success",
52000
- "listId"
52682
+ "listId",
52683
+ "absorbedCount",
52684
+ "removedEmptyBlocks"
52001
52685
  ]
52002
52686
  },
52003
52687
  {
@@ -52013,8 +52697,7 @@ const CONTRACT = {
52013
52697
  "enum": [
52014
52698
  "INVALID_TARGET",
52015
52699
  "NO_ADJACENT_SEQUENCE",
52016
- "INCOMPATIBLE_DEFINITIONS",
52017
- "ALREADY_SAME_SEQUENCE"
52700
+ "NO_OP"
52018
52701
  ]
52019
52702
  },
52020
52703
  "message": {
@@ -52045,12 +52728,20 @@ const CONTRACT = {
52045
52728
  },
52046
52729
  "listId": {
52047
52730
  "type": "string"
52731
+ },
52732
+ "absorbedCount": {
52733
+ "type": "integer"
52734
+ },
52735
+ "removedEmptyBlocks": {
52736
+ "type": "integer"
52048
52737
  }
52049
52738
  },
52050
52739
  "additionalProperties": false,
52051
52740
  "required": [
52052
52741
  "success",
52053
- "listId"
52742
+ "listId",
52743
+ "absorbedCount",
52744
+ "removedEmptyBlocks"
52054
52745
  ]
52055
52746
  },
52056
52747
  "failureSchema": {
@@ -52066,8 +52757,7 @@ const CONTRACT = {
52066
52757
  "enum": [
52067
52758
  "INVALID_TARGET",
52068
52759
  "NO_ADJACENT_SEQUENCE",
52069
- "INCOMPATIBLE_DEFINITIONS",
52070
- "ALREADY_SAME_SEQUENCE"
52760
+ "NO_OP"
52071
52761
  ]
52072
52762
  },
52073
52763
  "message": {
@@ -52087,143 +52777,23 @@ const CONTRACT = {
52087
52777
  "success",
52088
52778
  "failure"
52089
52779
  ]
52090
- }
52091
- },
52092
- "doc.lists.canJoin": {
52093
- "operationId": "doc.lists.canJoin",
52094
- "sdkSurface": "document",
52095
- "command": "lists can-join",
52096
- "commandTokens": [
52097
- "lists",
52098
- "can-join"
52099
- ],
52100
- "category": "lists",
52101
- "description": "Check whether two adjacent list sequences can be joined.",
52102
- "requiresDocumentContext": true,
52103
- "docRequirement": "optional",
52104
- "responseEnvelopeKey": "result",
52105
- "params": [
52106
- {
52107
- "name": "doc",
52108
- "kind": "doc",
52109
- "type": "string",
52110
- "description": "Document path. Optional when a session is already open."
52111
- },
52112
- {
52113
- "name": "sessionId",
52114
- "kind": "flag",
52115
- "type": "string",
52116
- "flag": "session",
52117
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
52118
- },
52119
- {
52120
- "name": "target",
52121
- "kind": "jsonFlag",
52122
- "type": "json",
52123
- "flag": "target-json",
52124
- "schema": {
52125
- "type": "object",
52126
- "properties": {
52127
- "kind": {
52128
- "const": "block"
52129
- },
52130
- "nodeType": {
52131
- "const": "listItem"
52132
- },
52133
- "nodeId": {
52134
- "type": "string"
52135
- }
52136
- },
52137
- "required": [
52138
- "kind",
52139
- "nodeType",
52140
- "nodeId"
52141
- ]
52142
- }
52143
- },
52144
- {
52145
- "name": "direction",
52146
- "kind": "flag",
52147
- "type": "string",
52148
- "schema": {
52149
- "oneOf": [
52150
- {
52151
- "const": "withPrevious"
52152
- },
52153
- {
52154
- "const": "withNext"
52155
- }
52156
- ]
52157
- }
52158
- },
52159
- {
52160
- "name": "input",
52161
- "kind": "jsonFlag",
52162
- "type": "json",
52163
- "flag": "input-json",
52164
- "description": "Operation input as JSON object."
52165
- }
52166
- ],
52167
- "constraints": null,
52168
- "mutates": false,
52169
- "idempotency": "idempotent",
52170
- "supportsTrackedMode": false,
52171
- "supportsDryRun": false,
52172
- "inputSchema": {
52173
- "type": "object",
52174
- "properties": {
52175
- "target": {
52176
- "$ref": "#/$defs/ListItemAddress"
52177
- },
52178
- "direction": {
52179
- "enum": [
52180
- "withPrevious",
52181
- "withNext"
52182
- ]
52183
- }
52184
- },
52185
- "additionalProperties": false,
52186
- "required": [
52187
- "target",
52188
- "direction"
52189
- ]
52190
52780
  },
52191
- "outputSchema": {
52192
- "type": "object",
52193
- "properties": {
52194
- "canJoin": {
52195
- "type": "boolean"
52196
- },
52197
- "reason": {
52198
- "enum": [
52199
- "NO_ADJACENT_SEQUENCE",
52200
- "INCOMPATIBLE_DEFINITIONS",
52201
- "ALREADY_SAME_SEQUENCE"
52202
- ]
52203
- },
52204
- "adjacentListId": {
52205
- "type": "string"
52206
- }
52207
- },
52208
- "additionalProperties": false,
52209
- "required": [
52210
- "canJoin"
52211
- ]
52212
- }
52781
+ "intentGroup": "list",
52782
+ "intentAction": "merge"
52213
52783
  },
52214
- "doc.lists.separate": {
52215
- "operationId": "doc.lists.separate",
52784
+ "doc.lists.split": {
52785
+ "operationId": "doc.lists.split",
52216
52786
  "sdkSurface": "document",
52217
- "command": "lists separate",
52787
+ "command": "lists split",
52218
52788
  "commandTokens": [
52219
52789
  "lists",
52220
- "separate"
52790
+ "split"
52221
52791
  ],
52222
52792
  "category": "lists",
52223
- "description": "Split a list sequence at the target item, creating a new sequence from that point forward.",
52793
+ "description": "Compound: split a list sequence at the target item into two independent sequences. Runs lists.separate then (by default) lists.setValue(1) so the new half starts numbering fresh at 1. Pass restartNumbering:false for raw separate semantics (new half continues the previous count).",
52224
52794
  "requiresDocumentContext": true,
52225
52795
  "docRequirement": "optional",
52226
- "responseEnvelopeKey": "result",
52796
+ "responseEnvelopeKey": null,
52227
52797
  "params": [
52228
52798
  {
52229
52799
  "name": "doc",
@@ -52282,6 +52852,7 @@ const CONTRACT = {
52282
52852
  "kind": "jsonFlag",
52283
52853
  "type": "json",
52284
52854
  "flag": "target-json",
52855
+ "required": true,
52285
52856
  "schema": {
52286
52857
  "type": "object",
52287
52858
  "properties": {
@@ -52303,24 +52874,10 @@ const CONTRACT = {
52303
52874
  }
52304
52875
  },
52305
52876
  {
52306
- "name": "copyOverrides",
52877
+ "name": "restartNumbering",
52307
52878
  "kind": "flag",
52308
52879
  "type": "boolean",
52309
- "flag": "copy-overrides"
52310
- },
52311
- {
52312
- "name": "input",
52313
- "kind": "jsonFlag",
52314
- "type": "json",
52315
- "flag": "input-json",
52316
- "description": "Operation input as JSON object."
52317
- },
52318
- {
52319
- "name": "nodeId",
52320
- "kind": "flag",
52321
- "type": "string",
52322
- "flag": "node-id",
52323
- "description": "Node ID of the target list item."
52880
+ "flag": "restart-numbering"
52324
52881
  }
52325
52882
  ],
52326
52883
  "constraints": null,
@@ -52334,7 +52891,7 @@ const CONTRACT = {
52334
52891
  "target": {
52335
52892
  "$ref": "#/$defs/ListItemAddress"
52336
52893
  },
52337
- "copyOverrides": {
52894
+ "restartNumbering": {
52338
52895
  "type": "boolean"
52339
52896
  }
52340
52897
  },
@@ -52356,13 +52913,20 @@ const CONTRACT = {
52356
52913
  },
52357
52914
  "numId": {
52358
52915
  "type": "integer"
52916
+ },
52917
+ "restartedAt": {
52918
+ "type": [
52919
+ "integer",
52920
+ "null"
52921
+ ]
52359
52922
  }
52360
52923
  },
52361
52924
  "additionalProperties": false,
52362
52925
  "required": [
52363
52926
  "success",
52364
52927
  "listId",
52365
- "numId"
52928
+ "numId",
52929
+ "restartedAt"
52366
52930
  ]
52367
52931
  },
52368
52932
  {
@@ -52411,13 +52975,20 @@ const CONTRACT = {
52411
52975
  },
52412
52976
  "numId": {
52413
52977
  "type": "integer"
52978
+ },
52979
+ "restartedAt": {
52980
+ "type": [
52981
+ "integer",
52982
+ "null"
52983
+ ]
52414
52984
  }
52415
52985
  },
52416
52986
  "additionalProperties": false,
52417
52987
  "required": [
52418
52988
  "success",
52419
52989
  "listId",
52420
- "numId"
52990
+ "numId",
52991
+ "restartedAt"
52421
52992
  ]
52422
52993
  },
52423
52994
  "failureSchema": {
@@ -52452,7 +53023,9 @@ const CONTRACT = {
52452
53023
  "success",
52453
53024
  "failure"
52454
53025
  ]
52455
- }
53026
+ },
53027
+ "intentGroup": "list",
53028
+ "intentAction": "split"
52456
53029
  },
52457
53030
  "doc.lists.setLevel": {
52458
53031
  "operationId": "doc.lists.setLevel",
@@ -52935,7 +53508,9 @@ const CONTRACT = {
52935
53508
  "success",
52936
53509
  "failure"
52937
53510
  ]
52938
- }
53511
+ },
53512
+ "intentGroup": "list",
53513
+ "intentAction": "set_value"
52939
53514
  },
52940
53515
  "doc.lists.continuePrevious": {
52941
53516
  "operationId": "doc.lists.continuePrevious",
@@ -53163,7 +53738,9 @@ const CONTRACT = {
53163
53738
  "success",
53164
53739
  "failure"
53165
53740
  ]
53166
- }
53741
+ },
53742
+ "intentGroup": "list",
53743
+ "intentAction": "continue_previous"
53167
53744
  },
53168
53745
  "doc.lists.canContinuePrevious": {
53169
53746
  "operationId": "doc.lists.canContinuePrevious",
@@ -79790,6 +80367,76 @@ const CONTRACT = {
79790
80367
  "dryRun"
79791
80368
  ]
79792
80369
  },
80370
+ "lists.merge": {
80371
+ "type": "object",
80372
+ "properties": {
80373
+ "available": {
80374
+ "type": "boolean"
80375
+ },
80376
+ "tracked": {
80377
+ "type": "boolean"
80378
+ },
80379
+ "dryRun": {
80380
+ "type": "boolean"
80381
+ },
80382
+ "reasons": {
80383
+ "type": "array",
80384
+ "items": {
80385
+ "enum": [
80386
+ "COMMAND_UNAVAILABLE",
80387
+ "HELPER_UNAVAILABLE",
80388
+ "OPERATION_UNAVAILABLE",
80389
+ "TRACKED_MODE_UNAVAILABLE",
80390
+ "DRY_RUN_UNAVAILABLE",
80391
+ "NAMESPACE_UNAVAILABLE",
80392
+ "STYLES_PART_MISSING",
80393
+ "COLLABORATION_ACTIVE"
80394
+ ]
80395
+ }
80396
+ }
80397
+ },
80398
+ "additionalProperties": false,
80399
+ "required": [
80400
+ "available",
80401
+ "tracked",
80402
+ "dryRun"
80403
+ ]
80404
+ },
80405
+ "lists.split": {
80406
+ "type": "object",
80407
+ "properties": {
80408
+ "available": {
80409
+ "type": "boolean"
80410
+ },
80411
+ "tracked": {
80412
+ "type": "boolean"
80413
+ },
80414
+ "dryRun": {
80415
+ "type": "boolean"
80416
+ },
80417
+ "reasons": {
80418
+ "type": "array",
80419
+ "items": {
80420
+ "enum": [
80421
+ "COMMAND_UNAVAILABLE",
80422
+ "HELPER_UNAVAILABLE",
80423
+ "OPERATION_UNAVAILABLE",
80424
+ "TRACKED_MODE_UNAVAILABLE",
80425
+ "DRY_RUN_UNAVAILABLE",
80426
+ "NAMESPACE_UNAVAILABLE",
80427
+ "STYLES_PART_MISSING",
80428
+ "COLLABORATION_ACTIVE"
80429
+ ]
80430
+ }
80431
+ }
80432
+ },
80433
+ "additionalProperties": false,
80434
+ "required": [
80435
+ "available",
80436
+ "tracked",
80437
+ "dryRun"
80438
+ ]
80439
+ },
79793
80440
  "lists.setLevel": {
79794
80441
  "type": "object",
79795
80442
  "properties": {
@@ -89428,6 +90075,8 @@ const CONTRACT = {
89428
90075
  "lists.join",
89429
90076
  "lists.canJoin",
89430
90077
  "lists.separate",
90078
+ "lists.merge",
90079
+ "lists.split",
89431
90080
  "lists.setLevel",
89432
90081
  "lists.setValue",
89433
90082
  "lists.continuePrevious",