@tiwater/office-mcp 0.21.56 → 0.21.57
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/contracts/docx_set_drawing_checkbox_state.schema.json +52 -0
- package/office/contracts/tiwater-office-provider-contract-manifest-v1.json +12 -1
- package/office/docx-object-identity.mjs +1 -0
- package/office/index.mjs +12 -1
- package/package.json +1 -1
- package/pdf/contracts/tiwater-pdf-provider-contract-manifest-v1.json +1 -1
- package/text/contracts/tiwater-text-provider-contract-manifest-v1.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "tiwater.office-mcp-input/docx_set_drawing_checkbox_state",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"input": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"x-tiwater-file-role": "read",
|
|
10
|
+
"x-tiwater-document-revision-role": "current"
|
|
11
|
+
},
|
|
12
|
+
"changes": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"drawing": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
22
|
+
"path": { "type": "string", "pattern": "^\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\](?:\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\])*$" }
|
|
23
|
+
},
|
|
24
|
+
"required": ["part", "path"],
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"description": "Exact current native address of one observed image-based checkbox drawing."
|
|
27
|
+
},
|
|
28
|
+
"checked": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Requested visible checkbox state."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": ["drawing", "checked"],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"output": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1,
|
|
40
|
+
"description": "Output DOCX path; may equal input for one atomic in-place update.",
|
|
41
|
+
"x-tiwater-file-role": "write"
|
|
42
|
+
},
|
|
43
|
+
"receiptOutput": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"x-tiwater-file-role": "write",
|
|
47
|
+
"x-tiwater-file-effect": false
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": ["input", "changes", "output", "receiptOutput"],
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
@@ -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.
|
|
5
|
+
"version": "0.21.57"
|
|
6
6
|
},
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
@@ -225,6 +225,17 @@
|
|
|
225
225
|
"sha256": "5466f70cc69974d4cb2158760491820a43ab2c25ce1c950465a5169c9185ab81"
|
|
226
226
|
}
|
|
227
227
|
},
|
|
228
|
+
{
|
|
229
|
+
"name": "docx_set_drawing_checkbox_state",
|
|
230
|
+
"providerContract": {
|
|
231
|
+
"source": "packages/docx-cli/contracts/mcp-input/docx_set_drawing_checkbox_state.schema.json",
|
|
232
|
+
"sha256": "acab84fcd23f91c700778eac33334d33b6199ed9da0604897bf3bde2146245e0"
|
|
233
|
+
},
|
|
234
|
+
"inputContract": {
|
|
235
|
+
"path": "office/contracts/docx_set_drawing_checkbox_state.schema.json",
|
|
236
|
+
"sha256": "acab84fcd23f91c700778eac33334d33b6199ed9da0604897bf3bde2146245e0"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
228
239
|
{
|
|
229
240
|
"name": "docx_set_paragraph_pagination",
|
|
230
241
|
"providerContract": {
|
package/office/index.mjs
CHANGED
|
@@ -430,6 +430,7 @@ const docxObjectIdentity = z.object({
|
|
|
430
430
|
gridSpan: z.number().int().positive().nullable(),
|
|
431
431
|
verticalMerge: z.string().nullable(),
|
|
432
432
|
verticalTextAlignment: z.enum(['baseline', 'superscript', 'subscript']).nullable(),
|
|
433
|
+
checked: z.boolean().nullable(),
|
|
433
434
|
}).strict();
|
|
434
435
|
|
|
435
436
|
const docxNestedObjectIdentity = docxObjectIdentity.pick({
|
|
@@ -442,6 +443,7 @@ const docxNestedObjectIdentity = docxObjectIdentity.pick({
|
|
|
442
443
|
verticalMergeOwner: docxAddress.optional(),
|
|
443
444
|
logicalText: z.string().optional(),
|
|
444
445
|
verticalTextAlignment: z.enum(['baseline', 'superscript', 'subscript']).optional(),
|
|
446
|
+
checked: z.boolean().optional(),
|
|
445
447
|
}).strict();
|
|
446
448
|
const docxObservationNode = z.lazy(() => z.object({
|
|
447
449
|
object: docxNestedObjectIdentity,
|
|
@@ -590,7 +592,7 @@ const tools = [
|
|
|
590
592
|
},
|
|
591
593
|
{
|
|
592
594
|
name: 'docx_read_object',
|
|
593
|
-
description: 'Read explicitly selected rows, cells, or
|
|
595
|
+
description: 'Read explicitly selected rows, cells, paragraphs, or drawings from one native DOCX. Set returnContent true to return compact requested descendants; if receipt.narrowingRequired is true, request fewer addresses or descendant kinds. Provide output to store the complete selected observation and return its artifact receipt. These channels are independent and may be used together; at least one is required. A selected cell exposes its vertical-merge owner and logical text, so a continue cell keeps its physical identity while resolving the restart cell value. Run and text descendants expose their native verticalTextAlignment when it is baseline, superscript, or subscript. A technically recognized image-based checkbox drawing exposes checked; unsupported drawings omit it. Use docx_read_table for a table range.',
|
|
594
596
|
inputSchema: inputContract('docx_read_object'),
|
|
595
597
|
outputSchema: docxReadObjectOutput,
|
|
596
598
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
@@ -644,6 +646,14 @@ const tools = [
|
|
|
644
646
|
outputSchema: fixedEditOutput('docx_set_paragraph_pagination'),
|
|
645
647
|
handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
|
|
646
648
|
},
|
|
649
|
+
{
|
|
650
|
+
name: 'docx_set_drawing_checkbox_state',
|
|
651
|
+
effectKind: 'document-mutation',
|
|
652
|
+
description: 'Set the visible checked or unchecked state of explicitly selected current DOCX image-based checkbox drawings while retaining each drawing container, native address, size, paragraph, label text, and every unselected drawing. The current provider accepts embedded 24-bit DIB-backed WMF checkboxes and rejects other drawings or images instead of guessing. Shared image parts are isolated before mutation so selecting one checkbox cannot change another. The caller chooses checkbox drawings and states; this tool does not select business options or edit text.',
|
|
653
|
+
inputSchema: inputContract('docx_set_drawing_checkbox_state'),
|
|
654
|
+
outputSchema: fixedEditOutput('docx_set_drawing_checkbox_state'),
|
|
655
|
+
handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
|
|
656
|
+
},
|
|
647
657
|
{
|
|
648
658
|
name: 'docx_set_table_width',
|
|
649
659
|
effectKind: 'document-mutation',
|
|
@@ -1028,6 +1038,7 @@ function compactDocxObservation(observation) {
|
|
|
1028
1038
|
...(node.object.verticalMergeOwner === null ? {} : { verticalMergeOwner: node.object.verticalMergeOwner }),
|
|
1029
1039
|
...(node.object.logicalText === null ? {} : { logicalText: node.object.logicalText }),
|
|
1030
1040
|
...(identity.verticalTextAlignment === null ? {} : { verticalTextAlignment: identity.verticalTextAlignment }),
|
|
1041
|
+
...(identity.checked === null ? {} : { checked: identity.checked }),
|
|
1031
1042
|
};
|
|
1032
1043
|
return {
|
|
1033
1044
|
object,
|
package/package.json
CHANGED