@superdoc-dev/sdk 1.19.1 → 1.20.0

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.
Files changed (107) hide show
  1. package/dist/action-primitives/doc-index.cjs +215 -0
  2. package/dist/action-primitives/doc-index.d.ts +83 -0
  3. package/dist/action-primitives/doc-index.d.ts.map +1 -0
  4. package/dist/action-primitives/doc-index.js +211 -0
  5. package/dist/action-primitives/engine.cjs +204 -0
  6. package/dist/action-primitives/engine.d.ts +71 -0
  7. package/dist/action-primitives/engine.d.ts.map +1 -0
  8. package/dist/action-primitives/engine.js +196 -0
  9. package/dist/action-primitives/receipt.cjs +39 -0
  10. package/dist/action-primitives/receipt.d.ts +49 -0
  11. package/dist/action-primitives/receipt.d.ts.map +1 -0
  12. package/dist/action-primitives/receipt.js +32 -0
  13. package/dist/action-primitives/resolve.cjs +252 -0
  14. package/dist/action-primitives/resolve.d.ts +56 -0
  15. package/dist/action-primitives/resolve.d.ts.map +1 -0
  16. package/dist/action-primitives/resolve.js +246 -0
  17. package/dist/action-primitives/session-cache.cjs +43 -0
  18. package/dist/action-primitives/session-cache.d.ts +19 -0
  19. package/dist/action-primitives/session-cache.d.ts.map +1 -0
  20. package/dist/action-primitives/session-cache.js +37 -0
  21. package/dist/action-primitives/tools/list-transform.cjs +661 -0
  22. package/dist/action-primitives/tools/list-transform.d.ts +98 -0
  23. package/dist/action-primitives/tools/list-transform.d.ts.map +1 -0
  24. package/dist/action-primitives/tools/list-transform.js +656 -0
  25. package/dist/action-primitives/tools/structure-insert.cjs +1343 -0
  26. package/dist/action-primitives/tools/structure-insert.d.ts +183 -0
  27. package/dist/action-primitives/tools/structure-insert.d.ts.map +1 -0
  28. package/dist/action-primitives/tools/structure-insert.js +1338 -0
  29. package/dist/action-primitives/tools/text-transform.cjs +669 -0
  30. package/dist/action-primitives/tools/text-transform.d.ts +64 -0
  31. package/dist/action-primitives/tools/text-transform.d.ts.map +1 -0
  32. package/dist/action-primitives/tools/text-transform.js +664 -0
  33. package/dist/action-primitives/types.d.ts +36 -0
  34. package/dist/action-primitives/types.d.ts.map +1 -0
  35. package/dist/action-primitives/types.js +15 -0
  36. package/dist/agent/actions.cjs +5381 -0
  37. package/dist/agent/actions.d.ts +404 -0
  38. package/dist/agent/actions.d.ts.map +1 -0
  39. package/dist/agent/actions.js +5373 -0
  40. package/dist/agent/catalog.cjs +483 -0
  41. package/dist/agent/catalog.d.ts +103 -0
  42. package/dist/agent/catalog.d.ts.map +1 -0
  43. package/dist/agent/catalog.js +471 -0
  44. package/dist/agent/doc-snapshot.cjs +663 -0
  45. package/dist/agent/doc-snapshot.d.ts +247 -0
  46. package/dist/agent/doc-snapshot.d.ts.map +1 -0
  47. package/dist/agent/doc-snapshot.js +657 -0
  48. package/dist/agent/index.d.ts +16 -0
  49. package/dist/agent/index.d.ts.map +1 -0
  50. package/dist/agent/index.js +15 -0
  51. package/dist/agent/ir.cjs +170 -0
  52. package/dist/agent/ir.d.ts +216 -0
  53. package/dist/agent/ir.d.ts.map +1 -0
  54. package/dist/agent/ir.js +181 -0
  55. package/dist/agent/operation-catalog.cjs +418 -0
  56. package/dist/agent/operation-catalog.d.ts +36 -0
  57. package/dist/agent/operation-catalog.d.ts.map +1 -0
  58. package/dist/agent/operation-catalog.js +446 -0
  59. package/dist/agent/runtime.cjs +501 -0
  60. package/dist/agent/runtime.d.ts +120 -0
  61. package/dist/agent/runtime.d.ts.map +1 -0
  62. package/dist/agent/runtime.js +493 -0
  63. package/dist/embedded-prompts.generated.cjs +13 -0
  64. package/dist/embedded-prompts.generated.d.ts +4 -0
  65. package/dist/embedded-prompts.generated.d.ts.map +1 -0
  66. package/dist/embedded-prompts.generated.js +9 -0
  67. package/dist/generated/client.cjs +18 -20
  68. package/dist/generated/client.d.ts +723 -3223
  69. package/dist/generated/client.d.ts.map +1 -1
  70. package/dist/generated/client.js +18 -20
  71. package/dist/generated/contract.cjs +12898 -18467
  72. package/dist/generated/contract.d.ts.map +1 -1
  73. package/dist/generated/contract.js +12898 -18467
  74. package/dist/generated/intent-dispatch.generated.cjs +0 -1
  75. package/dist/generated/intent-dispatch.generated.d.ts.map +1 -1
  76. package/dist/generated/intent-dispatch.generated.js +0 -1
  77. package/dist/index.cjs +3 -7
  78. package/dist/index.d.ts +8 -6
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +2 -8
  81. package/dist/presets/core.cjs +454 -0
  82. package/dist/presets/core.d.ts +20 -0
  83. package/dist/presets/core.d.ts.map +1 -0
  84. package/dist/presets/core.js +447 -0
  85. package/dist/presets.cjs +55 -8
  86. package/dist/presets.d.ts +39 -8
  87. package/dist/presets.d.ts.map +1 -1
  88. package/dist/presets.js +53 -8
  89. package/dist/prompts/mcp-prompt.md +23 -0
  90. package/dist/prompts/system-prompt.md +108 -0
  91. package/dist/runtime/transport-common.cjs +8 -0
  92. package/dist/runtime/transport-common.d.ts.map +1 -1
  93. package/dist/runtime/transport-common.js +8 -0
  94. package/dist/tools.cjs +46 -11
  95. package/dist/tools.d.ts +55 -8
  96. package/dist/tools.d.ts.map +1 -1
  97. package/dist/tools.js +45 -13
  98. package/package.json +9 -8
  99. package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
  100. package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
  101. package/tools/catalog.json +22 -178
  102. package/tools/intent_dispatch_generated.py +0 -2
  103. package/tools/tools-policy.json +1 -1
  104. package/tools/tools.anthropic.json +22 -158
  105. package/tools/tools.generic.json +23 -160
  106. package/tools/tools.openai.json +22 -158
  107. package/tools/tools.vercel.json +22 -158
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/sdk",
3
- "version": "1.19.1",
3
+ "version": "1.20.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -26,17 +26,18 @@
26
26
  "typescript": "^5.9.2"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@superdoc-dev/sdk-darwin-arm64": "1.19.1",
