@pecot/visual-mcp 4.0.3-dev.182 → 4.0.3-dev.183
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/.claude-plugin/plugin.json +1 -1
- package/cli/dist/mcp/tools/drawio.js +3 -2
- package/cli/dist/mcp/tools/evidence.js +1 -1
- package/cli/dist/mcp/tools/setup.js +2 -5
- package/cli/dist/mcp/tools/slide-dev.js +2 -4
- package/cli/dist/mcp/tools/slide-page.js +1 -1
- package/cli/dist/mcp/tools/slide.js +5 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -202,8 +202,7 @@ function drawioExportMessage(execution, warningCount) {
|
|
|
202
202
|
const pdf = execution.pdfFile === undefined ? '' : ` (PDF: ${execution.pdfFile})`;
|
|
203
203
|
return `wrote SVG to ${execution.outputFile}${pdf}${warningSuffix(warningCount)}`;
|
|
204
204
|
}
|
|
205
|
-
//
|
|
206
|
-
// どちらのツールもファイルを書き、PNG 生成では viewer.diagrams.net、SVG 生成では embed.diagrams.net へ到達する。
|
|
205
|
+
// 定義書の effects (destructive) と idempotent のとおりに明示する。openWorldHint は SDK 既定 (true) のまま。
|
|
207
206
|
export const drawioCreateTool = {
|
|
208
207
|
name: 'drawio_create',
|
|
209
208
|
config: {
|
|
@@ -211,6 +210,7 @@ export const drawioCreateTool = {
|
|
|
211
210
|
description: 'Turns drawio XML into a deliverable that opens directly in a browser. Writes viewer HTML (.html; opening it redirects to draw.io) to out_path and, by default, also writes a rendered PNG (useful for checking the rendering). icon:// references are resolved to data URIs and embedded. Before generating, it checks the diagram labels against the text rules and generates nothing if there is a violation. The font and font size are checked against the theme declaration (theme, or the theme of the talk-dir that is an ancestor of the diagram), and the result is returned in theme.',
|
|
212
211
|
inputSchema: drawioCreateInput,
|
|
213
212
|
outputSchema: drawioCreateOutput,
|
|
213
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
214
214
|
},
|
|
215
215
|
handler: handleDrawioCreate,
|
|
216
216
|
};
|
|
@@ -221,6 +221,7 @@ export const drawioExportTool = {
|
|
|
221
221
|
description: 'Exports drawio XML to a static SVG and a sibling PDF. Set pdf: false to suppress the PDF. With print_hash, it exports nothing and returns only the composite hash used for staleness checks. It does not check the diagram text, so pass a .drawio that has gone through drawio_create.',
|
|
222
222
|
inputSchema: drawioExportInput,
|
|
223
223
|
outputSchema: drawioExportOutput,
|
|
224
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
224
225
|
},
|
|
225
226
|
handler: handleDrawioExport,
|
|
226
227
|
};
|
|
@@ -72,7 +72,7 @@ export const evidenceCreateTool = {
|
|
|
72
72
|
inputSchema: evidenceCreateInput,
|
|
73
73
|
outputSchema: evidenceCreateOutput,
|
|
74
74
|
// ローカルの spec / 画像を読んで xlsx を書くだけでネットワークには到達しない。
|
|
75
|
-
annotations: { openWorldHint: false },
|
|
75
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
76
76
|
},
|
|
77
77
|
handler: handleEvidenceCreate,
|
|
78
78
|
};
|
|
@@ -248,11 +248,8 @@ export function setupTool(buildDependencies = chromiumDefaultDependencies, build
|
|
|
248
248
|
// 引数を取らないツールは空の z.object を渡す (src/mcp/server.ts の ToolConfig)。
|
|
249
249
|
inputSchema: z.object({}),
|
|
250
250
|
outputSchema: setupOutput,
|
|
251
|
-
//
|
|
252
|
-
|
|
253
|
-
// 到達する (openWorld)。読み取り専用ではないので readOnlyHint は立てない。
|
|
254
|
-
// 取得済みなら skip するため、何度呼んでも状態は変わらない (idempotent)。
|
|
255
|
-
annotations: { destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
251
|
+
// ダウンロードでファイルシステムを書き換え、外部ホストへ到達する。取得済みなら skip するので idempotent。
|
|
252
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
256
253
|
},
|
|
257
254
|
handler,
|
|
258
255
|
};
|
|
@@ -210,10 +210,8 @@ export function slideDevTool(buildRegistry = devServerRegistry, buildRuntimeDepe
|
|
|
210
210
|
+ 'The server runs only while the MCP server process is alive; the preview ends with the session.',
|
|
211
211
|
inputSchema: slideDevInput,
|
|
212
212
|
outputSchema: slideDevOutput,
|
|
213
|
-
//
|
|
214
|
-
|
|
215
|
-
// その基準は、ネットワークに到達しないことが確定していること。
|
|
216
|
-
// 子プロセスを起こす以上、readOnlyHint も立てられない。
|
|
213
|
+
// `--remote` で全インタフェースに LISTEN するため、openWorldHint は SDK 既定 (true) のまま。
|
|
214
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
217
215
|
},
|
|
218
216
|
handler,
|
|
219
217
|
};
|
|
@@ -306,7 +306,7 @@ readReferenceText = file => readFile(file, 'utf8')) {
|
|
|
306
306
|
inputSchema: slidePageInput,
|
|
307
307
|
outputSchema: slidePageOutput,
|
|
308
308
|
// talk-dir 配下の読み取りと 1 ファイルの書き込みだけで、ネットワークには到達しない。
|
|
309
|
-
annotations: { openWorldHint: false },
|
|
309
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
310
310
|
},
|
|
311
311
|
handler: arguments_ => handleSlidePage(arguments_, readReferenceText),
|
|
312
312
|
};
|
|
@@ -163,7 +163,8 @@ export function slideCreateTool(buildDependencies = slideCreateDefaultDependenci
|
|
|
163
163
|
+ 'Also returns the lint result of the whole deck right after generation (generation counts as successful even with lint violations).',
|
|
164
164
|
inputSchema: slideCreateInput,
|
|
165
165
|
outputSchema: slideCreateOutput,
|
|
166
|
-
// git
|
|
166
|
+
// git でテーマを取得するため openWorldHint は SDK 既定 (true) のまま。
|
|
167
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
167
168
|
},
|
|
168
169
|
handler: async (arguments_) => {
|
|
169
170
|
const validated = parsePathArguments(slideCreateInput, arguments_, ['project_dir']);
|
|
@@ -238,6 +239,7 @@ export function slideConvertTool(buildDependencies = slideConvertDefaultDependen
|
|
|
238
239
|
description: 'Converts a Slidev project to PPTX. The duration is proportional to the number of slides (just under 30 seconds for 55 slides).',
|
|
239
240
|
inputSchema: slideConvertInput,
|
|
240
241
|
outputSchema: slideConvertOutput,
|
|
242
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
241
243
|
},
|
|
242
244
|
handler: async (arguments_,
|
|
243
245
|
// ToolCallContext.signal (AbortSignal は EventTarget で addEventListener を呼ぶため readonly 化できない)。
|
|
@@ -328,8 +330,8 @@ export function slideSyncTool(buildDependencies = slideSyncDefaultDependencies,
|
|
|
328
330
|
+ 'and the lint result of the whole deck after the sync. A running slide_dev must be stopped with stop: true and started again.',
|
|
329
331
|
inputSchema: slideSyncInput,
|
|
330
332
|
outputSchema: slideSyncOutput,
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
+
// テーマを git で取得しうるため openWorldHint は SDK 既定 (true) のまま。
|
|
334
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
333
335
|
},
|
|
334
336
|
handler: async (arguments_) => {
|
|
335
337
|
const validated = parsePathArguments(slideSyncInput, arguments_, ['dir']);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pecot/visual-mcp",
|
|
3
|
-
"version": "4.0.3-dev.
|
|
3
|
+
"version": "4.0.3-dev.183",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pecot/visual-mcp",
|
|
9
|
-
"version": "4.0.3-dev.
|
|
9
|
+
"version": "4.0.3-dev.183",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cffnpwr/textlint-plugin-comments": "1.0.0",
|