@superdoc-dev/sdk 1.6.0-next.5 → 1.6.0-next.50

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.
@@ -575,6 +575,9 @@ export const CONTRACT = {
575
575
  },
576
576
  "entityId": {
577
577
  "type": "string"
578
+ },
579
+ "story": {
580
+ "$ref": "#/$defs/StoryLocator"
578
581
  }
579
582
  },
580
583
  "additionalProperties": false,
@@ -3171,7 +3174,7 @@ export const CONTRACT = {
3171
3174
  },
3172
3175
  "type": {
3173
3176
  "type": "string",
3174
- "description": "Block type: paragraph, heading, listItem, table, image, etc."
3177
+ "description": "Block type: paragraph, heading, listItem, image, tableOfContents."
3175
3178
  },
3176
3179
  "text": {
3177
3180
  "type": "string",
@@ -3180,6 +3183,51 @@ export const CONTRACT = {
3180
3183
  "headingLevel": {
3181
3184
  "type": "integer",
3182
3185
  "description": "Heading level (1–6). Only present for headings."
3186
+ },
3187
+ "tableContext": {
3188
+ "type": "object",
3189
+ "properties": {
3190
+ "tableOrdinal": {
3191
+ "type": "integer",
3192
+ "description": "0-based table ordinal, unique within one extract() result."
3193
+ },
3194
+ "parentTableOrdinal": {
3195
+ "type": "integer",
3196
+ "description": "Ordinal of the parent table when the containing table is nested."
3197
+ },
3198
+ "parentRowIndex": {
3199
+ "type": "integer",
3200
+ "description": "Row index in the parent table. Set with parentTableOrdinal."
3201
+ },
3202
+ "parentColumnIndex": {
3203
+ "type": "integer",
3204
+ "description": "Column index in the parent table. Set with parentTableOrdinal."
3205
+ },
3206
+ "rowIndex": {
3207
+ "type": "integer",
3208
+ "description": "0-based row index of the containing cell."
3209
+ },
3210
+ "columnIndex": {
3211
+ "type": "integer",
3212
+ "description": "0-based logical grid column, not the row child order."
3213
+ },
3214
+ "rowspan": {
3215
+ "type": "integer",
3216
+ "description": "Number of rows the cell spans."
3217
+ },
3218
+ "colspan": {
3219
+ "type": "integer",
3220
+ "description": "Number of columns the cell spans."
3221
+ }
3222
+ },
3223
+ "additionalProperties": false,
3224
+ "required": [
3225
+ "tableOrdinal",
3226
+ "rowIndex",
3227
+ "columnIndex",
3228
+ "rowspan",
3229
+ "colspan"
3230
+ ]
3183
3231
  }
3184
3232
  },
3185
3233
  "additionalProperties": false,
@@ -6257,7 +6305,7 @@ export const CONTRACT = {
6257
6305
  "list"
6258
6306
  ],
6259
6307
  "category": "core",
6260
- "description": "List top-level blocks in document order with IDs, types, and text previews. Supports pagination via offset/limit and optional nodeType filtering.",
6308
+ "description": "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit and optional nodeType filtering.",
6261
6309
  "requiresDocumentContext": true,
6262
6310
  "docRequirement": "optional",
6263
6311
  "responseEnvelopeKey": "result",
@@ -6328,6 +6376,13 @@ export const CONTRACT = {
6328
6376
  "description": "Filter by block types (e.g. ['paragraph', 'heading']). Omit for all types."
6329
6377
  },
6330
6378
  "description": "Filter by block types (e.g. ['paragraph', 'heading']). Omit for all types."
6379
+ },
6380
+ {
6381
+ "name": "includeText",
6382
+ "kind": "flag",
6383
+ "type": "boolean",
6384
+ "flag": "include-text",
6385
+ "description": "When true, includes the full flattened block text in each block entry."
6331
6386
  }
6332
6387
  ],
6333
6388
  "constraints": null,
@@ -6364,6 +6419,10 @@ export const CONTRACT = {
6364
6419
  ]
6365
6420
  },
6366
6421
  "description": "Filter by block types (e.g. ['paragraph', 'heading']). Omit for all types."
6422
+ },
6423
+ "includeText": {
6424
+ "type": "boolean",
6425
+ "description": "When true, includes the full flattened block text in each block entry."
6367
6426
  }
6368
6427
  },
6369
6428
  "additionalProperties": false
@@ -6409,6 +6468,17 @@ export const CONTRACT = {
6409
6468
  }
6410
6469
  ]
6411
6470
  },
6471
+ "text": {
6472
+ "oneOf": [
6473
+ {
6474
+ "type": "string"
6475
+ },
6476
+ {
6477
+ "type": "null"
6478
+ }
6479
+ ],
6480
+ "description": "Full flattened block text when requested with includeText."
6481
+ },
6412
6482
  "isEmpty": {
6413
6483
  "type": "boolean"
6414
6484
  },
@@ -61164,6 +61234,178 @@ export const CONTRACT = {
61164
61234
  "description": "Filter by change type: 'insert', 'delete', or 'format'."
61165
61235
  },
61166
61236
  "description": "Filter by change type: 'insert', 'delete', or 'format'."
61237
+ },
61238
+ {
61239
+ "name": "in",
61240
+ "kind": "jsonFlag",
61241
+ "type": "json",
61242
+ "flag": "in-json",
61243
+ "schema": {
61244
+ "oneOf": [
61245
+ {
61246
+ "oneOf": [
61247
+ {
61248
+ "type": "object",
61249
+ "properties": {
61250
+ "kind": {
61251
+ "const": "story"
61252
+ },
61253
+ "storyType": {
61254
+ "const": "body"
61255
+ }
61256
+ },
61257
+ "required": [
61258
+ "kind",
61259
+ "storyType"
61260
+ ]
61261
+ },
61262
+ {
61263
+ "type": "object",
61264
+ "properties": {
61265
+ "kind": {
61266
+ "const": "story"
61267
+ },
61268
+ "storyType": {
61269
+ "const": "headerFooterSlot"
61270
+ },
61271
+ "section": {
61272
+ "type": "object",
61273
+ "properties": {
61274
+ "kind": {
61275
+ "const": "section"
61276
+ },
61277
+ "sectionId": {
61278
+ "type": "string"
61279
+ }
61280
+ },
61281
+ "required": [
61282
+ "kind",
61283
+ "sectionId"
61284
+ ]
61285
+ },
61286
+ "headerFooterKind": {
61287
+ "oneOf": [
61288
+ {
61289
+ "const": "header"
61290
+ },
61291
+ {
61292
+ "const": "footer"
61293
+ }
61294
+ ]
61295
+ },
61296
+ "variant": {
61297
+ "oneOf": [
61298
+ {
61299
+ "const": "default"
61300
+ },
61301
+ {
61302
+ "const": "first"
61303
+ },
61304
+ {
61305
+ "const": "even"
61306
+ }
61307
+ ]
61308
+ },
61309
+ "resolution": {
61310
+ "oneOf": [
61311
+ {
61312
+ "const": "effective"
61313
+ },
61314
+ {
61315
+ "const": "explicit"
61316
+ }
61317
+ ]
61318
+ },
61319
+ "onWrite": {
61320
+ "oneOf": [
61321
+ {
61322
+ "const": "materializeIfInherited"
61323
+ },
61324
+ {
61325
+ "const": "editResolvedPart"
61326
+ },
61327
+ {
61328
+ "const": "error"
61329
+ }
61330
+ ]
61331
+ }
61332
+ },
61333
+ "required": [
61334
+ "kind",
61335
+ "storyType",
61336
+ "section",
61337
+ "headerFooterKind",
61338
+ "variant"
61339
+ ]
61340
+ },
61341
+ {
61342
+ "type": "object",
61343
+ "properties": {
61344
+ "kind": {
61345
+ "const": "story"
61346
+ },
61347
+ "storyType": {
61348
+ "const": "headerFooterPart"
61349
+ },
61350
+ "refId": {
61351
+ "type": "string"
61352
+ }
61353
+ },
61354
+ "required": [
61355
+ "kind",
61356
+ "storyType",
61357
+ "refId"
61358
+ ]
61359
+ },
61360
+ {
61361
+ "type": "object",
61362
+ "properties": {
61363
+ "kind": {
61364
+ "const": "story"
61365
+ },
61366
+ "storyType": {
61367
+ "const": "footnote"
61368
+ },
61369
+ "noteId": {
61370
+ "type": "string"
61371
+ }
61372
+ },
61373
+ "required": [
61374
+ "kind",
61375
+ "storyType",
61376
+ "noteId"
61377
+ ]
61378
+ },
61379
+ {
61380
+ "type": "object",
61381
+ "properties": {
61382
+ "kind": {
61383
+ "const": "story"
61384
+ },
61385
+ "storyType": {
61386
+ "const": "endnote"
61387
+ },
61388
+ "noteId": {
61389
+ "type": "string"
61390
+ }
61391
+ },
61392
+ "required": [
61393
+ "kind",
61394
+ "storyType",
61395
+ "noteId"
61396
+ ]
61397
+ }
61398
+ ],
61399
+ "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."
61400
+ },
61401
+ {
61402
+ "const": "all"
61403
+ }
61404
+ ],
61405
+ "description": "Story scope. Omit for body only, pass a StoryLocator for a single story, or 'all' for body + every revision-capable non-body story."
61406
+ },
61407
+ "description": "Story scope. Omit for body only, pass a StoryLocator for a single story, or 'all' for body + every revision-capable non-body story.",
61408
+ "agentVisible": false
61167
61409
  }
61168
61410
  ],
61169
61411
  "constraints": null,
@@ -61189,6 +61431,17 @@ export const CONTRACT = {
61189
61431
  "format"
61190
61432
  ],
61191
61433
  "description": "Filter by change type: 'insert', 'delete', or 'format'."
61434
+ },
61435
+ "in": {
61436
+ "oneOf": [
61437
+ {
61438
+ "$ref": "#/$defs/StoryLocator"
61439
+ },
61440
+ {
61441
+ "const": "all"
61442
+ }
61443
+ ],
61444
+ "description": "Story scope. Omit for body only, pass a StoryLocator for a single story, or 'all' for body + every revision-capable non-body story."
61192
61445
  }
61193
61446
  },
61194
61447
  "additionalProperties": false
