@tiwater/office-mcp 0.21.3 → 0.21.5

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.
@@ -69,7 +69,7 @@
69
69
  "rows": {
70
70
  "type": "array",
71
71
  "minItems": 0,
72
- "description": "Exact final rows; an empty array removes the declared range when at least one table row remains. Each final row names one current row in existingRows as its style prototype. Cells plus active row spans must cover the complete target grid exactly once.",
72
+ "description": "Exact final physical rows; an empty array removes the declared range when at least one table row remains. Each final row names one current row in existingRows as its style prototype, and its cells cover the complete target grid exactly once.",
73
73
  "items": {
74
74
  "type": "object",
75
75
  "properties": {
@@ -95,11 +95,10 @@
95
95
  "items": { "type": "string", "minLength": 1, "maxLength": 80 }
96
96
  },
97
97
  "text": { "type": "string" },
98
- "rowSpan": {
99
- "type": "integer",
100
- "minimum": 1,
101
- "maximum": 2147483647,
102
- "description": "Number of final rows occupied by this cell; omitted means one row."
98
+ "verticalMerge": {
99
+ "type": "string",
100
+ "enum": ["restart", "continue"],
101
+ "description": "Native OpenXML vertical merge state. A restart cell owns the text; the same columns in the next physical row use continue with empty text. Omit for an unmerged cell."
103
102
  }
104
103
  },
105
104
  "required": ["columns", "text"],
@@ -2,7 +2,7 @@
2
2
  "schema": "tiwater.office-provider-contract-manifest/v1",
3
3
  "provider": {
4
4
  "id": "@tiwater/office-mcp",
5
- "version": "0.21.3"
5
+ "version": "0.21.5"
6
6
  },
7
7
  "tools": [
8
8
  {
@@ -185,11 +185,11 @@
185
185
  "name": "docx_set_table_body",
186
186
  "providerContract": {
187
187
  "source": "packages/docx-cli/contracts/mcp-input/docx_set_table_body.schema.json",
188
- "sha256": "2270274f25154dc0573c972c8c71240636e29e7e23a1eacae616952cc600b1e0"
188
+ "sha256": "e1f6c96d71dc42904fb1d0c8b049c1398e1155d76db481b58064cede9e30fad6"
189
189
  },
190
190
  "inputContract": {
191
191
  "path": "office/contracts/docx_set_table_body.schema.json",
192
- "sha256": "2270274f25154dc0573c972c8c71240636e29e7e23a1eacae616952cc600b1e0"
192
+ "sha256": "e1f6c96d71dc42904fb1d0c8b049c1398e1155d76db481b58064cede9e30fad6"
193
193
  }
194
194
  },
195
195
  {
package/office/index.mjs CHANGED
@@ -316,7 +316,7 @@ const docxTableReadOutput = docxObservationOutput('docx_read_table').extend({
316
316
  totalRowCount: z.number().int().nonnegative(),
317
317
  returnedRowCount: z.number().int().nonnegative(),
318
318
  remaining: z.number().int().nonnegative(),
319
- nextOffset: z.number().int().nonnegative().nullable(),
319
+ nextOffset: z.number().int().nonnegative().optional(),
320
320
  detailPageRetained: z.boolean(),
321
321
  narrowingRequired: z.boolean(),
322
322
  }).strict(),
@@ -401,7 +401,7 @@ const tools = [
401
401
  },
402
402
  {
403
403
  name: 'docx_read_table',
404
- description: 'Read an explicit row range from exactly one table selected by native OpenXML address; it never builds another whole-table data object. Set returnContent true to return a byte-bounded compact row page. Provide output to store full paragraph and text-node detail for the selected row page and return its artifact receipt. These channels are independent and may be used together; at least one is required. Request only rows needed for the current decision; receipt.remaining is navigation information, not an obligation to read unused rows, and blank template rows need not be paged through. Each returned row and cell keeps its reusable native address, zero-based logical gridColumnStart, gridSpan, vertical-merge owner, physical text, and logical text. Match columns across rows by gridColumnStart; a tc[n] path or array position is only that row\'s physical cell ordinal and is not a column identity when gridSpan or gridBefore is present. In a vertical merge, restart begins one logical cell and a continue cell is not an independent row value: logicalText resolves the restart cell value while text remains the physical cell value. Use docx_read_object when one exact object needs a narrower descendant view. The provider reports physical structure only; the Agent decides template and business meaning.',
404
+ description: 'Read an explicit row range from exactly one table selected by native OpenXML address; it never builds another whole-table data object. Set returnContent true to return a byte-bounded compact row page. Provide output to store full paragraph and text-node detail for the selected row page and return its artifact receipt. These channels are independent and may be used together; at least one is required. Request only rows needed for the current decision; receipt.remaining is navigation information, not an obligation to read unused rows, and blank template rows need not be paged through. receipt.nextOffset is present only when another row page exists. Each returned row and cell keeps its reusable native address, zero-based logical gridColumnStart, gridSpan, vertical-merge owner, physical text, and logical text. Match columns across rows by gridColumnStart; a tc[n] path or array position is only that row\'s physical cell ordinal and is not a column identity when gridSpan or gridBefore is present. In a vertical merge, restart begins one logical cell and a continue cell is not an independent row value: logicalText resolves the restart cell value while text remains the physical cell value. Use docx_read_object when one exact object needs a narrower descendant view. The provider reports physical structure only; the Agent decides template and business meaning.',
405
405
  inputSchema: inputContract('docx_read_table'),
406
406
  outputSchema: docxTableReadOutput,
407
407
  annotations: { readOnlyHint: true, idempotentHint: true },
@@ -423,7 +423,7 @@ const tools = [
423
423
  },
424
424
  {
425
425
  name: 'docx_set_table_body',
426
- description: 'Atomically replace one exact current target-table row range with final text rows while retaining the table, target styles, grid widths, and all rows and surrounding content outside the range. Name every target grid column in native order, choose one current row as the style prototype for each final row, and express horizontal spans with contiguous column IDs and vertical spans with rowSpan. An empty final row array removes the range when another table row remains. The provider commits once and returns structural readback. It does not read a source table, map source to target, derive text, choose business columns, identify headers, or accept non-text cell content.',
426
+ description: 'Atomically replace one exact current target-table row range with final physical text rows while retaining the table, target styles, grid widths, and all rows and surrounding content outside the range. Name every target grid column in native order, choose one current row as the style prototype for each final row, and cover every row completely with explicit cells. Horizontal spans use contiguous column IDs. Native vertical merges use a restart cell followed by continue cells on the same columns; continue cells have empty physical text. An empty final row array removes the range when another table row remains. The provider commits once and returns structural readback. It does not read a source table, map source to target, derive text, choose business columns, identify headers, or accept non-text cell content.',
427
427
  inputSchema: inputContract('docx_set_table_body'),
428
428
  outputSchema: fixedEditOutput('docx_set_table_body'),
429
429
  handler: args => fixedEdit('docx_set_table_body', args),
@@ -857,7 +857,7 @@ async function docxObservation(tool, args) {
857
857
  totalRowCount,
858
858
  returnedRowCount: selectedRows.length,
859
859
  remaining: totalRowCount - offset - selectedRows.length,
860
- nextOffset: selectedNextOffset,
860
+ ...(selectedNextOffset === null ? {} : { nextOffset: selectedNextOffset }),
861
861
  };
862
862
  const detailPage = {
863
863
  schema: 'tiwater.docx-table-detail-page/v1',
@@ -925,7 +925,7 @@ async function docxObservation(tool, args) {
925
925
  totalRowCount,
926
926
  returnedRowCount: rows.length,
927
927
  remaining: totalRowCount - offset - rows.length,
928
- nextOffset,
928
+ ...(nextOffset === null ? {} : { nextOffset }),
929
929
  };
930
930
  return {
931
931
  ...withArtifact,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiwater/office-mcp",
3
- "version": "0.21.3",
3
+ "version": "0.21.5",
4
4
  "description": "Published MCP server for Tiwater Office document capabilities",
5
5
  "type": "module",
6
6
  "license": "MIT",