@superdoc-dev/sdk 1.10.0-next.15 → 1.10.0-next.16

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.
@@ -91746,6 +91746,216 @@ export const CONTRACT = {
91746
91746
  "tracked",
91747
91747
  "dryRun"
91748
91748
  ]
91749
+ },
91750
+ "metadata.attach": {
91751
+ "type": "object",
91752
+ "properties": {
91753
+ "available": {
91754
+ "type": "boolean"
91755
+ },
91756
+ "tracked": {
91757
+ "type": "boolean"
91758
+ },
91759
+ "dryRun": {
91760
+ "type": "boolean"
91761
+ },
91762
+ "reasons": {
91763
+ "type": "array",
91764
+ "items": {
91765
+ "enum": [
91766
+ "COMMAND_UNAVAILABLE",
91767
+ "HELPER_UNAVAILABLE",
91768
+ "OPERATION_UNAVAILABLE",
91769
+ "TRACKED_MODE_UNAVAILABLE",
91770
+ "DRY_RUN_UNAVAILABLE",
91771
+ "NAMESPACE_UNAVAILABLE",
91772
+ "STYLES_PART_MISSING",
91773
+ "COLLABORATION_ACTIVE"
91774
+ ]
91775
+ }
91776
+ }
91777
+ },
91778
+ "additionalProperties": false,
91779
+ "required": [
91780
+ "available",
91781
+ "tracked",
91782
+ "dryRun"
91783
+ ]
91784
+ },
91785
+ "metadata.list": {
91786
+ "type": "object",
91787
+ "properties": {
91788
+ "available": {
91789
+ "type": "boolean"
91790
+ },
91791
+ "tracked": {
91792
+ "type": "boolean"
91793
+ },
91794
+ "dryRun": {
91795
+ "type": "boolean"
91796
+ },
91797
+ "reasons": {
91798
+ "type": "array",
91799
+ "items": {
91800
+ "enum": [
91801
+ "COMMAND_UNAVAILABLE",
91802
+ "HELPER_UNAVAILABLE",
91803
+ "OPERATION_UNAVAILABLE",
91804
+ "TRACKED_MODE_UNAVAILABLE",
91805
+ "DRY_RUN_UNAVAILABLE",
91806
+ "NAMESPACE_UNAVAILABLE",
91807
+ "STYLES_PART_MISSING",
91808
+ "COLLABORATION_ACTIVE"
91809
+ ]
91810
+ }
91811
+ }
91812
+ },
91813
+ "additionalProperties": false,
91814
+ "required": [
91815
+ "available",
91816
+ "tracked",
91817
+ "dryRun"
91818
+ ]
91819
+ },
91820
+ "metadata.get": {
91821
+ "type": "object",
91822
+ "properties": {
91823
+ "available": {
91824
+ "type": "boolean"
91825
+ },
91826
+ "tracked": {
91827
+ "type": "boolean"
91828
+ },
91829
+ "dryRun": {
91830
+ "type": "boolean"
91831
+ },
91832
+ "reasons": {
91833
+ "type": "array",
91834
+ "items": {
91835
+ "enum": [
91836
+ "COMMAND_UNAVAILABLE",
91837
+ "HELPER_UNAVAILABLE",
91838
+ "OPERATION_UNAVAILABLE",
91839
+ "TRACKED_MODE_UNAVAILABLE",
91840
+ "DRY_RUN_UNAVAILABLE",
91841
+ "NAMESPACE_UNAVAILABLE",
91842
+ "STYLES_PART_MISSING",
91843
+ "COLLABORATION_ACTIVE"
91844
+ ]
91845
+ }
91846
+ }
91847
+ },
91848
+ "additionalProperties": false,
91849
+ "required": [
91850
+ "available",
91851
+ "tracked",
91852
+ "dryRun"
91853
+ ]
91854
+ },
91855
+ "metadata.update": {
91856
+ "type": "object",
91857
+ "properties": {
91858
+ "available": {
91859
+ "type": "boolean"
91860
+ },
91861
+ "tracked": {
91862
+ "type": "boolean"
91863
+ },
91864
+ "dryRun": {
91865
+ "type": "boolean"
91866
+ },
91867
+ "reasons": {
91868
+ "type": "array",
91869
+ "items": {
91870
+ "enum": [
91871
+ "COMMAND_UNAVAILABLE",
91872
+ "HELPER_UNAVAILABLE",
91873
+ "OPERATION_UNAVAILABLE",
91874
+ "TRACKED_MODE_UNAVAILABLE",
91875
+ "DRY_RUN_UNAVAILABLE",
91876
+ "NAMESPACE_UNAVAILABLE",
91877
+ "STYLES_PART_MISSING",
91878
+ "COLLABORATION_ACTIVE"
91879
+ ]
91880
+ }
91881
+ }
91882
+ },
91883
+ "additionalProperties": false,
91884
+ "required": [
91885
+ "available",
91886
+ "tracked",
91887
+ "dryRun"
91888
+ ]
91889
+ },
91890
+ "metadata.remove": {
91891
+ "type": "object",
91892
+ "properties": {
91893
+ "available": {
91894
+ "type": "boolean"
91895
+ },
91896
+ "tracked": {
91897
+ "type": "boolean"
91898
+ },
91899
+ "dryRun": {
91900
+ "type": "boolean"
91901
+ },
91902
+ "reasons": {
91903
+ "type": "array",
91904
+ "items": {
91905
+ "enum": [
91906
+ "COMMAND_UNAVAILABLE",
91907
+ "HELPER_UNAVAILABLE",
91908
+ "OPERATION_UNAVAILABLE",
91909
+ "TRACKED_MODE_UNAVAILABLE",
91910
+ "DRY_RUN_UNAVAILABLE",
91911
+ "NAMESPACE_UNAVAILABLE",
91912
+ "STYLES_PART_MISSING",
91913
+ "COLLABORATION_ACTIVE"
91914
+ ]
91915
+ }
91916
+ }
91917
+ },
91918
+ "additionalProperties": false,
91919
+ "required": [
91920
+ "available",
91921
+ "tracked",
91922
+ "dryRun"
91923
+ ]
91924
+ },
91925
+ "metadata.resolve": {
91926
+ "type": "object",
91927
+ "properties": {
91928
+ "available": {
91929
+ "type": "boolean"
91930
+ },
91931
+ "tracked": {
91932
+ "type": "boolean"
91933
+ },
91934
+ "dryRun": {
91935
+ "type": "boolean"
91936
+ },
91937
+ "reasons": {
91938
+ "type": "array",
91939
+ "items": {
91940
+ "enum": [
91941
+ "COMMAND_UNAVAILABLE",
91942
+ "HELPER_UNAVAILABLE",
91943
+ "OPERATION_UNAVAILABLE",
91944
+ "TRACKED_MODE_UNAVAILABLE",
91945
+ "DRY_RUN_UNAVAILABLE",
91946
+ "NAMESPACE_UNAVAILABLE",
91947
+ "STYLES_PART_MISSING",
91948
+ "COLLABORATION_ACTIVE"
91949
+ ]
91950
+ }
91951
+ }
91952
+ },
91953
+ "additionalProperties": false,
91954
+ "required": [
91955
+ "available",
91956
+ "tracked",
91957
+ "dryRun"
91958
+ ]
91749
91959
  }