30
- "@superdoc-dev/sdk-linux-x64": "1.19.1",
31
- "@superdoc-dev/sdk-linux-arm64": "1.19.1",
32
- "@superdoc-dev/sdk-darwin-x64": "1.19.1",
33
- "@superdoc-dev/sdk-windows-x64": "1.19.1"
29
+ "@superdoc-dev/sdk-darwin-arm64": "1.20.0",
30
+ "@superdoc-dev/sdk-darwin-x64": "1.20.0",
31
+ "@superdoc-dev/sdk-linux-x64": "1.20.0",
32
+ "@superdoc-dev/sdk-windows-x64": "1.20.0",
33
+ "@superdoc-dev/sdk-linux-arm64": "1.20.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
38
  "scripts": {
39
- "build": "tsc && rollup -c rollup.cjs.config.mjs",
40
- "typecheck": "tsc --noEmit"
39
+ "build": "node scripts/embed-prompts.mjs && tsc && rollup -c rollup.cjs.config.mjs && rm -rf dist/prompts && mkdir -p dist/prompts && cp src/prompts/*.md dist/prompts/",
40
+ "typecheck": "tsc --noEmit",
41
+ "smoke:product-action": "node scripts/product-action-smoke.mjs"
41
42
  }
42
43
  }
@@ -4600,7 +4600,7 @@
4600
4600
  },
