@seastudio/sdk 3.0.0 → 3.0.2

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.
Files changed (39) hide show
  1. package/dist/{chunk-6USQFZRH.js → chunk-4JAYW5GM.js} +1 -1
  2. package/dist/chunk-G66KY35N.js +334 -0
  3. package/dist/chunk-ORBVHAAS.cjs +341 -0
  4. package/dist/{chunk-5QAINQWV.js → chunk-S2UIBWKA.js} +16 -11
  5. package/dist/{chunk-AGBZJGTY.cjs → chunk-SUF5BPSK.cjs} +3 -1
  6. package/dist/{chunk-BWG45ZWF.cjs → chunk-SYMWE636.cjs} +1 -1
  7. package/dist/{chunk-N33Y5NY7.cjs → chunk-XIPL7VSP.cjs} +17 -12
  8. package/dist/{chunk-DDVRUPMZ.js → chunk-XU5GEWWL.js} +3 -1
  9. package/dist/index.cjs +140 -115
  10. package/dist/index.d.cts +2 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.js +7 -6
  13. package/dist/mcp/core/index.d.cts +2 -2
  14. package/dist/mcp/core/index.d.ts +2 -2
  15. package/dist/mcp/index.cjs +107 -82
  16. package/dist/mcp/index.d.cts +8 -2
  17. package/dist/mcp/index.d.ts +8 -2
  18. package/dist/mcp/index.js +6 -5
  19. package/dist/mcp/plugin-editor/index.d.cts +1 -1
  20. package/dist/mcp/plugin-editor/index.d.ts +1 -1
  21. package/dist/mcp/plugin-excel/index.d.cts +1 -1
  22. package/dist/mcp/plugin-excel/index.d.ts +1 -1
  23. package/dist/mcp/plugin-preview/index.d.cts +1 -1
  24. package/dist/mcp/plugin-preview/index.d.ts +1 -1
  25. package/dist/mcp/plugin-seaflow/index.d.cts +1 -1
  26. package/dist/mcp/plugin-seaflow/index.d.ts +1 -1
  27. package/dist/mcp/plugin-word/index.cjs +31 -0
  28. package/dist/mcp/plugin-word/index.d.cts +86 -0
  29. package/dist/mcp/plugin-word/index.d.ts +86 -0
  30. package/dist/mcp/plugin-word/index.js +2 -0
  31. package/dist/mcp/seastudio/index.cjs +18 -18
  32. package/dist/mcp/seastudio/index.d.cts +34 -2
  33. package/dist/mcp/seastudio/index.d.ts +34 -2
  34. package/dist/mcp/seastudio/index.js +1 -1
  35. package/dist/{types-Clgf5gBf.d.cts → types-B1Zqr-0Q.d.cts} +1 -1
  36. package/dist/{types-Clgf5gBf.d.ts → types-B1Zqr-0Q.d.ts} +1 -1
  37. package/dist/ui/index.cjs +14 -14
  38. package/dist/ui/index.js +1 -1
  39. package/package.json +1 -1
@@ -25,7 +25,7 @@ function Tab({
25
25
  }
26
26
  },
