Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
069ea8b
feat(lists): merge and split operations
andrii-harbour Apr 20, 2026
12fc209
fix(lists): restart numbering
andrii-harbour Apr 20, 2026
85ea0b8
fix(lists): return OOXML-stable paraId from lists.insert receipt
andrii-harbour Apr 20, 2026
8067e83
docs(prompt): sub-point + nested-list recipes for agents
andrii-harbour Apr 20, 2026
b2bdc7d
test(lists): merge/split validator and wrapper tests
andrii-harbour Apr 20, 2026
96d245a
fix(query-match-adapter): enhance error handling for discontiguous te…
andrii-harbour Apr 23, 2026
91b05c8
feat(numbering): add sanity checks for ordered list formatting and sy…
andrii-harbour Apr 24, 2026
dcf799f
feat(lists): enhance list action validation and add new tests
andrii-harbour Apr 24, 2026
600960f
Merge branch 'main' into andrii/sd-2296-tool-improvements-fix-list-an…
andrii-harbour Apr 24, 2026
97cfd33
refactor(intent-dispatch): streamline case statements for intent actions
andrii-harbour Apr 24, 2026
2a5c19c
refactor(intent-dispatch): simplify case statements for intent action…
andrii-harbour Apr 24, 2026
8ece48a
refactor: require structural emptiness for paragraphs
andrii-harbour Apr 27, 2026
3d41d98
Merge branch 'main' into andrii/sd-2296-tool-improvements-fix-list-an…
andrii-harbour Apr 27, 2026
403150e
fix: update document API references to use 'document' instead of 'act…
andrii-harbour Apr 27, 2026
1924ca8
test(evals): assert list structural changes for merge/split/restart
caio-pizzol Apr 28, 2026
ddde20c
Merge branch 'main' into andrii/sd-2296-tool-improvements-fix-list-an…
caio-pizzol Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/docs/document-api/available-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use the tables below to see what operations are available and where each one is
| Hyperlinks | 6 | 0 | 6 | [Reference](/document-api/reference/hyperlinks/index) |
| Images | 27 | 0 | 27 | [Reference](/document-api/reference/images/index) |
| Index | 11 | 0 | 11 | [Reference](/document-api/reference/index/index) |
| Lists | 36 | 0 | 36 | [Reference](/document-api/reference/lists/index) |
| Lists | 38 | 0 | 38 | [Reference](/document-api/reference/lists/index) |
| Mutations | 2 | 0 | 2 | [Reference](/document-api/reference/mutations/index) |
| Paragraph Formatting | 19 | 0 | 19 | [Reference](/document-api/reference/format/paragraph/index) |
| Paragraph Styles | 2 | 0 | 2 | [Reference](/document-api/reference/styles/paragraph/index) |
Expand Down Expand Up @@ -291,6 +291,8 @@ Use the tables below to see what operations are available and where each one is
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.join(...)</code></span> | [`lists.join`](/document-api/reference/lists/join) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.canJoin(...)</code></span> | [`lists.canJoin`](/document-api/reference/lists/can-join) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.separate(...)</code></span> | [`lists.separate`](/document-api/reference/lists/separate) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.merge(...)</code></span> | [`lists.merge`](/document-api/reference/lists/merge) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.split(...)</code></span> | [`lists.split`](/document-api/reference/lists/split) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.setLevel(...)</code></span> | [`lists.setLevel`](/document-api/reference/lists/set-level) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.setValue(...)</code></span> | [`lists.setValue`](/document-api/reference/lists/set-value) |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.continuePrevious(...)</code></span> | [`lists.continuePrevious`](/document-api/reference/lists/continue-previous) |
Expand Down
6 changes: 5 additions & 1 deletion apps/docs/document-api/reference/_generated-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
"apps/docs/document-api/reference/lists/insert.mdx",
"apps/docs/document-api/reference/lists/join.mdx",
"apps/docs/document-api/reference/lists/list.mdx",
"apps/docs/document-api/reference/lists/merge.mdx",
"apps/docs/document-api/reference/lists/outdent.mdx",
"apps/docs/document-api/reference/lists/restart-at.mdx",
"apps/docs/document-api/reference/lists/separate.mdx",
Expand All @@ -317,6 +318,7 @@
"apps/docs/document-api/reference/lists/set-level.mdx",
"apps/docs/document-api/reference/lists/set-type.mdx",
"apps/docs/document-api/reference/lists/set-value.mdx",
"apps/docs/document-api/reference/lists/split.mdx",
"apps/docs/document-api/reference/markdown-to-fragment.mdx",
"apps/docs/document-api/reference/mutations/apply.mdx",
"apps/docs/document-api/reference/mutations/index.mdx",
Expand Down Expand Up @@ -576,6 +578,8 @@
"lists.join",
"lists.canJoin",
"lists.separate",
"lists.merge",
"lists.split",
"lists.setLevel",
"lists.setValue",
"lists.continuePrevious",
Expand Down Expand Up @@ -1027,5 +1031,5 @@
}
],
"marker": "{/* GENERATED FILE: DO NOT EDIT. Regenerate via `pnpm run docapi:sync`. */}",
"sourceHash": "f5c0786256e77432e9b9a58bc2009e39e2e832f6b0b2b625ee6dbeb3a762bdd6"
"sourceHash": "0bb50c2977e652d32a4c3dd591c774e7d164c013b53f2c951de8573911ecdef6"
}
92 changes: 92 additions & 0 deletions apps/docs/document-api/reference/capabilities/get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,11 @@ _No fields._
| `operations.lists.list.dryRun` | boolean | yes | |
| `operations.lists.list.reasons` | enum[] | no | |
| `operations.lists.list.tracked` | boolean | yes | |
| `operations.lists.merge` | object | yes | |
| `operations.lists.merge.available` | boolean | yes | |
| `operations.lists.merge.dryRun` | boolean | yes | |
| `operations.lists.merge.reasons` | enum[] | no | |
| `operations.lists.merge.tracked` | boolean | yes | |
| `operations.lists.outdent` | object | yes | |
| `operations.lists.outdent.available` | boolean | yes | |
| `operations.lists.outdent.dryRun` | boolean | yes | |
Expand Down Expand Up @@ -1735,6 +1740,11 @@ _No fields._
| `operations.lists.setValue.dryRun` | boolean | yes | |
| `operations.lists.setValue.reasons` | enum[] | no | |
| `operations.lists.setValue.tracked` | boolean | yes | |
| `operations.lists.split` | object | yes | |
| `operations.lists.split.available` | boolean | yes | |
| `operations.lists.split.dryRun` | boolean | yes | |
| `operations.lists.split.reasons` | enum[] | no | |
| `operations.lists.split.tracked` | boolean | yes | |
| `operations.markdownToFragment` | object | yes | |
| `operations.markdownToFragment.available` | boolean | yes | |
| `operations.markdownToFragment.dryRun` | boolean | yes | |
Expand Down Expand Up @@ -3871,6 +3881,11 @@ _No fields._
"dryRun": false,
"tracked": false
},
"lists.merge": {
"available": true,
"dryRun": true,
"tracked": false
},
"lists.outdent": {
"available": true,
"dryRun": true,
Expand Down Expand Up @@ -3961,6 +3976,11 @@ _No fields._
"dryRun": true,
"tracked": false
},
"lists.split": {
"available": true,
"dryRun": true,
"tracked": false
},
"markdownToFragment": {
"available": true,
"dryRun": false,
Expand Down Expand Up @@ -15729,6 +15749,41 @@ _No fields._
],
"type": "object"
},
"lists.merge": {
"additionalProperties": false,
"properties": {
"available": {
"type": "boolean"
},
"dryRun": {
"type": "boolean"
},
"reasons": {
"items": {
"enum": [
"COMMAND_UNAVAILABLE",
"HELPER_UNAVAILABLE",
"OPERATION_UNAVAILABLE",
"TRACKED_MODE_UNAVAILABLE",
"DRY_RUN_UNAVAILABLE",
"NAMESPACE_UNAVAILABLE",
"STYLES_PART_MISSING",
"COLLABORATION_ACTIVE"
]
},
"type": "array"
},
"tracked": {
"type": "boolean"
}
},
"required": [
"available",
"tracked",
"dryRun"
],
"type": "object"
},
"lists.outdent": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -16359,6 +16414,41 @@ _No fields._
],
"type": "object"
},
"lists.split": {
"additionalProperties": false,
"properties": {
"available": {
"type": "boolean"
},
"dryRun": {
"type": "boolean"
},
"reasons": {
"items": {
"enum": [
"COMMAND_UNAVAILABLE",
"HELPER_UNAVAILABLE",
"OPERATION_UNAVAILABLE",
"TRACKED_MODE_UNAVAILABLE",
"DRY_RUN_UNAVAILABLE",
"NAMESPACE_UNAVAILABLE",
"STYLES_PART_MISSING",
"COLLABORATION_ACTIVE"
]
},
"type": "array"
},
"tracked": {
"type": "boolean"
}
},
"required": [
"available",
"tracked",
"dryRun"
],
"type": "object"
},
"markdownToFragment": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -19766,6 +19856,8 @@ _No fields._
"lists.join",
"lists.canJoin",
"lists.separate",
"lists.merge",
"lists.split",
"lists.setLevel",
"lists.setValue",
"lists.continuePrevious",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/document-api/reference/history/get.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: history.get
sidebarTitle: history.get
description: Query the current undo/redo history state of the active editor.
description: Query the current undo/redo history state of the document.
---