4601
4601
  {
4602
4602
  "toolName": "superdoc_comment",
4603
- "description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, or changes status to \"resolved\". The legacy `isInternal` field remains in schema for v1 compatibility but the v2 surface rejects it with `CAPABILITY_UNAVAILABLE`. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; only \"action\", \"text\", and \"target\" are needed.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
4603
+ "description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, or changes status to \"resolved\". The legacy `isInternal` field remains in schema for v1 compatibility but is not supported for new comment patch behavior. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; only \"action\", \"text\", and \"target\" are needed.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
4604
4604
  "inputSchema": {
4605
4605
  "type": "object",
4606
4606
  "properties": {
@@ -4742,7 +4742,7 @@
4742
4742
  },
4743
4743
  "isInternal": {
4744
4744
  "type": "boolean",
4745
- "description": "Legacy v1/document-api compatibility field. Not a supported v2 behavior. V2 adapters MUST reject a `comments.patch` request containing `isInternal` with `CAPABILITY_UNAVAILABLE` (kernel reason `internal-comments-unsupported`). The field is preserved in the schema only so v1 callers keep their input shape (`comments-spec.md` §7, §14.6). Only for action 'update'. Omit for other actions."
4745
+ "description": "Legacy v1/document-api compatibility field. Not supported for new comment patch behavior. A `comments.patch` request containing `isInternal` fails with `CAPABILITY_UNAVAILABLE` (kernel reason `internal-comments-unsupported`). The field is preserved in the schema only so v1 callers keep their input shape (`comments-spec.md` §7, §14.6). Only for action 'update'. Omit for other actions."
4746
4746
  },
4747
4747
  "includeResolved": {
4748
4748
  "type": "boolean",
@@ -4889,6 +4889,13 @@
4889
4889
  "destination"
4890
4890
  ],
4891
4891
  "description": "Optional move pairing assertion. 'pair' requires the resolved tracked change to be a paired move; 'source' / 'destination' further narrow to a specific half. When the assertion does not hold the decide adapter fails closed."
4892
+ },
4893
+ "side": {
4894
+ "enum": [
4895
+ "inserted",
4896
+ "deleted"
4897
+ ],
4898
+ "description": "Optional replacement side. When the id resolves to a paired replacement, decides only the 'inserted' or 'deleted' half, leaving the other half as a standalone pending change."
4892
4899
  }
4893
4900
  },
4894
4901
  "additionalProperties": false,
@@ -5087,6 +5094,13 @@
5087
5094
  "destination"
5088
5095
  ],
5089
5096
  "description": "Optional move pairing assertion. 'pair' requires the resolved tracked change to be a paired move; 'source' / 'destination' further narrow to a specific half. When the assertion does not hold the decide adapter fails closed."
5097
+ },
5098
+ "side": {
5099
+ "enum": [
5100
+ "inserted",
5101
+ "deleted"
5102
+ ],
5103
+ "description": "Optional replacement side. When the id resolves to a paired replacement, decides only the 'inserted' or 'deleted' half."
5090
5104
  }
5091
5105
  },
5092
5106
  "additionalProperties": false,
@@ -7433,7 +7447,6 @@
7433
7447
  "insert_column",
7434
7448
  "insert_row",
7435
7449
  "merge_cells",
7436
- "move_row",
7437
7450
  "set_borders",
7438
7451
  "set_cell",
7439
7452
  "set_cell_text",
@@ -7446,7 +7459,7 @@
7446
7459
  "set_style_options",
7447
7460
  "unmerge_cells"
7448
7461
  ],
7449
- "description": "The action to perform. One of: delete, delete_column, delete_row, insert_column, insert_row, merge_cells, move_row, set_borders, set_cell, set_cell_text, set_column, set_layout, set_options, set_row, set_row_options, set_shading, set_style_options, unmerge_cells."
7462
+ "description": "The action to perform. One of: delete, delete_column, delete_row, insert_column, insert_row, merge_cells, set_borders, set_cell, set_cell_text, set_column, set_layout, set_options, set_row, set_row_options, set_shading, set_style_options, unmerge_cells."
7450
7463
  },
