@tiwater/office-mcp 0.21.55 → 0.21.56

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/office/README.md CHANGED
@@ -20,18 +20,22 @@ OpenXML-internal identifiers, not filesystem arguments.
20
20
  - DOCX: inspect document/tables, export, compare, validate OpenXML, apply or validate font and
21
21
  table-of-contents style policies, refresh document fields, replace object text, transform styles,
22
22
  and batch one fixed edit action.
23
- - XLS/XLSX: convert legacy XLS with ET, inspect/export, validate, and batch
24
- one fixed workbook edit action.
23
+ - XLS/XLSX: convert legacy XLS with ET, inspect/export, validate, batch one
24
+ fixed workbook edit action, or atomically apply one immutable provider-ready
25
+ mixed-operation handoff.
25
26
  - PPTX: inspect/export, bind selected masters/layouts, apply text formatting,
26
27
  set exact top-level object geometry, replace existing picture media, and
27
28
  validate OpenXML.
28
29
  - Office: render DOC/DOCX/XLS/XLSX/PPT/PPTX to PDF with the corresponding native
29
30
  WPS backend.
30
31
 
31
- Each mutation tool fixes its provider operation type. Callers submit only the
32
+ Fixed-action mutation tools fix their provider operation type. Callers submit only the
32
33
  coordinates and values for that action, so they cannot provide an arbitrary
33
34
  operation discriminator or a multi-action plan language. A call may batch
34
35
  multiple changes only when every change has the same action kind.
36
+ The atomic XLSX handoff capability accepts only a file identity for an already
37
+ approved operation artifact. It does not choose, rewrite, partition, or infer
38
+ operations, and it commits workbook bytes only when the complete ordered handoff succeeds.
35
39
  When a completed mutation receipt reports `summary.pass=false`, the MCP result
36
40
  also sets the standard `isError` field; consumers do not need a private failure
37
41
  interpretation.
@@ -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.55"
5
+ "version": "0.21.56"
6
6
  },
7
7
  "tools": [
8
8
  {
@@ -456,6 +456,17 @@
456
456
  "sha256": "06d5f29f7ed23ab53fdf7a5de09cbfb6a800e7a19ae076a3d6d80abf22c464be"
457
457
  }
458
458
  },
459
+ {
460
+ "name": "xlsx_apply_operations",
461
+ "providerContract": {
462
+ "source": "packages/xlsx-cli/contracts/mcp-input/xlsx_apply_operations.schema.json",
463
+ "sha256": "89b0946543671b5dc75ce40db9656f23b3909bc2a9ef945e7cdf5b73f40845d2"
464
+ },
465
+ "inputContract": {
466
+ "path": "office/contracts/xlsx_apply_operations.schema.json",
467
+ "sha256": "89b0946543671b5dc75ce40db9656f23b3909bc2a9ef945e7cdf5b73f40845d2"
468
+ }
469
+ },
459
470
  {
460
471
  "name": "xlsx_convert_legacy",
461
472
  "providerContract": {
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "pattern": "\\.[xX][lL][sS][xX]$",
9
+ "x-tiwater-file-role": "read",
10
+ "x-tiwater-document-revision-role": "current"
11
+ },
12
+ "operationsInput": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "pattern": "\\.[jJ][sS][oO][nN]$",
16
+ "description": "Immutable provider-ready operation handoff containing only a non-empty operations array.",
17
+ "x-tiwater-file-role": "read"
18
+ },
19
+ "output": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "pattern": "\\.[xX][lL][sS][xX]$",
23
+ "description": "Output document path; may equal input for one atomic mixed-operation update.",
24
+ "x-tiwater-file-role": "write"
25
+ },
26
+ "receiptOutput": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "New JSON receipt path. Existing files are never overwritten.",
30
+ "x-tiwater-file-role": "write",
31
+ "x-tiwater-file-effect": false
32
+ }
33
+ },
34
+ "required": ["input", "operationsInput", "output", "receiptOutput"],
35
+ "additionalProperties": false
36
+ }
package/office/index.mjs CHANGED
@@ -847,6 +847,14 @@ const tools = [
847
847
  handler: xlsxReadRange,
848
848
  },
849
849
  ...fixedToolDefinitions(xlsxFixedTools, xlsxCandidates),
850
+ {
851
+ name: 'xlsx_apply_operations',
852
+ effectKind: 'document-mutation',
853
+ description: 'Apply one immutable provider-ready XLSX operation handoff as a single atomic workbook edit. The provider preflights and executes the complete ordered operation list, commits output bytes only when every operation succeeds, and returns one complete receipt.',
854
+ inputSchema: inputContract('xlsx_apply_operations'),
855
+ outputSchema: fixedEditOutput('xlsx_apply_operations'),
856
+ handler: (args, tool) => fixedEdit(tool, args, xlsxCandidates),
857
+ },
850
858
  {
851
859
  name: 'xlsx_validate',
852
860
  description: 'Validate an XLSX workbook package and produce OpenXML validation evidence. Set returnContent true to return the complete result when it fits the response limit. Provide output to write the complete result to a new JSON file. The two choices are independent and may be used together; at least one is required.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiwater/office-mcp",
3
- "version": "0.21.55",
3
+ "version": "0.21.56",
4
4
  "description": "Published MCP distribution for independent Tiwater Office, PDF, and Text document capabilities",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  "schema": "tiwater.pdf-provider-contract-manifest/v1",
3
3
  "provider": {
4
4
  "id": "@tiwater/office-mcp",
5
- "version": "0.21.55"
5
+ "version": "0.21.56"
6
6
  },
7
7
  "runtime": {
8
8
  "command": "tiwater-pdf"
@@ -2,7 +2,7 @@
2
2
  "schema": "tiwater.text-provider-contract-manifest/v1",
3
3
  "provider": {
4
4
  "id": "@tiwater/office-mcp",
5
- "version": "0.21.55"
5
+ "version": "0.21.56"
6
6
  },
7
7
  "tools": [
8
8
  {