@@ -61315,6 +61568,169 @@ export const CONTRACT = {
61315
61568
  "kind": "flag",
61316
61569
  "type": "string",
61317
61570
  "required": true
61571
+ },
61572
+ {
61573
+ "name": "story",
61574
+ "kind": "jsonFlag",
61575
+ "type": "json",
61576
+ "flag": "story-json",
61577
+ "schema": {
61578
+ "oneOf": [
61579
+ {
61580
+ "type": "object",
61581
+ "properties": {
61582
+ "kind": {
61583
+ "const": "story"
61584
+ },
61585
+ "storyType": {
61586
+ "const": "body"
61587
+ }
61588
+ },
61589
+ "required": [
61590
+ "kind",
61591
+ "storyType"
61592
+ ]
61593
+ },
61594
+ {
61595
+ "type": "object",
61596
+ "properties": {
61597
+ "kind": {
61598
+ "const": "story"
61599
+ },
61600
+ "storyType": {
61601
+ "const": "headerFooterSlot"
61602
+ },
61603
+ "section": {
61604
+ "type": "object",
61605
+ "properties": {
61606
+ "kind": {
61607
+ "const": "section"
61608
+ },
61609
+ "sectionId": {
61610
+ "type": "string"
61611
+ }
61612
+ },
61613
+ "required": [
61614
+ "kind",
61615
+ "sectionId"
61616
+ ]
61617
+ },
61618
+ "headerFooterKind": {
61619
+ "oneOf": [
61620
+ {
61621
+ "const": "header"
61622
+ },
61623
+ {
61624
+ "const": "footer"
61625
+ }
61626
+ ]
61627
+ },
61628
+ "variant": {
61629
+ "oneOf": [
61630
+ {
61631
+ "const": "default"
61632
+ },
61633
+ {
61634
+ "const": "first"
61635
+ },
61636
+ {
61637
+ "const": "even"
61638
+ }
61639
+ ]
61640
+ },
61641
+ "resolution": {
61642
+ "oneOf": [
61643
+ {
61644
+ "const": "effective"
61645
+ },
61646
+ {
61647
+ "const": "explicit"
61648
+ }
61649
+ ]
61650
+ },
61651
+ "onWrite": {
61652
+ "oneOf": [
61653
+ {
61654
+ "const": "materializeIfInherited"
61655
+ },
61656
+ {
61657
+ "const": "editResolvedPart"
61658
+ },
61659
+ {
61660
+ "const": "error"
61661
+ }
61662
+ ]
61663
+ }
61664
+ },
61665
+ "required": [
61666
+ "kind",
61667
+ "storyType",
61668
+ "section",
61669
+ "headerFooterKind",
61670
+ "variant"
61671
+ ]
61672
+ },
61673
+ {
61674
+ "type": "object",
61675
+ "properties": {
61676
+ "kind": {
61677
+ "const": "story"
61678
+ },
61679
+ "storyType": {
61680
+ "const": "headerFooterPart"
61681
+ },
61682
+ "refId": {
61683
+ "type": "string"
61684
+ }
61685
+ },
61686
+ "required": [
61687
+ "kind",
61688
+ "storyType",
61689
+ "refId"
61690
+ ]
61691
+ },
61692
+ {
61693
+ "type": "object",
61694
+ "properties": {
61695
+ "kind": {
61696
+ "const": "story"
61697
+ },
61698
+ "storyType": {
61699
+ "const": "footnote"
61700
+ },
61701
+ "noteId": {
61702
+ "type": "string"
61703
+ }
61704
+ },
61705
+ "required": [
61706
+ "kind",
61707
+ "storyType",
61708
+ "noteId"
61709
+ ]
61710
+ },
61711
+ {
61712
+ "type": "object",
61713
+ "properties": {
61714
+ "kind": {
61715
+ "const": "story"
61716
+ },
61717
+ "storyType": {
61718
+ "const": "endnote"
61719
+ },
61720
+ "noteId": {
61721
+ "type": "string"
61722
+ }
61723
+ },
61724
+ "required": [
61725
+ "kind",
61726
+ "storyType",
61727
+ "noteId"
61728
+ ]
61729
+ }
61730
+ ],
61731
+ "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."
61732
+ },
61733
+ "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."
61318
61734
  }
61319
61735
  ],
61320
61736
  "constraints": null,
