@seastudio/sdk 3.0.1 → 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.
- package/dist/chunk-G66KY35N.js +334 -0
- package/dist/chunk-ORBVHAAS.cjs +341 -0
- package/dist/{chunk-V7MNKGS7.js → chunk-S2UIBWKA.js} +14 -9
- package/dist/{chunk-AGBZJGTY.cjs → chunk-SUF5BPSK.cjs} +3 -1
- package/dist/{chunk-CSXDT47Y.cjs → chunk-XIPL7VSP.cjs} +15 -10
- package/dist/{chunk-DDVRUPMZ.js → chunk-XU5GEWWL.js} +3 -1
- package/dist/index.cjs +126 -101
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -4
- package/dist/mcp/core/index.d.cts +2 -2
- package/dist/mcp/core/index.d.ts +2 -2
- package/dist/mcp/index.cjs +93 -68
- package/dist/mcp/index.d.cts +8 -2
- package/dist/mcp/index.d.ts +8 -2
- package/dist/mcp/index.js +4 -3
- package/dist/mcp/plugin-editor/index.d.cts +1 -1
- package/dist/mcp/plugin-editor/index.d.ts +1 -1
- package/dist/mcp/plugin-excel/index.d.cts +1 -1
- package/dist/mcp/plugin-excel/index.d.ts +1 -1
- package/dist/mcp/plugin-preview/index.d.cts +1 -1
- package/dist/mcp/plugin-preview/index.d.ts +1 -1
- package/dist/mcp/plugin-seaflow/index.d.cts +1 -1
- package/dist/mcp/plugin-seaflow/index.d.ts +1 -1
- package/dist/mcp/plugin-word/index.cjs +31 -0
- package/dist/mcp/plugin-word/index.d.cts +86 -0
- package/dist/mcp/plugin-word/index.d.ts +86 -0
- package/dist/mcp/plugin-word/index.js +2 -0
- package/dist/mcp/seastudio/index.cjs +18 -18
- package/dist/mcp/seastudio/index.d.cts +34 -2
- package/dist/mcp/seastudio/index.d.ts +34 -2
- package/dist/mcp/seastudio/index.js +1 -1
- package/dist/{types-Clgf5gBf.d.cts → types-B1Zqr-0Q.d.cts} +1 -1
- package/dist/{types-Clgf5gBf.d.ts → types-B1Zqr-0Q.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkTFOJLA2F_cjs = require('./chunk-TFOJLA2F.cjs');
|
|
4
|
+
|
|
5
|
+
// src/mcp/plugin-word/tools.ts
|
|
6
|
+
function annotateTool(tool, annotations, outputSchema) {
|
|
7
|
+
return {
|
|
8
|
+
...tool,
|
|
9
|
+
annotations,
|
|
10
|
+
...{}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var targetSchema = {
|
|
14
|
+
type: "object",
|
|
15
|
+
description: "Document target specifier. Use ONE of: blockId, headingText, from/to positions, or omit for current selection / whole document.",
|
|
16
|
+
properties: {
|
|
17
|
+
blockId: { type: "string", description: "Block-level node ID (returned by get_outline / content_read)" },
|
|
18
|
+
blockIndex: { type: "number", description: "0-based top-level block index" },
|
|
19
|
+
headingText: { type: "string", description: "Heading text to locate (first match)" },
|
|
20
|
+
from: { type: "number", description: "ProseMirror absolute start position (inclusive)" },
|
|
21
|
+
to: { type: "number", description: "ProseMirror absolute end position (exclusive)" }
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var inlineStyleSchema = {
|
|
25
|
+
type: "object",
|
|
26
|
+
description: "Inline formatting marks to apply",
|
|
27
|
+
properties: {
|
|
28
|
+
bold: { type: "boolean" },
|
|
29
|
+
italic: { type: "boolean" },
|
|
30
|
+
underline: { type: "boolean" },
|
|
31
|
+
strike: { type: "boolean" },
|
|
32
|
+
fontSize: { type: "string", description: 'Font size, e.g. "14px" or "12pt"' }
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var blockTypeSchema = {
|
|
36
|
+
type: "object",
|
|
37
|
+
description: "Block type specification",
|
|
38
|
+
properties: {
|
|
39
|
+
type: {
|
|
40
|
+
type: "string",
|
|
41
|
+
enum: ["paragraph", "heading", "bulletList", "orderedList", "blockquote", "codeBlock"],
|
|
42
|
+
description: "Target block type"
|
|
43
|
+
},
|
|
44
|
+
attrs: {
|
|
45
|
+
type: "object",
|
|
46
|
+
description: 'Block attributes, e.g. { "level": 2 } for heading',
|
|
47
|
+
properties: {
|
|
48
|
+
level: { type: "number", description: "Heading level 1-6 (only for heading type)" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
required: ["type"]
|
|
53
|
+
};
|
|
54
|
+
var readTools = [
|
|
55
|
+
annotateTool({
|
|
56
|
+
name: "word-document_get_context",
|
|
57
|
+
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",
|
|
58
|
+
inputSchema: { type: "object", properties: {} }
|
|
59
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
60
|
+
annotateTool({
|
|
61
|
+
name: "word-document_get_outline",
|
|
62
|
+
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",
|
|
63
|
+
inputSchema: {
|
|
64
|
+
type: "object",
|
|
65
|
+
properties: {
|
|
66
|
+
maxBlocks: { type: "number", description: "\u6700\u5927\u8FD4\u56DE\u5757\u6570\uFF08\u9ED8\u8BA4 200\uFF09" },
|
|
67
|
+
offset: { type: "number", description: "\u8DF3\u8FC7\u524D N \u4E2A\u5757\uFF08\u9ED8\u8BA4 0\uFF0C\u7528\u4E8E\u5206\u9875\uFF09" }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
71
|
+
annotateTool({
|
|
72
|
+
name: "word-selection_get",
|
|
73
|
+
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",
|
|
74
|
+
inputSchema: { type: "object", properties: {} }
|
|
75
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
76
|
+
annotateTool({
|
|
77
|
+
name: "word-content_read",
|
|
78
|
+
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",
|
|
79
|
+
inputSchema: {
|
|
80
|
+
type: "object",
|
|
81
|
+
properties: {
|
|
82
|
+
target: targetSchema,
|
|
83
|
+
maxChars: { type: "number", description: "\u6700\u5927\u8FD4\u56DE\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 50000\uFF09" },
|
|
84
|
+
includeBlockInfo: { type: "boolean", description: "\u662F\u5426\u5305\u542B\u6BCF\u4E2A\u5757\u7684 blockId/blockType \u4FE1\u606F\uFF08\u9ED8\u8BA4 true\uFF09" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
88
|
+
annotateTool({
|
|
89
|
+
name: "word-content_export_text",
|
|
90
|
+
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",
|
|
91
|
+
inputSchema: {
|
|
92
|
+
type: "object",
|
|
93
|
+
properties: {
|
|
94
|
+
target: targetSchema,
|
|
95
|
+
maxChars: { type: "number", description: "\u6700\u5927\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 100000\uFF09" }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
99
|
+
annotateTool({
|
|
100
|
+
name: "word-content_export_markdown",
|
|
101
|
+
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",
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: "object",
|
|
104
|
+
properties: {
|
|
105
|
+
target: targetSchema,
|
|
106
|
+
maxChars: { type: "number", description: "\u6700\u5927\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 100000\uFF09" }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
110
|
+
annotateTool({
|
|
111
|
+
name: "word-content_export_html",
|
|
112
|
+
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",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
target: targetSchema,
|
|
117
|
+
maxChars: { type: "number", description: "\u6700\u5927\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 100000\uFF09" }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
121
|
+
annotateTool({
|
|
122
|
+
name: "word-find",
|
|
123
|
+
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",
|
|
124
|
+
inputSchema: {
|
|
125
|
+
type: "object",
|
|
126
|
+
properties: {
|
|
127
|
+
query: { type: "string", description: "\u641C\u7D22\u5173\u952E\u5B57\u6216\u6B63\u5219\u8868\u8FBE\u5F0F" },
|
|
128
|
+
matchCase: { type: "boolean", description: "\u662F\u5426\u533A\u5206\u5927\u5C0F\u5199\uFF08\u9ED8\u8BA4 false\uFF09" },
|
|
129
|
+
useRegex: { type: "boolean", description: "\u662F\u5426\u5C06 query \u4F5C\u4E3A\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08\u9ED8\u8BA4 false\uFF09" },
|
|
130
|
+
target: targetSchema,
|
|
131
|
+
maxResults: { type: "number", description: "\u6700\u5927\u8FD4\u56DE\u6570\u91CF\uFF08\u9ED8\u8BA4 100\uFF09" }
|
|
132
|
+
},
|
|
133
|
+
required: ["query"]
|
|
134
|
+
}
|
|
135
|
+
}, { operationKind: "read", rawDomain: "word" }),
|
|
136
|
+
annotateTool({
|
|
137
|
+
name: "word-styles_list",
|
|
138
|
+
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",
|
|
139
|
+
inputSchema: { type: "object", properties: {} }
|
|
140
|
+
}, { operationKind: "read", rawDomain: "word" })
|
|
141
|
+
];
|
|
142
|
+
var mutateTools = [
|
|
143
|
+
annotateTool({
|
|
144
|
+
name: "word-selection_set",
|
|
145
|
+
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",
|
|
146
|
+
inputSchema: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: { target: targetSchema },
|
|
149
|
+
required: ["target"]
|
|
150
|
+
}
|
|
151
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
152
|
+
annotateTool({
|
|
153
|
+
name: "word-content_replace",
|
|
154
|
+
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",
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: "object",
|
|
157
|
+
properties: {
|
|
158
|
+
target: targetSchema,
|
|
159
|
+
text: { type: "string", description: "\u66FF\u6362\u4E3A\u7684\u65B0\u6587\u672C\u5185\u5BB9" }
|
|
160
|
+
},
|
|
161
|
+
required: ["text"]
|
|
162
|
+
}
|
|
163
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
164
|
+
annotateTool({
|
|
165
|
+
name: "word-content_insert_text",
|
|
166
|
+
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",
|
|
167
|
+
inputSchema: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
text: { type: "string", description: "\u8981\u63D2\u5165\u7684\u6587\u672C\u5185\u5BB9" },
|
|
171
|
+
at: { type: "number", description: "ProseMirror \u7EDD\u5BF9\u4F4D\u7F6E" },
|
|
172
|
+
afterBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u540E\u63D2\u5165" },
|
|
173
|
+
beforeBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u524D\u63D2\u5165" },
|
|
174
|
+
atEnd: { type: "boolean", description: "\u63D2\u5165\u5230\u6587\u6863\u672B\u5C3E\uFF08\u9ED8\u8BA4 false\uFF09" }
|
|
175
|
+
},
|
|
176
|
+
required: ["text"]
|
|
177
|
+
}
|
|
178
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
179
|
+
annotateTool({
|
|
180
|
+
name: "word-block_insert",
|
|
181
|
+
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",
|
|
182
|
+
inputSchema: {
|
|
183
|
+
type: "object",
|
|
184
|
+
properties: {
|
|
185
|
+
blockType: blockTypeSchema,
|
|
186
|
+
content: { type: "string", description: "\u5757\u7684\u6587\u672C\u5185\u5BB9" },
|
|
187
|
+
afterBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u540E\u63D2\u5165" },
|
|
188
|
+
beforeBlock: { type: "string", description: "\u5728\u6B64 blockId \u4E4B\u524D\u63D2\u5165" },
|
|
189
|
+
atEnd: { type: "boolean", description: "\u8FFD\u52A0\u5230\u6587\u6863\u672B\u5C3E\uFF08\u9ED8\u8BA4 false\uFF09" }
|
|
190
|
+
},
|
|
191
|
+
required: ["blockType", "content"]
|
|
192
|
+
}
|
|
193
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
194
|
+
annotateTool({
|
|
195
|
+
name: "word-block_delete",
|
|
196
|
+
description: "\u5220\u9664\u6307\u5B9A\u7684\u5757\u3002\u652F\u6301\u6309 blockId\u3001blockIndex \u6216 from/to \u8303\u56F4\u5220\u9664\u3002",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: { target: targetSchema },
|
|
200
|
+
required: ["target"]
|
|
201
|
+
}
|
|
202
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
203
|
+
annotateTool({
|
|
204
|
+
name: "word-block_move",
|
|
205
|
+
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",
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: "object",
|
|
208
|
+
properties: {
|
|
209
|
+
sourceBlockId: { type: "string", description: "\u8981\u79FB\u52A8\u7684\u5757 ID" },
|
|
210
|
+
sourceBlockIndex: { type: "number", description: "\u8981\u79FB\u52A8\u7684\u5757\u7D22\u5F15\uFF08\u4E0E sourceBlockId \u4E8C\u9009\u4E00\uFF09" },
|
|
211
|
+
targetBlockId: { type: "string", description: "\u76EE\u6807\u4F4D\u7F6E\u53C2\u8003\u5757 ID" },
|
|
212
|
+
position: { type: "string", enum: ["before", "after"], description: "\u653E\u5728\u76EE\u6807\u5757\u4E4B\u524D\u8FD8\u662F\u4E4B\u540E\uFF08\u9ED8\u8BA4 after\uFF09" }
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
216
|
+
annotateTool({
|
|
217
|
+
name: "word-format_apply_inline",
|
|
218
|
+
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",
|
|
219
|
+
inputSchema: {
|
|
220
|
+
type: "object",
|
|
221
|
+
properties: {
|
|
222
|
+
target: targetSchema,
|
|
223
|
+
style: inlineStyleSchema
|
|
224
|
+
},
|
|
225
|
+
required: ["style"]
|
|
226
|
+
}
|
|
227
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
228
|
+
annotateTool({
|
|
229
|
+
name: "word-format_set_block",
|
|
230
|
+
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",
|
|
231
|
+
inputSchema: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
target: targetSchema,
|
|
235
|
+
blockType: blockTypeSchema
|
|
236
|
+
},
|
|
237
|
+
required: ["blockType"]
|
|
238
|
+
}
|
|
239
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
240
|
+
annotateTool({
|
|
241
|
+
name: "word-find_replace",
|
|
242
|
+
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",
|
|
243
|
+
inputSchema: {
|
|
244
|
+
type: "object",
|
|
245
|
+
properties: {
|
|
246
|
+
query: { type: "string", description: "\u8981\u67E5\u627E\u7684\u6587\u672C\u6216\u6B63\u5219\u8868\u8FBE\u5F0F" },
|
|
247
|
+
replacement: { type: "string", description: "\u66FF\u6362\u4E3A\u7684\u6587\u672C" },
|
|
248
|
+
matchCase: { type: "boolean", description: "\u662F\u5426\u533A\u5206\u5927\u5C0F\u5199\uFF08\u9ED8\u8BA4 false\uFF09" },
|
|
249
|
+
useRegex: { type: "boolean", description: "\u662F\u5426\u5C06 query \u4F5C\u4E3A\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08\u9ED8\u8BA4 false\uFF09" },
|
|
250
|
+
target: targetSchema,
|
|
251
|
+
maxReplacements: { type: "number", description: "\u6700\u5927\u66FF\u6362\u6B21\u6570\uFF08\u9ED8\u8BA4 1000\uFF09" }
|
|
252
|
+
},
|
|
253
|
+
required: ["query", "replacement"]
|
|
254
|
+
}
|
|
255
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
256
|
+
annotateTool({
|
|
257
|
+
name: "word-batch_apply",
|
|
258
|
+
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",
|
|
259
|
+
inputSchema: {
|
|
260
|
+
type: "object",
|
|
261
|
+
properties: {
|
|
262
|
+
operations: {
|
|
263
|
+
type: "array",
|
|
264
|
+
description: "\u64CD\u4F5C\u5217\u8868",
|
|
265
|
+
items: {
|
|
266
|
+
type: "object",
|
|
267
|
+
properties: {
|
|
268
|
+
type: {
|
|
269
|
+
type: "string",
|
|
270
|
+
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"
|
|
271
|
+
},
|
|
272
|
+
params: { type: "object", description: "\u64CD\u4F5C\u53C2\u6570\uFF08\u4E0E\u5BF9\u5E94\u5355\u72EC\u5DE5\u5177\u7684 inputSchema \u4E00\u81F4\uFF09", additionalProperties: true }
|
|
273
|
+
},
|
|
274
|
+
required: ["type", "params"]
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
required: ["operations"]
|
|
279
|
+
}
|
|
280
|
+
}, { operationKind: "mutate", rawDomain: "word" })
|
|
281
|
+
];
|
|
282
|
+
var lifecycleTools = [
|
|
283
|
+
annotateTool({
|
|
284
|
+
name: "word-document_open_path",
|
|
285
|
+
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",
|
|
286
|
+
inputSchema: {
|
|
287
|
+
type: "object",
|
|
288
|
+
properties: { path: { type: "string", description: "\u6587\u4EF6\u7EDD\u5BF9\u8DEF\u5F84" } },
|
|
289
|
+
required: ["path"]
|
|
290
|
+
}
|
|
291
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
292
|
+
annotateTool({
|
|
293
|
+
name: "word-document_save",
|
|
294
|
+
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",
|
|
295
|
+
inputSchema: { type: "object", properties: {} }
|
|
296
|
+
}, { operationKind: "mutate", rawDomain: "word" }),
|
|
297
|
+
annotateTool({
|
|
298
|
+
name: "word-document_reload",
|
|
299
|
+
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",
|
|
300
|
+
inputSchema: { type: "object", properties: {} }
|
|
301
|
+
}, { operationKind: "mutate", rawDomain: "word" })
|
|
302
|
+
];
|
|
303
|
+
var tools = [...readTools, ...mutateTools, ...lifecycleTools];
|
|
304
|
+
var allTools = tools;
|
|
305
|
+
async function callTool(name, args = {}) {
|
|
306
|
+
return chunkTFOJLA2F_cjs.getDefaultClient().callTool(name, args);
|
|
307
|
+
}
|
|
308
|
+
var word = {
|
|
309
|
+
// Read
|
|
310
|
+
getContext: () => callTool("word-document_get_context"),
|
|
311
|
+
getOutline: (opts) => callTool("word-document_get_outline", opts ?? {}),
|
|
312
|
+
getSelection: () => callTool("word-selection_get"),
|
|
313
|
+
readContent: (opts) => callTool("word-content_read", opts ?? {}),
|
|
314
|
+
exportText: (opts) => callTool("word-content_export_text", opts ?? {}),
|
|
315
|
+
exportMarkdown: (opts) => callTool("word-content_export_markdown", opts ?? {}),
|
|
316
|
+
exportHtml: (opts) => callTool("word-content_export_html", opts ?? {}),
|
|
317
|
+
find: (query, opts) => callTool("word-find", { query, ...opts }),
|
|
318
|
+
listStyles: () => callTool("word-styles_list"),
|
|
319
|
+
// Mutate
|
|
320
|
+
setSelection: (target) => callTool("word-selection_set", { target }),
|
|
321
|
+
replaceContent: (text, target) => callTool("word-content_replace", { text, ...target ? { target } : {} }),
|
|
322
|
+
insertText: (text, opts) => callTool("word-content_insert_text", { text, ...opts }),
|
|
323
|
+
insertBlock: (blockType, content, opts) => callTool("word-block_insert", { blockType, content, ...opts }),
|
|
324
|
+
deleteBlock: (target) => callTool("word-block_delete", { target }),
|
|
325
|
+
moveBlock: (opts) => callTool("word-block_move", opts),
|
|
326
|
+
applyInlineFormat: (style, target) => callTool("word-format_apply_inline", { style, ...target ? { target } : {} }),
|
|
327
|
+
setBlockType: (blockType, target) => callTool("word-format_set_block", { blockType, ...target ? { target } : {} }),
|
|
328
|
+
findReplace: (query, replacement, opts) => callTool("word-find_replace", { query, replacement, ...opts }),
|
|
329
|
+
batchApply: (operations) => callTool("word-batch_apply", { operations }),
|
|
330
|
+
// Lifecycle
|
|
331
|
+
openPath: (path) => callTool("word-document_open_path", { path }),
|
|
332
|
+
save: () => callTool("word-document_save"),
|
|
333
|
+
reload: () => callTool("word-document_reload")
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
exports.allTools = allTools;
|
|
337
|
+
exports.lifecycleTools = lifecycleTools;
|
|
338
|
+
exports.mutateTools = mutateTools;
|
|
339
|
+
exports.readTools = readTools;
|
|
340
|
+
exports.tools = tools;
|
|
341
|
+
exports.word = word;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { allTools as allTools$4 } from './chunk-G66KY35N.js';
|
|
1
2
|
import { allTools as allTools$2 } from './chunk-4ITOR5QE.js';
|
|
2
|
-
import { allTools } from './chunk-
|
|
3
|
+
import { allTools } from './chunk-XU5GEWWL.js';
|
|
3
4
|
import { tools as tools$1 } from './chunk-FLATZQA2.js';
|
|
4
|
-
import { allTools as allTools$1 } from './chunk-DSOSHJH2.js';
|
|
5
5
|
import { allTools as allTools$3 } from './chunk-Z7LV7DCO.js';
|
|
6
6
|
import { tools } from './chunk-QD4KISXM.js';
|
|
7
|
+
import { allTools as allTools$1 } from './chunk-DSOSHJH2.js';
|
|
7
8
|
import { normalizeMCPTool, normalizeMCPToolObjectSchema } from './chunk-ANWOL7SM.js';
|
|
8
9
|
|
|
9
10
|
// src/mcp/index.ts
|
|
@@ -26,6 +27,9 @@ async function loadPlugin(pluginName) {
|
|
|
26
27
|
case "plugin-excel":
|
|
27
28
|
case "excel":
|
|
28
29
|
return import('./mcp/plugin-excel/index.js');
|
|
30
|
+
case "plugin-word":
|
|
31
|
+
case "word":
|
|
32
|
+
return import('./mcp/plugin-word/index.js');
|
|
29
33
|
default:
|
|
30
34
|
throw new Error(`Unknown plugin: ${pluginName}`);
|
|
31
35
|
}
|
|
@@ -36,7 +40,8 @@ var MCP_PACKAGES = [
|
|
|
36
40
|
{ id: "preview", name: "Preview", description: "\u9884\u89C8\u5668\u80FD\u529B", tools },
|
|
37
41
|
{ id: "seaflow", name: "SeaFlow", description: "\u6D41\u7A0B\u753B\u5E03\u6267\u884C\u4E0E\u7F16\u6392\u80FD\u529B", tools: allTools$2 },
|
|
38
42
|
{ id: "shell", name: "Shell", description: "Shell \u4F1A\u8BDD\u4E0E\u547D\u4EE4\u6267\u884C\u80FD\u529B", tools: tools$1 },
|
|
39
|
-
{ id: "excel", name: "Excel", description: "Excel \u7535\u5B50\u8868\u683C\u64CD\u4F5C\u80FD\u529B", tools: allTools$3 }
|
|
43
|
+
{ id: "excel", name: "Excel", description: "Excel \u7535\u5B50\u8868\u683C\u64CD\u4F5C\u80FD\u529B", tools: allTools$3 },
|
|
44
|
+
{ id: "word", name: "Word", description: "Word \u6587\u6863\u7F16\u8F91\u80FD\u529B", tools: allTools$4 }
|
|
40
45
|
];
|
|
41
46
|
function mcpToolToOpenAI(tool) {
|
|
42
47
|
const normalizedTool = normalizeMCPTool(tool);
|
|
@@ -54,11 +59,11 @@ function mcpToolToOpenAI(tool) {
|
|
|
54
59
|
};
|
|
55
60
|
}
|
|
56
61
|
function listAllTools() {
|
|
57
|
-
const
|
|
62
|
+
const tools8 = [];
|
|
58
63
|
for (const pkg of MCP_PACKAGES) {
|
|
59
|
-
|
|
64
|
+
tools8.push(...pkg.tools);
|
|
60
65
|
}
|
|
61
|
-
return
|
|
66
|
+
return tools8;
|
|
62
67
|
}
|
|
63
68
|
var listAvailableTools = listAllTools;
|
|
64
69
|
var MCP_TOOL_PACKAGE_INDEX = new Map(
|
|
@@ -82,13 +87,13 @@ function getMCPPackages() {
|
|
|
82
87
|
}));
|
|
83
88
|
}
|
|
84
89
|
function getToolsForLLM(disabledPackages) {
|
|
85
|
-
const
|
|
90
|
+
const tools8 = [];
|
|
86
91
|
for (const pkg of MCP_PACKAGES) {
|
|
87
92
|
if (!disabledPackages.has(pkg.id)) {
|
|
88
|
-
|
|
93
|
+
tools8.push(...pkg.tools.map(mcpToolToOpenAI));
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
|
-
return
|
|
96
|
+
return tools8;
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI };
|
|
@@ -1289,7 +1289,9 @@ var SeastudioNotifications = {
|
|
|
1289
1289
|
/** 文件发送请求 */
|
|
1290
1290
|
FILE_SEND_REQUESTED: "seastudio:file-send_requested",
|
|
1291
1291
|
/** 文本发送请求 */
|
|
1292
|
-
TEXT_SEND_REQUESTED: "seastudio:text-send_requested"
|
|
1292
|
+
TEXT_SEND_REQUESTED: "seastudio:text-send_requested",
|
|
1293
|
+
/** 代码提案审核反馈 */
|
|
1294
|
+
PROPOSAL_FEEDBACK: "seastudio:proposal-feedback"
|
|
1293
1295
|
};
|
|
1294
1296
|
|
|
1295
1297
|
exports.SeastudioNotifications = SeastudioNotifications;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkORBVHAAS_cjs = require('./chunk-ORBVHAAS.cjs');
|
|
3
4
|
var chunkHJJTBVKQ_cjs = require('./chunk-HJJTBVKQ.cjs');
|
|
4
|
-
var
|
|
5
|
+
var chunkSUF5BPSK_cjs = require('./chunk-SUF5BPSK.cjs');
|
|
5
6
|
var chunkISI2OLPI_cjs = require('./chunk-ISI2OLPI.cjs');
|
|
6
|
-
var chunkSNGU4SHO_cjs = require('./chunk-SNGU4SHO.cjs');
|
|
7
7
|
var chunkCVF4QHS6_cjs = require('./chunk-CVF4QHS6.cjs');
|
|
8
8
|
var chunkMYURVLGP_cjs = require('./chunk-MYURVLGP.cjs');
|
|
9
|
+
var chunkSNGU4SHO_cjs = require('./chunk-SNGU4SHO.cjs');
|
|
9
10
|
var chunkTFOJLA2F_cjs = require('./chunk-TFOJLA2F.cjs');
|
|
10
11
|
|
|
11
12
|
// src/mcp/index.ts
|
|
@@ -28,17 +29,21 @@ async function loadPlugin(pluginName) {
|
|
|
28
29
|
case "plugin-excel":
|
|
29
30
|
case "excel":
|
|
30
31
|
return import('./mcp/plugin-excel/index.cjs');
|
|
32
|
+
case "plugin-word":
|
|
33
|
+
case "word":
|
|
34
|
+
return import('./mcp/plugin-word/index.cjs');
|
|
31
35
|
default:
|
|
32
36
|
throw new Error(`Unknown plugin: ${pluginName}`);
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
var MCP_PACKAGES = [
|
|
36
|
-
{ id: "seastudio", name: "SeaStudio", description: "\u6587\u4EF6/Shell/Git \u57FA\u7840\u80FD\u529B", tools:
|
|
40
|
+
{ id: "seastudio", name: "SeaStudio", description: "\u6587\u4EF6/Shell/Git \u57FA\u7840\u80FD\u529B", tools: chunkSUF5BPSK_cjs.allTools },
|
|
37
41
|
{ id: "codeEditor", name: "Code Editor", description: "\u4EE3\u7801\u7F16\u8F91\u5668\u80FD\u529B", tools: chunkSNGU4SHO_cjs.allTools },
|
|
38
42
|
{ id: "preview", name: "Preview", description: "\u9884\u89C8\u5668\u80FD\u529B", tools: chunkMYURVLGP_cjs.tools },
|
|
39
43
|
{ id: "seaflow", name: "SeaFlow", description: "\u6D41\u7A0B\u753B\u5E03\u6267\u884C\u4E0E\u7F16\u6392\u80FD\u529B", tools: chunkHJJTBVKQ_cjs.allTools },
|
|
40
44
|
{ id: "shell", name: "Shell", description: "Shell \u4F1A\u8BDD\u4E0E\u547D\u4EE4\u6267\u884C\u80FD\u529B", tools: chunkISI2OLPI_cjs.tools },
|
|
41
|
-
{ id: "excel", name: "Excel", description: "Excel \u7535\u5B50\u8868\u683C\u64CD\u4F5C\u80FD\u529B", tools: chunkCVF4QHS6_cjs.allTools }
|
|
45
|
+
{ id: "excel", name: "Excel", description: "Excel \u7535\u5B50\u8868\u683C\u64CD\u4F5C\u80FD\u529B", tools: chunkCVF4QHS6_cjs.allTools },
|
|
46
|
+
{ id: "word", name: "Word", description: "Word \u6587\u6863\u7F16\u8F91\u80FD\u529B", tools: chunkORBVHAAS_cjs.allTools }
|
|
42
47
|
];
|
|
43
48
|
function mcpToolToOpenAI(tool) {
|
|
44
49
|
const normalizedTool = chunkTFOJLA2F_cjs.normalizeMCPTool(tool);
|
|
@@ -56,11 +61,11 @@ function mcpToolToOpenAI(tool) {
|
|
|
56
61
|
};
|
|
57
62
|
}
|
|
58
63
|
function listAllTools() {
|
|
59
|
-
const
|
|
64
|
+
const tools8 = [];
|
|
60
65
|
for (const pkg of MCP_PACKAGES) {
|
|
61
|
-
|
|
66
|
+
tools8.push(...pkg.tools);
|
|
62
67
|
}
|
|
63
|
-
return
|
|
68
|
+
return tools8;
|
|
64
69
|
}
|
|
65
70
|
var listAvailableTools = listAllTools;
|
|
66
71
|
var MCP_TOOL_PACKAGE_INDEX = new Map(
|
|
@@ -84,13 +89,13 @@ function getMCPPackages() {
|
|
|
84
89
|
}));
|
|
85
90
|
}
|
|
86
91
|
function getToolsForLLM(disabledPackages) {
|
|
87
|
-
const
|
|
92
|
+
const tools8 = [];
|
|
88
93
|
for (const pkg of MCP_PACKAGES) {
|
|
89
94
|
if (!disabledPackages.has(pkg.id)) {
|
|
90
|
-
|
|
95
|
+
tools8.push(...pkg.tools.map(mcpToolToOpenAI));
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
|
-
return
|
|
98
|
+
return tools8;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
exports.MCP_PACKAGES = MCP_PACKAGES;
|
|
@@ -1287,7 +1287,9 @@ var SeastudioNotifications = {
|
|
|
1287
1287
|
/** 文件发送请求 */
|
|
1288
1288
|
FILE_SEND_REQUESTED: "seastudio:file-send_requested",
|
|
1289
1289
|
/** 文本发送请求 */
|
|
1290
|
-
TEXT_SEND_REQUESTED: "seastudio:text-send_requested"
|
|
1290
|
+
TEXT_SEND_REQUESTED: "seastudio:text-send_requested",
|
|
1291
|
+
/** 代码提案审核反馈 */
|
|
1292
|
+
PROPOSAL_FEEDBACK: "seastudio:proposal-feedback"
|
|
1291
1293
|
};
|
|
1292
1294
|
|
|
1293
1295
|
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };
|