@superdoc-dev/sdk 1.10.0-next.14 → 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.
@@ -90625,6 +90625,216 @@ const CONTRACT = {
90625
90625
  "tracked",
90626
90626
  "dryRun"
90627
90627
  ]
90628
+ },
90629
+ "metadata.attach": {
90630
+ "type": "object",
90631
+ "properties": {
90632
+ "available": {
90633
+ "type": "boolean"
90634
+ },
90635
+ "tracked": {
90636
+ "type": "boolean"
90637
+ },
90638
+ "dryRun": {
90639
+ "type": "boolean"
90640
+ },
90641
+ "reasons": {
90642
+ "type": "array",
90643
+ "items": {
90644
+ "enum": [
90645
+ "COMMAND_UNAVAILABLE",
90646
+ "HELPER_UNAVAILABLE",
90647
+ "OPERATION_UNAVAILABLE",
90648
+ "TRACKED_MODE_UNAVAILABLE",
90649
+ "DRY_RUN_UNAVAILABLE",
90650
+ "NAMESPACE_UNAVAILABLE",
90651
+ "STYLES_PART_MISSING",
90652
+ "COLLABORATION_ACTIVE"
90653
+ ]
90654
+ }
90655
+ }
90656
+ },
90657
+ "additionalProperties": false,
90658
+ "required": [
90659
+ "available",
90660
+ "tracked",
90661
+ "dryRun"
90662
+ ]
90663
+ },
90664
+ "metadata.list": {
90665
+ "type": "object",
90666
+ "properties": {
90667
+ "available": {
90668
+ "type": "boolean"
90669
+ },
90670
+ "tracked": {
90671
+ "type": "boolean"
90672
+ },
90673
+ "dryRun": {
90674
+ "type": "boolean"
90675
+ },
90676
+ "reasons": {
90677
+ "type": "array",
90678
+ "items": {
90679
+ "enum": [
90680
+ "COMMAND_UNAVAILABLE",
90681
+ "HELPER_UNAVAILABLE",
90682
+ "OPERATION_UNAVAILABLE",
90683
+ "TRACKED_MODE_UNAVAILABLE",
90684
+ "DRY_RUN_UNAVAILABLE",
90685
+ "NAMESPACE_UNAVAILABLE",
90686
+ "STYLES_PART_MISSING",
90687
+ "COLLABORATION_ACTIVE"
90688
+ ]
90689
+ }
90690
+ }
90691
+ },
90692
+ "additionalProperties": false,
90693
+ "required": [
90694
+ "available",
90695
+ "tracked",
90696
+ "dryRun"
90697
+ ]
90698
+ },
90699
+ "metadata.get": {
90700
+ "type": "object",
90701
+ "properties": {
90702
+ "available": {
90703
+ "type": "boolean"
90704
+ },
90705
+ "tracked": {
90706
+ "type": "boolean"
90707
+ },
90708
+ "dryRun": {
90709
+ "type": "boolean"
90710
+ },
90711
+ "reasons": {
90712
+ "type": "array",
90713
+ "items": {
90714
+ "enum": [
90715
+ "COMMAND_UNAVAILABLE",
90716
+ "HELPER_UNAVAILABLE",
90717
+ "OPERATION_UNAVAILABLE",
90718
+ "TRACKED_MODE_UNAVAILABLE",
90719
+ "DRY_RUN_UNAVAILABLE",
90720
+ "NAMESPACE_UNAVAILABLE",
90721
+ "STYLES_PART_MISSING",
90722
+ "COLLABORATION_ACTIVE"
90723
+ ]
90724
+ }
90725
+ }
90726
+ },
90727
+ "additionalProperties": false,
90728
+ "required": [
90729
+ "available",
90730
+ "tracked",
90731
+ "dryRun"
90732
+ ]
90733
+ },
90734
+ "metadata.update": {
90735
+ "type": "object",
90736
+ "properties": {
90737
+ "available": {
90738
+ "type": "boolean"
90739
+ },
90740
+ "tracked": {
90741
+ "type": "boolean"
90742
+ },
90743
+ "dryRun": {
90744
+ "type": "boolean"
90745
+ },
90746
+ "reasons": {
90747
+ "type": "array",
90748
+ "items": {
90749
+ "enum": [
90750
+ "COMMAND_UNAVAILABLE",
90751
+ "HELPER_UNAVAILABLE",
90752
+ "OPERATION_UNAVAILABLE",
90753
+ "TRACKED_MODE_UNAVAILABLE",
90754
+ "DRY_RUN_UNAVAILABLE",
90755
+ "NAMESPACE_UNAVAILABLE",
90756
+ "STYLES_PART_MISSING",
90757
+ "COLLABORATION_ACTIVE"
90758
+ ]
90759
+ }
90760
+ }
90761
+ },
90762
+ "additionalProperties": false,
90763
+ "required": [
90764
+ "available",
90765
+ "tracked",
90766
+ "dryRun"
90767
+ ]
90768
+ },
90769
+ "metadata.remove": {
90770
+ "type": "object",
90771
+ "properties": {
90772
+ "available": {
90773
+ "type": "boolean"
90774
+ },
90775
+ "tracked": {
90776
+ "type": "boolean"
90777
+ },
90778
+ "dryRun": {
90779
+ "type": "boolean"
90780
+ },
90781
+ "reasons": {
90782
+ "type": "array",
90783
+ "items": {
90784
+ "enum": [
90785
+ "COMMAND_UNAVAILABLE",
90786
+ "HELPER_UNAVAILABLE",
90787
+ "OPERATION_UNAVAILABLE",
90788
+ "TRACKED_MODE_UNAVAILABLE",
90789
+ "DRY_RUN_UNAVAILABLE",
90790
+ "NAMESPACE_UNAVAILABLE",
90791
+ "STYLES_PART_MISSING",
90792
+ "COLLABORATION_ACTIVE"
90793
+ ]
90794
+ }
90795
+ }
90796
+ },
90797
+ "additionalProperties": false,
90798
+ "required": [
90799
+ "available",
90800
+ "tracked",
90801
+ "dryRun"
90802
+ ]
90803
+ },
90804
+ "metadata.resolve": {
90805
+ "type": "object",
90806
+ "properties": {
90807
+ "available": {
90808
+ "type": "boolean"
90809
+ },
90810
+ "tracked": {
90811
+ "type": "boolean"
90812
+ },
90813
+ "dryRun": {
90814
+ "type": "boolean"
90815
+ },
90816
+ "reasons": {
90817
+ "type": "array",
90818
+ "items": {
90819
+ "enum": [
90820
+ "COMMAND_UNAVAILABLE",
90821
+ "HELPER_UNAVAILABLE",
90822
+ "OPERATION_UNAVAILABLE",
90823
+ "TRACKED_MODE_UNAVAILABLE",
90824
+ "DRY_RUN_UNAVAILABLE",
90825
+ "NAMESPACE_UNAVAILABLE",
90826
+ "STYLES_PART_MISSING",
90827
+ "COLLABORATION_ACTIVE"
90828
+ ]
90829
+ }
90830
+ }
90831
+ },
90832
+ "additionalProperties": false,
90833
+ "required": [
90834
+ "available",
90835
+ "tracked",
90836
+ "dryRun"
90837
+ ]
90628
90838
  }