@@ -61327,6 +61743,9 @@ export const CONTRACT = {
61327
61743
  "properties": {
61328
61744
  "id": {
61329
61745
  "type": "string"
61746
+ },
61747
+ "story": {
61748
+ "$ref": "#/$defs/StoryLocator"
61330
61749
  }
61331
61750
  },
61332
61751
  "additionalProperties": false,
@@ -61481,6 +61900,162 @@ export const CONTRACT = {
61481
61900
  "properties": {
61482
61901
  "id": {
61483
61902
  "type": "string"
61903
+ },
61904
+ "story": {
61905
+ "oneOf": [
61906
+ {
61907
+ "type": "object",
61908
+ "properties": {
61909
+ "kind": {
61910
+ "const": "story"
61911
+ },
61912
+ "storyType": {
61913
+ "const": "body"
61914
+ }
61915
+ },
61916
+ "required": [
61917
+ "kind",
61918
+ "storyType"
61919
+ ]
61920
+ },
61921
+ {
61922
+ "type": "object",
61923
+ "properties": {
61924
+ "kind": {
61925
+ "const": "story"
61926
+ },
61927
+ "storyType": {
61928
+ "const": "headerFooterSlot"
61929
+ },
61930
+ "section": {
61931
+ "type": "object",
61932
+ "properties": {
61933
+ "kind": {
61934
+ "const": "section"
61935
+ },
61936
+ "sectionId": {
61937
+ "type": "string"
61938
+ }
61939
+ },
61940
+ "required": [
61941
+ "kind",
61942
+ "sectionId"
61943
+ ]
61944
+ },
61945
+ "headerFooterKind": {
61946
+ "oneOf": [
61947
+ {
61948
+ "const": "header"
61949
+ },
61950
+ {
61951
+ "const": "footer"
61952
+ }
61953
+ ]
61954
+ },
61955
+ "variant": {
61956
+ "oneOf": [
61957
+ {
61958
+ "const": "default"
61959
+ },
61960
+ {
61961
+ "const": "first"
61962
+ },
61963
+ {
61964
+ "const": "even"
61965
+ }
61966
+ ]
61967
+ },
61968
+ "resolution": {
61969
+ "oneOf": [
61970
+ {
61971
+ "const": "effective"
61972
+ },
61973
+ {
61974
+ "const": "explicit"
61975
+ }
61976
+ ]
61977
+ },
61978
+ "onWrite": {
61979
+ "oneOf": [
61980
+ {
61981
+ "const": "materializeIfInherited"
61982
+ },
61983
+ {
61984
+ "const": "editResolvedPart"
61985
+ },
61986
+ {
61987
+ "const": "error"
61988
+ }
61989
+ ]
61990
+ }
61991
+ },
61992
+ "required": [
61993
+ "kind",
61994
+ "storyType",
61995
+ "section",
61996
+ "headerFooterKind",
61997
+ "variant"
61998
+ ]
61999
+ },
62000
+ {
62001
+ "type": "object",
62002
+ "properties": {
62003
+ "kind": {
62004
+ "const": "story"
62005
+ },
62006
+ "storyType": {
62007
+ "const": "headerFooterPart"
62008
+ },
62009
+ "refId": {
62010
+ "type": "string"
62011
+ }
62012
+ },
62013
+ "required": [
62014
+ "kind",
62015
+ "storyType",
62016
+ "refId"
62017
+ ]
62018
+ },
62019
+ {
62020
+ "type": "object",
62021
+ "properties": {
62022
+ "kind": {
62023
+ "const": "story"
62024
+ },
62025
+ "storyType": {
62026
+ "const": "footnote"
62027
+ },
62028
+ "noteId": {
62029
+ "type": "string"
62030
+ }
62031
+ },
62032
+ "required": [
62033
+ "kind",
62034
+ "storyType",
62035
+ "noteId"
62036
+ ]
62037
+ },
62038
+ {
62039
+ "type": "object",
62040
+ "properties": {
62041
+ "kind": {
62042
+ "const": "story"
62043
+ },
62044
+ "storyType": {
62045
+ "const": "endnote"
62046
+ },
62047
+ "noteId": {
62048
+ "type": "string"
62049
+ }
62050
+ },
62051
+ "required": [
62052
+ "kind",
62053
+ "storyType",
62054
+ "noteId"
62055
+ ]
62056
+ }
62057
+ ],
62058
+ "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."
61484
62059
  }
61485
62060
  },
61486
62061
  "required": [
@@ -61527,6 +62102,9 @@ export const CONTRACT = {
61527
62102
  "properties": {
61528
62103
  "id": {
61529
62104
  "type": "string"
62105
+ },
62106
+ "story": {
62107
+ "$ref": "#/$defs/StoryLocator"
61530
62108
  }
61531
62109
  },
61532
62110
  "additionalProperties": false,
@@ -63621,6 +64199,53 @@ export const CONTRACT = {
63621
64199
  "by",
63622
64200
  "target"
63623
64201
  ]
64202
+ },
64203
+ {
64204
+ "type": "object",
64205
+ "properties": {
64206
+ "by": {
64207
+ "const": "block"
64208
+ },
64209
+ "nodeType": {
64210
+ "oneOf": [
64211
+ {
64212
+ "const": "paragraph"
64213
+ },
64214
+ {
64215
+ "const": "heading"
64216
+ },
64217
+ {
64218
+ "const": "listItem"
64219
+ },
64220
+ {
64221
+ "const": "table"
64222
+ },
64223
+ {
64224
+ "const": "tableRow"
64225
+ },
64226
+ {
64227
+ "const": "tableCell"
64228
+ },
64229
+ {
64230
+ "const": "tableOfContents"
64231
+ },
64232
+ {
64233
+ "const": "image"
64234
+ },
64235
+ {
64236
+ "const": "sdt"
64237
+ }
64238
+ ]
64239
+ },
64240
+ "nodeId": {
64241
+ "type": "string"
64242
+ }
64243
+ },
64244
+ "required": [
64245
+ "by",
64246
+ "nodeType",
64247
+ "nodeId"
64248
+ ]
63624
64249
  }
63625
64250
  ]
63626
64251
  },
@@ -63816,51 +64441,148 @@ export const CONTRACT = {
63816
64441
  "const": "text.insert"
63817
64442
  },
63818
64443
  "where": {
63819
- "type": "object",
63820
- "properties": {
63821
- "by": {
63822
- "const": "select"
63823
- },
63824
- "select": {
63825
- "oneOf": [
63826
- {
63827
- "type": "object",
63828
- "properties": {
63829
- "type": {
63830
- "const": "text",
63831
- "description": "Must be 'text' for text pattern search."
63832
- },
63833
- "pattern": {
63834
- "type": "string",
63835
- "description": "Text or regex pattern to match."
63836
- },
63837
- "mode": {
63838
- "oneOf": [
63839
- {
63840
- "const": "contains"
64444
+ "oneOf": [
64445
+ {
64446
+ "type": "object",
64447
+ "properties": {
64448
+ "by": {
64449
+ "const": "select"
64450
+ },
64451
+ "select": {
64452
+ "oneOf": [
64453
+ {
64454
+ "type": "object",
64455
+ "properties": {
64456
+ "type": {
64457
+ "const": "text",
64458
+ "description": "Must be 'text' for text pattern search."
63841
64459
  },
63842
- {
63843
- "const": "regex"
64460
+ "pattern": {
64461
+ "type": "string",
64462
+ "description": "Text or regex pattern to match."
64463
+ },
64464
+ "mode": {
64465
+ "oneOf": [
64466
+ {
64467
+ "const": "contains"
64468
+ },
64469
+ {
64470
+ "const": "regex"
64471
+ }
64472
+ ],
64473
+ "description": "Match mode: 'contains' (substring) or 'regex'."
64474
+ },
64475
+ "caseSensitive": {
64476
+ "type": "boolean",
64477
+ "description": "Case-sensitive matching. Default: false."
63844
64478
  }
63845
- ],
63846
- "description": "Match mode: 'contains' (substring) or 'regex'."
64479
+ },
64480
+ "required": [
64481
+ "type",
64482
+ "pattern"
64483
+ ]
63847
64484
  },
63848
- "caseSensitive": {
63849
- "type": "boolean",
63850
- "description": "Case-sensitive matching. Default: false."
64485
+ {
64486
+ "type": "object",
64487
+ "properties": {
64488
+ "type": {
64489
+ "const": "node",
64490
+ "description": "Must be 'node' for node type search."
64491
+ },
64492
+ "nodeType": {
64493
+ "oneOf": [
64494
+ {
64495
+ "const": "paragraph"
64496
+ },
64497
+ {
64498
+ "const": "heading"
64499
+ },
64500
+ {
64501
+ "const": "listItem"
64502
+ },
64503
+ {
64504
+ "const": "table"
64505
+ },
64506
+ {
64507
+ "const": "tableRow"
64508
+ },
64509
+ {
64510
+ "const": "tableCell"
64511
+ },
64512
+ {
64513
+ "const": "tableOfContents"
64514
+ },
64515
+ {
64516
+ "const": "image"
64517
+ },
64518
+ {
64519
+ "const": "sdt"
64520
+ },
64521
+ {
64522
+ "const": "run"
64523
+ },
64524
+ {
64525
+ "const": "bookmark"
64526
+ },
64527
+ {
64528
+ "const": "comment"
64529
+ },
64530
+ {
64531
+ "const": "hyperlink"
64532
+ },
64533
+ {
64534
+ "const": "footnoteRef"
64535
+ },
64536
+ {
64537
+ "const": "endnoteRef"
64538
+ },
64539
+ {
64540
+ "const": "crossRef"
64541
+ },
64542
+ {
64543
+ "const": "indexEntry"
64544
+ },
64545
+ {
64546
+ "const": "citation"
64547
+ },
64548
+ {
64549
+ "const": "authorityEntry"
64550
+ },
64551
+ {
64552
+ "const": "sequenceField"
64553
+ },
64554
+ {
64555
+ "const": "tab"
64556
+ },
64557
+ {
64558
+ "const": "lineBreak"
64559
+ }
64560
+ ],
64561
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
64562
+ },
64563
+ "kind": {
64564
+ "oneOf": [
64565
+ {
64566
+ "const": "block"
64567
+ },
64568
+ {
64569
+ "const": "inline"
64570
+ }
64571
+ ],
64572
+ "description": "Filter: 'block' or 'inline'."
64573
+ }
64574
+ },
64575
+ "required": [
64576
+ "type"
64577
+ ]
63851
64578
  }
63852
- },
63853
- "required": [
63854
- "type",
63855
- "pattern"
63856
64579
  ]
63857
64580
  },
63858
- {
64581
+ "within": {
63859
64582
  "type": "object",
63860
64583
  "properties": {
63861
- "type": {
63862
- "const": "node",
63863
- "description": "Must be 'node' for node type search."
64584
+ "kind": {
64585
+ "const": "block"
63864
64586
  },
63865
64587
  "nodeType": {
63866
64588
  "oneOf": [
@@ -63890,71 +64612,297 @@ export const CONTRACT = {
63890
64612
  },
63891
64613
  {
63892
64614
  "const": "sdt"
63893
- },
63894
- {
63895
- "const": "run"
63896
- },
63897
- {
63898
- "const": "bookmark"
63899
- },
64615
+ }
64616
+ ]
64617
+ },
64618
+ "nodeId": {
64619
+ "type": "string"
64620
+ }
64621
+ },
64622
+ "required": [
64623
+ "kind",
64624
+ "nodeType",
64625
+ "nodeId"
64626
+ ]
64627
+ },
64628
+ "require": {
64629
+ "oneOf": [
64630
+ {
64631
+ "const": "first"
64632
+ },
64633
+ {
64634
+ "const": "exactlyOne"
64635
+ }
64636
+ ]
64637
+ }
64638
+ },
64639
+ "required": [
64640
+ "by",
64641
+ "select",
64642
+ "require"
64643
+ ]
64644
+ },
64645
+ {
64646
+ "type": "object",
64647
+ "properties": {
64648
+ "by": {
64649
+ "const": "ref"
64650
+ },
64651
+ "ref": {
64652
+ "type": "string"
64653
+ },
64654
+ "within": {
64655
+ "type": "object",
64656
+ "properties": {
64657
+ "kind": {
64658
+ "const": "block"
64659
+ },
64660
+ "nodeType": {
64661
+ "oneOf": [
63900
64662
  {
63901
- "const": "comment"
64663
+ "const": "paragraph"
63902
64664
  },
63903
64665
  {
63904
- "const": "hyperlink"
64666
+ "const": "heading"
63905
64667
  },
63906
64668
  {
63907
- "const": "footnoteRef"
64669
+ "const": "listItem"
63908
64670
  },
63909
64671
  {
63910
- "const": "endnoteRef"
64672
+ "const": "table"
63911
64673
  },
63912
64674
  {
63913
- "const": "crossRef"
64675
+ "const": "tableRow"
63914
64676
  },
63915
64677
  {
63916
- "const": "indexEntry"
64678
+ "const": "tableCell"
63917
64679
  },
63918
64680
  {
63919
- "const": "citation"
64681
+ "const": "tableOfContents"
63920
64682
  },
63921
64683
  {
63922
- "const": "authorityEntry"
64684
+ "const": "image"
63923
64685
  },
63924
64686
  {
63925
- "const": "sequenceField"
63926
- },
64687
+ "const": "sdt"
64688
+ }
64689
+ ]
64690
+ },
64691
+ "nodeId": {
64692
+ "type": "string"
64693
+ }
64694
+ },
64695
+ "required": [
64696
+ "kind",
64697
+ "nodeType",
64698
+ "nodeId"
64699
+ ]
64700
+ }
64701
+ },
64702
+ "required": [
64703
+ "by",
64704
+ "ref"
64705
+ ]
64706
+ },
64707
+ {
64708
+ "type": "object",
64709
+ "properties": {
64710
+ "by": {
64711
+ "const": "target"
64712
+ },
64713
+ "target": {
64714
+ "type": "object",
64715
+ "properties": {
64716
+ "kind": {
64717
+ "const": "selection"
64718
+ },
64719
+ "start": {
64720
+ "oneOf": [
63927
64721
  {
63928
- "const": "tab"
64722
+ "type": "object",
64723
+ "properties": {
64724
+ "kind": {
64725
+ "const": "text"
64726
+ },
64727
+ "blockId": {
64728
+ "type": "string"
64729
+ },
64730
+ "offset": {
64731
+ "type": "number"
64732
+ }
64733
+ },
64734
+ "required": [
64735
+ "kind",
64736
+ "blockId",
64737
+ "offset"
64738
+ ]
63929
64739
  },
63930
64740
  {
63931
- "const": "lineBreak"
64741
+ "type": "object",
64742
+ "properties": {
64743
+ "kind": {
64744
+ "const": "nodeEdge"
64745
+ },
64746
+ "node": {
64747
+ "type": "object",
64748
+ "properties": {
64749
+ "kind": {
64750
+ "const": "block"
64751
+ },
64752
+ "nodeType": {
64753
+ "oneOf": [
64754
+ {
64755
+ "const": "paragraph"
64756
+ },
64757
+ {
64758
+ "const": "heading"
64759
+ },
64760
+ {
64761
+ "const": "table"
64762
+ },
64763
+ {
64764
+ "const": "tableOfContents"
64765
+ },
64766
+ {
64767
+ "const": "sdt"
64768
+ },
64769
+ {
64770
+ "const": "image"
64771
+ }
64772
+ ]
64773
+ },
64774
+ "nodeId": {
64775
+ "type": "string"
64776
+ }
64777
+ },
64778
+ "required": [
64779
+ "kind",
64780
+ "nodeType",
64781
+ "nodeId"
64782
+ ]
64783
+ },
64784
+ "edge": {
64785
+ "oneOf": [
64786
+ {
64787
+ "const": "before"
64788
+ },
64789
+ {
64790
+ "const": "after"
64791
+ }
64792
+ ]
64793
+ }
64794
+ },
64795
+ "required": [
64796
+ "kind",
64797
+ "node",
64798
+ "edge"
64799
+ ]
63932
64800
  }
63933
64801
  ],
63934
- "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
64802
+ "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."
63935
64803
  },
63936
- "kind": {
64804
+ "end": {
63937
64805
  "oneOf": [
63938
64806
  {
63939
- "const": "block"
64807
+ "type": "object",
64808
+ "properties": {
64809
+ "kind": {
64810
+ "const": "text"
64811
+ },
64812
+ "blockId": {
64813
+ "type": "string"
64814
+ },
64815
+ "offset": {
64816
+ "type": "number"
64817
+ }
64818
+ },
64819
+ "required": [
64820
+ "kind",
64821
+ "blockId",
64822
+ "offset"
64823
+ ]
63940
64824
  },
63941
64825
  {
63942
- "const": "inline"
64826
+ "type": "object",
64827
+ "properties": {
64828
+ "kind": {
64829
+ "const": "nodeEdge"
64830
+ },
64831
+ "node": {
64832
+ "type": "object",
64833
+ "properties": {
64834
+ "kind": {
64835
+ "const": "block"
64836
+ },
64837
+ "nodeType": {
64838
+ "oneOf": [
64839
+ {
64840
+ "const": "paragraph"
64841
+ },
64842
+ {
64843
+ "const": "heading"
64844
+ },
64845
+ {
64846
+ "const": "table"
64847
+ },
64848
+ {
64849
+ "const": "tableOfContents"
64850
+ },
64851
+ {
64852
+ "const": "sdt"
64853
+ },
64854
+ {
64855
+ "const": "image"
64856
+ }
64857
+ ]
64858
+ },
64859
+ "nodeId": {
64860
+ "type": "string"
64861
+ }
64862
+ },
64863
+ "required": [
64864
+ "kind",
64865
+ "nodeType",
64866
+ "nodeId"
64867
+ ]
64868
+ },
64869
+ "edge": {
64870
+ "oneOf": [
64871
+ {
64872
+ "const": "before"
64873
+ },
64874
+ {
64875
+ "const": "after"
64876
+ }
64877
+ ]
64878
+ }
64879
+ },
64880
+ "required": [
64881
+ "kind",
64882
+ "node",
64883
+ "edge"
64884
+ ]
63943
64885
  }
63944
64886
  ],
63945
- "description": "Filter: 'block' or 'inline'."
64887
+ "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."
63946
64888
  }
63947
64889
  },
63948
64890
  "required": [
63949
- "type"
64891
+ "kind",
64892
+ "start",
64893
+ "end"
63950
64894
  ]
63951
64895
  }
64896
+ },
64897
+ "required": [
64898
+ "by",
64899
+ "target"
63952
64900
  ]
63953
64901
  },
63954
- "within": {
64902
+ {
63955
64903
  "type": "object",
63956
64904
  "properties": {
63957
- "kind": {
64905
+ "by": {
63958
64906
  "const": "block"
63959
64907
  },
63960
64908
  "nodeType": {
@@ -63993,26 +64941,11 @@ export const CONTRACT = {
63993
64941
  }
63994
64942
  },
63995
64943
  "required": [
63996
- "kind",
64944
+ "by",
63997
64945
  "nodeType",
63998
64946
  "nodeId"
63999
64947
  ]
64000
- },
64001
- "require": {
64002
- "oneOf": [
64003
- {
64004
- "const": "first"
64005
- },
64006
- {
64007
- "const": "exactlyOne"
64008
- }
64009
- ]
64010
64948
  }
64011
- },
64012
- "required": [
64013
- "by",
64014
- "select",
64015
- "require"
64016
64949
  ]
64017
64950
  },
64018
64951
  "args": {
@@ -64609,6 +65542,53 @@ export const CONTRACT = {
64609
65542
  "by",
64610
65543
  "target"
64611
65544
  ]
65545
+ },
65546
+ {
65547
+ "type": "object",
65548
+ "properties": {
65549
+ "by": {
65550
+ "const": "block"
65551
+ },
65552
+ "nodeType": {
65553
+ "oneOf": [
65554
+ {
65555
+ "const": "paragraph"
65556
+ },
65557
+ {
65558
+ "const": "heading"
65559
+ },
65560
+ {
65561
+ "const": "listItem"
65562
+ },
65563
+ {
65564
+ "const": "table"
65565
+ },
65566
+ {
65567
+ "const": "tableRow"
65568
+ },
65569
+ {
65570
+ "const": "tableCell"
65571
+ },
65572
+ {
65573
+ "const": "tableOfContents"
65574
+ },
65575
+ {
65576
+ "const": "image"
65577
+ },
65578
+ {
65579
+ "const": "sdt"
65580
+ }
65581
+ ]
65582
+ },
65583
+ "nodeId": {
65584
+ "type": "string"
65585
+ }
65586
+ },
65587
+ "required": [
65588
+ "by",
65589
+ "nodeType",
65590
+ "nodeId"
65591
+ ]
64612
65592
  }
64613
65593
  ]
64614
65594
  },
@@ -65105,6 +66085,53 @@ export const CONTRACT = {
65105
66085
  "by",
65106
66086
  "target"
65107
66087
  ]
66088
+ },
66089
+ {
66090
+ "type": "object",
66091
+ "properties": {
66092
+ "by": {
66093
+ "const": "block"
66094
+ },
66095
+ "nodeType": {
66096
+ "oneOf": [
66097
+ {
66098
+ "const": "paragraph"
66099
+ },
66100
+ {
66101
+ "const": "heading"
66102
+ },
66103
+ {
66104
+ "const": "listItem"
66105
+ },
66106
+ {
66107
+ "const": "table"
66108
+ },
66109
+ {
66110
+ "const": "tableRow"
66111
+ },
66112
+ {
66113
+ "const": "tableCell"
66114
+ },
66115
+ {
66116
+ "const": "tableOfContents"
66117
+ },
66118
+ {
66119
+ "const": "image"
66120
+ },
66121
+ {
66122
+ "const": "sdt"
66123
+ }
66124
+ ]
66125
+ },
66126
+ "nodeId": {
66127
+ "type": "string"
66128
+ }
66129
+ },
66130
+ "required": [
66131
+ "by",
66132
+ "nodeType",
66133
+ "nodeId"
66134
+ ]
65108
66135
  }
65109
66136
  ]
65110
66137
  },
@@ -65876,11 +66903,36 @@ export const CONTRACT = {
65876
66903
  ]
65877
66904
  }
65878
66905
  }
66906
+ },
66907
+ "alignment": {
66908
+ "oneOf": [
66909
+ {
66910
+ "const": "left"
66911
+ },
66912
+ {
66913
+ "const": "center"
66914
+ },
66915
+ {
66916
+ "const": "right"
66917
+ },
66918
+ {
66919
+ "const": "justify"
66920
+ }
66921
+ ],
66922
+ "description": "Set paragraph alignment on the target block(s). Can be combined with inline formatting in the same step."
66923
+ },
66924
+ "scope": {
66925
+ "oneOf": [
66926
+ {
66927
+ "const": "match"
66928
+ },
66929
+ {
66930
+ "const": "block"
66931
+ }
66932
+ ],
66933
+ "description": "When \"block\", inline formatting expands to cover the entire parent paragraph(s), not just the matched text. Use \"block\" after markdown inserts to format whole paragraphs with a short identifying pattern. Default: \"match\"."
65879
66934
  }
65880
- },
65881
- "required": [
65882
- "inline"
65883
- ]
66935
+ }
65884
66936
  }
65885
66937
  },
65886
66938
  "required": [
@@ -66298,6 +67350,37 @@ export const CONTRACT = {
66298
67350
  "by",
66299
67351
  "target"
66300
67352
  ]
67353
+ },
67354
+ {
67355
+ "type": "object",
67356
+ "properties": {
67357
+ "by": {
67358
+ "const": "block",
67359
+ "type": "string"
67360
+ },
67361
+ "nodeType": {
67362
+ "enum": [
67363
+ "paragraph",
67364
+ "heading",
67365
+ "listItem",
67366
+ "table",
67367
+ "tableRow",
67368
+ "tableCell",
67369
+ "tableOfContents",
67370
+ "image",
67371
+ "sdt"
67372
+ ]
67373
+ },
67374
+ "nodeId": {
67375
+ "type": "string"
67376
+ }
67377
+ },
67378
+ "additionalProperties": false,
67379
+ "required": [
67380
+ "by",
67381
+ "nodeType",
67382
+ "nodeId"
67383
+ ]
66301
67384
  }
66302
67385
  ]
66303
67386
  },
