@superdoc/sdk 2.12.0-next.2 → 2.12.0-next.20
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.
- package/README.md +15 -0
- package/dist/actions/define.cjs +6 -1
- package/dist/actions/define.js +6 -1
- package/dist/agent/actions.cjs +125 -13
- package/dist/agent/actions.d.ts +12 -5
- package/dist/agent/actions.js +125 -13
- package/dist/agent/catalog.cjs +7 -1
- package/dist/agent/catalog.js +7 -1
- package/dist/agent/doc-snapshot.cjs +30 -24
- package/dist/agent/doc-snapshot.d.ts +1 -0
- package/dist/agent/doc-snapshot.js +29 -24
- package/dist/agent/runtime.cjs +6 -1
- package/dist/agent/runtime.d.ts +5 -1
- package/dist/agent/runtime.js +6 -1
- package/dist/agent/textbox-snapshot.cjs +65 -0
- package/dist/agent/textbox-snapshot.d.ts +22 -0
- package/dist/agent/textbox-snapshot.js +60 -0
- package/dist/embedded-prompts.generated.cjs +2 -2
- package/dist/embedded-prompts.generated.js +2 -2
- package/dist/generated/client.d.ts +54 -0
- package/dist/generated/contract.cjs +395 -7
- package/dist/generated/contract.js +395 -7
- package/dist/index.d.ts +1 -1
- package/dist/prompts/mcp-prompt.md +1 -1
- package/dist/prompts/system-prompt.md +1 -1
- package/dist/runtime/sdk-version.generated.cjs +1 -1
- package/dist/runtime/sdk-version.generated.d.ts +1 -1
- package/dist/runtime/sdk-version.generated.js +1 -1
- package/package.json +8 -8
- package/tools/tools-policy.json +1 -1
|
@@ -13644,7 +13644,7 @@ export const CONTRACT = {
|
|
|
13644
13644
|
"command": [
|
|
13645
13645
|
"open"
|
|
13646
13646
|
],
|
|
13647
|
-
"description": "Open a document and create a persistent v2 editing session. V2 single-socket collaboration supports y-websocket, Hocuspocus, and Liveblocks.",
|
|
13647
|
+
"description": "Open a document and create a persistent v2 editing session. Content override atomically initializes a blank document or replaces a template body. V2 single-socket collaboration supports y-websocket, Hocuspocus, and Liveblocks.",
|
|
13648
13648
|
"category": "session",
|
|
13649
13649
|
"stability": "stable",
|
|
13650
13650
|
"mutates": true,
|
|
@@ -13654,7 +13654,8 @@ export const CONTRACT = {
|
|
|
13654
13654
|
"examples": [
|
|
13655
13655
|
"superdoc open my-doc.docx",
|
|
13656
13656
|
"superdoc open --content-override \"# Title\\n\\nBody text\" --override-type markdown",
|
|
13657
|
-
"superdoc open template.docx --content-override '<p>ALPHA01</p><p>BRAVO02</p>' --override-type html"
|
|
13657
|
+
"superdoc open template.docx --content-override '<p>ALPHA01</p><p>BRAVO02</p>' --override-type html",
|
|
13658
|
+
"superdoc open my-doc.docx --collaboration-json '{\"url\":\"wss://collab.example.com\"}'"
|
|
13658
13659
|
],
|
|
13659
13660
|
"errors": []
|
|
13660
13661
|
},
|
|
@@ -303879,6 +303880,122 @@ export const CONTRACT = {
|
|
|
303879
303880
|
"parts"
|
|
303880
303881
|
]
|
|
303881
303882
|
},
|
|
303883
|
+
"applyEligibility": {
|
|
303884
|
+
"type": "object",
|
|
303885
|
+
"properties": {
|
|
303886
|
+
"direct": {
|
|
303887
|
+
"type": "object",
|
|
303888
|
+
"properties": {
|
|
303889
|
+
"status": {
|
|
303890
|
+
"type": "string",
|
|
303891
|
+
"enum": [
|
|
303892
|
+
"candidate",
|
|
303893
|
+
"blocked"
|
|
303894
|
+
]
|
|
303895
|
+
},
|
|
303896
|
+
"blockers": {
|
|
303897
|
+
"type": "array",
|
|
303898
|
+
"items": {
|
|
303899
|
+
"type": "object",
|
|
303900
|
+
"properties": {
|
|
303901
|
+
"code": {
|
|
303902
|
+
"type": "string",
|
|
303903
|
+
"enum": [
|
|
303904
|
+
"family-apply-lane-unavailable",
|
|
303905
|
+
"header-footer-physical-lifecycle-unsafe",
|
|
303906
|
+
"header-footer-tracked-lifecycle-unsupported",
|
|
303907
|
+
"comment-replay-unsafe",
|
|
303908
|
+
"comment-anchor-marker-semantics-unsafe",
|
|
303909
|
+
"styles-replay-unsafe",
|
|
303910
|
+
"numbering-replay-unsafe",
|
|
303911
|
+
"section-reference-replay-unsafe",
|
|
303912
|
+
"structural-paragraph-unsupported"
|
|
303913
|
+
]
|
|
303914
|
+
},
|
|
303915
|
+
"message": {
|
|
303916
|
+
"type": "string"
|
|
303917
|
+
},
|
|
303918
|
+
"families": {
|
|
303919
|
+
"type": "array",
|
|
303920
|
+
"items": {
|
|
303921
|
+
"type": "string"
|
|
303922
|
+
}
|
|
303923
|
+
}
|
|
303924
|
+
},
|
|
303925
|
+
"additionalProperties": false,
|
|
303926
|
+
"required": [
|
|
303927
|
+
"code",
|
|
303928
|
+
"message"
|
|
303929
|
+
]
|
|
303930
|
+
}
|
|
303931
|
+
}
|
|
303932
|
+
},
|
|
303933
|
+
"additionalProperties": false,
|
|
303934
|
+
"required": [
|
|
303935
|
+
"status",
|
|
303936
|
+
"blockers"
|
|
303937
|
+
]
|
|
303938
|
+
},
|
|
303939
|
+
"tracked": {
|
|
303940
|
+
"type": "object",
|
|
303941
|
+
"properties": {
|
|
303942
|
+
"status": {
|
|
303943
|
+
"type": "string",
|
|
303944
|
+
"enum": [
|
|
303945
|
+
"candidate",
|
|
303946
|
+
"blocked"
|
|
303947
|
+
]
|
|
303948
|
+
},
|
|
303949
|
+
"blockers": {
|
|
303950
|
+
"type": "array",
|
|
303951
|
+
"items": {
|
|
303952
|
+
"type": "object",
|
|
303953
|
+
"properties": {
|
|
303954
|
+
"code": {
|
|
303955
|
+
"type": "string",
|
|
303956
|
+
"enum": [
|
|
303957
|
+
"family-apply-lane-unavailable",
|
|
303958
|
+
"header-footer-physical-lifecycle-unsafe",
|
|
303959
|
+
"header-footer-tracked-lifecycle-unsupported",
|
|
303960
|
+
"comment-replay-unsafe",
|
|
303961
|
+
"comment-anchor-marker-semantics-unsafe",
|
|
303962
|
+
"styles-replay-unsafe",
|
|
303963
|
+
"numbering-replay-unsafe",
|
|
303964
|
+
"section-reference-replay-unsafe",
|
|
303965
|
+
"structural-paragraph-unsupported"
|
|
303966
|
+
]
|
|
303967
|
+
},
|
|
303968
|
+
"message": {
|
|
303969
|
+
"type": "string"
|
|
303970
|
+
},
|
|
303971
|
+
"families": {
|
|
303972
|
+
"type": "array",
|
|
303973
|
+
"items": {
|
|
303974
|
+
"type": "string"
|
|
303975
|
+
}
|
|
303976
|
+
}
|
|
303977
|
+
},
|
|
303978
|
+
"additionalProperties": false,
|
|
303979
|
+
"required": [
|
|
303980
|
+
"code",
|
|
303981
|
+
"message"
|
|
303982
|
+
]
|
|
303983
|
+
}
|
|
303984
|
+
}
|
|
303985
|
+
},
|
|
303986
|
+
"additionalProperties": false,
|
|
303987
|
+
"required": [
|
|
303988
|
+
"status",
|
|
303989
|
+
"blockers"
|
|
303990
|
+
]
|
|
303991
|
+
}
|
|
303992
|
+
},
|
|
303993
|
+
"additionalProperties": false,
|
|
303994
|
+
"required": [
|
|
303995
|
+
"direct",
|
|
303996
|
+
"tracked"
|
|
303997
|
+
]
|
|
303998
|
+
},
|
|
303882
303999
|
"payload": {
|
|
303883
304000
|
"type": "object",
|
|
303884
304001
|
"description": "Opaque engine-owned diff data."
|
|
@@ -304122,6 +304239,157 @@ export const CONTRACT = {
|
|
|
304122
304239
|
"parts"
|
|
304123
304240
|
]
|
|
304124
304241
|
},
|
|
304242
|
+
"applyEligibility": {
|
|
304243
|
+
"type": "object",
|
|
304244
|
+
"properties": {
|
|
304245
|
+
"direct": {
|
|
304246
|
+
"type": "object",
|
|
304247
|
+
"properties": {
|
|
304248
|
+
"status": {
|
|
304249
|
+
"oneOf": [
|
|
304250
|
+
{
|
|
304251
|
+
"const": "candidate"
|
|
304252
|
+
},
|
|
304253
|
+
{
|
|
304254
|
+
"const": "blocked"
|
|
304255
|
+
}
|
|
304256
|
+
]
|
|
304257
|
+
},
|
|
304258
|
+
"blockers": {
|
|
304259
|
+
"type": "array",
|
|
304260
|
+
"items": {
|
|
304261
|
+
"type": "object",
|
|
304262
|
+
"properties": {
|
|
304263
|
+
"code": {
|
|
304264
|
+
"oneOf": [
|
|
304265
|
+
{
|
|
304266
|
+
"const": "family-apply-lane-unavailable"
|
|
304267
|
+
},
|
|
304268
|
+
{
|
|
304269
|
+
"const": "header-footer-physical-lifecycle-unsafe"
|
|
304270
|
+
},
|
|
304271
|
+
{
|
|
304272
|
+
"const": "header-footer-tracked-lifecycle-unsupported"
|
|
304273
|
+
},
|
|
304274
|
+
{
|
|
304275
|
+
"const": "comment-replay-unsafe"
|
|
304276
|
+
},
|
|
304277
|
+
{
|
|
304278
|
+
"const": "comment-anchor-marker-semantics-unsafe"
|
|
304279
|
+
},
|
|
304280
|
+
{
|
|
304281
|
+
"const": "styles-replay-unsafe"
|
|
304282
|
+
},
|
|
304283
|
+
{
|
|
304284
|
+
"const": "numbering-replay-unsafe"
|
|
304285
|
+
},
|
|
304286
|
+
{
|
|
304287
|
+
"const": "section-reference-replay-unsafe"
|
|
304288
|
+
},
|
|
304289
|
+
{
|
|
304290
|
+
"const": "structural-paragraph-unsupported"
|
|
304291
|
+
}
|
|
304292
|
+
]
|
|
304293
|
+
},
|
|
304294
|
+
"message": {
|
|
304295
|
+
"type": "string"
|
|
304296
|
+
},
|
|
304297
|
+
"families": {
|
|
304298
|
+
"type": "array",
|
|
304299
|
+
"items": {
|
|
304300
|
+
"type": "string"
|
|
304301
|
+
}
|
|
304302
|
+
}
|
|
304303
|
+
},
|
|
304304
|
+
"required": [
|
|
304305
|
+
"code",
|
|
304306
|
+
"message"
|
|
304307
|
+
]
|
|
304308
|
+
}
|
|
304309
|
+
}
|
|
304310
|
+
},
|
|
304311
|
+
"required": [
|
|
304312
|
+
"status",
|
|
304313
|
+
"blockers"
|
|
304314
|
+
]
|
|
304315
|
+
},
|
|
304316
|
+
"tracked": {
|
|
304317
|
+
"type": "object",
|
|
304318
|
+
"properties": {
|
|
304319
|
+
"status": {
|
|
304320
|
+
"oneOf": [
|
|
304321
|
+
{
|
|
304322
|
+
"const": "candidate"
|
|
304323
|
+
},
|
|
304324
|
+
{
|
|
304325
|
+
"const": "blocked"
|
|
304326
|
+
}
|
|
304327
|
+
]
|
|
304328
|
+
},
|
|
304329
|
+
"blockers": {
|
|
304330
|
+
"type": "array",
|
|
304331
|
+
"items": {
|
|
304332
|
+
"type": "object",
|
|
304333
|
+
"properties": {
|
|
304334
|
+
"code": {
|
|
304335
|
+
"oneOf": [
|
|
304336
|
+
{
|
|
304337
|
+
"const": "family-apply-lane-unavailable"
|
|
304338
|
+
},
|
|
304339
|
+
{
|
|
304340
|
+
"const": "header-footer-physical-lifecycle-unsafe"
|
|
304341
|
+
},
|
|
304342
|
+
{
|
|
304343
|
+
"const": "header-footer-tracked-lifecycle-unsupported"
|
|
304344
|
+
},
|
|
304345
|
+
{
|
|
304346
|
+
"const": "comment-replay-unsafe"
|
|
304347
|
+
},
|
|
304348
|
+
{
|
|
304349
|
+
"const": "comment-anchor-marker-semantics-unsafe"
|
|
304350
|
+
},
|
|
304351
|
+
{
|
|
304352
|
+
"const": "styles-replay-unsafe"
|
|
304353
|
+
},
|
|
304354
|
+
{
|
|
304355
|
+
"const": "numbering-replay-unsafe"
|
|
304356
|
+
},
|
|
304357
|
+
{
|
|
304358
|
+
"const": "section-reference-replay-unsafe"
|
|
304359
|
+
},
|
|
304360
|
+
{
|
|
304361
|
+
"const": "structural-paragraph-unsupported"
|
|
304362
|
+
}
|
|
304363
|
+
]
|
|
304364
|
+
},
|
|
304365
|
+
"message": {
|
|
304366
|
+
"type": "string"
|
|
304367
|
+
},
|
|
304368
|
+
"families": {
|
|
304369
|
+
"type": "array",
|
|
304370
|
+
"items": {
|
|
304371
|
+
"type": "string"
|
|
304372
|
+
}
|
|
304373
|
+
}
|
|
304374
|
+
},
|
|
304375
|
+
"required": [
|
|
304376
|
+
"code",
|
|
304377
|
+
"message"
|
|
304378
|
+
]
|
|
304379
|
+
}
|
|
304380
|
+
}
|
|
304381
|
+
},
|
|
304382
|
+
"required": [
|
|
304383
|
+
"status",
|
|
304384
|
+
"blockers"
|
|
304385
|
+
]
|
|
304386
|
+
}
|
|
304387
|
+
},
|
|
304388
|
+
"required": [
|
|
304389
|
+
"direct",
|
|
304390
|
+
"tracked"
|
|
304391
|
+
]
|
|
304392
|
+
},
|
|
304125
304393
|
"payload": {
|
|
304126
304394
|
"type": "object",
|
|
304127
304395
|
"properties": {},
|
|
@@ -304306,6 +304574,122 @@ export const CONTRACT = {
|
|
|
304306
304574
|
"parts"
|
|
304307
304575
|
]
|
|
304308
304576
|
},
|
|
304577
|
+
"applyEligibility": {
|
|
304578
|
+
"type": "object",
|
|
304579
|
+
"properties": {
|
|
304580
|
+
"direct": {
|
|
304581
|
+
"type": "object",
|
|
304582
|
+
"properties": {
|
|
304583
|
+
"status": {
|
|
304584
|
+
"type": "string",
|
|
304585
|
+
"enum": [
|
|
304586
|
+
"candidate",
|
|
304587
|
+
"blocked"
|
|
304588
|
+
]
|
|
304589
|
+
},
|
|
304590
|
+
"blockers": {
|
|
304591
|
+
"type": "array",
|
|
304592
|
+
"items": {
|
|
304593
|
+
"type": "object",
|
|
304594
|
+
"properties": {
|
|
304595
|
+
"code": {
|
|
304596
|
+
"type": "string",
|
|
304597
|
+
"enum": [
|
|
304598
|
+
"family-apply-lane-unavailable",
|
|
304599
|
+
"header-footer-physical-lifecycle-unsafe",
|
|
304600
|
+
"header-footer-tracked-lifecycle-unsupported",
|
|
304601
|
+
"comment-replay-unsafe",
|
|
304602
|
+
"comment-anchor-marker-semantics-unsafe",
|
|
304603
|
+
"styles-replay-unsafe",
|
|
304604
|
+
"numbering-replay-unsafe",
|
|
304605
|
+
"section-reference-replay-unsafe",
|
|
304606
|
+
"structural-paragraph-unsupported"
|
|
304607
|
+
]
|
|
304608
|
+
},
|
|
304609
|
+
"message": {
|
|
304610
|
+
"type": "string"
|
|
304611
|
+
},
|
|
304612
|
+
"families": {
|
|
304613
|
+
"type": "array",
|
|
304614
|
+
"items": {
|
|
304615
|
+
"type": "string"
|
|
304616
|
+
}
|
|
304617
|
+
}
|
|
304618
|
+
},
|
|
304619
|
+
"additionalProperties": false,
|
|
304620
|
+
"required": [
|
|
304621
|
+
"code",
|
|
304622
|
+
"message"
|
|
304623
|
+
]
|
|
304624
|
+
}
|
|
304625
|
+
}
|
|
304626
|
+
},
|
|
304627
|
+
"additionalProperties": false,
|
|
304628
|
+
"required": [
|
|
304629
|
+
"status",
|
|
304630
|
+
"blockers"
|
|
304631
|
+
]
|
|
304632
|
+
},
|
|
304633
|
+
"tracked": {
|
|
304634
|
+
"type": "object",
|
|
304635
|
+
"properties": {
|
|
304636
|
+
"status": {
|
|
304637
|
+
"type": "string",
|
|
304638
|
+
"enum": [
|
|
304639
|
+
"candidate",
|
|
304640
|
+
"blocked"
|
|
304641
|
+
]
|
|
304642
|
+
},
|
|
304643
|
+
"blockers": {
|
|
304644
|
+
"type": "array",
|
|
304645
|
+
"items": {
|
|
304646
|
+
"type": "object",
|
|
304647
|
+
"properties": {
|
|
304648
|
+
"code": {
|
|
304649
|
+
"type": "string",
|
|
304650
|
+
"enum": [
|
|
304651
|
+
"family-apply-lane-unavailable",
|
|
304652
|
+
"header-footer-physical-lifecycle-unsafe",
|
|
304653
|
+
"header-footer-tracked-lifecycle-unsupported",
|
|
304654
|
+
"comment-replay-unsafe",
|
|
304655
|
+
"comment-anchor-marker-semantics-unsafe",
|
|
304656
|
+
"styles-replay-unsafe",
|
|
304657
|
+
"numbering-replay-unsafe",
|
|
304658
|
+
"section-reference-replay-unsafe",
|
|
304659
|
+
"structural-paragraph-unsupported"
|
|
304660
|
+
]
|
|
304661
|
+
},
|
|
304662
|
+
"message": {
|
|
304663
|
+
"type": "string"
|
|
304664
|
+
},
|
|
304665
|
+
"families": {
|
|
304666
|
+
"type": "array",
|
|
304667
|
+
"items": {
|
|
304668
|
+
"type": "string"
|
|
304669
|
+
}
|
|
304670
|
+
}
|
|
304671
|
+
},
|
|
304672
|
+
"additionalProperties": false,
|
|
304673
|
+
"required": [
|
|
304674
|
+
"code",
|
|
304675
|
+
"message"
|
|
304676
|
+
]
|
|
304677
|
+
}
|
|
304678
|
+
}
|
|
304679
|
+
},
|
|
304680
|
+
"additionalProperties": false,
|
|
304681
|
+
"required": [
|
|
304682
|
+
"status",
|
|
304683
|
+
"blockers"
|
|
304684
|
+
]
|
|
304685
|
+
}
|
|
304686
|
+
},
|
|
304687
|
+
"additionalProperties": false,
|
|
304688
|
+
"required": [
|
|
304689
|
+
"direct",
|
|
304690
|
+
"tracked"
|
|
304691
|
+
]
|
|
304692
|
+
},
|
|
304309
304693
|
"payload": {
|
|
304310
304694
|
"type": "object",
|
|
304311
304695
|
"description": "Opaque engine-owned diff data."
|
|
@@ -311039,7 +311423,7 @@ export const CONTRACT = {
|
|
|
311039
311423
|
"open"
|
|
311040
311424
|
],
|
|
311041
311425
|
"category": "session",
|
|
311042
|
-
"description": "Open a document and create a persistent v2 editing session. V2 single-socket collaboration supports y-websocket, Hocuspocus, and Liveblocks.",
|
|
311426
|
+
"description": "Open a document and create a persistent v2 editing session. Content override atomically initializes a blank document or replaces a template body. V2 single-socket collaboration supports y-websocket, Hocuspocus, and Liveblocks.",
|
|
311043
311427
|
"requiresDocumentContext": false,
|
|
311044
311428
|
"docRequirement": "none",
|
|
311045
311429
|
"responseEnvelopeKey": null,
|
|
@@ -311247,13 +311631,15 @@ export const CONTRACT = {
|
|
|
311247
311631
|
"name": "contentOverride",
|
|
311248
311632
|
"kind": "flag",
|
|
311249
311633
|
"type": "string",
|
|
311250
|
-
"flag": "content-override"
|
|
311634
|
+
"flag": "content-override",
|
|
311635
|
+
"description": "Complete main-body content. Requires --override-type and cannot be combined with collaboration."
|
|
311251
311636
|
},
|
|
311252
311637
|
{
|
|
311253
311638
|
"name": "overrideType",
|
|
311254
311639
|
"kind": "flag",
|
|
311255
311640
|
"type": "string",
|
|
311256
|
-
"flag": "override-type"
|
|
311641
|
+
"flag": "override-type",
|
|
311642
|
+
"description": "Content format for --content-override: markdown, html, or text. Required when --content-override is present."
|
|
311257
311643
|
},
|
|
311258
311644
|
{
|
|
311259
311645
|
"name": "roomMode",
|
|
@@ -311482,10 +311868,12 @@ export const CONTRACT = {
|
|
|
311482
311868
|
"description": "Tracked-change projection options for the opened session."
|
|
311483
311869
|
},
|
|
311484
311870
|
"contentOverride": {
|
|
311485
|
-
"type": "string"
|
|
311871
|
+
"type": "string",
|
|
311872
|
+
"description": "Complete main-body content. Requires --override-type and cannot be combined with collaboration."
|
|
311486
311873
|
},
|
|
311487
311874
|
"overrideType": {
|
|
311488
|
-
"type": "string"
|
|
311875
|
+
"type": "string",
|
|
311876
|
+
"description": "Content format for --content-override: markdown, html, or text. Required when --content-override is present."
|
|
311489
311877
|
},
|
|
311490
311878
|
"roomMode": {
|
|
311491
311879
|
"type": "string",
|
package/dist/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export { dispatchIntentTool } from './generated/intent-dispatch.generated.js';
|
|
|
94
94
|
export { wrapV2PresetCompat } from './agent/v2-preset-compat.js';
|
|
95
95
|
export type { BoundDocApi } from './generated/client.js';
|
|
96
96
|
export type { ActionName } from './agent/actions.js';
|
|
97
|
-
export type { AgentReceipt, AgentApplyArgs, AgentVerifyArgs } from './agent/runtime.js';
|
|
97
|
+
export type { AgentReceipt, AgentApplyArgs, AgentVerifyArgs, AgentInspectResult } from './agent/runtime.js';
|
|
98
98
|
export type { GetSystemPromptOptions, GetToolsOptions, GetToolsResult, PresetDescriptor } from './presets.js';
|
|
99
99
|
export { createAgentToolkit } from './tools.js';
|
|
100
100
|
export type { AgentToolkit, CreateAgentToolkitInput } from './tools.js';
|
|
@@ -18,6 +18,6 @@ These tools handle the OOXML format correctly and preserve document structure.
|
|
|
18
18
|
|
|
19
19
|
**Edit with named actions.** `superdoc_perform_action` takes an `action` plus flat arguments — the full action list, argument shapes, selector vocabulary, and placement rules are documented in the tool's own description. Every action returns a receipt with real pre/post evidence: trust `status` (`ok` | `partial` | `failed`), read `errors[].message` for recovery guidance, and re-inspect after `partial`.
|
|
20
20
|
|
|
21
|
-
**Tracked changes (redlining).** Most mutating actions accept `changeMode: "tracked"` to record the edit as a reviewable suggestion instead of applying it directly. Review with `accept_tracked_changes` / `reject_tracked_changes` (filter by `author` or `changeType`)
|
|
21
|
+
**Tracked changes (redlining).** Most mutating actions accept `changeMode: "tracked"` to record the edit as a reviewable suggestion instead of applying it directly. Review with `accept_tracked_changes` / `reject_tracked_changes` (target one change with `id`, or an exact set with `id:[…]`; or filter by `author` or `changeType`). Do not combine exact IDs with filters. Recover with `undo_changes` / `redo_changes`.
|
|
22
22
|
|
|
23
23
|
**Failures are safe.** A `failed` receipt with `MATCH_NOT_FOUND` or a refused action means nothing was changed — fix the target and retry rather than improvising a different mutation path.
|
|
@@ -57,7 +57,7 @@ ACTIONS (superdoc_perform_action with flat args)
|
|
|
57
57
|
- add_comments: commentText, and either selector (one block) or selectors:[…] to comment MANY blocks in ONE call with the same text. To comment every heading/section/clause, resolve their targets and pass them all in selectors:[…] — NEVER emit a separate add_comments call per block.
|
|
58
58
|
- reply_to_comment: commentText (the reply body), and either anchorText (text the target comment is anchored on / mentions) or commentId. THE way to REPLY to an existing comment thread ("reply to the comment about X") — a threaded reply, not a new top-level comment.
|
|
59
59
|
- resolve_comments: anchorText? (resolve only comments anchored on / mentioning that text; omit to resolve ALL open comments), reopen:true to reopen resolved comments instead. THE way to "resolve the comment(s)" / "mark comments resolved".
|
|
60
|
-
- accept_tracked_changes / reject_tracked_changes: optional author:"Full Name"
|
|
60
|
+
- accept_tracked_changes / reject_tracked_changes: id:"change-id" or id:["id1","id2"] for one atomic set, OR optional author:"Full Name" / changeType:"insert"|"delete"|"replacement"|"format" to filter. Do not combine id with author/changeType. "Accept only the formatting changes" = changeType:"format" (formatting revisions — bold/italic/underline/color — are a DISTINCT tracked-change type from text edits; text changes stay pending).
|
|
61
61
|
- format_text: bold/italic/underline/strike:true, highlight:"yellow", color (named or hex), fontSize — applied to EVERY occurrence of targetText (or targetTexts:["…","…"] for several phrases in one call; or selector for a whole block). caseSensitive:true for exact case. changeMode:"tracked" produces format-type tracked changes. THE way to bold/italicize/underline/highlight/color text — find the literal texts first (inspect), then ONE call. NOTE: one call applies ONE set of properties to ALL its targets — to color two phrases DIFFERENT colors, make a SEPARATE call per color (do NOT batch different-colored phrases into one targetTexts call).
|
|
62
62
|
- apply_style: selector (the block to restyle), then ONE of styleId ("Heading2"), headingLevel (1-6), or likeText (text inside the block whose style AND effective look to copy). "Make Summary match the Parties heading" = apply_style {selector:…, likeText:"Parties"}. THE way to restyle an existing block — never delete-and-recreate it.
|
|
63
63
|
- normalize_body_font_size: fontSize:N.
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
// AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
|
|
4
4
|
// Source of truth: package.json. Regenerated on every SDK build so the
|
|
5
5
|
// SDK retains its own version identity when bundled into another package.
|
|
6
|
-
const SDK_VERSION = '2.12.0-next.
|
|
6
|
+
const SDK_VERSION = '2.12.0-next.20';
|
|
7
7
|
|
|
8
8
|
exports.SDK_VERSION = SDK_VERSION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.12.0-next.
|
|
1
|
+
export declare const SDK_VERSION = "2.12.0-next.20";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
|
|
2
2
|
// Source of truth: package.json. Regenerated on every SDK build so the
|
|
3
3
|
// SDK retains its own version identity when bundled into another package.
|
|
4
|
-
export const SDK_VERSION = '2.12.0-next.
|
|
4
|
+
export const SDK_VERSION = '2.12.0-next.20';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/sdk",
|
|
3
|
-
"version": "2.12.0-next.
|
|
3
|
+
"version": "2.12.0-next.20",
|
|
4
4
|
"description": "Node SDK for SuperDoc, wrapping the SuperDoc CLI to read and edit .docx files from JavaScript and TypeScript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"typescript": "^5.9.2"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"@superdoc/sdk-darwin-arm64": "2.12.0-next.
|
|
42
|
-
"@superdoc/sdk-darwin-x64": "2.12.0-next.
|
|
43
|
-
"@superdoc/sdk-linux-x64": "2.12.0-next.
|
|
44
|
-
"@superdoc/sdk-linux-arm64": "2.12.0-next.
|
|
45
|
-
"@superdoc/sdk-windows-x64": "2.12.0-next.
|
|
41
|
+
"@superdoc/sdk-darwin-arm64": "2.12.0-next.20",
|
|
42
|
+
"@superdoc/sdk-darwin-x64": "2.12.0-next.20",
|
|
43
|
+
"@superdoc/sdk-linux-x64": "2.12.0-next.20",
|
|
44
|
+
"@superdoc/sdk-linux-arm64": "2.12.0-next.20",
|
|
45
|
+
"@superdoc/sdk-windows-x64": "2.12.0-next.20"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"build": "rm -rf dist && node scripts/embed-version.mjs && node scripts/embed-prompts.mjs && node scripts/embed-tools.mjs && tsc && pnpm run typecheck:consumer && rollup -c rollup.cjs.config.mjs && rm -rf dist/prompts && mkdir -p dist/prompts && cp src/prompts/*.md dist/prompts/ && pnpm run audit:publish",
|
|
52
52
|
"audit:publish": "node ../../../../scripts/audit-publish-artifact.mjs dist --label sdk-node-dist",
|
|
53
53
|
"typecheck": "tsc --noEmit",
|
|
54
|
-
"typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts ../../../../tests/consumer-typecheck/src/sdk-replace-file.mts ../../../../tests/consumer-typecheck/src/sdk-agent-evidence.mts ../../../../tests/consumer-typecheck/src/sdk-custom-actions.mts",
|
|
55
|
-
"test:agent-actions": "bun test src/__tests__/actions.test.ts src/__tests__/agent-runtime.test.ts src/__tests__/custom-actions.test.ts",
|
|
54
|
+
"typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts ../../../../tests/consumer-typecheck/src/sdk-replace-file.mts ../../../../tests/consumer-typecheck/src/sdk-agent-evidence.mts ../../../../tests/consumer-typecheck/src/sdk-custom-actions.mts ../../../../tests/consumer-typecheck/src/sd4807-sdk-inspect.mts",
|
|
55
|
+
"test:agent-actions": "bun test src/__tests__/actions.test.ts src/__tests__/agent-runtime.test.ts src/__tests__/custom-actions.test.ts src/__tests__/textbox-snapshot.test.ts",
|
|
56
56
|
"test:document-host": "bun test src/runtime/__tests__/host-spawn-args.test.ts src/runtime/__tests__/document-rpc.test.ts src/__tests__/structured-document-rpc.e2e.test.ts src/__tests__/request-timeout-ms.e2e.test.ts src/__tests__/agent-evidence.e2e.test.ts src/__tests__/agent-apply.e2e.test.ts src/__tests__/find-text.e2e.test.ts src/__tests__/custom-actions.e2e.test.ts",
|
|
57
57
|
"smoke:product-action": "node scripts/product-action-smoke.mjs"
|
|
58
58
|
}
|
package/tools/tools-policy.json
CHANGED