{/* GENERATED FILE: DO NOT EDIT. Regenerate via `pnpm run docapi:sync`. */}

## Summary

Query the current undo/redo history state of the active editor.
Query the current undo/redo history state of the document.

- Operation ID: `history.get`
- API member path: `editor.doc.history.get(...)`
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/document-api/reference/history/redo.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: history.redo
sidebarTitle: history.redo
description: Redo the most recently undone action in the active editor.
description: Redo the most recently undone action in the document.
---

{/* GENERATED FILE: DO NOT EDIT. Regenerate via `pnpm run docapi:sync`. */}

## Summary

Redo the most recently undone action in the active editor.
Redo the most recently undone action in the document.

- Operation ID: `history.redo`
- API member path: `editor.doc.history.redo(...)`
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/document-api/reference/history/undo.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: history.undo
sidebarTitle: history.undo
description: Undo the most recent history-safe mutation in the active editor.
description: Undo the most recent history-safe mutation in the document.
---

{/* GENERATED FILE: DO NOT EDIT. Regenerate via `pnpm run docapi:sync`. */}

## Summary

Undo the most recent history-safe mutation in the active editor.
Undo the most recent history-safe mutation in the document.

- Operation ID: `history.undo`
- API member path: `editor.doc.history.undo(...)`
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/document-api/reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This reference is sourced from `packages/document-api/src/contract/*`.
| Sections | 18 | 0 | 18 | [Open](/document-api/reference/sections/index) |
| Format | 44 | 1 | 45 | [Open](/document-api/reference/format/index) |
| Styles | 1 | 0 | 1 | [Open](/document-api/reference/styles/index) |
| Lists | 36 | 0 | 36 | [Open](/document-api/reference/lists/index) |
| Lists | 38 | 0 | 38 | [Open](/document-api/reference/lists/index) |
| Comments | 5 | 0 | 5 | [Open](/document-api/reference/comments/index) |
| Track Changes | 3 | 0 | 3 | [Open](/document-api/reference/track-changes/index) |
| Query | 1 | 0 | 1 | [Open](/document-api/reference/query/index) |
Expand Down Expand Up @@ -196,6 +196,8 @@ The tables below are grouped by namespace.
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/join"><code>lists.join</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.join(...)</code></span> | Merge two adjacent list sequences into one. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/can-join"><code>lists.canJoin</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.canJoin(...)</code></span> | Check whether two adjacent list sequences can be joined. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/separate"><code>lists.separate</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.separate(...)</code></span> | Split a list sequence at the target item, creating a new sequence from that point forward. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/merge"><code>lists.merge</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.merge(...)</code></span> | Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check — absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing "merge these lists" intent. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/split"><code>lists.split</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.split(...)</code></span> | Compound: split a list sequence at the target item into two independent sequences. Runs lists.separate then (by default) lists.setValue(1) so the new half starts numbering fresh at 1. Pass restartNumbering:false for raw separate semantics (new half continues the previous count). |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/set-level"><code>lists.setLevel</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.setLevel(...)</code></span> | Set the absolute nesting level (0..8) of a list item. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/set-value"><code>lists.setValue</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.setValue(...)</code></span> | Set an explicit numbering value at the target item. Mid-sequence targets are atomically separated first. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/continue-previous"><code>lists.continuePrevious</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.lists.continuePrevious(...)</code></span> | Continue numbering from the nearest compatible previous list sequence. |
Expand Down Expand Up @@ -338,9 +340,9 @@ The tables below are grouped by namespace.

