@superdoc-dev/sdk 1.0.0-alpha.5 → 1.0.0-alpha.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.
@@ -1558,6 +1558,17 @@ export const CONTRACT = {
1558
1558
  "kind": "flag",
1559
1559
  "type": "string",
1560
1560
  "required": true
1561
+ },
1562
+ {
1563
+ "name": "blockId",
1564
+ "kind": "flag",
1565
+ "type": "string",
1566
+ "flag": "block-id"
1567
+ },
1568
+ {
1569
+ "name": "offset",
1570
+ "kind": "flag",
1571
+ "type": "number"
1561
1572
  }
1562
1573
  ],
1563
1574
  "constraints": null,
@@ -1567,7 +1578,46 @@ export const CONTRACT = {
1567
1578
  "supportsDryRun": true,
1568
1579
  "inputSchema": {
1569
1580
  "additionalProperties": false,
1581
+ "allOf": [
1582
+ {
1583
+ "not": {
1584
+ "required": [
1585
+ "target",
1586
+ "blockId"
1587
+ ]
1588
+ }
1589
+ },
1590
+ {
1591
+ "not": {
1592
+ "required": [
1593
+ "target",
1594
+ "offset"
1595
+ ]
1596
+ }
1597
+ },
1598
+ {
1599
+ "if": {
1600
+ "required": [
1601
+ "offset"
1602
+ ]
1603
+ },
1604
+ "then": {
1605
+ "required": [
1606
+ "blockId"
1607
+ ]
1608
+ }
1609
+ }
1610
+ ],
1570
1611
  "properties": {
1612
+ "blockId": {
1613
+ "description": "Block ID for block-relative targeting.",
1614
+ "type": "string"
1615
+ },
1616
+ "offset": {
1617
+ "description": "Character offset within the block identified by blockId.",
1618
+ "minimum": 0,
1619
+ "type": "integer"
1620
+ },
1571
1621
  "target": {
1572
1622
  "additionalProperties": false,
1573
1623
  "properties": {
@@ -2445,7 +2495,6 @@ export const CONTRACT = {
2445
2495
  "kind": "jsonFlag",
2446
2496
  "type": "json",
2447
2497
  "flag": "target-json",
2448
- "required": true,
2449
2498
  "schema": {
2450
2499
  "type": "object",
2451
2500
  "properties": {
@@ -2483,6 +2532,22 @@ export const CONTRACT = {
2483
2532
  "kind": "flag",
2484
2533
  "type": "string",
2485
2534
  "required": true
2535
+ },
2536
+ {
2537
+ "name": "blockId",
2538
+ "kind": "flag",
2539
+ "type": "string",
2540
+ "flag": "block-id"
2541
+ },
2542
+ {
2543
+ "name": "start",
2544
+ "kind": "flag",
2545
+ "type": "number"
2546
+ },
2547
+ {
2548
+ "name": "end",
2549
+ "kind": "flag",
2550
+ "type": "number"
2486
2551
  }
2487
2552
  ],
2488
2553
  "constraints": null,
@@ -2492,7 +2557,100 @@ export const CONTRACT = {
2492
2557
  "supportsDryRun": true,
2493
2558
  "inputSchema": {
2494
2559
  "additionalProperties": false,
2560
+ "allOf": [
2561
+ {
2562
+ "not": {
2563
+ "required": [
2564
+ "target",
2565
+ "blockId"
2566
+ ]
2567
+ }
2568
+ },
2569
+ {
2570
+ "not": {
2571
+ "required": [
2572
+ "target",
2573
+ "start"
2574
+ ]
2575
+ }
2576
+ },
2577
+ {
2578
+ "not": {
2579
+ "required": [
2580
+ "target",
2581
+ "end"
2582
+ ]
2583
+ }
2584
+ },
2585
+ {
2586
+ "if": {
2587
+ "required": [
2588
+ "start"
2589
+ ]
2590
+ },
2591
+ "then": {
2592
+ "required": [
2593
+ "blockId",
2594
+ "end"
2595
+ ]
2596
+ }
2597
+ },
2598
+ {
2599
+ "if": {
2600
+ "required": [
2601
+ "end"
2602
+ ]
2603
+ },
2604
+ "then": {
2605
+ "required": [
2606
+ "blockId",
2607
+ "start"
2608
+ ]
2609
+ }
2610
+ },
2611
+ {
2612
+ "if": {
2613
+ "required": [
2614
+ "blockId"
2615
+ ]
2616
+ },
2617
+ "then": {
2618
+ "required": [
2619
+ "start",
2620
+ "end"
2621
+ ]
2622
+ }
2623
+ }
2624
+ ],
2625
+ "anyOf": [
2626
+ {
2627
+ "required": [
2628
+ "target"
2629
+ ]
2630
+ },
2631
+ {
2632
+ "required": [
2633
+ "blockId",
2634
+ "start",
2635
+ "end"
2636
+ ]
2637
+ }
2638
+ ],
2495
2639
  "properties": {
2640
+ "blockId": {
2641
+ "description": "Block ID for block-relative range targeting.",
2642
+ "type": "string"
2643
+ },
2644
+ "end": {
2645
+ "description": "End offset within the block identified by blockId.",
2646
+ "minimum": 0,
2647
+ "type": "integer"
2648
+ },
2649
+ "start": {
2650
+ "description": "Start offset within the block identified by blockId.",
2651
+ "minimum": 0,
2652
+ "type": "integer"
2653
+ },
2496
2654
  "target": {
2497
2655
  "additionalProperties": false,
2498
2656
  "properties": {
@@ -2531,7 +2689,6 @@ export const CONTRACT = {
2531
2689
  }
2532
2690
  },
2533
2691
  "required": [
2534
- "target",
2535
2692
  "text"
2536
2693
  ],
2537
2694
  "type": "object"
@@ -3371,7 +3528,6 @@ export const CONTRACT = {
3371
3528
  "kind": "jsonFlag",
3372
3529
  "type": "json",
3373
3530
  "flag": "target-json",
3374
- "required": true,
3375
3531
  "schema": {
3376
3532
  "type": "object",
3377
3533
  "properties": {
@@ -3403,6 +3559,22 @@ export const CONTRACT = {
3403
3559
  "range"
3404
3560
  ]
3405
3561
  }
3562
+ },
3563
+ {
3564
+ "name": "blockId",
3565
+ "kind": "flag",
3566
+ "type": "string",
3567
+ "flag": "block-id"
3568
+ },
3569
+ {
3570
+ "name": "start",
3571
+ "kind": "flag",
3572
+ "type": "number"
3573
+ },
3574
+ {
3575
+ "name": "end",
3576
+ "kind": "flag",
3577
+ "type": "number"
3406
3578
  }
3407
3579
  ],
3408
3580
  "constraints": null,
@@ -3412,7 +3584,100 @@ export const CONTRACT = {
3412
3584
  "supportsDryRun": true,
3413
3585
  "inputSchema": {
3414
3586
  "additionalProperties": false,
3587
+ "allOf": [
3588
+ {
3589
+ "not": {
3590
+ "required": [
3591
+ "target",
3592
+ "blockId"
3593
+ ]
3594
+ }
3595
+ },
3596
+ {
3597
+ "not": {
3598
+ "required": [
3599
+ "target",
3600
+ "start"
3601
+ ]
3602
+ }
3603
+ },
3604
+ {
3605
+ "not": {
3606
+ "required": [
3607
+ "target",
3608
+ "end"
3609
+ ]
3610
+ }
3611
+ },
3612
+ {
3613
+ "if": {
3614
+ "required": [
3615
+ "start"
3616
+ ]
3617
+ },
3618
+ "then": {
3619
+ "required": [
3620
+ "blockId",
3621
+ "end"
3622
+ ]
3623
+ }
3624
+ },
3625
+ {
3626
+ "if": {
3627
+ "required": [
3628
+ "end"
3629
+ ]
3630
+ },
3631
+ "then": {
3632
+ "required": [
3633
+ "blockId",
3634
+ "start"
3635
+ ]
3636
+ }
3637
+ },
3638
+ {
3639
+ "if": {
3640
+ "required": [
3641
+ "blockId"
3642
+ ]
3643
+ },
3644
+ "then": {
3645
+ "required": [
3646
+ "start",
3647
+ "end"
3648
+ ]
3649
+ }
3650
+ }
3651
+ ],
3652
+ "anyOf": [
3653
+ {
3654
+ "required": [
3655
+ "target"
3656
+ ]
3657
+ },
3658
+ {
3659
+ "required": [
3660
+ "blockId",
3661
+ "start",
3662
+ "end"
3663
+ ]
3664
+ }
3665
+ ],
3415
3666
  "properties": {
3667
+ "blockId": {
3668
+ "description": "Block ID for block-relative range targeting.",
3669
+ "type": "string"
3670
+ },
3671
+ "end": {
3672
+ "description": "End offset within the block identified by blockId.",
3673
+ "minimum": 0,
3674
+ "type": "integer"
3675
+ },
3676
+ "start": {
3677
+ "description": "Start offset within the block identified by blockId.",
3678
+ "minimum": 0,
3679
+ "type": "integer"
3680
+ },
3416
3681
  "target": {
3417
3682
  "additionalProperties": false,
3418
3683
  "properties": {
@@ -3447,9 +3712,6 @@ export const CONTRACT = {
3447
3712
  "type": "object"
3448
3713
  }
3449
3714
  },
3450
- "required": [
3451
- "target"
3452
- ],
3453
3715
  "type": "object"
3454
3716
  },
3455
3717
  "outputSchema": {
@@ -4286,7 +4548,6 @@ export const CONTRACT = {
4286
4548
  "kind": "jsonFlag",
4287
4549
  "type": "json",
4288
4550
  "flag": "target-json",
4289
- "required": true,
4290
4551
  "schema": {
4291
4552
  "type": "object",
4292
4553
  "properties": {
@@ -4318,6 +4579,22 @@ export const CONTRACT = {
4318
4579
  "range"
4319
4580
  ]
4320
4581
  }
4582
+ },
4583
+ {
4584
+ "name": "blockId",
4585
+ "kind": "flag",
4586
+ "type": "string",
4587
+ "flag": "block-id"
4588
+ },
4589
+ {
4590
+ "name": "start",
4591
+ "kind": "flag",
4592
+ "type": "number"
4593
+ },
4594
+ {
4595
+ "name": "end",
4596
+ "kind": "flag",
4597
+ "type": "number"
4321
4598
  }
4322
4599
  ],
4323
4600
  "constraints": null,
@@ -4327,7 +4604,100 @@ export const CONTRACT = {
4327
4604
  "supportsDryRun": true,
4328
4605
  "inputSchema": {
4329
4606
  "additionalProperties": false,
4607
+ "allOf": [
4608
+ {
4609
+ "not": {
4610
+ "required": [
4611
+ "target",
4612
+ "blockId"
4613
+ ]
4614
+ }
4615
+ },
4616
+ {
4617
+ "not": {
4618
+ "required": [
4619
+ "target",
4620
+ "start"
4621
+ ]
4622
+ }
4623
+ },
4624
+ {
4625
+ "not": {
4626
+ "required": [
4627
+ "target",
4628
+ "end"
4629
+ ]
4630
+ }
4631
+ },
4632
+ {
4633
+ "if": {
4634
+ "required": [
4635
+ "start"
4636
+ ]
4637
+ },
4638
+ "then": {
4639
+ "required": [
4640
+ "blockId",
4641
+ "end"
4642
+ ]
4643
+ }
4644
+ },
4645
+ {
4646
+ "if": {
4647
+ "required": [
4648
+ "end"
4649
+ ]
4650
+ },
4651
+ "then": {
4652
+ "required": [
4653
+ "blockId",
4654
+ "start"
4655
+ ]
4656
+ }
4657
+ },
4658
+ {
4659
+ "if": {
4660
+ "required": [
4661
+ "blockId"
4662
+ ]
4663
+ },
4664
+ "then": {
4665
+ "required": [
4666
+ "start",
4667
+ "end"
4668
+ ]
4669
+ }
4670
+ }
4671
+ ],
4672
+ "anyOf": [
4673
+ {
4674
+ "required": [
4675
+ "target"
4676
+ ]
4677
+ },
4678
+ {
4679
+ "required": [
4680
+ "blockId",
4681
+ "start",
4682
+ "end"
4683
+ ]
4684
+ }
4685
+ ],
4330
4686
  "properties": {
4687
+ "blockId": {
4688
+ "description": "Block ID for block-relative range targeting.",
4689
+ "type": "string"
4690
+ },
4691
+ "end": {
4692
+ "description": "End offset within the block identified by blockId.",
4693
+ "minimum": 0,
4694
+ "type": "integer"
4695
+ },
4696
+ "start": {
4697
+ "description": "Start offset within the block identified by blockId.",
4698
+ "minimum": 0,
4699
+ "type": "integer"
4700
+ },
4331
4701
  "target": {
4332
4702
  "additionalProperties": false,
4333
4703
  "properties": {
@@ -4362,9 +4732,6 @@ export const CONTRACT = {
4362
4732
  "type": "object"
4363
4733
  }
4364
4734
  },
4365
- "required": [
4366
- "target"
4367
- ],
4368
4735
  "type": "object"
4369
4736
  },
4370
4737
  "outputSchema": {
@@ -5201,7 +5568,6 @@ export const CONTRACT = {
5201
5568
  "kind": "jsonFlag",
5202
5569
  "type": "json",
5203
5570
  "flag": "target-json",
5204
- "required": true,
5205
5571
  "schema": {
5206
5572
  "type": "object",
5207
5573
  "properties": {
@@ -5233,17 +5599,126 @@ export const CONTRACT = {
5233
5599
  "range"
5234
5600
  ]
5235
5601
  }
5236
- }
5237
- ],
5238
- "constraints": null,
5239
- "mutates": true,
5240
- "idempotency": "conditional",
5241
- "supportsTrackedMode": true,
5242
- "supportsDryRun": true,
5243
- "inputSchema": {
5244
- "additionalProperties": false,
5245
- "properties": {
5246
- "target": {
5602
+ },
5603
+ {
5604
+ "name": "blockId",
5605
+ "kind": "flag",
5606
+ "type": "string",
5607
+ "flag": "block-id"
5608
+ },
5609
+ {
5610
+ "name": "start",
5611
+ "kind": "flag",
5612
+ "type": "number"
5613
+ },
5614
+ {
5615
+ "name": "end",
5616
+ "kind": "flag",
5617
+ "type": "number"
5618
+ }
5619
+ ],
5620
+ "constraints": null,
5621
+ "mutates": true,
5622
+ "idempotency": "conditional",
5623
+ "supportsTrackedMode": true,
5624
+ "supportsDryRun": true,
5625
+ "inputSchema": {
5626
+ "additionalProperties": false,
5627
+ "allOf": [
5628
+ {
5629
+ "not": {
5630
+ "required": [
5631
+ "target",
5632
+ "blockId"
5633
+ ]
5634
+ }
5635
+ },
5636
+ {
5637
+ "not": {
5638
+ "required": [
5639
+ "target",
5640
+ "start"
5641
+ ]
5642
+ }
5643
+ },
5644
+ {
5645
+ "not": {
5646
+ "required": [
5647
+ "target",
5648
+ "end"
5649
+ ]
5650
+ }
5651
+ },
5652
+ {
5653
+ "if": {
5654
+ "required": [
5655
+ "start"
5656
+ ]
5657
+ },
5658
+ "then": {
5659
+ "required": [
5660
+ "blockId",
5661
+ "end"
5662
+ ]
5663
+ }
5664
+ },
5665
+ {
5666
+ "if": {
5667
+ "required": [
5668
+ "end"
5669
+ ]
5670
+ },
5671
+ "then": {
5672
+ "required": [
5673
+ "blockId",
5674
+ "start"
5675
+ ]
5676
+ }
5677
+ },
5678
+ {
5679
+ "if": {
5680
+ "required": [
5681
+ "blockId"
5682
+ ]
5683
+ },
5684
+ "then": {
5685
+ "required": [
5686
+ "start",
5687
+ "end"
5688
+ ]
5689
+ }
5690
+ }
5691
+ ],
5692
+ "anyOf": [
5693
+ {
5694
+ "required": [
5695
+ "target"
5696
+ ]
5697
+ },
5698
+ {
5699
+ "required": [
5700
+ "blockId",
5701
+ "start",
5702
+ "end"
5703
+ ]
5704
+ }
5705
+ ],
5706
+ "properties": {
5707
+ "blockId": {
5708
+ "description": "Block ID for block-relative range targeting.",
5709
+ "type": "string"
5710
+ },
5711
+ "end": {
5712
+ "description": "End offset within the block identified by blockId.",
5713
+ "minimum": 0,
5714
+ "type": "integer"
5715
+ },
5716
+ "start": {
5717
+ "description": "Start offset within the block identified by blockId.",
5718
+ "minimum": 0,
5719
+ "type": "integer"
5720
+ },
5721
+ "target": {
5247
5722
  "additionalProperties": false,
5248
5723
  "properties": {
5249
5724
  "blockId": {
@@ -5277,9 +5752,6 @@ export const CONTRACT = {
5277
5752
  "type": "object"
5278
5753
  }
5279
5754
  },
5280
- "required": [
5281
- "target"
5282
- ],
5283
5755
  "type": "object"
5284
5756
  },
5285
5757
  "outputSchema": {
@@ -6116,7 +6588,6 @@ export const CONTRACT = {
6116
6588
  "kind": "jsonFlag",
6117
6589
  "type": "json",
6118
6590
  "flag": "target-json",
6119
- "required": true,
6120
6591
  "schema": {
6121
6592
  "type": "object",
6122
6593
  "properties": {
@@ -6148,6 +6619,22 @@ export const CONTRACT = {
6148
6619
  "range"
6149
6620
  ]
6150
6621
  }
6622
+ },
6623
+ {
6624
+ "name": "blockId",
6625
+ "kind": "flag",
6626
+ "type": "string",
6627
+ "flag": "block-id"
6628
+ },
6629
+ {
6630
+ "name": "start",
6631
+ "kind": "flag",
6632
+ "type": "number"
6633
+ },
6634
+ {
6635
+ "name": "end",
6636
+ "kind": "flag",
6637
+ "type": "number"
6151
6638
  }
6152
6639
  ],
6153
6640
  "constraints": null,
@@ -6157,7 +6644,100 @@ export const CONTRACT = {
6157
6644
  "supportsDryRun": true,
6158
6645
  "inputSchema": {
6159
6646
  "additionalProperties": false,
6647
+ "allOf": [
6648
+ {
6649
+ "not": {
6650
+ "required": [
6651
+ "target",
6652
+ "blockId"
6653
+ ]
6654
+ }
6655
+ },
6656
+ {
6657
+ "not": {
6658
+ "required": [
6659
+ "target",
6660
+ "start"
6661
+ ]
6662
+ }
6663
+ },
6664
+ {
6665
+ "not": {
6666
+ "required": [
6667
+ "target",
6668
+ "end"
6669
+ ]
6670
+ }
6671
+ },
6672
+ {
6673
+ "if": {
6674
+ "required": [
6675
+ "start"
6676
+ ]
6677
+ },
6678
+ "then": {
6679
+ "required": [
6680
+ "blockId",
6681
+ "end"
6682
+ ]
6683
+ }
6684
+ },
6685
+ {
6686
+ "if": {
6687
+ "required": [
6688
+ "end"
6689
+ ]
6690
+ },
6691
+ "then": {
6692
+ "required": [
6693
+ "blockId",
6694
+ "start"
6695
+ ]
6696
+ }
6697
+ },
6698
+ {
6699
+ "if": {
6700
+ "required": [
6701
+ "blockId"
6702
+ ]
6703
+ },
6704
+ "then": {
6705
+ "required": [
6706
+ "start",
6707
+ "end"
6708
+ ]
6709
+ }
6710
+ }
6711
+ ],
6712
+ "anyOf": [
6713
+ {
6714
+ "required": [
6715
+ "target"
6716
+ ]
6717
+ },
6718
+ {
6719
+ "required": [
6720
+ "blockId",
6721
+ "start",
6722
+ "end"
6723
+ ]
6724
+ }
6725
+ ],
6160
6726
  "properties": {
6727
+ "blockId": {
6728
+ "description": "Block ID for block-relative range targeting.",
6729
+ "type": "string"
6730
+ },
6731
+ "end": {
6732
+ "description": "End offset within the block identified by blockId.",
6733
+ "minimum": 0,
6734
+ "type": "integer"
6735
+ },
6736
+ "start": {
6737
+ "description": "Start offset within the block identified by blockId.",
6738
+ "minimum": 0,
6739
+ "type": "integer"
6740
+ },
6161
6741
  "target": {
6162
6742
  "additionalProperties": false,
6163
6743
  "properties": {
@@ -6192,9 +6772,6 @@ export const CONTRACT = {
6192
6772
  "type": "object"
6193
6773
  }
6194
6774
  },
6195
- "required": [
6196
- "target"
6197
- ],
6198
6775
  "type": "object"
6199
6776
  },
6200
6777
  "outputSchema": {
@@ -7031,7 +7608,6 @@ export const CONTRACT = {
7031
7608
  "kind": "jsonFlag",
7032
7609
  "type": "json",
7033
7610
  "flag": "target-json",
7034
- "required": true,
7035
7611
  "schema": {
7036
7612
  "type": "object",
7037
7613
  "properties": {
@@ -7063,6 +7639,22 @@ export const CONTRACT = {
7063
7639
  "range"
7064
7640
  ]
7065
7641
  }
7642
+ },
7643
+ {
7644
+ "name": "blockId",
7645
+ "kind": "flag",
7646
+ "type": "string",
7647
+ "flag": "block-id"
7648
+ },
7649
+ {
7650
+ "name": "start",
7651
+ "kind": "flag",
7652
+ "type": "number"
7653
+ },
7654
+ {
7655
+ "name": "end",
7656
+ "kind": "flag",
7657
+ "type": "number"
7066
7658
  }
7067
7659
  ],
7068
7660
  "constraints": null,
@@ -7072,7 +7664,100 @@ export const CONTRACT = {
7072
7664
  "supportsDryRun": true,
7073
7665
  "inputSchema": {
7074
7666
  "additionalProperties": false,
7667
+ "allOf": [
7668
+ {
7669
+ "not": {
7670
+ "required": [
7671
+ "target",
7672
+ "blockId"
7673
+ ]
7674
+ }
7675
+ },
7676
+ {
7677
+ "not": {
7678
+ "required": [
7679
+ "target",
7680
+ "start"
7681
+ ]
7682
+ }
7683
+ },
7684
+ {
7685
+ "not": {
7686
+ "required": [
7687
+ "target",
7688
+ "end"
7689
+ ]
7690
+ }
7691
+ },
7692
+ {
7693
+ "if": {
7694
+ "required": [
7695
+ "start"
7696
+ ]
7697
+ },
7698
+ "then": {
7699
+ "required": [
7700
+ "blockId",
7701
+ "end"
7702
+ ]
7703
+ }
7704
+ },
7705
+ {
7706
+ "if": {
7707
+ "required": [
7708
+ "end"
7709
+ ]
7710
+ },
7711
+ "then": {
7712
+ "required": [
7713
+ "blockId",
7714
+ "start"
7715
+ ]
7716
+ }
7717
+ },
7718
+ {
7719
+ "if": {
7720
+ "required": [
7721
+ "blockId"
7722
+ ]
7723
+ },
7724
+ "then": {
7725
+ "required": [
7726
+ "start",
7727
+ "end"
7728
+ ]
7729
+ }
7730
+ }
7731
+ ],
7732
+ "anyOf": [
7733
+ {
7734
+ "required": [
7735
+ "target"
7736
+ ]
7737
+ },
7738
+ {
7739
+ "required": [
7740
+ "blockId",
7741
+ "start",
7742
+ "end"
7743
+ ]
7744
+ }
7745
+ ],
7075
7746
  "properties": {
7747
+ "blockId": {
7748
+ "description": "Block ID for block-relative range targeting.",
7749
+ "type": "string"
7750
+ },
7751
+ "end": {
7752
+ "description": "End offset within the block identified by blockId.",
7753
+ "minimum": 0,
7754
+ "type": "integer"
7755
+ },
7756
+ "start": {
7757
+ "description": "Start offset within the block identified by blockId.",
7758
+ "minimum": 0,
7759
+ "type": "integer"
7760
+ },
7076
7761
  "target": {
7077
7762
  "additionalProperties": false,
7078
7763
  "properties": {
@@ -7107,9 +7792,6 @@ export const CONTRACT = {
7107
7792
  "type": "object"
7108
7793
  }
7109
7794
  },
7110
- "required": [
7111
- "target"
7112
- ],
7113
7795
  "type": "object"
7114
7796
  },
7115
7797
  "outputSchema": {
@@ -7971,115 +8653,23 @@ export const CONTRACT = {
7971
8653
  ]
7972
8654
  },
7973
8655
  {
7974
- "type": "object",
7975
- "properties": {
7976
- "kind": {
7977
- "const": "before"
8656
+ "oneOf": [
8657
+ {
8658
+ "type": "json"
7978
8659
  },
7979
- "target": {
7980
- "type": "object",
7981
- "properties": {
7982
- "kind": {
7983
- "const": "block"
7984
- },
7985
- "nodeType": {
7986
- "oneOf": [
7987
- {
7988
- "const": "paragraph"
7989
- },
7990
- {
7991
- "const": "heading"
7992
- },
7993
- {
7994
- "const": "listItem"
7995
- },
7996
- {
7997
- "const": "table"
7998
- },
7999
- {
8000
- "const": "tableRow"
8001
- },
8002
- {
8003
- "const": "tableCell"
8004
- },
8005
- {
8006
- "const": "image"
8007
- },
8008
- {
8009
- "const": "sdt"
8010
- }
8011
- ]
8012
- },
8013
- "nodeId": {
8014
- "type": "string"
8015
- }
8016
- },
8017
- "required": [
8018
- "kind",
8019
- "nodeType",
8020
- "nodeId"
8021
- ]
8660
+ {
8661
+ "type": "json"
8022
8662
  }
8023
- },
8024
- "required": [
8025
- "kind",
8026
- "target"
8027
8663
  ]
8028
8664
  },
8029
8665
  {
8030
- "type": "object",
8031
- "properties": {
8032
- "kind": {
8033
- "const": "after"
8666
+ "oneOf": [
8667
+ {
8668
+ "type": "json"
8034
8669
  },
8035
- "target": {
8036
- "type": "object",
8037
- "properties": {
8038
- "kind": {
8039
- "const": "block"
8040
- },
8041
- "nodeType": {
8042
- "oneOf": [
8043
- {
8044
- "const": "paragraph"
8045
- },
8046
- {
8047
- "const": "heading"
8048
- },
8049
- {
8050
- "const": "listItem"
8051
- },
8052
- {
8053
- "const": "table"
8054
- },
8055
- {
8056
- "const": "tableRow"
8057
- },
8058
- {
8059
- "const": "tableCell"
8060
- },
8061
- {
8062
- "const": "image"
8063
- },
8064
- {
8065
- "const": "sdt"
8066
- }
8067
- ]
8068
- },
8069
- "nodeId": {
8070
- "type": "string"
8071
- }
8072
- },
8073
- "required": [
8074
- "kind",
8075
- "nodeType",
8076
- "nodeId"
8077
- ]
8670
+ {
8671
+ "type": "json"
8078
8672
  }
8079
- },
8080
- "required": [
8081
- "kind",
8082
- "target"
8083
8673
  ]
8084
8674
  }
8085
8675
  ]
@@ -8133,10 +8723,26 @@ export const CONTRACT = {
8133
8723
  },
8134
8724
  {
8135
8725
  "additionalProperties": false,
8726
+ "oneOf": [
8727
+ {
8728
+ "required": [
8729
+ "target"
8730
+ ]
8731
+ },
8732
+ {
8733
+ "required": [
8734
+ "nodeId"
8735
+ ]
8736
+ }
8737
+ ],
8136
8738
  "properties": {
8137
8739
  "kind": {
8138
8740
  "const": "before"
8139
8741
  },
8742
+ "nodeId": {
8743
+ "description": "Node ID shorthand — adapter resolves to a full BlockNodeAddress.",
8744
+ "type": "string"
8745
+ },
8140
8746
  "target": {
8141
8747
  "additionalProperties": false,
8142
8748
  "properties": {
@@ -8168,17 +8774,32 @@ export const CONTRACT = {
8168
8774
  }
8169
8775
  },
8170
8776
  "required": [
8171
- "kind",
8172
- "target"
8777
+ "kind"
8173
8778
  ],
8174
8779
  "type": "object"
8175
8780
  },
8176
8781
  {
8177
8782
  "additionalProperties": false,
8783
+ "oneOf": [
8784
+ {
8785
+ "required": [
8786
+ "target"
8787
+ ]
8788
+ },
8789
+ {
8790
+ "required": [
8791
+ "nodeId"
8792
+ ]
8793
+ }
8794
+ ],
8178
8795
  "properties": {
8179
8796
  "kind": {
8180
8797
  "const": "after"
8181
8798
  },
8799
+ "nodeId": {
8800
+ "description": "Node ID shorthand — adapter resolves to a full BlockNodeAddress.",
8801
+ "type": "string"
8802
+ },
8182
8803
  "target": {
8183
8804
  "additionalProperties": false,
8184
8805
  "properties": {
@@ -8210,8 +8831,7 @@ export const CONTRACT = {
8210
8831
  }
8211
8832
  },
8212
8833
  "required": [
8213
- "kind",
8214
- "target"
8834
+ "kind"
8215
8835
  ],
8216
8836
  "type": "object"
8217
8837
  }
@@ -8997,6 +9617,12 @@ export const CONTRACT = {
8997
9617
  ]
8998
9618
  }
8999
9619
  },
9620
+ {
9621
+ "name": "nodeId",
9622
+ "kind": "flag",
9623
+ "type": "string",
9624
+ "flag": "node-id"
9625
+ },
9000
9626
  {
9001
9627
  "name": "position",
9002
9628
  "kind": "flag",
@@ -9031,7 +9657,23 @@ export const CONTRACT = {
9031
9657
  "supportsDryRun": true,
9032
9658
  "inputSchema": {
9033
9659
  "additionalProperties": false,
9660
+ "oneOf": [
9661
+ {
9662
+ "required": [
9663
+ "target"
9664
+ ]
9665
+ },
9666
+ {
9667
+ "required": [
9668
+ "nodeId"
9669
+ ]
9670
+ }
9671
+ ],
9034
9672
  "properties": {
9673
+ "nodeId": {
9674
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
9675
+ "type": "string"
9676
+ },
9035
9677
  "position": {
9036
9678
  "enum": [
9037
9679
  "before",
@@ -9063,7 +9705,6 @@ export const CONTRACT = {
9063
9705
  }
9064
9706
  },
9065
9707
  "required": [
9066
- "target",
9067
9708
  "position"
9068
9709
  ],
9069
9710
  "type": "object"
@@ -9408,6 +10049,12 @@ export const CONTRACT = {
9408
10049
  ]
9409
10050
  }
9410
10051
  },
10052
+ {
10053
+ "name": "nodeId",
10054
+ "kind": "flag",
10055
+ "type": "string",
10056
+ "flag": "node-id"
10057
+ },
9411
10058
  {
9412
10059
  "name": "kind",
9413
10060
  "kind": "flag",
@@ -9437,6 +10084,18 @@ export const CONTRACT = {
9437
10084
  "supportsDryRun": true,
9438
10085
  "inputSchema": {
9439
10086
  "additionalProperties": false,
10087
+ "oneOf": [
10088
+ {
10089
+ "required": [
10090
+ "target"
10091
+ ]
10092
+ },
10093
+ {
10094
+ "required": [
10095
+ "nodeId"
10096
+ ]
10097
+ }
10098
+ ],
9440
10099
  "properties": {
9441
10100
  "kind": {
9442
10101
  "enum": [
@@ -9444,6 +10103,10 @@ export const CONTRACT = {
9444
10103
  "bullet"
9445
10104
  ]
9446
10105
  },
10106
+ "nodeId": {
10107
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10108
+ "type": "string"
10109
+ },
9447
10110
  "target": {
9448
10111
  "additionalProperties": false,
9449
10112
  "properties": {
@@ -9466,7 +10129,6 @@ export const CONTRACT = {
9466
10129
  }
9467
10130
  },
9468
10131
  "required": [
9469
- "target",
9470
10132
  "kind"
9471
10133
  ],
9472
10134
  "type": "object"
@@ -9699,6 +10361,12 @@ export const CONTRACT = {
9699
10361
  ]
9700
10362
  }
9701
10363
  },
10364
+ {
10365
+ "name": "nodeId",
10366
+ "kind": "flag",
10367
+ "type": "string",
10368
+ "flag": "node-id"
10369
+ },
9702
10370
  {
9703
10371
  "name": "input",
9704
10372
  "kind": "jsonFlag",
@@ -9713,7 +10381,23 @@ export const CONTRACT = {
9713
10381
  "supportsDryRun": true,
9714
10382
  "inputSchema": {
9715
10383
  "additionalProperties": false,
10384
+ "oneOf": [
10385
+ {
10386
+ "required": [
10387
+ "target"
10388
+ ]
10389
+ },
10390
+ {
10391
+ "required": [
10392
+ "nodeId"
10393
+ ]
10394
+ }
10395
+ ],
9716
10396
  "properties": {
10397
+ "nodeId": {
10398
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10399
+ "type": "string"
10400
+ },
9717
10401
  "target": {
9718
10402
  "additionalProperties": false,
9719
10403
  "properties": {
@@ -9735,9 +10419,6 @@ export const CONTRACT = {
9735
10419
  "type": "object"
9736
10420
  }
9737
10421
  },
9738
- "required": [
9739
- "target"
9740
- ],
9741
10422
  "type": "object"
9742
10423
  },
9743
10424
  "outputSchema": {
@@ -9968,6 +10649,12 @@ export const CONTRACT = {
9968
10649
  ]
9969
10650
  }
9970
10651
  },
10652
+ {
10653
+ "name": "nodeId",
10654
+ "kind": "flag",
10655
+ "type": "string",
10656
+ "flag": "node-id"
10657
+ },
9971
10658
  {
9972
10659
  "name": "input",
9973
10660
  "kind": "jsonFlag",
@@ -9982,7 +10669,23 @@ export const CONTRACT = {
9982
10669
  "supportsDryRun": true,
9983
10670
  "inputSchema": {
9984
10671
  "additionalProperties": false,
10672
+ "oneOf": [
10673
+ {
10674
+ "required": [
10675
+ "target"
10676
+ ]
10677
+ },
10678
+ {
10679
+ "required": [
10680
+ "nodeId"
10681
+ ]
10682
+ }
10683
+ ],
9985
10684
  "properties": {
10685
+ "nodeId": {
10686
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10687
+ "type": "string"
10688
+ },
9986
10689
  "target": {
9987
10690
  "additionalProperties": false,
9988
10691
  "properties": {
@@ -10004,9 +10707,6 @@ export const CONTRACT = {
10004
10707
  "type": "object"
10005
10708
  }
10006
10709
  },
10007
- "required": [
10008
- "target"
10009
- ],
10010
10710
  "type": "object"
10011
10711
  },
10012
10712
  "outputSchema": {
@@ -10237,6 +10937,12 @@ export const CONTRACT = {
10237
10937
  ]
10238
10938
  }
10239
10939
  },
10940
+ {
10941
+ "name": "nodeId",
10942
+ "kind": "flag",
10943
+ "type": "string",
10944
+ "flag": "node-id"
10945
+ },
10240
10946
  {
10241
10947
  "name": "input",
10242
10948
  "kind": "jsonFlag",
@@ -10251,7 +10957,23 @@ export const CONTRACT = {
10251
10957
  "supportsDryRun": true,
10252
10958
  "inputSchema": {
10253
10959
  "additionalProperties": false,
10960
+ "oneOf": [
10961
+ {
10962
+ "required": [
10963
+ "target"
10964
+ ]
10965
+ },
10966
+ {
10967
+ "required": [
10968
+ "nodeId"
10969
+ ]
10970
+ }
10971
+ ],
10254
10972
  "properties": {
10973
+ "nodeId": {
10974
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10975
+ "type": "string"
10976
+ },
10255
10977
  "target": {
10256
10978
  "additionalProperties": false,
10257
10979
  "properties": {
@@ -10273,9 +10995,6 @@ export const CONTRACT = {
10273
10995
  "type": "object"
10274
10996
  }
10275
10997
  },
10276
- "required": [
10277
- "target"
10278
- ],
10279
10998
  "type": "object"
10280
10999
  },
10281
11000
  "outputSchema": {
@@ -10506,6 +11225,12 @@ export const CONTRACT = {
10506
11225
  ]
10507
11226
  }
10508
11227
  },
11228
+ {
11229
+ "name": "nodeId",
11230
+ "kind": "flag",
11231
+ "type": "string",
11232
+ "flag": "node-id"
11233
+ },
10509
11234
  {
10510
11235
  "name": "input",
10511
11236
  "kind": "jsonFlag",
@@ -10520,7 +11245,23 @@ export const CONTRACT = {
10520
11245
  "supportsDryRun": true,
10521
11246
  "inputSchema": {
10522
11247
  "additionalProperties": false,
11248
+ "oneOf": [
11249
+ {
11250
+ "required": [
11251
+ "target"
11252
+ ]
11253
+ },
11254
+ {
11255
+ "required": [
11256
+ "nodeId"
11257
+ ]
11258
+ }
11259
+ ],
10523
11260
  "properties": {
11261
+ "nodeId": {
11262
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
11263
+ "type": "string"
11264
+ },
10524
11265
  "target": {
10525
11266
  "additionalProperties": false,
10526
11267
  "properties": {
@@ -10542,9 +11283,6 @@ export const CONTRACT = {
10542
11283
  "type": "object"
10543
11284
  }
10544
11285
  },
10545
- "required": [
10546
- "target"
10547
- ],
10548
11286
  "type": "object"
10549
11287
  },
10550
11288
  "outputSchema": {
@@ -10746,7 +11484,6 @@ export const CONTRACT = {
10746
11484
  "kind": "jsonFlag",
10747
11485
  "type": "json",
10748
11486
  "flag": "target-json",
10749
- "required": true,
10750
11487
  "schema": {
10751
11488
  "type": "object",
10752
11489
  "properties": {
@@ -10784,6 +11521,22 @@ export const CONTRACT = {
10784
11521
  "kind": "flag",
10785
11522
  "type": "string",
10786
11523
  "required": true
11524
+ },
11525
+ {
11526
+ "name": "blockId",
11527
+ "kind": "flag",
11528
+ "type": "string",
11529
+ "flag": "block-id"
11530
+ },
11531
+ {
11532
+ "name": "start",
11533
+ "kind": "flag",
11534
+ "type": "number"
11535
+ },
11536
+ {
11537
+ "name": "end",
11538
+ "kind": "flag",
11539
+ "type": "number"
10787
11540
  }
10788
11541
  ],
10789
11542
  "constraints": null,
@@ -10793,7 +11546,100 @@ export const CONTRACT = {
10793
11546
  "supportsDryRun": false,
10794
11547
  "inputSchema": {
10795
11548
  "additionalProperties": false,
11549
+ "allOf": [
11550
+ {
11551
+ "not": {
11552
+ "required": [
11553
+ "target",
11554
+ "blockId"
11555
+ ]
11556
+ }
11557
+ },
11558
+ {
11559
+ "not": {
11560
+ "required": [
11561
+ "target",
11562
+ "start"
11563
+ ]
11564
+ }
11565
+ },
11566
+ {
11567
+ "not": {
11568
+ "required": [
11569
+ "target",
11570
+ "end"
11571
+ ]
11572
+ }
11573
+ },
11574
+ {
11575
+ "if": {
11576
+ "required": [
11577
+ "start"
11578
+ ]
11579
+ },
11580
+ "then": {
11581
+ "required": [
11582
+ "blockId",
11583
+ "end"
11584
+ ]
11585
+ }
11586
+ },
11587
+ {
11588
+ "if": {
11589
+ "required": [
11590
+ "end"
11591
+ ]
11592
+ },
11593
+ "then": {
11594
+ "required": [
11595
+ "blockId",
11596
+ "start"
11597
+ ]
11598
+ }
11599
+ },
11600
+ {
11601
+ "if": {
11602
+ "required": [
11603
+ "blockId"
11604
+ ]
11605
+ },
11606
+ "then": {
11607
+ "required": [
11608
+ "start",
11609
+ "end"
11610
+ ]
11611
+ }
11612
+ }
11613
+ ],
11614
+ "anyOf": [
11615
+ {
11616
+ "required": [
11617
+ "target"
11618
+ ]
11619
+ },
11620
+ {
11621
+ "required": [
11622
+ "blockId",
11623
+ "start",
11624
+ "end"
11625
+ ]
11626
+ }
11627
+ ],
10796
11628
  "properties": {
11629
+ "blockId": {
11630
+ "description": "Block ID for block-relative range targeting.",
11631
+ "type": "string"
11632
+ },
11633
+ "end": {
11634
+ "description": "End offset within the block identified by blockId.",
11635
+ "minimum": 0,
11636
+ "type": "integer"
11637
+ },
11638
+ "start": {
11639
+ "description": "Start offset within the block identified by blockId.",
11640
+ "minimum": 0,
11641
+ "type": "integer"
11642
+ },
10797
11643
  "target": {
10798
11644
  "additionalProperties": false,
10799
11645
  "properties": {
@@ -10832,7 +11678,6 @@ export const CONTRACT = {
10832
11678
  }
10833
11679
  },
10834
11680
  "required": [
10835
- "target",
10836
11681
  "text"
10837
11682
  ],
10838
11683
  "type": "object"
@@ -12221,7 +13066,6 @@ export const CONTRACT = {
12221
13066
  "kind": "jsonFlag",
12222
13067
  "type": "json",
12223
13068
  "flag": "target-json",
12224
- "required": true,
12225
13069
  "schema": {
12226
13070
  "type": "object",
12227
13071
  "properties": {
@@ -12253,6 +13097,22 @@ export const CONTRACT = {
12253
13097
  "range"
12254
13098
  ]
12255
13099
  }
13100
+ },
13101
+ {
13102
+ "name": "blockId",
13103
+ "kind": "flag",
13104
+ "type": "string",
13105
+ "flag": "block-id"
13106
+ },
13107
+ {
13108
+ "name": "start",
13109
+ "kind": "flag",
13110
+ "type": "number"
13111
+ },
13112
+ {
13113
+ "name": "end",
13114
+ "kind": "flag",
13115
+ "type": "number"
12256
13116
  }
12257
13117
  ],
12258
13118
  "constraints": null,
@@ -12262,10 +13122,103 @@ export const CONTRACT = {
12262
13122
  "supportsDryRun": false,
12263
13123
  "inputSchema": {
12264
13124
  "additionalProperties": false,
13125
+ "allOf": [
13126
+ {
13127
+ "not": {
13128
+ "required": [
13129
+ "target",
13130
+ "blockId"
13131
+ ]
13132
+ }
13133
+ },
13134
+ {
13135
+ "not": {
13136
+ "required": [
13137
+ "target",
13138
+ "start"
13139
+ ]
13140
+ }
13141
+ },
13142
+ {
13143
+ "not": {
13144
+ "required": [
13145
+ "target",
13146
+ "end"
13147
+ ]
13148
+ }
13149
+ },
13150
+ {
13151
+ "if": {
13152
+ "required": [
13153
+ "start"
13154
+ ]
13155
+ },
13156
+ "then": {
13157
+ "required": [
13158
+ "blockId",
13159
+ "end"
13160
+ ]
13161
+ }
13162
+ },
13163
+ {
13164
+ "if": {
13165
+ "required": [
13166
+ "end"
13167
+ ]
13168
+ },
13169
+ "then": {
13170
+ "required": [
13171
+ "blockId",
13172
+ "start"
13173
+ ]
13174
+ }
13175
+ },
13176
+ {
13177
+ "if": {
13178
+ "required": [
13179
+ "blockId"
13180
+ ]
13181
+ },
13182
+ "then": {
13183
+ "required": [
13184
+ "start",
13185
+ "end"
13186
+ ]
13187
+ }
13188
+ }
13189
+ ],
13190
+ "anyOf": [
13191
+ {
13192
+ "required": [
13193
+ "target"
13194
+ ]
13195
+ },
13196
+ {
13197
+ "required": [
13198
+ "blockId",
13199
+ "start",
13200
+ "end"
13201
+ ]
13202
+ }
13203
+ ],
12265
13204
  "properties": {
13205
+ "blockId": {
13206
+ "description": "Block ID for block-relative range targeting.",
13207
+ "type": "string"
13208
+ },
12266
13209
  "commentId": {
12267
13210
  "type": "string"
12268
13211
  },
13212
+ "end": {
13213
+ "description": "End offset within the block identified by blockId.",
13214
+ "minimum": 0,
13215
+ "type": "integer"
13216
+ },
13217
+ "start": {
13218
+ "description": "Start offset within the block identified by blockId.",
13219
+ "minimum": 0,
13220
+ "type": "integer"
13221
+ },
12269
13222
  "target": {
12270
13223
  "additionalProperties": false,
12271
13224
  "properties": {
@@ -12301,8 +13254,7 @@ export const CONTRACT = {
12301
13254
  }
12302
13255
  },
12303
13256
  "required": [
12304
- "commentId",
12305
- "target"
13257
+ "commentId"
12306
13258
  ],
12307
13259
  "type": "object"
12308
13260
  },