@tiwater/office-mcp 0.17.29 → 0.17.31
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.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"x-tiwater-file-role": "read"
|
|
9
9
|
},
|
|
10
10
|
"kinds": {
|
|
11
|
-
"description": "Open XML object kinds to list in native document order. Request
|
|
11
|
+
"description": "Open XML object kinds to list in native document order. Request only the kinds needed by the current local traversal, then follow returned refs through parentRef-scoped child pages. Text previews describe already located objects; they do not identify a document or select a source. Returned parentRef is the valid targetParentRef for inserting beside that object.",
|
|
12
12
|
"type": "array",
|
|
13
13
|
"items": {
|
|
14
14
|
"type": "string",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"pattern": "^dox1_[0-9a-f]{64}$"
|
|
37
37
|
},
|
|
38
38
|
"limit": {
|
|
39
|
-
"description": "Maximum identities in this small page. Follow continuation
|
|
39
|
+
"description": "Maximum identities in this small page. Follow continuation in native order when the same structural inventory is required, then use returned refs to descend into the selected object.",
|
|
40
40
|
"default": 50,
|
|
41
41
|
"type": "integer",
|
|
42
42
|
"minimum": 1,
|
|
@@ -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.17.
|
|
5
|
+
"version": "0.17.31"
|
|
6
6
|
},
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
@@ -82,17 +82,6 @@
|
|
|
82
82
|
"sha256": "ecf528f83a28f2709efb12182dba18f5f4baf065e8442c76ab568ad01465603d"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
{
|
|
86
|
-
"name": "docx_find_literal",
|
|
87
|
-
"providerContract": {
|
|
88
|
-
"source": "packages/docx-cli/contracts/mcp-input/docx_find_literal.schema.json",
|
|
89
|
-
"sha256": "4b063c8a4c683c1d7eb06ce1feec8e51546dca78759151ff654f41d45a17d64c"
|
|
90
|
-
},
|
|
91
|
-
"inputContract": {
|
|
92
|
-
"path": "office/contracts/docx_find_literal.schema.json",
|
|
93
|
-
"sha256": "4b063c8a4c683c1d7eb06ce1feec8e51546dca78759151ff654f41d45a17d64c"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
85
|
{
|
|
97
86
|
"name": "docx_inspect",
|
|
98
87
|
"providerContract": {
|
|
@@ -108,11 +97,11 @@
|
|
|
108
97
|
"name": "docx_list_objects",
|
|
109
98
|
"providerContract": {
|
|
110
99
|
"source": "packages/docx-cli/contracts/mcp-input/docx_list_objects.schema.json",
|
|
111
|
-
"sha256": "
|
|
100
|
+
"sha256": "f496d10fefe414d49993b447b50ccce4d808fd11e6df8625f8f906de8a2d90bb"
|
|
112
101
|
},
|
|
113
102
|
"inputContract": {
|
|
114
103
|
"path": "office/contracts/docx_list_objects.schema.json",
|
|
115
|
-
"sha256": "
|
|
104
|
+
"sha256": "f496d10fefe414d49993b447b50ccce4d808fd11e6df8625f8f906de8a2d90bb"
|
|
116
105
|
}
|
|
117
106
|
},
|
|
118
107
|
{
|
package/office/index.mjs
CHANGED
|
@@ -205,7 +205,7 @@ const docxObservationNode = z.lazy(() => z.object({
|
|
|
205
205
|
|
|
206
206
|
const docxObservationReceipt = z.object({
|
|
207
207
|
schema: z.literal('tiwater.docx-observation-receipt/v1'),
|
|
208
|
-
operation: z.
|
|
208
|
+
operation: z.literal('list'),
|
|
209
209
|
revision: docxRevision,
|
|
210
210
|
totalCount: z.number().int().nonnegative(),
|
|
211
211
|
returnedCount: z.number().int().nonnegative(),
|
|
@@ -220,19 +220,6 @@ const docxListObjectsOutput = artifactOutput('docx_list_objects').extend({
|
|
|
220
220
|
runtime: runtimeIdentity,
|
|
221
221
|
}).strict();
|
|
222
222
|
|
|
223
|
-
const docxFindLiteralOutput = artifactOutput('docx_find_literal').extend({
|
|
224
|
-
schema: z.literal('tiwater.docx-observation-find/v1'),
|
|
225
|
-
receipt: docxObservationReceipt,
|
|
226
|
-
matches: z.array(z.object({
|
|
227
|
-
object: docxObjectIdentity,
|
|
228
|
-
matches: z.array(z.object({
|
|
229
|
-
offset: z.number().int().nonnegative(),
|
|
230
|
-
length: z.number().int().positive(),
|
|
231
|
-
}).strict()),
|
|
232
|
-
}).strict()),
|
|
233
|
-
runtime: runtimeIdentity,
|
|
234
|
-
}).strict();
|
|
235
|
-
|
|
236
223
|
const docxReadObjectOutput = artifactOutput('docx_read_object').extend({
|
|
237
224
|
revision: docxRevision,
|
|
238
225
|
observation: docxObservationNode,
|
|
@@ -241,7 +228,7 @@ const docxReadObjectOutput = artifactOutput('docx_read_object').extend({
|
|
|
241
228
|
const tools = [
|
|
242
229
|
{
|
|
243
230
|
name: 'docx_inspect',
|
|
244
|
-
description: 'Inspect one current DOCX and retain its complete machine observation at output. The response returns the current revision, observation artifact, table count, and up to six opening non-empty body paragraphs for document identity. Use
|
|
231
|
+
description: 'Inspect one current DOCX and retain its complete machine observation at output. The response returns the current revision, observation artifact, table count, and up to six opening non-empty body paragraphs for document identity. Use list and read operations to traverse selected document objects in native structure order.',
|
|
245
232
|
inputSchema: inputContract('docx_inspect'),
|
|
246
233
|
outputSchema: docxInspectionOutput('docx_inspect'),
|
|
247
234
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
@@ -249,20 +236,12 @@ const tools = [
|
|
|
249
236
|
},
|
|
250
237
|
{
|
|
251
238
|
name: 'docx_list_objects',
|
|
252
|
-
description: 'List one small page of revision-bound nearest-child identities in native document order and retain the exact page at output for later reuse.
|
|
239
|
+
description: 'List one small page of revision-bound nearest-child identities in native document order and retain the exact page at output for later reuse. Request only the object kinds needed by the current local traversal, follow continuation in order, and descend only through returned refs with parentRef. Text previews describe already located objects; never use matching text to identify a document or select a source.',
|
|
253
240
|
inputSchema: inputContract('docx_list_objects'),
|
|
254
241
|
outputSchema: docxListObjectsOutput,
|
|
255
242
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
256
243
|
handler: args => docxObservation('docx_list_objects', args),
|
|
257
244
|
},
|
|
258
|
-
{
|
|
259
|
-
name: 'docx_find_literal',
|
|
260
|
-
description: 'Find exact current text in one small page of revision-bound native DOCX objects and retain the exact page at output for later reuse. With kind table or row, matching includes descendant cell text.',
|
|
261
|
-
inputSchema: inputContract('docx_find_literal'),
|
|
262
|
-
outputSchema: docxFindLiteralOutput,
|
|
263
|
-
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
264
|
-
handler: args => docxObservation('docx_find_literal', args),
|
|
265
|
-
},
|
|
266
245
|
{
|
|
267
246
|
name: 'docx_read_object',
|
|
268
247
|
description: 'Read one selected native DOCX row, cell, or paragraph and requested descendants. For a table, page its row identities with docx_list_objects, then read only the current row. To select exact inline content, make a second read rooted at the observed cell or paragraph and request run or text.',
|
|
@@ -585,16 +564,6 @@ async function docxObservation(tool, args) {
|
|
|
585
564
|
if (tool === 'docx_list_objects') {
|
|
586
565
|
return { ...retained, ...payload, objects: payload.objects.map(compactDocxObjectIdentity) };
|
|
587
566
|
}
|
|
588
|
-
if (tool === 'docx_find_literal') {
|
|
589
|
-
return {
|
|
590
|
-
...retained,
|
|
591
|
-
...payload,
|
|
592
|
-
matches: payload.matches.map(match => ({
|
|
593
|
-
object: compactDocxObjectIdentity(match.object),
|
|
594
|
-
matches: match.matches,
|
|
595
|
-
})),
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
567
|
throw new Error(`unsupported-docx-observation-tool:${tool}`);
|
|
599
568
|
});
|
|
600
569
|
}
|
package/package.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
"x-tiwater-file-role": "read"
|
|
9
|
-
},
|
|
10
|
-
"literal": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"minLength": 1
|
|
13
|
-
},
|
|
14
|
-
"kind": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"enum": [
|
|
17
|
-
"part",
|
|
18
|
-
"paragraph",
|
|
19
|
-
"table",
|
|
20
|
-
"gridColumn",
|
|
21
|
-
"row",
|
|
22
|
-
"cell",
|
|
23
|
-
"run",
|
|
24
|
-
"text",
|
|
25
|
-
"drawing"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"scope": {
|
|
29
|
-
"description": "Exact story-part URI such as /word/document.xml.",
|
|
30
|
-
"type": "string",
|
|
31
|
-
"minLength": 1
|
|
32
|
-
},
|
|
33
|
-
"parentRef": {
|
|
34
|
-
"description": "Optional revision-bound parent object ref. Searches only its nearest published child objects, not every recursive descendant.",
|
|
35
|
-
"type": "string",
|
|
36
|
-
"pattern": "^dox1_[0-9a-f]{64}$"
|
|
37
|
-
},
|
|
38
|
-
"limit": {
|
|
39
|
-
"description": "Maximum matches in this small page. Refine the literal or parentRef when more matches remain; do not raise the page size to extract the document.",
|
|
40
|
-
"default": 50,
|
|
41
|
-
"type": "integer",
|
|
42
|
-
"minimum": 1,
|
|
43
|
-
"maximum": 100
|
|
44
|
-
},
|
|
45
|
-
"continuation": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"minLength": 1
|
|
48
|
-
},
|
|
49
|
-
"output": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"minLength": 1,
|
|
52
|
-
"description": "Absolute path for a new JSON artifact containing this exact search page for later reuse.",
|
|
53
|
-
"x-tiwater-file-role": "write"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"required": [
|
|
57
|
-
"input",
|
|
58
|
-
"literal",
|
|
59
|
-
"output"
|
|
60
|
-
],
|
|
61
|
-
"additionalProperties": false,
|
|
62
|
-
"$id": "tiwater.office-mcp-input/docx_find_literal/v1"
|
|
63
|
-
}
|