@@ -66458,217 +67541,289 @@ export const CONTRACT = {
66458
67541
  "const": "text.insert",
66459
67542
  "type": "string"
66460
67543
  },
66461
- "where": {
66462
- "type": "object",
66463
- "properties": {
66464
- "by": {
66465
- "const": "select",
66466
- "type": "string"
66467
- },
66468
- "select": {
66469
- "oneOf": [
66470
- {
66471
- "type": "object",
66472
- "properties": {
66473
- "type": {
66474
- "const": "text",
66475
- "description": "Must be 'text' for text pattern search."
66476
- },
66477
- "pattern": {
66478
- "type": "string",
66479
- "description": "Text or regex pattern to match."
66480
- },
66481
- "mode": {
66482
- "enum": [
66483
- "contains",
66484
- "regex"
66485
- ],
66486
- "description": "Match mode: 'contains' (substring) or 'regex'."
66487
- },
66488
- "caseSensitive": {
66489
- "type": "boolean",
66490
- "description": "Case-sensitive matching. Default: false."
66491
- }
66492
- },
66493
- "additionalProperties": false,
66494
- "required": [
66495
- "type",
66496
- "pattern"
66497
- ]
66498
- },
66499
- {
66500
- "type": "object",
66501
- "properties": {
66502
- "type": {
66503
- "const": "node",
66504
- "description": "Must be 'node' for node type search."
66505
- },
66506
- "nodeType": {
66507
- "enum": [
66508
- "paragraph",
66509
- "heading",
66510
- "listItem",
66511
- "table",
66512
- "tableRow",
66513
- "tableCell",
66514
- "tableOfContents",
66515
- "image",
66516
- "sdt",
66517
- "run",
66518
- "bookmark",
66519
- "comment",
66520
- "hyperlink",
66521
- "footnoteRef",
66522
- "endnoteRef",
66523
- "crossRef",
66524
- "indexEntry",
66525
- "citation",
66526
- "authorityEntry",
66527
- "sequenceField",
66528
- "tab",
66529
- "lineBreak"
66530
- ],
66531
- "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
66532
- },
66533
- "kind": {
66534
- "enum": [
66535
- "block",
66536
- "inline"
66537
- ],
66538
- "description": "Filter: 'block' or 'inline'."
66539
- }
66540
- },
66541
- "additionalProperties": false,
66542
- "required": [
66543
- "type"
66544
- ]
66545
- }
66546
- ]
66547
- },
66548
- "within": {
66549
- "$ref": "#/$defs/BlockNodeAddress"
66550
- },
66551
- "require": {
66552
- "enum": [
66553
- "first",
66554
- "exactlyOne"
66555
- ]
66556
- }
66557
- },
66558
- "additionalProperties": false,
66559
- "required": [
66560
- "by",
66561
- "select",
66562
- "require"
66563
- ]
66564
- },
66565
- "args": {
66566
- "type": "object",
66567
- "properties": {
66568
- "position": {
66569
- "enum": [
66570
- "before",
66571
- "after"
66572
- ]
66573
- },
66574
- "content": {
66575
- "type": "object",
66576
- "properties": {
66577
- "text": {
66578
- "type": "string"
66579
- }
66580
- },
66581
- "additionalProperties": false,
66582
- "required": [
66583
- "text"
66584
- ]
66585
- },
66586
- "style": {
66587
- "type": "object",
66588
- "properties": {
66589
- "inline": {
66590
- "type": "object",
66591
- "properties": {
66592
- "mode": {
66593
- "enum": [
66594
- "inherit",
66595
- "set",
66596
- "clear"
66597
- ],
66598
- "type": "string"
66599
- },
66600
- "setMarks": {
66601
- "type": "object",
66602
- "properties": {
66603
- "bold": {
66604
- "enum": [
66605
- "on",
66606
- "off",
66607
- "clear"
66608
- ]
66609
- },
66610
- "italic": {
66611
- "enum": [
66612
- "on",
66613
- "off",
66614
- "clear"
66615
- ]
66616
- },
66617
- "underline": {
66618
- "enum": [
66619
- "on",
66620
- "off",
66621
- "clear"
66622
- ]
66623
- },
66624
- "strike": {
66625
- "enum": [
66626
- "on",
66627
- "off",
66628
- "clear"
66629
- ]
66630
- }
66631
- },
66632
- "additionalProperties": false
66633
- }
66634
- },
66635
- "additionalProperties": false,
66636
- "required": [
66637
- "mode"
66638
- ]
66639
- }
66640
- },
66641
- "additionalProperties": false,
66642
- "required": [
66643
- "inline"
66644
- ]
66645
- }
66646
- },
66647
- "additionalProperties": false,
66648
- "required": [
66649
- "position",
66650
- "content"
66651
- ]
66652
- }
66653
- },
66654
- "additionalProperties": false,
66655
- "required": [
66656
- "id",
66657
- "op",
66658
- "where",
66659
- "args"
66660
- ]
66661
- },
66662
- {
66663
- "type": "object",
66664
- "properties": {
66665
- "id": {
66666
- "type": "string"
66667
- },
66668
- "op": {
66669
- "const": "text.delete",
66670
- "type": "string"
66671
- },
67544
+ "where": {
67545
+ "oneOf": [
67546
+ {
67547
+ "type": "object",
67548
+ "properties": {
67549
+ "by": {
67550
+ "const": "select",
67551
+ "type": "string"
67552
+ },
67553
+ "select": {
67554
+ "oneOf": [
67555
+ {
67556
+ "type": "object",
67557
+ "properties": {
67558
+ "type": {
67559
+ "const": "text",
67560
+ "description": "Must be 'text' for text pattern search."
67561
+ },
67562
+ "pattern": {
67563
+ "type": "string",
67564
+ "description": "Text or regex pattern to match."
67565
+ },
67566
+ "mode": {
67567
+ "enum": [
67568
+ "contains",
67569
+ "regex"
67570
+ ],
67571
+ "description": "Match mode: 'contains' (substring) or 'regex'."
67572
+ },
67573
+ "caseSensitive": {
67574
+ "type": "boolean",
67575
+ "description": "Case-sensitive matching. Default: false."
67576
+ }
67577
+ },
67578
+ "additionalProperties": false,
67579
+ "required": [
67580
+ "type",
67581
+ "pattern"
67582
+ ]
67583
+ },
67584
+ {
67585
+ "type": "object",
67586
+ "properties": {
67587
+ "type": {
67588
+ "const": "node",
67589
+ "description": "Must be 'node' for node type search."
67590
+ },
67591
+ "nodeType": {
67592
+ "enum": [
67593
+ "paragraph",
67594
+ "heading",
67595
+ "listItem",
67596
+ "table",
67597
+ "tableRow",
67598
+ "tableCell",
67599
+ "tableOfContents",
67600
+ "image",
67601
+ "sdt",
67602
+ "run",
67603
+ "bookmark",
67604
+ "comment",
67605
+ "hyperlink",
67606
+ "footnoteRef",
67607
+ "endnoteRef",
67608
+ "crossRef",
67609
+ "indexEntry",
67610
+ "citation",
67611
+ "authorityEntry",
67612
+ "sequenceField",
67613
+ "tab",
67614
+ "lineBreak"
67615
+ ],
67616
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
67617
+ },
67618
+ "kind": {
67619
+ "enum": [
67620
+ "block",
67621
+ "inline"
67622
+ ],
67623
+ "description": "Filter: 'block' or 'inline'."
67624
+ }
67625
+ },
67626
+ "additionalProperties": false,
67627
+ "required": [
67628
+ "type"
67629
+ ]
67630
+ }
67631
+ ]
67632
+ },
67633
+ "within": {
67634
+ "$ref": "#/$defs/BlockNodeAddress"
67635
+ },
67636
+ "require": {
67637
+ "enum": [
67638
+ "first",
67639
+ "exactlyOne"
67640
+ ]
67641
+ }
67642
+ },
67643
+ "additionalProperties": false,
67644
+ "required": [
67645
+ "by",
67646
+ "select",
67647
+ "require"
67648
+ ]
67649
+ },
67650
+ {
67651
+ "type": "object",
67652
+ "properties": {
67653
+ "by": {
67654
+ "const": "ref",
67655
+ "type": "string"
67656
+ },
67657
+ "ref": {
67658
+ "type": "string"
67659
+ },
67660
+ "within": {
67661
+ "$ref": "#/$defs/BlockNodeAddress"
67662
+ }
67663
+ },
67664
+ "additionalProperties": false,
67665
+ "required": [
67666
+ "by",
67667
+ "ref"
67668
+ ]
67669
+ },
67670
+ {
67671
+ "type": "object",
67672
+ "properties": {
67673
+ "by": {
67674
+ "const": "target",
67675
+ "type": "string"
67676
+ },
67677
+ "target": {
67678
+ "$ref": "#/$defs/SelectionTarget"
67679
+ }
67680
+ },
67681
+ "additionalProperties": false,
67682
+ "required": [
67683
+ "by",
67684
+ "target"
67685
+ ]
67686
+ },
67687
+ {
67688
+ "type": "object",
67689
+ "properties": {
67690
+ "by": {
67691
+ "const": "block",
67692
+ "type": "string"
67693
+ },
67694
+ "nodeType": {
67695
+ "enum": [
67696
+ "paragraph",
67697
+ "heading",
67698
+ "listItem",
67699
+ "table",
67700
+ "tableRow",
67701
+ "tableCell",
67702
+ "tableOfContents",
67703
+ "image",
67704
+ "sdt"
67705
+ ]
67706
+ },
67707
+ "nodeId": {
67708
+ "type": "string"
67709
+ }
67710
+ },
67711
+ "additionalProperties": false,
67712
+ "required": [
67713
+ "by",
67714
+ "nodeType",
67715
+ "nodeId"
67716
+ ]
67717
+ }
67718
+ ]
67719
+ },
67720
+ "args": {
67721
+ "type": "object",
67722
+ "properties": {
67723
+ "position": {
67724
+ "enum": [
67725
+ "before",
67726
+ "after"
67727
+ ]
67728
+ },
67729
+ "content": {
67730
+ "type": "object",
67731
+ "properties": {
67732
+ "text": {
67733
+ "type": "string"
67734
+ }
67735
+ },
67736
+ "additionalProperties": false,
67737
+ "required": [
67738
+ "text"
67739
+ ]
67740
+ },
67741
+ "style": {
67742
+ "type": "object",
67743
+ "properties": {
67744
+ "inline": {
67745
+ "type": "object",
67746
+ "properties": {
67747
+ "mode": {
67748
+ "enum": [
67749
+ "inherit",
67750
+ "set",
67751
+ "clear"
67752
+ ],
67753
+ "type": "string"
67754
+ },
67755
+ "setMarks": {
67756
+ "type": "object",
67757
+ "properties": {
67758
+ "bold": {
67759
+ "enum": [
67760
+ "on",
67761
+ "off",
67762
+ "clear"
67763
+ ]
67764
+ },
67765
+ "italic": {
67766
+ "enum": [
67767
+ "on",
67768
+ "off",
67769
+ "clear"
67770
+ ]
67771
+ },
67772
+ "underline": {
67773
+ "enum": [
67774
+ "on",
67775
+ "off",
67776
+ "clear"
67777
+ ]
67778
+ },
67779
+ "strike": {
67780
+ "enum": [
67781
+ "on",
67782
+ "off",
67783
+ "clear"
67784
+ ]
67785
+ }
67786
+ },
67787
+ "additionalProperties": false
67788
+ }
67789
+ },
67790
+ "additionalProperties": false,
67791
+ "required": [
67792
+ "mode"
67793
+ ]
67794
+ }
67795
+ },
67796
+ "additionalProperties": false,
67797
+ "required": [
67798
+ "inline"
67799
+ ]
67800
+ }
67801
+ },
67802
+ "additionalProperties": false,
67803
+ "required": [
67804
+ "position",
67805
+ "content"
67806
+ ]
67807
+ }
67808
+ },
67809
+ "additionalProperties": false,
67810
+ "required": [
67811
+ "id",
67812
+ "op",
67813
+ "where",
67814
+ "args"
67815
+ ]
67816
+ },
67817
+ {
67818
+ "type": "object",
67819
+ "properties": {
67820
+ "id": {
67821
+ "type": "string"
67822
+ },
67823
+ "op": {
67824
+ "const": "text.delete",
67825
+ "type": "string"
67826
+ },
66672
67827
  "where": {
66673
67828
  "oneOf": [
66674
67829
  {
@@ -66812,6 +67967,37 @@ export const CONTRACT = {
66812
67967
  "by",
66813
67968
  "target"
66814
67969
  ]
67970
+ },
67971
+ {
67972
+ "type": "object",
67973
+ "properties": {
67974
+ "by": {
67975
+ "const": "block",
67976
+ "type": "string"
67977
+ },
67978
+ "nodeType": {
67979
+ "enum": [
67980
+ "paragraph",
67981
+ "heading",
67982
+ "listItem",
67983
+ "table",
67984
+ "tableRow",
67985
+ "tableCell",
67986
+ "tableOfContents",
67987
+ "image",
67988
+ "sdt"
67989
+ ]
67990
+ },
67991
+ "nodeId": {
67992
+ "type": "string"
67993
+ }
67994
+ },
67995
+ "additionalProperties": false,
67996
+ "required": [
67997
+ "by",
67998
+ "nodeType",
67999
+ "nodeId"
68000
+ ]
66815
68001
  }
66816
68002
  ]
66817
68003
  },
@@ -66986,6 +68172,37 @@ export const CONTRACT = {
66986
68172
  "by",
66987
68173
  "target"
66988
68174
  ]
68175
+ },
68176
+ {
68177
+ "type": "object",
68178
+ "properties": {
68179
+ "by": {
68180
+ "const": "block",
68181
+ "type": "string"
68182
+ },
68183
+ "nodeType": {
68184
+ "enum": [
68185
+ "paragraph",
68186
+ "heading",
68187
+ "listItem",
68188
+ "table",
68189
+ "tableRow",
68190
+ "tableCell",
68191
+ "tableOfContents",
68192
+ "image",
68193
+ "sdt"
68194
+ ]
68195
+ },
68196
+ "nodeId": {
68197
+ "type": "string"
68198
+ }
68199
+ },
68200
+ "additionalProperties": false,
68201
+ "required": [
68202
+ "by",
68203
+ "nodeType",
68204
+ "nodeId"
68205
+ ]
66989
68206
  }
66990
68207
  ]