7451
7464
  "force": {
7452
7465
  "type": "boolean",
@@ -7494,34 +7507,20 @@
7494
7507
  "oneOf": [
7495
7508
  {
7496
7509
  "oneOf": [
7510
+ {
7511
+ "$ref": "#/$defs/TableAddress"
7512
+ },
7497
7513
  {
7498
7514
  "oneOf": [
7499
- {
7500
- "$ref": "#/$defs/TableAddress"
7501
- },
7502
7515
  {
7503
7516
  "oneOf": [
7504
7517
  {
7505
- "oneOf": [
7506
- {
7507
- "$ref": "#/$defs/TableRowAddress"
7508
- },
7509
- {
7510
- "$ref": "#/$defs/TableAddress"
7511
- }
7512
- ]
7518
+ "$ref": "#/$defs/TableRowAddress"
7513
7519
  },
7514
7520
  {
7515
7521
  "$ref": "#/$defs/TableAddress"
7516
7522
  }
7517
7523
  ]
7518
- }
7519
- ]
7520
- },
7521
- {
7522
- "oneOf": [
7523
- {
7524
- "$ref": "#/$defs/TableRowAddress"
7525
7524
  },
7526
7525
  {
7527
7526
  "$ref": "#/$defs/TableAddress"
@@ -7697,142 +7696,7 @@
7697
7696
  "rowIndex": {
7698
7697
  "type": "integer",
7699
7698
  "minimum": 0,
7700
- "description": "Only for actions 'insert_row', 'delete_row', 'move_row', 'set_row', 'set_row_options', 'unmerge_cells', 'set_cell_text'. Omit for other actions."
7701
- },
7702
- "destination": {
7703
- "oneOf": [
7704
- {
7705
- "type": "object",
7706
- "properties": {
7707
- "kind": {
7708
- "const": "first",
7709
- "type": "string"
7710
- }
7711
- },
7712
- "additionalProperties": false,
7713
- "required": [
7714
- "kind"
7715
- ]
7716
- },
7717
- {
7718
- "type": "object",
7719
- "properties": {
7720
- "kind": {
7721
- "const": "last",
7722
- "type": "string"
7723
- }
7724
- },
7725
- "additionalProperties": false,
7726
- "required": [
7727
- "kind"
7728
- ]
7729
- },
7730
- {
7731
- "type": "object",
7732
- "properties": {
7733
- "kind": {
7734
- "const": "before",
7735
- "type": "string"
7736
- },
7737
- "rowIndex": {
7738
- "type": "integer",
7739
- "minimum": 0
7740
- }
7741
- },
7742
- "additionalProperties": false,
7743
- "required": [
7744
- "kind",
7745
- "rowIndex"
7746
- ]
7747
- },
7748
- {
7749
- "type": "object",
7750
- "properties": {
7751
- "kind": {
7752
- "const": "after",
7753
- "type": "string"
7754
- },
7755
- "rowIndex": {
7756
- "type": "integer",
7757
- "minimum": 0
7758
- }
7759
- },
7760
- "additionalProperties": false,
7761
- "required": [
7762
- "kind",
7763
- "rowIndex"
7764
- ]
7765
- },
7766
- {
7767
- "type": "object",
7768
- "properties": {
7769
- "kind": {
7770
- "const": "before",
7771
- "type": "string"
7772
- },
7773
- "target": {
7774
- "$ref": "#/$defs/TableRowAddress"
7775
- }
7776
- },
7777
- "additionalProperties": false,
7778
- "required": [
7779
- "kind",
7780
- "target"
7781
- ]
7782
- },
7783
- {
7784
- "type": "object",
7785
- "properties": {
7786
- "kind": {
7787
- "const": "after",
7788
- "type": "string"
7789
- },
7790
- "target": {
7791
- "$ref": "#/$defs/TableRowAddress"
7792
- }
7793
- },
7794
- "additionalProperties": false,
7795
- "required": [
7796
- "kind",
7797
- "target"
7798
- ]
7799
- },
7800
- {
7801
- "type": "object",
7802
- "properties": {
7803
- "kind": {
7804
- "const": "before",
7805
- "type": "string"
7806
- },
7807
- "nodeId": {
7808
- "type": "string"
7809
- }
7810
- },
7811
- "additionalProperties": false,
7812
- "required": [
7813
- "kind",
7814
- "nodeId"
7815
- ]
7816
- },
7817
- {
7818
- "type": "object",
7819
- "properties": {
7820
- "kind": {
7821
- "const": "after",
7822
- "type": "string"
7823
- },
7824
- "nodeId": {
7825
- "type": "string"
7826
- }
7827
- },
7828
- "additionalProperties": false,
7829
- "required": [
7830
- "kind",
7831
- "nodeId"
7832
- ]
7833
- }
7834
- ],
7835
- "description": "Required for action 'move_row'."
7699
+ "description": "Only for actions 'insert_row', 'delete_row', 'set_row', 'set_row_options', 'unmerge_cells', 'set_cell_text'. Omit for other actions."
7836
7700
  },
7837
7701
  "heightPt": {
7838
7702
  "type": "number",
@@ -8375,26 +8239,6 @@
8375
8239
  ]
8376
8240
  ]
8377
8241
  },
8378
- {
8379
- "operationId": "doc.tables.moveRow",
8380
- "intentAction": "move_row",
8381
- "requiredOneOf": [
8382
- [
8383
- "target",
8384
- "destination"
8385
- ],
8386
- [
8387
- "target",
8388
- "rowIndex",
8389
- "destination"
8390
- ],
8391
- [
8392
- "nodeId",
8393
- "rowIndex",
8394
- "destination"
8395
- ]
8396
- ]
8397
- },
8398
8242
  {
8399
8243
  "operationId": "doc.tables.setRowHeight",
8400
8244
  "intentAction": "set_row",
@@ -149,8 +149,6 @@ def dispatch_intent_tool(
149
149
  return execute('doc.tables.insertRow', rest)
150
150
  elif action == 'delete_row':
151
151
  return execute('doc.tables.deleteRow', rest)
152
- elif action == 'move_row':
153
- return execute('doc.tables.moveRow', rest)
154
152
  elif action == 'set_row':
155
153
  return execute('doc.tables.setRowHeight', rest)
156
154
  elif action == 'set_row_options':
@@ -43,5 +43,5 @@
43
43
  "mutates": true
44
44
  }
45
45
  ],
46
- "contractHash": "a870119c850007e1b994fcaa36fcc58302b9e340657fe3634f589a83daf309fb"
46
+ "contractHash": "2954ad7f0581c8cbaa8903cf227429d4bc1c0ca550a663f3b5bd28449323717f"
47
47
  }
@@ -4322,7 +4322,7 @@
4322
4322
  },
4323
4323
  {
4324
4324
  "name": "superdoc_comment",
4325
- "description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, or changes status to \"resolved\". The legacy `isInternal` field remains in schema for v1 compatibility but the v2 surface rejects it with `CAPABILITY_UNAVAILABLE`. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; only \"action\", \"text\", and \"target\" are needed.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
4325
+ "description": "Manage document comment threads: create, read, update, and delete. To create a comment, first use superdoc_search to find the target text, then pass action \"create\" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:\"text\", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:\"text\", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). For threaded replies, pass \"parentId\" with the parent comment ID. Action \"list\" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action \"get\" retrieves a single comment by ID. Action \"update\" changes comment text, re-anchors the thread, or changes status to \"resolved\". The legacy `isInternal` field remains in schema for v1 compatibility but is not supported for new comment patch behavior. Action \"delete\" removes a comment or reply by ID. Do NOT pass \"ref\", \"id\", or \"parentId\" when creating a new top-level comment; only \"action\", \"text\", and \"target\" are needed.\n\nEXAMPLES:\n 1. {\"action\":\"create\",\"text\":\"Please review this section.\",\"target\":{\"kind\":\"text\",\"blockId\":\"<blockId>\",\"range\":{\"start\":5,\"end\":25}}}\n 2. {\"action\":\"list\",\"limit\":20,\"offset\":0}\n 3. {\"action\":\"update\",\"id\":\"<commentId>\",\"status\":\"resolved\"}\n 4. {\"action\":\"delete\",\"id\":\"<commentId>\"}",
4326
4326
  "input_schema": {
4327
4327
  "type": "object",
4328
4328
  "properties": {
@@ -4464,7 +4464,7 @@
4464
4464
  },
4465
4465
  "isInternal": {
4466
4466
  "type": "boolean",
4467
- "description": "Legacy v1/document-api compatibility field. Not a supported v2 behavior. V2 adapters MUST reject a `comments.patch` request containing `isInternal` with `CAPABILITY_UNAVAILABLE` (kernel reason `internal-comments-unsupported`). The field is preserved in the schema only so v1 callers keep their input shape (`comments-spec.md` §7, §14.6). Only for action 'update'. Omit for other actions."
4467
+ "description": "Legacy v1/document-api compatibility field. Not supported for new comment patch behavior. A `comments.patch` request containing `isInternal` fails with `CAPABILITY_UNAVAILABLE` (kernel reason `internal-comments-unsupported`). The field is preserved in the schema only so v1 callers keep their input shape (`comments-spec.md` §7, §14.6). Only for action 'update'. Omit for other actions."
4468
4468
  },
4469
4469
  "includeResolved": {
4470
4470
  "type": "boolean",
@@ -4579,6 +4579,13 @@
4579
4579
  "destination"
4580
4580
  ],
4581
4581
  "description": "Optional move pairing assertion. 'pair' requires the resolved tracked change to be a paired move; 'source' / 'destination' further narrow to a specific half. When the assertion does not hold the decide adapter fails closed."
4582
+ },
4583
+ "side": {
4584
+ "enum": [
4585
+ "inserted",
4586
+ "deleted"
4587
+ ],
4588
+ "description": "Optional replacement side. When the id resolves to a paired replacement, decides only the 'inserted' or 'deleted' half, leaving the other half as a standalone pending change."
4582
4589
  }
4583
4590
  },
4584
4591
  "additionalProperties": false,
@@ -4777,6 +4784,13 @@
4777
4784
  "destination"
4778
4785
  ],
4779
4786
  "description": "Optional move pairing assertion. 'pair' requires the resolved tracked change to be a paired move; 'source' / 'destination' further narrow to a specific half. When the assertion does not hold the decide adapter fails closed."
4787
+ },
4788
+ "side": {
4789
+ "enum": [
4790
+ "inserted",
4791
+ "deleted"
4792
+ ],
4793
+ "description": "Optional replacement side. When the id resolves to a paired replacement, decides only the 'inserted' or 'deleted' half."
4780
4794
  }
4781
4795
  },
