@superdoc/cli 0.45.0-next.9 → 0.46.0-next.1
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/dist/index.js +118466 -113056
- package/dist/prompts/mcp-prompt.md +2 -0
- package/dist/prompts/system-prompt.md +1 -1
- package/dist/tools/catalog.json +171 -3
- package/dist/tools/system-prompt-mcp.md +1 -0
- package/dist/tools/system-prompt.md +1 -0
- package/dist/tools/tools.anthropic.json +171 -3
- package/dist/tools/tools.generic.json +171 -3
- package/dist/tools/tools.openai.json +171 -3
- package/dist/tools/tools.vercel.json +171 -3
- package/package.json +11 -10
|
@@ -18,6 +18,8 @@ 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
|
+
**Target one repeated match.** For `replace_text`, scope to one block with a selector and set `occurrence` on the edit (1 = first match in that block) to change only that match. Also pass `expectedRevision` from your latest inspect or receipt; on `REVISION_CONFLICT`, inspect again and recount.
|
|
22
|
+
|
|
21
23
|
**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
24
|
|
|
23
25
|
**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.
|
|
@@ -48,7 +48,7 @@ ACTIONS (superdoc_perform_action with flat args)
|
|
|
48
48
|
- undo_changes: untilMarker (rendered marker from the original state, e.g. "2.1.") or steps (1-25). Deterministic revert — steps history back until the marker reappears; the receipt proves it. NEVER use steps > 1 blindly: prefer untilMarker, and after ANY undo verify (superdoc_inspect) that content you meant to KEEP still exists — if you overshot, redo_changes {steps:N} steps forward again to recover it.
|
|
49
49
|
- redo_changes: steps (1-25, default 1). Steps history FORWARD to re-apply edits a prior undo removed — THE recovery for an undo overshoot. Only reaches the forward branch until a NEW edit is made.
|
|
50
50
|
- attach_numbering: anchorText (text of the block) or nodeId, likeMarker (rendered marker of a sibling clause, e.g. "10."). Makes an EXISTING block a numbered clause at the same scheme/level — "make this the section 11 heading" in a clause-numbered document is exactly this (it will render as the next number).
|
|
51
|
-
- replace_text: edits:[{find,replace}], caseSensitive default false. selector to scope. changeMode:"tracked" if asked. The receipt reports editsApplied and editsSkipped per find — READ IT: a skipped find is not in the selected block; re-target instead of assuming success.
|
|
51
|
+
- replace_text: edits:[{find,replace,occurrence?}], caseSensitive default false. selector to scope. Keep find/replace spans MINIMAL. If the find appears more than once in the selected block and only one should change, give that edit occurrence (1 = first match in the block; needs selector; not selector.occurrence). With occurrence, also pass expectedRevision from your latest inspect or receipt; on REVISION_CONFLICT inspect again and recount. changeMode:"tracked" if asked. The receipt reports editsApplied and editsSkipped per find — READ IT: a skipped find is not in the selected block; re-target instead of assuming success.
|
|
52
52
|
- delete_text: finds:[string]. selector to scope deletions to ONE block — REQUIRED for whitespace-only finds (unscoped whitespace matches document-wide and is refused). changeMode:"tracked" if asked. Deletes TEXT ONLY: the block survives, so a list item keeps its bullet/number and an accepted tracked deletion leaves an empty numbered item behind. To remove the item itself use delete_blocks.
|
|
53
53
|
- delete_blocks: selectors:[…], each resolving to ONE block (list item, paragraph or heading). changeMode:"tracked" if asked. THE way to DELETE a whole LIST ITEM, paragraph or heading — the bullet/number goes with it and the remaining items renumber. "Delete the first item under Article II" / "remove that clause" is exactly this, NOT delete_text. Pass every target in ONE call. Use delete_table for a whole table.
|
|
54
54
|
- rewrite_block: selector, text. Inspect first to gather current text; never ask the user to paste text already in the doc.
|
package/dist/tools/catalog.json
CHANGED
|
@@ -4654,6 +4654,10 @@
|
|
|
4654
4654
|
"type": "string",
|
|
4655
4655
|
"description": "Text content for the new list item. Only for action 'insert'. Omit for other actions."
|
|
4656
4656
|
},
|
|
4657
|
+
"inheritFrom": {
|
|
4658
|
+
"$ref": "#/$defs/ListItemAddress",
|
|
4659
|
+
"description": "Optional same-story list item to inherit paragraph and run formatting from without changing placement or numbering. When omitted, existing paragraph-creation formatting behavior, including next-style handling, is preserved. Only for action 'insert'. Omit for other actions."
|
|
4660
|
+
},
|
|
4657
4661
|
"input": {
|
|
4658
4662
|
"type": "object",
|
|
4659
4663
|
"description": "Operation input as JSON object."
|
|
@@ -6539,7 +6543,7 @@
|
|
|
6539
6543
|
},
|
|
6540
6544
|
{
|
|
6541
6545
|
"toolName": "superdoc_search",
|
|
6542
|
-
"description": "Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (superdoc_edit, superdoc_format). Within a superdoc_mutations batch, selectors in \"where\" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The \"require\" parameter controls match cardinality: \"first\" returns one match, \"all\" returns every match, \"exactlyOne\" fails if not exactly one match. Supports scoping via \"within\" to search inside a single block. Patterns are plain text by default; pass select.mode: \"regex\" for regular-expression search (g/gi semantics, 1024-char cap, no wholeWord, capture groups returned on matches). Invalid or unsafe patterns fail with INVALID_INPUT. Do NOT use markdown formatting markers (#, **, etc.) in search patterns. Do NOT use this tool when you already have a ref from superdoc_get_content blocks or superdoc_create; use that ref directly.\n\nEXAMPLES:\n 1. {\"select\":{\"type\":\"text\",\"pattern\":\"Introduction\"},\"require\":\"first\"}\n 2. {\"select\":{\"type\":\"text\",\"pattern\":\"total amount\"},\"require\":\"all\"}\n 3. {\"select\":{\"type\":\"node\",\"nodeType\":\"heading\"},\"require\":\"all\"}\n 4. {\"select\":{\"type\":\"text\",\"pattern\":\"contract\"},\"within\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"abc123\"},\"require\":\"first\"}",
|
|
6546
|
+
"description": "Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (superdoc_edit, superdoc_format). Within a superdoc_mutations batch, selectors in \"where\" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The \"require\" parameter controls match cardinality: \"first\" returns one match, \"last\" returns the final match (without limit/offset), \"all\" returns every match, \"exactlyOne\" fails if not exactly one match. Supports scoping via \"within\" to search inside a single block. Patterns are plain text by default; pass select.mode: \"regex\" for regular-expression search (g/gi semantics, 1024-char cap, no wholeWord, capture groups returned on matches). Invalid or unsafe patterns fail with INVALID_INPUT. Do NOT use markdown formatting markers (#, **, etc.) in search patterns. Do NOT use this tool when you already have a ref from superdoc_get_content blocks or superdoc_create; use that ref directly.\n\nEXAMPLES:\n 1. {\"select\":{\"type\":\"text\",\"pattern\":\"Introduction\"},\"require\":\"first\"}\n 2. {\"select\":{\"type\":\"text\",\"pattern\":\"total amount\"},\"require\":\"all\"}\n 3. {\"select\":{\"type\":\"node\",\"nodeType\":\"heading\"},\"require\":\"all\"}\n 4. {\"select\":{\"type\":\"text\",\"pattern\":\"contract\"},\"within\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"abc123\"},\"require\":\"first\"}",
|
|
6543
6547
|
"inputSchema": {
|
|
6544
6548
|
"type": "object",
|
|
6545
6549
|
"properties": {
|
|
@@ -6646,10 +6650,11 @@
|
|
|
6646
6650
|
"enum": [
|
|
6647
6651
|
"any",
|
|
6648
6652
|
"first",
|
|
6653
|
+
"last",
|
|
6649
6654
|
"exactlyOne",
|
|
6650
6655
|
"all"
|
|
6651
6656
|
],
|
|
6652
|
-
"description": "Match cardinality: 'any' (all matches), 'first' (only first), 'exactlyOne' (fail if != 1), 'all' (fail if 0)."
|
|
6657
|
+
"description": "Match cardinality: 'any' (all matches), 'first' (only first), 'last' (final scoped match, without limit/offset), 'exactlyOne' (fail if != 1), 'all' (fail if 0). For 'last', page.offset reports the selected match's ordinal in the full set."
|
|
6653
6658
|
},
|
|
6654
6659
|
"mode": {
|
|
6655
6660
|
"enum": [
|
|
@@ -9225,10 +9230,133 @@
|
|
|
9225
9230
|
"where",
|
|
9226
9231
|
"args"
|
|
9227
9232
|
]
|
|
9233
|
+
},
|
|
9234
|
+
{
|
|
9235
|
+
"type": "object",
|
|
9236
|
+
"properties": {
|
|
9237
|
+
"id": {
|
|
9238
|
+
"type": "string",
|
|
9239
|
+
"minLength": 1
|
|
9240
|
+
},
|
|
9241
|
+
"op": {
|
|
9242
|
+
"const": "comments.patch",
|
|
9243
|
+
"type": "string"
|
|
9244
|
+
},
|
|
9245
|
+
"args": {
|
|
9246
|
+
"type": "object",
|
|
9247
|
+
"properties": {
|
|
9248
|
+
"commentId": {
|
|
9249
|
+
"type": "string",
|
|
9250
|
+
"minLength": 1
|
|
9251
|
+
},
|
|
9252
|
+
"target": {
|
|
9253
|
+
"oneOf": [
|
|
9254
|
+
{
|
|
9255
|
+
"$ref": "#/$defs/TextAddress"
|
|
9256
|
+
},
|
|
9257
|
+
{
|
|
9258
|
+
"$ref": "#/$defs/SelectionTarget"
|
|
9259
|
+
}
|
|
9260
|
+
]
|
|
9261
|
+
}
|
|
9262
|
+
},
|
|
9263
|
+
"additionalProperties": false,
|
|
9264
|
+
"required": [
|
|
9265
|
+
"commentId",
|
|
9266
|
+
"target"
|
|
9267
|
+
]
|
|
9268
|
+
}
|
|
9269
|
+
},
|
|
9270
|
+
"additionalProperties": false,
|
|
9271
|
+
"required": [
|
|
9272
|
+
"id",
|
|
9273
|
+
"op",
|
|
9274
|
+
"args"
|
|
9275
|
+
]
|
|
9276
|
+
},
|
|
9277
|
+
{
|
|
9278
|
+
"type": "object",
|
|
9279
|
+
"properties": {
|
|
9280
|
+
"id": {
|
|
9281
|
+
"type": "string",
|
|
9282
|
+
"minLength": 1
|
|
9283
|
+
},
|
|
9284
|
+
"op": {
|
|
9285
|
+
"const": "trackChanges.decide",
|
|
9286
|
+
"type": "string"
|
|
9287
|
+
},
|
|
9288
|
+
"args": {
|
|
9289
|
+
"type": "object",
|
|
9290
|
+
"properties": {
|
|
9291
|
+
"decision": {
|
|
9292
|
+
"enum": [
|
|
9293
|
+
"accept",
|
|
9294
|
+
"reject"
|
|
9295
|
+
],
|
|
9296
|
+
"type": "string"
|
|
9297
|
+
},
|
|
9298
|
+
"target": {
|
|
9299
|
+
"oneOf": [
|
|
9300
|
+
{
|
|
9301
|
+
"type": "object",
|
|
9302
|
+
"properties": {
|
|
9303
|
+
"kind": {
|
|
9304
|
+
"const": "id",
|
|
9305
|
+
"type": "string"
|
|
9306
|
+
},
|
|
9307
|
+
"id": {
|
|
9308
|
+
"type": "string",
|
|
9309
|
+
"minLength": 1
|
|
9310
|
+
}
|
|
9311
|
+
},
|
|
9312
|
+
"additionalProperties": false,
|
|
9313
|
+
"required": [
|
|
9314
|
+
"kind",
|
|
9315
|
+
"id"
|
|
9316
|
+
]
|
|
9317
|
+
},
|
|
9318
|
+
{
|
|
9319
|
+
"type": "object",
|
|
9320
|
+
"properties": {
|
|
9321
|
+
"kind": {
|
|
9322
|
+
"const": "ids",
|
|
9323
|
+
"type": "string"
|
|
9324
|
+
},
|
|
9325
|
+
"ids": {
|
|
9326
|
+
"type": "array",
|
|
9327
|
+
"items": {
|
|
9328
|
+
"type": "string",
|
|
9329
|
+
"minLength": 1
|
|
9330
|
+
},
|
|
9331
|
+
"minItems": 1
|
|
9332
|
+
}
|
|
9333
|
+
},
|
|
9334
|
+
"additionalProperties": false,
|
|
9335
|
+
"required": [
|
|
9336
|
+
"kind",
|
|
9337
|
+
"ids"
|
|
9338
|
+
]
|
|
9339
|
+
}
|
|
9340
|
+
]
|
|
9341
|
+
}
|
|
9342
|
+
},
|
|
9343
|
+
"additionalProperties": false,
|
|
9344
|
+
"required": [
|
|
9345
|
+
"decision",
|
|
9346
|
+
"target"
|
|
9347
|
+
]
|
|
9348
|
+
}
|
|
9349
|
+
},
|
|
9350
|
+
"additionalProperties": false,
|
|
9351
|
+
"required": [
|
|
9352
|
+
"id",
|
|
9353
|
+
"op",
|
|
9354
|
+
"args"
|
|
9355
|
+
]
|
|
9228
9356
|
}
|
|
9229
9357
|
]
|
|
9230
9358
|
},
|
|
9231
|
-
"description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, or
|
|
9359
|
+
"description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, assert, comments.patch, or trackChanges.decide). Core steps use 'where'; review steps use explicit native args and require direct body-only plans with relocations before decisions. Check runtime capabilities for operation-specific content and targeting restrictions."
|
|
9232
9360
|
},
|
|
9233
9361
|
"detail": {
|
|
9234
9362
|
"type": "object",
|
|
@@ -9299,6 +9427,22 @@
|
|
|
9299
9427
|
"exact"
|
|
9300
9428
|
]
|
|
9301
9429
|
},
|
|
9430
|
+
"Range": {
|
|
9431
|
+
"type": "object",
|
|
9432
|
+
"properties": {
|
|
9433
|
+
"start": {
|
|
9434
|
+
"type": "integer"
|
|
9435
|
+
},
|
|
9436
|
+
"end": {
|
|
9437
|
+
"type": "integer"
|
|
9438
|
+
}
|
|
9439
|
+
},
|
|
9440
|
+
"additionalProperties": false,
|
|
9441
|
+
"required": [
|
|
9442
|
+
"start",
|
|
9443
|
+
"end"
|
|
9444
|
+
]
|
|
9445
|
+
},
|
|
9302
9446
|
"SectionAddress": {
|
|
9303
9447
|
"type": "object",
|
|
9304
9448
|
"properties": {
|
|
@@ -9590,6 +9734,30 @@
|
|
|
9590
9734
|
}
|
|
9591
9735
|
]
|
|
9592
9736
|
},
|
|
9737
|
+
"TextAddress": {
|
|
9738
|
+
"type": "object",
|
|
9739
|
+
"properties": {
|
|
9740
|
+
"kind": {
|
|
9741
|
+
"const": "text",
|
|
9742
|
+
"type": "string"
|
|
9743
|
+
},
|
|
9744
|
+
"blockId": {
|
|
9745
|
+
"type": "string"
|
|
9746
|
+
},
|
|
9747
|
+
"range": {
|
|
9748
|
+
"$ref": "#/$defs/Range"
|
|
9749
|
+
},
|
|
9750
|
+
"story": {
|
|
9751
|
+
"$ref": "#/$defs/StoryLocator"
|
|
9752
|
+
}
|
|
9753
|
+
},
|
|
9754
|
+
"additionalProperties": false,
|
|
9755
|
+
"required": [
|
|
9756
|
+
"kind",
|
|
9757
|
+
"blockId",
|
|
9758
|
+
"range"
|
|
9759
|
+
]
|
|
9760
|
+
},
|
|
9593
9761
|
"TextCoordinateSpace": {
|
|
9594
9762
|
"enum": [
|
|
9595
9763
|
"visible",
|
|
@@ -475,6 +475,7 @@ When formatting newly created content, use the right source:
|
|
|
475
475
|
- **`within` scopes to a single block**, not a section. To find text in a section, search the full document.
|
|
476
476
|
- **Table cells are separate blocks.** Search for individual cell values, not patterns spanning multiple cells.
|
|
477
477
|
- **Do NOT combine `limit`/`offset` with `require: "first"` or `require: "exactlyOne"`.** Use `require: "any"` with `limit` for paginated results.
|
|
478
|
+
- **`require: "last"` returns the final match and rejects any `limit` or `offset`.**
|
|
478
479
|
- **Do NOT hardcode formatting values.** Always read from blocks data and replicate.
|
|
479
480
|
- **Do NOT copy heading/title formatting onto body paragraphs.** Read from body text blocks (alignment "justify" or "left"), not title blocks.
|
|
480
481
|
- **Pass structured objects, not JSON-encoded strings.** Fields like `at`, `target`, and `inline` expect objects, not serialized JSON strings.
|
|
@@ -429,6 +429,7 @@ When formatting newly created content, use the right source:
|
|
|
429
429
|
- **`within` scopes to a single block**, not a section. To find text in a section, search the full document.
|
|
430
430
|
- **Table cells are separate blocks.** Search for individual cell values, not patterns spanning multiple cells.
|
|
431
431
|
- **Do NOT combine `limit`/`offset` with `require: "first"` or `require: "exactlyOne"`.** Use `require: "any"` with `limit` for paginated results.
|
|
432
|
+
- **`require: "last"` returns the final match and rejects any `limit` or `offset`.**
|
|
432
433
|
- **Do NOT hardcode formatting values.** Always read from blocks data and replicate.
|
|
433
434
|
- **Do NOT copy heading/title formatting onto body paragraphs.** Read from body text blocks (alignment "justify" or "left"), not title blocks.
|
|
434
435
|
- **Pass structured objects, not JSON-encoded strings.** Fields like `at`, `target`, and `inline` expect objects, not serialized JSON strings.
|
|
@@ -4363,6 +4363,10 @@
|
|
|
4363
4363
|
"type": "string",
|
|
4364
4364
|
"description": "Text content for the new list item. Only for action 'insert'. Omit for other actions."
|
|
4365
4365
|
},
|
|
4366
|
+
"inheritFrom": {
|
|
4367
|
+
"$ref": "#/$defs/ListItemAddress",
|
|
4368
|
+
"description": "Optional same-story list item to inherit paragraph and run formatting from without changing placement or numbering. When omitted, existing paragraph-creation formatting behavior, including next-style handling, is preserved. Only for action 'insert'. Omit for other actions."
|
|
4369
|
+
},
|
|
4366
4370
|
"input": {
|
|
4367
4371
|
"type": "object",
|
|
4368
4372
|
"description": "Operation input as JSON object."
|
|
@@ -6101,7 +6105,7 @@
|
|
|
6101
6105
|
},
|
|
6102
6106
|
{
|
|
6103
6107
|
"name": "superdoc_search",
|
|
6104
|
-
"description": "Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (superdoc_edit, superdoc_format). Within a superdoc_mutations batch, selectors in \"where\" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The \"require\" parameter controls match cardinality: \"first\" returns one match, \"all\" returns every match, \"exactlyOne\" fails if not exactly one match. Supports scoping via \"within\" to search inside a single block. Patterns are plain text by default; pass select.mode: \"regex\" for regular-expression search (g/gi semantics, 1024-char cap, no wholeWord, capture groups returned on matches). Invalid or unsafe patterns fail with INVALID_INPUT. Do NOT use markdown formatting markers (#, **, etc.) in search patterns. Do NOT use this tool when you already have a ref from superdoc_get_content blocks or superdoc_create; use that ref directly.\n\nEXAMPLES:\n 1. {\"select\":{\"type\":\"text\",\"pattern\":\"Introduction\"},\"require\":\"first\"}\n 2. {\"select\":{\"type\":\"text\",\"pattern\":\"total amount\"},\"require\":\"all\"}\n 3. {\"select\":{\"type\":\"node\",\"nodeType\":\"heading\"},\"require\":\"all\"}\n 4. {\"select\":{\"type\":\"text\",\"pattern\":\"contract\"},\"within\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"abc123\"},\"require\":\"first\"}",
|
|
6108
|
+
"description": "Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (superdoc_edit, superdoc_format). Within a superdoc_mutations batch, selectors in \"where\" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The \"require\" parameter controls match cardinality: \"first\" returns one match, \"last\" returns the final match (without limit/offset), \"all\" returns every match, \"exactlyOne\" fails if not exactly one match. Supports scoping via \"within\" to search inside a single block. Patterns are plain text by default; pass select.mode: \"regex\" for regular-expression search (g/gi semantics, 1024-char cap, no wholeWord, capture groups returned on matches). Invalid or unsafe patterns fail with INVALID_INPUT. Do NOT use markdown formatting markers (#, **, etc.) in search patterns. Do NOT use this tool when you already have a ref from superdoc_get_content blocks or superdoc_create; use that ref directly.\n\nEXAMPLES:\n 1. {\"select\":{\"type\":\"text\",\"pattern\":\"Introduction\"},\"require\":\"first\"}\n 2. {\"select\":{\"type\":\"text\",\"pattern\":\"total amount\"},\"require\":\"all\"}\n 3. {\"select\":{\"type\":\"node\",\"nodeType\":\"heading\"},\"require\":\"all\"}\n 4. {\"select\":{\"type\":\"text\",\"pattern\":\"contract\"},\"within\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"abc123\"},\"require\":\"first\"}",
|
|
6105
6109
|
"input_schema": {
|
|
6106
6110
|
"type": "object",
|
|
6107
6111
|
"properties": {
|
|
@@ -6208,10 +6212,11 @@
|
|
|
6208
6212
|
"enum": [
|
|
6209
6213
|
"any",
|
|
6210
6214
|
"first",
|
|
6215
|
+
"last",
|
|
6211
6216
|
"exactlyOne",
|
|
6212
6217
|
"all"
|
|
6213
6218
|
],
|
|
6214
|
-
"description": "Match cardinality: 'any' (all matches), 'first' (only first), 'exactlyOne' (fail if != 1), 'all' (fail if 0)."
|
|
6219
|
+
"description": "Match cardinality: 'any' (all matches), 'first' (only first), 'last' (final scoped match, without limit/offset), 'exactlyOne' (fail if != 1), 'all' (fail if 0). For 'last', page.offset reports the selected match's ordinal in the full set."
|
|
6215
6220
|
},
|
|
6216
6221
|
"mode": {
|
|
6217
6222
|
"enum": [
|
|
@@ -8777,10 +8782,133 @@
|
|
|
8777
8782
|
"where",
|
|
8778
8783
|
"args"
|
|
8779
8784
|
]
|
|
8785
|
+
},
|
|
8786
|
+
{
|
|
8787
|
+
"type": "object",
|
|
8788
|
+
"properties": {
|
|
8789
|
+
"id": {
|
|
8790
|
+
"type": "string",
|
|
8791
|
+
"minLength": 1
|
|
8792
|
+
},
|
|
8793
|
+
"op": {
|
|
8794
|
+
"const": "comments.patch",
|
|
8795
|
+
"type": "string"
|
|
8796
|
+
},
|
|
8797
|
+
"args": {
|
|
8798
|
+
"type": "object",
|
|
8799
|
+
"properties": {
|
|
8800
|
+
"commentId": {
|
|
8801
|
+
"type": "string",
|
|
8802
|
+
"minLength": 1
|
|
8803
|
+
},
|
|
8804
|
+
"target": {
|
|
8805
|
+
"oneOf": [
|
|
8806
|
+
{
|
|
8807
|
+
"$ref": "#/$defs/TextAddress"
|
|
8808
|
+
},
|
|
8809
|
+
{
|
|
8810
|
+
"$ref": "#/$defs/SelectionTarget"
|
|
8811
|
+
}
|
|
8812
|
+
]
|
|
8813
|
+
}
|
|
8814
|
+
},
|
|
8815
|
+
"additionalProperties": false,
|
|
8816
|
+
"required": [
|
|
8817
|
+
"commentId",
|
|
8818
|
+
"target"
|
|
8819
|
+
]
|
|
8820
|
+
}
|
|
8821
|
+
},
|
|
8822
|
+
"additionalProperties": false,
|
|
8823
|
+
"required": [
|
|
8824
|
+
"id",
|
|
8825
|
+
"op",
|
|
8826
|
+
"args"
|
|
8827
|
+
]
|
|
8828
|
+
},
|
|
8829
|
+
{
|
|
8830
|
+
"type": "object",
|
|
8831
|
+
"properties": {
|
|
8832
|
+
"id": {
|
|
8833
|
+
"type": "string",
|
|
8834
|
+
"minLength": 1
|
|
8835
|
+
},
|
|
8836
|
+
"op": {
|
|
8837
|
+
"const": "trackChanges.decide",
|
|
8838
|
+
"type": "string"
|
|
8839
|
+
},
|
|
8840
|
+
"args": {
|
|
8841
|
+
"type": "object",
|
|
8842
|
+
"properties": {
|
|
8843
|
+
"decision": {
|
|
8844
|
+
"enum": [
|
|
8845
|
+
"accept",
|
|
8846
|
+
"reject"
|
|
8847
|
+
],
|
|
8848
|
+
"type": "string"
|
|
8849
|
+
},
|
|
8850
|
+
"target": {
|
|
8851
|
+
"oneOf": [
|
|
8852
|
+
{
|
|
8853
|
+
"type": "object",
|
|
8854
|
+
"properties": {
|
|
8855
|
+
"kind": {
|
|
8856
|
+
"const": "id",
|
|
8857
|
+
"type": "string"
|
|
8858
|
+
},
|
|
8859
|
+
"id": {
|
|
8860
|
+
"type": "string",
|
|
8861
|
+
"minLength": 1
|
|
8862
|
+
}
|
|
8863
|
+
},
|
|
8864
|
+
"additionalProperties": false,
|
|
8865
|
+
"required": [
|
|
8866
|
+
"kind",
|
|
8867
|
+
"id"
|
|
8868
|
+
]
|
|
8869
|
+
},
|
|
8870
|
+
{
|
|
8871
|
+
"type": "object",
|
|
8872
|
+
"properties": {
|
|
8873
|
+
"kind": {
|
|
8874
|
+
"const": "ids",
|
|
8875
|
+
"type": "string"
|
|
8876
|
+
},
|
|
8877
|
+
"ids": {
|
|
8878
|
+
"type": "array",
|
|
8879
|
+
"items": {
|
|
8880
|
+
"type": "string",
|
|
8881
|
+
"minLength": 1
|
|
8882
|
+
},
|
|
8883
|
+
"minItems": 1
|
|
8884
|
+
}
|
|
8885
|
+
},
|
|
8886
|
+
"additionalProperties": false,
|
|
8887
|
+
"required": [
|
|
8888
|
+
"kind",
|
|
8889
|
+
"ids"
|
|
8890
|
+
]
|
|
8891
|
+
}
|
|
8892
|
+
]
|
|
8893
|
+
}
|
|
8894
|
+
},
|
|
8895
|
+
"additionalProperties": false,
|
|
8896
|
+
"required": [
|
|
8897
|
+
"decision",
|
|
8898
|
+
"target"
|
|
8899
|
+
]
|
|
8900
|
+
}
|
|
8901
|
+
},
|
|
8902
|
+
"additionalProperties": false,
|
|
8903
|
+
"required": [
|
|
8904
|
+
"id",
|
|
8905
|
+
"op",
|
|
8906
|
+
"args"
|
|
8907
|
+
]
|
|
8780
8908
|
}
|
|
8781
8909
|
]
|
|
8782
8910
|
},
|
|
8783
|
-
"description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, or
|
|
8911
|
+
"description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, assert, comments.patch, or trackChanges.decide). Core steps use 'where'; review steps use explicit native args and require direct body-only plans with relocations before decisions. Check runtime capabilities for operation-specific content and targeting restrictions."
|
|
8784
8912
|
},
|
|
8785
8913
|
"detail": {
|
|
8786
8914
|
"type": "object",
|
|
@@ -8851,6 +8979,22 @@
|
|
|
8851
8979
|
"exact"
|
|
8852
8980
|
]
|
|
8853
8981
|
},
|
|
8982
|
+
"Range": {
|
|
8983
|
+
"type": "object",
|
|
8984
|
+
"properties": {
|
|
8985
|
+
"start": {
|
|
8986
|
+
"type": "integer"
|
|
8987
|
+
},
|
|
8988
|
+
"end": {
|
|
8989
|
+
"type": "integer"
|
|
8990
|
+
}
|
|
8991
|
+
},
|
|
8992
|
+
"additionalProperties": false,
|
|
8993
|
+
"required": [
|
|
8994
|
+
"start",
|
|
8995
|
+
"end"
|
|
8996
|
+
]
|
|
8997
|
+
},
|
|
8854
8998
|
"SectionAddress": {
|
|
8855
8999
|
"type": "object",
|
|
8856
9000
|
"properties": {
|
|
@@ -9142,6 +9286,30 @@
|
|
|
9142
9286
|
}
|
|
9143
9287
|
]
|
|
9144
9288
|
},
|
|
9289
|
+
"TextAddress": {
|
|
9290
|
+
"type": "object",
|
|
9291
|
+
"properties": {
|
|
9292
|
+
"kind": {
|
|
9293
|
+
"const": "text",
|
|
9294
|
+
"type": "string"
|
|
9295
|
+
},
|
|
9296
|
+
"blockId": {
|
|
9297
|
+
"type": "string"
|
|
9298
|
+
},
|
|
9299
|
+
"range": {
|
|
9300
|
+
"$ref": "#/$defs/Range"
|
|
9301
|
+
},
|
|
9302
|
+
"story": {
|
|
9303
|
+
"$ref": "#/$defs/StoryLocator"
|
|
9304
|
+
}
|
|
9305
|
+
},
|
|
9306
|
+
"additionalProperties": false,
|
|
9307
|
+
"required": [
|
|
9308
|
+
"kind",
|
|
9309
|
+
"blockId",
|
|
9310
|
+
"range"
|
|
9311
|
+
]
|
|
9312
|
+
},
|
|
9145
9313
|
"TextCoordinateSpace": {
|
|
9146
9314
|
"enum": [
|
|
9147
9315
|
"visible",
|