66991
68208
  },
@@ -67800,12 +69017,28 @@ export const CONTRACT = {
67800
69017
  },
67801
69018
  "additionalProperties": false,
67802
69019
  "minProperties": 1
69020
+ },
69021
+ "alignment": {
69022
+ "type": "string",
69023
+ "enum": [
69024
+ "left",
69025
+ "center",
69026
+ "right",
69027
+ "justify"
69028
+ ],
69029
+ "description": "Set paragraph alignment on the target block(s). Can be combined with inline formatting in the same step."
69030
+ },
69031
+ "scope": {
69032
+ "type": "string",
69033
+ "enum": [
69034
+ "match",
69035
+ "block"
69036
+ ],
69037
+ "description": "When \"block\", inline formatting expands to cover the entire parent paragraph(s), not just the matched text. Use \"block\" after markdown inserts to format whole paragraphs with a short identifying pattern. Default: \"match\"."
67803
69038
  }
67804
69039
  },
67805
69040
  "additionalProperties": false,
67806
- "required": [
67807
- "inline"
67808
- ]
69041
+ "minProperties": 1
67809
69042
  }
67810
69043
  },
67811
69044
  "additionalProperties": false,
@@ -68698,6 +69931,53 @@ export const CONTRACT = {
68698
69931
  "by",
68699
69932
  "target"
68700
69933
  ]
69934
+ },
69935
+ {
69936
+ "type": "object",
69937
+ "properties": {
69938
+ "by": {
69939
+ "const": "block"
69940
+ },
69941
+ "nodeType": {
69942
+ "oneOf": [
69943
+ {
69944
+ "const": "paragraph"
69945
+ },
69946
+ {
69947
+ "const": "heading"
69948
+ },
69949
+ {
69950
+ "const": "listItem"
69951
+ },
69952
+ {
69953
+ "const": "table"
69954
+ },
69955
+ {
69956
+ "const": "tableRow"
69957
+ },
69958
+ {
69959
+ "const": "tableCell"
69960
+ },
69961
+ {
69962
+ "const": "tableOfContents"
69963
+ },
69964
+ {
69965
+ "const": "image"
69966
+ },
69967
+ {
69968
+ "const": "sdt"
69969
+ }
69970
+ ]
69971
+ },
69972
+ "nodeId": {
69973
+ "type": "string"
69974
+ }
69975
+ },
69976
+ "required": [
69977
+ "by",
69978
+ "nodeType",
69979
+ "nodeId"
69980
+ ]
68701
69981
  }
68702
69982
  ]
68703
69983
  },
@@ -68893,51 +70173,221 @@ export const CONTRACT = {
68893
70173
  "const": "text.insert"
68894
70174
  },