| Operation | API member path | Description |
| --- | --- | --- |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/history/get"><code>history.get</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.history.get(...)</code></span> | Query the current undo/redo history state of the active editor. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/history/undo"><code>history.undo</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.history.undo(...)</code></span> | Undo the most recent history-safe mutation in the active editor. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/history/redo"><code>history.redo</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.history.redo(...)</code></span> | Redo the most recently undone action in the active editor. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/history/get"><code>history.get</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.history.get(...)</code></span> | Query the current undo/redo history state of the document. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/history/undo"><code>history.undo</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.history.undo(...)</code></span> | Undo the most recent history-safe mutation in the document. |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/history/redo"><code>history.redo</code></a></span> | <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><code>editor.doc.history.redo(...)</code></span> | Redo the most recently undone action in the document. |

#### Table of Contents

Expand Down
2 changes: 2 additions & 0 deletions apps/docs/document-api/reference/lists/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ List inspection and list mutations.
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/join"><code>lists.join</code></a></span> | `lists.join` | Yes | `conditional` | No | Yes |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/can-join"><code>lists.canJoin</code></a></span> | `lists.canJoin` | No | `idempotent` | No | No |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/separate"><code>lists.separate</code></a></span> | `lists.separate` | Yes | `conditional` | No | Yes |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/merge"><code>lists.merge</code></a></span> | `lists.merge` | Yes | `conditional` | No | Yes |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/split"><code>lists.split</code></a></span> | `lists.split` | Yes | `conditional` | No | Yes |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/set-level"><code>lists.setLevel</code></a></span> | `lists.setLevel` | Yes | `conditional` | No | Yes |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/set-value"><code>lists.setValue</code></a></span> | `lists.setValue` | Yes | `conditional` | No | Yes |
| <span style={{ whiteSpace: 'nowrap', wordBreak: 'normal', overflowWrap: 'normal' }}><a href="/document-api/reference/lists/continue-previous"><code>lists.continuePrevious</code></a></span> | `lists.continuePrevious` | Yes | `conditional` | No | Yes |
Expand Down
Loading
Loading