90629
90839
  },
90630
90840
  "additionalProperties": false,
@@ -91025,7 +91235,13 @@ const CONTRACT = {
91025
91235
  "customXml.parts.get",
91026
91236
  "customXml.parts.create",
91027
91237
  "customXml.parts.patch",
91028
- "customXml.parts.remove"
91238
+ "customXml.parts.remove",
91239
+ "metadata.attach",
91240
+ "metadata.list",
91241
+ "metadata.get",
91242
+ "metadata.update",
91243
+ "metadata.remove",
91244
+ "metadata.resolve"
91029
91245
  ]
91030
91246
  },
91031
91247
  "planEngine": {
@@ -152994,6 +153210,1210 @@ const CONTRACT = {
152994
153210
  ]
152995
153211
  }
152996
153212
  },
153213
+ "doc.metadata.attach": {
153214
+ "operationId": "doc.metadata.attach",
153215
+ "sdkSurface": "document",
153216
+ "command": "metadata attach",
153217
+ "commandTokens": [
153218
+ "metadata",
153219
+ "attach"
153220
+ ],
153221
+ "category": "core",
153222
+ "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.",
153223
+ "requiresDocumentContext": true,
153224
+ "docRequirement": "optional",
153225
+ "responseEnvelopeKey": null,
153226
+ "params": [
153227
+ {
153228
+ "name": "doc",
153229
+ "kind": "doc",
153230
+ "type": "string",
153231
+ "description": "Document path. Optional when a session is already open."
153232
+ },
153233
+ {
153234
+ "name": "sessionId",
153235
+ "kind": "flag",
153236
+ "type": "string",
153237
+ "flag": "session",
153238
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
153239
+ },
153240
+ {
153241
+ "name": "out",
153242
+ "kind": "flag",
153243
+ "type": "string",
153244
+ "agentVisible": false
153245
+ },
153246
+ {
153247
+ "name": "force",
153248
+ "kind": "flag",
153249
+ "type": "boolean",
153250
+ "description": "Bypass confirmation checks."
153251
+ },
153252
+ {
153253
+ "name": "expectedRevision",
153254
+ "kind": "flag",
153255
+ "type": "number",
153256
+ "flag": "expected-revision",
153257
+ "agentVisible": false
153258
+ },
153259
+ {
153260
+ "name": "changeMode",
153261
+ "kind": "flag",
153262
+ "type": "string",
153263
+ "flag": "change-mode",
153264
+ "schema": {
153265
+ "enum": [
153266
+ "direct",
153267
+ "tracked"
153268
+ ]
153269
+ },
153270
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
153271
+ },
153272
+ {
153273
+ "name": "dryRun",
153274
+ "kind": "flag",
153275
+ "type": "boolean",
153276
+ "flag": "dry-run",
153277
+ "description": "Preview the result without applying changes."
153278
+ },
153279
+ {
153280
+ "name": "target",
153281
+ "kind": "jsonFlag",
153282
+ "type": "json",
153283
+ "flag": "target-json",
153284
+ "required": true,
153285
+ "schema": {
153286
+ "type": "object",
153287
+ "properties": {
153288
+ "kind": {
153289
+ "const": "selection"
153290
+ },
153291
+ "start": {
153292
+ "oneOf": [
153293
+ {
153294
+ "type": "object",
153295
+ "properties": {
153296
+ "kind": {
153297
+ "const": "text"
153298
+ },
153299
+ "blockId": {
153300
+ "type": "string"
153301
+ },
153302
+ "offset": {
153303
+ "type": "number"
153304
+ }
153305
+ },
153306
+ "required": [
153307
+ "kind",
153308
+ "blockId",
153309
+ "offset"
153310
+ ]
153311
+ },
153312
+ {
153313
+ "type": "object",
153314
+ "properties": {
153315
+ "kind": {
153316
+ "const": "nodeEdge"
153317
+ },
153318
+ "node": {
153319
+ "type": "object",
153320
+ "properties": {
153321
+ "kind": {
153322
+ "const": "block"
153323
+ },
153324
+ "nodeType": {
153325
+ "oneOf": [
153326
+ {
153327
+ "const": "paragraph"
153328
+ },
153329
+ {
153330
+ "const": "heading"
153331
+ },
153332
+ {
153333
+ "const": "table"
153334
+ },
153335
+ {
153336
+ "const": "tableOfContents"
153337
+ },
153338
+ {
153339
+ "const": "sdt"
153340
+ },
153341
+ {
153342
+ "const": "image"
153343
+ }
153344
+ ]
153345
+ },
153346
+ "nodeId": {
153347
+ "type": "string"
153348
+ }
153349
+ },
153350
+ "required": [
153351
+ "kind",
153352
+ "nodeType",
153353
+ "nodeId"
153354
+ ]
153355
+ },
153356
+ "edge": {
153357
+ "oneOf": [
153358
+ {
153359
+ "const": "before"
153360
+ },
153361
+ {
153362
+ "const": "after"
153363
+ }
153364
+ ]
153365
+ }
153366
+ },
153367
+ "required": [
153368
+ "kind",
153369
+ "node",
153370
+ "edge"
153371
+ ]
153372
+ }
153373
+ ],
153374
+ "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."
153375
+ },
153376
+ "end": {
153377
+ "oneOf": [
153378
+ {
153379
+ "type": "object",
153380
+ "properties": {
153381
+ "kind": {
153382
+ "const": "text"
153383
+ },
153384
+ "blockId": {
153385
+ "type": "string"
153386
+ },
153387
+ "offset": {
153388
+ "type": "number"
153389
+ }
153390
+ },
153391
+ "required": [
153392
+ "kind",
153393
+ "blockId",
153394
+ "offset"
153395
+ ]
153396
+ },
153397
+ {
153398
+ "type": "object",
153399
+ "properties": {
153400
+ "kind": {
153401
+ "const": "nodeEdge"
153402
+ },
153403
+ "node": {
153404
+ "type": "object",
153405
+ "properties": {
153406
+ "kind": {
153407
+ "const": "block"
153408
+ },
153409
+ "nodeType": {
153410
+ "oneOf": [
153411
+ {
153412
+ "const": "paragraph"
153413
+ },
153414
+ {
153415
+ "const": "heading"
153416
+ },
153417
+ {
153418
+ "const": "table"
153419
+ },
153420
+ {
153421
+ "const": "tableOfContents"
153422
+ },
153423
+ {
153424
+ "const": "sdt"
153425
+ },
153426
+ {
153427
+ "const": "image"
153428
+ }
153429
+ ]
153430
+ },
153431
+ "nodeId": {
153432
+ "type": "string"
153433
+ }
153434
+ },
153435
+ "required": [
153436
+ "kind",
153437
+ "nodeType",
153438
+ "nodeId"
153439
+ ]
153440
+ },
153441
+ "edge": {
153442
+ "oneOf": [
153443
+ {
153444
+ "const": "before"
153445
+ },
153446
+ {
153447
+ "const": "after"
153448
+ }
153449
+ ]
153450
+ }
153451
+ },
153452
+ "required": [
153453
+ "kind",
153454
+ "node",
153455
+ "edge"
153456
+ ]
153457
+ }
153458
+ ],
153459
+ "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."
153460
+ }
153461
+ },
153462
+ "required": [
153463
+ "kind",
153464
+ "start",
153465
+ "end"
153466
+ ]
153467
+ }
153468
+ },
153469
+ {
153470
+ "name": "namespace",
153471
+ "kind": "flag",
153472
+ "type": "string",
153473
+ "required": true
153474
+ },
153475
+ {
153476
+ "name": "payload",
153477
+ "kind": "jsonFlag",
153478
+ "type": "json",
153479
+ "flag": "payload-json",
153480
+ "required": true,
153481
+ "schema": {
153482
+ "type": "json"
153483
+ }
153484
+ },
153485
+ {
153486
+ "name": "id",
153487
+ "kind": "flag",
153488
+ "type": "string"
153489
+ }
153490
+ ],
153491
+ "constraints": null,
153492
+ "mutates": true,
153493
+ "idempotency": "non-idempotent",
153494
+ "supportsTrackedMode": false,
153495
+ "supportsDryRun": true,
153496
+ "inputSchema": {
153497
+ "type": "object",
153498
+ "properties": {
153499
+ "target": {
153500
+ "$ref": "#/$defs/SelectionTarget"
153501
+ },
153502
+ "namespace": {
153503
+ "type": "string",
153504
+ "minLength": 1
153505
+ },
153506
+ "payload": {},
153507
+ "id": {
153508
+ "type": "string",
153509
+ "minLength": 1
153510
+ }
153511
+ },
153512
+ "additionalProperties": false,
153513
+ "required": [
153514
+ "target",
153515
+ "namespace",
153516
+ "payload"
153517
+ ]
153518
+ },
153519
+ "outputSchema": {
153520
+ "oneOf": [
153521
+ {
153522
+ "type": "object",
153523
+ "properties": {
153524
+ "success": {
153525
+ "const": true
153526
+ },
153527
+ "id": {
153528
+ "type": "string",
153529
+ "minLength": 1
153530
+ },
153531
+ "namespace": {
153532
+ "type": "string",
153533
+ "minLength": 1
153534
+ },
153535
+ "partName": {
153536
+ "type": "string",
153537
+ "minLength": 1
153538
+ }
153539
+ },
153540
+ "additionalProperties": false,
153541
+ "required": [
153542
+ "success",
153543
+ "id",
153544
+ "namespace",
153545
+ "partName"
153546
+ ]
153547
+ },
153548
+ {
153549
+ "type": "object",
153550
+ "properties": {
153551
+ "success": {
153552
+ "const": false
153553
+ },
153554
+ "failure": {
153555
+ "type": "object",
153556
+ "properties": {
153557
+ "code": {
153558
+ "type": "string"
153559
+ },
153560
+ "message": {
153561
+ "type": "string"
153562
+ },
153563
+ "details": {}
153564
+ },
153565
+ "additionalProperties": false,
153566
+ "required": [
153567
+ "code",
153568
+ "message"
153569
+ ]
153570
+ }
153571
+ },
153572
+ "additionalProperties": false,
153573
+ "required": [
153574
+ "success",
153575
+ "failure"
153576
+ ]
153577
+ }
153578
+ ]
153579
+ },
153580
+ "successSchema": {
153581
+ "type": "object",
153582
+ "properties": {
153583
+ "success": {
153584
+ "const": true
153585
+ },
153586
+ "id": {
153587
+ "type": "string",
153588
+ "minLength": 1
153589
+ },
153590
+ "namespace": {
153591
+ "type": "string",
153592
+ "minLength": 1
153593
+ },
153594
+ "partName": {
153595
+ "type": "string",
153596
+ "minLength": 1
153597
+ }
153598
+ },
153599
+ "additionalProperties": false,
153600
+ "required": [
153601
+ "success",
153602
+ "id",
153603
+ "namespace",
153604
+ "partName"
153605
+ ]
153606
+ },
153607
+ "failureSchema": {
153608
+ "type": "object",
153609
+ "properties": {
153610
+ "success": {
153611
+ "const": false
153612
+ },
153613
+ "failure": {
153614
+ "type": "object",
153615
+ "properties": {
153616
+ "code": {
153617
+ "type": "string"
153618
+ },
153619
+ "message": {
153620
+ "type": "string"
153621
+ },
153622
+ "details": {}
153623
+ },
153624
+ "additionalProperties": false,
153625
+ "required": [
153626
+ "code",
153627
+ "message"
153628
+ ]
153629
+ }
153630
+ },
153631
+ "additionalProperties": false,
153632
+ "required": [
153633
+ "success",
153634
+ "failure"
153635
+ ]
153636
+ }
153637
+ },
153638
+ "doc.metadata.list": {
153639
+ "operationId": "doc.metadata.list",
153640
+ "sdkSurface": "document",
153641
+ "command": "metadata list",
153642
+ "commandTokens": [
153643
+ "metadata",
153644
+ "list"
153645
+ ],
153646
+ "category": "core",
153647
+ "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`).",
153648
+ "requiresDocumentContext": true,
153649
+ "docRequirement": "optional",
153650
+ "responseEnvelopeKey": null,
153651
+ "params": [
153652
+ {
153653
+ "name": "doc",
153654
+ "kind": "doc",
153655
+ "type": "string",
153656
+ "description": "Document path. Optional when a session is already open."
153657
+ },
153658
+ {
153659
+ "name": "sessionId",
153660
+ "kind": "flag",
153661
+ "type": "string",
153662
+ "flag": "session",
153663
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
153664
+ },
153665
+ {
153666
+ "name": "limit",
153667
+ "kind": "flag",
153668
+ "type": "number"
153669
+ },
153670
+ {
153671
+ "name": "offset",
153672
+ "kind": "flag",
153673
+ "type": "number"
153674
+ },
153675
+ {
153676
+ "name": "namespace",
153677
+ "kind": "flag",
153678
+ "type": "string"
153679
+ },
153680
+ {
153681
+ "name": "within",
153682
+ "kind": "jsonFlag",
153683
+ "type": "json",
153684
+ "flag": "within-json",
153685
+ "schema": {
153686
+ "type": "object",
153687
+ "properties": {
153688
+ "kind": {
153689
+ "const": "selection"
153690
+ },
153691
+ "start": {
153692
+ "oneOf": [
153693
+ {
153694
+ "type": "object",
153695
+ "properties": {
153696
+ "kind": {
153697
+ "const": "text"
153698
+ },
153699
+ "blockId": {
153700
+ "type": "string"
153701
+ },
153702
+ "offset": {
153703
+ "type": "number"
153704
+ }
153705
+ },
153706
+ "required": [
153707
+ "kind",
153708
+ "blockId",
153709
+ "offset"
153710
+ ]
153711
+ },
153712
+ {
153713
+ "type": "object",
153714
+ "properties": {
153715
+ "kind": {
153716
+ "const": "nodeEdge"
153717
+ },
153718
+ "node": {
153719
+ "type": "object",
153720
+ "properties": {
153721
+ "kind": {
153722
+ "const": "block"
153723
+ },
153724
+ "nodeType": {
153725
+ "oneOf": [
153726
+ {
153727
+ "const": "paragraph"
153728
+ },
153729
+ {
153730
+ "const": "heading"
153731
+ },
153732
+ {
153733
+ "const": "table"
153734
+ },
153735
+ {
153736
+ "const": "tableOfContents"
153737
+ },
153738
+ {
153739
+ "const": "sdt"
153740
+ },
153741
+ {
153742
+ "const": "image"
153743
+ }
153744
+ ]
153745
+ },
153746
+ "nodeId": {
153747
+ "type": "string"
153748
+ }
153749
+ },
153750
+ "required": [
153751
+ "kind",
153752
+ "nodeType",
153753
+ "nodeId"
153754
+ ]
153755
+ },
153756
+ "edge": {
153757
+ "oneOf": [
153758
+ {
153759
+ "const": "before"
153760
+ },
153761
+ {
153762
+ "const": "after"
153763
+ }
153764
+ ]
153765
+ }
153766
+ },
153767
+ "required": [
153768
+ "kind",
153769
+ "node",
153770
+ "edge"
153771
+ ]
153772
+ }
153773
+ ],
153774
+ "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."
153775
+ },
153776
+ "end": {
153777
+ "oneOf": [
153778
+ {
153779
+ "type": "object",
153780
+ "properties": {
153781
+ "kind": {
153782
+ "const": "text"
153783
+ },
153784
+ "blockId": {
153785
+ "type": "string"
153786
+ },
153787
+ "offset": {
153788
+ "type": "number"
153789
+ }
153790
+ },
153791
+ "required": [
153792
+ "kind",
153793
+ "blockId",
153794
+ "offset"
153795
+ ]
153796
+ },
153797
+ {
153798
+ "type": "object",
153799
+ "properties": {
153800
+ "kind": {
153801
+ "const": "nodeEdge"
153802
+ },
153803
+ "node": {
153804
+ "type": "object",
153805
+ "properties": {
153806
+ "kind": {
153807
+ "const": "block"
153808
+ },
153809
+ "nodeType": {
153810
+ "oneOf": [
153811
+ {
153812
+ "const": "paragraph"
153813
+ },
153814
+ {
153815
+ "const": "heading"
153816
+ },
153817
+ {
153818
+ "const": "table"
153819
+ },
153820
+ {
153821
+ "const": "tableOfContents"
153822
+ },
153823
+ {
153824
+ "const": "sdt"
153825
+ },
153826
+ {
153827
+ "const": "image"
153828
+ }
153829
+ ]
153830
+ },
153831
+ "nodeId": {
153832
+ "type": "string"
153833
+ }
153834
+ },
153835
+ "required": [
153836
+ "kind",
153837
+ "nodeType",
153838
+ "nodeId"
153839
+ ]
153840
+ },
153841
+ "edge": {
153842
+ "oneOf": [
153843
+ {
153844
+ "const": "before"
153845
+ },
153846
+ {
153847
+ "const": "after"
153848
+ }
153849
+ ]
153850
+ }
153851
+ },
153852
+ "required": [
153853
+ "kind",
153854
+ "node",
153855
+ "edge"
153856
+ ]
153857
+ }
153858
+ ],
153859
+ "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."
153860
+ }
153861
+ },
153862
+ "required": [
153863
+ "kind",
153864
+ "start",
153865
+ "end"
153866
+ ]
153867
+ }
153868
+ }
153869
+ ],
153870
+ "constraints": null,
153871
+ "mutates": false,
153872
+ "idempotency": "idempotent",
153873
+ "supportsTrackedMode": false,
153874
+ "supportsDryRun": false,
153875
+ "inputSchema": {
153876
+ "type": "object",
153877
+ "properties": {
153878
+ "limit": {
153879
+ "type": "integer",
153880
+ "minimum": 1
153881
+ },
153882
+ "offset": {
153883
+ "type": "integer",
153884
+ "minimum": 0
153885
+ },
153886
+ "namespace": {
153887
+ "type": "string"
153888
+ },
153889
+ "within": {
153890
+ "$ref": "#/$defs/SelectionTarget"
153891
+ }
153892
+ },
153893
+ "additionalProperties": false
153894
+ },
153895
+ "outputSchema": {
153896
+ "type": "object"
153897
+ }
153898
+ },
153899
+ "doc.metadata.get": {
153900
+ "operationId": "doc.metadata.get",
153901
+ "sdkSurface": "document",
153902
+ "command": "metadata get",
153903
+ "commandTokens": [
153904
+ "metadata",
153905
+ "get"
153906
+ ],
153907
+ "category": "core",
153908
+ "description": "Get a single anchored-metadata entry by id, including its JSON payload.",
153909
+ "requiresDocumentContext": true,
153910
+ "docRequirement": "optional",
153911
+ "responseEnvelopeKey": null,
153912
+ "params": [
153913
+ {
153914
+ "name": "doc",
153915
+ "kind": "doc",
153916
+ "type": "string",
153917
+ "description": "Document path. Optional when a session is already open."
153918
+ },
153919
+ {
153920
+ "name": "sessionId",
153921
+ "kind": "flag",
153922
+ "type": "string",
153923
+ "flag": "session",
153924
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
153925
+ },
153926
+ {
153927
+ "name": "id",
153928
+ "kind": "flag",
153929
+ "type": "string",
153930
+ "required": true
153931
+ }
153932
+ ],
153933
+ "constraints": null,
153934
+ "mutates": false,
153935
+ "idempotency": "idempotent",
153936
+ "supportsTrackedMode": false,
153937
+ "supportsDryRun": false,
153938
+ "inputSchema": {
153939
+ "type": "object",
153940
+ "properties": {
153941
+ "id": {
153942
+ "type": "string",
153943
+ "minLength": 1
153944
+ }
153945
+ },
153946
+ "additionalProperties": false,
153947
+ "required": [
153948
+ "id"
153949
+ ]
153950
+ },
153951
+ "outputSchema": {
153952
+ "oneOf": [
153953
+ {
153954
+ "type": "object"
153955
+ },
153956
+ {
153957
+ "type": "null"
153958
+ }
153959
+ ]
153960
+ }
153961
+ },
153962
+ "doc.metadata.update": {
153963
+ "operationId": "doc.metadata.update",
153964
+ "sdkSurface": "document",
153965
+ "command": "metadata update",
153966
+ "commandTokens": [
153967
+ "metadata",
153968
+ "update"
153969
+ ],
153970
+ "category": "core",
153971
+ "description": "Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched.",
153972
+ "requiresDocumentContext": true,
153973
+ "docRequirement": "optional",
153974
+ "responseEnvelopeKey": null,
153975
+ "params": [
153976
+ {
153977
+ "name": "doc",
153978
+ "kind": "doc",
153979
+ "type": "string",
153980
+ "description": "Document path. Optional when a session is already open."
153981
+ },
153982
+ {
153983
+ "name": "sessionId",
153984
+ "kind": "flag",
153985
+ "type": "string",
153986
+ "flag": "session",
153987
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
153988
+ },
153989
+ {
153990
+ "name": "out",
153991
+ "kind": "flag",
153992
+ "type": "string",
153993
+ "agentVisible": false
153994
+ },
153995
+ {
153996
+ "name": "force",
153997
+ "kind": "flag",
153998
+ "type": "boolean",
153999
+ "description": "Bypass confirmation checks."
154000
+ },
154001
+ {
154002
+ "name": "expectedRevision",
154003
+ "kind": "flag",
154004
+ "type": "number",
154005
+ "flag": "expected-revision",
154006
+ "agentVisible": false
154007
+ },
154008
+ {
154009
+ "name": "changeMode",
154010
+ "kind": "flag",
154011
+ "type": "string",
154012
+ "flag": "change-mode",
154013
+ "schema": {
154014
+ "enum": [
154015
+ "direct",
154016
+ "tracked"
154017
+ ]
154018
+ },
154019
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
154020
+ },
154021
+ {
154022
+ "name": "dryRun",
154023
+ "kind": "flag",
154024
+ "type": "boolean",
154025
+ "flag": "dry-run",
154026
+ "description": "Preview the result without applying changes."
154027
+ },
154028
+ {
154029
+ "name": "id",
154030
+ "kind": "flag",
154031
+ "type": "string",
154032
+ "required": true
154033
+ },
154034
+ {
154035
+ "name": "payload",
154036
+ "kind": "jsonFlag",
154037
+ "type": "json",
154038
+ "flag": "payload-json",
154039
+ "required": true,
154040
+ "schema": {
154041
+ "type": "json"
154042
+ }
154043
+ }
154044
+ ],
154045
+ "constraints": null,
154046
+ "mutates": true,
154047
+ "idempotency": "idempotent",
154048
+ "supportsTrackedMode": false,
154049
+ "supportsDryRun": true,
154050
+ "inputSchema": {
154051
+ "type": "object",
154052
+ "properties": {
154053
+ "id": {
154054
+ "type": "string",
154055
+ "minLength": 1
154056
+ },
154057
+ "payload": {}
154058
+ },
154059
+ "additionalProperties": false,
154060
+ "required": [
154061
+ "id",
154062
+ "payload"
154063
+ ]
154064
+ },
154065
+ "outputSchema": {
154066
+ "oneOf": [
154067
+ {
154068
+ "type": "object",
154069
+ "properties": {
154070
+ "success": {
154071
+ "const": true
154072
+ },
154073
+ "id": {
154074
+ "type": "string",
154075
+ "minLength": 1
154076
+ }
154077
+ },
154078
+ "additionalProperties": false,
154079
+ "required": [
154080
+ "success",
154081
+ "id"
154082
+ ]
154083
+ },
154084
+ {
154085
+ "type": "object",
154086
+ "properties": {
154087
+ "success": {
154088
+ "const": false
154089
+ },
154090
+ "failure": {
154091
+ "type": "object",
154092
+ "properties": {
154093
+ "code": {
154094
+ "type": "string"
154095
+ },
154096
+ "message": {
154097
+ "type": "string"
154098
+ },
154099
+ "details": {}
154100
+ },
154101
+ "additionalProperties": false,
154102
+ "required": [
154103
+ "code",
154104
+ "message"
154105
+ ]
154106
+ }
154107
+ },
154108
+ "additionalProperties": false,
154109
+ "required": [
154110
+ "success",
154111
+ "failure"
154112
+ ]
154113
+ }
154114
+ ]
154115
+ },
154116
+ "successSchema": {
154117
+ "type": "object",
154118
+ "properties": {
154119
+ "success": {
154120
+ "const": true
154121
+ },
154122
+ "id": {
154123
+ "type": "string",
154124
+ "minLength": 1
154125
+ }
154126
+ },
154127
+ "additionalProperties": false,
154128
+ "required": [
154129
+ "success",
154130
+ "id"
154131
+ ]
154132
+ },
154133
+ "failureSchema": {
154134
+ "type": "object",
154135
+ "properties": {
154136
+ "success": {
154137
+ "const": false
154138
+ },
154139
+ "failure": {
154140
+ "type": "object",
154141
+ "properties": {
154142
+ "code": {
154143
+ "type": "string"
154144
+ },
154145
+ "message": {
154146
+ "type": "string"
154147
+ },
154148
+ "details": {}
154149
+ },
154150
+ "additionalProperties": false,
154151
+ "required": [
154152
+ "code",
154153
+ "message"
154154
+ ]
154155
+ }
154156
+ },
154157
+ "additionalProperties": false,
154158
+ "required": [
154159
+ "success",
154160
+ "failure"
154161
+ ]
154162
+ }
154163
+ },
154164
+ "doc.metadata.remove": {
154165
+ "operationId": "doc.metadata.remove",
154166
+ "sdkSurface": "document",
154167
+ "command": "metadata remove",
154168
+ "commandTokens": [
154169
+ "metadata",
154170
+ "remove"
154171
+ ],
154172
+ "category": "core",
154173
+ "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.",
154174
+ "requiresDocumentContext": true,
154175
+ "docRequirement": "optional",
154176
+ "responseEnvelopeKey": null,
154177
+ "params": [
154178
+ {
154179
+ "name": "doc",
154180
+ "kind": "doc",
154181
+ "type": "string",
154182
+ "description": "Document path. Optional when a session is already open."
154183
+ },
154184
+ {
154185
+ "name": "sessionId",
154186
+ "kind": "flag",
154187
+ "type": "string",
154188
+ "flag": "session",
154189
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
154190
+ },
154191
+ {
154192
+ "name": "out",
154193
+ "kind": "flag",
154194
+ "type": "string",
154195
+ "agentVisible": false
154196
+ },
154197
+ {
154198
+ "name": "force",
154199
+ "kind": "flag",
154200
+ "type": "boolean",
154201
+ "description": "Bypass confirmation checks."
154202
+ },
154203
+ {
154204
+ "name": "expectedRevision",
154205
+ "kind": "flag",
154206
+ "type": "number",
154207
+ "flag": "expected-revision",
154208
+ "agentVisible": false
154209
+ },
154210
+ {
154211
+ "name": "changeMode",
154212
+ "kind": "flag",
154213
+ "type": "string",
154214
+ "flag": "change-mode",
154215
+ "schema": {
154216
+ "enum": [
154217
+ "direct",
154218
+ "tracked"
154219
+ ]
154220
+ },
154221
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
154222
+ },
154223
+ {
154224
+ "name": "dryRun",
154225
+ "kind": "flag",
154226
+ "type": "boolean",
154227
+ "flag": "dry-run",
154228
+ "description": "Preview the result without applying changes."
154229
+ },
154230
+ {
154231
+ "name": "id",
154232
+ "kind": "flag",
154233
+ "type": "string",
154234
+ "required": true
154235
+ }
154236
+ ],
154237
+ "constraints": null,
154238
+ "mutates": true,
154239
+ "idempotency": "non-idempotent",
154240
+ "supportsTrackedMode": false,
154241
+ "supportsDryRun": true,
154242
+ "inputSchema": {
154243
+ "type": "object",
154244
+ "properties": {
154245
+ "id": {
154246
+ "type": "string",
154247
+ "minLength": 1
154248
+ }
154249
+ },
154250
+ "additionalProperties": false,
154251
+ "required": [
154252
+ "id"
154253
+ ]
154254
+ },
154255
+ "outputSchema": {
154256
+ "oneOf": [
154257
+ {
154258
+ "type": "object",
154259
+ "properties": {
154260
+ "success": {
154261
+ "const": true
154262
+ },
154263
+ "id": {
154264
+ "type": "string",
154265
+ "minLength": 1
154266
+ }
154267
+ },
154268
+ "additionalProperties": false,
154269
+ "required": [
154270
+ "success",
154271
+ "id"
154272
+ ]
154273
+ },
154274
+ {
154275
+ "type": "object",
154276
+ "properties": {
154277
+ "success": {
154278
+ "const": false
154279
+ },
154280
+ "failure": {
154281
+ "type": "object",
154282
+ "properties": {
154283
+ "code": {
154284
+ "type": "string"
154285
+ },
154286
+ "message": {
154287
+ "type": "string"
154288
+ },
154289
+ "details": {}
154290
+ },
154291
+ "additionalProperties": false,
154292
+ "required": [
154293
+ "code",
154294
+ "message"
154295
+ ]
154296
+ }
154297
+ },
154298
+ "additionalProperties": false,
154299
+ "required": [
154300
+ "success",
154301
+ "failure"
154302
+ ]
154303
+ }
154304
+ ]
154305
+ },
154306
+ "successSchema": {
154307
+ "type": "object",
154308
+ "properties": {
154309
+ "success": {
154310
+ "const": true
154311
+ },
154312
+ "id": {
154313
+ "type": "string",
154314
+ "minLength": 1
154315
+ }
154316
+ },
154317
+ "additionalProperties": false,
154318
+ "required": [
154319
+ "success",
154320
+ "id"
154321
+ ]
154322
+ },
154323
+ "failureSchema": {
154324
+ "type": "object",
154325
+ "properties": {
154326
+ "success": {
154327
+ "const": false
154328
+ },
154329
+ "failure": {
154330
+ "type": "object",
154331
+ "properties": {
154332
+ "code": {
154333
+ "type": "string"
154334
+ },
154335
+ "message": {
154336
+ "type": "string"
154337
+ },
154338
+ "details": {}
154339
+ },
154340
+ "additionalProperties": false,
154341
+ "required": [
154342
+ "code",
154343
+ "message"
154344
+ ]
154345
+ }
154346
+ },
154347
+ "additionalProperties": false,
154348
+ "required": [
154349
+ "success",
154350
+ "failure"
154351
+ ]
154352
+ }
154353
+ },
154354
+ "doc.metadata.resolve": {
154355
+ "operationId": "doc.metadata.resolve",
154356
+ "sdkSurface": "document",
154357
+ "command": "metadata resolve",
154358
+ "commandTokens": [
154359
+ "metadata",
154360
+ "resolve"
154361
+ ],
154362
+ "category": "core",
154363
+ "description": "Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content.",
154364
+ "requiresDocumentContext": true,
154365
+ "docRequirement": "optional",
154366
+ "responseEnvelopeKey": null,
154367
+ "params": [
154368
+ {
154369
+ "name": "doc",
154370
+ "kind": "doc",
154371
+ "type": "string",
154372
+ "description": "Document path. Optional when a session is already open."
154373
+ },
154374
+ {
154375
+ "name": "sessionId",
154376
+ "kind": "flag",
154377
+ "type": "string",
154378
+ "flag": "session",
154379
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
154380
+ },
154381
+ {
154382
+ "name": "id",
154383
+ "kind": "flag",
154384
+ "type": "string",
154385
+ "required": true
154386
+ }
154387
+ ],
154388
+ "constraints": null,
154389
+ "mutates": false,
154390
+ "idempotency": "idempotent",
154391
+ "supportsTrackedMode": false,
154392
+ "supportsDryRun": false,
154393
+ "inputSchema": {
154394
+ "type": "object",
154395
+ "properties": {
154396
+ "id": {
154397
+ "type": "string",
154398
+ "minLength": 1
154399
+ }
154400
+ },
154401
+ "additionalProperties": false,
154402
+ "required": [
154403
+ "id"
154404
+ ]
154405
+ },
154406
+ "outputSchema": {
154407
+ "oneOf": [
154408
+ {
154409
+ "type": "object"
154410
+ },
154411
+ {
154412
+ "type": "null"
154413
+ }
154414
+ ]
154415
+ }
154416
+ },
152997
154417
  "doc.open": {
152998
154418
  "operationId": "doc.open",
152999
154419
  "sdkSurface": "client",