68895
70175
  "where": {
68896
- "type": "object",
68897
- "properties": {
68898
- "by": {
68899
- "const": "select"
68900
- },
68901
- "select": {
68902
- "oneOf": [
68903
- {
70176
+ "oneOf": [
70177
+ {
70178
+ "type": "object",
70179
+ "properties": {
70180
+ "by": {
70181
+ "const": "select"
70182
+ },
70183
+ "select": {
70184
+ "oneOf": [
70185
+ {
70186
+ "type": "object",
70187
+ "properties": {
70188
+ "type": {
70189
+ "const": "text",
70190
+ "description": "Must be 'text' for text pattern search."
70191
+ },
70192
+ "pattern": {
70193
+ "type": "string",
70194
+ "description": "Text or regex pattern to match."
70195
+ },
70196
+ "mode": {
70197
+ "oneOf": [
70198
+ {
70199
+ "const": "contains"
70200
+ },
70201
+ {
70202
+ "const": "regex"
70203
+ }
70204
+ ],
70205
+ "description": "Match mode: 'contains' (substring) or 'regex'."
70206
+ },
70207
+ "caseSensitive": {
70208
+ "type": "boolean",
70209
+ "description": "Case-sensitive matching. Default: false."
70210
+ }
70211
+ },
70212
+ "required": [
70213
+ "type",
70214
+ "pattern"
70215
+ ]
70216
+ },
70217
+ {
70218
+ "type": "object",
70219
+ "properties": {
70220
+ "type": {
70221
+ "const": "node",
70222
+ "description": "Must be 'node' for node type search."
70223
+ },
70224
+ "nodeType": {
70225
+ "oneOf": [
70226
+ {
70227
+ "const": "paragraph"
70228
+ },
70229
+ {
70230
+ "const": "heading"
70231
+ },
70232
+ {
70233
+ "const": "listItem"
70234
+ },
70235
+ {
70236
+ "const": "table"
70237
+ },
70238
+ {
70239
+ "const": "tableRow"
70240
+ },
70241
+ {
70242
+ "const": "tableCell"
70243
+ },
70244
+ {
70245
+ "const": "tableOfContents"
70246
+ },
70247
+ {
70248
+ "const": "image"
70249
+ },
70250
+ {
70251
+ "const": "sdt"
70252
+ },
70253
+ {
70254
+ "const": "run"
70255
+ },
70256
+ {
70257
+ "const": "bookmark"
70258
+ },
70259
+ {
70260
+ "const": "comment"
70261
+ },
70262
+ {
70263
+ "const": "hyperlink"
70264
+ },
70265
+ {
70266
+ "const": "footnoteRef"
70267
+ },
70268
+ {
70269
+ "const": "endnoteRef"
70270
+ },
70271
+ {
70272
+ "const": "crossRef"
70273
+ },
70274
+ {
70275
+ "const": "indexEntry"
70276
+ },
70277
+ {
70278
+ "const": "citation"
70279
+ },
70280
+ {
70281
+ "const": "authorityEntry"
70282
+ },
70283
+ {
70284
+ "const": "sequenceField"
70285
+ },
70286
+ {
70287
+ "const": "tab"
70288
+ },
70289
+ {
70290
+ "const": "lineBreak"
70291
+ }
70292
+ ],
70293
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
70294
+ },
70295
+ "kind": {
70296
+ "oneOf": [
70297
+ {
70298
+ "const": "block"
70299
+ },
70300
+ {
70301
+ "const": "inline"
70302
+ }
70303
+ ],
70304
+ "description": "Filter: 'block' or 'inline'."
70305
+ }
70306
+ },
70307
+ "required": [
70308
+ "type"
70309
+ ]
70310
+ }
70311
+ ]
70312
+ },
70313
+ "within": {
68904
70314
  "type": "object",
68905
70315
  "properties": {
68906
- "type": {
68907
- "const": "text",
68908
- "description": "Must be 'text' for text pattern search."
68909
- },
68910
- "pattern": {
68911
- "type": "string",
68912
- "description": "Text or regex pattern to match."
70316
+ "kind": {
70317
+ "const": "block"
68913
70318
  },
68914
- "mode": {
70319
+ "nodeType": {
68915
70320
  "oneOf": [
68916
70321
  {
68917
- "const": "contains"
70322
+ "const": "paragraph"
68918
70323
  },
68919
70324
  {
68920
- "const": "regex"
70325
+ "const": "heading"
70326
+ },
70327
+ {
70328
+ "const": "listItem"
70329
+ },
70330
+ {
70331
+ "const": "table"
70332
+ },
70333
+ {
70334
+ "const": "tableRow"
70335
+ },
70336
+ {
70337
+ "const": "tableCell"
70338
+ },
70339
+ {
70340
+ "const": "tableOfContents"
70341
+ },
70342
+ {
70343
+ "const": "image"
70344
+ },
70345
+ {
70346
+ "const": "sdt"
68921
70347
  }
68922
- ],
68923
- "description": "Match mode: 'contains' (substring) or 'regex'."
70348
+ ]
68924
70349
  },
68925
- "caseSensitive": {
68926
- "type": "boolean",
68927
- "description": "Case-sensitive matching. Default: false."
70350
+ "nodeId": {
70351
+ "type": "string"
68928
70352
  }
68929
70353
  },
68930
70354
  "required": [
68931
- "type",
68932
- "pattern"
70355
+ "kind",
70356
+ "nodeType",
70357
+ "nodeId"
68933
70358
  ]
68934
70359
  },
68935
- {
70360
+ "require": {
70361
+ "oneOf": [
70362
+ {
70363
+ "const": "first"
70364
+ },
70365
+ {
70366
+ "const": "exactlyOne"
70367
+ }
70368
+ ]
70369
+ }
70370
+ },
70371
+ "required": [
70372
+ "by",
70373
+ "select",
70374
+ "require"
70375
+ ]
70376
+ },
70377
+ {
70378
+ "type": "object",
70379
+ "properties": {
70380
+ "by": {
70381
+ "const": "ref"
70382
+ },
70383
+ "ref": {
70384
+ "type": "string"
70385
+ },
70386
+ "within": {
68936
70387
  "type": "object",
68937
70388
  "properties": {
68938
- "type": {
68939
- "const": "node",
68940
- "description": "Must be 'node' for node type search."
70389
+ "kind": {
70390
+ "const": "block"
68941
70391
  },
68942
70392
  "nodeType": {
68943
70393
  "oneOf": [
@@ -68967,71 +70417,224 @@ export const CONTRACT = {
68967
70417
  },
68968
70418
  {
68969
70419
  "const": "sdt"
68970
- },
68971
- {
68972
- "const": "run"
68973
- },
68974
- {
68975
- "const": "bookmark"
68976
- },
68977
- {
68978
- "const": "comment"
68979
- },
68980
- {
68981
- "const": "hyperlink"
68982
- },
68983
- {
68984
- "const": "footnoteRef"
68985
- },
68986
- {
68987
- "const": "endnoteRef"
68988
- },
68989
- {
68990
- "const": "crossRef"
68991
- },
68992
- {
68993
- "const": "indexEntry"
68994
- },
68995
- {
68996
- "const": "citation"
68997
- },
68998
- {
68999
- "const": "authorityEntry"
69000
- },
69001
- {
69002
- "const": "sequenceField"
69003
- },
70420
+ }
70421
+ ]
70422
+ },
70423
+ "nodeId": {
70424
+ "type": "string"
70425
+ }
70426
+ },
70427
+ "required": [
70428
+ "kind",
70429
+ "nodeType",
70430
+ "nodeId"
70431
+ ]
70432
+ }
70433
+ },
70434
+ "required": [
70435
+ "by",
70436
+ "ref"
70437
+ ]
70438
+ },
70439
+ {
70440
+ "type": "object",
70441
+ "properties": {
70442
+ "by": {
70443
+ "const": "target"
70444
+ },
70445
+ "target": {
70446
+ "type": "object",
70447
+ "properties": {
70448
+ "kind": {
70449
+ "const": "selection"
70450
+ },
70451
+ "start": {
70452
+ "oneOf": [
69004
70453
  {
69005
- "const": "tab"
70454
+ "type": "object",
70455
+ "properties": {
70456
+ "kind": {
70457
+ "const": "text"
70458
+ },
70459
+ "blockId": {
70460
+ "type": "string"
70461
+ },
70462
+ "offset": {
70463
+ "type": "number"
70464
+ }
70465
+ },
70466
+ "required": [
70467
+ "kind",
70468
+ "blockId",
70469
+ "offset"
70470
+ ]
69006
70471
  },
69007
70472
  {
69008
- "const": "lineBreak"
70473
+ "type": "object",
70474
+ "properties": {
70475
+ "kind": {
70476
+ "const": "nodeEdge"
70477
+ },
70478
+ "node": {
70479
+ "type": "object",
70480
+ "properties": {
70481
+ "kind": {
70482
+ "const": "block"
70483
+ },
70484
+ "nodeType": {
70485
+ "oneOf": [
70486
+ {
70487
+ "const": "paragraph"
70488
+ },
70489
+ {
70490
+ "const": "heading"
70491
+ },
70492
+ {
70493
+ "const": "table"
70494
+ },
70495
+ {
70496
+ "const": "tableOfContents"
70497
+ },
70498
+ {
70499
+ "const": "sdt"
70500
+ },
70501
+ {
70502
+ "const": "image"
70503
+ }
70504
+ ]
70505
+ },
70506
+ "nodeId": {
70507
+ "type": "string"
70508
+ }
70509
+ },
70510
+ "required": [
70511
+ "kind",
70512
+ "nodeType",
70513
+ "nodeId"
70514
+ ]
70515
+ },
70516
+ "edge": {
70517
+ "oneOf": [
70518
+ {
70519
+ "const": "before"
70520
+ },
70521
+ {
70522
+ "const": "after"
70523
+ }
70524
+ ]
70525
+ }
70526
+ },
70527
+ "required": [
70528
+ "kind",
70529
+ "node",
70530
+ "edge"
70531
+ ]
69009
70532
  }
69010
70533
  ],
69011
- "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
70534
+ "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."
69012
70535
  },
69013
- "kind": {
70536
+ "end": {
69014
70537
  "oneOf": [
69015
70538
  {
69016
- "const": "block"
70539
+ "type": "object",
70540
+ "properties": {
70541
+ "kind": {
70542
+ "const": "text"
70543
+ },
70544
+ "blockId": {
70545
+ "type": "string"
70546
+ },
70547
+ "offset": {
70548
+ "type": "number"
70549
+ }
70550
+ },
70551
+ "required": [
70552
+ "kind",
70553
+ "blockId",
70554
+ "offset"
70555
+ ]
69017
70556
  },
69018
70557
  {
69019
- "const": "inline"
70558
+ "type": "object",
70559
+ "properties": {
70560
+ "kind": {
70561
+ "const": "nodeEdge"
70562
+ },
70563
+ "node": {
70564
+ "type": "object",
70565
+ "properties": {
70566
+ "kind": {
70567
+ "const": "block"
70568
+ },
70569
+ "nodeType": {
70570
+ "oneOf": [
70571
+ {
70572
+ "const": "paragraph"
70573
+ },
70574
+ {
70575
+ "const": "heading"
70576
+ },
70577
+ {
70578
+ "const": "table"
70579
+ },
70580
+ {
70581
+ "const": "tableOfContents"
70582
+ },
70583
+ {
70584
+ "const": "sdt"
70585
+ },
70586
+ {
70587
+ "const": "image"
70588
+ }
70589
+ ]
70590
+ },
70591
+ "nodeId": {
70592
+ "type": "string"
70593
+ }
70594
+ },
70595
+ "required": [
70596
+ "kind",
70597
+ "nodeType",
70598
+ "nodeId"
70599
+ ]
70600
+ },
70601
+ "edge": {
70602
+ "oneOf": [
70603
+ {
70604
+ "const": "before"
70605
+ },
70606
+ {
70607
+ "const": "after"
70608
+ }
70609
+ ]
70610
+ }
70611
+ },
70612
+ "required": [
70613
+ "kind",
70614
+ "node",
70615
+ "edge"
70616
+ ]
69020
70617
  }
69021
70618
  ],
69022
- "description": "Filter: 'block' or 'inline'."
70619
+ "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."
69023
70620
  }
69024
70621
  },
69025
70622
  "required": [
69026
- "type"
70623
+ "kind",
70624
+ "start",
70625
+ "end"
69027
70626
  ]
69028
70627
  }
70628
+ },
70629
+ "required": [
70630
+ "by",
70631
+ "target"
69029
70632
  ]
69030
70633
  },
69031
- "within": {
70634
+ {
69032
70635
  "type": "object",
69033
70636
  "properties": {
69034
- "kind": {
70637
+ "by": {
69035
70638
  "const": "block"
69036
70639
  },
69037
70640
  "nodeType": {
@@ -69070,26 +70673,11 @@ export const CONTRACT = {
69070
70673
  }
69071
70674
  },
69072
70675
  "required": [
69073
- "kind",
70676
+ "by",
69074
70677
  "nodeType",
69075
70678
  "nodeId"
69076
70679
  ]
69077
- },
69078
- "require": {
69079
- "oneOf": [
69080
- {
69081
- "const": "first"
69082
- },
69083
- {
69084
- "const": "exactlyOne"
69085
- }
69086
- ]
69087
70680
  }
69088
- },
69089
- "required": [
69090
- "by",
69091
- "select",
69092
- "require"
69093
70681
  ]
69094
70682
  },
69095
70683
  "args": {
@@ -69686,6 +71274,53 @@ export const CONTRACT = {
69686
71274
  "by",
69687
71275
  "target"
69688
71276
  ]
71277
+ },
71278
+ {
71279
+ "type": "object",
71280
+ "properties": {
71281
+ "by": {
71282
+ "const": "block"
71283
+ },
71284
+ "nodeType": {
71285
+ "oneOf": [
71286
+ {
71287
+ "const": "paragraph"
71288
+ },
71289
+ {
71290
+ "const": "heading"
71291
+ },
71292
+ {
71293
+ "const": "listItem"
71294
+ },
71295
+ {
71296
+ "const": "table"
71297
+ },
71298
+ {
71299
+ "const": "tableRow"
71300
+ },
71301
+ {
71302
+ "const": "tableCell"
71303
+ },
71304
+ {
71305
+ "const": "tableOfContents"
71306
+ },
71307
+ {
71308
+ "const": "image"
71309
+ },
71310
+ {
71311
+ "const": "sdt"
71312
+ }
71313
+ ]
71314
+ },
71315
+ "nodeId": {
71316
+ "type": "string"
71317
+ }
71318
+ },
71319
+ "required": [
71320
+ "by",
71321
+ "nodeType",
71322
+ "nodeId"
71323
+ ]
69689
71324
  }
69690
71325
  ]
69691
71326
  },
@@ -70182,6 +71817,53 @@ export const CONTRACT = {
70182
71817
  "by",
70183
71818
  "target"
70184
71819
  ]
71820
+ },
71821
+ {
71822
+ "type": "object",
71823
+ "properties": {
71824
+ "by": {
71825
+ "const": "block"
71826
+ },
71827
+ "nodeType": {
71828
+ "oneOf": [
71829
+ {
71830
+ "const": "paragraph"
71831
+ },
71832
+ {
71833
+ "const": "heading"
71834
+ },
71835
+ {
71836
+ "const": "listItem"
71837
+ },
71838
+ {
71839
+ "const": "table"
71840
+ },
71841
+ {
71842
+ "const": "tableRow"
71843
+ },
71844
+ {
71845
+ "const": "tableCell"
71846
+ },
71847
+ {
71848
+ "const": "tableOfContents"
71849
+ },
71850
+ {
71851
+ "const": "image"
71852
+ },
71853
+ {
71854
+ "const": "sdt"
71855
+ }
71856
+ ]
71857
+ },
71858
+ "nodeId": {
71859
+ "type": "string"
71860
+ }
71861
+ },
71862
+ "required": [
71863
+ "by",
71864
+ "nodeType",
71865
+ "nodeId"
71866
+ ]
70185
71867
  }
70186
71868
  ]
70187
71869
  },
@@ -70953,11 +72635,36 @@ export const CONTRACT = {
70953
72635
  ]
70954
72636
  }
70955
72637
  }
72638
+ },
72639
+ "alignment": {
72640
+ "oneOf": [
72641
+ {
72642
+ "const": "left"
72643
+ },
72644
+ {
72645
+ "const": "center"
72646
+ },
72647
+ {
72648
+ "const": "right"
72649
+ },
72650
+ {
72651
+ "const": "justify"
72652
+ }
72653
+ ],
72654
+ "description": "Set paragraph alignment on the target block(s). Can be combined with inline formatting in the same step."
72655
+ },
72656
+ "scope": {
72657
+ "oneOf": [
72658
+ {
72659
+ "const": "match"
72660
+ },
72661
+ {
72662
+ "const": "block"
72663
+ }
72664
+ ],
72665
+ "description": "When \"block\", inline formatting expands to cover the entire parent paragraph(s), not just the matched text. Use \"block\" after markdown inserts to format whole paragraphs with a short identifying pattern. Default: \"match\"."
70956
72666
  }
70957
- },
70958
- "required": [
70959
- "inline"
70960
- ]
72667
+ }
70961
72668
  }