4782
4796
  "additionalProperties": false,
@@ -7077,7 +7091,6 @@
7077
7091
  "insert_column",
7078
7092
  "insert_row",
7079
7093
  "merge_cells",
7080
- "move_row",
7081
7094
  "set_borders",
7082
7095
  "set_cell",
7083
7096
  "set_cell_text",
@@ -7090,7 +7103,7 @@
7090
7103
  "set_style_options",
7091
7104
  "unmerge_cells"
7092
7105
  ],
7093
- "description": "The action to perform. One of: delete, delete_column, delete_row, insert_column, insert_row, merge_cells, move_row, set_borders, set_cell, set_cell_text, set_column, set_layout, set_options, set_row, set_row_options, set_shading, set_style_options, unmerge_cells."
7106
+ "description": "The action to perform. One of: delete, delete_column, delete_row, insert_column, insert_row, merge_cells, set_borders, set_cell, set_cell_text, set_column, set_layout, set_options, set_row, set_row_options, set_shading, set_style_options, unmerge_cells."
7094
7107
  },
7095
7108
  "force": {
7096
7109
  "type": "boolean",
@@ -7138,34 +7151,20 @@
7138
7151
  "oneOf": [
7139
7152
  {
7140
7153
  "oneOf": [
7154
+ {
7155
+ "$ref": "#/$defs/TableAddress"
7156
+ },
7141
7157
  {
7142
7158
  "oneOf": [
7143
- {
7144
- "$ref": "#/$defs/TableAddress"
7145
- },
7146
7159
  {
7147
7160
  "oneOf": [
7148
7161
  {
7149
- "oneOf": [
7150
- {
7151
- "$ref": "#/$defs/TableRowAddress"
7152
- },
7153
- {
7154
- "$ref": "#/$defs/TableAddress"
7155
- }
7156
- ]
7162
+ "$ref": "#/$defs/TableRowAddress"
7157
7163
  },
7158
7164
  {
7159
7165
  "$ref": "#/$defs/TableAddress"
7160
7166
  }
7161
7167
  ]
7162
- }
7163
- ]
7164
- },
7165
- {
7166
- "oneOf": [
7167
- {
7168
- "$ref": "#/$defs/TableRowAddress"
7169
7168
  },
7170
7169
  {
7171
7170
  "$ref": "#/$defs/TableAddress"
@@ -7341,142 +7340,7 @@
7341
7340
  "rowIndex": {
7342
7341
  "type": "integer",
7343
7342
  "minimum": 0,
7344
- "description": "Only for actions 'insert_row', 'delete_row', 'move_row', 'set_row', 'set_row_options', 'unmerge_cells', 'set_cell_text'. Omit for other actions."
7345
- },
7346
- "destination": {
7347
- "oneOf": [
7348
- {
7349
- "type": "object",
7350
- "properties": {
7351
- "kind": {
7352
- "const": "first",
7353
- "type": "string"
7354
- }
7355
- },
7356
- "additionalProperties": false,
7357
- "required": [
7358
- "kind"
7359
- ]
7360
- },
7361
- {
7362
- "type": "object",
7363
- "properties": {
7364
- "kind": {
7365
- "const": "last",
7366
- "type": "string"
7367
- }
7368
- },
7369
- "additionalProperties": false,
7370
- "required": [
7371
- "kind"
7372
- ]
7373
- },
7374
- {
7375
- "type": "object",
7376
- "properties": {
7377
- "kind": {
7378
- "const": "before",
7379
- "type": "string"
7380
- },
7381
- "rowIndex": {
7382
- "type": "integer",
7383
- "minimum": 0
7384
- }
7385
- },
7386
- "additionalProperties": false,
7387
- "required": [
7388
- "kind",
7389
- "rowIndex"
7390
- ]
7391
- },
7392
- {
7393
- "type": "object",
7394
- "properties": {
7395
- "kind": {
7396
- "const": "after",
7397
- "type": "string"
7398
- },
7399
- "rowIndex": {
7400
- "type": "integer",
7401
- "minimum": 0
7402
- }
7403
- },
7404
- "additionalProperties": false,
7405
- "required": [
7406
- "kind",
7407
- "rowIndex"
7408
- ]
7409
- },
7410
- {
7411
- "type": "object",
7412
- "properties": {
7413
- "kind": {
7414
- "const": "before",
7415
- "type": "string"
7416
- },
7417
- "target": {
7418
- "$ref": "#/$defs/TableRowAddress"
7419
- }
7420
- },
7421
- "additionalProperties": false,
7422
- "required": [
7423
- "kind",
7424
- "target"
7425
- ]
7426
- },
7427
- {
7428
- "type": "object",
7429
- "properties": {
7430
- "kind": {
7431
- "const": "after",
7432
- "type": "string"
7433
- },
7434
- "target": {
7435
- "$ref": "#/$defs/TableRowAddress"
7436
- }
7437
- },
7438
- "additionalProperties": false,
7439
- "required": [
7440
- "kind",
7441
- "target"
7442
- ]
7443
- },
7444
- {
7445
- "type": "object",
7446
- "properties": {
7447
- "kind": {
7448
- "const": "before",
7449
- "type": "string"
7450
- },
7451
- "nodeId": {
7452
- "type": "string"
7453
- }
7454
- },
7455
- "additionalProperties": false,
7456
- "required": [
7457
- "kind",
7458
- "nodeId"
7459
- ]
7460
- },
7461
- {
7462
- "type": "object",
7463
- "properties": {
7464
- "kind": {
7465
- "const": "after",
7466
- "type": "string"
7467
- },
7468
- "nodeId": {
7469
- "type": "string"
7470
- }
7471
- },
7472
- "additionalProperties": false,
7473
- "required": [
7474
- "kind",
7475
- "nodeId"
7476
- ]
7477
- }
7478
- ],
7479
- "description": "Required for action 'move_row'."
7343
+ "description": "Only for actions 'insert_row', 'delete_row', 'set_row', 'set_row_options', 'unmerge_cells', 'set_cell_text'. Omit for other actions."
7480
7344
  },
7481
7345
  "heightPt": {
7482
7346
  "type": "number",