27
27
  className: cn(
28
- "group flex items-center gap-2 px-3 h-7",
28
+ "group flex h-7 select-none items-center gap-2 px-3",
29
29
  "transition-colors duration-150",
30
30
  disabled ? isActive ? "text-muted-foreground bg-transparent border-b-2 border-muted-foreground/50 cursor-not-allowed" : "text-muted-foreground/50 bg-transparent border-b-2 border-transparent cursor-not-allowed" : isActive ? "text-foreground bg-muted border-b-2 border-primary cursor-pointer" : "text-muted-foreground hover:text-foreground hover:bg-muted/50 border-b-2 border-transparent cursor-pointer",
31
31
  className
@@ -0,0 +1,334 @@
1
+ import { getDefaultClient } from './chunk-ANWOL7SM.js';
2
+
3
+ // src/mcp/plugin-word/tools.ts
4
+ function annotateTool(tool, annotations, outputSchema) {
5
+ return {
6
+ ...tool,
7
+ annotations,
8
+ ...{}
9
+ };
10
+ }
11
+ var targetSchema = {
12
+ type: "object",
13
+ description: "Document target specifier. Use ONE of: blockId, headingText, from/to positions, or omit for current selection / whole document.",
14
+ properties: {
15
+ blockId: { type: "string", description: "Block-level node ID (returned by get_outline / content_read)" },
16
+ blockIndex: { type: "number", description: "0-based top-level block index" },
17
+ headingText: { type: "string", description: "Heading text to locate (first match)" },
18
+ from: { type: "number", description: "ProseMirror absolute start position (inclusive)" },
19
+ to: { type: "number", description: "ProseMirror absolute end position (exclusive)" }
20
+ }
21
+ };
22
+ var inlineStyleSchema = {
23
+ type: "object",
24
+ description: "Inline formatting marks to apply",
25
+ properties: {
26
+ bold: { type: "boolean" },
27
+ italic: { type: "boolean" },
28
+ underline: { type: "boolean" },
29
+ strike: { type: "boolean" },
30
+ fontSize: { type: "string", description: 'Font size, e.g. "14px" or "12pt"' }
31
+ }
32
+ };
33
+ var blockTypeSchema = {
34
+ type: "object",
35
+ description: "Block type specification",
36
+ properties: {
37
+ type: {
38
+ type: "string",
39
+ enum: ["paragraph", "heading", "bulletList", "orderedList", "blockquote", "codeBlock"],
40
+ description: "Target block type"
41
+ },
42
+ attrs: {
43
+ type: "object",
44
+ description: 'Block attributes, e.g. { "level": 2 } for heading',
45
+ properties: {
46
+ level: { type: "number", description: "Heading level 1-6 (only for heading type)" }
47
+ }
48
+ }
49
+ },
50
+ required: ["type"]
51
+ };
52
+ var readTools = [
53
+ annotateTool({
54
+ name: "word-document_get_context",
55
+ description: "\u83B7\u53D6\u5F53\u524D Word \u6587\u6863\u4E0A\u4E0B\u6587\u4FE1\u606F\uFF1A\u6587\u4EF6\u8DEF\u5F84\u3001\u6587\u4EF6\u7C7B\u578B\uFF08docx/doc\uFF09\u3001\u662F\u5426\u5DF2\u4FEE\u6539\u3001\u7248\u672C\u53F7\u3001\u603B\u5757\u6570\u3001\u603B\u5B57\u7B26\u6570\u3001\u6807\u9898\u6570\u91CF\u4EE5\u53CA\u5F53\u524D\u9009\u533A\u6458\u8981\u3002\u8FD9\u662F Agent \u64CD\u4F5C Word \u6587\u6863\u7684\u7B2C\u4E00\u6B65\uFF0C\u7528\u4E8E\u4E86\u89E3\u6587\u6863\u6574\u4F53\u72B6\u6001\u3002",
56
+ inputSchema: { type: "object", properties: {} }
57
+ }, { operationKind: "read", rawDomain: "word" }),
58
+ annotateTool({
59
+ name: "word-document_get_outline",
60
+ description: "\u83B7\u53D6\u6587\u6863\u5927\u7EB2\u7ED3\u6784\uFF1A\u8FD4\u56DE\u6240\u6709\u9876\u5C42\u5757\u7684\u6709\u5E8F\u5217\u8868\uFF0C\u6BCF\u4E2A\u5757\u5305\u542B blockId\u3001blockIndex\u3001blockType\uFF08paragraph/heading/bulletList/orderedList/blockquote/codeBlock\uFF09\u3001\u6587\u672C\u6458\u8981\uFF08\u622A\u65AD\u5230 80 \u5B57\u7B26\uFF09\u3001\u5B57\u7B26\u6570\u3002\u6807\u9898\u5757\u989D\u5916\u8FD4\u56DE level\uFF081-6\uFF09\u3002\u652F\u6301 maxBlocks \u9650\u5236\u8FD4\u56DE\u6570\u91CF\u3002Agent \u5E94\u5148\u8C03\u7528\u6B64\u5DE5\u5177\u4E86\u89E3\u6587\u6863\u7ED3\u6784\uFF0C\u518D\u7528 blockId \u6216 blockIndex \u7CBE\u786E\u5B9A\u4F4D\u64CD\u4F5C\u3002",
61
+ inputSchema: {
62
+ type: "object",
63
+ properties: {
64
+ maxBlocks: { type: "number", description: "\u6700\u5927\u8FD4\u56DE\u5757\u6570\uFF08\u9ED8\u8BA4 200\uFF09" },
65
+ offset: { type: "number", description: "\u8DF3\u8FC7\u524D N \u4E2A\u5757\uFF08\u9ED8\u8BA4 0\uFF0C\u7528\u4E8E\u5206\u9875\uFF09" }
66
+ }
67
+ }
68
+ }, { operationKind: "read", rawDomain: "word" }),
69
+ annotateTool({
70
+ name: "word-selection_get",
71
+ description: "\u83B7\u53D6\u5F53\u524D\u7528\u6237\u9009\u533A\u4FE1\u606F\uFF1A\u9009\u4E2D\u6587\u672C\uFF08plainText\uFF09\u3001\u9009\u533A from/to \u4F4D\u7F6E\u3001\u9009\u533A\u6240\u5728\u7684\u5757 ID \u5217\u8868\u3002\u82E5\u65E0\u9009\u533A\u5219\u8FD4\u56DE\u5149\u6807\u4F4D\u7F6E\u3002",
72
+ inputSchema: { type: "object", properties: {} }
73
+ }, { operationKind: "read", rawDomain: "word" }),
74
+ annotateTool({
75
+ name: "word-content_read",
76
+ description: "\u8BFB\u53D6\u6587\u6863\u5185\u5BB9\u3002\u53EF\u6309\u5168\u6587\u3001blockId\u3001blockIndex\u3001headingText \u6216 from/to \u8303\u56F4\u8BFB\u53D6\u3002\u8FD4\u56DE\u7EAF\u6587\u672C + \u5757\u7ED3\u6784\u4FE1\u606F\u3002\u652F\u6301 maxChars \u9650\u6D41\uFF08\u9ED8\u8BA4 50000\uFF09\u3002\u5EFA\u8BAE Agent \u5148\u7528 get_outline \u83B7\u53D6\u5757\u5217\u8868\uFF0C\u518D\u7528 blockId \u7CBE\u786E\u8BFB\u53D6\u611F\u5174\u8DA3\u7684\u90E8\u5206\uFF0C\u907F\u514D\u4E00\u6B21\u6027\u52A0\u8F7D\u6574\u7BC7\u5927\u6587\u6863\u3002",
77
+ inputSchema: {
78
+ type: "object",
79
+ properties: {
80
+ target: targetSchema,
81
+ maxChars: { type: "number", description: "\u6700\u5927\u8FD4\u56DE\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 50000\uFF09" },
82
+ includeBlockInfo: { type: "boolean", description: "\u662F\u5426\u5305\u542B\u6BCF\u4E2A\u5757\u7684 blockId/blockType \u4FE1\u606F\uFF08\u9ED8\u8BA4 true\uFF09" }
83
+ }
84
+ }
85
+ }, { operationKind: "read", rawDomain: "word" }),
86
+ annotateTool({
87
+ name: "word-content_export_text",
88
+ description: "\u5C06\u6587\u6863\uFF08\u6216\u6307\u5B9A\u8303\u56F4\uFF09\u5BFC\u51FA\u4E3A\u7EAF\u6587\u672C\u5B57\u7B26\u4E32\u3002\u6BB5\u843D\u4E4B\u95F4\u7528\u6362\u884C\u5206\u9694\u3002\u652F\u6301 maxChars \u9650\u6D41\u3002",
89
+ inputSchema: {
90
+ type: "object",
91
+ properties: {
92
+ target: targetSchema,
93
+ maxChars: { type: "number", description: "\u6700\u5927\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 100000\uFF09" }
94
+ }
95
+ }
96
+ }, { operationKind: "read", rawDomain: "word" }),
97
+ annotateTool({
98
+ name: "word-content_export_markdown",
99
+ description: "\u5C06\u6587\u6863\uFF08\u6216\u6307\u5B9A\u8303\u56F4\uFF09\u5BFC\u51FA\u4E3A Markdown \u683C\u5F0F\u3002\u6807\u9898\u8F6C\u4E3A # \u8BED\u6CD5\uFF0C\u5217\u8868\u8F6C\u4E3A - / 1. \u8BED\u6CD5\uFF0C\u7C97\u4F53/\u659C\u4F53\u4FDD\u7559 Markdown \u6807\u8BB0\u3002\u652F\u6301 maxChars \u9650\u6D41\u3002",
100
+ inputSchema: {
101
+ type: "object",
102
+ properties: {
103
+ target: targetSchema,
104
+ maxChars: { type: "number", description: "\u6700\u5927\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 100000\uFF09" }
105
+ }
106
+ }
107
+ }, { operationKind: "read", rawDomain: "word" }),
108
+ annotateTool({
109
+ name: "word-content_export_html",
110
+ description: "\u5C06\u6587\u6863\uFF08\u6216\u6307\u5B9A\u8303\u56F4\uFF09\u5BFC\u51FA\u4E3A HTML \u5B57\u7B26\u4E32\u3002\u4FDD\u7559\u6240\u6709\u884C\u5185\u683C\u5F0F\u3002\u652F\u6301 maxChars \u9650\u6D41\u3002",
111
+ inputSchema: {
112
+ type: "object",
113
+ properties: {
114
+ target: targetSchema,
115
+ maxChars: { type: "number", description: "\u6700\u5927\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 100000\uFF09" }
116
+ }
117
+ }
118
+ }, { operationKind: "read", rawDomain: "word" }),
119
+ annotateTool({
120
+ name: "word-find",
121
+ description: "\u5728\u6587\u6863\u4E2D\u641C\u7D22\u6587\u672C\u3002\u8FD4\u56DE\u6240\u6709\u5339\u914D\u9879\u7684\u4F4D\u7F6E\uFF08from/to\uFF09\u3001\u6240\u5728\u5757 ID\u3001\u5339\u914D\u6587\u672C\u53CA\u5176\u524D\u540E\u4E0A\u4E0B\u6587\uFF08\u5404 40 \u5B57\u7B26\uFF09\u3002\u652F\u6301\u5927\u5C0F\u5199\u654F\u611F\u3001\u6B63\u5219\u6A21\u5F0F\u548C\u6700\u5927\u7ED3\u679C\u6570\u9650\u5236\u3002",
122
+ inputSchema: {
123
+ type: "object",
124
+ properties: {
125
+ query: { type: "string", description: "\u641C\u7D22\u5173\u952E\u5B57\u6216\u6B63\u5219\u8868\u8FBE\u5F0F" },
126
+ matchCase: { type: "boolean", description: "\u662F\u5426\u533A\u5206\u5927\u5C0F\u5199\uFF08\u9ED8\u8BA4 false\uFF09" },
127
+ useRegex: { type: "boolean", description: "\u662F\u5426\u5C06 query \u4F5C\u4E3A\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08\u9ED8\u8BA4 false\uFF09" },
128
+ target: targetSchema,
129
+ maxResults: { type: "number", description: "\u6700\u5927\u8FD4\u56DE\u6570\u91CF\uFF08\u9ED8\u8BA4 100\uFF09" }
130
+ },
131
+ required: ["query"]
132
+ }
133
+ }, { operationKind: "read", rawDomain: "word" }),
134
+ annotateTool({
135
+ name: "word-styles_list",
136
+ description: "\u5217\u51FA\u5F53\u524D\u7F16\u8F91\u5668\u652F\u6301\u7684\u5757\u7EA7\u7C7B\u578B\uFF08paragraph/heading/bulletList \u7B49\uFF09\u548C\u884C\u5185\u6807\u8BB0\uFF08bold/italic/underline/strike/fontSize\uFF09\u3002Agent \u53EF\u636E\u6B64\u5224\u65AD\u53EF\u7528\u7684\u683C\u5F0F\u5316\u80FD\u529B\u3002",
137
+ inputSchema: { type: "object", properties: {} }
138
+ }, { operationKind: "read", rawDomain: "word" })
139
+ ];
140
+ var mutateTools = [
141
+ annotateTool({
142
+ name: "word-selection_set",
143
+ description: "\u8BBE\u7F6E\u5F53\u524D\u9009\u533A\u3002\u53EF\u901A\u8FC7 blockId \u9009\u4E2D\u6574\u4E2A\u5757\uFF0C\u901A\u8FC7 from/to \u9009\u4E2D\u7CBE\u786E\u8303\u56F4\uFF0C\u6216\u901A\u8FC7 headingText \u9009\u4E2D\u67D0\u4E2A\u6807\u9898\u5757\u3002",
144
+ inputSchema: {
145
+ type: "object",
146
+ properties: { target: targetSchema },
147
+ required: ["target"]
148
+ }
149
+ }, { operationKind: "mutate", rawDomain: "word" }),
150
+ annotateTool({
151
+ name: "word-content_replace",
152
+ description: "\u66FF\u6362\u6307\u5B9A\u8303\u56F4\u7684\u5185\u5BB9\u4E3A\u65B0\u6587\u672C\u3002target \u6307\u5B9A\u66FF\u6362\u4F4D\u7F6E\uFF08blockId / from+to / \u5F53\u524D\u9009\u533A\uFF09\uFF0Ctext \u4E3A\u65B0\u5185\u5BB9\u3002\u82E5 target \u7701\u7565\u5219\u66FF\u6362\u5F53\u524D\u9009\u533A\u3002\u8FD4\u56DE MutationResult\u3002",
153
+ inputSchema: {
154
+ type: "object",
155
+ properties: {
156
+ target: targetSchema,
157
+ text: { type: "string", description: "\u66FF\u6362\u4E3A\u7684\u65B0\u6587\u672C\u5185\u5BB9" }
158
+ },
159
+ required: ["text"]
160
+ }
161
+ }, { operationKind: "mutate", rawDomain: "word" }),
162
+ annotateTool({
163
+ name: "word-content_insert_text",
164
+ description: "\u5728\u6307\u5B9A\u4F4D\u7F6E\u63D2\u5165\u6587\u672C\u3002position \u63A7\u5236\u63D2\u5165\u70B9\uFF1Aat \u6307\u5B9A\u7EDD\u5BF9\u4F4D\u7F6E\uFF0CafterBlock/beforeBlock \u6307\u5B9A\u5728\u67D0\u4E2A\u5757\u524D\u540E\u63D2\u5165\uFF0CatEnd \u63D2\u5165\u5230\u6587\u6863\u672B\u5C3E\u3002\u652F\u6301\u63D2\u5165\u7EAF\u6587\u672C\u6216\u5E26\u6362\u884C\u7684\u591A\u6BB5\u6587\u672C\u3002",
165
+ inputSchema: {
166
+ type: "object",
167
+ properties: {
168
+ text: { type: "string", description: "\u8981\u63D2\u5165\u7684\u6587\u672C\u5185\u5BB9" },
169
+ at: { type: "number", description: "ProseMirror \u7EDD\u5BF9\u4F4D\u7F6E" },
170
+ afterBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u540E\u63D2\u5165" },
171
+ beforeBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u524D\u63D2\u5165" },
172
+ atEnd: { type: "boolean", description: "\u63D2\u5165\u5230\u6587\u6863\u672B\u5C3E\uFF08\u9ED8\u8BA4 false\uFF09" }
173
+ },
174
+ required: ["text"]
175
+ }
176
+ }, { operationKind: "mutate", rawDomain: "word" }),
177
+ annotateTool({
178
+ name: "word-block_insert",
179
+ description: "\u5728\u6307\u5B9A\u4F4D\u7F6E\u63D2\u5165\u4E00\u4E2A\u65B0\u7684\u5757\u7EA7\u8282\u70B9\uFF08\u6BB5\u843D\u3001\u6807\u9898\u3001\u5217\u8868\u3001\u5F15\u7528\u3001\u4EE3\u7801\u5757\uFF09\u3002\u53EF\u6307\u5B9A\u5728\u67D0\u4E2A blockId \u524D\u540E\u63D2\u5165\u6216\u5728\u6587\u6863\u672B\u5C3E\u8FFD\u52A0\u3002",
180
+ inputSchema: {
181
+ type: "object",
182
+ properties: {
183
+ blockType: blockTypeSchema,
184
+ content: { type: "string", description: "\u5757\u7684\u6587\u672C\u5185\u5BB9" },
185
+ afterBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u540E\u63D2\u5165" },
186
+ beforeBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u524D\u63D2\u5165" },
187
+ atEnd: { type: "boolean", description: "\u8FFD\u52A0\u5230\u6587\u6863\u672B\u5C3E\uFF08\u9ED8\u8BA4 false\uFF09" }
188
+ },
189
+ required: ["blockType", "content"]
190
+ }
191
+ }, { operationKind: "mutate", rawDomain: "word" }),
192
+ annotateTool({
193
+ name: "word-block_delete",
194
+ description: "\u5220\u9664\u6307\u5B9A\u7684\u5757\u3002\u652F\u6301\u6309 blockId\u3001blockIndex \u6216 from/to \u8303\u56F4\u5220\u9664\u3002",
195
+ inputSchema: {
196
+ type: "object",
197
+ properties: { target: targetSchema },
198
+ required: ["target"]
199
+ }
200
+ }, { operationKind: "mutate", rawDomain: "word" }),
201
+ annotateTool({
202
+ name: "word-block_move",
203
+ description: "\u79FB\u52A8\u4E00\u4E2A\u5757\u5230\u65B0\u4F4D\u7F6E\u3002\u6307\u5B9A\u6E90\u5757\uFF08by blockId \u6216 blockIndex\uFF09\u548C\u76EE\u6807\u4F4D\u7F6E\uFF08\u76EE\u6807 blockId \u4E4B\u524D\u6216\u4E4B\u540E\uFF09\u3002\u9002\u5408\u5927\u7EB2\u91CD\u6392\u3002",
204
+ inputSchema: {
205
+ type: "object",
206
+ properties: {
207
+ sourceBlockId: { type: "string", description: "\u8981\u79FB\u52A8\u7684\u5757 ID" },
208
+ sourceBlockIndex: { type: "number", description: "\u8981\u79FB\u52A8\u7684\u5757\u7D22\u5F15\uFF08\u4E0E sourceBlockId \u4E8C\u9009\u4E00\uFF09" },
209
+ targetBlockId: { type: "string", description: "\u76EE\u6807\u4F4D\u7F6E\u53C2\u8003\u5757 ID" },
210
+ position: { type: "string", enum: ["before", "after"], description: "\u653E\u5728\u76EE\u6807\u5757\u4E4B\u524D\u8FD8\u662F\u4E4B\u540E\uFF08\u9ED8\u8BA4 after\uFF09" }
211
+ }
212
+ }
213
+ }, { operationKind: "mutate", rawDomain: "word" }),
214
+ annotateTool({
215
+ name: "word-format_apply_inline",
216
+ description: "\u5BF9\u6307\u5B9A\u8303\u56F4\u5E94\u7528\u884C\u5185\u683C\u5F0F\uFF08\u7C97\u4F53\u3001\u659C\u4F53\u3001\u4E0B\u5212\u7EBF\u3001\u5220\u9664\u7EBF\u3001\u5B57\u53F7\uFF09\u3002\u82E5 target \u7701\u7565\u5219\u4F5C\u7528\u4E8E\u5F53\u524D\u9009\u533A\u3002\u53EF\u7528 toggle \u6A21\u5F0F\uFF08\u5982 bold: true \u5F00\u542F\u3001bold: false \u5173\u95ED\uFF09\u3002",
217
+ inputSchema: {
218
+ type: "object",
219
+ properties: {
220
+ target: targetSchema,
221
+ style: inlineStyleSchema
222
+ },
223
+ required: ["style"]
224
+ }
225
+ }, { operationKind: "mutate", rawDomain: "word" }),
226
+ annotateTool({
227
+ name: "word-format_set_block",
228
+ description: "\u5C06\u6307\u5B9A\u5757\u7684\u7C7B\u578B\u8F6C\u6362\u4E3A\u53E6\u4E00\u79CD\u5757\u7C7B\u578B\u3002\u4F8B\u5982\u5C06\u6BB5\u843D\u8F6C\u4E3A\u6807\u9898\u3001\u5C06\u6BB5\u843D\u8F6C\u4E3A\u5217\u8868\u9879\u7B49\u3002\u82E5 target \u7701\u7565\u5219\u4F5C\u7528\u4E8E\u5F53\u524D\u5149\u6807\u6240\u5728\u5757\u3002",
229
+ inputSchema: {
230
+ type: "object",
231
+ properties: {
232
+ target: targetSchema,
233
+ blockType: blockTypeSchema
234
+ },
235
+ required: ["blockType"]
236
+ }
237
+ }, { operationKind: "mutate", rawDomain: "word" }),
238
+ annotateTool({
239
+ name: "word-find_replace",
240
+ description: "\u6279\u91CF\u67E5\u627E\u5E76\u66FF\u6362\u6587\u6863\u4E2D\u7684\u6587\u672C\u3002\u8FD4\u56DE\u66FF\u6362\u6B21\u6570\u3002\u652F\u6301\u5927\u5C0F\u5199\u654F\u611F\u548C\u6B63\u5219\u6A21\u5F0F\u3002",
241
+ inputSchema: {
242
+ type: "object",
243
+ properties: {
244
+ query: { type: "string", description: "\u8981\u67E5\u627E\u7684\u6587\u672C\u6216\u6B63\u5219\u8868\u8FBE\u5F0F" },
245
+ replacement: { type: "string", description: "\u66FF\u6362\u4E3A\u7684\u6587\u672C" },
246
+ matchCase: { type: "boolean", description: "\u662F\u5426\u533A\u5206\u5927\u5C0F\u5199\uFF08\u9ED8\u8BA4 false\uFF09" },
247
+ useRegex: { type: "boolean", description: "\u662F\u5426\u5C06 query \u4F5C\u4E3A\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08\u9ED8\u8BA4 false\uFF09" },
248
+ target: targetSchema,
249
+ maxReplacements: { type: "number", description: "\u6700\u5927\u66FF\u6362\u6B21\u6570\uFF08\u9ED8\u8BA4 1000\uFF09" }
250
+ },
251
+ required: ["query", "replacement"]
252
+ }
253
+ }, { operationKind: "mutate", rawDomain: "word" }),
254
+ annotateTool({
255
+ name: "word-batch_apply",
256
+ description: "\u6279\u91CF\u6267\u884C\u591A\u4E2A\u64CD\u4F5C\uFF08\u987A\u5E8F\u6267\u884C\uFF09\u3002\u6BCF\u4E2A\u64CD\u4F5C\u5305\u542B type\uFF08\u5BF9\u5E94\u5DE5\u5177\u540D\u53BB\u6389 word- \u524D\u7F00\uFF09\u548C params\u3002\u8FD4\u56DE\u9010\u9879\u7ED3\u679C\u3002\u9002\u5408\u9700\u8981\u591A\u6B65\u7F16\u8F91\u7684\u573A\u666F\uFF0C\u51CF\u5C11\u5F80\u8FD4\u6B21\u6570\u3002",
257
+ inputSchema: {
258
+ type: "object",
259
+ properties: {
260
+ operations: {
261
+ type: "array",
262
+ description: "\u64CD\u4F5C\u5217\u8868",
263
+ items: {
264
+ type: "object",
265
+ properties: {
266
+ type: {
267
+ type: "string",
268
+ description: "\u64CD\u4F5C\u7C7B\u578B\uFF1Acontent_replace, content_insert_text, block_insert, block_delete, block_move, format_apply_inline, format_set_block, find_replace, selection_set"
269
+ },
270
+ params: { type: "object", description: "\u64CD\u4F5C\u53C2\u6570\uFF08\u4E0E\u5BF9\u5E94\u5355\u72EC\u5DE5\u5177\u7684 inputSchema \u4E00\u81F4\uFF09", additionalProperties: true }
271
+ },
272
+ required: ["type", "params"]
273
+ }
274
+ }
275
+ },
276
+ required: ["operations"]
277
+ }
278
+ }, { operationKind: "mutate", rawDomain: "word" })
279
+ ];
280
+ var lifecycleTools = [
281
+ annotateTool({
282
+ name: "word-document_open_path",
283
+ description: "\u6253\u5F00\u6307\u5B9A\u8DEF\u5F84\u7684 Word \u6587\u6863\uFF08.docx \u6216 .doc\uFF09\u3002.doc \u6587\u4EF6\u4F1A\u81EA\u52A8\u8F6C\u6362\uFF0C\u540E\u7EED\u4FDD\u5B58\u4E3A .docx\u3002",
284
+ inputSchema: {
285
+ type: "object",
286
+ properties: { path: { type: "string", description: "\u6587\u4EF6\u7EDD\u5BF9\u8DEF\u5F84" } },
287
+ required: ["path"]
288
+ }
289
+ }, { operationKind: "mutate", rawDomain: "word" }),
290
+ annotateTool({
291
+ name: "word-document_save",
292
+ description: "\u4FDD\u5B58\u5F53\u524D\u6587\u6863\u5230\u78C1\u76D8\u3002.doc \u5BFC\u5165\u7684\u6587\u4EF6\u4F1A\u81EA\u52A8\u4FDD\u5B58\u4E3A .docx \u683C\u5F0F\u3002",
293
+ inputSchema: { type: "object", properties: {} }
294
+ }, { operationKind: "mutate", rawDomain: "word" }),
295
+ annotateTool({
296
+ name: "word-document_reload",
297
+ description: "\u4ECE\u78C1\u76D8\u91CD\u65B0\u52A0\u8F7D\u5F53\u524D\u6587\u6863\uFF08\u4E22\u5F03\u5185\u5B58\u4E2D\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF09\u3002",
298
+ inputSchema: { type: "object", properties: {} }
299
+ }, { operationKind: "mutate", rawDomain: "word" })
300
+ ];
301
+ var tools = [...readTools, ...mutateTools, ...lifecycleTools];
302
+ var allTools = tools;
303
+ async function callTool(name, args = {}) {
304
+ return getDefaultClient().callTool(name, args);
305
+ }
306
+ var word = {
307
+ // Read
308
+ getContext: () => callTool("word-document_get_context"),
309
+ getOutline: (opts) => callTool("word-document_get_outline", opts ?? {}),
310
+ getSelection: () => callTool("word-selection_get"),
311
+ readContent: (opts) => callTool("word-content_read", opts ?? {}),
312
+ exportText: (opts) => callTool("word-content_export_text", opts ?? {}),
313
+ exportMarkdown: (opts) => callTool("word-content_export_markdown", opts ?? {}),
314
+ exportHtml: (opts) => callTool("word-content_export_html", opts ?? {}),
315
+ find: (query, opts) => callTool("word-find", { query, ...opts }),
316
+ listStyles: () => callTool("word-styles_list"),
317
+ // Mutate
318
+ setSelection: (target) => callTool("word-selection_set", { target }),
319
+ replaceContent: (text, target) => callTool("word-content_replace", { text, ...target ? { target } : {} }),
320
+ insertText: (text, opts) => callTool("word-content_insert_text", { text, ...opts }),
321
+ insertBlock: (blockType, content, opts) => callTool("word-block_insert", { blockType, content, ...opts }),
322
+ deleteBlock: (target) => callTool("word-block_delete", { target }),
323
+ moveBlock: (opts) => callTool("word-block_move", opts),
324
+ applyInlineFormat: (style, target) => callTool("word-format_apply_inline", { style, ...target ? { target } : {} }),
325
+ setBlockType: (blockType, target) => callTool("word-format_set_block", { blockType, ...target ? { target } : {} }),
326
+ findReplace: (query, replacement, opts) => callTool("word-find_replace", { query, replacement, ...opts }),
327
+ batchApply: (operations) => callTool("word-batch_apply", { operations }),
328
+ // Lifecycle
329
+ openPath: (path) => callTool("word-document_open_path", { path }),
330
+ save: () => callTool("word-document_save"),
331
+ reload: () => callTool("word-document_reload")
332
+ };
333
+
334
+ export { allTools, lifecycleTools, mutateTools, readTools, tools, word };