70962
72669
  },
70963
72670
  "required": [
@@ -71375,6 +73082,37 @@ export const CONTRACT = {
71375
73082
  "by",
71376
73083
  "target"
71377
73084
  ]
73085
+ },
73086
+ {
73087
+ "type": "object",
73088
+ "properties": {
73089
+ "by": {
73090
+ "const": "block",
73091
+ "type": "string"
73092
+ },
73093
+ "nodeType": {
73094
+ "enum": [
73095
+ "paragraph",
73096
+ "heading",
73097
+ "listItem",
73098
+ "table",
73099
+ "tableRow",
73100
+ "tableCell",
73101
+ "tableOfContents",
73102
+ "image",
73103
+ "sdt"
73104
+ ]
73105
+ },
73106
+ "nodeId": {
73107
+ "type": "string"
73108
+ }
73109
+ },
73110
+ "additionalProperties": false,
73111
+ "required": [
73112
+ "by",
73113
+ "nodeType",
73114
+ "nodeId"
73115
+ ]
71378
73116
  }
71379
73117
  ]
71380
73118
  },
@@ -71536,107 +73274,179 @@ export const CONTRACT = {
71536
73274
  "type": "string"
71537
73275
  },
71538
73276
  "where": {
71539
- "type": "object",
71540
- "properties": {
71541
- "by": {
71542
- "const": "select",
71543
- "type": "string"
71544
- },
71545
- "select": {
71546
- "oneOf": [
71547
- {
71548
- "type": "object",
71549
- "properties": {
71550
- "type": {
71551
- "const": "text",
71552
- "description": "Must be 'text' for text pattern search."
71553
- },
71554
- "pattern": {
71555
- "type": "string",
71556
- "description": "Text or regex pattern to match."
71557
- },
71558
- "mode": {
71559
- "enum": [
71560
- "contains",
71561
- "regex"
71562
- ],
71563
- "description": "Match mode: 'contains' (substring) or 'regex'."
73277
+ "oneOf": [
73278
+ {
73279
+ "type": "object",
73280
+ "properties": {
73281
+ "by": {
73282
+ "const": "select",
73283
+ "type": "string"
73284
+ },
73285
+ "select": {
73286
+ "oneOf": [
73287
+ {
73288
+ "type": "object",
73289
+ "properties": {
73290
+ "type": {
73291
+ "const": "text",
73292
+ "description": "Must be 'text' for text pattern search."
73293
+ },
73294
+ "pattern": {
73295
+ "type": "string",
73296
+ "description": "Text or regex pattern to match."
73297
+ },
73298
+ "mode": {
73299
+ "enum": [
73300
+ "contains",
73301
+ "regex"
73302
+ ],
73303
+ "description": "Match mode: 'contains' (substring) or 'regex'."
73304
+ },
73305
+ "caseSensitive": {
73306
+ "type": "boolean",
73307
+ "description": "Case-sensitive matching. Default: false."
73308
+ }
73309
+ },
73310
+ "additionalProperties": false,
73311
+ "required": [
73312
+ "type",
73313
+ "pattern"
73314
+ ]
71564
73315
  },
71565
- "caseSensitive": {
71566
- "type": "boolean",
71567
- "description": "Case-sensitive matching. Default: false."
73316
+ {
73317
+ "type": "object",
73318
+ "properties": {
73319
+ "type": {
73320
+ "const": "node",
73321
+ "description": "Must be 'node' for node type search."
73322
+ },
73323
+ "nodeType": {
73324
+ "enum": [
73325
+ "paragraph",
73326
+ "heading",
73327
+ "listItem",
73328
+ "table",
73329
+ "tableRow",
73330
+ "tableCell",
73331
+ "tableOfContents",
73332
+ "image",
73333
+ "sdt",
73334
+ "run",
73335
+ "bookmark",
73336
+ "comment",
73337
+ "hyperlink",
73338
+ "footnoteRef",
73339
+ "endnoteRef",
73340
+ "crossRef",
73341
+ "indexEntry",
73342
+ "citation",
73343
+ "authorityEntry",
73344
+ "sequenceField",
73345
+ "tab",
73346
+ "lineBreak"
73347
+ ],
73348
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
73349
+ },
73350
+ "kind": {
73351
+ "enum": [
73352
+ "block",
73353
+ "inline"
73354
+ ],
73355
+ "description": "Filter: 'block' or 'inline'."
73356
+ }
73357
+ },
73358
+ "additionalProperties": false,
73359
+ "required": [
73360
+ "type"
73361
+ ]
71568
73362
  }
71569
- },
71570
- "additionalProperties": false,
71571
- "required": [
71572
- "type",
71573
- "pattern"
71574
73363
  ]
71575
73364
  },
71576
- {
71577
- "type": "object",
71578
- "properties": {
71579
- "type": {
71580
- "const": "node",
71581
- "description": "Must be 'node' for node type search."
71582
- },
71583
- "nodeType": {
71584
- "enum": [
71585
- "paragraph",
71586
- "heading",
71587
- "listItem",
71588
- "table",
71589
- "tableRow",
71590
- "tableCell",
71591
- "tableOfContents",
71592
- "image",
71593
- "sdt",
71594
- "run",
71595
- "bookmark",
71596
- "comment",
71597
- "hyperlink",
71598
- "footnoteRef",
71599
- "endnoteRef",
71600
- "crossRef",
71601
- "indexEntry",
71602
- "citation",
71603
- "authorityEntry",
71604
- "sequenceField",
71605
- "tab",
71606
- "lineBreak"
71607
- ],
71608
- "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
71609
- },
71610
- "kind": {
71611
- "enum": [
71612
- "block",
71613
- "inline"
71614
- ],
71615
- "description": "Filter: 'block' or 'inline'."
71616
- }
71617
- },
71618
- "additionalProperties": false,
71619
- "required": [
71620
- "type"
73365
+ "within": {
73366
+ "$ref": "#/$defs/BlockNodeAddress"
73367
+ },
73368
+ "require": {
73369
+ "enum": [
73370
+ "first",
73371
+ "exactlyOne"
71621
73372
  ]
71622
73373
  }
73374
+ },
73375
+ "additionalProperties": false,
73376
+ "required": [
73377
+ "by",
73378
+ "select",
73379
+ "require"
71623
73380
  ]
71624
73381
  },
71625
- "within": {
71626
- "$ref": "#/$defs/BlockNodeAddress"
73382
+ {
73383
+ "type": "object",
73384
+ "properties": {
73385
+ "by": {
73386
+ "const": "ref",
73387
+ "type": "string"
73388
+ },
73389
+ "ref": {
73390
+ "type": "string"
73391
+ },
73392
+ "within": {
73393
+ "$ref": "#/$defs/BlockNodeAddress"
73394
+ }
73395
+ },
73396
+ "additionalProperties": false,
73397
+ "required": [
73398
+ "by",
73399
+ "ref"
73400
+ ]
71627
73401
  },
71628
- "require": {
71629
- "enum": [
71630
- "first",
71631
- "exactlyOne"
73402
+ {
73403
+ "type": "object",
73404
+ "properties": {
73405
+ "by": {
73406
+ "const": "target",
73407
+ "type": "string"
73408
+ },
73409
+ "target": {
73410
+ "$ref": "#/$defs/SelectionTarget"
73411
+ }
73412
+ },
73413
+ "additionalProperties": false,
73414
+ "required": [
73415
+ "by",
73416
+ "target"
73417
+ ]
73418
+ },
73419
+ {
73420
+ "type": "object",
73421
+ "properties": {
73422
+ "by": {
73423
+ "const": "block",
73424
+ "type": "string"
73425
+ },
73426
+ "nodeType": {
73427
+ "enum": [
73428
+ "paragraph",
73429
+ "heading",
73430
+ "listItem",
73431
+ "table",
73432
+ "tableRow",
73433
+ "tableCell",
73434
+ "tableOfContents",
73435
+ "image",
73436
+ "sdt"
73437
+ ]
73438
+ },
73439
+ "nodeId": {
73440
+ "type": "string"
73441
+ }
73442
+ },
73443
+ "additionalProperties": false,
73444
+ "required": [
73445
+ "by",
73446
+ "nodeType",
73447
+ "nodeId"
71632
73448
  ]
71633
73449
  }
71634
- },
71635
- "additionalProperties": false,
71636
- "required": [
71637
- "by",
71638
- "select",
71639
- "require"
71640
73450
  ]
71641
73451
  },
71642
73452
  "args": {
@@ -71889,6 +73699,37 @@ export const CONTRACT = {
71889
73699
  "by",
71890
73700
  "target"
71891
73701
  ]
73702
+ },
73703
+ {
73704
+ "type": "object",
73705
+ "properties": {
73706
+ "by": {
73707
+ "const": "block",
73708
+ "type": "string"
73709
+ },
73710
+ "nodeType": {
73711
+ "enum": [
73712
+ "paragraph",
73713
+ "heading",
73714
+ "listItem",
73715
+ "table",
73716
+ "tableRow",
73717
+ "tableCell",
73718
+ "tableOfContents",
73719
+ "image",
73720
+ "sdt"
73721
+ ]
73722
+ },
73723
+ "nodeId": {
73724
+ "type": "string"
73725
+ }
73726
+ },
73727
+ "additionalProperties": false,
73728
+ "required": [
73729
+ "by",
73730
+ "nodeType",
73731
+ "nodeId"
73732
+ ]
71892
73733
  }
71893
73734
  ]
71894
73735
  },
@@ -72063,6 +73904,37 @@ export const CONTRACT = {
72063
73904
  "by",
72064
73905
  "target"
72065
73906
  ]
73907
+ },
73908
+ {
73909
+ "type": "object",
73910
+ "properties": {
73911
+ "by": {
73912
+ "const": "block",
73913
+ "type": "string"
73914
+ },
73915
+ "nodeType": {
73916
+ "enum": [
73917
+ "paragraph",
73918
+ "heading",
73919
+ "listItem",
73920
+ "table",
73921
+ "tableRow",
73922
+ "tableCell",
73923
+ "tableOfContents",
73924
+ "image",
73925
+ "sdt"
73926
+ ]
73927
+ },
73928
+ "nodeId": {
73929
+ "type": "string"
73930
+ }
73931
+ },
73932
+ "additionalProperties": false,
73933
+ "required": [
73934
+ "by",
73935
+ "nodeType",
73936
+ "nodeId"
73937
+ ]
72066
73938
  }
72067
73939
  ]
72068
73940
  },
@@ -72877,12 +74749,28 @@ export const CONTRACT = {
72877
74749
  },
72878
74750
  "additionalProperties": false,
72879
74751
  "minProperties": 1
74752
+ },
74753
+ "alignment": {
74754
+ "type": "string",
74755
+ "enum": [
74756
+ "left",
74757
+ "center",
74758
+ "right",
74759
+ "justify"
74760
+ ],
74761
+ "description": "Set paragraph alignment on the target block(s). Can be combined with inline formatting in the same step."
74762
+ },
74763
+ "scope": {
74764
+ "type": "string",
74765
+ "enum": [
74766
+ "match",
74767
+ "block"
74768
+ ],
74769
+ "description": "When \"block\", inline formatting expands to cover the entire parent paragraph(s), not just the matched text. Use \"block\" after markdown inserts to format whole paragraphs with a short identifying pattern. Default: \"match\"."
72880
74770
  }
72881
74771
  },
72882
74772
  "additionalProperties": false,
72883
- "required": [
72884
- "inline"
72885
- ]
74773
+ "minProperties": 1
72886
74774
  }
72887
74775
  },
72888
74776
  "additionalProperties": false,
@@ -115401,6 +117289,195 @@ export const CONTRACT = {
115401
117289
  ]
115402
117290
  }
115403
117291
  },
117292
+ {
117293
+ "name": "at",
117294
+ "kind": "jsonFlag",
117295
+ "type": "json",
117296
+ "flag": "at-json",
117297
+ "schema": {
117298
+ "type": "object",
117299
+ "properties": {
117300
+ "kind": {
117301
+ "const": "selection"
117302
+ },
117303
+ "start": {
117304
+ "oneOf": [
117305
+ {
117306
+ "type": "object",
117307
+ "properties": {
117308
+ "kind": {
117309
+ "const": "text"
117310
+ },
117311
+ "blockId": {
117312
+ "type": "string"
117313
+ },
117314
+ "offset": {
117315
+ "type": "number"
117316
+ }
117317
+ },
117318
+ "required": [
117319
+ "kind",
117320
+ "blockId",
117321
+ "offset"
117322
+ ]
117323
+ },
117324
+ {
117325
+ "type": "object",
117326
+ "properties": {
117327
+ "kind": {
117328
+ "const": "nodeEdge"
117329
+ },
117330
+ "node": {
117331
+ "type": "object",
117332
+ "properties": {
117333
+ "kind": {
117334
+ "const": "block"
117335
+ },
117336
+ "nodeType": {
117337
+ "oneOf": [
117338
+ {
117339
+ "const": "paragraph"
117340
+ },
117341
+ {
117342
+ "const": "heading"
117343
+ },
117344
+ {
117345
+ "const": "table"
117346
+ },
117347
+ {
117348
+ "const": "tableOfContents"
117349
+ },
117350
+ {
117351
+ "const": "sdt"
117352
+ },
117353
+ {
117354
+ "const": "image"
117355
+ }
117356
+ ]
117357
+ },
117358
+ "nodeId": {
117359
+ "type": "string"
117360
+ }
117361
+ },
117362
+ "required": [
117363
+ "kind",
117364
+ "nodeType",
117365
+ "nodeId"
117366
+ ]
117367
+ },
117368
+ "edge": {
117369
+ "oneOf": [
117370
+ {
117371
+ "const": "before"
117372
+ },
117373
+ {
117374
+ "const": "after"
117375
+ }
117376
+ ]
117377
+ }
117378
+ },
117379
+ "required": [
117380
+ "kind",
117381
+ "node",
117382
+ "edge"
117383
+ ]
117384
+ }
117385
+ ],
117386
+ "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."
117387
+ },
117388
+ "end": {
117389
+ "oneOf": [
117390
+ {
117391
+ "type": "object",
117392
+ "properties": {
117393
+ "kind": {
117394
+ "const": "text"
117395
+ },
117396
+ "blockId": {
117397
+ "type": "string"
117398
+ },
117399
+ "offset": {
117400
+ "type": "number"
117401
+ }
117402
+ },
117403
+ "required": [
117404
+ "kind",
117405
+ "blockId",
117406
+ "offset"
117407
+ ]
117408
+ },
117409
+ {
117410
+ "type": "object",
117411
+ "properties": {
117412
+ "kind": {
117413
+ "const": "nodeEdge"
117414
+ },
117415
+ "node": {
117416
+ "type": "object",
117417
+ "properties": {
117418
+ "kind": {
117419
+ "const": "block"
117420
+ },
117421
+ "nodeType": {
117422
+ "oneOf": [
117423
+ {
117424
+ "const": "paragraph"
117425
+ },
117426
+ {
117427
+ "const": "heading"
117428
+ },
117429
+ {
117430
+ "const": "table"
117431
+ },
117432
+ {
117433
+ "const": "tableOfContents"
117434
+ },
117435
+ {
117436
+ "const": "sdt"
117437
+ },
117438
+ {
117439
+ "const": "image"
117440
+ }
117441
+ ]
117442
+ },
117443
+ "nodeId": {
117444
+ "type": "string"
117445
+ }
117446
+ },
117447
+ "required": [
117448
+ "kind",
117449
+ "nodeType",
117450
+ "nodeId"
117451
+ ]
117452
+ },
117453
+ "edge": {
117454
+ "oneOf": [
117455
+ {
117456
+ "const": "before"
117457
+ },
117458
+ {
117459
+ "const": "after"
117460
+ }
117461
+ ]
117462
+ }
117463
+ },
117464
+ "required": [
117465
+ "kind",
117466
+ "node",
117467
+ "edge"
117468
+ ]
117469
+ }
117470
+ ],
117471
+ "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."
117472
+ }
117473
+ },
117474
+ "required": [
117475
+ "kind",
117476
+ "start",
117477
+ "end"
117478
+ ]
117479
+ }
117480
+ },
115404
117481
  {
115405
117482
  "name": "tag",
115406
117483
  "kind": "flag",
@@ -115479,6 +117556,9 @@ export const CONTRACT = {
115479
117556
  "nodeId"
115480
117557
  ]
115481
117558
  },
117559
+ "at": {
117560
+ "$ref": "#/$defs/SelectionTarget"
117561
+ },
115482
117562
  "tag": {
115483
117563
  "type": "string"
115484
117564
  },
@@ -147032,6 +149112,13 @@ export const CONTRACT = {
147032
149112
  "type": "string",
147033
149113
  "description": "Environment variable name containing the auth token."
147034
149114
  },
149115
+ "params": {
149116
+ "type": "object",
149117
+ "description": "Custom query parameters appended to the WebSocket URL. Values must be strings. Reserved keys: token.",
149118
+ "additionalProperties": {
149119
+ "type": "string"
149120
+ }
149121
+ },
147035
149122
  "syncTimeoutMs": {
147036
149123
  "type": "number",
147037
149124
  "description": "Max time (ms) to wait for initial sync."
@@ -147241,6 +149328,13 @@ export const CONTRACT = {
147241
149328
  "type": "string",
147242
149329
  "description": "Environment variable name containing the auth token."
147243
149330
  },
149331
+ "params": {
149332
+ "type": "object",
149333
+ "description": "Custom query parameters appended to the WebSocket URL. Values must be strings. Reserved keys: token.",
149334
+ "additionalProperties": {
149335
+ "type": "string"
149336
+ }
149337
+ },
147244
149338
  "syncTimeoutMs": {
147245
149339
  "type": "number",
147246
149340
  "description": "Max time (ms) to wait for initial sync."