91750
91960
  },
91751
91961
  "additionalProperties": false,
@@ -92146,7 +92356,13 @@ export const CONTRACT = {
92146
92356
  "customXml.parts.get",
92147
92357
  "customXml.parts.create",
92148
92358
  "customXml.parts.patch",
92149
- "customXml.parts.remove"
92359
+ "customXml.parts.remove",
92360
+ "metadata.attach",
92361
+ "metadata.list",
92362
+ "metadata.get",
92363
+ "metadata.update",
92364
+ "metadata.remove",
92365
+ "metadata.resolve"
92150
92366
  ]
92151
92367
  },
92152
92368
  "planEngine": {
@@ -154115,6 +154331,1210 @@ export const CONTRACT = {
154115
154331
  ]
154116
154332
  }
154117
154333
  },
154334
+ "doc.metadata.attach": {
154335
+ "operationId": "doc.metadata.attach",
154336
+ "sdkSurface": "document",
154337
+ "command": "metadata attach",
154338
+ "commandTokens": [
154339
+ "metadata",
154340
+ "attach"
154341
+ ],
154342
+ "category": "core",
154343
+ "description": "Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only.",
154344
+ "requiresDocumentContext": true,
154345
+ "docRequirement": "optional",
154346
+ "responseEnvelopeKey": null,
154347
+ "params": [
154348
+ {
154349
+ "name": "doc",
154350
+ "kind": "doc",
154351
+ "type": "string",
154352
+ "description": "Document path. Optional when a session is already open."
154353
+ },
154354
+ {
154355
+ "name": "sessionId",
154356
+ "kind": "flag",
154357
+ "type": "string",
154358
+ "flag": "session",
154359
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
154360
+ },
154361
+ {
154362
+ "name": "out",
154363
+ "kind": "flag",
154364
+ "type": "string",
154365
+ "agentVisible": false
154366
+ },
154367
+ {
154368
+ "name": "force",
154369
+ "kind": "flag",
154370
+ "type": "boolean",
154371
+ "description": "Bypass confirmation checks."
154372
+ },
154373
+ {
154374
+ "name": "expectedRevision",
154375
+ "kind": "flag",
154376
+ "type": "number",
154377
+ "flag": "expected-revision",
154378
+ "agentVisible": false
154379
+ },
154380
+ {
154381
+ "name": "changeMode",
154382
+ "kind": "flag",
154383
+ "type": "string",
154384
+ "flag": "change-mode",
154385
+ "schema": {
154386
+ "enum": [
154387
+ "direct",
154388
+ "tracked"
154389
+ ]
154390
+ },
154391
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
154392
+ },
154393
+ {
154394
+ "name": "dryRun",
154395
+ "kind": "flag",
154396
+ "type": "boolean",
154397
+ "flag": "dry-run",
154398
+ "description": "Preview the result without applying changes."
154399
+ },
154400
+ {
154401
+ "name": "target",
154402
+ "kind": "jsonFlag",
154403
+ "type": "json",
154404
+ "flag": "target-json",
154405
+ "required": true,
154406
+ "schema": {
154407
+ "type": "object",
154408
+ "properties": {
154409
+ "kind": {
154410
+ "const": "selection"
154411
+ },
154412
+ "start": {
154413
+ "oneOf": [
154414
+ {
154415
+ "type": "object",
154416
+ "properties": {
154417
+ "kind": {
154418
+ "const": "text"
154419
+ },
154420
+ "blockId": {
154421
+ "type": "string"
154422
+ },
154423
+ "offset": {
154424
+ "type": "number"
154425
+ }
154426
+ },
154427
+ "required": [
154428
+ "kind",
154429
+ "blockId",
154430
+ "offset"
154431
+ ]
154432
+ },
154433
+ {
154434
+ "type": "object",
154435
+ "properties": {
154436
+ "kind": {
154437
+ "const": "nodeEdge"
154438
+ },
154439
+ "node": {
154440
+ "type": "object",
154441
+ "properties": {
154442
+ "kind": {
154443
+ "const": "block"
154444
+ },
154445
+ "nodeType": {
154446
+ "oneOf": [
154447
+ {
154448
+ "const": "paragraph"
154449
+ },
154450
+ {
154451
+ "const": "heading"
154452
+ },
154453
+ {
154454
+ "const": "table"
154455
+ },
154456
+ {
154457
+ "const": "tableOfContents"
154458
+ },
154459
+ {
154460
+ "const": "sdt"
154461
+ },
154462
+ {
154463
+ "const": "image"
154464
+ }
154465
+ ]
154466
+ },
154467
+ "nodeId": {
154468
+ "type": "string"
154469
+ }
154470
+ },
154471
+ "required": [
154472
+ "kind",
154473
+ "nodeType",
154474
+ "nodeId"
154475
+ ]
154476
+ },
154477
+ "edge": {
154478
+ "oneOf": [
154479
+ {
154480
+ "const": "before"
154481
+ },
154482
+ {
154483
+ "const": "after"
154484
+ }
154485
+ ]
154486
+ }
154487
+ },
154488
+ "required": [
154489
+ "kind",
154490
+ "node",
154491
+ "edge"
154492
+ ]
154493
+ }
154494
+ ],
154495
+ "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."
154496
+ },
154497
+ "end": {
154498
+ "oneOf": [
154499
+ {
154500
+ "type": "object",
154501
+ "properties": {
154502
+ "kind": {
154503
+ "const": "text"
154504
+ },
154505
+ "blockId": {
154506
+ "type": "string"
154507
+ },
154508
+ "offset": {
154509
+ "type": "number"
154510
+ }
154511
+ },
154512
+ "required": [
154513
+ "kind",
154514
+ "blockId",
154515
+ "offset"
154516
+ ]
154517
+ },
154518
+ {
154519
+ "type": "object",
154520
+ "properties": {
154521
+ "kind": {
154522
+ "const": "nodeEdge"
154523
+ },
154524
+ "node": {
154525
+ "type": "object",
154526
+ "properties": {
154527
+ "kind": {
154528
+ "const": "block"
154529
+ },
154530
+ "nodeType": {
154531
+ "oneOf": [
154532
+ {
154533
+ "const": "paragraph"
154534
+ },
154535
+ {
154536
+ "const": "heading"
154537
+ },
154538
+ {
154539
+ "const": "table"
154540
+ },
154541
+ {
154542
+ "const": "tableOfContents"
154543
+ },
154544
+ {
154545
+ "const": "sdt"
154546
+ },
154547
+ {
154548
+ "const": "image"
154549
+ }
154550
+ ]
154551
+ },
154552
+ "nodeId": {
154553
+ "type": "string"
154554
+ }
154555
+ },
154556
+ "required": [
154557
+ "kind",
154558
+ "nodeType",
154559
+ "nodeId"
154560
+ ]
154561
+ },
154562
+ "edge": {
154563
+ "oneOf": [
154564
+ {
154565
+ "const": "before"
154566
+ },
154567
+ {
154568
+ "const": "after"
154569
+ }
154570
+ ]
154571
+ }
154572
+ },
154573
+ "required": [
154574
+ "kind",
154575
+ "node",
154576
+ "edge"
154577
+ ]
154578
+ }
154579
+ ],
154580
+ "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."
154581
+ }
154582
+ },
154583
+ "required": [
154584
+ "kind",
154585
+ "start",
154586
+ "end"
154587
+ ]
154588
+ }
154589
+ },
154590
+ {
154591
+ "name": "namespace",
154592
+ "kind": "flag",
154593
+ "type": "string",
154594
+ "required": true
154595
+ },
154596
+ {
154597
+ "name": "payload",
154598
+ "kind": "jsonFlag",
154599
+ "type": "json",
154600
+ "flag": "payload-json",
154601
+ "required": true,
154602
+ "schema": {
154603
+ "type": "json"
154604
+ }
154605
+ },
154606
+ {
154607
+ "name": "id",
154608
+ "kind": "flag",
154609
+ "type": "string"
154610
+ }
154611
+ ],
154612
+ "constraints": null,
154613
+ "mutates": true,
154614
+ "idempotency": "non-idempotent",
154615
+ "supportsTrackedMode": false,
154616
+ "supportsDryRun": true,
154617
+ "inputSchema": {
154618
+ "type": "object",
154619
+ "properties": {
154620
+ "target": {
154621
+ "$ref": "#/$defs/SelectionTarget"
154622
+ },
154623
+ "namespace": {
154624
+ "type": "string",
154625
+ "minLength": 1
154626
+ },
154627
+ "payload": {},
154628
+ "id": {
154629
+ "type": "string",
154630
+ "minLength": 1
154631
+ }
154632
+ },
154633
+ "additionalProperties": false,
154634
+ "required": [
154635
+ "target",
154636
+ "namespace",
154637
+ "payload"
154638
+ ]
154639
+ },
154640
+ "outputSchema": {
154641
+ "oneOf": [
154642
+ {
154643
+ "type": "object",
154644
+ "properties": {
154645
+ "success": {
154646
+ "const": true
154647
+ },
154648
+ "id": {
154649
+ "type": "string",
154650
+ "minLength": 1
154651
+ },
154652
+ "namespace": {
154653
+ "type": "string",
154654
+ "minLength": 1
154655
+ },
154656
+ "partName": {
154657
+ "type": "string",
154658
+ "minLength": 1
154659
+ }
154660
+ },
154661
+ "additionalProperties": false,
154662
+ "required": [
154663
+ "success",
154664
+ "id",
154665
+ "namespace",
154666
+ "partName"
154667
+ ]
154668
+ },
154669
+ {
154670
+ "type": "object",
154671
+ "properties": {
154672
+ "success": {
154673
+ "const": false
154674
+ },
154675
+ "failure": {
154676
+ "type": "object",
154677
+ "properties": {
154678
+ "code": {
154679
+ "type": "string"
154680
+ },
154681
+ "message": {
154682
+ "type": "string"
154683
+ },
154684
+ "details": {}
154685
+ },
154686
+ "additionalProperties": false,
154687
+ "required": [
154688
+ "code",
154689
+ "message"
154690
+ ]
154691
+ }
154692
+ },
154693
+ "additionalProperties": false,
154694
+ "required": [
154695
+ "success",
154696
+ "failure"
154697
+ ]
154698
+ }
154699
+ ]
154700
+ },
154701
+ "successSchema": {
154702
+ "type": "object",
154703
+ "properties": {
154704
+ "success": {
154705
+ "const": true
154706
+ },
154707
+ "id": {
154708
+ "type": "string",
154709
+ "minLength": 1
154710
+ },
154711
+ "namespace": {
154712
+ "type": "string",
154713
+ "minLength": 1
154714
+ },
154715
+ "partName": {
154716
+ "type": "string",
154717
+ "minLength": 1
154718
+ }
154719
+ },
154720
+ "additionalProperties": false,
154721
+ "required": [
154722
+ "success",
154723
+ "id",
154724
+ "namespace",
154725
+ "partName"
154726
+ ]
154727
+ },
154728
+ "failureSchema": {
154729
+ "type": "object",
154730
+ "properties": {
154731
+ "success": {
154732
+ "const": false
154733
+ },
154734
+ "failure": {
154735
+ "type": "object",
154736
+ "properties": {
154737
+ "code": {
154738
+ "type": "string"
154739
+ },
154740
+ "message": {
154741
+ "type": "string"
154742
+ },
154743
+ "details": {}
154744
+ },
154745
+ "additionalProperties": false,
154746
+ "required": [
154747
+ "code",
154748
+ "message"
154749
+ ]
154750
+ }
154751
+ },
154752
+ "additionalProperties": false,
154753
+ "required": [
154754
+ "success",
154755
+ "failure"
154756
+ ]
154757
+ }
154758
+ },
154759
+ "doc.metadata.list": {
154760
+ "operationId": "doc.metadata.list",
154761
+ "sdkSurface": "document",
154762
+ "command": "metadata list",
154763
+ "commandTokens": [
154764
+ "metadata",
154765
+ "list"
154766
+ ],
154767
+ "category": "core",
154768
+ "description": "List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a `within` selection (returns only entries whose anchor overlaps `within`).",
154769
+ "requiresDocumentContext": true,
154770
+ "docRequirement": "optional",
154771
+ "responseEnvelopeKey": null,
154772
+ "params": [
154773
+ {
154774
+ "name": "doc",
154775
+ "kind": "doc",
154776
+ "type": "string",
154777
+ "description": "Document path. Optional when a session is already open."
154778
+ },
154779
+ {
154780
+ "name": "sessionId",
154781
+ "kind": "flag",
154782
+ "type": "string",
154783
+ "flag": "session",
154784
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
154785
+ },
154786
+ {
154787
+ "name": "limit",
154788
+ "kind": "flag",
154789
+ "type": "number"
154790
+ },
154791
+ {
154792
+ "name": "offset",
154793
+ "kind": "flag",
154794
+ "type": "number"
154795
+ },
154796
+ {
154797
+ "name": "namespace",
154798
+ "kind": "flag",
154799
+ "type": "string"
154800
+ },
154801
+ {
154802
+ "name": "within",
154803
+ "kind": "jsonFlag",
154804
+ "type": "json",
154805
+ "flag": "within-json",
154806
+ "schema": {
154807
+ "type": "object",
154808
+ "properties": {
154809
+ "kind": {
154810
+ "const": "selection"
154811
+ },
154812
+ "start": {
154813
+ "oneOf": [
154814
+ {
154815
+ "type": "object",
154816
+ "properties": {
154817
+ "kind": {
154818
+ "const": "text"
154819
+ },
154820
+ "blockId": {
154821
+ "type": "string"
154822
+ },
154823
+ "offset": {
154824
+ "type": "number"
154825
+ }
154826
+ },
154827
+ "required": [
154828
+ "kind",
154829
+ "blockId",
154830
+ "offset"
154831
+ ]
154832
+ },
154833
+ {
154834
+ "type": "object",
154835
+ "properties": {
154836
+ "kind": {
154837
+ "const": "nodeEdge"
154838
+ },
154839
+ "node": {
154840
+ "type": "object",
154841
+ "properties": {
154842
+ "kind": {
154843
+ "const": "block"
154844
+ },
154845
+ "nodeType": {
154846
+ "oneOf": [
154847
+ {
154848
+ "const": "paragraph"
154849
+ },
154850
+ {
154851
+ "const": "heading"
154852
+ },
154853
+ {
154854
+ "const": "table"
154855
+ },
154856
+ {
154857
+ "const": "tableOfContents"
154858
+ },
154859
+ {
154860
+ "const": "sdt"
154861
+ },
154862
+ {
154863
+ "const": "image"
154864
+ }
154865
+ ]
154866
+ },
154867
+ "nodeId": {
154868
+ "type": "string"
154869
+ }
154870
+ },
154871
+ "required": [
154872
+ "kind",
154873
+ "nodeType",
154874
+ "nodeId"
154875
+ ]
154876
+ },
154877
+ "edge": {
154878
+ "oneOf": [
154879
+ {
154880
+ "const": "before"
154881
+ },
154882
+ {
154883
+ "const": "after"
154884
+ }
154885
+ ]
154886
+ }
154887
+ },
154888
+ "required": [
154889
+ "kind",
154890
+ "node",
154891
+ "edge"
154892
+ ]
154893
+ }
154894
+ ],
154895
+ "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."
154896
+ },
154897
+ "end": {
154898
+ "oneOf": [
154899
+ {
154900
+ "type": "object",
154901
+ "properties": {
154902
+ "kind": {
154903
+ "const": "text"
154904
+ },
154905
+ "blockId": {
154906
+ "type": "string"
154907
+ },
154908
+ "offset": {
154909
+ "type": "number"
154910
+ }
154911
+ },
154912
+ "required": [
154913
+ "kind",
154914
+ "blockId",
154915
+ "offset"
154916
+ ]
154917
+ },
154918
+ {
154919
+ "type": "object",
154920
+ "properties": {
154921
+ "kind": {
154922
+ "const": "nodeEdge"
154923
+ },
154924
+ "node": {
154925
+ "type": "object",
154926
+ "properties": {
154927
+ "kind": {
154928
+ "const": "block"
154929
+ },
154930
+ "nodeType": {
154931
+ "oneOf": [
154932
+ {
154933
+ "const": "paragraph"
154934
+ },
154935
+ {
154936
+ "const": "heading"
154937
+ },
154938
+ {
154939
+ "const": "table"
154940
+ },
154941
+ {
154942
+ "const": "tableOfContents"
154943
+ },
154944
+ {
154945
+ "const": "sdt"
154946
+ },
154947
+ {
154948
+ "const": "image"
154949
+ }
154950
+ ]
154951
+ },
154952
+ "nodeId": {
154953
+ "type": "string"
154954
+ }
154955
+ },
154956
+ "required": [
154957
+ "kind",
154958
+ "nodeType",
154959
+ "nodeId"
154960
+ ]
154961
+ },
154962
+ "edge": {
154963
+ "oneOf": [
154964
+ {
154965
+ "const": "before"
154966
+ },
154967
+ {
154968
+ "const": "after"
154969
+ }
154970
+ ]
154971
+ }
154972
+ },
154973
+ "required": [
154974
+ "kind",
154975
+ "node",
154976
+ "edge"
154977
+ ]
154978
+ }
154979
+ ],
154980
+ "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."
154981
+ }
154982
+ },
154983
+ "required": [
154984
+ "kind",
154985
+ "start",
154986
+ "end"
154987
+ ]
154988
+ }
154989
+ }
154990
+ ],
154991
+ "constraints": null,
154992
+ "mutates": false,
154993
+ "idempotency": "idempotent",
154994
+ "supportsTrackedMode": false,
154995
+ "supportsDryRun": false,
154996
+ "inputSchema": {
154997
+ "type": "object",
154998
+ "properties": {
154999
+ "limit": {
155000
+ "type": "integer",
155001
+ "minimum": 1
155002
+ },
155003
+ "offset": {
155004
+ "type": "integer",
155005
+ "minimum": 0
155006
+ },
155007
+ "namespace": {
155008
+ "type": "string"
155009
+ },
155010
+ "within": {
155011
+ "$ref": "#/$defs/SelectionTarget"
155012
+ }
155013
+ },
155014
+ "additionalProperties": false
155015
+ },
155016
+ "outputSchema": {
155017
+ "type": "object"
155018
+ }
155019
+ },
155020
+ "doc.metadata.get": {
155021
+ "operationId": "doc.metadata.get",
155022
+ "sdkSurface": "document",
155023
+ "command": "metadata get",
155024
+ "commandTokens": [
155025
+ "metadata",
155026
+ "get"
155027
+ ],
155028
+ "category": "core",
155029
+ "description": "Get a single anchored-metadata entry by id, including its JSON payload.",
155030
+ "requiresDocumentContext": true,
155031
+ "docRequirement": "optional",
155032
+ "responseEnvelopeKey": null,
155033
+ "params": [
155034
+ {
155035
+ "name": "doc",
155036
+ "kind": "doc",
155037
+ "type": "string",
155038
+ "description": "Document path. Optional when a session is already open."
155039
+ },
155040
+ {
155041
+ "name": "sessionId",
155042
+ "kind": "flag",
155043
+ "type": "string",
155044
+ "flag": "session",
155045
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
155046
+ },
155047
+ {
155048
+ "name": "id",
155049
+ "kind": "flag",
155050
+ "type": "string",
155051
+ "required": true
155052
+ }
155053
+ ],
155054
+ "constraints": null,
155055
+ "mutates": false,
155056
+ "idempotency": "idempotent",
155057
+ "supportsTrackedMode": false,
155058
+ "supportsDryRun": false,
155059
+ "inputSchema": {
155060
+ "type": "object",
155061
+ "properties": {
155062
+ "id": {
155063
+ "type": "string",
155064
+ "minLength": 1
155065
+ }
155066
+ },
155067
+ "additionalProperties": false,
155068
+ "required": [
155069
+ "id"
155070
+ ]
155071
+ },
155072
+ "outputSchema": {
155073
+ "oneOf": [
155074
+ {
155075
+ "type": "object"
155076
+ },
155077
+ {
155078
+ "type": "null"
155079
+ }
155080
+ ]
155081
+ }
155082
+ },
155083
+ "doc.metadata.update": {
155084
+ "operationId": "doc.metadata.update",
155085
+ "sdkSurface": "document",
155086
+ "command": "metadata update",
155087
+ "commandTokens": [
155088
+ "metadata",
155089
+ "update"
155090
+ ],
155091
+ "category": "core",
155092
+ "description": "Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched.",
155093
+ "requiresDocumentContext": true,
155094
+ "docRequirement": "optional",
155095
+ "responseEnvelopeKey": null,
155096
+ "params": [
155097
+ {
155098
+ "name": "doc",
155099
+ "kind": "doc",
155100
+ "type": "string",
155101
+ "description": "Document path. Optional when a session is already open."
155102
+ },
155103
+ {
155104
+ "name": "sessionId",
155105
+ "kind": "flag",
155106
+ "type": "string",
155107
+ "flag": "session",
155108
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
155109
+ },
155110
+ {
155111
+ "name": "out",
155112
+ "kind": "flag",
155113
+ "type": "string",
155114
+ "agentVisible": false
155115
+ },
155116
+ {
155117
+ "name": "force",
155118
+ "kind": "flag",
155119
+ "type": "boolean",
155120
+ "description": "Bypass confirmation checks."
155121
+ },
155122
+ {
155123
+ "name": "expectedRevision",
155124
+ "kind": "flag",
155125
+ "type": "number",
155126
+ "flag": "expected-revision",
155127
+ "agentVisible": false
155128
+ },
155129
+ {
155130
+ "name": "changeMode",
155131
+ "kind": "flag",
155132
+ "type": "string",
155133
+ "flag": "change-mode",
155134
+ "schema": {
155135
+ "enum": [
155136
+ "direct",
155137
+ "tracked"
155138
+ ]
155139
+ },
155140
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
155141
+ },
155142
+ {
155143
+ "name": "dryRun",
155144
+ "kind": "flag",
155145
+ "type": "boolean",
155146
+ "flag": "dry-run",
155147
+ "description": "Preview the result without applying changes."
155148
+ },
155149
+ {
155150
+ "name": "id",
155151
+ "kind": "flag",
155152
+ "type": "string",
155153
+ "required": true
155154
+ },
155155
+ {
155156
+ "name": "payload",
155157
+ "kind": "jsonFlag",
155158
+ "type": "json",
155159
+ "flag": "payload-json",
155160
+ "required": true,
155161
+ "schema": {
155162
+ "type": "json"
155163
+ }
155164
+ }
155165
+ ],
155166
+ "constraints": null,
155167
+ "mutates": true,
155168
+ "idempotency": "idempotent",
155169
+ "supportsTrackedMode": false,
155170
+ "supportsDryRun": true,
155171
+ "inputSchema": {
155172
+ "type": "object",
155173
+ "properties": {
155174
+ "id": {
155175
+ "type": "string",
155176
+ "minLength": 1
155177
+ },
155178
+ "payload": {}
155179
+ },
155180
+ "additionalProperties": false,
155181
+ "required": [
155182
+ "id",
155183
+ "payload"
155184
+ ]
155185
+ },
155186
+ "outputSchema": {
155187
+ "oneOf": [
155188
+ {
155189
+ "type": "object",
155190
+ "properties": {
155191
+ "success": {
155192
+ "const": true
155193
+ },
155194
+ "id": {
155195
+ "type": "string",
155196
+ "minLength": 1
155197
+ }
155198
+ },
155199
+ "additionalProperties": false,
155200
+ "required": [
155201
+ "success",
155202
+ "id"
155203
+ ]
155204
+ },
155205
+ {
155206
+ "type": "object",
155207
+ "properties": {
155208
+ "success": {
155209
+ "const": false
155210
+ },
155211
+ "failure": {
155212
+ "type": "object",
155213
+ "properties": {
155214
+ "code": {
155215
+ "type": "string"
155216
+ },
155217
+ "message": {
155218
+ "type": "string"
155219
+ },
155220
+ "details": {}
155221
+ },
155222
+ "additionalProperties": false,
155223
+ "required": [
155224
+ "code",
155225
+ "message"
155226
+ ]
155227
+ }
155228
+ },
155229
+ "additionalProperties": false,
155230
+ "required": [
155231
+ "success",
155232
+ "failure"
155233
+ ]
155234
+ }
155235
+ ]
155236
+ },
155237
+ "successSchema": {
155238
+ "type": "object",
155239
+ "properties": {
155240
+ "success": {
155241
+ "const": true
155242
+ },
155243
+ "id": {
155244
+ "type": "string",
155245
+ "minLength": 1
155246
+ }
155247
+ },
155248
+ "additionalProperties": false,
155249
+ "required": [
155250
+ "success",
155251
+ "id"
155252
+ ]
155253
+ },
155254
+ "failureSchema": {
155255
+ "type": "object",
155256
+ "properties": {
155257
+ "success": {
155258
+ "const": false
155259
+ },
155260
+ "failure": {
155261
+ "type": "object",
155262
+ "properties": {
155263
+ "code": {
155264
+ "type": "string"
155265
+ },
155266
+ "message": {
155267
+ "type": "string"
155268
+ },
155269
+ "details": {}
155270
+ },
155271
+ "additionalProperties": false,
155272
+ "required": [
155273
+ "code",
155274
+ "message"
155275
+ ]
155276
+ }
155277
+ },
155278
+ "additionalProperties": false,
155279
+ "required": [
155280
+ "success",
155281
+ "failure"
155282
+ ]
155283
+ }
155284
+ },
155285
+ "doc.metadata.remove": {
155286
+ "operationId": "doc.metadata.remove",
155287
+ "sdkSurface": "document",
155288
+ "command": "metadata remove",
155289
+ "commandTokens": [
155290
+ "metadata",
155291
+ "remove"
155292
+ ],
155293
+ "category": "core",
155294
+ "description": "Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed.",
155295
+ "requiresDocumentContext": true,
155296
+ "docRequirement": "optional",
155297
+ "responseEnvelopeKey": null,
155298
+ "params": [
155299
+ {
155300
+ "name": "doc",
155301
+ "kind": "doc",
155302
+ "type": "string",
155303
+ "description": "Document path. Optional when a session is already open."
155304
+ },
155305
+ {
155306
+ "name": "sessionId",
155307
+ "kind": "flag",
155308
+ "type": "string",
155309
+ "flag": "session",
155310
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
155311
+ },
155312
+ {
155313
+ "name": "out",
155314
+ "kind": "flag",
155315
+ "type": "string",
155316
+ "agentVisible": false
155317
+ },
155318
+ {
155319
+ "name": "force",
155320
+ "kind": "flag",
155321
+ "type": "boolean",
155322
+ "description": "Bypass confirmation checks."
155323
+ },
155324
+ {
155325
+ "name": "expectedRevision",
155326
+ "kind": "flag",
155327
+ "type": "number",
155328
+ "flag": "expected-revision",
155329
+ "agentVisible": false
155330
+ },
155331
+ {
155332
+ "name": "changeMode",
155333
+ "kind": "flag",
155334
+ "type": "string",
155335
+ "flag": "change-mode",
155336
+ "schema": {
155337
+ "enum": [
155338
+ "direct",
155339
+ "tracked"
155340
+ ]
155341
+ },
155342
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
155343
+ },
155344
+ {
155345
+ "name": "dryRun",
155346
+ "kind": "flag",
155347
+ "type": "boolean",
155348
+ "flag": "dry-run",
155349
+ "description": "Preview the result without applying changes."
155350
+ },
155351
+ {
155352
+ "name": "id",
155353
+ "kind": "flag",
155354
+ "type": "string",
155355
+ "required": true
155356
+ }
155357
+ ],
155358
+ "constraints": null,
155359
+ "mutates": true,
155360
+ "idempotency": "non-idempotent",
155361
+ "supportsTrackedMode": false,
155362
+ "supportsDryRun": true,
155363
+ "inputSchema": {
155364
+ "type": "object",
155365
+ "properties": {
155366
+ "id": {
155367
+ "type": "string",
155368
+ "minLength": 1
155369
+ }
155370
+ },
155371
+ "additionalProperties": false,
155372
+ "required": [
155373
+ "id"
155374
+ ]
155375
+ },
155376
+ "outputSchema": {
155377
+ "oneOf": [
155378
+ {
155379
+ "type": "object",
155380
+ "properties": {
155381
+ "success": {
155382
+ "const": true
155383
+ },
155384
+ "id": {
155385
+ "type": "string",
155386
+ "minLength": 1
155387
+ }
155388
+ },
155389
+ "additionalProperties": false,
155390
+ "required": [
155391
+ "success",
155392
+ "id"
155393
+ ]
155394
+ },
155395
+ {
155396
+ "type": "object",
155397
+ "properties": {
155398
+ "success": {
155399
+ "const": false
155400
+ },
155401
+ "failure": {
155402
+ "type": "object",
155403
+ "properties": {
155404
+ "code": {
155405
+ "type": "string"
155406
+ },
155407
+ "message": {
155408
+ "type": "string"
155409
+ },
155410
+ "details": {}
155411
+ },
155412
+ "additionalProperties": false,
155413
+ "required": [
155414
+ "code",
155415
+ "message"
155416
+ ]
155417
+ }
155418
+ },
155419
+ "additionalProperties": false,
155420
+ "required": [
155421
+ "success",
155422
+ "failure"
155423
+ ]
155424
+ }
155425
+ ]
155426
+ },
155427
+ "successSchema": {
155428
+ "type": "object",
155429
+ "properties": {
155430
+ "success": {
155431
+ "const": true
155432
+ },
155433
+ "id": {
155434
+ "type": "string",
155435
+ "minLength": 1
155436
+ }
155437
+ },
155438
+ "additionalProperties": false,
155439
+ "required": [
155440
+ "success",
155441
+ "id"
155442
+ ]
155443
+ },
155444
+ "failureSchema": {
155445
+ "type": "object",
155446
+ "properties": {
155447
+ "success": {
155448
+ "const": false
155449
+ },
155450
+ "failure": {
155451
+ "type": "object",
155452
+ "properties": {
155453
+ "code": {
155454
+ "type": "string"
155455
+ },
155456
+ "message": {
155457
+ "type": "string"
155458
+ },
155459
+ "details": {}
155460
+ },
155461
+ "additionalProperties": false,
155462
+ "required": [
155463
+ "code",
155464
+ "message"
155465
+ ]
155466
+ }
155467
+ },
155468
+ "additionalProperties": false,
155469
+ "required": [
155470
+ "success",
155471
+ "failure"
155472
+ ]
155473
+ }
155474
+ },
155475
+ "doc.metadata.resolve": {
155476
+ "operationId": "doc.metadata.resolve",
155477
+ "sdkSurface": "document",
155478
+ "command": "metadata resolve",
155479
+ "commandTokens": [
155480
+ "metadata",
155481
+ "resolve"
155482
+ ],
155483
+ "category": "core",
155484
+ "description": "Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content.",
155485
+ "requiresDocumentContext": true,
155486
+ "docRequirement": "optional",
155487
+ "responseEnvelopeKey": null,
155488
+ "params": [
155489
+ {
155490
+ "name": "doc",
155491
+ "kind": "doc",
155492
+ "type": "string",
155493
+ "description": "Document path. Optional when a session is already open."
155494
+ },
155495
+ {
155496
+ "name": "sessionId",
155497
+ "kind": "flag",
155498
+ "type": "string",
155499
+ "flag": "session",
155500
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
155501
+ },
155502
+ {
155503
+ "name": "id",
155504
+ "kind": "flag",
155505
+ "type": "string",
155506
+ "required": true
155507
+ }
155508
+ ],
155509
+ "constraints": null,
155510
+ "mutates": false,
155511
+ "idempotency": "idempotent",
155512
+ "supportsTrackedMode": false,
155513
+ "supportsDryRun": false,
155514
+ "inputSchema": {
155515
+ "type": "object",
155516
+ "properties": {
155517
+ "id": {
155518
+ "type": "string",
155519
+ "minLength": 1
155520
+ }
155521
+ },
155522
+ "additionalProperties": false,
155523
+ "required": [
155524
+ "id"
155525
+ ]
155526
+ },
155527
+ "outputSchema": {
155528
+ "oneOf": [
155529
+ {
155530
+ "type": "object"
155531
+ },
155532
+ {
155533
+ "type": "null"
155534
+ }
155535
+ ]
155536
+ }
155537
+ },
154118
155538
  "doc.open": {
154119
155539
  "operationId": "doc.open",
154120
155540
  "sdkSurface": "client",